Function run

Source
pub async fn run<R: Relay, S: SignSetupMessage>(
    setup: S,
    seed: Seed,
    relay: R,
) -> Result<(Signature, RecoveryId), SignError>
Expand description

Main entry point for the DSG protocol

This function executes the complete DSG protocol, including both the pre-signature and finish phases.

§Type Parameters

  • R: Type implementing the Relay trait for message communication
  • S: Type implementing the SignSetupMessage trait for setup parameters

§Arguments

  • setup: Setup parameters for the protocol
  • seed: Random seed for generating random values
  • relay: Message relay for communication between parties

§Returns

A Result containing either:

  • Ok((Signature, RecoveryId)): The final signature and recovery ID
  • Err(SignError): An error if the protocol fails