rpc_methods
Description#
Returns a list of supported RPC methods and the highest available version for each namespace. Call this after runtime upgrades to detect new custom APIs (e.g., SALP or Hyperbridge helpers).
Parameters#
This method does not take parameters.
Returns#
| Field | Type | Description |
|---|---|---|
methods | array | Array of method names |
version | number | API version |
Request Example#
{
"jsonrpc": "2.0",
"method": "rpc_methods",
"params": [],
"id": 1
}
Response Example#
{
"jsonrpc": "2.0",
"result": {
"methods": [
"system_chain",
"system_health",
"author_submitExtrinsic",
"chain_getHeader",
"state_getRuntimeVersion",
"grandpa_roundState",
"state_getStorage",
"state_call"
],
"version": 1
},
"id": 1
}
Code Examples#
- Python
- JavaScript
resp = requests.post(
"https://api-bifrost-polkadot.n.dwellir.com/YOUR_API_KEY",
headers={"Content-Type": "application/json"},
data=json.dumps({
"jsonrpc": "2.0",
"method": "rpc_methods",
"params": [],
"id": 1
})
)
print(resp.json()["result"]["methods"][:5])
const methods = await api.rpc.rpc.methods();
console.log(methods.toHuman());
Tips#
- Filter the
methodsarray to detect custom namespaces (those prefixed withbifrost,salp,hyperbridge, etc.). - Pair with
state_getMetadatato fetch type definitions for custom runtime APIs.