From 48674e563865b1cb7bb3c5c7869d20055446f408 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Thu, 30 May 2024 15:31:33 -0400 Subject: moves from NIP-35 to NIP-37 --- 35.md | 50 -------------------------------------------------- 37.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 6 +++--- 3 files changed, 53 insertions(+), 53 deletions(-) delete mode 100644 35.md create mode 100644 37.md diff --git a/35.md b/35.md deleted file mode 100644 index 45663dd..0000000 --- a/35.md +++ /dev/null @@ -1,50 +0,0 @@ -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", ""], - ["k", ""], - ["e", "", ""], - ["a", "", ""], - ], - "content": nip44Encrypt(JSON.stringify(draft_event)), - // other fields -} -``` - -A blanked `.content` means this draft has been deleted by a client but relays still have the event. - -Tags `e` and `a` identify one or more anchor events, such as parent events on replies. - -## Relay List for Private Content - -Kind `10013` indicates the user's preferred relays to store private events like Drafts. The event MUST include a list of `relay` URLs in private tags. Private tags are JSON Stringified, NIP-44-encrypted to the signer's keys and placed inside the .content of the event. - -```js -{ - "kind": 10013, - "tags": [], - "content": nip44Encrypt(JSON.stringify([ - ["relay", "wss://myrelay.mydomain.com"] - ])) - //...other fields -} -``` - -Relays listed in this event SHOULD be authed and only allow downloads to events signed by the authed user. - -Clients SHOULD publish kind `10013` events to the author's [NIP-65](65.md) `write` relays. diff --git a/37.md b/37.md new file mode 100644 index 0000000..1ade59d --- /dev/null +++ b/37.md @@ -0,0 +1,50 @@ +NIP-37 +====== + +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", ""], + ["k", ""], + ["e", "", ""], + ["a", "", ""], + ], + "content": nip44Encrypt(JSON.stringify(draft_event)), + // other fields +} +``` + +A blanked `.content` means this draft has been deleted by a client but relays still have the event. + +Tags `e` and `a` identify one or more anchor events, such as parent events on replies. + +## Relay List for Private Content + +Kind `10013` indicates the user's preferred relays to store private events like Drafts. The event MUST include a list of `relay` URLs in private tags. Private tags are JSON Stringified, NIP-44-encrypted to the signer's keys and placed inside the .content of the event. + +```js +{ + "kind": 10013, + "tags": [], + "content": nip44Encrypt(JSON.stringify([ + ["relay", "wss://myrelay.mydomain.com"] + ])) + //...other fields +} +``` + +Relays listed in this event SHOULD be authed and only allow downloads to events signed by the authed user. + +Clients SHOULD publish kind `10013` events to the author's [NIP-65](65.md) `write` relays. diff --git a/README.md b/README.md index 6cd4778..b4626aa 100644 --- a/README.md +++ b/README.md @@ -50,8 +50,8 @@ 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-37: Draft Events](37.md) - [NIP-38: User Statuses](38.md) - [NIP-39: External Identities in Profiles](39.md) - [NIP-40: Expiration Timestamp](40.md) @@ -136,7 +136,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `10006` | Blocked relays list | [51](51.md) | | `10007` | Search relays list | [51](51.md) | | `10009` | User groups | [51](51.md), [29](29.md) | -| `10013` | Private Relays | [35](35.md) +| `10013` | Private Relays | [35](37.md) | | `10015` | Interests list | [51](51.md) | | `10030` | User emoji list | [51](51.md) | | `10096` | File storage server list | [96](96.md) | @@ -169,7 +169,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) | +| `31234` | Draft Event | [35](37.md) | | `31922` | Date-Based Calendar Event | [52](52.md) | | `31923` | Time-Based Calendar Event | [52](52.md) | | `31924` | Calendar | [52](52.md) | -- cgit v1.2.3