fedimint_server::config::distributedgen

Trait PeerHandleOps

Source
pub trait PeerHandleOps {
    // Required methods
    fn run_dkg_g1<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(Vec<G1Projective>, Scalar)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn run_dkg_g2<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(Vec<G2Projective>, Scalar)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn exchange_encodable<'life0, 'async_trait, T>(
        &'life0 self,
        data: T,
    ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<PeerId, T>>> + Send + 'async_trait>>
       where T: 'async_trait + Encodable + Decodable + Send + Sync,
             Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn run_dkg_g1<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(Vec<G1Projective>, Scalar)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn run_dkg_g2<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(Vec<G2Projective>, Scalar)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn exchange_encodable<'life0, 'async_trait, T>( &'life0 self, data: T, ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<PeerId, T>>> + Send + 'async_trait>>
where T: 'async_trait + Encodable + Decodable + Send + Sync, Self: 'async_trait, 'life0: 'async_trait,

Exchanges a DkgPeerMsg::Module(Vec<u8>) with all peers. All peers are required to be online and submit a response for this to return properly. The caller’s message will be included in the returned BTreeMap under the PeerId of this peer. This allows modules to exchange arbitrary data during distributed key generation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> PeerHandleOps for PeerHandle<'a>

Source§

fn run_dkg_g1<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(Vec<G1Projective>, Scalar)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn run_dkg_g2<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(Vec<G2Projective>, Scalar)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn exchange_encodable<'life0, 'async_trait, T>( &'life0 self, data: T, ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<PeerId, T>>> + Send + 'async_trait>>
where T: 'async_trait + Encodable + Decodable + Send + Sync, Self: 'async_trait, 'life0: 'async_trait,

Implementors§