mpc_protocol/
lib.rs

1//! ***Moved to `polysig-protocol`***.
2//!
3//! Relay service protocol types, encoding and helper functions.
4//!
5//! # Size Limitations
6//!
7//! The maximum size of a [noise protocol](https://noiseprotocol.org/)
8//! message is 65535 and we further limit the size of buffers
9//! for encoding to 32KB.
10#![deny(missing_docs)]
11#![allow(clippy::len_without_is_empty)]
12
13#[doc(hidden)]
14pub mod channel;
15mod constants;
16pub(crate) mod encoding;
17mod error;
18mod event;
19mod keypair;
20mod protocol;
21#[cfg(feature = "zlib")]
22pub mod zlib;
23
24pub use constants::*;
25pub use encoding::{decode, encode, VERSION};
26pub use error::Error;
27pub use event::{Event, JsonMessage};
28pub use keypair::*;
29pub use protocol::*;
30
31pub use hex;
32pub use http;
33pub use log;
34pub use pem;
35pub use serde_json;
36pub use snow;
37pub use uuid;
38
39/// Round number.
40pub type RoundNumber = std::num::NonZeroU16;
41
42/// Party number.
43pub type PartyNumber = std::num::NonZeroU16;
44
45/// Result type for the protocol library.
46pub type Result<T> = std::result::Result<T, Error>;