Skip to content

JSON-RPC reference ​

The xDEVS node speaks the standard Ethereum JSON-RPC API, so MetaMask, Foundry, Hardhat, viem and ethers work unchanged. It also has an xdevs_ namespace for chain-specific features.

This page describes the node as built today (Phases 1–2), whether it runs as a dev chain, a validator or a full node. The public endpoints are not live yet.

Transport ​

  • HTTP on 127.0.0.1:8545 by default (--http or [rpc] http).
  • WebSocket on the same port (ws://127.0.0.1:8545), with subscriptions; an optional separate listener can be set with [rpc] ws.
  • CORS: any origin by default ([rpc] cors).

Supported methods ​

eth_ ​

MethodNotes
eth_chainId0x1bcd (7117) on the dev chain
eth_blockNumber
eth_syncingSync status of the node
eth_accountsEmpty list: the node holds no user keys
eth_gasPrice, eth_maxPriorityFeePerGas, eth_feeHistoryEIP-1559 fee data
eth_getBalance, eth_getTransactionCount, eth_getCode, eth_getStorageAtAccept a block number, tag or hash
eth_callGas cap 50,000,000 ([rpc] gas_cap)
eth_estimateGasReturns XIP-0001 errors for EOA-locked senders
eth_sendRawTransactionLegacy, EIP-2930, EIP-1559 and EIP-7702 (type 4). Blob (type 3) is rejected
eth_getBlockByNumber, eth_getBlockByHash
eth_getBlockTransactionCountByNumber, eth_getBlockTransactionCountByHash
eth_getTransactionByHash, eth_getTransactionReceipt, eth_getBlockReceipts
eth_getLogsAt most 10,000 blocks per query and 10,000 results

net_ and web3_ ​

net_version, net_listening, net_peerCount, web3_clientVersion, web3_sha3.

Subscriptions (WebSocket) ​

eth_subscribe / eth_unsubscribe, notifications as eth_subscription:

KindNotifications
newHeadsOne per committed block: the header as eth_getBlockByNumber(n, false) returns it
logsEvery log matching an optional { address, topics } filter, in block order. Always removed: false (BFT finality, no reorgs)
newPendingTransactionsThe hash of every transaction admitted to the mempool (full objects are not supported)

Limits: 20 subscriptions per connection, 1,000 per server, up to 256 addresses and 256 topics per log filter. A subscriber that falls too far behind gets an error notification and the subscription is closed. Over plain HTTP, eth_subscribe fails with -32601.

bash
# with websocat or any WS client
websocat ws://127.0.0.1:8545
{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}

Block tags ​

There is no pending block, and every committed block is final:

  • latest, safe, finalized and pending all mean the latest block.
  • Exception: eth_getTransactionCount with pending also counts transactions waiting in the pool.
  • earliest means block 0.

State at past blocks ​

The node keeps reverse state diffs for the last 10,000 blocks by default, so cast ... --block N, anvil --fork-url and forge script can pin a block while new blocks keep coming. The window is set by [chain] pruning (full = 10,000, minimal = 128, archive = all) or state_history_blocks. Older blocks return -32000 historical state not available.

Limits ​

LimitDefaultConfig key
eth_getLogs block range10,000 blocks[rpc] max_logs_range
eth_getLogs results10,000
eth_call / eth_estimateGas gas cap50,000,000[rpc] gas_cap
Batch size50 requests[rpc] max_batch

Requests are limited to 5 MiB and responses to 32 MiB.

Error codes ​

CodeMeaning
3Execution reverted (eth_call / eth_estimateGas); data holds the revert bytes
-32000Unknown block, transaction rejected by the pool, or historical state not available
-32003Transaction rejected by a validity rule. For XIP-0001, data.reason is XIP0001_SEALED, XIP0001_NOT_SELF_CALL, XIP0001_VALUE_NOT_ZERO, XIP0001_GAS_LIMIT or XIP0001_FEE_CAP
-32005Limit exceeded (for example too many eth_getLogs results, or too many subscriptions on the server)
-32006Too many subscriptions on one connection
-32601Method not found or not supported
-32602Invalid parameters
-32603Internal error

The xdevs_ namespace ​

MethodWhat it doesStatus
xdevs_getEoaLock(address, block?)XIP-0001 lock state of an addressImplemented
xdevs_getCommitCertificate(block)The validator signatures that finalized a blockImplemented
xdevs_validators(block?)Active validator set, power, uptimePhase 3
xdevs_epochInfo(block?)Current epoch and next transitionPhase 3
xdevs_simulateTransaction(tx, block?)Asset changes and plain-language warnings before signingPhase 4
xdevs_checkRecipient(from, to)First-time or look-alike recipient, XNS name, contract?Phase 4
xdevs_getApprovals(owner, block?)All live approvals, for a revoke screenPhase 4
xdevs_getVaultQueue(vault, block?)Pending Guardian Vault actionsPhase 4
xdevs_resolveName(name) / xdevs_reverseName(address)XNS lookupsPhase 4
xdevs_subscribe("vaultEvents", account)Real-time vault alerts (WebSocket)Phase 4
xdevs_localFee(contract, block?)Local fee-market price for a contractPhase 5

The plan originally named this method xdevs_getCommit; the node and the SDK's getCommit use xdevs_getCommitCertificate.

Planned methods currently answer "method not found" (-32601); the SDK turns that into XdevsMethodNotAvailableError with the phase number. Their JSON shapes are proposed in the SDK spec and may change before the node implements them.

xdevs_getEoaLock ​

bash
curl -s http://127.0.0.1:8545 -H 'content-type: application/json' -d '{
  "jsonrpc": "2.0", "id": 1, "method": "xdevs_getEoaLock",
  "params": ["0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", "latest"]
}'
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "active": true,
    "status": "unlocked",
    "word": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "delegatedTo": null
  }
}
FieldMeaning
activeWhether XIP-0001 is enforced for the next block
status"unlocked", "locked" or "sealed" at the requested block
wordRaw lock word (32 bytes)
delegatedToEIP-7702 delegation target, or null if not delegated

xdevs_getCommitCertificate ​

Takes a block number, tag or hash. Returns null for unknown blocks and for blocks without a certificate (genesis, dev-mode blocks).

json
{
  "height": "0x2a",
  "round": "0x0",
  "blockHash": "0x…",
  "signatures": [
    { "validator": "0x…(20 bytes)", "signature": "0x…(64-byte Ed25519)" }
  ],
  "raw": "0x…(canonical RLP of the certificate)"
}

Signatures are sorted by validator address (sha256(ed25519 public key)[..20]). A client can verify raw against the validator set.

Not implemented yet ​

  • Filter methods: eth_newFilter, eth_newBlockFilter, eth_getFilterChanges, eth_uninstallFilter.
  • eth_getProof, eth_createAccessList.
  • debug_, trace_ and txpool_ namespaces (debug_traceTransaction is planned for the explorer in Phase 3; these will not be public).
  • Blob (type 3) transactions.

The RPC methods targeted for Phase 1–2 are listed in §19 of the implementation plan.

Built by THE xDEVS · Apache-2.0 · Testnet tokens (tXDS) have no monetary value.