2023-09-04 11:35:30 -04:00
NIP-81
======
2024-02-07 17:54:20 -05:00
Private Relationship Status
---------------------------
2023-09-04 11:35:30 -04:00
2024-02-07 17:54:20 -05:00
`draft` `optional`
2023-09-04 11:35:30 -04:00
2024-02-07 17:57:53 -05:00
A new `kind:30382` event documents a "Private Relationship Status" between two users of the network.
2023-09-04 11:35:30 -04:00
2024-02-07 17:59:27 -05:00
It is defined as a _parameterized replaceable event_ with a single `d` tag as hash of the target `.pubkey` . An optional `n` tag adds the target key to an unbound list.
The other tags are stringified, NIP-44-encrypted and placed inside the `.content` of the event.
2023-09-04 11:35:30 -04:00
For example:
```js
{
"kind": 30382,
"tags": [
2024-02-07 17:54:20 -05:00
["d", bytesToHex(sha256(hexToBytes("< pubKey > ")))],
["n", "Clients"]
2023-09-04 11:35:30 -04:00
],
"content": "< NIP-44 encrypted Stringified TAG-List (
2024-02-07 17:54:20 -05:00
["p", "< pubkey > ", "relay"]
2023-09-04 11:41:59 -04:00
["nickname", "< My buddy > "]
2023-09-04 11:35:30 -04:00
["summary", "< Summary of the relationship > "],
2024-02-07 18:00:19 -05:00
["nip82secret", "< secret used to decrypt medical data for this pubkey > "]
2023-09-04 11:35:30 -04:00
)",
...other fields
}
```
2023-09-04 11:41:59 -04:00
`nickname` SHOULD be used instead of the person's display name in all interfaces
2023-09-04 11:35:30 -04:00
Profile screens MAY display the summary of the relationship and allow the user to change the tags of this event.
2024-02-07 17:54:20 -05:00
Clients MAY filter by `kind:30382` , with or without `n` tags, to determine how to assemble feeds, group messages, and when to display content.