zebra_network/protocol/external/addr.rs
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.
7
8pub mod canonical;
9pub mod in_version;
10
11pub(crate) mod v1;
12pub(crate) mod v2;
13
14pub(crate) use canonical::connection_limit_key;
15pub use canonical::{canonical_peer_addr, canonical_socket_addr};
16pub use in_version::AddrInVersion;
17
18// These types and functions should only be visible in the `external` module,
19// so that they don't leak outside the serialization code.
20
21pub(super) use v1::AddrV1;
22pub(super) use v2::AddrV2;
23
24#[allow(unused_imports)]
25#[cfg(any(test, feature = "proptest-impl"))]
26pub(super) use v1::ipv6_mapped_ip_addr;