state_getKeys (Mythos)
Enumerate Mythos storage keys for a prefix using state_getKeys.
Returns all storage keys with the given prefix. This is useful when inspecting NFT collections, marketplace listings, or DAO proposals stored in maps.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
keyPrefix | string | Yes | Hex-encoded storage key prefix (usually twox128(pallet) + twox128(storageItem)). |
at | string | No | Block hash to query. Defaults to latest. |
Code Examples
Tips
- The response can be large for popular pallets; prefer
state_getKeysPagedfor pagination. - Combine with
state_getStorageto fetch the associated values.
Related Methods
state_call
Call a runtime API function on Mythos. Execute on-chain computations like account nonce lookups, fee estimation, and custom runtime logic without submitting a transaction.
state_getKeysPaged
Enumerate storage keys with pagination on Mythos. Iterate over storage maps like accounts, validators, and assets efficiently with cursor-based pagination.