upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <fiatjaf@gmail.com>2024-11-05 12:37:14 -0300
committerfiatjaf <fiatjaf@gmail.com>2024-11-05 12:37:14 -0300
commit9d527dba152c57530827e751035f65663b7dd424 (patch)
tree07b31e39ba3d057831bbd8961906be4de2b97af4
parentc275ae74eb0070ad7ac5fe2482fdfb91fc99f4ff (diff)
nip37: non-harmful editable short notes.nh-editable
-rw-r--r--37.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/37.md b/37.md
new file mode 100644
index 0000000..d507b78
--- /dev/null
+++ b/37.md
@@ -0,0 +1,38 @@
1NIP-37
2======
3
4Editable Short Notes
5--------------------
6
7`draft` `optional`
8
9This 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
11The 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
25Clients 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
38Clients 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`.