Skip to main content
Glama

GOAT MCP Server

txnhelper.service.ts1.61 kB
import { Tool } from "@goat-sdk/core"; import { SolanaWalletClient } from "@goat-sdk/wallet-solana"; import { TransactionHelperApi, TransactionData, TransactionHistoryOptions } from "./api"; import { GetTransactionHistoryParameters } from "./parameters"; import { TransactionHelperOptions } from "./txnhelper.plugin"; export class TransactionHelperService { private api: TransactionHelperApi; constructor(api: TransactionHelperApi, private readonly options?: TransactionHelperOptions) { this.api = api; } @Tool({ name: "txnhelper_get_transaction_history", description: "Get transaction history for a Solana wallet address or token account using Helius API", }) async getTransactionHistory(walletClient: SolanaWalletClient, params: GetTransactionHistoryParameters): Promise<TransactionData[]> { try { // Get connection from the wallet client const connection = walletClient.getConnection(); // Convert parameters to the format expected by the API const options: TransactionHistoryOptions = { limit: params.limit, before: params.before, until: params.until, types: params.types, minContextSlot: params.minContextSlot }; // Call the API method return this.api.getTransactionHistory(connection, params.address, options); } catch (error) { console.error('Error in getTransactionHistory service:', error); throw error; } } }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cryptoleek-team/goat-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server