nips/81.md
2024-02-07 17:57:53 -05:00

37 lines
1.2 KiB
Markdown

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