dig-peer
The DIG Network peer client — the one abstraction every consumer uses to talk to a DIG Network peer.
use Arc;
use ;
# async
What it is
DigPeer::connect(peer, tls)drivesdig-nat's full traversal ladder (direct → UPnP → NAT-PMP → PCP → hole-punch → relayed, IPv6-first) — the caller never chooses a transport — and returns a mutually-authenticated (mTLS) connection.- Typed RPC over
dig-rpc-protocol:health,methods,get_network_info,get_peers,announce,get_availability,fetch_range. - Directed calls are sealed end-to-end to the peer's verified BLS-G1 identity
(
dig-message, §5.4) on top of mTLS — a relay that terminates TLS forwards ciphertext it cannot read. Fail-closed: never downgraded to plaintext. disconnect()cleanly tears the connection down.
What it is NOT
- Not a
ChiaPeer— DigPeer connects to DIG Network peers, not Chia full nodes. Zero Chia full-node protocol. - Not the mesh layer — it wraps a point-to-point
dig_nat::PeerConnection, notdig-gossip's broadcast mesh.
Security
Reaching a specific peer requires supplying that peer's peer_id — chaining to the DigNetwork CA
alone authorizes a DIG peer, never a specific one. This is enforced in the handshake, not
advisory. See SPEC.md §2.2, §4.
License
Apache-2.0 OR MIT.