subnetInfo_getSubnetsInfo_v2 - Bittensor RPC Method
Retrieve the V2 SCALE-encoded subnet catalog for every active Bittensor subnet. Use it for subnet discovery, dashboard backends, and comparing live subnet state.
Overview
The subnetInfo_getSubnetsInfo_v2 method returns the newer subnet catalog format for the full Bittensor network. Like subnetInfo_getSubnetsInfo, it gives you a network-wide view of active subnets, but it is designed for newer runtimes that package more subnet state into a single SCALE payload.
Use this method when you need a single request that can drive subnet discovery, analytics backends, or control-plane tooling. It is especially useful when you want to compare many subnets at once instead of making one request per subnet.
Parameters
| Position | Name | Type | Required | Description |
|---|---|---|---|---|
| 0 | at | BlockHash | No | Optional block hash to query a historical view of the subnet catalog. Pass null for the latest state. |
Response
| Field | Type | Description |
|---|---|---|
result | number[] | JSON array of SCALE bytes representing the V2 subnet catalog returned by the Bittensor runtime |
The byte array decodes to a vector of Bittensor SubnetInfov2-style structures. In practice, teams use the Bittensor SDK or a registered type registry to decode the payload into subnet-level metadata, economics, and configuration values.
Common decoded fields include:
| Field | Type | Description |
|---|---|---|
netuid | u16 | The subnet identifier |
owner | AccountId32 | The subnet owner coldkey |
identity | Option<SubnetIdentity> | Optional human-readable subnet metadata |
max_allowed_uids | u16 | Maximum neuron slots allowed in the subnet |
tempo | u16 | Blocks between subnet incentive steps |
burn | u64 | Current registration burn cost |
network_connect | Vec<(u16, u16)> | Deprecated connectivity field that is often empty on current runtimes |
emission_values | u64 | Placeholder emission field; use subnetInfo_getDynamicInfo for live subnet economics |
SCALE Decoding
The shared Dwellir endpoint returns this payload as a JSON byte array, not as a hex string. Decode it with the Bittensor type registry that matches the target runtime.
Using bittensor Python SDK: Use the SDK when you want decoded subnet information without manually working through SCALE bytes. The SDK is the most practical option for dashboards, subnet catalogs, and analytics tooling.
Using @polkadot/api: Register the relevant Bittensor subnet info types before decoding the returned byte array. This is the better fit when you are already running a TypeScript service that consumes multiple Bittensor RPC methods.
When to prefer v2:
- Use
subnetInfo_getSubnetsInfo_v2when your tooling expects the newer subnet-info layout. - Use
subnetInfo_getSubnetsInfowhen you need the older layout or when your decoder is already wired to the legacy type definitions. - Use
subnetInfo_getDynamicInfowhen you only need one subnet's live economics instead of the full catalog.
Code Examples
Query with Python
import requests
url = 'https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY'
payload = {
'jsonrpc': '2.0',
'method': 'subnetInfo_getSubnetsInfo_v2',
'params': [None],
'id': 1
}
response = requests.post(url, json=payload)
result = response.json()
scale_bytes = result['result']
print(f'Subnet catalog payload size: {len(scale_bytes)} bytes')
# Decode with a Bittensor-aware type registry or SDK.Query with cURL
curl -X POST https://api-bittensor-mainnet.n.dwellir.com/YOUR_API_KEY \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"method": "subnetInfo_getSubnetsInfo_v2",
"params": [null],
"id": 1
}'Common Use Cases
- Subnet discovery — Build a current list of active Bittensor subnets and their associated metadata.
- Analytics backends — Snapshot network-wide subnet state before deeper per-subnet processing.
- Explorer infrastructure — Power subnet overview pages without making dozens of individual requests.
- Historical comparisons — Query the catalog at a specific block hash to compare how the subnet set changed over time.
Related Methods
subnetInfo_getSubnetsInfo-- Legacy subnet catalog methodsubnetInfo_getDynamicInfo-- Dynamic economics for a single subnetsubnetInfo_getMetagraph-- Full neuron topology for a specific subnet
subnetInfo_getSubnetsInfo - Bittensor RPC Method
Retrieve SCALE-encoded configuration and metadata for all Bittensor subnets. Essential for subnet discovery, parameter analysis, and network overview dashboards.
subscribe_newHead - Bittensor RPC Method
Legacy alias for subscribing to new block headers on Bittensor via WebSocket.