API Reference

Blockchain RPC, Sacred Library API, and WebSocket endpoints for ZION TestNet.

Blockchain RPC Endpoints

Default endpoint (local node): http://127.0.0.1:8545

Get Block Number

jsonRequest
{
  "jsonrpc": "2.0",
  "method": "zion_blockNumber",
  "params": [],
  "id": 1
}

Get Block by Number

jsonRequest
{
  "jsonrpc": "2.0",
  "method": "zion_getBlockByNumber",
  "params": ["latest", true],
  "id": 2
}

Get Balance

jsonRequest
{
  "jsonrpc": "2.0",
  "method": "zion_getBalance",
  "params": ["0xYourWalletAddress", "latest"],
  "id": 3
}

Send Transaction

jsonRequest
{
  "jsonrpc": "2.0",
  "method": "zion_sendTransaction",
  "params": [{
    "from": "0xSenderAddress",
    "to": "0xReceiverAddress",
    "value": "0x1000000000000000",
    "gas": "0x5208"
  }],
  "id": 4
}

Sacred Library API

Access 6 ancient wisdom texts (39,036 lines total) via JSON-RPC. All texts stored on IPFS with blockchain references.

Available Texts

Get Text Excerpt

jsonRequest
{
  "jsonrpc": "2.0",
  "method": "sacred_library_get_text",
  "params": {
    "text": "emerald_tablets",
    "tablet": 1,
    "lines": [1, 50]
  },
  "id": 5
}
jsonResponse
{
  "jsonrpc": "2.0",
  "result": {
    "text": "emerald_tablets",
    "section": "Tablet I",
    "content": "I, THOTH, the Atlantean, master of mysteries...",
    "ipfs_hash": "Qm...",
    "checksum": "sha256:abc123..."
  },
  "id": 5
}

Search Library

jsonRequest
{
  "jsonrpc": "2.0",
  "method": "sacred_library_search",
  "params": {
    "query": "consciousness",
    "texts": ["all"],
    "limit": 10
  },
  "id": 6
}

Get Daily Wisdom

jsonRequest
{
  "jsonrpc": "2.0",
  "method": "sacred_library_daily_wisdom",
  "params": {},
  "id": 7
}

Sacred Library API is part of ZION OASIS integration.

WebSocket API

Subscribe to new blocks and events over WebSocket.

ws://127.0.0.1:8546

Protocol details TBD on testnet. Watch the repository for updates.

Error Codes

API is subject to change during testnet. Check release notes for updates.
  • Features
  • Setup
  • Common Methods

    }

    Get Balance

    RPC Endpoints

    Default endpoint (local node): http://127.0.0.1:8545

    WebSocket API

    Get Block Number

    Subscribe to new blocks and events over WebSocket.

    {
    ws://127.0.0.1:8546
    "jsonrpc": "2.0",

    Protocol details TBD on testnet. Watch the repository for updates.

    "method": "zion_blockNumber",
    "params": [], "id": 1
    }

    Error Codes

    "params": ["latest", true],
    "id": 2 } "params": ["0xYourWalletAddress", "latest"], "id": 3 }

    Send Transaction

    { "jsonrpc": "2.0", "method": "zion_sendTransaction", "params": [{ "from": "0xSenderAddress", "to": "0xReceiverAddress", "value": "0x1000000000000000", "gas": "0x5208" }], "id": 4 }

    WebSocket API

    Subscribe to new blocks and events over WebSocket.

    ws://127.0.0.1:8546

    Protocol details TBD on testnet. Watch the repository for updates.

    Error Codes

    API is subject to change during testnet. Check release notes for updates.