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)
{
"jsonrpc": "2.0",
"result": [
"0x26aa394eea5630e07c48ae0c9558cef702a5c1b19ab7a04f536c519aca4983ac",
"0x26aa394eea5630e07c48ae0c9558cef70a98fdbe9ce6c55837576c60c7af3850",
"0x26aa394eea5630e07c48ae0c9558cef734abf5cb34d6244378cddbf18e849d96",
"…"
],
"id": 1
}Tips
- Use
state_getKeysPagedfor large datasets; it adds pagination controls to avoid heavy responses. - Combine with
state_getStorageto 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.
state_call
Call a runtime API function on Enjin. 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 Enjin. Iterate over storage maps like accounts, validators, and assets efficiently with cursor-based pagination.