upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Fernandez <p@f7z.io>2023-06-08 22:50:44 +0200
committerGitHub <noreply@github.com>2023-06-08 22:50:44 +0200
commit75c05b547c4525bf4fc581bf4167e4847c0a55b9 (patch)
treeb3d211bc3683b340d678c3574519f327e7b3858e
parent14a887d43b654f41de5d271e27ef69048f183fb4 (diff)
parent6baacf6fb1badf3ba2480a88519e357b3cbdaaac (diff)
Merge pull request #500 from nostr-protocol/nip31
nip-31: dealing with custom unknown events
-rw-r--r--31.md15
-rw-r--r--README.md2
2 files changed, 17 insertions, 0 deletions
diff --git a/31.md b/31.md
new file mode 100644
index 0000000..e77ae34
--- /dev/null
+++ b/31.md
@@ -0,0 +1,15 @@
1NIP-31
2======
3
4Dealing with unknown event kinds
5--------------------------------
6
7`draft` `optional` `author:pablof7z` `author:fiatjaf`
8
9When 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 an `alt` tag to write a short human-readable plaintext summary of what that event is about.
10
11The 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. The content of the `alt` tag should provide enough context for a user that doesn't know anything about this event kind to understand what it is.
12
13These 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.
14
15`kind:1`-centric clients can make interacting with these event kinds more functional by supporting [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md).
diff --git a/README.md b/README.md
index fbe43f9..a940ba6 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
46- [NIP-27: Text Note References](27.md) 46- [NIP-27: Text Note References](27.md)
47- [NIP-28: Public Chat](28.md) 47- [NIP-28: Public Chat](28.md)
48- [NIP-30: Custom Emoji](30.md) 48- [NIP-30: Custom Emoji](30.md)
49- [NIP-31: Dealing with Unknown Events](31.md)
49- [NIP-33: Parameterized Replaceable Events](33.md) 50- [NIP-33: Parameterized Replaceable Events](33.md)
50- [NIP-36: Sensitive Content](36.md) 51- [NIP-36: Sensitive Content](36.md)
51- [NIP-39: External Identities in Profiles](39.md) 52- [NIP-39: External Identities in Profiles](39.md)
@@ -146,6 +147,7 @@ When experimenting with kinds, keep in mind the classification introduced by [NI
146| name | value | other parameters | NIP | 147| name | value | other parameters | NIP |
147| ----------------- | ------------------------------------ | -------------------- | ------------------------ | 148| ----------------- | ------------------------------------ | -------------------- | ------------------------ |
148| `a` | coordinates to an event | relay URL | [33](33.md), [23](23.md) | 149| `a` | coordinates to an event | relay URL | [33](33.md), [23](23.md) |
150| `alt` | Alt tag | -- | [31](31.md) |
149| `d` | identifier | -- | [33](33.md) | 151| `d` | identifier | -- | [33](33.md) |
150| `e` | event id (hex) | relay URL, marker | [1](01.md), [10](10.md) | 152| `e` | event id (hex) | relay URL, marker | [1](01.md), [10](10.md) |
151| `g` | geohash | -- | [12](12.md) | 153| `g` | geohash | -- | [12](12.md) |