mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-11-10 06:09:08 -05:00
30 lines
735 B
Markdown
30 lines
735 B
Markdown
NIP-35
|
|
======
|
|
|
|
Draft Events
|
|
------------
|
|
|
|
`draft` `optional`
|
|
|
|
This NIP defines kind `31234` as a private wrap for drafts of any other event kind.
|
|
|
|
The draft event is JSON-stringified, [NIP44-encrypted](44.md) to the signer's public key and placed inside the `.content` of the event.
|
|
|
|
An additional `k` tag identifies the kind of the draft event.
|
|
|
|
```js
|
|
{
|
|
"kind": 31234,
|
|
"tags": [
|
|
["d", "<identifier>"],
|
|
["k", "<kind of the draft event>"],
|
|
["e", "<anchor event event id>", "<relay-url>"],
|
|
["a", "<anchor event address>", "<relay-url>"],
|
|
],
|
|
"content": nip44Encrypt(JSON.stringify(draft_event)),
|
|
// other fields
|
|
}
|
|
```
|
|
|
|
Tags `e` and `a` identify one or more anchor events, such as parent events on replies.
|