From 6868e029f9b77ef742b19cc1fdbb6b7ac3987835 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 12 Feb 2024 11:46:33 -0500 Subject: [PATCH] formatting --- 81.md | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/81.md b/81.md index bd629d1..5023b68 100644 --- a/81.md +++ b/81.md @@ -6,17 +6,13 @@ Relationship Status `draft` `optional` -Event `kind:30382` documents a "Relationship Status" between two pubkeys and uses private and public tags to enhance the description of that relationship. +Event `kind:30382` documents a "Relationship Status" between two pubkeys and uses private and public tags to enhance the description of that relationship. Since statuses change over time, this event is defined as a _parameterized replaceable event_ with a single `d` tag that identifies each pair of keys. -Since statuses change over time, this event is defined as a _parameterized replaceable event_ with a single `d` tag as a random UUID per pubkey. +Optional `n` tags add the target key to unbound lists. -Optional `n` tags add the target key to an unbound list. +The private tags are JSON Stringified, [NIP-44](44.md)-encrypted and placed inside the `.content` of the event. -The private tags are stringified, NIP-44-encrypted and placed inside the `.content` of the event. - -Examples: - -Public Status +Example of public Status ```js { @@ -35,7 +31,7 @@ Public Status } ``` -Private Status +Example of private Status ```js { @@ -70,18 +66,18 @@ Clients MAY hide human readable `n`-tags behind a code and list their code maps "content": nip44Encrypt(JSON.stringify([ ["n_name", "", ""], ["n_name", "Clients", "Clients"] // public list of my Clients - ["n_name", "6064460175057025", "Idiot"] // private list of idiots + ["n_name", "6064460175057025", "Idiots"] // private list of idiots ])), // ...other fields } ``` -### Deterministic `d`-Tag. +### Deterministic `d`-Tags. -For private use cases that must contain deterministic d-Tags, the recommendation is to use NIP-44's `hkdf` function and use a hash between the user's private key and the pubkey of the `p` tag. +For private use cases that must contain deterministic d-Tags, the recommendation is to use [NIP-44](44.md)'s `hkdf` function and use a hash between the user's private key and the pubkey of the `p` tag. ``` nip81_key = hkdf(private_key, salt: 'nip81') -bobs_tag = sha256(nip81_key || bobs_pub) -kates_tag = sha256(nip81_key || kates_pub) +bobs_d_tag = sha256(nip81_key || bobs_pub) +kates_d_tag = sha256(nip81_key || kates_pub) ``` \ No newline at end of file