Skip to content

@armada/sdk / index / hashSpendBoundParams

Function: hashSpendBoundParams()

hashSpendBoundParams(boundParams, ciphertexts): bigint

Defined in: src/tx/witness.ts:43

Hash the bound params exactly as the circuit/contract does (hashBoundParamsV2). Only the six proof-bound fields + the output ciphertexts enter the hash — decodedAdaptParams is inspection-only (the proof commits the one-way adaptParams keccak, not the decoded tuple). Shared by witness assembly and computeSpendIntentDigest so both derive byte-identical hashes.

Parameters

boundParams

Pick<DecodedBoundParams, "treeNumber" | "minGasPrice" | "unshield" | "chainID" | "adaptContract" | "adaptParams">

ciphertexts

readonly CommitmentCiphertextV2[]

Returns

bigint