Skip to content

@armada/sdk / index / planTransfer

Function: planTransfer()

planTransfer(params): PlanSelection

Defined in: src/tx/plan.ts:97

Plan a shielded transfer. Selects input notes from a SINGLE tree (a transaction proves against one tree root) covering sum(outputs) + fee, preferring the tree that needs the fewest inputs. Produces an inspectable Plan — the circuit shape counts every output that becomes a commitment: the recipient note(s), the broadcaster fee note, and a change note when inputTotal > spent.

Output ordering for the prover (Phase 0 Spike 2): the broadcaster fee note MUST be emitted FIRST, because the relayer verifies the first decryptable note. The summary carries feeOutput separately; the prove step is responsible for placing it first.

Parameters

params

PlanTransferParams

Returns

PlanSelection