rpc_methods
Description
Returns the full list of RPC methods the node exposes. Use this to introspect Frontier-specific namespaces or custom RPCs before invoking them.
Parameters
This method does not require parameters.
Response Example (truncated)
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"methods": [
"account_nextIndex",
"author_submitExtrinsic",
"chain_getHeader",
"eth_call",
"eth_feeHistory",
"net_version",
"payment_queryInfo",
"state_getStorage",
"system_health",
"web3_clientVersion",
"…"
]
}
}
Code Examples
cURL
curl https://api-astar.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "rpc_methods",
"params": [],
"id": 1
}'
JavaScript (polkadot.js)
const { methods } = await api.rpc.rpc.methods();
console.log(`Node exposes ${methods.length} methods`);