Docs

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

ParameterTypeRequiredDescription
childStorageKeystringYesHex-encoded key identifying the child trie root.
prefixstringYesHex-encoded prefix to filter child storage keys. Use "0x" for all keys.
countnumberYesMaximum number of keys to return per page.
startKeystringNoHex-encoded key to start after (cursor for pagination). Omit for the first page.
blockHashstringNoHex-encoded block hash. Defaults to the best block if omitted.

Response

FieldTypeDescription
resultarrayArray 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.