Skip to main content
Glama

zetrix_create_keypair

Generate a public-private key pair for testing blockchain applications on the Zetrix network.

Instructions

Generate a new public-private key pair (for testing only)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function in ZetrixClient that executes the tool logic by calling the Zetrix RPC endpoint '/createKeyPair' to generate a new public-private key pair.
    async createKeyPair(): Promise<ZetrixKeyPair> { try { const response = await this.client.get("/createKeyPair"); if (response.data.error_code !== 0) { throw new Error( response.data.error_desc || `API Error: ${response.data.error_code}` ); } return response.data.result; } catch (error) { if (axios.isAxiosError(error)) { throw new Error(`Failed to create key pair: ${error.message}`); } throw error; } }
  • MCP server handler dispatch case that invokes the ZetrixClient.createKeyPair() method and formats the response for the MCP protocol.
    case "zetrix_create_keypair": { const result = await zetrixClient.createKeyPair(); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • src/index.ts:133-140 (registration)
    Tool registration in the MCP tools array, defining name, description, and input schema (no parameters required).
    { name: "zetrix_create_keypair", description: "Generate a new public-private key pair (for testing only)", inputSchema: { type: "object", properties: {}, }, },
  • TypeScript interface defining the structure of the keypair returned by the tool (output schema).
    export interface ZetrixKeyPair { address: string; private_key: string; public_key: string; enc_type: string; }

Latest Blog Posts

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/Zetrix-Chain/zetrix-mcp-server'

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