mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-09-20 14:55:49 -04:00
86 lines
1.8 KiB
Markdown
86 lines
1.8 KiB
Markdown
NIP-34
|
|
======
|
|
|
|
Parameterized Versioned Events
|
|
--------------------------------
|
|
|
|
`draft` `optional` `author:Giszmo`
|
|
|
|
This NIP adds a new event range that allows for versioning of events that have
|
|
the same author, first `d` tag and kind but unlike [NIP-33](/33.md), no events
|
|
get discarded, keeping references by event ID intact.
|
|
|
|
Reasoning
|
|
---------
|
|
For maintaining bodies of events between multiple authors, relying on the
|
|
good-will of others to not change or delete their respective events is not good
|
|
enough. For example for wikipedia or nip registry replacements, we need ways to
|
|
know an acceptable version of the document stays around without having to copy
|
|
it under another author's pubkey.
|
|
|
|
Implementation
|
|
--------------
|
|
A *Parameterized Versioned Event* is defined as an event with a kind
|
|
`40000 <= n < 50000`.
|
|
|
|
It follows the same rules as NIP-33 except that "replaced" events do not get
|
|
discarded.
|
|
|
|
Relays queried for `author:kind:d-tag` tuples serve the last but when queried
|
|
for specific event IDs, those will be returned, too.
|
|
|
|
A Use Case
|
|
----------
|
|
A later nip might define a nip registry such that authors can either publish
|
|
their own preferred version of a nip or e**n**dorse others by
|
|
`author:kind:d-tag` tuples or by event ID.
|
|
|
|
Alice proposes NIP-999:
|
|
|
|
```
|
|
"author": $alice,
|
|
"id": "14aeb..8dad4",
|
|
"kind": 40001,
|
|
"tags": [
|
|
[ "d", "999"],
|
|
…
|
|
```
|
|
|
|
Bob endorses exactly that version:
|
|
|
|
```
|
|
"author": $bob,
|
|
"kind": 40001,
|
|
"tags": [
|
|
[ "d", "999"],
|
|
[ "n", "14aeb..8dad4"]
|
|
],
|
|
"content": "",
|
|
…
|
|
```
|
|
|
|
Carol endorses whatever Bob wants to see as NIP-999:
|
|
|
|
```
|
|
"author": $carol,
|
|
"kind": 40001,
|
|
"tags": [
|
|
["d", "999"],
|
|
["n", "$bob:999"],
|
|
],
|
|
"content": "",
|
|
…
|
|
```
|
|
|
|
Dave announces to generally trust Alice in all things "NIP":
|
|
|
|
```
|
|
"author": $dave,
|
|
"kind": 40001,
|
|
"tags": [
|
|
["n", $alice,
|
|
],
|
|
"content": "",
|
|
…
|
|
```
|