keygen
suspend fun keygen(roomUuid: RoomUUID, numParties: Int, threshold: Int, keygenInitKeypair: KeygenPrivateKey, keygenIds: Array<KeygenID>): Pair<Sr25519PublicKey, Sr25519SecretShare>
Generates Sr25519 keys using multi-party computation.
This is the main key generation function that all parties must call to create a distributed key. Parties must first exchange their keygenIds securely before calling this function.
Return
KeyGen object containing the public key and secret share for the generated keypair
Parameters
room Uuid
The UUID of the keygen room
num Parties
The number of parties that will join the keygen room (value in range 1..65535)
threshold
The threshold of the keypair to be generated (value in range 1..65535)
keygen Init Keypair
Contains the same keygenSecret that was used to generate the keygenId that was shared with other parties
keygen Ids
The keygenId outputs from all other parties, received through a secure channel