state_getKeys – Mythos JSON-RPC Method
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. |
Request Example#
{
"jsonrpc": "2.0",
"method": "state_getKeys",
"params": [
"0x26aa394eea5630e07c48ae0c9558cef7",
null
],
"id": 1
}
Tips#
- The response can be large for popular pallets; prefer
state_getKeysPagedfor pagination. - Combine with
state_getStorageto fetch the associated values.