verifyStateChain
@totemsdk/statechain / verifyStateChain
Function: verifyStateChain()
verifyStateChain(
chain,opts?):VerifyResult
Verify the full transfer history of a statechain.
For each TransferRecord, verifies:
- Chain continuity: party IDs and PKDs are linked hop-by-hop.
- Transfer key lineage: derivePKdigest(transferKey, 0) === fromPublicKeyDigest.
- Digest provenance: sha3_256(txBodyHex) === signedDigest.
Prevents a malicious record from pairing valid signatures over one digest
with unrelated
txHex. Binds all signatures to the actual TX data. - SE blind signature: verifies
blindedSignatureoversignedDigest. - Old-owner signature: verifies
ownerSignatureoversignedDigest. Proves the old owner — not just the SE — authorised this state transition.
Then validates that currentOwner matches the last transfer recipient.