Docs

state_getKeys - JSON-RPC Method

Enumerate storage keys in Enjin Matrix for a given trie prefix to discover on-chain data.

Description

Returns a list of storage keys that share a given prefix. This method is helpful when you need to discover child keys beneath a map, such as iterating through all system accounts or fuel tank records in Enjin Matrix.

Response Example (truncated)

JSON
{
  "jsonrpc": "2.0",
  "result": [
    "0x26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac",
    "0x26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850",
    "0x26aa394eea5630e07c48ae0c9558cef734abf5cb34d6244378cddbf18e849d96",
    ""
  ],
  "id": 1
}

Tips

  • Use state_getKeysPaged for large datasets; it adds pagination controls to avoid heavy responses.
  • Combine with state_getStorage to fetch the associated values for each discovered key.
  • Remember that map storage keys append hashes and encoded keys (e.g., Blake2_128Concat(AccountId)), so you may need to post-process the suffix.