Skip to main content
Glama

zetrix_get_transaction_blob

Serialize Zetrix blockchain transaction data into hexadecimal format for processing and transmission.

Instructions

Serialize transaction data into hexadecimal format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionYesTransaction object with source_address, nonce, fee_limit, gas_price, operations

Implementation Reference

  • src/index.ts:268-281 (registration)
    Tool registration including name, description, and input schema definition.
    { name: "zetrix_get_transaction_blob", description: "Serialize transaction data into hexadecimal format", inputSchema: { type: "object", properties: { transaction: { type: "object", description: "Transaction object with source_address, nonce, fee_limit, gas_price, operations", }, }, required: ["transaction"], }, },
  • MCP server handler that receives tool call and delegates to ZetrixClient.getTransactionBlob.
    case "zetrix_get_transaction_blob": { if (!args) { throw new Error("Missing arguments"); } const result = await zetrixClient.getTransactionBlob(args.transaction); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Core implementation: Posts transaction object to Zetrix node API /getTransactionBlob endpoint to serialize into hex blob.
    async getTransactionBlob(transaction: any): Promise<ZetrixTransactionBlob> { try { const response = await this.client.post("/getTransactionBlob", transaction); if (response.data.error_code !== 0) { throw new Error( response.data.error_desc || `API Error: ${response.data.error_code}` ); } return response.data.result; } catch (error) { if (axios.isAxiosError(error)) { throw new Error(`Failed to get transaction blob: ${error.message}`); } throw 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