JSON-RPC Overview
OXN exposes a standard Ethereum-compatible JSON-RPC API. Every SDK, wallet, and tool that speaks Ethereum JSON-RPC can talk to OXN with only an endpoint URL change.
Endpoint
| Protocol | URL |
|---|---|
| HTTPS | https://rpc.bout.network |
WebSocket endpoint for subscriptions: see WebSocket Subscriptions.
Authentication
The public endpoint requires no authentication. Requests are rate-limited per source IP — see Rate Limits.
Request format
Standard JSON-RPC 2.0 over HTTP POST:
curl -X POST https://rpc.bout.network \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_chainId",
"params": [],
"id": 1
}'
Response:
{
"jsonrpc": "2.0",
"result": "0xba",
"id": 1
}
Error codes
Follows standard JSON-RPC error semantics:
| Code | Meaning |
|---|---|
-32700 | Parse error (malformed JSON) |
-32600 | Invalid request |
-32601 | Method not found |
-32602 | Invalid params |
-32603 | Internal error |
-32000 | (Reserved for server errors) |
3 | Execution reverted (Ethereum convention) |
Error responses look like:
{
"jsonrpc": "2.0",
"error": { "code": 3, "message": "execution reverted: not authorized" },
"id": 1
}
Batch requests
Multiple requests can be sent in a single HTTP POST as a JSON array:
[
{ "jsonrpc": "2.0", "method": "eth_blockNumber", "params": [], "id": 1 },
{ "jsonrpc": "2.0", "method": "eth_gasPrice", "params": [], "id": 2 }
]
Response is an array with results in the same order. Batch size is limited — the public endpoint may reject batches over a certain count. As a rule, keep batches to 25 or fewer.
Method categories
eth_*— standard Ethereum methods for accounts, blocks, transactions, calls. Full list: Ethereum-Compatible Methods.net_*— network identification (net_version,net_listening).web3_*— client identification (web3_clientVersion).debug_*— trace and diagnostic methods, partially supported.- OXN-specific methods — extensions for confidential-call construction. See OXN-Specific Methods.
From ethers.js / viem
You do not have to construct raw JSON-RPC yourself. Every SDK handles it:
import { ethers } from "ethers";
const provider = new ethers.JsonRpcProvider("https://rpc.bout.network");
const chainId = (await provider.getNetwork()).chainId; // 186n
const gasPrice = (await provider.getFeeData()).gasPrice;
For encrypted calls, wrap the provider — see TypeScript SDK.