Daemon RPC Cookbook¶
Working curl recipes for the daemon RPC, in the order an integration usually needs them. Every call is documented in full under Daemon RPC.
Set shared vars:
Optional auth header:
1) Health and network checks¶
curl -s "${AUTH_HEADER[@]}" "$DAEMON_RPC_URL/info"
curl -s "${AUTH_HEADER[@]}" "$DAEMON_RPC_URL/height"
curl -s "${AUTH_HEADER[@]}" "$DAEMON_RPC_URL/peers"
There is no /fee route on the daemon. Node fees are not implemented on this network: the wallet backend hard-codes the node fee address to empty and the amount to zero, so getFeeInfo and getNodeFeeInfo on wallet-service JSON-RPC always answer with an empty address and 0. /info carries the node's own state — see HTTP Endpoints.
2) Basic JSON-RPC calls¶
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"1","method":"getblockcount","params":{}}' \
"$DAEMON_RPC_URL/json_rpc"
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"2","method":"getlastblockheader","params":{}}' \
"$DAEMON_RPC_URL/json_rpc"
3) Wallet sync pipeline (common client flow)¶
Pull compact sync data:
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"blockHashCheckpoints":[],"startHeight":0,"startTimestamp":0,"blockCount":100,"skipCoinbaseTransactions":false}' \
"$DAEMON_RPC_URL/getwalletsyncdata"
Alternative lightweight chain query:
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"blockIds":["<known-block-hash>"],"timestamp":0}' \
"$DAEMON_RPC_URL/queryblockslite"
Detailed chain query (requires --daemon-mode explorer):
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"blockIds":["<known-block-hash>"],"timestamp":0,"blockCount":20}' \
"$DAEMON_RPC_URL/queryblocksdetailed"
4) Pool and tx status checks¶
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"transactionHashes":["<tx-hash-1>","<tx-hash-2>"]}' \
"$DAEMON_RPC_URL/get_transactions_status"
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"tailBlockId":"<tail-block-hash>","knownTxsIds":[]}' \
"$DAEMON_RPC_URL/get_pool_changes_lite"
5) Broadcast signed transaction¶
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"tx_as_hex":"<signed-tx-hex>"}' \
"$DAEMON_RPC_URL/sendrawtransaction"
6) Mining-oriented methods¶
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"10","method":"getblocktemplate","params":{"reserve_size":8,"wallet_address":"<miner-address>"}}' \
"$DAEMON_RPC_URL/json_rpc"
curl -s "${AUTH_HEADER[@]}" -H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":"11","method":"submitblock","params":["<block-blob-hex>"]}' \
"$DAEMON_RPC_URL/json_rpc"