Links
Comment on page

platform.getSubnets

Get info about the Subnets.

Signature​​

platform.getSubnets(
{ids: []string}
) ->
{
subnets: []{
id: string,
controlKeys: []string,
threshold: string
}
}
  • ids are the IDs of the subnets to get information about. If omitted, gets information about all subnets.
  • id is the Subnet’s ID.
  • threshold signatures from addresses in controlKeys are needed to add a validator to the subnet.

Example

Request
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "platform.getSubnets",
"params": {"ids":["hW8Ma7dLMA7o4xmJf3AXBbo17bXzE7xnThUd3ypM4VAWo1sNJ"]},
"id": 1
}' -H 'content-type:application/json;' https://ava-mainnet.blastapi.io/<project-id>/ext/P
Result
{
"jsonrpc": "2.0",
"result": {
"subnets": [
{
"id": "hW8Ma7dLMA7o4xmJf3AXBbo17bXzE7xnThUd3ypM4VAWo1sNJ",
"controlKeys": [
"KNjXsaA1sZsaKCD1cd85YXauDuxshTes2",
"Aiz4eEt5xv9t4NCnAWaQJFNz5ABqLtJkR"
],
"threshold": "2"
}
]
},
"id": 1
}'