pub async fn run<T, R>(
setup: T,
seed: Seed,
relay: R,
) -> Result<Keyshare, KeygenError>where
T: KeygenSetupMessage,
R: Relay,Expand description
Executes the Distributed Key Generation protocol
This is the main entry point for the DKG protocol. It orchestrates the entire process of generating a distributed key among the participants.
§Type Parameters
T- A type implementing theKeygenSetupMessagetraitR- A type implementing theRelaytrait for message communication
§Arguments
setup- The protocol setup configurationseed- The random seed for cryptographic operationsrelay- The message relay for communication between parties
§Returns
Ok(Keyshare)- The generated key share if the protocol succeedsErr(KeygenError)- If the protocol fails
§Errors
This function may return the following errors:
KeygenError::AbortProtocol- If the protocol is aborted by a participantKeygenError::SendMessage- If there’s an error sending messages- Other
KeygenErrorvariants for various protocol failures