nips/81.md

37 lines
1.2 KiB
Markdown
Raw Normal View History

2023-09-04 15:35:30 +00:00
NIP-81
======
Private Relationship Status
---------------------------
2023-09-04 15:35:30 +00:00
`draft` `optional`
2023-09-04 15:35:30 +00:00
2024-02-07 22:57:53 +00:00
A new `kind:30382` event documents a "Private Relationship Status" between two users of the network.
2023-09-04 15:35:30 +00:00
2024-02-07 22:57:53 +00:00
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.
2023-09-04 15:35:30 +00:00
For example:
```js
{
"kind": 30382,
"tags": [
["d", bytesToHex(sha256(hexToBytes("<pubKey>")))],
["n", "Clients"]
2023-09-04 15:35:30 +00:00
],
"content": "<NIP-44 encrypted Stringified TAG-List(
["p", "<pubkey>", "relay"]
2023-09-04 15:41:59 +00:00
["nickname", "<My buddy>"]
2023-09-04 15:35:30 +00:00
["summary", "<Summary of the relationship>"],
["nip92secret", "<secret used to decrypt medical data for this pubkey>"]
2023-09-04 15:35:30 +00:00
)",
...other fields
}
```
2023-09-04 15:41:59 +00:00
`nickname` SHOULD be used instead of the person's display name in all interfaces
2023-09-04 15:35:30 +00:00
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.