Skip to content

patchStealthStatement

patchStealthStatement(unsignedTx, statement): UnsignedTransactionV1

Defined in: ootle/src/stealth/authorizer.ts:501

Patch the single stealth instruction in unsignedTx with a (hydrated) statement.

Locates the sole StealthTransfer instruction (throws if there is not exactly one) and replaces its statement field with the byte-exact compact JSON of statement (via the single encoding seam in instruction.ts). Returns a new UnsignedTransactionV1 — the input is not mutated.

UnsignedTransactionV1

StealthTransferStatement

UnsignedTransactionV1

when there is no StealthTransfer instruction (not a stealth tx) or more than one (malformed).