pub trait PeerHandleOps {
// Required methods
fn num_peers(&self) -> NumPeers;
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_bytes<'life0, 'async_trait>(
&'life0 self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<PeerId, Vec<u8>>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
fn num_peers(&self) -> NumPeers
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,
Sourcefn exchange_bytes<'life0, 'async_trait>(
&'life0 self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<PeerId, Vec<u8>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exchange_bytes<'life0, 'async_trait>(
&'life0 self,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<BTreeMap<PeerId, Vec<u8>>>> + Send + 'async_trait>>where
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.