Function: sealPreimage()
@kortexya/reasoninglayer / sealPreimage
Function: sealPreimage()
Section titled “Function: sealPreimage()”sealPreimage(
tenantId,scopeId,commitment):string
Defined in: src/utils/audit-headers.ts:219
The exact text a seal signature is computed over.
Parameters
Section titled “Parameters”tenantId
Section titled “tenantId”string
The tenant UUID the scope belongs to.
scopeId
Section titled “scopeId”string
The scope being sealed.
commitment
Section titled “commitment”string
The scope’s Merkle commitment (64 hex digits).
Returns
Section titled “Returns”string
osfkb-audit-seal-v1\n<tenant>\n<scope>\n<commitment>\n. Sign its
UTF-8 bytes with Ed25519.
Remarks
Section titled “Remarks”Mirrors seal_preimage in the engine
(crates/domain/src/ports/seal_signature.rs). The tenant is bound
explicitly, so a signature over an empty scope’s commitment cannot be
replayed in another tenant. Send the signature and the public key as
AuditCausalHeaders.sealSignature and
AuditCausalHeaders.sealSigner, both base64.
Example
Section titled “Example”const message = new TextEncoder().encode(sealPreimage(tenantId, scope, commitment));