Skip to content

@lelantos-org/sdk / bundle / feeOutput

Function: feeOutput() โ€‹

ts
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 โ€‹

ParameterType
__namedParametersFeeOutputArgs

Returns โ€‹

FeeOutput

Lelantosno cookies ๐Ÿช ยท no tracking ๐Ÿ‘๏ธ ยท no accounts ๐Ÿ‘คwalletexplorer4536080GitHub