Skip to main content

state_getReadProof - JSON-RPC Method

Description#

Returns a proof for one or more storage keys at a given block hash. Proofs can be used to verify state off-chain.

Parameters#

ParameterTypeRequiredDescription
keysstring[]YesArray of storage keys
atstringYesBlock hash to prove against

Returns#

An object containing proof and at fields.

Request Example#

Create a read proof for the runtime :code key at a finalized block:

curl -s https://api-moonriver.n.dwellir.com/YOUR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc":"2.0",
"id":1,
"method":"state_getReadProof",
"params":[["0x3a636f6465"], "0x1849c7bc2c547b315fef716c6f2fb6f5e256da60482a013286caf975d035f766"]
}'

The proof array contains SCALE-encoded nodes that verify the key’s value within the state root.