Skip to main content

Module webrtc

Module webrtc 

Source
Expand description

WebRTC peer-to-peer connectivity for hashtree data exchange

Uses Nostr relays for signaling with the same protocol as iris-client:

  • Event kind: 30078 (KIND_APP_DATA)
  • Tag: [“l”, “webrtc”]
  • Message types: hello, offer, answer, candidate

Re-exports§

pub use types::encode_request;
pub use types::DataMessage;
pub use types::DataRequest;
pub use types::PeerDirection;
pub use types::PeerId;
pub use types::PeerPool;
pub use types::PoolConfig;
pub use types::PoolSettings;
pub use types::SignalingMessage;
pub use types::WebRTCConfig;

Modules§

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

Structs§

CashuMintMetadataStore
CashuRoutingConfig
Peer
WebRTC peer connection with data channel protocol
PeerEntry
Peer entry in the manager
PendingRequest
Pending request tracking (keyed by hash hex)
RequestDispatchConfig
Request dispatch strategy for peer queries.
WebRTCManager
WebRTC manager handles peer discovery and connection management
WebRTCState
Shared state for WebRTC manager

Enums§

ConnectionState
Connection state for a peer
SelectionStrategy
Peer selection strategy

Constants§

MAX_HTL
HTL (Hops To Live) constants - Freenet-style probabilistic decrement

Traits§

ContentStore
Trait for content storage that can be used by WebRTC peers

Functions§

cashu_mint_metadata_path

Type Aliases§

PeerClassifier
Callback type for classifying peers into pools