Skip to main content

state_getKeysPaged

Returns storage keys with pagination on Moonbeam.

Use Cases#

  • Storage iteration - Enumerate storage map entries
  • Data export - Bulk export chain data for cross-chain DeFi, multi-chain dApps, and Ethereum-to-Polkadot bridging via XCM, Axelar, LayerZero, and Wormhole
  • Account enumeration - List all accounts

Parameters#

ParameterTypeRequiredDescription
prefixStringYesStorage key prefix
countNumberYesMaximum keys to return
startKeyStringNoKey to start after
blockHashStringNoBlock hash for historical query

Request#

{
"jsonrpc": "2.0",
"method": "state_getKeysPaged",
"params": ["0x...", 100],
"id": 1
}

Code Examples#

curl https://api-moonbeam.n.dwellir.com/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "state_getKeysPaged",
"params": ["0x26aa394eea5630e07c48ae0c9558cef7", 100],
"id": 1
}'