1//! Zcash node address types and serialization for Zcash network messages.
2//!
3//! Zcash has 3 different node address formats:
4//! - `AddrV1`: the format used in `addr` (v1) messages,
5//! - [`AddrInVersion`]: the format used in `version` messages, and
6//! - `AddrV2`: the format used in `addrv2` messages.
78pub mod canonical;
9pub mod in_version;
1011pub(crate) mod v1;
12pub(crate) mod v2;
1314pub use canonical::{canonical_peer_addr, canonical_socket_addr};
15pub use in_version::AddrInVersion;
1617// These types and functions should only be visible in the `external` module,
18// so that they don't leak outside the serialization code.
1920pub(super) use v1::AddrV1;
21pub(super) use v2::AddrV2;
2223#[allow(unused_imports)]
24#[cfg(any(test, feature = "proptest-impl"))]
25pub(super) use v1::{ipv6_mapped_ip_addr, ADDR_V1_SIZE};
2627// TODO: write tests for addrv2 deserialization
28#[allow(unused_imports)]
29#[cfg(any(test, feature = "proptest-impl"))]
30pub(super) use v2::ADDR_V2_MIN_SIZE;