Expand description
Peer-to-peer mesh networking.
Structs§
- Asn
- Autonomous System Number wrapper.
- AsnPolicy
- Policy governing ASN diversity requirements.
- Message
- A signed peer-to-peer message with optional recipient.
- Message
Replay Guard - Stateful acceptance guard for signed peer-to-peer messages.
- PeerId
- Unique identifier for a peer in the P2P mesh, wrapping a DID.
- Peer
Info - Metadata describing a known peer (addresses, key hash, reputation).
- Peer
Metadata - Extended peer metadata including ASN information.
- Peer
Registry - In-memory registry of known peers in the P2P mesh.
- Rate
Limiter - Rate-limit tracking per peer.
Enums§
- Diversity
Result - Result of an ASN diversity check.
Constants§
Functions§
- check_
asn_ diversity - Check whether the peer set meets the ASN diversity threshold.
- discover_
peers - Discover new peers from bootstrap addresses and register them.
- identify_
stale_ peers - Return the IDs of peers that have not been seen within
max_age_msofnow. - message_
signing_ payload - Canonical CBOR payload signed by a peer-to-peer message sender.
- rotate_
peers - Evict stale peers from
currentand replace them with diverse candidates. - select_
diverse_ peers - Select peers that maximise ASN diversity.
- send
- Send a message, verifying the recipient exists in the registry (if addressed).
- validate_
message_ structure - Validate structural integrity of a peer-to-peer message.
- verify_
message - Verify a peer-to-peer message Ed25519 signature against the sender public key.