Skip to main content

kaia_getProof RPC Method

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

Updated on
Aug 7, 2024

kaia_getProof RPC Method

Parameters

address
string
REQUIRED
The address of the account for which the balance is to be checked
storageKeys
array
REQUIRED
An array of storage-keys that should be proofed and included
blockNumber
string
The block number as a string in hexadecimal format or tags. The supported tag values include earliest for the earliest/genesis block, latest for the latest mined block, pending for the pending state/transactions, safe for the most recent secure block, and finalized for the most recent secure block accepted by more than 2/3 of validators. safe and finalized are only supported on Ethereum, Gnosis, Arbitrum, Arbitrum Nova, and Avalanche C-chain

Returns

address
string
The address associated with the account
accountProof
array
An array of rlp-serialized MerkleTree-Nodes which starts with the stateRoot-Node and follows the path of the SHA3 address as key
balance
string
The current balance of the account in wei
codeHash
string
A 32 byte hash of the code of the account
nonce
string
The hash of the generated proof-of-work. Null if pending
storageHash
string
A 32 byte SHA3 of the storageRoot. All storage will deliver a MerkleProof starting with this rootHash
storageProof
array
An array of storage-entries as requested. Each entry is an object with the following fields:
key
string
The requested storage key
value
string
The storage value
proof
array
An array of rlp-serialized MerkleTree-Nodes which starts with the stateRoot-Node and follows the path of the SHA3 address as key
Request
1
curl https://docs-demo.kaia-kairos.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{
5
"method": "eth_getProof",
6
"id": 1,
7
"jsonrpc": "2.0",
8
"params": [
9
"0xe5cB067E90D5Cd1F8052B83562Ae670bA4A211a8",
10
["0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"],
11
"latest"
12
]
13
}'
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free