eth_getProof
https://api.triport.io/v1/ethereumReturns the Merkle-Patricia proof for an account and, optionally, a set of its storage slots at a given block, per EIP-1186.
eth_getProof returns a cryptographic proof that an account — and the storage
slots you ask for — held specific values at a specific block. The proof is the
list of Merkle-Patricia trie nodes from the state root down to the account, and
from each storage root down to the requested slot, as standardized in
EIP-1186.
Use it when you need to verify on-chain state against a trusted block header without trusting the RPC node itself — for example in light clients, L2 fraud/validity proofs, cross-chain bridges, or any system that checks account balances and storage values against a known state root.
This is a pro-tier method. It is heavier than ordinary reads, so it carries a
lower rate limit than eth_getBalance / eth_getStorageAt. Request only the
storage keys you actually need to verify — every extra key adds another proof
branch to compute and return.
Parameters
Positional array of three elements:
addressstring (20-byte hex, 0x-prefixed)requiredstorageKeysstring[] (32-byte hex each)required[] for an account-only proof.blockstringrequired0x10d4f) or a tag: latest, earliest, pending, safe, finalized.Response
Response fields
| Field | Type | Description |
|---|---|---|
address | string | The account address the proof is for. |
accountProof | string[] | RLP-encoded Merkle-Patricia trie nodes from the state root to the account, in order. |
balance | string (hex) | The account balance in wei at the requested block. |
codeHash | string | Keccak-256 hash of the account's code (0xc5d2…a470 for accounts with no code). |
nonce | string (hex) | The account nonce. |
storageHash | string | Root hash of the account's storage trie; the root the storageProof entries verify against. |
storageProof | object[] | One entry per requested storage key. |
storageProof[].key | string | The requested storage key. |
storageProof[].value | string (hex) | The value stored at that key (0x0 if empty). |
storageProof[].proof | string[] | RLP-encoded trie nodes from storageHash down to the slot. |
Errors
| Code | Meaning | When it happens |
|---|---|---|
-32002 | tier_insufficient | Your key's tier is below pro; upgrade to pro or business. |
-32003 | rate_limited | You exceeded your tier's RPS (5 on pro, 15 on business). Back off and retry. |
-32602 | invalid_params | Malformed address, non-32-byte storage key, or unknown block tag. |
See the shared error envelope reference for the full error object shape and handling guidance.
Examples
JavaScript (fetch)
const res = await fetch("https://api.triport.io/v1/ethereum", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
jsonrpc: "2.0",
id: 1,
method: "eth_getProof",
params: [
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
["0x0000000000000000000000000000000000000000000000000000000000000000"],
"latest",
],
}),
});
const { result } = await res.json();
console.log(result.balance, result.storageHash);TypeScript SDK (@triport/sdk)
import { Triport } from "@triport/sdk";
const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });
const proof = await triport.ethereum.rpc("eth_getProof", [
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
["0x0000000000000000000000000000000000000000000000000000000000000000"],
"latest",
]);
console.log(proof.accountProof.length, proof.storageProof[0].value);Python (triport-sdk)
import os
from triport import Triport
triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])
proof = triport.ethereum.rpc(
"eth_getProof",
[
"0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",
["0x0000000000000000000000000000000000000000000000000000000000000000"],
"latest",
],
)
print(proof["balance"], proof["storageHash"])Notes
- Pass
[]forstorageKeyswhen you only need to prove account-level fields (balance,nonce,codeHash);storageProofthen comes back empty. - To verify a proof, hash the account header against the block's
stateRoot(frometh_getBlockByNumber) and each storage slot against the returnedstorageHash. - For non-verified single-value reads, the lighter free-tier methods
eth_getBalanceandeth_getStorageAtare cheaper and faster. - Proofs are only retained for full archival history on the
businesstier; proofs against very old blocks may be unavailable on lower tiers.