client.withdraw.getCalldata(params)
Returns server-built withdrawal execution payloads. The server resolves the Safe and user context from the accountId, selects source chains, and returns an ordered payload set for the integrator to execute.
const result = await client.withdraw.getCalldata({
accountId: account.accountId,
destinationChainId: 8453,
amount: "1000000000000000000",
// isMaxWithdraw: true,
});
for (const payload of result.payloads) {
for (const step of payload.steps) {
switch (step.kind) {
case "liquidityReset":
// submit step.data as delegatecall to step.to
break;
case "approve":
case "withdraw":
case "approveReset":
// submit step.data to step.to as a regular call
break;
case "bridge":
// submit step.data to step.to with step.value as ETH value
break;
}
}
}
WithdrawChainPayload
Each WithdrawChainPayload contains:
| Field | Type | Description |
|---|
chainId | number | Source chain for this payload |
vaultAddress | string | ERC-4626 vault being exited |
amount | string | Amount allocated from this chain |
timeEstimate | number | Estimated settlement time in seconds. 0 when same chain |
fees | QuoteFees | null | Bridge fee breakdown. null when no bridge needed |
steps | WithdrawStep[] | Ordered steps: liquidityReset, approve, withdraw, approveReset, bridge |
Each WithdrawStep is a discriminated union on kind:
| Kind | Submit as | Extra fields |
|---|
liquidityReset | delegatecall from the Safe | delegateCall: true |
approve | regular call | - |
withdraw | regular call | - |
approveReset | regular call | - |
bridge | regular call with ETH value | value, chainId, timeEstimate, fees |
Important behavior:
amount is an integer string in underlying token units
isMaxWithdraw: true redeems all shares across chains
- a
409 response means a rebalance flow plan is already active
- for max withdraws, bridge payloads may be omitted because the exact post-settlement amount is not known up front
Next steps
Last modified on March 20, 2026