Ethereum

Ethereum

eth_getProof

eth_getProof (EIP-1186) returns an account's core fields — balance in ETH wei, nonce, codeHash, storageHash — together with the Merkle-Patricia trie proof that ties them to the block's stateRoot, plus proofs for any storage slots you ask about. Ethereum stores all account and storage state in Merkle-Patricia tries, and this method gives you the chain of RLP-encoded trie nodes from the leaf up to the root. With that, anyone holding only a trusted block header can verify a balance or slot value without trusting the node that served it. Call it on mainnet (chain ID 1) at https://ethereum.therpc.io/YOUR_API_KEY. The accountProof and storageProof arrays it returns are the cryptographic witness; the bare values without the proof are what eth_getBalance or eth_getStorageAt give you.

Use cases

  • Verify a balance or storage value trustlessly in a light client or a cross-chain bridge contract — the proof checks against the stateRoot in the header, so a lying node can't forge it.
  • Build the state witnesses that L2 fraud proofs and validity proofs lean on when settling a dispute back on Ethereum L1.
  • Feed state into stateless-client and verkle-trie experiments, where execution carries its own proof of the state it touched rather than a full copy of the trie.
  • Audit a token's supply or a treasury balance by proving the exact storage slot value at a known block hash, so the figure is independently checkable rather than taken on trust.

Parameters

#NameTypeRequiredDescription
1addressstring (hex)YesThe account to generate proofs for.
2storageKeysarray of string (hex)YesStorage slots to include in the storage proof.
3blockTagstringNoBlock at which to generate the proof.Default: latest

Response

TypeDescription
objectObject containing: address, balance (hex wei), codeHash (hex), nonce (hex), storageHash (hex), accountProof (array of hex-encoded RLP trie nodes), storageProof (array of {key, value, proof} objects).

Example request

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getProof",
"params": [
"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
[],
"latest"
],
"id": 1
}'

Try it live in the Ethereum playground.

Errors & troubleshooting

CodeMessageCause
-32602Invalid paramsAddress malformed or a storage key is not 32 bytes.
-32000Missing trie nodeBlock is too old and the node has pruned state (non-archive node).

Common pitfalls

  • The proof is only useful if you actually verify it, which means implementing Merkle-Patricia trie traversal and Keccak-256 hashing of each node. If you don't need trustless verification, eth_getStorageAt and eth_getBalance give you the raw values with none of that machinery.
  • State proofs need the state to still exist. At an old height a pruned full node has discarded it and returns a -32000 missing-trie-node error; you need an archive node to prove historical state.
  • A proof proves nothing on its own — you must hash the accountProof chain up to a root and check it equals the stateRoot from a block header you already trust. Skip that step and you've verified nothing.

Supported networks

  • Mainnet — Chain ID: 1
  • Sepolia — Chain ID: 11155111

See also

Parameters

0x-prefixed 20-byte address

array of 32-byte hex slot indices, may be empty []

hex block number or "latest"/"earliest"/"pending"/"safe"/"finalized"

curl https://ethereum.therpc.io/YOUR_API_KEY \
-X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getProof","params":["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",[],""]}'

Ready to call this in production?

Free tier covers personal projects. Pay-as-you-go scales without a card.