📡 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.
Request
Copy 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
Field Type Description
height int Current blockchain height
difficulty int Current mining difficulty
tx_count int Total transaction count
already_generated_coins uint64 Total XNX emitted (in atomic units, divide by 1e12)
status string "OK" when synced
incoming_connections_count int Inbound peers
outgoing_connections_count int Outbound peers
▶ Try it live
get_block
Retrieve a full block by height or hash.
Parameters
Param Type Required Description
height int optional Block height (0-indexed)
hash string optional Block hash (64 hex chars)
Copy 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 }
}'
▶ Try it (height 1)
Retrieve block header metadata (faster than full block).
Copy 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 }
}'
▶ Try it
get_transactions
Fetch full transaction details by TX hash(es).
Note: this endpoint is at /get_transactions, not /json_rpc.
Param Type Required Description
txs_hashes string[] required Array of TX hashes
decode_as_json bool optional Return decoded JSON (default false)
Copy 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.
Param Type Required Description
wallet_address string required XNX address to receive block reward
reserve_size int optional Extra nonce size in bytes (default 8)
Copy 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.
The params array contains a single string: the solved block blob in hex.
Copy 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"]
}'
Returns the header of the most recent block on the chain.
Copy 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"
}'
▶ Try it live
Wallet: get_balance
Returns XNX balance and unlocked balance for an account index.
Wallet RPC requires HTTP Basic auth. Set Authorization: Basic base64(user:pass).
Copy 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.
Param Type Required Description
destinations object[] required Array of {amount (atomic units), address}
priority int optional Fee priority: 1=low, 2=normal, 3=high
ring_size int optional Ring size for privacy (default 16)
Copy 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.
Copy 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.
Copy 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": {}
}'