# SDK Tools

Official Zetrix SDK integration powered by [zetrix-sdk-nodejs](https://github.com/Zetrix-Chain/zetrix-sdk-nodejs).

### Create Account(**`zetrix_sdk_create_account`)**

Create new Zetrix account with keys.

**Purpose:** Generate cryptographically secure new accounts offline.

**Returns:**

```json
{
  "address": "ZTXxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "privateKey": "privxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "publicKey": "b001xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
```

**Algorithm:** Ed25519

**Security:** Uses cryptographically secure random number generator (CSPRNG)

**Testing:** Safe for testnet, use caution for mainnet

***

### Account Balance(**`zetrix_sdk_get_balance`)**

Get account balance using official SDK.

**Purpose:** Query balance using SDK's built-in methods.

**Features:**

* Automatic retry
* Connection pooling
* Error handling

**Difference from HTTP:** Uses SDK's optimized request handling

**Precision:** Returns exact balance as string to avoid JavaScript number limits

***

### Account Activation Status(**`zetrix_sdk_is_activated`)**

Check if account is activated.

**Purpose:** Determine if address exists on blockchain.

**Returns:** Boolean (true if activated, false if not)

**Important:** Unactivated accounts cannot receive transactions.

**Activation:** Accounts activate when they receive first transaction.

**Use Cases:**

* Validate recipient before sending
* Check account existence
* Transaction validation

**Performance:** Fast query, typically <100ms

***

### Current Account Nonce(**`zetrix_sdk_get_nonce`)**

Get account nonce for transactions.

**Purpose:** Retrieve current nonce using SDK (alternative to HTTP RPC).

**Features:**

* Built-in retry logic
* Better error messages
* Thread-safe concurrent nonce requests

***

### Read-Only Smart Contract Call(**`zetrix_sdk_call_contract`)**

Call smart contract (query only, no state change).

**Purpose:** Execute contract view functions without creating transactions.

**Cost:** Free (no gas required for queries)

**Speed:** Fast execution, typically 50-200ms

**Use Cases:**

* Read token balance
* Query contract state
* Validate parameters

**Limitation:** Cannot modify state, only read operations

***

### Invoke Smart Contract Transaction(**`zetrix_sdk_invoke_contract`)**

Invoke contract with transaction signing.

**Purpose:** Execute state-changing contract functions.

**Process:**

1. Build transaction
2. Sign with private key
3. Submit to network
4. Wait for confirmation

**Cost:** Consumes gas based on contract execution complexity

**Features:**

* Automatic gas estimation
* Nonce management
* Transaction building

**Security:** Requires private key for signing, handle securely

***


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zetrix.com/en/developer-resources/zetrix-mcp-server/tools-reference/sdk-tools.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
