nip-31: dealing with custom unknown events.

This commit is contained in:
fiatjaf 2023-05-05 09:18:02 -03:00
parent bc9d469c20
commit b8aec7dad5
No known key found for this signature in database
GPG Key ID: BAD43C4BE5C1A3A1
2 changed files with 14 additions and 0 deletions

13
31.md Normal file
View File

@ -0,0 +1,13 @@
NIP-31
======
Dealing with unknown event kinds
--------------------------------
`draft` `optional` `author:pablof7z` `author:fiatjaf`
When creating a new custom event kind that is part of a custom protocol and isn't meant to be read as text (like `kind:1`), clients should use the `tags` field to store all their custom data related to their protocol, and use the `content` field to write a short human-readable plaintext summary of what that event is about.
The intent is that social clients, used to display only `kind:1` notes, can still show something in case a custom event pops up in their timelines.
These clients that only know `kind:1` are not expected to ask relays for events of different kinds, but users could still reference these weird events on their notes, and without proper context these could be nonsensical notes. Having the fallback text makes that situation much better -- even if only for making the user aware that they should try to view that custom event elsewhere.

View File

@ -45,6 +45,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/fia
- [NIP-26: Delegated Event Signing](26.md) - [NIP-26: Delegated Event Signing](26.md)
- [NIP-27: Text Note References](27.md) - [NIP-27: Text Note References](27.md)
- [NIP-28: Public Chat](28.md) - [NIP-28: Public Chat](28.md)
- [NIP-31: Dealing with Unknown Events](31.md)
- [NIP-33: Parameterized Replaceable Events](33.md) - [NIP-33: Parameterized Replaceable Events](33.md)
- [NIP-36: Sensitive Content](36.md) - [NIP-36: Sensitive Content](36.md)
- [NIP-39: External Identities in Profiles](39.md) - [NIP-39: External Identities in Profiles](39.md)