Skip to content

@lelantos-org/sdk / protocol / feeOutput

Function: feeOutput() ​

ts
function feeOutput(__namedParameters): FeeOutput;

Defined in: @lelantos-org/sdk/dist/bundle/fee.d.ts:39

Build the fee slot for a spend, from an address and an amount.

Prefer feeOutputFromEstimate, which reads both from a relayer's estimate. Use this when the amount comes from elsewhere, such as a cached quote, a test, or a relayer reached over another transport.

buildSpend gives the note rho = Poseidon(TAG_RHO, nf0, index), which binds it to that spend and prevents a fee note from being replayed into another.

Parameters ​

ParameterType
__namedParametersFeeOutputArgs

Returns ​

FeeOutput

Throws ​

on a non-positive value: a zero-value output is treated as a pad and discarded by every scanner, so it would pay nothing. Also on an invalid address.