@lelantos-org/sdk / protocol / SpendArgs
Interface: SpendArgs
Defined in: @lelantos-org/sdk/dist/bundle/spend.d.ts:4
Properties
artifacts?
optional artifacts?: ProverArtifacts;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:62
Proving backend: artifacts (the SDK proves with snarkjs) or a custom prover (remote, worker, mock). One is required; prover takes precedence.
Inherited from
BundleCommon.artifactsasset
asset: bigint;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:44
Registry id publicOut leaves the pool in. Published as publicAssetId only when publicOut is non-zero.
Inherited from
BundleCommon.assetchainId
chainId: bigint;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:39
Inherited from
BundleCommon.chainIdinputs
inputs: InputSlots;Defined in: @lelantos-org/sdk/dist/bundle/spend.d.ts:7
intentHash?
optional intentHash?: bigint;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:57
PubInputs.Transact.intentHash, a field element. A swap's withdraw leg must set it to swapIntentHash of the swap it funds; every other spend leaves it at the zero default.
Inherited from
BundleCommon.intentHashJ
J: Jubjub;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:38
Inherited from
BundleCommon.Jkind
kind: SpendKind;Defined in: @lelantos-org/sdk/dist/bundle/spend.d.ts:6
Which on-chain entry point the relayer should call.
merkleRoot
merkleRoot: bigint;Defined in: @lelantos-org/sdk/dist/bundle/spend.d.ts:8
outgoingKey
outgoingKey: Uint8Array;Defined in: @lelantos-org/sdk/dist/bundle/spend.d.ts:26
The sender's outgoing key (deriveOutgoingKey). Every output's blinder, ECDH ephemeral and clue blinder derive from it, the output itself and the spend's nullifiers (sealOutput), so the sender can recompute them and prove what an output paid.
outputs
outputs: readonly OutputSpec[];Defined in: @lelantos-org/sdk/dist/bundle/spend.d.ts:18
One entry per output slot: the send note of a transfer, the relayer's fee note, change back to self, and zero-value pads. Per asset, the values must sum to the real input value, less publicOut for asset.
Change takes the sender's own address. A pad takes an address drawn for it, never the sender's: a clue for the sender's key on every unused slot would mark the spend as the sender's to a detector.
P
P: Poseidon;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:37
Inherited from
BundleCommon.PpayerAddress
payerAddress: string;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:45
Inherited from
BundleCommon.payerAddressprover?
optional prover?: Prover;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:63
Inherited from
BundleCommon.proverpublicOut?
optional publicOut?: bigint;Defined in: @lelantos-org/sdk/dist/bundle/spend.d.ts:20
Value leaving the shielded pool. 0 for a transfer.
recipientAddress
recipientAddress: string;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:52
Inherited from
BundleCommon.recipientAddressrelayerAddress
relayerAddress: string;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:51
0x ETH. The relayer's submitter address (/chains relayerAddress): the pool's msg.sender for its spends, so it must equal pi.relayer. For a relayer submitting through its Bundler contract this is the Bundler's address, not the signing EOA.
Inherited from
BundleCommon.relayerAddressshape?
optional shape?: CircuitShape;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:71
Circuit arity, when the caller knows it. Supplying it enables a pre-flight check of the slot counts. toCircomInput infers the shape from the array lengths, so without it a spend with the wrong slot count for the zkey builds a valid witness with the wrong number of public inputs and fails inside the prover.
Inherited from
BundleCommon.shapetreeDepth
treeDepth: number;Defined in: @lelantos-org/sdk/dist/bundle/common.d.ts:64
Inherited from
BundleCommon.treeDepth