One local fast path, five EVM networks
Use standard JSON-RPC, simulate a transaction before your bot signs it, and receive confirmed contract logs without polling every block.
Five isolated networks
Ethereum, Base, Arbitrum, Optimism, and Polygon have separate routes, WebSockets, cache keys, and persisted local state.
Read and simulate
Preview return data, gas, and access lists. Transaction submission remains disabled by default.
Signed callbacks
Pro log webhooks use stable event IDs and HMAC signatures so your receiver can authenticate and deduplicate retries.
HTTP routes
Ethereum /api/v1/rpc Base /api/v1/base/rpc Arbitrum /api/v1/arbitrum/rpc Optimism /api/v1/optimism/rpc Polygon /api/v1/polygon/rpc
Install the SDK
npm install @rpc-relay/sdk
import { createRpcRelayClient } from '@rpc-relay/sdk';
const relay = createRpcRelayClient(); // http://127.0.0.1:8545
const block = await relay.request({ method: 'eth_blockNumber', params: [] });
const preview = await relay.simulateTransaction({ from, to, data, value: '0x0' });
Simulate without submitting
curl http://127.0.0.1:8545 \
-H 'content-type: application/json' \
--data '{"jsonrpc":"2.0","id":1,"method":"rpc_relay_simulateTransaction","params":[{"from":"0x...","to":"0x...","data":"0x..."},"latest"]}'The response includes success, returnData, gasEstimate, an access list when supported, and per-step errors. It always reports submitted: false.
Create a confirmed-log webhook
curl https://rpc-cache-worker.rpc-relay-cache.workers.dev/api/webhooks \
-H "Authorization: Bearer $PRO_TOKEN" \
-H 'content-type: application/json' \
--data '{"chain":"base","callback_url":"https://bot.example/webhook","address":"0x...","topics":["0x..."]}'Store the returned signing secret once. Deliveries include X-RPC-Relay-Event-Id and X-RPC-Relay-Signature: sha256=.... Compute HMAC-SHA256 over the exact raw request body, compare signatures in constant time, and deduplicate by event ID before processing.
Trace methods
Pro forwards debug_traceCall, debug_traceTransaction, trace_call, and trace_transaction. Availability and response shape depend on the selected upstream; unsupported methods return an explicit JSON-RPC error.
Security boundary
Warm hits remain on the device. Miss padding reduces simple request correlation but does not make upstream traffic invisible. RPC Relay never asks the SDK or MCP server for wallet keys, and simulation does not authorize a transaction.