Skip to main content

client.withdraw.getDestinations()

Returns supported withdrawal destination chains. Each destination includes its chain ID, display name, and the canonical loan token address on that chain.
const destinations = await client.withdraw.getDestinations();
// destinations[0].chainId, destinations[0].name, destinations[0].loanTokenAddress
Use getDestinations() to populate the withdrawal destination picker before requesting calldata.

client.withdraw.getCalldata(params)

Returns server-built withdrawal action plans. The server resolves the Safe and user context from the accountId, selects source chains, and returns ActionPlan objects for the integrator to execute.
import { TransactionHandler } from "@blend-money/sdk";

const result = await client.withdraw.getCalldata({
  accountId: account.accountId,
  destinationChainId: 8453,
  amount: "1000000000000000000",
  // isMaxWithdraw: true,
});

for (const actionPlan of result.actionPlans) {
  await TransactionHandler.submitActionPlan(actionPlan);
}
Each ActionPlan in result.actionPlans represents one source chain. Action plans for different chains can be executed concurrently. TransactionHandler.submitActionPlan() handles step ordering and transaction submission. 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 steps may be omitted because the exact post-settlement amount is not known up front
  • forceDeallocate steps appear when funds need to be pulled from a position that does not support standard withdrawal

Next steps

Last modified on April 6, 2026