Skip to content

@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 ​

ts
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 ​

ts
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 ​

ts
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 ​

ts
net: TokenAmount;

Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:17

ERC-20 base units reaching the recipient.


netFormatted ​

ts
netFormatted: string;

Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:21

WithdrawPreview.net as a human decimal string.


onLadder ​

ts
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 ​

ts
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? ​

ts
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.