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 validkit and adapter.
Initiate and complete a removal
- EVM
- Solana
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
- Calling
removeFundbefore the waiting period has elapsed fails with an error. Wait seven days after callinginitiateRemoveFundbefore callingremoveFund. - Funds go to the wallet associated with the adapter on the specified blockchain.
- Only one pending
removeFundrequest is allowed per blockchain and address.