helius_get_inflation_reward
Retrieve inflation rewards for specified addresses on the Solana blockchain by providing address lists, epoch, and commitment level using MCP Helius server.
Instructions
Get inflation rewards for a list of addresses
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| addresses | Yes | ||
| commitment | No | ||
| epoch | No |
Input Schema (JSON Schema)
{
"properties": {
"addresses": {
"items": {
"type": "string"
},
"type": "array"
},
"commitment": {
"enum": [
"confirmed",
"finalized",
"processed"
],
"type": "string"
},
"epoch": {
"type": "number"
}
},
"required": [
"addresses"
],
"type": "object"
}
Implementation Reference
- src/handlers/helius.ts:254-270 (handler)The handler function that validates input addresses, calls Helius connection.getInflationReward, and returns the result or error.export const getInflationRewardHandler = async (input: GetInflationRewardInput): Promise<ToolResultSchema> => { try { const addresses = []; for (const addr of input.addresses) { const result = validatePublicKey(addr); if (!(result instanceof PublicKey)) { return result; // Return the error response if any address is invalid } addresses.push(result); } const rewards = await (helius as any as Helius).connection.getInflationReward(addresses, input.epoch, input.commitment); return createSuccessResponse(`Inflation rewards: ${JSON.stringify(rewards, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting inflation rewards: ${error instanceof Error ? error.message : String(error)}`); } }
- src/tools.ts:204-219 (schema)The input schema definition for the helius_get_inflation_reward tool, defining parameters like addresses (required array of strings), epoch, and commitment.{ name: "helius_get_inflation_reward", description: "Get inflation rewards for a list of addresses", inputSchema: { type: "object", properties: { addresses: { type: "array", items: { type: "string" } }, epoch: { type: "number" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: ["addresses"] } },
- src/tools.ts:565-565 (registration)Registration of the tool name to its handler function in the handlers dictionary."helius_get_inflation_reward": getInflationRewardHandler,