zetrix_sdk_create_account
Create a new Zetrix blockchain account using the official SDK to enable blockchain interactions and operations.
Instructions
Create a new Zetrix account using the official SDK
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1139-1149 (handler)Main handler for the tool that delegates to ZetrixSDK.createAccount() and returns the formatted response.case "zetrix_sdk_create_account": { const account = await zetrixSDK.createAccount(); return { content: [ { type: "text", text: JSON.stringify(account, null, 2), }, ], }; }
- src/index.ts:420-427 (registration)Tool registration including name, description, and empty input schema (no parameters required).{ name: "zetrix_sdk_create_account", description: "Create a new Zetrix account using the official SDK", inputSchema: { type: "object", properties: {}, }, },
- src/zetrix-sdk.ts:83-103 (helper)Core helper function in ZetrixSDK class that initializes the official SDK and calls account.create() to generate new account keys.async createAccount(): Promise<ZetrixSDKAccount> { await this.initSDK(); try { const result = await this.sdk.account.create(); if (result.errorCode !== 0) { throw new Error(result.errorDesc || `SDK Error: ${result.errorCode}`); } return { address: result.result.address, privateKey: result.result.privateKey, publicKey: result.result.publicKey, }; } catch (error) { throw new Error( `Failed to create account: ${error instanceof Error ? error.message : String(error)}` ); } }