Adds draft event.

This commit is contained in:
Vitor Pamplona 2024-03-14 08:38:37 -04:00
parent de71f99828
commit 2f2dead4cc
2 changed files with 27 additions and 0 deletions

25
35.md Normal file
View File

@ -0,0 +1,25 @@
NIP-35
======
Draft Events
------------
`draft` `optional`
This NIP defines kind `31234` as a private draft event for any other event kind.
The draft event is JSON-stringified, [NIP44-encrypted](44.md) to the owner'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>"],
],
"content": nip44Encrypt(JSON.stringify(draft_event)),
// other fields
}
```

View File

@ -50,6 +50,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
- [NIP-31: Dealing with Unknown Events](31.md)
- [NIP-32: Labeling](32.md)
- [NIP-34: `git` stuff](34.md)
- [NIP-35: Draft Events](35.md)
- [NIP-36: Sensitive Content](36.md)
- [NIP-38: User Statuses](38.md)
- [NIP-39: External Identities in Profiles](39.md)
@ -167,6 +168,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
| `30402` | Classified Listing | [99](99.md) |
| `30403` | Draft Classified Listing | [99](99.md) |
| `30617` | Repository announcements | [34](34.md) |
| `31234` | Draft Event | [35](35.md) |
| `31922` | Date-Based Calendar Event | [52](52.md) |
| `31923` | Time-Based Calendar Event | [52](52.md) |
| `31924` | Calendar | [52](52.md) |