platform.sampleValidators

Sample validators from the specified Subnet.

This method will use 60 Compute Units.


Reference: Here

Parameters

  • height - int - the numerical value representing the P-Chain height to get the validator set at.

  • subnetID - string - (optional) the subnet ID to get the validator set of. If not given, gets validator set of the Primary Network.

Returns

  • validators - object - the validators and their weights of a subnet or the Primary Network.

// Result
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "validators": [
      "NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ",
      "NodeID-NFBbbJ4qCmNaCzeW7sxErhvWqvEQMnYcN"
    ]
  }
}

Last updated

Was this helpful?