helius_get_transaction
Retrieve Solana blockchain transaction details using a signature to verify and analyze on-chain activity.
Instructions
Get a transaction by its signature
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| signature | Yes | ||
| commitment | No |
Implementation Reference
- src/handlers/helius.ts:159-175 (handler)The handler function that implements the logic for fetching a Solana transaction by signature using the Helius RPC connection.export const getTransactionHandler = async (input: GetTransactionInput): Promise<ToolResultSchema> => { try { // Use the newer signature with explicit config object const transaction = await (helius as any as Helius).connection.getTransaction( input.signature, { maxSupportedTransactionVersion: 0, commitment: input.commitment as any } ); if (!transaction) { return createErrorResponse(`Transaction not found for signature: ${input.signature}`); } return createSuccessResponse(`Transaction details: ${JSON.stringify(transaction, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting transaction: ${error instanceof Error ? error.message : String(error)}`); } }
- src/tools.ts:125-136 (schema)The input schema defining parameters for the helius_get_transaction tool: signature (required) and optional commitment level.{ name: "helius_get_transaction", description: "Get a transaction by its signature", inputSchema: { type: "object", properties: { signature: { type: "string" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: ["signature"] } },
- src/tools.ts:558-558 (registration)Registration of the tool name to its handler function in the handlers dictionary."helius_get_transaction": getTransactionHandler,
- src/tools.ts:12-12 (registration)Import of the getTransactionHandler from the helius handlers module.getTransactionHandler,