Trait dkg_gadget::dkg_modules::DKG
source · pub trait DKG<B: Block>: Send + Sync {
// Required methods
fn initialize_keygen_protocol<'life0, 'async_trait>(
&'life0 self,
params: KeygenProtocolSetupParameters<B>
) -> Pin<Box<dyn Future<Output = Option<ProtocolInitReturn<B>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn initialize_signing_protocol<'life0, 'async_trait>(
&'life0 self,
params: SigningProtocolSetupParameters<B>
) -> Pin<Box<dyn Future<Output = Result<ProtocolInitReturn<B>, DKGError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn can_handle_keygen_request(
&self,
params: &KeygenProtocolSetupParameters<B>
) -> bool;
fn can_handle_signing_request(
&self,
params: &SigningProtocolSetupParameters<B>
) -> bool;
}
Expand description
Generalizes the DKGWorker::initialize_keygen_protocol and DKGWorker::initialize_signing_protocol
Also includes two functions which are used for determining whether a DKG can handle the request
parameters, which is used in the DKGModules
implementation