From bae459a771b4901f0d58cc77d66f7eaf85991ed1 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Fri, 10 May 2024 20:01:11 -0400 Subject: [PATCH] Updates relationship status to use event sets. --- 81.md | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/81.md b/81.md index 43fc91b..150f678 100644 --- a/81.md +++ b/81.md @@ -12,7 +12,7 @@ Both kinds offer public and private tags to describe that relationship. Private ### Public Relationship Status -Event kind `30382` is used when the relationship itself is public, with the `d` tag receiving the public key each target key. +Event kind `30382` is used when the relationship itself is public. The `d` tag contains the target public key in hex. ```js { @@ -31,19 +31,21 @@ Event kind `30382` is used when the relationship itself is public, with the `d` } ``` -`petname` SHOULD be used instead of the person's display name in all interfaces. +`petname` SHOULD be rendered instead of the person's display name in all interfaces when the signer of this event is logged in. ### Relationship Categories -Optional `n` tags `["n", ""]` add the target key to unbound lists. This allows clients to query by `n` and download all members of a list. +Optional `n` tags `["n", ""]` add the target key to event sets. This allows clients to query by `n` and download all members of a set. -List `codes` can be human readable or not. A new event kind named "Unbound List Names" (`kind:10008`) uses `map` tags to display the list name. Clients SHOULD display the `name` instead of the `code` if the `code` is present in this list. +Set `identifier` can be human readable and public or not. + +For private cases, a new event kind named "Event Set Names" (`kind:10008`) uses `map` tags to store the set name. Clients SHOULD display the `name` instead of the `identifier` if the `identifier` is present in this event. ```js { "kind": 10008, "content": nip44Encrypt(JSON.stringify([ - ["map", "", ""], + ["map", "", ""], ["map", "bitcoiner", "bitcoiner"], ["map", "6064460175057025", "debtor"] ])), @@ -53,7 +55,7 @@ List `codes` can be human readable or not. A new event kind named "Unbound List ### Private Relationship Status -For relationships that MUST remain private, Event kind `30383` uses a similar structure but with a hashed `d` tag using [NIP-44](44.md)'s `hkdf` function. +For relationships that must remain private (e.g private follows, client lists, etc), the event kind `30383` uses a similar structure but with a hashed `d` tag using [NIP-44](44.md)'s `hkdf` function. ```js { @@ -63,8 +65,8 @@ For relationships that MUST remain private, Event kind `30383` uses a similar st ["n", "6064460175057025"], ], "content": nip44Encrypt(JSON.stringify([ - ["p", "", "relay"], - ["n", "clients-list"], + ["p", "", ""], + ["n", "client-list"], ["petname", ""], ["summary", ""], ])),