⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

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

ParameterTypeRequiredDescription
keyPrefixstringYesHex-encoded storage key prefix (usually twox128(pallet) + twox128(storageItem)).
atstringNoBlock 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_getKeysPaged for pagination.
  • Combine with state_getStorage to fetch the associated values.