Before withdrawing, you must approve the WithdrawQueue contract to spend your vault shares. Consider using prepareWithdrawalAuthorization for a higher-level API that handles approval checking automatically.
Import
Usage
Parameters
Return Type
- Type Definition
- Example Response
Examples
- Viem
- Wagmi
Max vs Specific Approval
Max Approval (Default)
WhenwithdrawAmount is not provided, the SDK approves the maximum amount. This is a one-time approval that covers all future withdrawals:
Specific Amount Approval
For tighter security, approve only the amount you intend to withdraw:Checking Existing Approval
Before approving, check if approval is already granted:Consider using prepareWithdrawalAuthorization instead, which combines the approval check and approval preparation into a single call.
Error Handling
Related
- prepareWithdrawalAuthorization - Unified authorization (recommended)
- prepareWithdrawOrderTxData - Submit the withdrawal order
- Withdrawals Guide - Complete withdrawal flow