commitmentOf
commitmentOf(
substateId):Uint8Array<ArrayBufferLike> |null
Defined in: ootle/src/stealth/substate-parse.ts:64
Extract the 32-byte commitment from a UTXO substate id.
A UTXO id has the form utxo_{resourceHex}_{commitmentHex}; the commitment is the
trailing hex segment. Returns null if the id is not a UTXO id (wrong prefix,
e.g. a component/vault id) or the trailing segment is not exactly 32 bytes of hex.
The commitment is never in the output body — always derive it from the id.
Parameters
Section titled “Parameters”substateId
Section titled “substateId”string
The full substate id string.
Returns
Section titled “Returns”Uint8Array<ArrayBufferLike> | null
The 32-byte commitment, or null if substateId is not a valid UTXO id.