Skip to main content
Glama

zetrix_sdk_is_activated

Verify if a Zetrix blockchain account is activated by checking its address status.

Instructions

Check if an account is activated on the blockchain

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesThe Zetrix account address

Implementation Reference

  • Handler case for the 'zetrix_sdk_is_activated' tool. Extracts address from arguments, calls ZetrixSDK.isAccountActivated(), and returns JSON response with activation status.
    case "zetrix_sdk_is_activated": { if (!args) { throw new Error("Missing arguments"); } const isActivated = await zetrixSDK.isAccountActivated(args.address as string); return { content: [ { type: "text", text: JSON.stringify({ address: args.address, isActivated }, null, 2), }, ], }; }
  • Tool schema definition including name, description, and input schema requiring 'address' parameter.
    { name: "zetrix_sdk_is_activated", description: "Check if an account is activated on the blockchain", inputSchema: { type: "object", properties: { address: { type: "string", description: "The Zetrix account address", }, }, required: ["address"], }, },
  • Core implementation of account activation check using the official zetrix-sdk-nodejs. Calls sdk.account.isActivated() and handles error code 4 (account not exist) as false.
    async isAccountActivated(address: string): Promise<boolean> { await this.initSDK(); try { const result = await this.sdk.account.isActivated(address); if (result.errorCode !== 0) { // If error code is "account not exist", return false if (result.errorCode === 4) { return false; } throw new Error(result.errorDesc || `SDK Error: ${result.errorCode}`); } return result.result.isActivated; } catch (error) { throw new Error( `Failed to check account: ${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