helius_get_signatures_for_address
Retrieve transaction signatures for a Solana address. Use optional parameters to filter by limit, before, until, and commitment.
Instructions
Get transaction signatures for a Solana address
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | ||
| limit | No | ||
| before | No | ||
| until | No | ||
| commitment | No |
Implementation Reference
- src/handlers/helius.types.ts:106-112 (schema)Type definition for the tool's input: address (required), optional limit, before, until, and commitment.
export type GetSignaturesForAddressInput = { address: string; limit?: number; before?: string; until?: string; commitment?: "confirmed" | "finalized" | "processed"; } - src/tools.ts:15-15 (registration)Import of getSignaturesForAddressHandler from handlers.
getSignaturesForAddressHandler, - src/tools.ts:162-176 (registration)Tool registration with name, description, and JSON Schema inputSchema defining address (required), limit, before, until, commitment.
{ name: "helius_get_signatures_for_address", description: "Get transaction signatures for a Solana address", inputSchema: { type: "object", properties: { address: { type: "string" }, limit: { type: "number" }, before: { type: "string" }, until: { type: "string" }, commitment: { type: "string", enum: ["confirmed", "finalized", "processed"] } }, required: ["address"] } }, - src/tools.ts:562-562 (registration)Maps the tool name to the handler in the handler map.
"helius_get_signatures_for_address": getSignaturesForAddressHandler, - src/handlers/helius.ts:207-225 (handler)Handler function that validates the public key, builds options (limit, before, until, commitment), calls helius.connection.getSignaturesForAddress(), and returns the signatures.
export const getSignaturesForAddressHandler = async (input: GetSignaturesForAddressInput): Promise<ToolResultSchema> => { const addressResult = validatePublicKey(input.address); if (!(addressResult instanceof PublicKey)) { return addressResult; } try { const options: any = {}; if (input.limit) options.limit = input.limit; if (input.before) options.before = input.before; if (input.until) options.until = input.until; if (input.commitment) options.commitment = input.commitment; const signatures = await (helius as any as Helius).connection.getSignaturesForAddress(addressResult, options); return createSuccessResponse(`Signatures: ${JSON.stringify(signatures, null, 2)}`); } catch (error) { return createErrorResponse(`Error getting signatures: ${error instanceof Error ? error.message : String(error)}`); } }