Skip to main content
prepareWithdrawTxData assembles calldata that burns shares and returns the want asset in one transaction. Use it when the vault advertises enough on-chain liquidity for immediate redemptions.

Helper Signature

  • Returns { abi, address, functionName: 'bulkWithdraw', args, chainId }.
  • args order: [wantAssetAddress, shareAmountInBaseUnits, minimumAssetsOut, userAddress].
  • No ERC-20 approvals are required; the vault burns shares directly.

React with Privy

React with wagmi

React with viem

Handle errors by catching APIError; the endpoint field lets you surface actionable error messaging when vaults, chains, or solver slippage lookups are unavailable.***