childstate_getKeysPagedAt - Bittensor RPC Method
List child storage keys with pagination at a specific block on Bittensor.
Returns child storage keys matching a prefix with cursor-based pagination at a specific block hash. Child tries are separate state trees used by certain Substrate pallets to isolate their storage from the main state trie. This method is the child-trie equivalent of state_getKeysPaged but with explicit block hash targeting.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
childStorageKey | string | Yes | Hex-encoded key identifying the child trie root. |
prefix | string | Yes | Hex-encoded prefix to filter child storage keys. Use "0x" for all keys. |
count | number | Yes | Maximum number of keys to return per page. |
startKey | string | No | Hex-encoded key to start after (cursor for pagination). Omit for the first page. |
blockHash | string | No | Hex-encoded block hash. Defaults to the best block if omitted. |
Response
| Field | Type | Description |
|---|---|---|
result | array | Array of hex-encoded child storage keys matching the prefix. Empty array when no more keys exist. |
Code Examples
Use Cases
- Child trie enumeration -- List all keys stored in a child trie, such as contract storage or pallet-specific isolated state.
- Historical queries -- Enumerate child storage keys as they existed at a specific block for auditing or analysis.
- Paginated iteration -- Iterate over large child tries without loading all keys into memory at once.
Notes
- Child tries are used by pallets that need isolated storage (e.g. smart contracts). Not all pallets use child storage.
- If the child storage key is invalid or the child trie does not exist, the result will be an empty array.
- Requires an archive node for queries at historical block hashes.
Related Methods
childstate_getKeysPaged-- Same functionality at the best blockchildstate_getStorage-- Read a value from child storagechildstate_getStorageEntries-- Read multiple child storage values at oncestate_getKeysPaged-- Paginated key enumeration for the main state trie