pub trait ProtocolDriver {
type Error: Error + Debug + Send + Sync + From<Error> + 'static;
type Message: Debug + Round;
type Output;
// Required methods
fn handle_incoming(
&mut self,
message: Self::Message,
) -> Result<(), Self::Error>;
fn proceed(&mut self) -> Result<Vec<Self::Message>, Self::Error>;
fn round_info(&self) -> Result<RoundInfo, Self::Error>;
fn try_finalize_round(
&mut self,
) -> Result<Option<Self::Output>, Self::Error>;
}
Available on crate features
cggmp
or frost-ed25519
only.Expand description
Trait for implementations that drive protocol to completion.
Required Associated Types§
Required Methods§
Sourcefn handle_incoming(&mut self, message: Self::Message) -> Result<(), Self::Error>
fn handle_incoming(&mut self, message: Self::Message) -> Result<(), Self::Error>
Handle an incoming message.
Sourcefn round_info(&self) -> Result<RoundInfo, Self::Error>
fn round_info(&self) -> Result<RoundInfo, Self::Error>
Information about the current round for the driver.
Implementors§
Source§impl ProtocolDriver for polysig_driver::frost::ed25519::KeyGenDriver
Available on crate feature frost-ed25519
only.
impl ProtocolDriver for polysig_driver::frost::ed25519::KeyGenDriver
Available on crate feature
frost-ed25519
only.type Error = Error
type Message = RoundMessage<DkgPackage, Identifier<Ed25519Sha512>>
type Output = (KeyPackage<Ed25519Sha512>, PublicKeyPackage<Ed25519Sha512>)
Source§impl ProtocolDriver for polysig_driver::frost::ed25519::SignatureDriver
Available on crate feature frost-ed25519
only.
impl ProtocolDriver for polysig_driver::frost::ed25519::SignatureDriver
Available on crate feature
frost-ed25519
only.type Error = Error
type Message = RoundMessage<SignPackage, Identifier<Ed25519Sha512>>
type Output = Signature<Ed25519Sha512>
Source§impl<P> ProtocolDriver for AuxGenDriver<P>where
P: SchemeParams + 'static,
Available on crate feature cggmp
only.
impl<P> ProtocolDriver for AuxGenDriver<P>where
P: SchemeParams + 'static,
Available on crate feature
cggmp
only.type Error = Error
type Message = RoundMessage<MessageBundle<Signature<Secp256k1>>, VerifyingKey<Secp256k1>>
type Output = AuxInfo<P, VerifyingKey<Secp256k1>>
Source§impl<P> ProtocolDriver for polysig_driver::cggmp::KeyGenDriver<P>where
P: SchemeParams + 'static,
Available on crate feature cggmp
only.
impl<P> ProtocolDriver for polysig_driver::cggmp::KeyGenDriver<P>where
P: SchemeParams + 'static,
Available on crate feature
cggmp
only.type Error = Error
type Message = RoundMessage<MessageBundle<Signature<Secp256k1>>, VerifyingKey<Secp256k1>>
type Output = (KeyShare<P, VerifyingKey<Secp256k1>>, AuxInfo<P, VerifyingKey<Secp256k1>>)
Source§impl<P> ProtocolDriver for KeyInitDriver<P>where
P: SchemeParams + 'static,
Available on crate feature cggmp
only.
impl<P> ProtocolDriver for KeyInitDriver<P>where
P: SchemeParams + 'static,
Available on crate feature
cggmp
only.type Error = Error
type Message = RoundMessage<MessageBundle<Signature<Secp256k1>>, VerifyingKey<Secp256k1>>
type Output = KeyShare<P, VerifyingKey<Secp256k1>>
Source§impl<P> ProtocolDriver for KeyRefreshDriver<P>where
P: SchemeParams + 'static,
Available on crate feature cggmp
only.
impl<P> ProtocolDriver for KeyRefreshDriver<P>where
P: SchemeParams + 'static,
Available on crate feature
cggmp
only.type Error = Error
type Message = RoundMessage<MessageBundle<Signature<Secp256k1>>, VerifyingKey<Secp256k1>>
type Output = (KeyShareChange<P, VerifyingKey<Secp256k1>>, AuxInfo<P, VerifyingKey<Secp256k1>>)
Source§impl<P> ProtocolDriver for KeyResharingDriver<P>where
P: SchemeParams + 'static,
Available on crate feature cggmp
only.
impl<P> ProtocolDriver for KeyResharingDriver<P>where
P: SchemeParams + 'static,
Available on crate feature
cggmp
only.type Error = Error
type Message = RoundMessage<MessageBundle<Signature<Secp256k1>>, VerifyingKey<Secp256k1>>
type Output = ThresholdKeyShare<P, VerifyingKey<Secp256k1>>
Source§impl<P> ProtocolDriver for polysig_driver::cggmp::SignatureDriver<P>where
P: SchemeParams + 'static,
Available on crate feature cggmp
only.
impl<P> ProtocolDriver for polysig_driver::cggmp::SignatureDriver<P>where
P: SchemeParams + 'static,
Available on crate feature
cggmp
only.