get_solana_account_info
Retrieve Solana account details including balance and data by providing a wallet address and network selection.
Instructions
Get Solana account information
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Solana address | |
| network | No | Network type (defaults to mainnet) |
Implementation Reference
- src/handlers/solana-handlers.ts:305-320 (handler)Executes the get_solana_account_info tool by extracting parameters and delegating to SolanaService.getAccountInfocase 'get_solana_account_info': { const address = args?.address as string; const network = (args?.network as 'mainnet' | 'testnet') || 'mainnet'; const result = await solanaService.getAccountInfo(address, network); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], isError: !result.success, }; }
- src/handlers/solana-handlers.ts:76-94 (registration)Registers the get_solana_account_info tool with its input schema and description{ name: 'get_solana_account_info', description: 'Get Solana account information', inputSchema: { type: 'object', properties: { address: { type: 'string', description: 'Solana address', }, network: { type: 'string', enum: ['mainnet', 'testnet'], description: 'Network type (defaults to mainnet)', }, }, required: ['address'], }, },
- Core implementation of getAccountInfo RPC call to Solana RPC endpoint with jsonParsed encoding/** * Get account info */ async getAccountInfo( address: string, network: 'mainnet' | 'testnet' = 'mainnet' ): Promise<EndpointResponse> { const service = this.blockchainService.getServiceByBlockchain('solana', network); if (!service) { return { success: false, error: `Solana service not found for ${network}`, }; } return this.blockchainService.callRPCMethod( service.id, 'getAccountInfo', [ address, { encoding: 'jsonParsed', }, ] ); }