GET
/
v1
/
networks
/
{network}
/
l1Validators
import { AvaCloudSDK } from "@avalabs/avacloud-sdk";

const avaCloudSDK = new AvaCloudSDK({
  serverURL: "https://api.example.com",
  chainId: "43114",
  network: "mainnet",
});

async function run() {
  const result = await avaCloudSDK.data.primaryNetwork.listL1Validators({
    l1ValidationId: "BsSpTd1SDvdhaoYAuKJvRj1WnoRyu8mAuMZeuz9g7brGj6KhX",
    network: "mainnet",
    nodeId: "NodeID-111111111111111111116DBWJs",
    subnetId: "11111111111111111111111111111111LpoYY",
  });

  for await (const page of result) {
    // Handle the page
    console.log(page);
  }
}

run();
{
  "nextPageToken": "<string>",
  "validators": [
    {
      "validationId": "<string>",
      "nodeId": "<string>",
      "subnetId": "<string>",
      "weight": 123,
      "remainingBalance": 123,
      "creationTimestamp": 123,
      "blsCredentials": {},
      "remainingBalanceOwner": {
        "addresses": [
          "<string>"
        ],
        "threshold": 123
      },
      "deactivationOwner": {
        "addresses": [
          "<string>"
        ],
        "threshold": 123
      }
    }
  ]
}

Authorizations

x-glacier-api-key
string
header
required

Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.

Path Parameters

network
enum<string>
required

Either mainnet or testnet/fuji.

Available options:
mainnet,
fuji,
testnet,
devnet

Query Parameters

pageToken
string

A page token, received from a previous list call. Provide this to retrieve the subsequent page.

pageSize
integer
default:10

The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.

Required range: 1 <= x <= 100
l1ValidationId
any

The L1 Validator's validation ID to filter by. If not provided, then all L1 Validators will be returned.

includeInactiveL1Validators
boolean
nodeId
string

A valid node ID in format 'NodeID-HASH'.

subnetId
any

The subnet ID to filter by. If not provided, then all subnets will be returned.

Response

200
application/json
Successful response
validators
object[]
required

The list of L1 validations for the given Subnet ID, NodeId or validationId

nextPageToken
string

A token, which can be sent as pageToken to retrieve the next page. If this field is omitted or empty, there are no subsequent pages.