Skip to main content

Module types

Module types 

Source
Expand description

WebRTC signaling types compatible with iris-client and hashtree-ts

Structs§

DataChunk
DataPayment
DataPaymentAck
DataQuoteRequest
DataQuoteResponse
DataRequest
Hashtree data channel protocol messages Shared between WebRTC data channels and WebSocket transport
DataResponse
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
Peer identifier combining pubkey and session UUID
PeerStatus
Peer connection status
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
Configuration for WebRTC manager

Enums§

DataMessage
HtlMode
HTL decrement mode.
MeshNostrPayload
PeerDirection
Direction of peer connection
PeerPool
Peer pool classification
PeerStateEvent
Peer state change event for signaling layer notification
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
Tag for hello messages (broadcast discovery)
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
Event kind for WebRTC signaling (ephemeral kind 25050) All signaling uses this kind - hellos use #l tag, directed use gift wrap
WEBRTC_TAG
Legacy tag for WebRTC signaling messages (kept for compatibility)

Functions§

decrement_htl
Backward-compatible helper using blob-request policy.
decrement_htl_with_policy
Decrement HTL according to policy and per-peer randomness profile.
encode_chunk
encode_message
Encode a DataMessage to wire format (deprecated - use encode_request/encode_response)
encode_payment
encode_payment_ack
encode_quote_request
Encode a quote request to wire format: [0x02][msgpack body]
encode_quote_response
Encode a quote response to wire format: [0x03][msgpack body]
encode_request
Encode a request to wire format: [0x00][msgpack body] Uses named fields for cross-language compatibility with TypeScript
encode_response
Encode a response to wire format: [0x01][msgpack body] Uses named fields for cross-language compatibility with TypeScript
generate_uuid
Generate a UUID for peer identification
hash_to_hex
Convert hash to hex string for logging/map keys
parse_message
Parse a wire format message
should_forward
Backward-compatible helper for existing call sites.
should_forward_htl
Check if a request should be forwarded based on HTL.
validate_mesh_frame

Type Aliases§

PeerRouterConfig