import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
network: "mainnet",
});
async function run() {
const result = await avalanche.data.primaryNetwork.vertices.listByHeight({
vertexHeight: 123,
pageSize: 10,
blockchainId: "x-chain",
sortOrder: "asc",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"vertices": [
{
"vertexHash": "<string>",
"parentHashes": [
"<string>"
],
"vertexHeight": 123,
"vertexIndex": 123,
"vertexTimestamp": 123,
"txCount": 123,
"transactions": [
"<string>"
],
"vertexSizeBytes": 123
}
],
"chainInfo": {
"chainName": "p-chain",
"network": "mainnet"
},
"nextPageToken": "<string>"
}Lists vertices at the given vertex height on the X-Chain.
import { Avalanche } from "@avalanche-sdk/chainkit";
const avalanche = new Avalanche({
network: "mainnet",
});
async function run() {
const result = await avalanche.data.primaryNetwork.vertices.listByHeight({
vertexHeight: 123,
pageSize: 10,
blockchainId: "x-chain",
sortOrder: "asc",
});
for await (const page of result) {
console.log(page);
}
}
run();{
"vertices": [
{
"vertexHash": "<string>",
"parentHashes": [
"<string>"
],
"vertexHeight": 123,
"vertexIndex": 123,
"vertexTimestamp": 123,
"txCount": 123,
"transactions": [
"<string>"
],
"vertexSizeBytes": 123
}
],
"chainInfo": {
"chainName": "p-chain",
"network": "mainnet"
},
"nextPageToken": "<string>"
}Api keys provide higher access to rate limits. To obtain an api key, sign up for an account at https://avacloud.io/.
A primary network blockchain id or alias.
2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM, 2JVSBoinj9C2J33VntvzYtVJNZdN2NKiwwKjcumHUWEb5DbBrm, x-chain Either mainnet or testnet/fuji.
mainnet, fuji, testnet The height of a vertex.
x >= 0A page token, received from a previous list call. Provide this to retrieve the subsequent page.
The maximum number of items to return. The minimum page size is 1. The maximum pageSize is 100.
1 <= x <= 100The order by which to sort results. Use "asc" for ascending order, "desc" for descending order. Sorted by timestamp or the sortBy query parameter, if provided.
asc, desc Was this page helpful?