add checkpoint event

This commit is contained in:
pablof7z
2024-12-19 15:22:39 +00:00
parent 8d14490692
commit 739ba04e9f
2 changed files with 14 additions and 0 deletions

13
37.md
View File

@@ -30,6 +30,19 @@ A blanked `.content` means this draft has been deleted by a client but relays st
Tags `e` and `a` identify one or more anchor events, such as parent events on replies.
## Checkpoints
`kind:1234` defines checkpoints that belong to a parent `kind:31234` event. These can serve to provide a revision history of a parent event.
```js
{
"kind": 1234,
"tags": [
["a", "31234:<pubkey>:<identifier>"]
],
"content": nip44Encrypt(JSON.stringify(draft_event)),
}
```
## Relay List for Private Content
Kind `10013` indicates the user's preferred relays to store private events like Drafts. The event MUST include a list of `relay` URLs in private tags. Private tags are JSON Stringified, NIP-44-encrypted to the signer's keys and placed inside the .content of the event.