Skip to main content
The withdrawal authorization system uses discriminated unions to represent the two possible authorization methods. Type guards are provided for TypeScript narrowing.

Import

WithdrawAuthMethod Enum

Unlike deposits, withdrawals do not support EIP-2612 permit signatures. Account share approvals always require an on-chain transaction.

Result Types

WithdrawAuthorizationResult (Discriminated Union)

WithdrawApprovalAuthorizationResult

Returned when an account share approval transaction is needed before submitting the withdrawal order.

WithdrawAlreadyApprovedAuthorizationResult

Returned when the existing account share allowance is sufficient.

Type Guards

Use type guards for TypeScript narrowing:

Using Switch Statements

PrepareWithdrawalAuthorizationParams