getAllClusters
Get all clusters information that registered on chain.
It equals to query chain state of phalaPhatContracts.clusters
.
Usage
const clusters = await client.getAllClusters()
Returns
Promise<[string, ClusterInfo][]>
An array of tuples, where the first element is the clusterId
and the second element is the ClusterInfo
object.
It represents the ClusterInfo
.
The ClusterInfo
is a object like:
interface ClusterInfo extends Map {
owner: AccountId
permission: ClusterPermission
workers: Vec<U8aFixed>
systemContract?: AccountId
gasPrice?: BN
depositPerItem?: BN
depositPerByte?: BN
}