Expand description
Relay protocol wire types — vendored, byte-identical to dig-relay’s src/wire.rs,
dig-node’s relay::RelayMessage, and dig-gossip’s relay_types (requirements
RLY-001 through RLY-007).
§Provenance & contract
The canonical relay wire lives in dig-gossip (src/relay/relay_types.rs); dig-relay is the
SERVER, dig-node/dig-nat are CLIENTS of the same JSON-over-WebSocket wire. These types are
copied here verbatim rather than depending on dig-gossip because the wire depends only on
serde + std, whereas dig-gossip pulls the entire L2/Chia stack just to expose two structs.
The #[serde(tag = "type")] discriminators + field names MUST stay byte-identical to the
server’s so both speak the same JSON; this is pinned by tests/wire_conformance.rs. The
superproject SYSTEM.md records the change-impact edge: a change to the relay wire must be
mirrored across all four copies in the same unit of work.
Structs§
- Relay
Peer Info - Peer info as tracked by the relay server.
#[serde]field names are part of the wire contract (vendored byte-identical — see the module docs; field-level docs omitted to avoid drift).
Enums§
- Relay
Message - Complete relay protocol message enum — JSON over WebSocket,
#[serde(tag = "type")].