diff options
Diffstat (limited to '37.md')
| -rw-r--r-- | 37.md | 38 |
1 files changed, 38 insertions, 0 deletions
| @@ -0,0 +1,38 @@ | |||
| 1 | NIP-37 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Editable Short Notes | ||
| 5 | -------------------- | ||
| 6 | |||
| 7 | `draft` `optional` | ||
| 8 | |||
| 9 | This NIP describes a flow for clients that want to support editable short notes without breaking the experience of clients that don't and keeping `kind:1` a safe place. | ||
| 10 | |||
| 11 | The idea is that editable notes are published as `kind:31000` notes that follow all the same rules of `kind:1`, except for the fact that they can be replaceable anytime. | ||
| 12 | |||
| 13 | ```jsonc | ||
| 14 | { | ||
| 15 | "kind": 31000, | ||
| 16 | "created_at": 1730820000, | ||
| 17 | "content": "I like dogs", | ||
| 18 | "tags": [ | ||
| 19 | ["d", "c2huy3f"], | ||
| 20 | // other kind1 tags | ||
| 21 | ] | ||
| 22 | } | ||
| 23 | ``` | ||
| 24 | |||
| 25 | Clients that want to support edits would automatically only publish `kind:31000` notes, then immediately publish `kind:1` notes that quote the `kind:31000` note. | ||
| 26 | |||
| 27 | ```jsonc | ||
| 28 | { | ||
| 29 | "kind": 1, | ||
| 30 | "created_at": 1730820000, | ||
| 31 | "content": "naddr1...", | ||
| 32 | "tags": [ | ||
| 33 | ["q", "31000:...:c2huy3f"] | ||
| 34 | ] | ||
| 35 | } | ||
| 36 | ``` | ||
| 37 | |||
| 38 | Clients that support this NIP would then fetch the `kind:31000` and display it normally in place of the `kind:1`. Other clients would display the editable event embedded inside the `kind:1`. | ||