getClusterAccInfo
getClusterAccInfo(
arciumProgram,address,commitment?):Promise<{activation: {activationEpoch: {0:BN; };deactivationEpoch: {0:BN; }; };authority:PublicKey|null;blsPublicKey:DecodeEnum<{kind:"enum";variants: [{fields: [{generic:"t"; }];name:"set"; }, {fields: [{generic:"t"; }, {vec:"bool"; }];name:"unset"; }]; },DecodedHelper<[{name:"abortReason";type: {kind:"enum";variants: [{name:"invalidMac"; }, {name:"expectedSentShare"; }, {name:"expectedFieldElement"; }, {name:"expectedAbort"; }, {name:"malformedData"; }, {name:"computationFailed"; }, {name:"internalError"; }, {name:"preprocessingStreamError"; }, {name:"divisionByZero"; }]; }; }, {name:"acccountAccessInfo";repr: {kind:"c"; };serialization:"bytemuck";type: {fields: [{name:"inner";type:"u16"; }];kind:"struct"; }; }, {name:"accountArgument";type: {fields: [{name:"pubkey";type:"pubkey"; }, {name:"offset";type:"u32"; }, {name:"length";type:"u32"; }];kind:"struct"; }; }],DecodedHelper<[{name:"abortReason";type: {kind:"enum";variants: [{name:"invalidMac"; }, {name:"expectedSentShare"; }, {name:"expectedFieldElement"; }, {name:"expectedAbort"; }, {name:"malformedData"; }, {name:"computationFailed"; }, {name:"internalError"; }, {name:"preprocessingStreamError"; }, {name:"divisionByZero"; }]; }; }, {name:"acccountAccessInfo";repr: {kind:"c"; };serialization:"bytemuck";type: {fields: [{name:"inner";type:"u16"; }];kind:"struct"; }; }, {name:"accountArgument";type: {fields: [{name:"pubkey";type:"pubkey"; }, {name:"offset";type:"u32"; }, {name:"length";type:"u32"; }];kind:"struct"; }; }],EmptyDefined>>>;bump:number;clusterSize:number;cuPrice:BN;cuPriceProposals:BN[];lastUpdatedEpoch: {0:BN; };maxCapacity:BN;nodes:object[];pendingNodes:number[];tdInfo: {ip:number[];location:number;peerId:number[]; } |null; }>
Fetches and parses a given Cluster account.
Parameters
| Parameter | Type | Description |
|---|---|---|
arciumProgram | Program<Arcium> | The Anchor program instance. |
address | PublicKey | The public key of the Cluster account. |
commitment? | Commitment | (Optional) RPC commitment level. |
Returns
Promise<{ activation: { activationEpoch: { 0: BN; }; deactivationEpoch: { 0: BN; }; }; authority: PublicKey | null; blsPublicKey: DecodeEnum<{ kind: "enum"; variants: [{ fields: [{ generic: "t"; }]; name: "set"; }, { fields: [{ generic: "t"; }, { vec: "bool"; }]; name: "unset"; }]; }, DecodedHelper<[{ name: "abortReason"; type: { kind: "enum"; variants: [{ name: "invalidMac"; }, { name: "expectedSentShare"; }, { name: "expectedFieldElement"; }, { name: "expectedAbort"; }, { name: "malformedData"; }, { name: "computationFailed"; }, { name: "internalError"; }, { name: "preprocessingStreamError"; }, { name: "divisionByZero"; }]; }; }, { name: "acccountAccessInfo"; repr: { kind: "c"; }; serialization: "bytemuck"; type: { fields: [{ name: "inner"; type: "u16"; }]; kind: "struct"; }; }, { name: "accountArgument"; type: { fields: [{ name: "pubkey"; type: "pubkey"; }, { name: "offset"; type: "u32"; }, { name: "length"; type: "u32"; }]; kind: "struct"; }; }], DecodedHelper<[{ name: "abortReason"; type: { kind: "enum"; variants: [{ name: "invalidMac"; }, { name: "expectedSentShare"; }, { name: "expectedFieldElement"; }, { name: "expectedAbort"; }, { name: "malformedData"; }, { name: "computationFailed"; }, { name: "internalError"; }, { name: "preprocessingStreamError"; }, { name: "divisionByZero"; }]; }; }, { name: "acccountAccessInfo"; repr: { kind: "c"; }; serialization: "bytemuck"; type: { fields: [{ name: "inner"; type: "u16"; }]; kind: "struct"; }; }, { name: "accountArgument"; type: { fields: [{ name: "pubkey"; type: "pubkey"; }, { name: "offset"; type: "u32"; }, { name: "length"; type: "u32"; }]; kind: "struct"; }; }], EmptyDefined>>>; bump: number; clusterSize: number; cuPrice: BN; cuPriceProposals: BN[]; lastUpdatedEpoch: { 0: BN; }; maxCapacity: BN; nodes: object[]; pendingNodes: number[]; tdInfo: { ip: number[]; location: number; peerId: number[]; } | null; }>
The ClusterAccount object.