Skip to content

@lelantos-org/sdk / internal / auxDigest

Function: auxDigest() โ€‹

ts
function auxDigest(aux): bigint;

Defined in: @lelantos-org/sdk/dist/protocol/abi-hash.d.ts:75

Binds the encrypted-note payload the relayer carries in calldata: keccak256(abi.encode(aux)) mod r over the whole AuxValidation.Output array. Mirrors PubInputs.sol, which MUST recompute this from the aux calldata rather than accept it as an input.

The clue fields are bound per output; this digest covers ephPub and ciphertext as well. Without it a relayer could leave the clue intact โ€” the proof still verifies and the recipient's FMD scan still flags the note โ€” while corrupting the payload, leaving the recipient unable to derive the ECDH secret or open a note whose inputs are already spent.

Encoded as a dynamic tuple[], so the length is part of the preimage and arrays of different arity cannot collide.

Parameters โ€‹

ParameterType
auxreadonly AuxOutput[]

Returns โ€‹

bigint

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub