Skip to main content
POST
eth_getProof
curl --request POST \
  --url https://rpc.testnet.tempo.xyz/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "params": [
    "0x20c0000000000000000000000000000000000000",
    [
      "0x0"
    ],
    "latest"
  ],
  "id": 1
}
'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {}
}
Tempo API method that returns the Merkle proof for an account and optionally some storage keys. This is useful for verifying account state without trusting the node.

Parameters

  • address — the address to get the proof for
  • storageKeys — array of storage positions to prove (hex strings)
  • blockParameter — the block number (hex) or tag (latest, earliest, pending)

Response

  • result — the proof object:
    • address — the account address
    • accountProof — array of RLP-encoded Merkle Patricia trie nodes from state root to account
    • balance — the account balance
    • codeHash — the hash of the account code
    • nonce — the account nonce
    • storageHash — the hash of the storage trie root
    • storageProof — array of storage proofs, one per requested key:
      • key — the storage key
      • value — the storage value
      • proof — array of RLP-encoded trie nodes from storage root to value

eth_getProof code examples

const ethers = require('ethers');
const NODE_URL = "CHAINSTACK_NODE_URL";
const provider = new ethers.JsonRpcProvider(NODE_URL);

// pathUSD token address
const PATHUSD = "0x20c0000000000000000000000000000000000000";

const getProof = async () => {
    // Get proof for storage slot 0 (often totalSupply)
    const proof = await provider.send("eth_getProof", [
      PATHUSD,
      ["0x0", "0x1"],
      "latest"
    ]);

    console.log(`Account: ${proof.address}`);
    console.log(`Balance: ${proof.balance}`);
    console.log(`Nonce: ${parseInt(proof.nonce, 16)}`);
    console.log(`Code Hash: ${proof.codeHash}`);
    console.log(`Storage Hash: ${proof.storageHash}`);

    console.log(`\nAccount Proof nodes: ${proof.accountProof.length}`);

    for (const sp of proof.storageProof) {
      console.log(`\nStorage Key: ${sp.key}`);
      console.log(`  Value: ${sp.value}`);
      console.log(`  Proof nodes: ${sp.proof.length}`);
    }
  };

getProof();

Body

application/json
jsonrpc
string
default:2.0
method
string
default:eth_getProof
params
any[]

Address, storage keys array, and block parameter

id
integer
default:1

Response

200 - application/json

Account and storage proof

jsonrpc
string
id
integer
result
object

Proof object with account proof and storage proofs