Skip to main content

Module types

Module types 

Source
Expand description

Mesh signaling and transport types compatible with hashtree-ts.

Structs§

DataChunk
Quoted data chunk delivered after payment negotiation.
DataPayment
Payment message body for chunk-by-chunk settlement.
DataPaymentAck
Payment acknowledgement for quoted chunk settlement.
DataQuoteRequest
Quote request message body
DataQuoteResponse
Quote response message body
DataRequest
Data request message body
DataResponse
Data response message body
HtlPolicy
HTL policy parameters for a traffic class.
IceCandidate
Candidate metadata for transports that use ICE-style negotiation.
MeshNostrFrame
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
PeerStatus
PoolConfig
Settings for a peer pool
PoolSettings
Pool settings for both pools
RequestDispatchConfig
Request dispatch strategy for peer queries.
TimedSeenSet
TTL/capacity dedupe structure for forwarded mesh frames/events.
WebRTCConfig

Enums§

DataMessage
Parsed data message
HtlMode
HTL decrement mode.
MeshNostrPayload
PeerDirection
Direction of peer connection.
PeerPool
Peer pool classification
PeerStateEvent
SelectionStrategy
Peer selection strategy
SignalingMessage
Signaling message types exchanged over mesh signaling transports.

Constants§

BLOB_REQUEST_POLICY
Default policy for blob/content requests.
DECREMENT_AT_MAX_PROB
Probability to decrement at max HTL (50%)
DECREMENT_AT_MIN_PROB
Probability to decrement at min HTL=1 (25%)
HELLO_TAG
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
MSG_TYPE_CHUNK
MSG_TYPE_PAYMENT
MSG_TYPE_PAYMENT_ACK
MSG_TYPE_QUOTE_REQUEST
MSG_TYPE_QUOTE_RESPONSE
MSG_TYPE_REQUEST
Message type bytes (prefix before MessagePack body)
MSG_TYPE_RESPONSE
WEBRTC_KIND
WEBRTC_TAG

Functions§

decrement_htl
decrement_htl_with_policy
Decrement HTL according to policy and per-peer randomness profile.
encode_chunk
encode_message
encode_payment
encode_payment_ack
encode_quote_request
encode_quote_response
encode_request
encode_response
hash_to_hex
parse_message
should_forward
should_forward_htl
Check if a request should be forwarded based on HTL.
validate_mesh_frame