Step 1 of 5
Encrypt the draft to yourself
The unsigned draft event is turned into JSON, encrypted with NIP-44 from your key to your own key, and put in the content of a kind 31234. Only you can read it.
NIP-37
DraftEvents
Save unfinished posts of any kind on relays without anyone else reading them: the draft is encrypted to yourself with NIP-44 inside a kind 31234 wrap, with optional checkpoints and a private relay list.
Edit the form or the JSON: both stay in sync, the badge says whether the result is valid, and tapping any field explains it.
How the parts connect: Saving a draft
Not signed yet · Demo keys only. These personas' secret keys are public on purpose.
Select any field in the form or the JSON to see what it does.
Step 1 of 5
The unsigned draft event is turned into JSON, encrypted with NIP-44 from your key to your own key, and put in the content of a kind 31234. Only you can read it.
No course chapter covers this NIP yet. The editor above is the quickest way in.
Drafts and the relay list are NIP-44 encrypted to the author's own key.
Replaces the deprecated kind 30024 long-form drafts.
NIP-40 expiration tags let drafts expire.
Private storage relays should require NIP-42 authentication.
kind 10013 is published to the author's NIP-65 write relays.
Specification text is quoted in English from the nostr-protocol/nips repository. Our explanations and the interface are translated. Source on GitHub at commit 0046368
This NIP defines kind 31234 as an encrypted storage for unsigned draft events of any other kind.
The draft is JSON-stringified, NIP44-encrypted to the signer's public key and placed inside the .content.
k tags identify the kind of the draft.
{
"kind": 31234,
"tags": [
["d", "<identifier>"],
["k", "<kind of the draft event>"], // required
["expiration", "now + 90 days"] // recommended
],
"content": nip44Encrypt(JSON.stringify(draft_event)),
// other fields
}
A blanked .content field signals that the draft has been deleted.
NIP-40 expiration tags are recommended.
Clients SHOULD publish kind 31234 events to relays listed on kind 10013 below.
kind:1234 defines checkpoints that belong to a parent kind:31234 event. These can serve to provide a revision history of a parent event.
{
"kind": 1234,
"tags": [
["a", "31234:<pubkey>:<identifier>"]
],
"content": nip44Encrypt(JSON.stringify(draft_event)),
}
Kind 10013 indicates the user's preferred relays to store private events like Draft Wraps.
The event MUST include a list of relay URLs in private tags. Private tags are JSON Stringified, NIP44-encrypted to the signer's keys and placed inside the .content of the event.
{
"kind": 10013,
"tags": [],
"content": nip44Encrypt(
JSON.stringify(
[
["relay", "wss://myrelay.mydomain.com"]
]
)
)
//...other fields
}
It's recommended that Private Storage relays SHOULD be NIP-42-authed and only allow downloads of events signed by the authed user.
Clients MUST publish kind 10013 events to the author's NIP-65 write relays.