Skip to main content
Glama

zetrix_crypto_get_address

Derive a Zetrix blockchain address from a public key for account operations and transactions.

Instructions

Get Zetrix address from public key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
publicKeyYesThe public key

Implementation Reference

  • MCP tool handler: validates args, calls zetrixEncryption.getAddressFromPublicKey(publicKey), formats and returns address as JSON.
    case "zetrix_crypto_get_address": { if (!args) { throw new Error("Missing arguments"); } const address = await zetrixEncryption.getAddressFromPublicKey( args.publicKey as string ); return { content: [ { type: "text", text: JSON.stringify({ address }, null, 2), }, ], }; }
  • Tool schema definition including name, description, and inputSchema for publicKey parameter.
    { name: "zetrix_crypto_get_address", description: "Get Zetrix address from public key", inputSchema: { type: "object", properties: { publicKey: { type: "string", description: "The public key", }, }, required: ["publicKey"], },
  • Core helper function in ZetrixEncryption class: initializes encryption library lazily, derives Zetrix address from public key using KeyPair.getAddress, with error handling.
    async getAddressFromPublicKey(publicKey: string): Promise<string> { await this.initEncryption(); try { return this.KeyPair.getAddress(publicKey); } catch (error) { throw new Error( `Failed to derive address: ${error instanceof Error ? error.message : String(error)}` ); } }
  • src/index.ts:768-770 (registration)
    Tool registration: server handler for ListToolsRequestSchema that returns the tools array containing this tool.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });
  • Instantiation of ZetrixEncryption instance used by crypto tools including get_address.
    const zetrixEncryption = new ZetrixEncryption();

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