From 0beeba3540d67def48fa6eef49d46f62c348d5e5 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 11 Jun 2024 18:12:26 -0400 Subject: [PATCH] Adds Proxy and Broadcasting relay lists. --- 74.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 74.md diff --git a/74.md b/74.md new file mode 100644 index 00000000..c5d0260b --- /dev/null +++ b/74.md @@ -0,0 +1,41 @@ +NIP-74 +====== + +Proxy and Broadcasting Relay Lists +---------------------------------- + +`draft` `optional` + +Kind `10017` indicates the user's preferred relays for proxy downloads. Such services save the user's bandwidth by utilizing a single connection to a proxy relay which reaches out to all of the other relays. + +Kind `10018` indicates the user's preferred relays for broadcasting relays. Such services improve the user's privacy by utilizing a broadcasting relay to distribute an event to all of the appropriate relays without requiring the user to connect with each of those relays. + +Both events MUST include a list of `relay` URLs in private tags. Private tags are JSON Stringified, NIP-44-encrypted to the signer's keys and placed inside the `.content` of the event. + +```js +{ + "kind": 10017, + "tags": [], + "content": nip44Encrypt(JSON.stringify([ + ["relay", "wss://myproxy.relay.com"] + ])) + //...other fields +} +``` + +```js +{ + "kind": 10018, + "tags": [], + "content": nip44Encrypt(JSON.stringify([ + ["relay", "wss://mybroadcaster.relay.com"] + ])) + //...other fields +} +``` + +Clients SHOULD use proxy relays to download events before using it's native event-finding method. + +Clients SHOULD use broadcasting relays instead of the Client's own event publishing algorithms. + +Clients SHOULD publish kind `10017` and `10018` events to the author's [NIP-65](65.md) `write` relays.