Handling clusters
Introduction to TEE clusters in the Ternoa JS SDK
How to choose a cluster:
Get all the public cluster ids
import { getPublicsClusters, initializeApi } from "ternoa-js";
const getClustersList = async () => {
try {
await initializeApi();
const clusters = await getPublicsClusters();
console.log(clusters); //Expected output is an array of cluster ids (number) ex: [0,2,3]
console.log(clusters[0]); //Expected output a cluster id (number) ex: 0
process.exit(0);
} catch (error) {
process.exit(1);
}
};Get the first public cluster available
Cluster health
Last updated