2024-03-14 08:38:37 -04:00
|
|
|
NIP-35
|
|
|
|
======
|
|
|
|
|
|
|
|
Draft Events
|
|
|
|
------------
|
|
|
|
|
|
|
|
`draft` `optional`
|
|
|
|
|
2024-03-14 08:52:58 -04:00
|
|
|
This NIP defines kind `31234` as a private wrap for drafts of any other event kind.
|
2024-03-14 08:38:37 -04:00
|
|
|
|
2024-03-14 08:52:58 -04:00
|
|
|
The draft event is JSON-stringified, [NIP44-encrypted](44.md) to the signer's public key and placed inside the `.content` of the event.
|
2024-03-14 08:38:37 -04:00
|
|
|
|
|
|
|
An additional `k` tag identifies the kind of the draft event.
|
|
|
|
|
|
|
|
```js
|
|
|
|
{
|
|
|
|
"kind": 31234,
|
|
|
|
"tags": [
|
|
|
|
["d", "<identifier>"],
|
|
|
|
["k", "<kind of the draft event>"],
|
2024-03-14 14:07:23 -04:00
|
|
|
["e", "<anchor event event id>", "<relay-url>"],
|
|
|
|
["a", "<anchor event address>", "<relay-url>"],
|
2024-03-14 08:38:37 -04:00
|
|
|
],
|
|
|
|
"content": nip44Encrypt(JSON.stringify(draft_event)),
|
|
|
|
// other fields
|
|
|
|
}
|
2024-03-14 14:07:23 -04:00
|
|
|
```
|
|
|
|
|
2024-03-29 11:39:19 -04:00
|
|
|
A blanked `.content` means this draft has been deleted by a client but relays still have the event.
|
|
|
|
|
2024-03-14 14:07:23 -04:00
|
|
|
Tags `e` and `a` identify one or more anchor events, such as parent events on replies.
|