Skip to content

getClusterInfoById

Returns the cluster information for a given clusterId.

Usage

const clusterId = '0x....'
const clusterInfo = await client.getClusterInfoById(clusterId)

Returns

Promise<ClusterInfo | undefined>

The ClusterInfo object for the given clusterId. Returns null if the clusterId is not found.

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
}