@lelantos-org/sdk / index / WithdrawPreview
Interface: WithdrawPreview
Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:13
Result of previewWithdraw.
Properties
denominations
denominations: Ladder;Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:35
The asset's denominations, ascending. Empty when it has none.
fee
fee: TokenAmount;Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:19
ERC-20 base units the protocol keeps. net + fee is the gross.
hasLadder
hasLadder: boolean;Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:33
Whether the asset has a ladder; false only when the wallet opted out via WalletConfig.denominations, in which case onLadder is always false and meaningless.
net
net: TokenAmount;Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:17
ERC-20 base units reaching the recipient.
netFormatted
netFormatted: string;Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:21
WithdrawPreview.net as a human decimal string.
onLadder
onLadder: boolean;Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:28
Whether publicOut is one of the asset's denominations.
false is not rejected, but an off-ladder publicOut is a near-unique public integer that makes the withdrawal linkable to the deposit that funded it. Callers should surface it.
publicOut
publicOut: CircuitAmount;Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:15
The gross leaving the pool, in circuit units; the value published on-chain.
suggestion?
optional suggestion?: CircuitAmount;Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:37
Closest denomination, when the amount is off-ladder and one exists.