eth
eth_getProof
Returns the Merkle proof for an account and optionally for specific storage slots. This allows trustless verification that an account's balance, nonce, code, or storage values are included in the stat
Returns the Merkle proof for an account and optionally for specific storage slots. This allows trustless verification that an account's balance, nonce, code, or storage values are included in the state trie of a given block, as defined in EIP-1186.
Parameters
| # | Type | Description |
|---|---|---|
| 1 | string | The account address to fetch the proof for. |
| 2 | array | An array of storage key hashes (32-byte hex strings) to include proofs for. Pass [] for no storage proofs. |
| 3 | string | Block number as a hexadecimal string, or a block tag ("latest", "earliest", "pending"). |
Returns
object -- A proof object containing:
| Field | Type | Description |
|---|---|---|
address | string | The account address. |
balance | string | Account balance in wei (hex). |
codeHash | string | Keccak256 hash of the account's code. 0xc5d246... for EOAs (hash of empty bytes). |
nonce | string | Account nonce (hex). |
storageHash | string | Keccak256 hash of the storage trie root. |
accountProof | array | Array of RLP-encoded trie nodes forming the Merkle proof from the state root to the account. |
storageProof | array | Array of storage proof objects, one for each requested key. |
Each storage proof object contains:
| Field | Type | Description |
|---|---|---|
key | string | The requested storage key. |
value | string | The storage value (hex). |
proof | array | Array of RLP-encoded trie nodes forming the proof from the storage root to the value. |
Example
Get the proof for the WPLS contract with storage slot 0:
curl -s -X POST https://rpc.pulsechain.box \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getProof",
"params": [
"0xA1077a294dDE1B09bB078844df40758a5D0f9a27",
["0x0000000000000000000000000000000000000000000000000000000000000000"],
"latest"
],
"id": 1
}'
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"address": "0xa1077a294dde1b09bb078844df40758a5d0f9a27",
"balance": "0x0",
"codeHash": "0x...",
"nonce": "0x1",
"storageHash": "0x...",
"accountProof": [
"0x..."
],
"storageProof": [
{
"key": "0x0000000000000000000000000000000000000000000000000000000000000000",
"value": "0x...",
"proof": [
"0x..."
]
}
]
}
}
TRY IT
Notes
- Merkle proofs allow light clients and bridges to verify state without running a full node. The proof can be validated against the block's
stateRoot. - An empty
storageKeysarray ([]) returns only the account proof without any storage proofs. - Storage keys must be 32-byte hex values. The key for a mapping entry can be computed using
keccak256(abi.encode(key, slot)). - On an archive node, proofs can be fetched for any historical block, enabling trustless verification of past state.
- The
codeHashfor externally owned accounts (EOAs) is0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470(keccak256 of empty bytes).
eth_getTransactionReceipt
Returns the receipt of a transaction by its hash. The receipt contains the execution result, including status, gas used, and event logs. Only available for confirmed transactions.
eth_sendRawTransaction
Submits a signed transaction to the network for broadcast and inclusion in a block. The transaction must be fully signed before submission.
