eth_getProof

Returns the account- and storage-values of the specified account including the Merkle-proof.

Request

curl 'https://rpc.web3api.io?x-api-key=YOUR-API-KEY' \
    -X POST \
    -H 'x-amberdata-blockchain-id: ethereum-mainnet' \
    -d '{"jsonrpc":"2.0","id":1,"method":"eth_getProof","params":["0x1234567890123456789012345678901234567890",["0x0000000000000000000000000000000000000000000000000000000000000000","0x0000000000000000000000000000000000000000000000000000000000000001"],"latest"]}'
IndexDescription
0 - addressThe address of the account or contract.
1 - storageKeysThe array of storage-keys which should be proofed and included. See eth_getStorageAt.
2 - blockNumberThe integer block number, or the string "latest" or "earliest", see the default block parameter.

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "address": "0x1234567890123456789012345678901234567890",
        "accountProof": [
            "0xf9021...",
            "0xf9021...",
            "0xf9021...",
            "0xf9021...",
            "0xf9021...",
            "0xf9021...",
            "0xf8518...",
            "0xf871a...",
            "0xf86e9...0"
        ],
        "balance": "0xe55346d49c50e0b5",
        "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
        "nonce": "0x0",
        "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "storageProof": [
            {
                "key": "0x0000000000000000000000000000000000000000000000000000000000000000",
                "value": "0x0",
                "proof": []
            },
            {
                "key": "0x0000000000000000000000000000000000000000000000000000000000000001",
                "value": "0x0",
                "proof": []
            }
        ]
    }
}
FieldDescription
resultAn account object.
addressThe address of the account or contract.
accountProofArray of rlp-serialized MerkleTree-Nodes, starting with the stateRoot-Node, following the path of the SHA3 (address) as key.
balanceThe balance of the account. See eth_getBalance.
codeHashThe hash of the code of the account. For a simple Account without code it will return "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470".
nonceThe nonce of the account. See eth_getTransactionCount.
storageHashThe SHA3 of the StorageRoot. All storage will deliver a MerkleProof starting with this rootHash.
storageProofArray of storage-entries as requested.
keyThe requested storage key.
valueThe storage value proof.
proofArray of rlp-serialized MerkleTree-Nodes, starting with the storageHash-Node, following the path of the SHA3 (key) as path.