Comment on page
platform.getSubnets
Get info about the Subnets.
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 incontrolKeys
are needed to add a validator to the subnet.
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
}'
Last modified 1yr ago