list_wallets
Retrieve all created and imported Solana wallets to manage your blockchain assets and accounts across networks.
Instructions
List all created/imported wallets
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:571-581 (handler)The main handler function for the 'list_wallets' tool. It iterates over the global 'wallets' Map, extracts name and address for each wallet, and returns a list with count.async function handleListWallets() { const walletList = Array.from(wallets.values()).map(wallet => ({ name: wallet.name, address: wallet.keypair.publicKey.toString() })); return { wallets: walletList, count: walletList.length }; }
- src/index.ts:106-113 (schema)The tool schema definition including name, description, and empty input schema (no parameters required), registered in the tools list returned by ListToolsRequest.{ name: "list_wallets", description: "List all created/imported wallets", inputSchema: { type: "object", properties: {} } },
- src/index.ts:1291-1293 (registration)Registration/dispatch in the CallToolRequestSchema handler's switch statement, which calls the handleListWallets function when 'list_wallets' is invoked.case "list_wallets": result = await handleListWallets(); break;
- src/index.ts:41-41 (helper)Global in-memory storage Map for wallets, used by list_wallets and other wallet-related tools.const wallets = new Map<string, { keypair: Keypair; name: string }>();