diff options
| author | Vitor Pamplona <vitor@vitorpamplona.com> | 2024-03-14 08:38:37 -0400 |
|---|---|---|
| committer | Vitor Pamplona <vitor@vitorpamplona.com> | 2024-03-14 08:38:37 -0400 |
| commit | 2f2dead4cc08671b761f5e40f9a38cc32bcb26c5 (patch) | |
| tree | d487ec9b5b30bb1fef44cfd7bbc6a29ddcab5014 /35.md | |
| parent | de71f998289a829ac4b2c0b0e601b02a2bf755b6 (diff) | |
Adds draft event.
Diffstat (limited to '35.md')
| -rw-r--r-- | 35.md | 25 |
1 files changed, 25 insertions, 0 deletions
| @@ -0,0 +1,25 @@ | |||
| 1 | NIP-35 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Draft Events | ||
| 5 | ------------ | ||
| 6 | |||
| 7 | `draft` `optional` | ||
| 8 | |||
| 9 | This NIP defines kind `31234` as a private draft event for any other event kind. | ||
| 10 | |||
| 11 | The draft event is JSON-stringified, [NIP44-encrypted](44.md) to the owner's public key and placed inside the `.content` of the event. | ||
| 12 | |||
| 13 | An additional `k` tag identifies the kind of the draft event. | ||
| 14 | |||
| 15 | ```js | ||
| 16 | { | ||
| 17 | "kind": 31234, | ||
| 18 | "tags": [ | ||
| 19 | ["d", "<identifier>"], | ||
| 20 | ["k", "<kind of the draft event>"], | ||
| 21 | ], | ||
| 22 | "content": nip44Encrypt(JSON.stringify(draft_event)), | ||
| 23 | // other fields | ||
| 24 | } | ||
| 25 | ``` \ No newline at end of file | ||