dpp/serialization/dashcore/mod.rs
1//! Serde `with` wrappers for types owned by external (dashcore) crates.
2//!
3//! These live here — rather than next to their dpp consumers — because the
4//! type being (de)serialized is **not** a dpp type; it belongs to dashcore /
5//! its transitive deps (e.g. `blstrs_plus`). Grouping them under
6//! `serialization::dashcore` keeps "serde for out-of-crate types" in one place,
7//! distinct from dpp-type-local serde (which lives next to its type).
8
9/// Compressed-G1 BLS public key (`BlsPublicKey<Bls12381G2Impl>` from dashcore's
10/// `blstrs_plus`). Used via `#[serde(with = "crate::serialization::dashcore::bls_pubkey")]`.
11///
12/// The wrapped type comes from `dashcore::blsful`, which is only linked when the
13/// `bls-signatures` feature is on (`crate::bls_signatures`). Its only consumers —
14/// the `core_types` validator/validator-set structs — are themselves gated behind
15/// `core-types`, which requires `bls-signatures`, so gating here keeps the module
16/// from breaking builds that omit BLS (e.g. `wasm-drive-verify`).
17#[cfg(feature = "bls-signatures")]
18pub mod bls_pubkey;