Class: AggregateBeaconCohort ​
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:31
Implements ​
Constructors ​
Constructor ​
new AggregateBeaconCohort(
params):AggregateBeaconCohort
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:107
Creates a new Musig2Cohort instance.
Parameters ​
params ​
Parameters for initializing the cohort.
Returns ​
AggregateBeaconCohort
Properties ​
_cohortKeys ​
_cohortKeys:
Uint8Array<ArrayBufferLike>[]
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:78
List of cohort keys.
beaconAddress ​
beaconAddress:
string=''
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:90
Beacon address for the cohort, calculated from the Taproot multisig.
Implementation of ​
beaconType ​
beaconType:
string
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:96
Type of beacon used in the cohort (default is 'SMTAggregateBeacon').
coordinatorDid ​
coordinatorDid:
string
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:42
DID of the coordinator.
Implementation of ​
id ​
id:
string
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:36
Unique identifier for the cohort.
Implementation of ​
minParticipants ​
minParticipants:
number
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:48
Minimum number of participants required to finalize the cohort.
Implementation of ​
network ​
network:
string
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:60
Network on which the cohort operates (e.g., 'mainnet', 'testnet').
Implementation of ​
participants ​
participants:
string[]
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:72
List of participant DIDs.
Implementation of ​
pendingSignatureRequests ​
pendingSignatureRequests:
Record<string,string> ={}
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:66
Pending signature requests, mapping participant DIDs to their pending signatures.
Implementation of ​
BeaconCohort.pendingSignatureRequests
status ​
status:
COHORT_STATUS_TYPE
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:54
Status of the cohort.
Implementation of ​
trMerkleRoot ​
trMerkleRoot:
Uint8Array
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:84
Taproot Merkle root for the cohort.
Implementation of ​
Accessors ​
cohortKeys ​
Set Signature ​
set cohortKeys(
keys):void
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:116
Parameters ​
keys ​
Uint8Array<ArrayBufferLike>[]
Returns ​
void
Implementation of ​
Methods ​
addSignatureRequest() ​
addSignatureRequest(
message):void
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:235
Adds a signature request to the pending requests for the cohort.
Parameters ​
message ​
BeaconCohortRequestSignatureMessage
The signature request message to add.
Returns ​
void
Throws ​
If a signature request from the same participant already exists.
calulateBeaconAddress() ​
calulateBeaconAddress():
string
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:181
Calculates the beacon Taproot multisig address for the cohort using participant keys.
Returns ​
string
The Taproot address for the cohort.
Throws ​
If the Taproot address cannot be calculated.
finalize() ​
finalize():
void
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:160
Finalizes the cohort by checking if the minimum number of participants is met. If the minimum is met, it sets the status to 'COHORT_SET_STATUS' and calculates the beacon address.
Returns ​
void
Throws ​
If the number of participants is less than the minimum required.
getCohortReadyMessage() ​
getCohortReadyMessage(
to,from):BeaconCohortReadyMessage
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:217
Generates a CohortReadyMessage to be sent to participants when the cohort is set.
Parameters ​
to ​
string
The DID of the participant to whom the message is sent.
from ​
string
The DID of the coordinator sending the message.
Returns ​
The CohortReadyMessage containing the cohort details.
json() ​
json():
BeaconCohort
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:289
Converts the cohort instance to a JSON object representation.
Returns ​
The JSON object representation of the cohort.
startSigningSession() ​
startSigningSession():
BeaconCohortSigningSession
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:271
Starts a signing session for the cohort.
Returns ​
The request signature message for the signing session.
validateCohort() ​
validateCohort(
participantKeys,cohortKeys,beaconAddress):void
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:120
Parameters ​
participantKeys ​
string[]
cohortKeys ​
string[]
beaconAddress ​
string
Returns ​
void
validateSignatureRequest() ​
validateSignatureRequest(
message):boolean
Defined in: packages/method/src/core/beacon/aggregation/cohort/index.ts:252
Validates a signature request message to ensure it is from a participant in the cohort.
Parameters ​
message ​
BeaconCohortRequestSignatureMessage
The signature request message to validate.
Returns ​
boolean
True if the message is valid, false otherwise.