📡 API Reference

Xernix API Docs

Full JSON-RPC 2.0 reference for the Xernix daemon and wallet RPC. All endpoints are publicly accessible — no API key required. Try them live below.

Base URLs
Daemon RPC
https://xernix-daemon.replit.app/json_rpc
Wallet RPC
https://xernix-daemon.replit.app/wallet/json_rpc

Authentication

The daemon RPC (/json_rpc) is public — no authentication required.

The wallet RPC (/wallet/json_rpc) requires HTTP Basic auth via the XERNIX_WALLET_RPC_LOGIN secret. For building your own wallet integration, run a local wallet-rpc instance.

Never expose your local wallet-rpc to the internet. The public /wallet/* proxy is read-only for external callers.

get_info

Returns general blockchain information — height, difficulty, network hash rate, sync status, and more.

POST /json_rpc General node information

Request

curl -X POST https://xernix-daemon.replit.app/json_rpc \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "get_info" }'

Key response fields

FieldTypeDescription
heightintCurrent blockchain height
difficultyintCurrent mining difficulty
tx_countintTotal transaction count
already_generated_coinsuint64Total XNX emitted (in atomic units, divide by 1e12)
statusstring"OK" when synced
incoming_connections_countintInbound peers
outgoing_connections_countintOutbound peers

get_block

Retrieve a full block by height or hash.

POST /json_rpc Fetch block by height or hash

Parameters

ParamTypeRequiredDescription
heightintoptionalBlock height (0-indexed)
hashstringoptionalBlock hash (64 hex chars)
curl -X POST https://xernix-daemon.replit.app/json_rpc \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "get_block", "params": { "height": 1 } }'

get_block_header_by_height

Retrieve block header metadata (faster than full block).

POST /json_rpc Block header by height
curl -X POST https://xernix-daemon.replit.app/json_rpc \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "get_block_header_by_height", "params": { "height": 1 } }'

get_transactions

Fetch full transaction details by TX hash(es).

POST /get_transactions Fetch TX by hash
Note: this endpoint is at /get_transactions, not /json_rpc.
ParamTypeRequiredDescription
txs_hashesstring[]requiredArray of TX hashes
decode_as_jsonbooloptionalReturn decoded JSON (default false)
curl -X POST https://xernix-daemon.replit.app/get_transactions \ -H "Content-Type: application/json" \ -d '{ "txs_hashes": ["YOUR_TX_HASH"], "decode_as_json": true }'

get_block_template

Get a block template for mining. Use with submit_block to mine XNX.

POST /json_rpc Get mining template
ParamTypeRequiredDescription
wallet_addressstringrequiredXNX address to receive block reward
reserve_sizeintoptionalExtra nonce size in bytes (default 8)
curl -X POST https://xernix-daemon.replit.app/json_rpc \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "get_block_template", "params": { "wallet_address": "YOUR_XNX_ADDRESS", "reserve_size": 8 } }'

submit_block

Submit a solved block to the network.

POST /json_rpc Submit mined block
The params array contains a single string: the solved block blob in hex.
curl -X POST https://xernix-daemon.replit.app/json_rpc \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "submit_block", "params": ["SOLVED_BLOCK_BLOB_HEX"] }'

get_last_block_header

Returns the header of the most recent block on the chain.

POST /json_rpc Latest block header
curl -X POST https://xernix-daemon.replit.app/json_rpc \ -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "get_last_block_header" }'

Wallet: get_balance

Returns XNX balance and unlocked balance for an account index.

POST /wallet/json_rpc Account balance
Wallet RPC requires HTTP Basic auth. Set Authorization: Basic base64(user:pass).
curl -X POST https://xernix-daemon.replit.app/wallet/json_rpc \ -H "Content-Type: application/json" \ -u "user:pass" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "get_balance", "params": { "account_index": 0 } }'

Wallet: transfer

Send XNX to one or more addresses. Supports the 1.5% burn at the wallet layer.

POST /wallet/json_rpc Send XNX
ParamTypeRequiredDescription
destinationsobject[]requiredArray of {amount (atomic units), address}
priorityintoptionalFee priority: 1=low, 2=normal, 3=high
ring_sizeintoptionalRing size for privacy (default 16)
curl -X POST https://xernix-daemon.replit.app/wallet/json_rpc \ -H "Content-Type: application/json" \ -u "user:pass" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "transfer", "params": { "destinations": [{ "amount": 1000000000000, "address": "RECIPIENT_XNX_ADDRESS" }], "priority": 2, "ring_size": 16 } }'
1 XNX = 1,000,000,000,000 atomic units (1e12). Example: 1.5 XNX = 1500000000000.

Wallet: get_transfers

List incoming and outgoing transfers with full details.

POST /wallet/json_rpc Transfer history
curl -X POST https://xernix-daemon.replit.app/wallet/json_rpc \ -H "Content-Type: application/json" \ -u "user:pass" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "get_transfers", "params": { "in": true, "out": true, "pending": true, "pool": true } }'

Wallet: make_integrated_address

Create an integrated address (address + payment ID) for merchant use.

POST /wallet/json_rpc Integrated address
curl -X POST https://xernix-daemon.replit.app/wallet/json_rpc \ -H "Content-Type: application/json" \ -u "user:pass" \ -d '{ "jsonrpc": "2.0", "id": "0", "method": "make_integrated_address", "params": {} }'