@lelantos-org/sdk / bundle / feeOutput
Function: feeOutput() โ
function feeOutput(__namedParameters): FeeOutput;Defined in: @lelantos-org/sdk/dist/bundle/fee.d.ts:50
Build the fee slot for a spend, from an address and an amount.
feeOutputFromEstimate is usually what you want: it reads both off a relayer's estimate rather than making a caller pick the right quote out of fees[] by hand. Reach for this one when the amount comes from somewhere else โ a cached quote, a test, a relayer spoken to over another transport.
rho is set here only to satisfy the Note shape โ buildSpend overwrites every output's rho with Poseidon(TAG_RHO, nf0, index), which is what binds the note to this particular spend and stops a fee note being replayed into another one.
Throws on a zero value: a zero-value output is treated as a self-pad and discarded by every scanner, so it would pay nothing while looking like it had.
Parameters โ
| Parameter | Type |
|---|---|
__namedParameters | FeeOutputArgs |
Returns โ
FeeOutput