JSON-RPC API
Somnia exposes an RPC API compatible with the Ethereum JSON-RPC specification. The mainnet public RPC endpoint is https://api.infra.mainnet.somnia.network (chain ID 0x13a7 / 5031).
Methods by Name
Methods by Category
Network / Web3
net_version
net_versionReturns the network ID.
Parameters: (none)
Returns:
quantity(uint256)Compatibility: EIP-1474, ethereum.org
Note: This is currently non-conformant with the Ethereum JSON-RPC spec, which specifies that the return value is a decimal string. In future Somnia will switch to this form:
net_listening
net_listeningReturns true if the node is listening for connections.
Parameters: (none)
Returns:
boolCompatibility: EIP-1474, ethereum.org
web3_clientVersion
web3_clientVersionReturns the Somnia client version string.
Parameters: (none)
Returns:
stringCompatibility: EIP-1474, ethereum.org
web3_sha3
web3_sha3Returns the Keccak-256 hash of the given data.
Parameters:
data(hex)Returns:
hashCompatibility: EIP-1474, ethereum.org
Chain State
eth_chainId
eth_chainIdReturns the chain ID.
Parameters: (none)
Returns:
quantity(uint256)Compatibility: EIP-695, ethereum.org
eth_syncing
eth_syncingReturns true while the node is still syncing, false once ready. Unlike standard Ethereum clients, Somnia returns bool only -- it does not return a sync-status object.
Parameters: (none)
Returns:
boolCompatibility: EIP-1474, ethereum.org
eth_blockNumber
eth_blockNumberReturns the latest block number.
Parameters: (none)
Returns:
quantity(block number)Compatibility: EIP-1474, ethereum.org
eth_accounts
eth_accountsReturns the list of accounts owned by the node (empty for public RPC endpoints).
Parameters: (none)
Returns:
address[]Compatibility: EIP-1474, ethereum.org
Account State
eth_getBalance
eth_getBalanceReturns the balance of an account in wei.
Parameters:
address,blockLabel("latest","earliest","pending", or hex block number)Returns:
quantity(uint256)Compatibility: EIP-1474, ethereum.org
eth_getTransactionCount
eth_getTransactionCountReturns the nonce (number of transactions sent) for an account.
Parameters:
address,blockLabelReturns:
quantity(uint64)Compatibility: EIP-1474, ethereum.org
Requires node to be ready
eth_getCode
eth_getCodeReturns the bytecode at an address ("0x" for addresses without code).
Parameters:
address,blockLabelReturns:
bytes(hex)Compatibility: EIP-1474, ethereum.org
Requires node to be ready
eth_getStorageAt
eth_getStorageAtReturns the value in a contract's storage slot.
Parameters:
address,slot(hex uint256),blockLabelReturns:
bytes(hex)Compatibility: EIP-1474, ethereum.org
Requires node to be ready
Transaction Submission
eth_sendRawTransaction
eth_sendRawTransactionSubmits a signed transaction. Returns the transaction hash.
Parameters:
signedTransactionData(hex-encoded signed tx bytes)Returns:
hash(tx id)Compatibility: EIP-1474, ethereum.org
Requires node to be ready
Note: The example above is a template. You must provide a valid signed transaction. An invalid transaction returns:
{"jsonrpc":"2.0","id":1,"error":{"code":-32000,"message":"invalid transaction","data":null}}
realtime_sendRawTransaction
realtime_sendRawTransactionSubmits a signed transaction and waits for the receipt before returning. Same parameters as eth_sendRawTransaction, but the response is a full transaction receipt instead of just the hash.
Parameters:
signedTransactionData(hex-encoded signed tx bytes)Returns:
TransactionReceiptCompatibility: Somnia-specific -- no Ethereum equivalent
Requires node to be ready
Transaction Retrieval
eth_getTransactionByHash
eth_getTransactionByHashReturns transaction details by hash, or null if not found.
Parameters:
txHashReturns:
Transaction| nullCompatibility: EIP-1474, ethereum.org
eth_getTransactionByBlockHashAndIndex
eth_getTransactionByBlockHashAndIndexReturns a transaction by block hash and index within the block.
Parameters:
blockHash,index(hex)Returns:
Transaction| nullCompatibility: EIP-1474, ethereum.org
eth_getTransactionByBlockNumberAndIndex
eth_getTransactionByBlockNumberAndIndexReturns a transaction by block number and index within the block.
Parameters:
blockNumber(hex or label),index(hex)Returns:
Transaction| nullCompatibility: EIP-1474, ethereum.org
Response format is identical to eth_getTransactionByBlockHashAndIndex above.
eth_getTransactionReceipt
eth_getTransactionReceiptReturns the receipt for a mined transaction.
Parameters:
txHashReturns:
TransactionReceipt| nullCompatibility: EIP-1474, ethereum.org
eth_getBlockReceipts
eth_getBlockReceiptsReturns all transaction receipts for a block.
Parameters:
blockNumberOrHash(hex block number, block hash, or label like"latest")Returns:
TransactionReceipt[]Compatibility: execution-apis
Block Retrieval
eth_getBlockByNumber
eth_getBlockByNumberReturns block data by number.
Parameters:
blockNumber(hex or"latest","earliest","pending"),fullTransactions(bool -- if true, returns full tx objects; if false, returns tx hashes only)Returns:
Block| nullCompatibility: EIP-1474, ethereum.org
eth_getBlockByHash
eth_getBlockByHashReturns block data by hash. Same response format as eth_getBlockByNumber.
Parameters:
blockHash,fullTransactions(bool)Returns:
Block| nullCompatibility: EIP-1474, ethereum.org
Response format is identical to eth_getBlockByNumber above.
eth_getHeaderByNumber
eth_getHeaderByNumberReturns only the block header (no transactions). Same response shape as eth_getBlockByNumber but with the transactions field omitted entirely.
Note: The
transactionsfield is omitted from the response (not present as an empty array).
eth_getHeaderByHash
eth_getHeaderByHashReturns only the block header by hash. Same as eth_getHeaderByNumber but looks up by block hash.
Note: The
transactionsfield is omitted from the response (not present as an empty array).
eth_getBlockTransactionCountByNumber
eth_getBlockTransactionCountByNumberReturns the number of transactions in a block.
Parameters:
blockLabel(hex or label)Returns:
quantity(uint64)Compatibility: EIP-1474, ethereum.org
eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByHashReturns the number of transactions in a block by hash.
Parameters:
blockHashReturns:
quantity(uint64)Compatibility: EIP-1474, ethereum.org
Logs & Filters
eth_getLogs
eth_getLogsReturns logs matching a filter. The block range must not exceed 1000 blocks.
Parameters: filter object with optional fields
fromBlock,toBlock,address,topics,blockHashReturns:
Log[]Compatibility: EIP-1474, ethereum.org
fromBlock
blockLabel or null
Start of block range
toBlock
blockLabel or null
End of block range
blockHash
hash or null
Specific block hash
address
address or address[]
Match logs from one or more contracts
topics
array or null
Topic-position filters; each position may be a single hash, an OR-list of hashes, or null as a wildcard
eth_newFilter
eth_newFilterCreates a log filter. Returns a filter ID. The block range must not exceed 1000 blocks.
Parameters: filter object with optional fields
fromBlock,toBlock,address,topicsReturns:
quantity(filter id)Compatibility: EIP-1474, ethereum.org
fromBlock
blockLabel or null
Start of block range
toBlock
blockLabel or null
End of block range
address
address or address[]
Match logs from one or more contracts
topics
array or null
Topic-position filters; each position may be a single hash, an OR-list of hashes, or null as a wildcard
eth_newBlockFilter
eth_newBlockFilterCreates a filter that returns new block hashes.
Parameters: (none)
Returns:
quantity(filter id)Compatibility: EIP-1474, ethereum.org
eth_newPendingTransactionFilter
eth_newPendingTransactionFilterCreates a filter that returns new pending transaction hashes.
Parameters: (none)
Returns:
quantity(filter id)Compatibility: EIP-1474, ethereum.org
eth_getFilterChanges
eth_getFilterChangesPolls a filter for new results since the last poll. Response format depends on filter type: block hashes for block filters, tx hashes for pending tx filters, log objects for log filters.
Parameters:
filterId(hex)Returns:
json(varies by filter type)Compatibility: EIP-1474, ethereum.org
eth_getFilterLogs
eth_getFilterLogsReturns all logs matching the filter criteria (for log filters only).
Parameters:
filterId(hex)Returns:
Log[]Compatibility: EIP-1474, ethereum.org
eth_uninstallFilter
eth_uninstallFilterRemoves a filter. Returns true if the filter was found and removed.
Parameters:
filterId(hex)Returns:
boolCompatibility: EIP-1474, ethereum.org
Note: Filter IDs are connection-scoped. On load-balanced public endpoints, the filter may be on a different backend than the uninstall request, causing
falsereturns. For reliable filter usage, use a persistent WebSocket connection or a dedicated RPC endpoint.
Subscriptions
eth_subscribe
eth_subscribeCreates a subscription. Supported subscription types:
"newHeads"-- new block headers"logs"-- log events matching a filter"somnia_finishedTransactions"-- completed transaction receipts (Somnia-specific)"somnia_finishedBlocks"-- completed blocks (Somnia-specific)"somnia_watch"-- log events with watch semantics (Somnia-specific)
Properties:
Parameters:
subscriptionType, optional params object (see Subscription Schemas)Returns:
quantity(subscription id)Compatibility: Geth
WebSocket only
This method emits events, so requires a WebSocket connection. Over HTTP it returns
events_not_supported.eth_unsubscribeworks over both HTTP and WebSocket.
Over HTTP, this returns:
eth_unsubscribe
eth_unsubscribeCancels a subscription. Returns true if the subscription was found and removed, false otherwise.
Subscription IDs are connection-scoped, so this must be called from the same connection that created the subscription.
Parameters:
subscriptionId(hex)Returns:
boolCompatibility: Geth
Gas & Fees
eth_gasPrice
eth_gasPriceReturns the current gas price in wei.
Parameters: (none)
Returns:
quantity(uint256)Compatibility: EIP-1474, ethereum.org, execution-apis
eth_maxPriorityFeePerGas
eth_maxPriorityFeePerGasReturns the current max priority fee per gas (tip) in wei.
Parameters: (none)
Returns:
quantity(uint256)Compatibility: EIP-1559, execution-apis
eth_feeHistory
eth_feeHistoryReturns historical gas fee data.
Parameters:
blockCount(hex),newestBlock(hex or label),rewardPercentiles(array of floats)Returns: json object
Compatibility: EIP-1559, execution-apis
eth_call
eth_callExecutes a call without creating a transaction (read-only simulation).
Parameters:
TransactionRequest,blockLabelOrHash, optionalStateOverrideSet(see Request Schemas)Returns:
bytes(hex)Compatibility: EIP-1474, ethereum.org
Requires node to be ready
eth_estimateGas
eth_estimateGasEstimates the gas required for a transaction.
Parameters:
TransactionRequest, optionalblockLabel, optionalStateOverrideSet(see Request Schemas)Returns:
quantity(uint64)Compatibility: EIP-1474, ethereum.org
Requires node to be ready
eth_createAccessList
eth_createAccessListReturns an empty EIP-2930 access list plus the estimated gas for a transaction. (Somnia doesn't support access lists.)
Parameters:
TransactionRequest, optionalblockLabel(see Request Schemas)Returns:
[accessList, gasUsed](JSON array)Compatibility: EIP-2930, execution-APIs
Requires node to be ready
Debug / Tracing
debug_traceCall
debug_traceCallTraces a call execution with a specified tracer.
Parameters:
TransactionRequest,blockLabelOrHash, trace config (tracer,tracerConfig,stateOverrides) (see Request Schemas)Returns: trace output
Compatibility: Geth
Requires node to be ready
debug_traceTransaction
debug_traceTransactionTraces an already-mined transaction.
Parameters:
txHash, tracer config (tracer,tracerConfig)Returns: trace output
Compatibility: Geth
Requires node to be ready
debug_traceBlockByNumber
debug_traceBlockByNumberTraces all transactions in a block by block number.
Parameters:
blockLabel(hex or label), tracer configReturns:
{txHash, result | null, error | null}[]Compatibility: Geth
Requires node to be ready
Supported tracers:
"callTracer"(with optional{"onlyTopCall": true}),"prestateTracer"(with optional{"diffMode": true})
debug_traceBlockByHash
debug_traceBlockByHashTraces all transactions in a block by block hash.
Parameters:
blockHash, tracer configReturns:
{txHash, result | null, error | null}[]Compatibility: Geth
Requires node to be ready
Supported tracers:
"callTracer"(with optional{"onlyTopCall": true}),"prestateTracer"(with optional{"diffMode": true})
Response format is identical to debug_traceBlockByHash above.
Somnia-Specific
somnia_isReady
somnia_isReadyReturns true if the node is synced and ready to process requests.
Parameters: (none)
Returns:
boolCompatibility: Somnia-specific
somnia_isReadyWithErrorCode
somnia_isReadyWithErrorCodeLike somnia_isReady, but returns an RPC error (code -32603) instead of false when the node is not ready.
Parameters: (none)
Returns:
bool(error code on failure)Compatibility: Somnia-specific
somnia_nodePublicKeys
somnia_nodePublicKeysReturns the node's public keys for the current epoch.
Parameters: (none)
Returns: json object
Compatibility: Somnia-specific
somnia_getBlockByNumber
somnia_getBlockByNumberReturns Somnia's native block representation (consensus + execution blocks), which contains more detail than the Ethereum-compatible eth_getBlockByNumber.
Parameters:
blockLabel(hex or label)Returns:
SomniaLedgerBlock| nullCompatibility: Somnia-specific -- native block format (cf.
eth_getBlockByNumber)
somnia_getBlockByHash
somnia_getBlockByHashSame as somnia_getBlockByNumber but looks up by block hash.
Parameters:
blockHashReturns:
SomniaLedgerBlock| nullCompatibility: Somnia-specific -- native block format (cf.
eth_getBlockByHash)
Response format is identical to somnia_getBlockByNumber above.
somnia_getStatistics
somnia_getStatisticsReturns chain statistics over a block range.
Parameters:
fromBlock(hex or label),toBlock(hex or label)Returns: json object
Compatibility: Somnia-specific
somnia_getPrivilegedTransactionReceiptsForBlockByNumber
somnia_getPrivilegedTransactionReceiptsForBlockByNumberReturns receipts for privileged (system) transactions in a block.
Parameters:
blockNumber(hex or label)Returns:
TransactionReceipt[]Compatibility: Somnia-specific -- system/privileged tx receipts
somnia_getPrivilegedTransactionReceiptsForBlockByHash
somnia_getPrivilegedTransactionReceiptsForBlockByHashReturns receipts for privileged (system) transactions in a block. Same as somnia_getPrivilegedTransactionReceiptsForBlockByNumber but looks up by block hash.
Parameters:
blockHashReturns:
TransactionReceipt[]Compatibility: Somnia-specific -- system/privileged tx receipts
Response format is identical to somnia_getPrivilegedTransactionReceiptsForBlockByNumber above.
somnia_getSessionAddress
somnia_getSessionAddressDerives a session key address from a seed.
Parameters:
seed(32-byte hash)Returns:
addressCompatibility: Somnia-specific -- session key derivation
somnia_sendSessionTransaction
somnia_sendSessionTransactionSends a transaction using a session key (derived from a seed). The session account must have sufficient funds.
Parameters: object with
seed(hash),gas(hex),to(address, optional),value(hex, optional),data(hex, optional)Returns:
TransactionReceipt| nullCompatibility: Somnia-specific -- session key transactions
Response format is identical to eth_getTransactionReceipt above.
somnia_reactivityGetSubscriptionInfo
somnia_reactivityGetSubscriptionInfoReturns details of a Somnia Reactivity Protocol subscription by ID.
Parameters:
subscriptionId(hex-encoded subscription ID)Returns:
ReactivitySubscriptionCompatibility: Somnia-specific -- Somnia Reactivity Protocol
somnia_reactivityGetSubscriptions
somnia_reactivityGetSubscriptionsReturns all Somnia Reactivity Protocol subscriptions owned by an address.
Parameters:
address(owner address)Returns:
ReactivitySubscription[]Compatibility: Somnia-specific -- Somnia Reactivity Protocol
Response is a JSON array of ReactivitySubscription objects.
Notes
General Usage
Endpoints
Mainnet (chain ID 0x13a7 / 5031)
https://api.infra.mainnet.somnia.network
wss://api.infra.mainnet.somnia.network/ws
Testnet Shannon (chain ID 0xc488 / 50312)
https://api.infra.testnet.somnia.network
wss://api.infra.testnet.somnia.network/ws
Request Format
All requests use the JSON-RPC 2.0 protocol over HTTP POST or WebSocket. The request body is:
Batch requests are supported: send a JSON array of request objects and receive a JSON array of responses in the same order.
Hex Encoding
All numeric values in requests and responses are hex-encoded with a 0x prefix, following the Ethereum JSON-RPC convention:
Quantities (block numbers, gas, balances, nonces): hex without leading zeros —
"0x1","0x5208","0x165a0bc00"Data (hashes, addresses, bytecode, input data): hex with even-length zero-padding —
"0x0000...0000","0x"
Block Labels
Many methods accept a block label parameter. This can be:
A hex-encoded block number (e.g.
"0xfebbe5e")"latest"— the most recent confirmed block"earliest"— the genesis block (block 0)"finalized","pending","safe"— currently treated the same as"latest"
Transaction Types
Somnia supports the following Ethereum transaction types via eth_sendRawTransaction:
Error Codes
Error responses follow the JSON-RPC 2.0 format:
-32700
Parse error
Malformed JSON
-32600
Invalid request
Missing jsonrpc, method, or id fields
-32601
Method not found
Typo in method name, or method not available on this node
-32602
Invalid parameters
Wrong number or types of params
-32603
Internal error
Node not ready, or unexpected server error
-32604
Too many requests
Rate limit exceeded
-32004
Method not supported
Method exists but is disabled on this node
-32000
Invalid input
Transaction-specific errors (see below)
-1
Application error
Handler-specific errors (e.g. "block range exceeds 1000")
Common -32000 transaction errors from eth_sendRawTransaction:
"invalid transaction"
RLP decoding failed or transaction is malformed
"invalid signature"
ECDSA signature verification failed
"nonce too low"
Transaction nonce is behind the account's current nonce
"nonce too high"
Transaction nonce is too far ahead
"insufficient balance"
Account cannot cover value + gas
"gas price below base fee"
gasPrice or maxFeePerGas is below the current base fee
"mempool full"
Node's transaction pool is at capacity
Special Cases
Requires Node Ready
Some methods are marked Requires Node Ready in the index table. These methods will return an error if the node has not finished syncing and is not yet ready to serve requests.
You can check whether a node is ready before making calls by using somnia_isReady.
Log Query Limits
eth_getLogs, eth_newFilter, and eth_getFilterLogs enforce a maximum block range (currently 1000 blocks). Queries exceeding this range will return an error. To scan larger ranges, issue multiple queries with non-overlapping block ranges.
Filter and Subscription Statefulness
Filters created with eth_newFilter, eth_newBlockFilter, and eth_newPendingTransactionFilter are scoped to the connection that created them. On load-balanced public RPC endpoints, subsequent requests may be routed to a different backend, causing eth_getFilterChanges to return empty results or eth_uninstallFilter to return false. For reliable filter-based polling, use a dedicated RPC endpoint or switch to eth_subscribe over WebSocket.
Subscriptions created with eth_subscribe are also connection-scoped. eth_unsubscribe returns false if the subscription id is unknown or belongs to a different connection.
Missing Resource Semantics
Somnia does not use a single convention for "not found". The main cases are:
Returns null
Returns null
RPC error: "unknown block"
RPC error: "Block does not exist"
Returns false if the id is unknown or belongs to another connection
Somnia vs Ethereum Differences
While Somnia is EVM-compatible and supports the standard Ethereum JSON-RPC, there are a few behavioural differences to be aware of:
eth_syncingreturns only abool(truewhile syncing,falsewhen ready). It does not return a sync-status object withstartingBlock/currentBlock/highestBlockfields as Ethereum clients do.eth_getHeaderByHash/eth_getHeaderByNumberomit thetransactionsfield entirely rather than returning an empty array.eth_subscribesupports the standard"newHeads"and"logs"types, plus three Somnia-specific types:"somnia_finishedTransactions","somnia_finishedBlocks", and"somnia_watch". It does not support"newPendingTransactions".realtime_sendRawTransactionis a Somnia extension that submits a transaction and blocks until the receipt is available, combiningeth_sendRawTransaction+ pollingeth_getTransactionReceiptinto a single call.Block structure: Somnia blocks have a fixed
difficultyof0x0,minerof0x0...0, and no uncle blocks. ThegasLimitreflects per-block execution gas rather than a global gas target.EIP-4844 blob transactions (type
0x3) are not supported.
For more detail on gas behaviour, see Somnia Gas Differences to Ethereum.
Appendix
Request Schemas
TransactionRequest (used by eth_call, eth_estimateGas, eth_createAccessList, debug_traceCall, and somnia_watch.eth_calls):
from
address or null
Sender address for simulation
to
address or null
Omit or set null for contract creation
gas
quantity or null
Gas limit for the simulated transaction
value
quantity or null
Wei transferred
input
bytes or null
Calldata alias accepted by Geth-style clients
data
bytes or null
Calldata alias
inputanddataare interchangeable aliases. If both are provided, Somnia usesinput.
AuthorizationListEntry (entries within authorizationList):
chainId
quantity
Chain id covered by the authorization
address
address
Contract address to delegate code from
nonce
quantity
Authorization nonce
yParity
quantity
Signature recovery parity
r
quantity
Signature component
s
quantity
Signature component
StateOverrideSet (used by eth_call, eth_estimateGas, and debug_traceCall):
A JSON object keyed by account address, where each value is a StateOverride object.
StateOverride:
balance
quantity or null
Override account balance
nonce
quantity or null
Override account nonce
code
bytes or null
Override deployed bytecode
state
object or null
Replace the entire storage map with slot -> value entries
stateDiff
object or null
Patch individual storage slots with slot -> value entries
stateandstateDiffare mutually exclusive. Providing both returns an error.
Several methods take similar log-filter-shaped inputs, but they are not one shared request type in source.
Response Schemas
Transaction (returned by eth_getTransactionByHash and similar):
blockHash
hash
blockNumber
quantity
from
address
to
address or null
null for contract creation
gas
quantity
Gas limit
gasPrice
quantity
Effective gas price
hash
hash
Transaction hash
input
bytes
Calldata ("0x" for simple transfers)
nonce
quantity
transactionIndex
quantity
Position within the block
value
quantity
Wei transferred
type
quantity
0x0 legacy, 0x1 access list, 0x2 EIP-1559, 0x4 EIP-7702
chainId
quantity
v, r, s
quantity
ECDSA signature components
maxPriorityFeePerGas
quantity or null
Present for type 0x2 and 0x4 only
maxFeePerGas
quantity or null
Present for type 0x2 and 0x4 only
authorizationList
array or null
Present for type 0x4 only
TransactionReceipt (returned by eth_getTransactionReceipt and similar):
transactionHash
hash
transactionIndex
quantity
blockHash
hash
blockNumber
quantity
from
address
to
address or null
null for contract creation
cumulativeGasUsed
quantity
gasUsed
quantity
Gas consumed by this transaction
contractAddress
address or null
Address of created contract, or null
type
quantity
Transaction type
status
quantity
0x1 success, 0x0 revert
logsBloom
bytes
256-byte bloom filter
effectiveGasPrice
quantity
Actual gas price paid
Log (entries within logs arrays):
address
address
Contract that emitted the event
topics
hash[]
Up to 4 indexed event parameters; topics[0] is the event signature hash
data
bytes
ABI-encoded non-indexed parameters
blockNumber
quantity
transactionHash
hash
transactionIndex
quantity
blockHash
hash
logIndex
quantity
Position within the block's logs
Block (returned by eth_getBlockByNumber and similar):
hash
hash
parentHash
hash
sha3Uncles
hash
Always the empty uncles hash (no uncle blocks)
miner
address
Always 0x0000...0000
stateRoot
hash
transactionsRoot
hash
receiptsRoot
hash
logsBloom
bytes
256-byte bloom filter
difficulty
quantity
Always 0x0
number
quantity
Block number
gasLimit
quantity
Per-block execution gas
gasUsed
quantity
baseFeePerGas
quantity
EIP-1559 base fee
timestamp
quantity
Unix timestamp
size
quantity
RLP-encoded block size in bytes
extraData
bytes
mixHash
hash
Always zero
nonce
bytes
Always zero (8 bytes)
transactions
hash[] or Transaction[]
Tx hashes if fullTxObjects=false, full objects if true. Omitted entirely for eth_getHeaderBy*.
SomniaLedgerBlock (returned by somnia_getBlockByNumber / somnia_getBlockByHash):
parent_ledger_block_hash
hash
Parent ledger-block hash
ledger_block_hash
hash
Ledger-block hash
SomniaConsensusBlock:
block_number
quantity
Ledger block number
timestamp
quantity
Unix timestamp in milliseconds
data_chain_blocks
hash[]
Referenced data-chain blocks
delayed_ledger_block_number
quantity
Delayed ledger block number
delayed_ledger_block_hash
hash
Delayed ledger block hash
parent_consensus_block_hash
hash
Parent consensus-block hash
proposer_address
address
Block proposer
consensus_block_hash
hash
Consensus-block hash
SomniaExecutionBlock:
transaction_ids_hash
hash
Hash of transaction ids
receipts_hash
hash
Hash of receipts
execution_gas_limit
quantity
Execution gas limit
execution_gas_used
quantity
Execution gas used
execution_state_snapshot
hash
State snapshot hash
state_snapshot_block_number
quantity
Block number of the state snapshot
operation_sequence_hash
quantity
Operation sequence hash encoded as a quantity
SomniaFrontendResources:
validation_gas
quantity
Validation gas used by the consensus block
compressed_bytes
quantity
Compressed frontend payload size
uncompressed_bytes
quantity
Uncompressed frontend payload size
ReactivitySubscription (returned by somnia_reactivityGetSubscriptionInfo / somnia_reactivityGetSubscriptions):
id
quantity
Subscription ID
topics
data[4]
Log topics to match (up to 4)
origin
address
Origin filter
caller
address
Caller filter (reserved, currently unused)
emitter
address
Contract address that emits the matched log
owner
address
Subscription owner address
handler_contract_address
address
Contract called when the subscription triggers
handler_function_selector
data
4-byte function selector on the handler contract
gas_limit
quantity
Gas limit for the reactive callback
priority_fee_per_gas
quantity
Priority fee per gas for the callback
max_fee_per_gas
quantity
Max fee per gas for the callback
Subscription Schemas
All eth_subscribe notifications use this envelope:
newHeads
Params: none
Event result:
NewHead
logs
Params:
address
address or address[]
Match logs from one or more contracts
Event result:
Log
somnia_finishedTransactions
Params:
transaction_senders
address[] or null
Only emit events for transactions from these senders
subscribe_to_all_transactions
bool or null
Emit events for all finished transactions
Event result:
transaction_id
hash
Transaction hash
transaction_status
integer enum
Internal TransactionStatus value
sender_address
address
Transaction sender
transaction_nonce
integer
Sender nonce used by the transaction
somnia_finishedBlocks
Params: none
Event result:
blockNumber
quantity
Finished block number
totalTransactions
quantity
Number of transactions in the block
somnia_watch
Params:
address
address or address[]
Log emitter filter
context
string or string[]
Extra values appended to each simulated call's calldata. Supported selectors: address, data, topic1, topic2, topic3, topic4
push_changes_only
bool or null
Only emit when simulationResults change from the previous event for that subscription
Event result:
address
address
Log emitter
topics
hash[]
Emitted topics
data
bytes
Raw log data
simulationResults
bytes[]
Return data from each configured simulated call
NewHead (event payload for eth_subscribe("newHeads")):
hash
hash
parentHash
hash
sha3Uncles
hash
Always the empty uncles hash
miner
address
Always 0x0000...0000
stateRoot
hash
transactionsRoot
hash
receiptsRoot
hash
logsBloom
bytes
256-byte bloom filter
difficulty
quantity
Always 0x0
number
quantity
Block number
gasLimit
quantity
gasUsed
quantity
baseFeePerGas
quantity
timestamp
quantity
Unix timestamp
extraData
bytes
Last updated