Skip to content

Function: sealPreimage()

@kortexya/reasoninglayer


@kortexya/reasoninglayer / sealPreimage

sealPreimage(tenantId, scopeId, commitment): string

Defined in: src/utils/audit-headers.ts:219

The exact text a seal signature is computed over.

string

The tenant UUID the scope belongs to.

string

The scope being sealed.

string

The scope’s Merkle commitment (64 hex digits).

string

osfkb-audit-seal-v1\n<tenant>\n<scope>\n<commitment>\n. Sign its UTF-8 bytes with Ed25519.

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.

const message = new TextEncoder().encode(sealPreimage(tenantId, scope, commitment));