From 6566b4c458232260fda9b1468812441e5adf4ba1 Mon Sep 17 00:00:00 2001 From: Jack Chakany Date: Tue, 14 Mar 2023 13:34:36 -0400 Subject: [PATCH] add more info peers --- 100.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/100.md b/100.md index 7c1b3271..264db11c 100644 --- a/100.md +++ b/100.md @@ -1,11 +1,14 @@ # NIP-100 WebRTC `draft` `optional` `author:jacany` -This NIP defines how to do WebRTC communication over nostr +This NIP defines how to do WebRTC communication over nostr. ## Defining Rooms Rooms are essentially the space that you will be connected to. This must be defined by a `r` tag following the pubkey of the person you are connected to or some other identifier (maybe a lobby id for a joinable voice channel, etc.) +## Peers +Who the client connects to can be chosen by the client. Ex: you can connect to everyone peer-to-peer or a WebRTC media server that is listening on nostr relays. + ## Encryption The `content` field and `r` tag of types `offer`, `answer`, and `candidate` should be encrypted, similarly to `NIP-04`. Clients MUST listen for the `p` tag containing their pubkey so they know that event is intended for them @@ -13,7 +16,7 @@ Clients MUST listen for the `p` tag containing their pubkey so they know that ev ⚠️ `content` FIELDS SHOULD BE JSON STRINGIFIED, AND THEN ENCRYPTED. ⚠️ ### Broadcasting that you are present -Announces that you are here, and ready to connect to others. +Announces that the client is ready to connect to others. The connection ID is inferred from the provided pubkey. ```json { @@ -27,6 +30,7 @@ The connection ID is inferred from the provided pubkey. ``` ### Closing +This is used when disconnecting from everybody else. Ex: when browser tab is closed. ```json { "kind": 25050, @@ -88,6 +92,4 @@ Used when responding to a `type:connect`. Offering to connect to that peer. } } -``` - -Essentially, just directly feed what comes out of the WebRTC functions straight into the `content` field after encrypting it. +``` \ No newline at end of file