nips/97.md

57 lines
1.7 KiB
Markdown
Raw Normal View History

2025-02-06 13:36:11 +00:00
NIP-97
======
White-listed Events
2025-02-07 20:08:32 +00:00
-------------------
2025-02-06 13:36:11 +00:00
`draft` `optional`
2025-02-07 20:08:32 +00:00
An event containing an `"!"` tag means a white-listed event. Relays supporting white-listed events MUST serve these notes only to [NIP-98](98.md) AUTHed pubkeys presented in users' kind `10103` [NIP-51](51.md) list.
2025-02-06 13:36:11 +00:00
2025-02-07 20:08:32 +00:00
Example of white-listed event:
2025-02-06 13:36:11 +00:00
```jsonc
{
"kind": 1,
"tags": [
["!"],
["relays", "wss://private-notes.example.com", "wss://secret-notes.example.com", /*...*/],
],
"content": "You can't see it before i grant you this permission!",
// other fields...
}
```
2025-02-07 20:08:32 +00:00
Clients SHOULD publish white-listed events with a protected tag (`"-"`) to relays who implement and respect this spec.
2025-02-06 13:36:11 +00:00
### Private Follow Request
2025-02-07 19:58:55 +00:00
A user can request to be added to a pubkey kind `10103` list using a kind `819` event containing the target pubkey in a `"p"` tag:
2025-02-06 13:36:11 +00:00
```jsonc
{
2025-02-07 19:58:55 +00:00
"kind": 819,
2025-02-06 13:36:11 +00:00
"tags": [
2025-02-07 19:58:55 +00:00
["relay", "wss://private-notes.example.com"],
["relay", "wss://bob-friends.example.com"],
["expiration", "1738988143"],
2025-02-06 13:36:11 +00:00
["p", "abc...def"]
],
"content": "Please let me in.",
// other fields...
}
```
Clients MAY show `.content` to user as a request message.
2025-02-07 19:58:55 +00:00
Clients MUST add a `"expiration"` tag to kind `819` since they won't be useful after being accepted or rejected.
Its RECOMMENDED for relays to cleanup kind `819` after a reasonable amount of time since they won't be useful after being accepted or rejected.
2025-02-06 13:36:11 +00:00
### Clients
2025-02-07 20:08:32 +00:00
Clients SHOULD keep sending reactions, comments and replies to this events to same relays with protected (`"-"`) and white-listed only (`"!"`) tags, keeping the rest of information private.
2025-02-06 13:36:11 +00:00
#### Warning
The events could be downloaded by private followers and saved locally.