RPC reference

Small requests. Important differences.

A focused method map for the Ethereum, Solana, and Bitcoin examples used throughout this site.

Compare the question, not just the envelope

These examples describe upstream network APIs. Similar request envelopes do not make their methods or results interchangeable. Use the official references alongside the network guides before implementing a real client.

NetworkMethodPurposeContext to preserve
Ethereumeth_chainIdNetwork identityExpected chain configuration
Ethereumeth_getBalanceNative balanceAddress, wei, block reference
SolanagetBalanceNative balancePublic key, lamports, context
SolanagetSlotObserved slotCluster and commitment policy
BitcoingetblockchaininfoNode chain contextConfigured node and network
BitcoingettxoutInspect an unspent outputTransaction, index, mempool option
your-next-build / request.json

READ-ONLY EXAMPLE / eth_getBalance

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBalance",
  "params": [
    "0x0000000000000000000000000000000000000000",
    "latest"
  ]
}
Example only · no live request

Response handling checklist

Check HTTP status, JSON parsing, RPC error fields, expected identifiers, and method-specific result types. Do not assume that a successful HTTP response means the requested method returned a usable result.

About protocol versions

The Bitcoin sample uses a legacy-compatible JSON-RPC 1.0 envelope. Ethereum and Solana samples use JSON-RPC 2.0. Check your node version and provider contract instead of forcing one protocol declaration onto every source.

Upstream references

Verify exact method details in the Ethereum RPC reference, Solana RPC documentation, and Bitcoin RPC reference.

Your next idea starts here. ✨

Pick a network. Understand the request. Build something good.

Open the quickstart