Skip to main content

Module types

Module types 

Source
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§

ClassifyRequest
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.
MeshNostrFrame
MeshStats
Statistics for the default mesh-backed store composition.
MeshStoreConfig
Configuration for the default mesh-backed store composition.
PeerHTLConfig
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
PoolConfig
Settings for a peer pool
PoolSettings
Pool settings for both pools
TimedSeenSet
TTL/capacity dedupe structure for forwarded mesh frames/events.

Enums§

DataMessage
Direct peer-link message types for hash-based data exchange.
HtlMode
HTL decrement mode.
MeshNostrPayload
PeerPool
Peer pool classification
PeerState
Connection state for a peer
SignalingMessage
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§

ClassifierRx
Receiver for peer classification requests (implement this to provide classification)
ClassifierTx
Sender for peer classification requests
WebRTCStats
Backward-compatible alias for the previous production-specific name.