Skip to content

@armada/sdk / index / buildWitness

Function: buildWitness()

buildWitness(params): Promise<BuiltWitness>

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

Assemble the transfer circuit witness. Creates the output notes (encrypting each to its receiver), computes nullifiers/commitments, the bound-params hash, and requests the EdDSA spend-auth signature over poseidon([merkleRoot, boundParamsHash, ...nullifiers, ...commitmentsOut]). The output order is caller-controlled and MUST be fee-first. Correctness of the circuit-field format is validated by the tx chain differential; this builds the invariants (nullifiers, commitments, signature, hash) exactly.

Parameters

params

BuildWitnessParams

Returns

Promise<BuiltWitness>