transaction_summary
Fetch transaction summary for a wallet including earliest/latest transactions and count across multiple blockchain networks.
Instructions
Commonly used to fetch the earliest and latest transactions, and the transaction count for a wallet. Required: chainName (blockchain network), walletAddress (wallet address). Optional: quoteCurrency, withGas (include gas usage statistics). Returns summary of transaction activity for the specified wallet.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainName | Yes | The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet'). | |
| walletAddress | Yes | The wallet address to get transaction summary for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically. | |
| quoteCurrency | No | Currency to quote transaction values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency. | |
| withGas | No | Include gas usage statistics in the summary. Default is false. |
Implementation Reference
- The "transaction_summary" tool is defined and implemented here using the `server.tool` method. It handles input validation via Zod and calls the GoldRush client's `getTransactionSummary` method.
server.tool( "transaction_summary", "Commonly used to fetch the earliest and latest transactions, and the transaction count for a wallet.\n" + "Required: chainName (blockchain network), walletAddress (wallet address).\n" + "Optional: quoteCurrency, withGas (include gas usage statistics).\n" + "Returns summary of transaction activity for the specified wallet.", { chainName: z .enum(Object.values(ChainName) as [string, ...string[]]) .describe( "The blockchain network to query (e.g., 'eth-mainnet', 'matic-mainnet', 'bsc-mainnet')." ), walletAddress: z .string() .describe( "The wallet address to get transaction summary for. Passing in an ENS, RNS, Lens Handle, or an Unstoppable Domain resolves automatically." ), quoteCurrency: z .enum(Object.values(validQuoteValues) as [string, ...string[]]) .optional() .describe( "Currency to quote transaction values in (e.g., 'USD', 'EUR'). If not specified, uses default quote currency." ), withGas: z .boolean() .optional() .describe( "Include gas usage statistics in the summary. Default is false." ), }, async (params) => { try { const response = await goldRushClient.TransactionService.getTransactionSummary( params.chainName as Chain, params.walletAddress, { quoteCurrency: params.quoteCurrency as Quote, withGas: params.withGas, } ); return { content: [ { type: "text", text: stringifyWithBigInt(response.data), }, ], }; } catch (err) { return { content: [{ type: "text", text: `Error: ${err}` }], isError: true, }; } } );