Skip to main content

state_getMetadata

Returns the runtime metadata on Asset Hub.

Use Cases#

  • Runtime introspection - Discover available pallets and calls
  • Extrinsic building - Get call and type information for native stablecoin transfers (USDC, USDT), DOT staking and governance, and cross-chain asset management via XCM
  • Storage key generation - Build storage keys from metadata
  • Client generation - Auto-generate typed APIs

Parameters#

ParameterTypeRequiredDescription
blockHashStringNoBlock hash for historical metadata

Request#

{
"jsonrpc": "2.0",
"method": "state_getMetadata",
"params": [],
"id": 1
}

Code Examples#

curl https://api-asset-hub-polkadot.n.dwellir.com/<YOUR_API_KEY>/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "state_getMetadata",
"params": [],
"id": 1
}'