nips/37.md

30 lines
742 B
Markdown
Raw Normal View History

2024-02-26 10:44:07 -05:00
NIP-37
======
Editable Short Notes
--------------------
`draft` `optional`
This NIP allows `.content` modification on `kind:1` short notes while keeping a history of all changes.
2024-02-26 10:44:07 -05:00
`kind:1010` stores the updated content with a `e` tag pointing back to the `kind:1` id.
2024-02-26 10:44:07 -05:00
```js
{
"kind": 1010,
"pubkey": "<32-bytes hex-encoded public key of the event creator>",
"tags": [
["e", "<kind_1_event_id>"]
2024-02-26 10:44:07 -05:00
],
"content": "this is a modified version of the original content",
2024-02-26 10:44:07 -05:00
// ...other fields
}
```
Clients MUST check if the pubkey of the `kind:1010` is the same as the referenced `kind:1`
2024-02-26 10:53:21 -05:00
Clients SHOULD render the `.content` of the most recent `kind:1010` by `created_at`
2024-02-26 10:44:07 -05:00
Clients MAY present a history of changes over time.