removeFund is designed as a trustless escape hatch for fallback or recovery
scenarios only. In normal situations,
use spend.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
Initiate the removal
Call
initiateRemoveFund to record the request to remove funds and start the
7-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).- Calling
removeFundbefore the waiting period has elapsed will fail. - Funds go to the wallet associated with the adapter on the specified blockchain.
- Only one pending
removeFundrequest is allowed per blockchain and address.