zetrix_crypto_get_address
Convert a Zetrix public key into its corresponding blockchain address for account operations and transaction processing.
Instructions
Get Zetrix address from public key
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| publicKey | Yes | The public key |
Implementation Reference
- src/index.ts:1267-1282 (handler)Handler for the zetrix_crypto_get_address tool. Extracts the publicKey argument and delegates to ZetrixEncryption.getAddressFromPublicKey method.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), }, ], }; }
- src/index.ts:550-563 (registration)Tool registration entry including name, description, and input schema.{ 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"], }, },
- src/zetrix-encryption.ts:98-108 (helper)Core helper method in ZetrixEncryption class that computes the Zetrix address from a given public key using the official zetrix-encryption-nodejs library.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:553-562 (schema)Input schema definition specifying the required publicKey parameter.inputSchema: { type: "object", properties: { publicKey: { type: "string", description: "The public key", }, }, required: ["publicKey"], },