Skip to content

@lelantos-org/sdk / bundle / feeOutputFromEstimate

Function: feeOutputFromEstimate() โ€‹

ts
function feeOutputFromEstimate(__namedParameters): FeeOutput | null;

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

The fee slot for a spend, read straight off a relayer's estimate.

Prefer this to feeOutput: an estimate carries the address on one field and the amount on another, and picking the right quote out of fees[] means matching on assetId โ€” three joins a caller would otherwise redo, and get subtly wrong, at every call site.

Returns null when the relayer is not charging on this chain (shieldedFeeAddress absent), which is the case where a spend needs no fee slot at all. Throws when it is charging but cannot take this asset โ€” that is a spend which cannot be relayed, and silently omitting the fee would turn it into a 402 from the submit call instead.

Parameters โ€‹

ParameterType
__namedParametersFeeOutputFromEstimateArgs

Returns โ€‹

FeeOutput | null

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