Skip to main content
Glama

zetrix_crypto_get_public_key

Derive a public key from an encrypted private key for secure Zetrix blockchain account operations and transactions.

Instructions

Derive public key from private key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
privateKeyYesThe encrypted private key

Implementation Reference

  • MCP server tool handler case that extracts arguments and calls the encryption module's getPublicKeyFromPrivate method, then formats the response.
    case "zetrix_crypto_get_public_key": { if (!args) { throw new Error("Missing arguments"); } const publicKey = await zetrixEncryption.getPublicKeyFromPrivate( args.privateKey as string ); return { content: [ { type: "text", text: JSON.stringify({ publicKey }, null, 2), }, ], }; }
  • The core implementation function of ZetrixEncryption class that initializes encryption library and calls KeyPair.getEncPublicKey to derive public key from private key.
    async getPublicKeyFromPrivate(privateKey: string): Promise<string> { await this.initEncryption(); try { return this.KeyPair.getEncPublicKey(privateKey); } catch (error) { throw new Error( `Failed to derive public key: ${error instanceof Error ? error.message : String(error)}` ); } }
  • src/index.ts:536-549 (registration)
    Registration of the tool in the MCP tools array, defining name, description, and input schema.
    { name: "zetrix_crypto_get_public_key", description: "Derive public key from private key", inputSchema: { type: "object", properties: { privateKey: { type: "string", description: "The encrypted private key", }, }, required: ["privateKey"], }, },
  • Input schema defining the required 'privateKey' parameter for the tool.
    inputSchema: { type: "object", properties: { privateKey: { type: "string", description: "The encrypted private key", }, }, required: ["privateKey"], },

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