-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Summary
This deliverable is a place holder to create a new @waku/rtc library for browser users.
Proposed API:
const waku = createLightNode();
const rtcConnection: RTCPeerConnection = createWakuRTC(waku, peerId, {
iceServers: [
{
urls: [
"stun:stun.l.google.com:19302",
"stun:stun1.l.google.com:19302"
]
},
// TURN servers with authentication
{
urls: [
"turn:turn.example.com:3478?transport=udp",
"turn:turn.example.com:3478?transport=tcp"
],
username: "username",
credential: "password",
credentialType: "password"
}
]
});Proposed library should adapt following protocol:
https://www.notion.so/Waku-Phone-Protocol-1ba8f96fb65c80cd862cf51fe2927450
Deliverables of this item:
- publish adapted spec;
- provide
@waku/rtclibrary;
FURPS
Functionality
- Establishes a 1:1 RTCPeerConnection between two peers using Waku as the signaling layer.
- Uses browser WebRTC for ICE, STUN, and TURN handling.
- Offers a high-level API:
connect,onIncommingRequest,accept. - Encrypts SDP/CANDIDATE payloads within the signaling messages.
- Handles message exchange based on the provided proto spec (dial, ringing, answer, candidate, bye, etc.).
Usability
- Targeted at browser app developers, Waku consumers, and real-time application developers.
- Minimalistic design: the WebRTC connection configuration is passed from the outside.
- Designed for simplicity: single-entry connect() method with event-based inbound handling.
Reliability
- Ensures message delivery with UUID-based tracking and retry logic until ACK is received.
- Implements basic retry loop for signaling messages (e.g., DIAL, CANDIDATE).
- No connection health monitoring (e.g., ping-pong or keepalive) — left to application logic.
Performance
- No custom ICE handling — defers to WebRTC stack in the browser.
- Can parallelize signaling (e.g., sending offer + trickle ICE simultaneously).
- Optimized for quick call setup using Waku LightPush + Filter.
Supportability
- Unit tested and part of the js-waku suite of tools.
- Example app included to demonstrate connection lifecycle and event handling.
- Fully pluggable with LightNode, and supports LightPush, Filter, and optionally Store.
- Logs and error handling designed to integrate with developer debugging.
Owner: js-waku
Feature: Waku as a Signal Network
FURPS:
-
F1. Establish direct connection to remote peer using their public key as identifier.
-
U1. Developers can implement their own application-level discovery method.
-
U2. Only remote peer's public key is needed to initiate connection.
-
U3. Hook is provided for developer to filter inbound connection requests.
-
R1. End-to-end reliability is implemented for the signaling conversation.
-
R2. No provided reliability for established connections, left to the developer (e.g. keep alive).
-
S1. Developers can use this protocol in web application, imported from npmjs.com.
-
S2. Developers can use this protocol to initiate WebRTC connections.
-
S3. Only 1:1 direct connections are supported.
-
+1. Network observers cannot retrieve node connection details; forward secrecy is not included.
-
+2. STUN and TURN servers may be required for WebRTC usage.
Checklist:
- Specs: link to specs and/or API definition
- Code: link to GitHub issues/PRs/Epic
- Dogfood: link to dogfooding session/artefact
- Docs: links to README.md or docs.waku.org (TBD)
Sub-issues
Metadata
Metadata
Assignees
Labels
Type
Projects
Status