upleb.uk

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

summaryrefslogtreecommitdiff
path: root/37.md
blob: d507b7882f51ce6a76bae614459754bfe1451be1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
NIP-37
======

Editable Short Notes
--------------------

`draft` `optional`

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.

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.

```jsonc
{
  "kind": 31000,
  "created_at": 1730820000,
  "content": "I like dogs",
  "tags": [
    ["d", "c2huy3f"],
    // other kind1 tags
  ]
}
```

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.

```jsonc
{
  "kind": 1,
  "created_at": 1730820000,
  "content": "naddr1...",
  "tags": [
    ["q", "31000:...:c2huy3f"]
  ]
}
```

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`.