Expand description
WebRTC signaling types compatible with iris-client and hashtree-ts
Structs§
- Data
Chunk - Data
Payment - Hashtree data channel protocol messages Shared between WebRTC data channels and WebSocket transport
- Data
Payment Ack - Data
Quote Request - Quote request message body
- Data
Quote Response - Quote response message body
- Data
Request - Data request message body
- Data
Response - Data response message body
- HtlPolicy
- HTL policy parameters for a traffic class.
- IceCandidate
- Candidate metadata for transports that use ICE-style negotiation.
- Mesh
Nostr Frame - 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
- Peer
Status - Peer connection status
- Pool
Config - Settings for a peer pool
- Pool
Settings - Pool settings for both pools
- Request
Dispatch Config - Request dispatch strategy for peer queries.
- Timed
Seen Set - TTL/capacity dedupe structure for forwarded mesh frames/events.
- WebRTC
Config - Configuration for WebRTC manager
Enums§
- Data
Message - HtlMode
- HTL decrement mode.
- Mesh
Nostr Payload - Peer
Direction - Direction of peer connection
- Peer
Pool - Peer pool classification
- Peer
State Event - Peer state change event for signaling layer notification
- Selection
Strategy - Peer selection strategy
- Signaling
Message - 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
- 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