pub mod bundle;
pub mod duplex;
pub mod emit;
pub mod grumpkin;
pub mod lattice;
pub mod poseidon;
pub mod ratchet;
pub mod receiver;
pub mod sender;
pub mod witness;
#[cfg(feature = "serde")]
mod persist;
pub use ark_bn254::Fr;
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum Error {
ZeroScalar,
NotOnCurve,
BadLength,
BadPqKey,
KeyNeedsMoreBlocks,
NoiseOutOfRange,
CiphertextMismatch,
NotForUs,
HandshakeMismatch,
UnknownCommitment,
ReusedIndex,
ChannelNotOpen,
ChannelAlreadyOpen,
}
impl std::fmt::Display for Error {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{self:?}")
}
}
impl std::error::Error for Error {}
#[cfg(test)]
mod tests;