Skip to content
On this page

Function: computeEnvelopeId()

TypeScript
function computeEnvelopeId(env: LockEnvelope): Uint8Array;

Defined in: lock-core/src/seal.ts:66 (opens in a new tab)

Compute the final envelope id: SHA-256 of the canonical envelope with sig.value stripped to empty. The id field itself is excluded from the hash input (we set it to empty before hashing). This is the id unseal checks and the sender's BIP-322 signature covers, so a reader holding a kept envelope can check its content still matches the id it signed.

ParametersLink to this section

ParameterType
envLockEnvelope

ReturnsLink to this section

Uint8Array