Calix Chain

JSON-RPC API

Calix Chain is Ethereum JSON-RPC compatible. Endpoint: https://calixchain.io/rpc

â„šī¸
All methods use POST with Content-Type: application/json. WebSocket subscriptions via wss://calixchain.io/rpc/ws.

Basic methods

MethodDescriptionParams
eth_blockNumberCurrent block height—
eth_getBalanceCLX balance of an address[address, tag]
eth_getTransactionCountNonce of an address[address, tag]
eth_sendRawTransactionSubmit a signed transaction[hex]
eth_callCall a contract function (read-only)[tx, tag]
eth_estimateGasEstimate gas[tx]
eth_getBlockByNumberBlock info by number[number, full]
eth_getTransactionByHashTransaction info[hash]
eth_getTransactionReceiptReceipt after confirmation[hash]
eth_getLogsEvent logs by filter[filter]
eth_chainIdChain ID (hex)—
eth_gasPriceCurrent gas price—
net_versionNetwork ID—

Examples

eth_blockNumber

curl -X POST https://calixchain.io/rpc \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'

# Response
{"jsonrpc":"2.0","id":1,"result":"0x139b43"}

eth_getBalance

curl -X POST https://calixchain.io/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0","method":"eth_getBalance",
    "params":["0xYourAddress","latest"],"id":1
  }'

eth_call (read contract function)

curl -X POST https://calixchain.io/rpc \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc":"2.0","method":"eth_call",
    "params":[{
      "to": "0xTokenContractAddress",
      "data": "0x70a082310000000000000000000000000xYourAddress"
    },"latest"],"id":1
  }'

WebSocket Subscriptions

// Connect WebSocket
const ws = new WebSocket("wss://calixchain.io/rpc/ws");

// Subscribe new blocks
ws.send(JSON.stringify({
  "jsonrpc":"2.0","method":"eth_subscribe",
  "params":["newHeads"],"id":1
}));

ws.onmessage = (e) => {
  const msg = JSON.parse(e.data);
  if (msg.method === "eth_subscription") {
    console.log("New block:", msg.params.result.number);
  }
};
Subscription typeDescription
newHeadsNotifies on each new block
logsEvent logs by address/topic filter
newPendingTransactionsTx hash entering mempool

Block tag

TagMeaning
latestMost recently committed block
earliestGenesis block (0)
pendingMempool state (alias for latest on Calix)
0x1A2BSpecific block by hex number