Skip to main content
The App Kit SDK supports trustless withdrawals from a Unified Balance as a recovery path that keeps funds under your control. Trustless removal requires two onchain transactions: first, call initiateRemoveFund to start the seven-day waiting period. After the waiting period ends, call removeFund to return the funds to your wallet.
removeFund is designed as a trustless escape hatch for fallback or recovery scenarios only, such as when your normal spend path is unavailable. It is not intended for day-to-day payouts, withdrawals, or crosschain movement. In normal situations, use spend to move funds instantly from a Unified Balance.

Prerequisites

Before you begin, ensure that you’ve: These are required so any example below runs with a valid kit and adapter.

Initiate and complete a removal

1

Start the waiting period

First, call initiateRemoveFund to record the request to remove funds and start the seven-day waiting period.This example initiates a removal of 1 USDC on Base Sepolia:
TypeScript
initiateRemoveFund returns a result object that includes the transaction details for the pending removal. In step 2, pass the same adapter and chain values to removeFund to complete it (you can reuse the same variables as in this example).
2

Complete the removal after seven days

After the seven-day waiting period ends, call removeFund to return funds to the wallet for that adapter on that blockchain:
TypeScript
Keep these constraints in mind for EVM removals:
  • Calling removeFund before the waiting period has elapsed fails with an error. Wait seven days after calling initiateRemoveFund before calling removeFund.
  • Funds go to the wallet associated with the adapter on the specified blockchain.
  • Only one pending removeFund request is allowed per blockchain and address.