defuse_crypto/
lib.rs

1//! Internal cryptographic primitives used across the Intents ecosystem.
2//!
3//! This crate defines lightweight traits such as [`Payload`] and
4//! [`SignedPayload`] that allow Intents to treat messages from different
5//! signing standards uniformly. Implementations of these traits live in
6//! companion crates like `tip191`, `erc191`, or `bip322` and are primarily
7//! intended for internal use.
8
9mod curve;
10mod payload;
11
12pub use self::{curve::*, payload::*};
13
14#[cfg(all(
15    feature = "parse",
16    any(feature = "ed25519", feature = "secp256k1", feature = "p256")
17))]
18mod parse;
19#[cfg(all(
20    feature = "parse",
21    any(feature = "ed25519", feature = "secp256k1", feature = "p256")
22))]
23pub use self::parse::*;
24
25#[cfg(all(
26    any(feature = "ed25519", feature = "secp256k1", feature = "p256"),
27    feature = "serde"
28))]
29pub mod serde;