From 2f2dead4cc08671b761f5e40f9a38cc32bcb26c5 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 14 Mar 2024 08:38:37 -0400 Subject: [PATCH] Adds draft event. --- 35.md | 25 +++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 27 insertions(+) create mode 100644 35.md diff --git a/35.md b/35.md new file mode 100644 index 00000000..ba2c7869 --- /dev/null +++ b/35.md @@ -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", ""], + ["k", ""], + ], + "content": nip44Encrypt(JSON.stringify(draft_event)), + // other fields +} +``` \ No newline at end of file diff --git a/README.md b/README.md index 90a63949..dce4aaf2 100644 --- a/README.md +++ b/README.md @@ -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) |