Skip to main content

eth_getProof

POST

Returns the value stored in the Storage of the specified address in a format that includes a Merkle proof. The returned proof can be used to verify that the queried storage state has not been tampered with.
param[0]
addressstringrequired
Address is expressed as a 20-byte hexadecimal string, the address format used in EVM-compatible blockchains.
param[1]
storageHashesarrayrequired
Array of storage hashes for querying values in the Storage of a specific address. Each hash is a 64-character hex string.
param[2]
blockNumberOrHashOrTagstringrequired
Use one of block hash, block number, or block tag to specify a block.
  • Block number: hex string (ex. "0x1")
  • Block hash: 64-character hex string (ex. "0x39008d07edf93c03bb9d1cfc80598fcf63f441ec86e9de3733fa6a484980ca48")]
  • Block tag: enum string (ex. "latest", "earliest", "pending")
    • earliest: The oldest available block on the chain.
    • finalized: A recently finalized block that can no longer be changed. Primarily used in proof-of-stake (PoS) blockchains.
    • safe: A recent block considered safe by the network (immune to reorgs).
    • latest: The most recent block on the chain (may be subject to reorgs).
    • pending: The next block to be mined, including pending transactions in the mempool.
Responses
addressstring
Address of the proven account
accountProofarray
Merkle proof nodes of the account state trie (RLP encoded, hex)
balancestring
Account balance (hex, in wei)
codeHashstring
Keccak-256 hash of the account code
noncestring
Account transaction count (hex)
storageHashstring
Root hash of the storage trie
Array of proofs for the requested storage keys
keystring
Storage key (hex)
valuestring
Storage value (hex)
proofarray
Merkle proof nodes of the storage state trie (RLP encoded, hex)
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://kaia-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_getProof",
"params": [
"0xdac17f958d2ee523a2206206994597c13d831ec7",
[
"0x000000000000000000000000c6cde7c39eb2f0f0095f41570af89efc2c1ea828"
],
"latest"
]
}'