diff options
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 | ||