POST
/
efb0a5eccd2caa5135eb54eba6f7f300
curl --request POST \
  --url https://optimism-mainnet.core.chainstack.com/efb0a5eccd2caa5135eb54eba6f7f300 \
  --header 'Content-Type: application/json' \
  --data '{
  "jsonrpc": "2.0",
  "method": "eth_getProof",
  "id": 1,
  "params": [
    "0x548Da0F6b0AFD0094F735503D44e79a3769980Fd",
    [
      "0xf6e506a9cbe7546a796b187c40609a170ea8073e047129a3cae1c38e6d7559b7"
    ],
    "latest"
  ]
}'
{
  "jsonrpc": "<string>",
  "id": 123,
  "result": {
    "accountProof": [
      "<string>"
    ],
    "balance": "<string>",
    "codeHash": "<string>",
    "nonce": "<string>",
    "storageHash": "<string>",
    "storageProof": [
      {
        "key": "<string>",
        "value": "<string>",
        "proof": [
          "<string>"
        ]
      }
    ]
  }
}

Optimism API method eth_getProof retrieves the account and storage values of the specified account, including the Merkle-proof. This method is used to verify the data without needing the entire state on the client side.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • address — the address of the account.
  • storageKeys — an array of storage keys to prove.
  • block — the block number (in hexadecimal) or one of the strings "earliest", "latest", or "pending", indicating the state to consider. The default is "latest".

Response

  • result — an object containing the account proof, balance, code hash, nonce, storage hash, and storage proof for each requested storage key.

Use case

The eth_getProof method is essential for:

  • Applications that need to verify account or contract state without syncing the entire blockchain.
  • Services that provide cryptographic proofs of specific data to third parties.
  • Tools that audit the state of accounts or contracts at specific block heights.

Body

application/json
jsonrpc
string
default:2.0
required
method
string
default:eth_getProof
required
id
integer
default:1
required
params
array
required

Response

200 - application/json
Account and storage values of the specified account including the Merkle-proof
jsonrpc
string
id
integer
result
object