pub trait PeerHandleOps {
// Required methods
fn run_dkg_g1<'life0, 'async_trait, T>(
&'life0 self,
v: T,
) -> Pin<Box<dyn Future<Output = DkgResult<HashMap<T, DkgKeys<G1Projective>>>> + Send + 'async_trait>>
where T: Serialize + DeserializeOwned + Unpin + Send + Clone + Eq + Hash + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn run_dkg_multi_g2<'life0, 'async_trait, T>(
&'life0 self,
v: Vec<T>,
) -> Pin<Box<dyn Future<Output = DkgResult<HashMap<T, DkgKeys<G2Projective>>>> + Send + 'async_trait>>
where T: Serialize + DeserializeOwned + Unpin + Send + Clone + Eq + Hash + Sync + 'async_trait,
Self: 'async_trait,
'life0: 'async_trait;
fn exchange_pubkeys<'life0, 'async_trait>(
&'life0 self,
dkg_key: String,
key: PublicKey,
) -> Pin<Box<dyn Future<Output = DkgResult<BTreeMap<PeerId, PublicKey>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn exchange_with_peers<'life0, 'async_trait, T>(
&'life0 self,
dkg_key: String,
data: T,
kind: ModuleKind,
decoder: Decoder,
) -> Pin<Box<dyn Future<Output = DkgResult<BTreeMap<PeerId, T>>> + Send + 'async_trait>>
where T: 'async_trait + Encodable + Decodable + Send + Sync,
Self: 'async_trait,
'life0: 'async_trait;
}
Required Methods§
fn run_dkg_g1<'life0, 'async_trait, T>( &'life0 self, v: T, ) -> Pin<Box<dyn Future<Output = DkgResult<HashMap<T, DkgKeys<G1Projective>>>> + Send + 'async_trait>>
fn run_dkg_multi_g2<'life0, 'async_trait, T>( &'life0 self, v: Vec<T>, ) -> Pin<Box<dyn Future<Output = DkgResult<HashMap<T, DkgKeys<G2Projective>>>> + Send + 'async_trait>>
Sourcefn exchange_pubkeys<'life0, 'async_trait>(
&'life0 self,
dkg_key: String,
key: PublicKey,
) -> Pin<Box<dyn Future<Output = DkgResult<BTreeMap<PeerId, PublicKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn exchange_pubkeys<'life0, 'async_trait>(
&'life0 self,
dkg_key: String,
key: PublicKey,
) -> Pin<Box<dyn Future<Output = DkgResult<BTreeMap<PeerId, PublicKey>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Exchanges a DkgPeerMsg::PublicKey(key)
with all peers. Used by the
wallet module to setup the multisig wallet during DKG.
Sourcefn exchange_with_peers<'life0, 'async_trait, T>(
&'life0 self,
dkg_key: String,
data: T,
kind: ModuleKind,
decoder: Decoder,
) -> Pin<Box<dyn Future<Output = DkgResult<BTreeMap<PeerId, T>>> + Send + 'async_trait>>
fn exchange_with_peers<'life0, 'async_trait, T>( &'life0 self, dkg_key: String, data: T, kind: ModuleKind, decoder: Decoder, ) -> Pin<Box<dyn Future<Output = DkgResult<BTreeMap<PeerId, T>>> + Send + '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.