eth_getProof

Returns the account and storage values of the specified account including the Merkle-proof. This call can be used to verify that the data you are pulling from is not tampered with.

Parameters

  1. DATA, 20 Bytes - address of the account. REQUIRED

  2. ARRAY, 32 Bytes - an array of storage-keys that should be proofed and included. See eth_getStorageAt

  3. QUANTITY|TAG - integer block number, or the string "latest" or "earliest", see the default block parameter

Returns

Object - A account object:

  • balance: QUANTITY - the balance of the account. Seeeth_getBalance

  • codeHash: DATA, 32 Bytes - hash of the code of the account. For a simple Account without code it will return "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"

  • nonce: QUANTITY, - nonce of the account. See eth_getTransactionCount

  • storageHash: DATA, 32 Bytes - SHA3 of the StorageRoot. All storage will deliver a MerkleProof starting with this rootHash.

  • accountProof: ARRAY - Array of rlp-serialized MerkleTree-Nodes, starting with the stateRoot-Node, following the path of the SHA3 (address) as key.

  • storageProof: ARRAY - Array of storage-entries as requested. Each entry is an object with these properties:

    • key: QUANTITY - the requested storage key

    • value: QUANTITY - the storage value

    • proof: ARRAY - Array of rlp-serialized MerkleTree-Nodes, starting with the storageHash-Node, following the path of the SHA3 (key) as path.

Example

Request

