Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

JSON-RPC API

Method behavior and compatibility
View as Markdown

Radius exposes a JSON-RPC 2.0 API compatible with standard Ethereum tooling. This page documents methods that differ from Ethereum, methods requiring elevated access, pseudo-supported methods, and unsupported methods.

For integration guidance, see JSON-RPC overview.

Divergent methods

eth_blockNumber

Returns the current timestamp in milliseconds, encoded as a hex string.

Parameters: None

Returns: string — Current block number as a hex string.


eth_getBalance

Returns native balance plus the maximum native balance that could be obtained by converting the account’s SBC via the Turnstile. This supports wallet preflight checks.

Parameters:
NameTypeDescription
addressstringAddress to query (20 bytes, hex encoded)
blockstringBlock tag (latest, pending, safe, finalized) or block number. Historical block numbers return error -32000.

Returns: string — Balance in wei as a hex string.


eth_getBlock, eth_getBlockByNumber, eth_getBlockByHash

Blocks are reconstructed on demand. Very recent reads are not guaranteed to be stable across repeated calls. eth_getBlockByHash returns null for hashes that do not correspond to a known block.

See Ethereum compatibility.


eth_call, eth_estimateGas

If from is specified and the sender lacks sufficient RUSD but has sufficient SBC, the Turnstile execution is included in dry-run behavior.

If from is omitted or set to the zero address, gas-payment checks are skipped during dry-run execution.


eth_maxPriorityFeePerGas

Returns the current gas price. On Radius this equals eth_gasPrice — there is no separate priority-fee market.

Parameters: None

Returns: string — Gas price in wei as a hex string.


eth_getLogs

Two constraints differ from Ethereum:

Address filter required. Every query must include an address field. Omitting it returns error -33014.

Block range limit. The maximum range between fromBlock and toBlock is 1,000,000 units. Because Radius block numbers are millisecond timestamps (see eth_blockNumber), this covers ~16 minutes 40 seconds of wall time. Queries exceeding this return error -33002.

To query logs over a longer period, split the range into consecutive chunks of up to 1,000,000 and concatenate the results. For real-time event monitoring, use WebSocket eth_subscribe("logs") instead.

Extended methods

These methods are not part of the standard Ethereum JSON-RPC specification but are supported by Radius.

eth_sendRawTransactionSync

Submits a signed raw transaction and waits synchronously for the transaction receipt before returning. Implements EIP-7966.

Unlike eth_sendRawTransaction, which returns a transaction hash immediately and requires the client to poll for inclusion, eth_sendRawTransactionSync combines submission and receipt retrieval into a single RPC call. This eliminates the polling round-trip and reduces total confirmation latency by approximately 50%.

This is especially useful for latency-sensitive applications such as x402 payment flows, where on-chain settlement is on the critical path of an HTTP request-response cycle.

Parameters:
PositionTypeDescriptionRequired
1stringSigned, RLP-encoded transaction hex dataYes
2numberMaximum wait time in millisecondsNo

If no timeout is provided, the node's configured default is used (recommended: 2 000 ms). The timeout cannot exceed the node-configured maximum.

Returns: Transaction receipt object (same structure as eth_getTransactionReceipt) on success.

Method-specific error codes:
CodeTypeDescriptiondata field
4TimeoutTransaction was added to the mempool but not processed within timeoutTransaction hash
5Unknown/QueuedTransaction was not added to the mempoolTransaction hash
6Nonce gapTransaction rejected due to a nonce gapExpected nonce (hex)

On error code 6, the data field contains the expected nonce as a hex string directly, so the caller can immediately resubmit with the correct nonce without making a separate eth_getTransactionCount call.

On error code 4, the data field contains the transaction hash. The transaction was accepted into the mempool — the caller can continue monitoring via eth_getTransactionReceipt.

Example request:
{
  "jsonrpc": "2.0",
  "method": "eth_sendRawTransactionSync",
  "params": ["0xf86c808504a817c80082520894ab..."],
  "id": 1
}
Example success response:
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "transactionHash": "0x1234abcd...",
    "blockHash": "0xabcd1234...",
    "blockNumber": "0x10d4f",
    "gasUsed": "0x5208",
    "status": "0x1",
    "logs": []
  }
}
Example timeout response (error code 4):
{
  "jsonrpc": "2.0",
  "id": 1,
  "error": {
    "code": 4,
    "message": "The transaction was added to the mempool but wasn't processed within the designated timeout interval.",
    "data": "0x1234abcd..."
  }
}

Methods requiring elevated RPC access

eth_subscribe

Creates a WebSocket subscription for real-time logs. Radius supports logs only.

newHeads and newPendingTransactions are not available.

Parameters:
NameTypeDescription
typestringSubscription type (for example, logs)
filterobjectLog filter object

Returns: string — Subscription ID.

Pseudo-supported methods

These methods return defaults and do not return errors. Most applications should not rely on them.

eth_accounts

Always returns an empty array. Radius does not manage accounts.

Parameters: None

Returns: array[]


eth_feeHistory

Returns a static response. Radius uses fixed pricing instead of fee-market history.

Parameters: See Ethereum JSON-RPC specification

Returns: object


eth_mining

Always returns true.

Parameters: None

Returns: boolean


eth_syncing

Always returns false.

Parameters: None

Returns: boolean


eth_hashrate

Always returns 0x0.

Parameters: None

Returns: string


eth_uninstallFilter

Always returns true. Filters are not persisted.

Parameters:
NameTypeDescription
filterIdstringFilter ID

Returns: boolean


net_listening

Always returns false. Radius does not use peer-to-peer networking.

Parameters: None

Returns: boolean


net_peerCount

Always returns 0x0. Radius does not use peer-to-peer networking.

Parameters: None

Returns: string

Unsupported methods

Radius returns errors for these methods:

  • eth_coinbase
  • eth_getBlockReceipts
  • eth_getFilterChanges
  • eth_getFilterLogs
  • eth_getProof
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_getWork
  • eth_newBlockFilter
  • eth_newFilter
  • eth_newPendingTransactionFilter
  • eth_sign
  • eth_simulateV1
  • eth_submitWork
  • trace_block
  • trace_callMany
  • trace_filter
  • trace_transaction

Error codes

Radius uses standard JSON-RPC 2.0 error codes:

CodeMessageDescription
-32700Parse errorInvalid JSON
-32600Invalid requestInvalid request object
-32601Method not foundMethod does not exist
-32602Invalid paramsInvalid method parameters
-32603Internal errorInternal JSON-RPC error
3Execution revertedContract execution reverted

Radius-specific error codes:

CodeMessageDescription
-33002Block range too wideeth_getLogs range exceeds 1,000,000 units (~16 min 40 sec)
-33014Address filter requiredeth_getLogs called without an address field

Related pages