mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-13 02:46:24 +00:00
nip37: non-harmful editable short notes.
This commit is contained in:
parent
c275ae74eb
commit
9d527dba15
38
37.md
Normal file
38
37.md
Normal file
@ -0,0 +1,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`.
|
Loading…
Reference in New Issue
Block a user