curl --request POST \
     --url https://endpoints.omniatech.io/v1/RPC_ENDPOINT \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
    "jsonrpc":"2.0",
    "method":"eth_getProof",
    "params":["0x7F0d15C7FAae65896648C8273B6d7E43f58Fa842",["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"],"latest"],
    "id":1
}
'

Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "address": "0x7f0d15c7faae65896648c8273b6d7e43f58fa842",
        "accountProof": [
            "0xf90211a02fc15d4c68a4ad02dfc51b4e4f30eb0aeb246aa43bdd3062e1d4eef602c84eeca06f0f8375607e337ba12c00d074383c79387c0116a76b915d7d9975f0e59c8770a0230e6cf36da8966845ddfcde1878bc51f892b0b279c507140461a21396decfafa08d26cc53d876043cd4836d40df7c97f5ce37d21b5af10069d5adc8014bdf5da7a0be54bac27145c3b67e8f36fb0ddd8e09e3ed326bb9386bfabc7181cc67e9a7e2a06b46918e7188af10e0f742ba03178dba0fe4b664aa6989a3087be6a4f1cedf39a03397313377bd5c329ef76be72544480e017492aafd1d6d2af4b785c75d1614afa0a387f86581aa272e700766c6873b5c62e4ced032c518ecdad5b4c3335ed89ea3a0bf2a8f5daefc9cc9139a852e9821da062386fbfa8bf90ea8460d83f934ff2217a0a5046c96da5d921b748c2be085df0f3bb304706d745bcbbaa8971ecb47c9c1d3a0933cd40363c46cb884def0910afdaaa73f2c5b6a971ad6aafcaeb3713fe7fc77a0f21d7502417571d83e0051aa89a22a9f5db3ed28a156cbed4c834ea6dffb143ea04bc008dff73230d7486ec7e5ee5cebaef0299392c896ac2db5f0b185e9671e38a01b30f2422f319d8fe1b2aa683150eddd70dc20e37ef26c1735310cbfb41efbfba03d1865427b072ade378bd827cd583820f6429156634503bc1725e0cd566742d2a07c746810a754aaff92701c06ed6fa9863a74a926b711ef501f4991eda79de42980",
            "0xf90211a068f32d6d7be310ff91ef5f5d87942a75da676d6926a2b0f08f0e75ad7d1c3bdca009a16734079febfe9ce97f0163b755ef0ff3038a4bd57215834285e2da6ed47da0928587011b7b11befc260c6c70318af8fd48e95beb9bb6260efeabd1577ec059a092dcab8930458eae86597c32b7ff02db1c32ea374c88f28cb40599e7dbbbdd87a08570b89be0304e8d95aa39e31fcad3d586c4e3b51301d9725a49fc9bb7d91487a0bfd9d6a0d5916475cfe5d19efd8d10ce2a561d64b882bd217279867945b97f8aa003d30f0ff021361287f95e78a51cbb439b64b533c88874d176ce658bfaada589a0c946248d6804c75357462afd7cb8f5a526c02a906ba3b8aa27aceb7513a2519da03d612f56aaf9aaddf6223b1faf7e28d7faf6a38af0a690db5b28ef22d7aac768a0e5d78bf0cdf67ef01dd033122800b3f87b699e9a962bc3fbea647b9cb7575f54a0c05bc8c5687fdbfc57205de7ca9024dd8064303f589f2fb94b8e85e40b9ad7a4a04238550152340e0fc8bcbecf1a7857d9845163157e10d585d29e0ed12b801246a03d5ca4840dc1b7dea2990fdf788db07fe69695cd60e37d3f80d7a3814cc55428a08b791892a8ec895d48547fd5b85962101d7f1ba23d47d5e1776c25e023891a1aa0e3d68c4880db3271a6831273bbae2f37111fe4bda712a4a21b356338273adf90a094c30c6f3a064928dc083147bf655d001918772d3ef71ee214d88fa533e8c77580",
            "0xf90211a03b779bc68e8d7ef4ac79867dd1411c1b59161d73bdb01407f5b517f86ed91843a01c62a131689b6319b3d4c0ea3a7c81fa8450873f820c32b76283628d30a74b18a0a2e07589e44b0a992f48555b3e2bcf0854d62899be00fa894aeedb68014921c0a0bc517e7bc83bace47d91660e112831e4b0dcb17a120a3db87f9394c28fc762eba0119e2ee871ec0972bf16425ef4c27f1e9413a404dab903debb024d0bff92553fa0815580f49ac6106cd67d24409e441323966567179f1ac7692ce6725a1fa50479a0ce8fb622b646834bd6a67a635326bc7345707e92af1a746850ccc6a4441160b6a05c49ef712bfc4f5ed0c7a32f2e500e8f45211097fa92f1972fb5bf7d200fe210a0aa4bc077e0d246482c19bf71e91b2e746910e7e2d23389939fd2038113c88992a07e00f5fb729f6e82e2623a0896dee11f368bf4ad67f111913c44e04e8f5f1ff6a04a005065b8412bb34792e5ee6f5c93039c81c04bd8497e07a79625a3be192a48a0fdf8b918b1700de6efde24bdfafa526a8c6363cc5968e5ff3913471cc15e47c9a032e582e4cf67c199899cc61190bb6afb633942c7607ae692c16c1634497f15f6a05eee8946aea51f41932011929b066e039d3024eaeaa7bcd01dbb9ec976e7c9c2a0b754855c84c1fbbf161bd264b992700cb44d13f35edafbd6ba33e4c011d72d94a093da6e700ce4260aba0702ec200f66c61290e4b1b75866137946babb0a2317de80",
            "0xf90211a022f6de99d3782e2f09ae6002686f874110f003885efec3560e7d1ab4bb7ace62a034d21603978a4103fb1447fefdc3b3b878762bc26c495305c3ef652a6675b60fa0049f4b30af24bc74d96a66e6cc3eb89c756b57a2463ae0c1ca58579fb760a4f5a09ae1d19e1ec0965a729343d847114e8cd2d45780d8f7fcaf25684680e31fdee0a0f71219e37d5ad564e67d8d22f48a39783f0486f703da9ae1e42a552ddf32cca6a000193f0fb93a912aa496533def6b395b6f47def956db81a58671ffeab6afc9bda0d95ddf822de993276525abe612d2a9cc37f48fbe1472d584390edd8bcfa9e90aa0f091f18b330e657d660a73c16d597f4985c2b567b17bf98c996443f3255300e9a06ee4724af8509fafe8e3d03715e7c1ce7cc56d16f77fb568b3c1fa8790d15a36a05e7fd0028fd6c1bed2d9bef9391e0e5b2b8f6a76c0828e378e4917c4f67584f1a017fadbf02ee3fe8eb31e5dd7f9da87871ff933d45be5edd11fb0362c5dbe20b1a028c1761bcbf7e63209bb5998470d0d7b946ec7c9f468b2ea5b9e3262b60d2313a02141d2ce04fa234e7dbfafac43b2e31734b1521471c9df85dd360cf28aeefc30a010706899ebcb80fb0787d7e35586269509bc78174bb06dd69c2e3535bd68fae4a027cc8ecfc3a49711c1957f56ca5488f700ffb228203ac7ffb96c3498038862f6a003db32ec2569fc138e8ae78127ecf4544eeece8f1e767c366c0b1cf6a5b9424980",
            "0xf90211a0fa7d7e47c40b208a0194812fd9a914591fb53268b283c8e0799ac15afd342fe8a05f728301e45a7cd83239cb37498840cb56ec0b0fedb2b29265172f91f57e36f4a088f21559ce5d6b18e1338e9d39f7738f61f55c87e2142254b2200aeaeaf35c91a08cd105716166f90ac8055e44d0eb6adc9548d9e6765b66f33f22cc04eb54964aa08b97a1cfaeb6bf2c0f4435b9d4904480f4f0fce6289171293bcf49d01bd02a86a0a3908598eb5c8caf4d0617bf247b8e03310e3534ca28b208453094fdcf822d1ca0f7776894fb6edbe4cbdd83ee8eb600aca7721a4a254223b1412acd0ea72b37c0a0dcea523e4ad6a92e2ae545c80cc2995dd617a835c547d0d3010804c9b2433732a01f2c7dc737e73cb685ed7c7453e3e0b1867687893b6f5b0cb6b8d1c0d675b547a0e111e3be73207e02fb1c08a5546d4413c56cfa2ac295a478c54330b560cc767da0458ef69d64ef91434095076f15199ab2adc6be6d0493bb37eca718dbba410842a054f67a48cc2a96c260de0222084b9233a3de4b2add87f6ef0d6a4d128743803ca0f8e1f8a2887a8f59e4487683d6eab8c08575e1b3966a4663b91534387daa27d5a03c79b337be774ef15f04e4393f3e418b599fe1d109e21fdfabc189261980a3b3a076ae52d26a3f44cdd9790594bf9399b6a43fceb3528f80f9aa0b23120bde3c36a0a41e87902efd8928abea6414781aa22f52ab183a21681edb308c6f1737fe4ddc80",
            "0xf90211a0b246f4bf2fd9514025ae2e808433e62bab194b6790af7ad8d7d186281df76722a0bed9429faf021959679e7c0d2bd09d4040ef6476a9ec80cb41e70c4af8946ebea00e5c88ea26113f0295d8c682f1526f2fa7906bc422bfe9cc8b8f869686e179d4a0b94a30e2218afad53a0eacc505ea552a8288457847fcae72555aac638b52c46ea0d6430dd23ef9889e1272e494530d6ec89f080c49bf09f8a6ac634b153fa8ce5ca0e8c4de149f9b385e51fb66516a4d91b62dbd80ddedd4522e14d370da47f63e5aa0fa40fc95a8bdd7126c4db03b0c1a20c654aa22cf6f72024c4a0925d6f29fc9baa036f9144068edd92dfe87ad4d07791274f581e64d2387ebcc80296c895d84dc42a06786a2292778a633b795798f28f9876b5ff496db2e6ae19ae3e79f698c890bf0a0d18e42474e815b62da57cf67bcd8ed1c90d4f8ecf8f6d0b2e66b9656be2686ada0e4dc3683f731f21c0c34a10d7ffac39b20a64ac326269433a5cacaeb90a8a17da0e3f8b04c275387c6222b6536967f2f1e6fc76dc6ee0e705d3e505f3d07e8bdd4a0e165791b28cadfb44915d52906238e2dfcc8cd3b9eca4536bed4aebc5f4cb79da022b542269e108a24dc0ed74e62fc571185dcf398acfbf15a7fb6ce3e8aba50d6a0f29369f8c3d70bc9f472c2175ab5495edcf35a65527f67d391068c0275284307a0c93bd89abbea5ae96496a12d236323d11d2da9cde7a3b9fdb15d504f4ea1eda680",
            "0xf90151a000595129cf1c67ce97ed615df7184fb47a0d018d9147a2a7952a639e464cdfd380a052081f67d885b439bee62a1c4e09c02a1ec729aef4d92be6584a29141a79c5c7a0d99cae2bc3b6fc3e8e2767b4d7a5884b9b2d9d20da7890318beefcdb9c7346d58080a0f63571735d99e763dafadb03d1abe3a93a98740ecddc8514d13df46a35a8d94680a081870f4697e57436ccdd8bdc1d624d7bc07861748ff8b3a352334df68f2c03ada0f0252504ee8753335ecf0ca1f73cf13d4505783ed5110bf4e9b384a68ad88f69a0d38a18ef7b993c9ad2d848453e7722c26998ff3d63e243b99cdab0dabf84157ea06e5ad479dbda7f1647ed613e35d837f5d2c697ef34160f3665173186553ee9c280a0bf8371cac505b6ea0cb0f67ef744713f306a2455f3f8844cfa527c62db59c69980a0d6d689405b1cf73786c5fdabb55ec22f9b5712d1ba9c0bfcd46d4b93721fcac780",
            "0xf8669d37f29e142d49f8824d4e7f1735ec3da219687387629b5fccd86812df84b846f8440180a056e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421a01d93f60f105899172f7255c030301c3af4564edd4a48577dbdc448aec7ddb0ac"
        ],
        "balance": "0x0",
        "codeHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
        "nonce": "0x0",
        "storageHash": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
        "storageProof": [
            {
                "key": "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421",
                "value": "0x0",
                "proof": []
            }
        ]
    }
}

Last updated