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.

Instructions

Derive public key from private key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
privateKeyYesThe encrypted private key

Implementation Reference

  • src/index.ts:536-549 (registration)
    Tool registration including name, description, and input schema definition.
    { 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"], }, },
  • MCP server handler for the tool: validates input, calls encryption helper, returns public key in MCP response format.
    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), }, ], }; }
  • Helper function in ZetrixEncryption class that derives the encrypted public key from encrypted private key using official zetrix-encryption-nodejs library.
    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)}` ); } }

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