Skip to main content
Glama
Zetrix-Chain

Zetrix MCP Server

Official
by Zetrix-Chain

zetrix_create_keypair

Generate a public-private key pair for testing purposes on the Zetrix blockchain, enabling secure account setup and transaction signing.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:133-140 (registration)
    Tool registration including name, description, and input schema (empty object).
    {
      name: "zetrix_create_keypair",
      description: "Generate a new public-private key pair (for testing only)",
      inputSchema: {
        type: "object",
        properties: {},
      },
    },
  • Dispatch handler case that invokes ZetrixClient.createKeyPair() and formats response.
    case "zetrix_create_keypair": {
      const result = await zetrixClient.createKeyPair();
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • TypeScript interface defining the output structure of the keypair.
    export interface ZetrixKeyPair {
      address: string;
      private_key: string;
      public_key: string;
      enc_type: string;
    }
  • Core handler implementation in ZetrixClient: makes RPC GET request to /createKeyPair endpoint, handles errors, and returns the generated keypair.
    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;
      }
    }

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