TriportRPC

eth_getProof

POSThttps://api.triport.io/v1/ethereum

Returns the Merkle-Patricia proof for an account and, optionally, a set of its storage slots at a given block, per EIP-1186.

Ethereumeth_getproofpro (5 RPS), business (15 RPS)

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)required
The account address to prove.
storageKeysstring[] (32-byte hex each)required
Storage slot keys to prove. Pass [] for an account-only proof.
blockstringrequired
Block number as hex (e.g. 0x10d4f) or a tag: latest, earliest, pending, safe, finalized.

Response

Response fields

FieldTypeDescription
addressstringThe account address the proof is for.
accountProofstring[]RLP-encoded Merkle-Patricia trie nodes from the state root to the account, in order.
balancestring (hex)The account balance in wei at the requested block.
codeHashstringKeccak-256 hash of the account's code (0xc5d2…a470 for accounts with no code).
noncestring (hex)The account nonce.
storageHashstringRoot hash of the account's storage trie; the root the storageProof entries verify against.
storageProofobject[]One entry per requested storage key.
storageProof[].keystringThe requested storage key.
storageProof[].valuestring (hex)The value stored at that key (0x0 if empty).
storageProof[].proofstring[]RLP-encoded trie nodes from storageHash down to the slot.

Errors

CodeMeaningWhen it happens
-32002tier_insufficientYour key's tier is below pro; upgrade to pro or business.
-32003rate_limitedYou exceeded your tier's RPS (5 on pro, 15 on business). Back off and retry.
-32602invalid_paramsMalformed 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 [] for storageKeys when you only need to prove account-level fields (balance, nonce, codeHash); storageProof then comes back empty.
  • To verify a proof, hash the account header against the block's stateRoot (from eth_getBlockByNumber) and each storage slot against the returned storageHash.
  • For non-verified single-value reads, the lighter free-tier methods eth_getBalance and eth_getStorageAt are cheaper and faster.
  • Proofs are only retained for full archival history on the business tier; proofs against very old blocks may be unavailable on lower tiers.