childstate_getStorage - JSON-RPC Method
Description#
Fetches the SCALE-encoded value stored at a given key inside a child trie. Child tries are used by pallets that isolate per-account state, such as managed wallets or contracts modules.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
childStorageKey | string | Yes | Hex-encoded child trie identifier |
storageKey | string | Yes | Hex-encoded key inside the child trie |
blockHash | string | null | No | Optional block hash for historical reads |
Request Example#
{
"jsonrpc": "2.0",
"method": "childstate_getStorage",
"params": [
"0x3a6368696c645f73746f726167653a5f6578616d706c65",
"0x6b65795f3031",
null
],
"id": 1
}
Response Example#
{
"jsonrpc": "2.0",
"result": null,
"id": 1
}
A null response indicates that the key currently has no value in the child trie or that child storage access is disabled on the queried endpoint.
Notes#
- Use
childstate_getKeysor pallet metadata to discover child storage keys. - Values must be decoded with the SCALE codec corresponding to the child trie owner pallet.
- Access to child storage is often restricted to collators or trusted API keys for security reasons.