Expand description
Mesh transport types for peer-to-peer data exchange.
Defines signaling frames, negotiated peer-link messages, and shared mesh constants used across Nostr websocket transports, local buses, direct-link transports such as WebRTC, and simulation.
Structs§
- Classify
Request - Request to classify a peer by pubkey
- HtlPolicy
- HTL policy parameters for a traffic class.
- IceCandidate
- Candidate metadata for transports that use ICE-style negotiation.
- Mesh
Nostr Frame - Mesh
Stats - Statistics for the default mesh-backed store composition.
- Mesh
Store Config - Configuration for the default mesh-backed store composition.
- PeerHTL
Config - Per-peer HTL configuration (Freenet-style probabilistic decrement) Generated once per peer connection, stays fixed for connection lifetime
- PeerId
- Unique identifier for a peer in the network
- Pool
Config - Settings for a peer pool
- Pool
Settings - Pool settings for both pools
- Timed
Seen Set - TTL/capacity dedupe structure for forwarded mesh frames/events.
Enums§
- Data
Message - Direct peer-link message types for hash-based data exchange.
- HtlMode
- HTL decrement mode.
- Mesh
Nostr Payload - Peer
Pool - Peer pool classification
- Peer
State - Connection state for a peer
- Signaling
Message - Signaling message types exchanged over mesh signaling transports.
Constants§
- BLOB_
REQUEST_ POLICY - Default policy for blob/content requests.
- DATA_
CHANNEL_ LABEL - Default data channel label used by the WebRTC peer-link implementation.
- DECREMENT_
AT_ MAX_ PROB - Probability to decrement at max HTL (50%)
- DECREMENT_
AT_ MIN_ PROB - Probability to decrement at min HTL=1 (25%)
- MAX_HTL
- HTL (Hops To Live) constants - Freenet-style probabilistic decrement
- MESH_
DEFAULT_ HTL - MESH_
EVENT_ POLICY - Policy for mesh signaling/event forwarding.
- MESH_
MAX_ HTL - MESH_
PROTOCOL - Relayless mesh protocol constants for forwarding signaling events over data channels.
- MESH_
PROTOCOL_ VERSION - MESH_
SIGNALING_ EVENT_ KIND - NOSTR_
KIND_ HASHTREE - Nostr event kind for hashtree signaling envelopes (ephemeral, NIP-17 style).
Functions§
- classifier_
channel - Create a classifier channel pair
- decrement_
htl_ with_ policy - Decrement HTL according to policy and per-peer randomness profile.
- is_
polite_ peer - Shared concurrent-offer negotiation: determine if we are the “polite” peer.
- should_
forward - Backward-compatible helper.
- should_
forward_ htl - Check if a request should be forwarded based on HTL.
- validate_
mesh_ frame
Type Aliases§
- Classifier
Rx - Receiver for peer classification requests (implement this to provide classification)
- Classifier
Tx - Sender for peer classification requests
- WebRTC
Stats - Backward-compatible alias for the previous production-specific name.