Class: BeaconCoordinator ​
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:38
The BeaconCoordinator class is responsible for managing the coordination of beacon aggregation. BeaconCoordinator
Constructors ​
Constructor ​
new BeaconCoordinator(
params):BeaconCoordinator
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:77
Constructs a new BeaconCoordinator instance.
Parameters ​
params ​
BeaconCoordinatorParams
The parameters for the coordinator.
Returns ​
BeaconCoordinator
Properties ​
activeSigningSessions ​
activeSigningSessions:
Map<string,BeaconCohortSigningSession>
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:67
Active signing sessions for the BeaconCoordinator.
cohorts ​
cohorts:
AggregateBeaconCohort[] =[]
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:61
List of subscribers engaged in a Musig2 Cohort signing session with the BeaconCoordinator.
did ​
did:
string
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:49
The DID of the BeaconCoordinator.
name ​
name:
string
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:43
The name of the BeaconCoordinator service.
protocol ​
protocol:
CommunicationService
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:55
The communication protocol used by the BeaconCoordinator.
Methods ​
acceptSubscription() ​
acceptSubscription(
participant):Promise<void>
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:269
Accepts a subscription request from a participant.
Parameters ​
participant ​
string
The DID of the participant requesting the subscription.
Returns ​
Promise<void>
advertiseCohort() ​
advertiseCohort(
minParticipants,network?,beaconType?):Promise<AggregateBeaconCohort>
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:310
Announces a new cohort to all subscribers.
Parameters ​
minParticipants ​
number
The minimum number of participants required for the cohort.
network? ​
string = 'mutinynet'
The network on which the cohort operates (default is 'signet').
beaconType? ​
string = 'SMTAggregateBeacon'
The type of beacon to be used (default is 'SMTAggregateBeacon').
Returns ​
Promise<AggregateBeaconCohort>
The newly created cohort.
announceCohortReady() ​
announceCohortReady(
cohortId):Promise<AggregateBeaconCohort>
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:337
Announces to all subscribers a cohort is ready for signing.
Parameters ​
cohortId ​
string
The minimum number of participants required for the cohort.
Returns ​
Promise<AggregateBeaconCohort>
The newly created cohort.
sendAggregatedNonce() ​
sendAggregatedNonce(
session):Promise<void>
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:284
Sends the aggregated nonce to all participants in the session.
Parameters ​
session ​
The session containing the aggregated nonce.
Returns ​
Promise<void>
start() ​
start():
void
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:88
Setup and start the BeaconCoordinator communication protocol.
Returns ​
void
startSigningSession() ​
startSigningSession(
cohortId):Promise<BeaconCohortSigningSession>
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:369
Starts a signing session for a given cohort.
Parameters ​
cohortId ​
string
The ID of the cohort for which to start a signing session.
Returns ​
Promise<BeaconCohortSigningSession>
The started signing session.
Throws ​
If the cohort with the given ID is not found.
initialize() ​
staticinitialize(service):BeaconCoordinator
Defined in: packages/method/src/core/beacon/aggregation/coordinator.ts:396
Static initialization method for the BeaconCoordinator.
Parameters ​
service ​
The communication service configuration.
Returns ​
BeaconCoordinator
Initialized BeaconCoordinator instance.