Skip to main content
Glama

zetrix_crypto_sign

Sign messages with a private key on the Zetrix blockchain to authenticate transactions and verify data integrity.

Instructions

Sign a message with a private key

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
messageYesThe message to sign (hex string)
privateKeyYesThe private key to sign with

Implementation Reference

  • Core implementation of the cryptographic signing function using the zetrix-encryption-nodejs library's signature.sign method.
    async sign(message: string, privateKey: string): Promise<ZetrixSignature> { await this.initEncryption(); try { const signData = this.signature.sign(message, privateKey); const publicKey = this.KeyPair.getEncPublicKey(privateKey); return { signData, publicKey, }; } catch (error) { throw new Error( `Failed to sign message: ${error instanceof Error ? error.message : String(error)}` ); } }
  • MCP server tool handler for 'zetrix_crypto_sign' that validates input, calls ZetrixEncryption.sign, and formats the response.
    case "zetrix_crypto_sign": { if (!args) { throw new Error("Missing arguments"); } const signature = await zetrixEncryption.sign( args.message as string, args.privateKey as string ); return { content: [ { type: "text", text: JSON.stringify(signature, null, 2), }, ], }; }
  • Input schema definition for the 'zetrix_crypto_sign' tool, specifying required message and privateKey parameters.
    { name: "zetrix_crypto_sign", description: "Sign a message with a private key", inputSchema: { type: "object", properties: { message: { type: "string", description: "The message to sign (hex string)", }, privateKey: { type: "string", description: "The private key to sign with", }, }, required: ["message", "privateKey"], }, },
  • src/index.ts:768-770 (registration)
    Registration of all tools list handler, which exposes the 'zetrix_crypto_sign' tool via the tools array.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });

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