polysig_driver

Trait ProtocolDriver

Source
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§

Source

type Error: Error + Debug + Send + Sync + From<Error> + 'static

Error type for results.

Source

type Message: Debug + Round

Outgoing message type.

Source

type Output

Output when the protocol is completed.

Required Methods§

Source

fn handle_incoming(&mut self, message: Self::Message) -> Result<(), Self::Error>

Handle an incoming message.

Source

fn proceed(&mut self) -> Result<Vec<Self::Message>, Self::Error>

Proceed to the next round.

Source

fn round_info(&self) -> Result<RoundInfo, Self::Error>

Information about the current round for the driver.

Source

fn try_finalize_round(&mut self) -> Result<Option<Self::Output>, Self::Error>

Try to finalize a round if the protocol is completed the result is returned.

Must check with can_finalize() first.

Implementors§

Source§

impl ProtocolDriver for polysig_driver::frost::ed25519::KeyGenDriver

Available on crate feature frost-ed25519 only.
Source§

impl ProtocolDriver for polysig_driver::frost::ed25519::SignatureDriver

Available on crate feature frost-ed25519 only.
Source§

impl<P> ProtocolDriver for AuxGenDriver<P>
where P: SchemeParams + 'static,

Available on crate feature cggmp only.
Source§

impl<P> ProtocolDriver for polysig_driver::cggmp::KeyGenDriver<P>
where P: SchemeParams + 'static,

Available on crate feature cggmp only.
Source§

impl<P> ProtocolDriver for KeyInitDriver<P>
where P: SchemeParams + 'static,

Available on crate feature cggmp only.
Source§

impl<P> ProtocolDriver for KeyRefreshDriver<P>
where P: SchemeParams + 'static,

Available on crate feature cggmp only.
Source§

impl<P> ProtocolDriver for KeyResharingDriver<P>
where P: SchemeParams + 'static,

Available on crate feature cggmp only.
Source§

impl<P> ProtocolDriver for polysig_driver::cggmp::SignatureDriver<P>
where P: SchemeParams + 'static,

Available on crate feature cggmp only.