POSTkaia_getProof

Returns values stored in Storage for a specific address in a format including merkle-proof. The returned proof can be used to verify that the queried storage state has not been tampered with.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

Enter the following parameters as an array with the appropriate types.

  1. address - Enter the address to query as a 40-digit hexadecimal string.
  2. storage hashes - Array of storage slot positions to query (hexadecimal strings)
  3. block identifier - Block number, block hash, or block tag for the block to query.
    • Block number: Hexadecimal string (e.g. "0x1")
    • Block hash: 64-digit hexadecimal string (e.g. "0x39008d07edf93c03bb9d1cfc80598fcf63f441ec86e9de3733fa6a484980ca48")]
    • Block tag: Enum string (e.g. "latest", "earliest", "pending")
params[0]string

Address is expressed as a 20-byte hexadecimal string, the address format used on EVM-compatible blockchains.

params[1]string[]

Storage Hashes is an array of hashes to query values stored in Storage at a specific address. Each hash is expressed as a 64-digit hexadecimal string.

params[2]string

Use one of block hash, block number, or block tag to specify the block.

  • Block number: Hexadecimal string (e.g. "0x1")
  • Block hash: 64-digit hexadecimal string (e.g. "0x39008d07edf93c03bb9d1cfc80598fcf63f441ec86e9de3733fa6a484980ca48")]
  • Block tag: Enum string (e.g. "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

accountProofstring[]

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

keystring

Storage key (hex)

valuestring

Storage value (hex)

proofstring[]

Merkle proof nodes of the storage state trie (RLP encoded, hex)

X-API-KEY
RequestCU23
cURL
curl -X POST "https://kaia-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "kaia_getProof",
  "params": [
    "0xdac17f958d2ee523a2206206994597c13d831ec7",
    [
      "0x000000000000000000000000c6cde7c39eb2f0f0095f41570af89efc2c1ea828"
    ],
    "latest"
  ]
}'
Response
Example · 200
{
  "address": "string",
  "accountProof": [
    "string"
  ],
  "balance": "string",
  "codeHash": "string",
  "nonce": "string",
  "storageHash": "string",
  "storageProof": [
    {
      "key": "string",
      "value": "string",
      "proof": [
        "string"
      ]
    }
  ]
}