Skip to main content

Ethereum-Compatible Methods

OXN supports the standard Ethereum JSON-RPC surface with a few behavioral differences noted below.

Account and balance methods

MethodSupportNotes
eth_accountsReturns configured accounts (mostly empty on public RPC).
eth_getBalanceStandard.
eth_getTransactionCountStandard nonce lookup.
eth_getCodeReturns deployed bytecode.
eth_getStorageAtReturns encrypted storage bytes (ciphertext).

Note: eth_getStorageAt returns the encrypted value from storage. To read decrypted state, call a view function that reads and returns the value — the runtime decrypts inside the enclave.

Block methods

MethodSupportNotes
eth_blockNumberLatest block height.
eth_getBlockByNumberStandard block lookup.
eth_getBlockByHashStandard.
eth_getBlockTransactionCountByNumberStandard.
eth_getBlockTransactionCountByHashStandard.

Transaction methods

MethodSupportNotes
eth_sendRawTransactionStandard. data can be plain or encrypted CBOR envelope.
eth_getTransactionByHashReturns encrypted data for encrypted transactions.
eth_getTransactionReceiptStandard. Logs are encrypted for encrypted transactions.
eth_getTransactionByBlockNumberAndIndexStandard.

Call and estimation

MethodSupportNotes
eth_callStandard, plus signed-query and encrypted variants. See below.
eth_estimateGasSet gasLimit explicitly (recommended).See Gas and Fees.
eth_gasPriceReturns current gas price. 0 is accepted on testnet.

eth_call variants

The single eth_call method serves three modes:

  1. Plain call. Standard parameters — data, from, to, etc. Returns plaintext result.
  2. Encrypted call. data is a CBOR envelope. Returns encrypted response.
  3. Signed query. data is a CBOR envelope with an embedded signature; from inside the envelope populates msg.sender.

The SDK handles selecting the right mode based on how you invoke it (wrapped provider vs bare provider, and whether you attached a signer).

Log and filter methods

MethodSupportNotes
eth_getLogsFilter across blocks. Returns ciphertext for encrypted events.
eth_newFilterStandard.
eth_newBlockFilterStandard.
eth_newPendingTransactionFilterStandard.
eth_getFilterChangesStandard.
eth_uninstallFilterStandard.

Network and client identification

MethodSupportNotes
eth_chainIdReturns 0xba (186) for OXN Testnet.
eth_syncingPublic RPC always returns false (fully synced).
net_versionSame as eth_chainId value in decimal.
net_listeningAlways true.
net_peerCountReturns peer count on the node.
web3_clientVersionNode software version string.
web3_sha3Standard.

Debug and trace methods

MethodSupportNotes
debug_traceTransactionPartialPublic RPC may disable under load. Returns opaque calldata for encrypted transactions.
debug_traceCallPartialSame as above.

What's not supported

MethodReason
eth_signTransactionPublic RPC does not hold keys.
eth_signTypedData_v4Public RPC does not hold keys.
eth_getProofNot implemented in current runtime.
EIP-1559 maxFeePerGas / maxPriorityFeePerGas in eth_gasPriceOXN uses legacy fee model.
eth_feeHistoryLegacy fee model — no base fee history.

Next steps