L0vdL0vd

eth_getProof

Returns the account and storage values of an address with Merkle proofs (EIP-1186).

L0vd nodes run Erigon, which serves proofs for recent blocks only. For an old block the node returns an error; read historical values with eth_getStorageAt or eth_getBalance instead.

curl https://eth.l0vdinfra.com/YOUR_KEY \
  -X POST \
  -H "Content-Type: application/json" \
  --data '{"jsonrpc":"2.0","id":1,"method":"eth_getProof","params":["0xdAC17F958D2ee523a2206206994597C13D831ec7",["0x0000000000000000000000000000000000000000000000000000000000000000"],"latest"]}'

响应示例

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
    "accountProof": [
      "0xf90211a0a0e361273ad804646faf1981ae5c1f588b26e1495a77682b2311b493e56c770fa070d489a72fb56e23c25d3e43743abe697114d6e8f68c64292bc9174491f1e5dba0b42323bed6fd5a233e7f959f75d9becbc81ea8e357c0acee8665fa495ef0…",
      "0xf90211a0156aeb2853dbb3129ca2679a043a312c525d6c7398a373754ff1e097bd81f3e6a064cfd77d568a3f7a376d8a7fc8314770fa7311a6a057a293a891e456b5fe93cea03a40c7151a92804ad31be763104189817d1906f63c2a652636509431a406…"
    ],
    "balance": "0x2a",
    "codeHash": "0xb44fb4e949d0f78f87f79ee46428f23a2a5713ce6fc6e0beb3dda78c2ac1ea55",
    "nonce": "0x1",
    "storageHash": "0xfbc23860eb63922f666464ecff027138340ead6e3e19e079515bc876d1b5e16e",
    "storageProof": [
      {
        "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
        "value": "0xc6cde7c39eb2f0f0095f41570af89efc2c1ea828",
        "proof": [
          "0xf90211a0511d53be49ea8b255d78d37232f8d31b67793fbb6d1f90c65f0a6c47d9bbc400a033595ed5968045733620f684b0b259d7918df865421360d3dec41991726fa14aa035a2d6bebdaab3bd879e1ac531f7cdec29caf4606d9da5f5be05ec9a7293…",
          "0xf90211a00aaa3de37a6e7801d8b69f064dc50cf7a24f21cdf86bea0f0606d0c69e4fdfa1a05c26114ca4e9803b5fa7068739bb57ae73d218ce455e4c6c05ae7616b7625c5aa086bc794263851416196aea3146ce8b1d6a7177d8ccfcf593210702c36387…"
        ]
      }
    ]
  }
}

示例中较长的数组和十六进制字符串已截断。

参数与您的端点

参数

addressstring必填
20-byte address, hex encoded.
storageKeysarray必填
Storage slots to prove, each as a full 32-byte hex value (slot 0 is "0x" followed by 64 zeros). Short forms like "0x0" are rejected by some clients.
blockstring必填
Block number in hex (e.g. "0x1208a5f") or a tag: "latest", "safe", "finalized", "earliest" or "pending". L0vd endpoints run archive nodes, so any historical block works.

返回值

object Account proof object.

balancestring
Account balance, hex wei.
noncestring
Account nonce, hex.
codeHashstring
Hash of the account code.
storageHashstring
Root of the account's storage trie.
accountProofarray
RLP-encoded trie nodes from the state root to the account.
storageProofarray
Key, value and proof for each requested slot.

适用场景

Get an account and selected storage slots together with Merkle proofs against the block's state root (EIP-1186).

Used by bridges, light clients and auditors to prove a balance or storage value without trusting the RPC provider.

如何解读结果

accountProof is the list of trie nodes from the state root to the account; each storageProof entry proves one slot against storageHash.

Verify with the stateRoot from eth_getBlockByNumber for the same block.

提示

  • Proofs are large (several kilobytes per slot). Request only the slots you need.
  • Request proofs for recent blocks ("latest" or the last few thousand blocks). L0vd nodes run Erigon, which does not build proofs for old blocks.

相关方法