@lelantos-org/sdk / advanced / previewWithdraw
Function: previewWithdraw()
ts
function previewWithdraw(args): WithdrawPreview;Defined in: @lelantos-org/sdk/dist/wallet/ops/withdraw-preview.d.ts:51
Preview a withdrawal without proving or submitting anything.
ts
const p = previewWithdraw({ amount: "1000", asset: usdc });
p.publicOut; // 1_000_000_000n, published on-chain
p.netFormatted; // "998", received by the recipient
p.onLadder; // truePure. wallet.previewWithdraw is the bound form that resolves the asset.
Parameters
| Parameter | Type |
|---|---|
args | WithdrawPreviewArgs |