Skip to main content

Module types

Module types 

Source
Expand description

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

Structs§

AnswerMessage
WebRTC answer message
CandidateMessage
ICE candidate message
CandidatesMessage
Batched ICE candidates message (hashtree-ts extension)
DataRequest
Hashtree data channel protocol messages Shared between WebRTC data channels and WebSocket transport
DataResponse
HelloMessage
Hello message for peer discovery
OfferMessage
WebRTC offer message
PeerHTLConfig
Per-peer HTL decrement configuration (Freenet-style) Stored per peer connection to prevent probing attacks
PeerId
Peer identifier combining pubkey and session UUID
PeerStatus
Peer connection status
PoolConfig
Configuration for a peer pool
PoolSettings
Pool settings for both pools
WebRTCConfig
Configuration for WebRTC manager

Enums§

DataMessage
PeerDirection
Direction of peer connection
PeerPool
Pool type for peer classification
PeerStateEvent
Peer state change event for signaling layer notification
SignalingMessage
All signaling message types

Constants§

DECREMENT_AT_MAX_PROB
DECREMENT_AT_MIN_PROB
HELLO_TAG
Tag for hello messages (broadcast discovery)
MAX_HTL
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
Decrement HTL using Freenet-style probabilistic rules
encode_message
Encode a DataMessage to wire format (deprecated - use encode_request/encode_response)
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
Check if a request should be forwarded based on HTL