pub trait MpcNetwork:
Send
+ Stream<Item = Result<NetworkOutbound, MpcNetworkError>>
+ Sink<NetworkOutbound, Error = MpcNetworkError> {
// Required methods
fn party_id(&self) -> PartyId;
fn close<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), MpcNetworkError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
The MpcNetwork trait defines shared functionality for a network implementing a
connection between two parties in a 2PC
Values are sent as bytes, scalars, or curve points and always in batch form with the message length (measured in the number of elements sent) prepended to the message