upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitor Pamplona <vitor@vitorpamplona.com>2024-03-14 08:38:37 -0400
committerVitor Pamplona <vitor@vitorpamplona.com>2024-03-14 08:38:37 -0400
commit2f2dead4cc08671b761f5e40f9a38cc32bcb26c5 (patch)
treed487ec9b5b30bb1fef44cfd7bbc6a29ddcab5014
parentde71f998289a829ac4b2c0b0e601b02a2bf755b6 (diff)
Adds draft event.
-rw-r--r--35.md25
-rw-r--r--README.md2
2 files changed, 27 insertions, 0 deletions
diff --git a/35.md b/35.md
new file mode 100644
index 0000000..ba2c786
--- /dev/null
+++ b/35.md
@@ -0,0 +1,25 @@
1NIP-35
2======
3
4Draft Events
5------------
6
7`draft` `optional`
8
9This NIP defines kind `31234` as a private draft event for any other event kind.
10
11The draft event is JSON-stringified, [NIP44-encrypted](44.md) to the owner's public key and placed inside the `.content` of the event.
12
13An 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
diff --git a/README.md b/README.md
index 90a6394..dce4aaf 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
50- [NIP-31: Dealing with Unknown Events](31.md) 50- [NIP-31: Dealing with Unknown Events](31.md)
51- [NIP-32: Labeling](32.md) 51- [NIP-32: Labeling](32.md)
52- [NIP-34: `git` stuff](34.md) 52- [NIP-34: `git` stuff](34.md)
53- [NIP-35: Draft Events](35.md)
53- [NIP-36: Sensitive Content](36.md) 54- [NIP-36: Sensitive Content](36.md)
54- [NIP-38: User Statuses](38.md) 55- [NIP-38: User Statuses](38.md)
55- [NIP-39: External Identities in Profiles](39.md) 56- [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
167| `30402` | Classified Listing | [99](99.md) | 168| `30402` | Classified Listing | [99](99.md) |
168| `30403` | Draft Classified Listing | [99](99.md) | 169| `30403` | Draft Classified Listing | [99](99.md) |
169| `30617` | Repository announcements | [34](34.md) | 170| `30617` | Repository announcements | [34](34.md) |
171| `31234` | Draft Event | [35](35.md) |
170| `31922` | Date-Based Calendar Event | [52](52.md) | 172| `31922` | Date-Based Calendar Event | [52](52.md) |
171| `31923` | Time-Based Calendar Event | [52](52.md) | 173| `31923` | Time-Based Calendar Event | [52](52.md) |
172| `31924` | Calendar | [52](52.md) | 174| `31924` | Calendar | [52](52.md) |