get_wallet_history
Retrieve transaction history for a Solana wallet address, showing both received and sent funds with dates.
Instructions
Transaction history : Retrieve list of the transactions related to the specified Solana wallet address (received and sent funds with dates)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| walletAddress | No | The Solana address of the wallet you want to see, if not provided, uses the currently connected user wallet address. |
Implementation Reference
- src/tools/payments.ts:153-188 (handler)Executes the get_wallet_history tool: fetches transaction history for a given Solana wallet address or the current user's wallet via API calls.export async function get_wallet_history(args: any) { const { walletAddress } = args; var pubk = ''; var result = { error: 'Not found' } as any if (walletAddress) { pubk = walletAddress; } else { const { apiKey } = resolveAuth(undefined, undefined); var jsP = { myKey: apiKey } const fet = await fetch(BASE + '/api/getAPIUser', { method: 'POST', headers: { Accept: 'application.json', 'Content-Type': 'application/json' }, body: JSON.stringify(jsP) }); var dat = await fet.text(); result = JSON.parse(dat); pubk = result.pubk; } if (!pubk) throw new Error("User not found, please provide a Solana public wallet address"); const fet = await fetch(BASE + '/api/walletHistory/' + pubk + '/' + new Date().getTime()); var dat = await fet.text(); process.stderr.write(`[caisse][info] dat2 ${dat}\n`); var result = JSON.parse(dat); return result; }
- src/tools/payments.ts:46-48 (schema)Zod shape defining the input schema for the get_wallet_history tool.export const getWalletHistoryShape = { walletAddress: z.string().optional().describe("The Solana address of the wallet you want to see, if not provided, uses the currently connected user wallet address.") };
- src/solution.ts:75-79 (registration)Registers the get_wallet_history tool in the main tools array used for ListTools.name: "get_wallet_history", description: get_wallet_history_title, inputSchema: jsonSchema(zodToJsonSchema(z.object(getWalletHistoryShape))).jsonSchema, annotations: { title: get_wallet_history_title, readOnlyHint: true } },
- src/solution.ts:148-150 (handler)Dispatches tool calls to the get_wallet_history handler in the main MCP CallToolRequest handler.case "get_wallet_history": result = await get_wallet_history(args); break;
- src/tools/payments.ts:242-250 (registration)Alternative registration of the tool within the payments module's registerPaymentsTools function.'get_wallet_history', { title: get_wallet_history_title, description: get_wallet_history_title, inputSchema: getWalletHistoryShape, annotations: { title: get_wallet_history_title, readOnlyHint: true } }, async (e) => await wrapResult(get_wallet_history, e) );