RPC Methods Reference
Complete reference for JSON-RPC methods supported by Mersennet. All examples use http://46.225.30.187:8545 as the RPC URL.
Mersennet implements 63 RPC methods across 7 namespaces: eth_, net_, web3_, txpool_, prime_, primeorders_, and primebridge_.
Standard Ethereum Methodsβ
eth_blockNumberβ
Returns the current block number.
Parameters: None
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Response:
{ "jsonrpc": "2.0", "id": 1, "result": "0x1234" }
eth_chainIdβ
Returns the chain ID (0x1eef = 7919).
Parameters: None
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
eth_gasPriceβ
Returns the current gas price in wei.
Parameters: None
eth_maxPriorityFeePerGasβ
Returns the current priority fee per gas in wei.
Parameters: None
eth_feeHistoryβ
Returns base fee and reward percentiles for a range of recent blocks.
Parameters:
blockCountβ Number of blocks in the range (hex)newestBlockβ Highest block number or"latest"rewardPercentilesβ Array of percentile values (e.g.[25, 50, 75])
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_feeHistory","params":["0x4","latest",[25,50,75]],"id":1}'
eth_accountsβ
Returns a list of addresses owned by the node (typically empty on public nodes).
Parameters: None
eth_syncingβ
Returns false when not syncing, or a sync status object.
Parameters: None
eth_miningβ
Returns whether the node is actively mining/producing blocks.
Parameters: None
eth_protocolVersionβ
Returns the current protocol version.
Parameters: None
eth_getBalanceβ
Returns account balance in wei.
Parameters:
addressβ 20-byte address (hex)blockNumber(optional) β Block number or"latest"
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["0x7f5ce38fb2553e95dd8ef9182a80bc219c9a0d45","latest"],"id":1}'
eth_getTransactionCountβ
Returns nonce (transaction count) for an address.
Parameters:
addressβ 20-byte address (hex)blockNumber(optional) β"latest"or block number
eth_getCodeβ
Returns the bytecode at an address.
Parameters:
addressβ 20-byte address (hex)blockNumber(optional) β Block number or"latest"
eth_getStorageAtβ
Returns the value at a storage slot.
Parameters:
addressβ 20-byte address (hex)slotβ Storage slot (hex)blockNumber(optional) β Block number or"latest"
eth_callβ
Executes a call without creating a transaction (read-only).
Parameters:
callObjectβ{ from?, to, gas?, gasPrice?, value?, data? }blockNumber(optional) β"latest"or block number
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_call","params":[{"to":"0x079bf1207b51acda83e2e8178344f62a883f8479","data":"0x70a082310000000000000000000000007f5ce38fb2553e95dd8ef9182a80bc219c9a0d45"},"latest"],"id":1}'
eth_estimateGasβ
Estimates gas for a transaction.
Parameters:
transactionObjectβ Same shape aseth_call
eth_getBlockByNumberβ
Returns block by block number.
After privacy activation, this method remains public only for
header-only access. Setting fullTransactions=true is rejected because
full transaction metadata is not part of the post-fork public surface.
Parameters:
blockNumberβ Block number (hex) or"latest","pending"fullTransactionsβtruefor full tx objects,falsefor hashes only
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest",false],"id":1}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"number": "0x1234",
"hash": "0x...",
"proposer": "0x...",
"gas_limit": "0x...",
"gas_used": "0x...",
"base_fee": "0x...",
"state_root": "0x...",
"domain_events": [],
"transactions": ["0x...", "0x..."]
}
}
eth_getBlockByHashβ
Returns block by block hash.
After privacy activation, this method remains public only for
header-only access. Setting fullTransactions=true is rejected because
full transaction metadata is not part of the post-fork public surface.
Parameters:
blockHashβ 32-byte block hash (hex)fullTransactionsβtrueorfalse
eth_getTransactionByHashβ
Returns transaction by hash.
After privacy activation, this method is disabled on the public RPC surface because transaction metadata remains private.
Parameters:
transactionHashβ 32-byte tx hash (hex)
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"hash": "0x...",
"from": "0x...",
"to": "0x...",
"value": "0x...",
"gas": "0x...",
"gasPrice": "0x...",
"input": "0x...",
"blockNumber": "0x...",
"blockHash": "0x..."
}
}
eth_getTransactionReceiptβ
Returns transaction receipt by hash.
After privacy activation, this method is disabled on the public RPC surface because receipt metadata and logs remain private.
Parameters:
transactionHashβ 32-byte tx hash (hex)
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"transaction_hash": "0x...",
"block_hash": "0x...",
"block_number": "0x...",
"transaction_index": "0x0",
"status": "0x1",
"gas_used": "0x...",
"output": "0x...",
"logs": [],
"contract_address": "0x..."
}
}
eth_getLogsβ
Returns logs matching a filter.
Parameters:
filterObjectβ{ fromBlock?, toBlock?, address?, topics? }
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getLogs","params":[{"fromBlock":"0x0","toBlock":"latest","address":"0x63f7a64db6d2b965189b8b48b7435668021f6b17"}],"id":1}'
eth_sendTransactionβ
Sends a transaction signed by the node.
Parameters:
transactionObjectβ{ from, to?, value?, gas?, gasPrice?, data? }
eth_sendRawTransactionβ
Sends a pre-signed raw transaction.
Mersennet accepts both standard Ethereum RLP-encoded transactions (EIP-155) and its own custom binary format. MetaMask-signed transactions work natively.
Parameters:
signedTransactionDataβ Hex-encoded signed transaction
eth_getUncleCountByBlockNumberβ
Returns "0x0" (Mersennet uses BFT consensus with no uncles).
Parameters:
blockNumberβ Block number (hex) or"latest"
eth_getUncleCountByBlockHashβ
Returns "0x0" (no uncles in BFT consensus).
Parameters:
blockHashβ Block hash (hex)
Filter Methodsβ
Mersennet supports stateful log/block/tx filters for polling-based event subscription.
eth_newFilterβ
Creates a new log filter.
Parameters:
filterObjectβ{ fromBlock?, toBlock?, address?, topics? }
Returns: Filter ID (hex string)
eth_newBlockFilterβ
Creates a filter that notifies when new blocks arrive.
Parameters: None
Returns: Filter ID (hex string)
eth_newPendingTransactionFilterβ
Creates a filter that notifies when new pending transactions arrive.
Parameters: None
Returns: Filter ID (hex string)
eth_getFilterChangesβ
Polling method for a filter. Returns changes since last poll.
Parameters:
filterIdβ Filter ID frometh_newFilter,eth_newBlockFilter, oreth_newPendingTransactionFilter
eth_getFilterLogsβ
Returns all logs for a log filter (equivalent to eth_getLogs with the filter's params).
Parameters:
filterIdβ Filter ID frometh_newFilter
eth_uninstallFilterβ
Destroys a filter. Returns true if the filter existed.
Parameters:
filterIdβ Filter ID (hex string)
Network Methodsβ
net_versionβ
Returns the network ID as a string ("7919").
Parameters: None
net_peerCountβ
Returns the number of connected peers.
Parameters: None
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"net_peerCount","params":[],"id":1}'
net_listeningβ
Returns true if the node is actively listening for network connections.
Parameters: None
web3_clientVersionβ
Returns the client version string.
Parameters: None
Response:
{ "jsonrpc": "2.0", "id": 1, "result": "Mersennet/0.1.0" }
Transaction Poolβ
txpool_statusβ
Returns the number of pending and queued transactions in the mempool.
Parameters: None
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"txpool_status","params":[],"id":1}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": { "pending": "0x3", "queued": "0x0" }
}
MersennetβSpecific Methodsβ
These methods mirror their eth_ counterparts but use Mersennet's native format.
prime_chainIdβ
Same as eth_chainId.
prime_blockNumberβ
Same as eth_blockNumber.
prime_getBalanceβ
Same as eth_getBalance.
prime_gasPriceβ
Same as eth_gasPrice.
prime_getCodeβ
Same as eth_getCode.
prime_getStorageAtβ
Same as eth_getStorageAt.
prime_getTransactionCountβ
Same as eth_getTransactionCount.
prime_callβ
Same as eth_call.
prime_getBlockByNumberβ
Same as eth_getBlockByNumber, using Mersennet block format.
prime_getTransactionReceiptβ
Same as eth_getTransactionReceipt.
prime_getTransactionByHashβ
Same as eth_getTransactionByHash.
prime_sendTransactionβ
Same as eth_sendTransaction.
prime_getLogsβ
Same as eth_getLogs.
prime_validatorsβ
Returns the list of active validators and their stake.
Parameters: None
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"prime_validators","params":[],"id":1}'
prime_getDomainEventsβ
Returns domain events (CLOB fills, bridge operations, validator changes) for a block range.
Parameters:
filterObjectβ{ fromBlock, toBlock, domain?, kind? }
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"prime_getDomainEvents","params":[{"fromBlock":"0x0","toBlock":"latest"}],"id":1}'
PrimeOrders CLOB Methodsβ
The native order book engine accessible via RPC. The CLOB precompile is at address 0x0000000000000000000000000000000000000100.
primeorders_addMarketβ
Register a new trading market on the CLOB.
Parameters:
symbolβ Market symbol string (e.g."PRIM/USDC")tickSizeβ Minimum price increment (hex)lotSizeβ Minimum order size (hex)
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"primeorders_addMarket","params":["PRIM/USDC","0x01","0xde0b6b3a7640000"],"id":1}'
Response:
{ "jsonrpc": "2.0", "id": 1, "result": "0x1" }
The result is the assigned market ID.
primeorders_submitOrderβ
Submit a limit order to the CLOB.
Parameters:
orderObject:ownerβ Trader addressmarket_idβ Market ID (integer)sideβ"buy"or"sell"priceβ Limit price (hex)sizeβ Order size (hex)tifβ Time-in-force:"gtc"(Good-Til-Cancel),"ioc"(Immediate-or-Cancel),"fok"(Fill-or-Kill)
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"primeorders_submitOrder","params":[{"owner":"0x7f5ce38fb2553e95dd8ef9182a80bc219c9a0d45","market_id":2,"side":"buy","price":"0xfde8","size":"0x64","tif":"gtc"}],"id":1}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"order_id": "0x42",
"filled": "0x0",
"remaining": "0x64",
"trades": []
}
}
If the order crosses existing resting orders, trades will contain fill details and filled will be non-zero.
primeorders_cancelOrderβ
Cancel an open order.
Parameters:
orderIdβ Order ID (hex string)
Returns: true on success.
primeorders_getOrderBookβ
Get the current order book for a market.
Parameters:
marketIdβ Market ID (hex string)
curl -X POST http://46.225.30.187:8545 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"primeorders_getOrderBook","params":["0x2"],"id":1}'
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"bids": [
{ "price": "0xfde8", "size": "0x64" }
],
"asks": [
{ "price": "0xfe0c", "size": "0xc8" }
]
}
}
Bids are sorted ascending (best bid last), asks are sorted ascending (best ask first).
primeorders_getOpenOrdersβ
Get all open orders for a specific address.
Parameters:
addressβ Trader address (hex)
primeorders_depositCollateralβ
Deposit collateral for margin trading.
Parameters:
addressβ Account addressamountβ Amount in wei (hex)
primeorders_setMarginParamsβ
Set margin parameters for a market.
Parameters:
paramsObjectβ{ initialMarginBps, maintenanceMarginBps }
primeorders_isLiquidatableβ
Check if an account's position can be liquidated.
Parameters:
addressβ Account address
primeorders_liquidateβ
Liquidate an under-collateralized position.
Parameters:
addressβ Account to liquidate
PrimeBridge Methodsβ
Cross-domain bridge between the EVM execution environment and the PrimeOrders CLOB.
primebridge_enqueueOrdersToEvmβ
Queue an asset transfer from the CLOB domain to the EVM domain.
Parameters:
bridgeObjectβ{ from, to, amount }
primebridge_enqueueEvmToOrdersβ
Queue an asset transfer from the EVM domain to the CLOB domain.
Parameters:
bridgeObjectβ{ from, to, amount }
primebridge_dequeueOrdersToEvmβ
Process pending bridge transfers from CLOB to EVM.
Parameters: None
primebridge_dequeueEvmToOrdersβ
Process pending bridge transfers from EVM to CLOB.
Parameters: None
Active Marketsβ
The following CLOB markets are registered on the testnet:
| Market ID | Symbol | Description |
|---|---|---|
| 2 | PRIM/USDC | PRIM priced in USDC |
| 3 | PRIM/USDT | PRIM priced in USDT |
| 4 | PRIM/DAI | PRIM priced in DAI |
| 5 | BTC/USDC | BTC priced in USDC |
| 6 | ETH/USDC | ETH priced in USDC |
Method Summaryβ
| Namespace | Count | Description |
|---|---|---|
eth_ | 30 | Standard Ethereum JSON-RPC |
net_ | 3 | Network status |
web3_ | 1 | Client info |
txpool_ | 1 | Mempool status |
prime_ | 15 | Mersennet native equivalents |
primeorders_ | 9 | CLOB order book engine |
primebridge_ | 4 | Cross-domain bridge |
| Total | 63 |