diff options
| -rw-r--r-- | 22.md | 33 | ||||
| -rw-r--r-- | 29.md | 6 | ||||
| -rw-r--r-- | 32.md | 4 | ||||
| -rw-r--r-- | 37.md | 50 | ||||
| -rw-r--r-- | 44.md | 12 | ||||
| -rw-r--r-- | 47.md | 6 | ||||
| -rw-r--r-- | 51.md | 2 | ||||
| -rw-r--r-- | 94.md | 2 | ||||
| -rw-r--r-- | README.md | 17 |
9 files changed, 100 insertions, 32 deletions
| @@ -13,6 +13,9 @@ It uses `kind:1111` with plaintext `.content` (no HTML, Markdown, or other forma | |||
| 13 | Comments MUST point to the root scope using uppercase tag names (e.g. `K`, `E`, `A` or `I`) | 13 | Comments MUST point to the root scope using uppercase tag names (e.g. `K`, `E`, `A` or `I`) |
| 14 | and MUST point to the parent item with lowercase ones (e.g. `k`, `e`, `a` or `i`). | 14 | and MUST point to the parent item with lowercase ones (e.g. `k`, `e`, `a` or `i`). |
| 15 | 15 | ||
| 16 | Comments MUST point to the authors when one is available (i.e. tagging a nostr event). `P` for the root scope | ||
| 17 | and `p` for the author of the parent item. | ||
| 18 | |||
| 16 | ```jsonc | 19 | ```jsonc |
| 17 | { | 20 | { |
| 18 | kind: 1111, | 21 | kind: 1111, |
| @@ -23,10 +26,16 @@ and MUST point to the parent item with lowercase ones (e.g. `k`, `e`, `a` or `i` | |||
| 23 | // the root item kind | 26 | // the root item kind |
| 24 | ["K", "<root kind>"], | 27 | ["K", "<root kind>"], |
| 25 | 28 | ||
| 29 | // pubkey of the author of the root scope event | ||
| 30 | ["P", "<root-pubkey>", "relay-url-hint"], | ||
| 31 | |||
| 26 | // parent item: event addresses, event ids, or i-tags. | 32 | // parent item: event addresses, event ids, or i-tags. |
| 27 | ["<a, e, i>", "<address, id or i-value>", "<relay or web page hint>", "<parent event's pubkey, if an e tag>"], | 33 | ["<a, e, i>", "<address, id or i-value>", "<relay or web page hint>", "<parent event's pubkey, if an e tag>"], |
| 28 | // parent item kind | 34 | // parent item kind |
| 29 | ["k", "<parent comment kind>"] | 35 | ["k", "<parent comment kind>"], |
| 36 | |||
| 37 | // parent item pubkey | ||
| 38 | ["p", "<parent-pubkey>", "relay-url-hint"] | ||
| 30 | ] | 39 | ] |
| 31 | // other fields | 40 | // other fields |
| 32 | } | 41 | } |
| @@ -46,11 +55,6 @@ Their uppercase versions use the same type of values but relate to the root item | |||
| 46 | ``` | 55 | ``` |
| 47 | 56 | ||
| 48 | `p` tags SHOULD be used when mentioning pubkeys in the `.content` with [NIP-21](21.md). | 57 | `p` tags SHOULD be used when mentioning pubkeys in the `.content` with [NIP-21](21.md). |
| 49 | If the parent item is an event, a `p` tag set to the parent event's author SHOULD be added. | ||
| 50 | |||
| 51 | ```json | ||
| 52 | ["p", "<pubkey>", "<relay-url>"] | ||
| 53 | ``` | ||
| 54 | 58 | ||
| 55 | ## Examples | 59 | ## Examples |
| 56 | 60 | ||
| @@ -65,13 +69,17 @@ A comment on a blog post looks like this: | |||
| 65 | ["A", "30023:3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289:f9347ca7", "wss://example.relay"], | 69 | ["A", "30023:3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289:f9347ca7", "wss://example.relay"], |
| 66 | // the root kind | 70 | // the root kind |
| 67 | ["K", "30023"], | 71 | ["K", "30023"], |
| 72 | // author of root event | ||
| 73 | ["P", "3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289", "wss://example.relay"] | ||
| 68 | 74 | ||
| 69 | // the parent event address (same as root for top-level comments) | 75 | // the parent event address (same as root for top-level comments) |
| 70 | ["a", "30023:3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289:f9347ca7", "wss://example.relay"], | 76 | ["a", "30023:3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289:f9347ca7", "wss://example.relay"], |
| 71 | // when the parent event is replaceable or addressable, also include an `e` tag referencing its id | 77 | // when the parent event is replaceable or addressable, also include an `e` tag referencing its id |
| 72 | ["e", "5b4fc7fed15672fefe65d2426f67197b71ccc82aa0cc8a9e94f683eb78e07651", "wss://example.relay"], | 78 | ["e", "5b4fc7fed15672fefe65d2426f67197b71ccc82aa0cc8a9e94f683eb78e07651", "wss://example.relay"], |
| 73 | // the parent event kind | 79 | // the parent event kind |
| 74 | ["k", "30023"] | 80 | ["k", "30023"], |
| 81 | // author of the parent event | ||
| 82 | ["p", "3c9849383bdea883b0bd16fece1ed36d37e37cdde3ce43b17ea4e9192ec11289", "wss://example.relay"] | ||
| 75 | ] | 83 | ] |
| 76 | // other fields | 84 | // other fields |
| 77 | } | 85 | } |
| @@ -88,11 +96,14 @@ A comment on a [NIP-94](94.md) file looks like this: | |||
| 88 | ["E", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb"], | 96 | ["E", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb"], |
| 89 | // the root kind | 97 | // the root kind |
| 90 | ["K", "1063"], | 98 | ["K", "1063"], |
| 99 | // author of the root event | ||
| 100 | ["P", "3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb"], | ||
| 91 | 101 | ||
| 92 | // the parent event id (same as root for top-level comments) | 102 | // the parent event id (same as root for top-level comments) |
| 93 | ["e", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb"], | 103 | ["e", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb"], |
| 94 | // the parent kind | 104 | // the parent kind |
| 95 | ["k", "1063"] | 105 | ["k", "1063"], |
| 106 | ["p", "3721e07b079525289877c366ccab47112bdff3d1b44758ca333feb2dbbbbe5bb"] | ||
| 96 | ] | 107 | ] |
| 97 | // other fields | 108 | // other fields |
| 98 | } | 109 | } |
| @@ -109,11 +120,13 @@ A reply to a comment looks like this: | |||
| 109 | ["E", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "fd913cd6fa9edb8405750cd02a8bbe16e158b8676c0e69fdc27436cc4a54cc9a"], | 120 | ["E", "768ac8720cdeb59227cf95e98b66560ef03d8bc9a90d721779e76e68fb42f5e6", "wss://example.relay", "fd913cd6fa9edb8405750cd02a8bbe16e158b8676c0e69fdc27436cc4a54cc9a"], |
| 110 | // the root kind | 121 | // the root kind |
| 111 | ["K", "1063"], | 122 | ["K", "1063"], |
| 123 | ["P", "fd913cd6fa9edb8405750cd02a8bbe16e158b8676c0e69fdc27436cc4a54cc9a"], | ||
| 112 | 124 | ||
| 113 | // the parent event | 125 | // the parent event |
| 114 | ["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://example.relay", "93ef2ebaaf9554661f33e79949007900bbc535d239a4c801c33a4d67d3e7f546"], | 126 | ["e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://example.relay", "93ef2ebaaf9554661f33e79949007900bbc535d239a4c801c33a4d67d3e7f546"], |
| 115 | // the parent kind | 127 | // the parent kind |
| 116 | ["k", "1111"] | 128 | ["k", "1111"], |
| 129 | ["p", "93ef2ebaaf9554661f33e79949007900bbc535d239a4c801c33a4d67d3e7f546"] | ||
| 117 | ] | 130 | ] |
| 118 | // other fields | 131 | // other fields |
| 119 | } | 132 | } |
| @@ -178,7 +191,9 @@ A reply to a podcast comment: | |||
| 178 | ["e", "80c48d992a38f9c445b943a9c9f1010b396676013443765750431a9004bdac05", "wss://example.relay", "252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111"], | 191 | ["e", "80c48d992a38f9c445b943a9c9f1010b396676013443765750431a9004bdac05", "wss://example.relay", "252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111"], |
| 179 | // the parent comment kind | 192 | // the parent comment kind |
| 180 | ["k", "1111"] | 193 | ["k", "1111"] |
| 194 | ["p", "252f10c83610ebca1a059c0bae8255eba2f95be4d1d7bcfa89d7248a82d9f111"] | ||
| 181 | ] | 195 | ] |
| 182 | // other fields | 196 | // other fields |
| 183 | } | 197 | } |
| 184 | ``` | 198 | ``` |
| 199 | |||
| @@ -30,8 +30,6 @@ When encountering just the `<host>` without the `'<group-id>`, clients MAY infer | |||
| 30 | 30 | ||
| 31 | Events sent by users to groups (chat messages, text notes, moderation events etc) MUST have an `h` tag with the value set to the group _id_. | 31 | Events sent by users to groups (chat messages, text notes, moderation events etc) MUST have an `h` tag with the value set to the group _id_. |
| 32 | 32 | ||
| 33 | `h` tags MAY include the group's name as the second argument. This allows `unmanaged` groups to be assigned human-readable names without relay support. | ||
| 34 | |||
| 35 | ## Timeline references | 33 | ## Timeline references |
| 36 | 34 | ||
| 37 | In order to not be used out of context, events sent to these groups may contain references to previous events seen from the same relay in the `previous` tag. The choice of which previous events to pick belongs to the clients. The references are to be made using the first 8 characters (4 bytes) of any event in the last 50 events seen by the user in the relay, excluding events by themselves. There can be any number of references (including zero), but it's recommended that clients include at least 3 and that relays enforce this. | 35 | In order to not be used out of context, events sent to these groups may contain references to previous events seen from the same relay in the `previous` tag. The choice of which previous events to pick belongs to the clients. The references are to be made using the first 8 characters (4 bytes) of any event in the last 50 events seen by the user in the relay, excluding events by themselves. There can be any number of references (including zero), but it's recommended that clients include at least 3 and that relays enforce this. |
| @@ -72,7 +70,7 @@ These are events that can be sent by users to manage their situation in a group, | |||
| 72 | 70 | ||
| 73 | - *join request* (`kind:9021`) | 71 | - *join request* (`kind:9021`) |
| 74 | 72 | ||
| 75 | Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them. | 73 | Any user can send a kind `9021` event to the relay in order to request admission to the group. Relays MUST reject the request if the user has not been added to the group. The accompanying error message SHOULD explain whether the rejection is final, if the request is pending review, or if some other special handling is relevant (e.g. if payment is required). If a user is already a member, the event MUST be rejected with `duplicate: ` as the error message prefix. |
| 76 | 74 | ||
| 77 | ```json | 75 | ```json |
| 78 | { | 76 | { |
| @@ -242,3 +240,5 @@ A definition for `kind:10009` was included in [NIP-51](51.md) that allows client | |||
| 242 | ### Using `unmanaged` relays | 240 | ### Using `unmanaged` relays |
| 243 | 241 | ||
| 244 | To prevent event leakage, when using `unmanaged` relays, clients should include the [NIP-70](70.md) `-` tag, as just the `previous` tag won't be checked by other `unmanaged` relays. | 242 | To prevent event leakage, when using `unmanaged` relays, clients should include the [NIP-70](70.md) `-` tag, as just the `previous` tag won't be checked by other `unmanaged` relays. |
| 243 | |||
| 244 | Groups MAY be named without relay support by adding a `name` to the corresponding tag in a user's `kind 10009` group list. | ||
| @@ -157,7 +157,7 @@ considered open for public use, and not proprietary. In other words, if there is | |||
| 157 | namespace that fits your use case, use it even if it points to someone else's domain name. | 157 | namespace that fits your use case, use it even if it points to someone else's domain name. |
| 158 | 158 | ||
| 159 | Vocabularies MAY choose to fully qualify all labels within a namespace (for example, | 159 | Vocabularies MAY choose to fully qualify all labels within a namespace (for example, |
| 160 | `["l", "com.example.vocabulary:my-label"]`. This may be preferred when defining more | 160 | `["l", "com.example.vocabulary:my-label"]`). This may be preferred when defining more |
| 161 | formal vocabularies that should not be confused with another namespace when querying | 161 | formal vocabularies that should not be confused with another namespace when querying |
| 162 | without an `L` tag. For these vocabularies, all labels SHOULD include the namespace | 162 | without an `L` tag. For these vocabularies, all labels SHOULD include the namespace |
| 163 | (rather than mixing qualified and unqualified labels). | 163 | (rather than mixing qualified and unqualified labels). |
| @@ -173,4 +173,4 @@ Appendix: Known Ontologies | |||
| 173 | 173 | ||
| 174 | Below is a non-exhaustive list of ontologies currently in widespread use. | 174 | Below is a non-exhaustive list of ontologies currently in widespread use. |
| 175 | 175 | ||
| 176 | - [social.ontolo.categories](https://ontolo.social/) | 176 | - [social ontology categories](https://github.com/CLARIAH/awesome-humanities-ontologies) |
| @@ -0,0 +1,50 @@ | |||
| 1 | NIP-37 | ||
| 2 | ====== | ||
| 3 | |||
| 4 | Draft Events | ||
| 5 | ------------ | ||
| 6 | |||
| 7 | `draft` `optional` | ||
| 8 | |||
| 9 | This NIP defines kind `31234` as a private wrap for drafts of any other event kind. | ||
| 10 | |||
| 11 | The draft event is JSON-stringified, [NIP44-encrypted](44.md) to the signer's public key and placed inside the `.content` of the event. | ||
| 12 | |||
| 13 | An 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 | ["e", "<anchor event event id>", "<relay-url>"], | ||
| 22 | ["a", "<anchor event address>", "<relay-url>"], | ||
| 23 | ], | ||
| 24 | "content": nip44Encrypt(JSON.stringify(draft_event)), | ||
| 25 | // other fields | ||
| 26 | } | ||
| 27 | ``` | ||
| 28 | |||
| 29 | A blanked `.content` means this draft has been deleted by a client but relays still have the event. | ||
| 30 | |||
| 31 | Tags `e` and `a` identify one or more anchor events, such as parent events on replies. | ||
| 32 | |||
| 33 | ## Relay List for Private Content | ||
| 34 | |||
| 35 | 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. | ||
| 36 | |||
| 37 | ```js | ||
| 38 | { | ||
| 39 | "kind": 10013, | ||
| 40 | "tags": [], | ||
| 41 | "content": nip44Encrypt(JSON.stringify([ | ||
| 42 | ["relay", "wss://myrelay.mydomain.com"] | ||
| 43 | ])) | ||
| 44 | //...other fields | ||
| 45 | } | ||
| 46 | ``` | ||
| 47 | |||
| 48 | Relays listed in this event SHOULD be authed and only allow downloads to events signed by the authed user. | ||
| 49 | |||
| 50 | Clients SHOULD publish kind `10013` events to the author's [NIP-65](65.md) `write` relays. | ||
| @@ -8,11 +8,11 @@ Encrypted Payloads (Versioned) | |||
| 8 | 8 | ||
| 9 | The NIP introduces a new data format for keypair-based encryption. This NIP is versioned | 9 | The NIP introduces a new data format for keypair-based encryption. This NIP is versioned |
| 10 | to allow multiple algorithm choices to exist simultaneously. This format may be used for | 10 | to allow multiple algorithm choices to exist simultaneously. This format may be used for |
| 11 | many things, but MUST be used in the context of a signed event as described in NIP 01. | 11 | many things, but MUST be used in the context of a signed event as described in NIP-01. |
| 12 | 12 | ||
| 13 | *Note*: this format DOES NOT define any `kind`s related to a new direct messaging standard, | 13 | *Note*: this format DOES NOT define any `kind`s related to a new direct messaging standard, |
| 14 | only the encryption required to define one. It SHOULD NOT be used as a drop-in replacement | 14 | only the encryption required to define one. It SHOULD NOT be used as a drop-in replacement |
| 15 | for NIP 04 payloads. | 15 | for NIP-04 payloads. |
| 16 | 16 | ||
| 17 | ## Versions | 17 | ## Versions |
| 18 | 18 | ||
| @@ -41,7 +41,7 @@ On its own, messages sent using this scheme have a number of important shortcomi | |||
| 41 | - No post-compromise security: when a key is compromised, it is possible to decrypt all future conversations | 41 | - No post-compromise security: when a key is compromised, it is possible to decrypt all future conversations |
| 42 | - No post-quantum security: a powerful quantum computer would be able to decrypt the messages | 42 | - No post-quantum security: a powerful quantum computer would be able to decrypt the messages |
| 43 | - IP address leak: user IP may be seen by relays and all intermediaries between user and relay | 43 | - IP address leak: user IP may be seen by relays and all intermediaries between user and relay |
| 44 | - Date leak: `created_at` is public, since it is a part of NIP 01 event | 44 | - Date leak: `created_at` is public, since it is a part of NIP-01 event |
| 45 | - Limited message size leak: padding only partially obscures true message length | 45 | - Limited message size leak: padding only partially obscures true message length |
| 46 | - No attachments: they are not supported | 46 | - No attachments: they are not supported |
| 47 | 47 | ||
| @@ -86,7 +86,7 @@ NIP-44 version 2 has the following design characteristics: | |||
| 86 | - Content must be encoded from UTF-8 into byte array | 86 | - Content must be encoded from UTF-8 into byte array |
| 87 | - Validate plaintext length. Minimum is 1 byte, maximum is 65535 bytes | 87 | - Validate plaintext length. Minimum is 1 byte, maximum is 65535 bytes |
| 88 | - Padding format is: `[plaintext_length: u16][plaintext][zero_bytes]` | 88 | - Padding format is: `[plaintext_length: u16][plaintext][zero_bytes]` |
| 89 | - Padding algorithm is related to powers-of-two, with min padded msg size of 32bytes | 89 | - Padding algorithm is related to powers-of-two, with min padded msg size of 32 bytes |
| 90 | - Plaintext length is encoded in big-endian as first 2 bytes of the padded blob | 90 | - Plaintext length is encoded in big-endian as first 2 bytes of the padded blob |
| 91 | 5. Encrypt padded content | 91 | 5. Encrypt padded content |
| 92 | - Use ChaCha20, with key and nonce from step 3 | 92 | - Use ChaCha20, with key and nonce from step 3 |
| @@ -148,8 +148,8 @@ validation rules, refer to BIP-340. | |||
| 148 | - `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the | 148 | - `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the |
| 149 | `i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`. | 149 | `i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`. |
| 150 | - Constants `c`: | 150 | - Constants `c`: |
| 151 | - `min_plaintext_size` is 1. 1bytes msg is padded to 32bytes. | 151 | - `min_plaintext_size` is 1. 1 byte msg is padded to 32 bytes. |
| 152 | - `max_plaintext_size` is 65535 (64kB - 1). It is padded to 65536bytes. | 152 | - `max_plaintext_size` is 65535 (64kB - 1). It is padded to 65536 bytes. |
| 153 | - Functions | 153 | - Functions |
| 154 | - `base64_encode(string)` and `base64_decode(bytes)` are Base64 ([RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648), with padding) | 154 | - `base64_encode(string)` and `base64_decode(bytes)` are Base64 ([RFC 4648](https://datatracker.ietf.org/doc/html/rfc4648), with padding) |
| 155 | - `concat` refers to byte array concatenation | 155 | - `concat` refers to byte array concatenation |
| @@ -107,7 +107,7 @@ The content of notifications is encrypted with [NIP04](https://github.com/nostr- | |||
| 107 | ## Nostr Wallet Connect URI | 107 | ## Nostr Wallet Connect URI |
| 108 | **client** discovers **wallet service** by scanning a QR code, handling a deeplink or pasting in a URI. | 108 | **client** discovers **wallet service** by scanning a QR code, handling a deeplink or pasting in a URI. |
| 109 | 109 | ||
| 110 | The **wallet service** generates this connection URI with protocol `nostr+walletconnect://` and base path it's hex-encoded `pubkey` with the following query string parameters: | 110 | The **wallet service** generates this connection URI with protocol `nostr+walletconnect://` and base path its hex-encoded `pubkey` with the following query string parameters: |
| 111 | 111 | ||
| 112 | - `relay` Required. URL of the relay where the **wallet service** is connected and will be listening for events. May be more than one. | 112 | - `relay` Required. URL of the relay where the **wallet service** is connected and will be listening for events. May be more than one. |
| 113 | - `secret` Required. 32-byte randomly generated hex encoded string. The **client** MUST use this to sign events and encrypt payloads when communicating with the **wallet service**. | 113 | - `secret` Required. 32-byte randomly generated hex encoded string. The **client** MUST use this to sign events and encrypt payloads when communicating with the **wallet service**. |
| @@ -175,7 +175,7 @@ Request: | |||
| 175 | Response: | 175 | Response: |
| 176 | 176 | ||
| 177 | For every invoice in the request, a separate response event is sent. To differentiate between the responses, each | 177 | For every invoice in the request, a separate response event is sent. To differentiate between the responses, each |
| 178 | response event contains a `d` tag with the id of the invoice it is responding to, if no id was given, then the | 178 | response event contains a `d` tag with the id of the invoice it is responding to; if no id was given, then the |
| 179 | payment hash of the invoice should be used. | 179 | payment hash of the invoice should be used. |
| 180 | 180 | ||
| 181 | ```jsonc | 181 | ```jsonc |
| @@ -247,7 +247,7 @@ Request: | |||
| 247 | Response: | 247 | Response: |
| 248 | 248 | ||
| 249 | For every keysend in the request, a separate response event is sent. To differentiate between the responses, each | 249 | For every keysend in the request, a separate response event is sent. To differentiate between the responses, each |
| 250 | response event contains an `d` tag with the id of the keysend it is responding to, if no id was given, then the | 250 | response event contains a `d` tag with the id of the keysend it is responding to; if no id was given, then the |
| 251 | pubkey should be used. | 251 | pubkey should be used. |
| 252 | 252 | ||
| 253 | ```jsonc | 253 | ```jsonc |
| @@ -29,7 +29,7 @@ For example, _mute list_ can contain the public keys of spammers and bad actors | |||
| 29 | | Public chats | 10005 | [NIP-28](28.md) chat channels the user is in | `"e"` (kind:40 channel definitions) | | 29 | | Public chats | 10005 | [NIP-28](28.md) chat channels the user is in | `"e"` (kind:40 channel definitions) | |
| 30 | | Blocked relays | 10006 | relays clients should never connect to | `"relay"` (relay URLs) | | 30 | | Blocked relays | 10006 | relays clients should never connect to | `"relay"` (relay URLs) | |
| 31 | | Search relays | 10007 | relays clients should use when performing search queries | `"relay"` (relay URLs) | | 31 | | Search relays | 10007 | relays clients should use when performing search queries | `"relay"` (relay URLs) | |
| 32 | | Simple groups | 10009 | [NIP-29](29.md) groups the user is in | `"group"` ([NIP-29](29.md) group id + relay URL), `"r"` for each relay in use | | 32 | | Simple groups | 10009 | [NIP-29](29.md) groups the user is in | `"group"` ([NIP-29](29.md) group id + relay URL + optional group name), `"r"` for each relay in use | |
| 33 | | Interests | 10015 | topics a user may be interested in and pointers | `"t"` (hashtags) and `"a"` (kind:30015 interest set) | | 33 | | Interests | 10015 | topics a user may be interested in and pointers | `"t"` (hashtags) and `"a"` (kind:30015 interest set) | |
| 34 | | Emojis | 10030 | user preferred emojis and pointers to emoji sets | `"emoji"` (see [NIP-30](30.md)) and `"a"` (kind:30030 emoji set) | | 34 | | Emojis | 10030 | user preferred emojis and pointers to emoji sets | `"emoji"` (see [NIP-30](30.md)) and `"a"` (kind:30030 emoji set) | |
| 35 | | DM relays | 10050 | Where to receive [NIP-17](17.md) direct messages | `"relay"` (see [NIP-17](17.md)) | | 35 | | DM relays | 10050 | Where to receive [NIP-17](17.md) direct messages | `"relay"` (see [NIP-17](17.md)) | |
| @@ -10,7 +10,7 @@ The purpose of this NIP is to allow an organization and classification of shared | |||
| 10 | 10 | ||
| 11 | ## Event format | 11 | ## Event format |
| 12 | 12 | ||
| 13 | This NIP specifies the use of the `1063` event type, having in `content` a description of the file content, and a list of tags described below: | 13 | This NIP specifies the use of the `1063` event kind, having in `content` a description of the file content, and a list of tags described below: |
| 14 | 14 | ||
| 15 | * `url` the url to download the file | 15 | * `url` the url to download the file |
| 16 | * `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase. | 16 | * `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase. |
| @@ -54,14 +54,15 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | |||
| 54 | - [NIP-34: `git` stuff](34.md) | 54 | - [NIP-34: `git` stuff](34.md) |
| 55 | - [NIP-35: Torrents](35.md) | 55 | - [NIP-35: Torrents](35.md) |
| 56 | - [NIP-36: Sensitive Content](36.md) | 56 | - [NIP-36: Sensitive Content](36.md) |
| 57 | - [NIP-37: Draft Events](37.md) | ||
| 57 | - [NIP-38: User Statuses](38.md) | 58 | - [NIP-38: User Statuses](38.md) |
| 58 | - [NIP-39: External Identities in Profiles](39.md) | 59 | - [NIP-39: External Identities in Profiles](39.md) |
| 59 | - [NIP-40: Expiration Timestamp](40.md) | 60 | - [NIP-40: Expiration Timestamp](40.md) |
| 60 | - [NIP-42: Authentication of clients to relays](42.md) | 61 | - [NIP-42: Authentication of clients to relays](42.md) |
| 61 | - [NIP-44: Versioned Encryption](44.md) | 62 | - [NIP-44: Encrypted Payloads (Versioned)](44.md) |
| 62 | - [NIP-45: Counting results](45.md) | 63 | - [NIP-45: Counting results](45.md) |
| 63 | - [NIP-46: Nostr Connect](46.md) | 64 | - [NIP-46: Nostr Remote Signing](46.md) |
| 64 | - [NIP-47: Wallet Connect](47.md) | 65 | - [NIP-47: Nostr Wallet Connect](47.md) |
| 65 | - [NIP-48: Proxy Tags](48.md) | 66 | - [NIP-48: Proxy Tags](48.md) |
| 66 | - [NIP-49: Private Key Encryption](49.md) | 67 | - [NIP-49: Private Key Encryption](49.md) |
| 67 | - [NIP-50: Search Capability](50.md) | 68 | - [NIP-50: Search Capability](50.md) |
| @@ -169,6 +170,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | |||
| 169 | | `10006` | Blocked relays list | [51](51.md) | | 170 | | `10006` | Blocked relays list | [51](51.md) | |
| 170 | | `10007` | Search relays list | [51](51.md) | | 171 | | `10007` | Search relays list | [51](51.md) | |
| 171 | | `10009` | User groups | [51](51.md), [29](29.md) | | 172 | | `10009` | User groups | [51](51.md), [29](29.md) | |
| 173 | | `10013` | Draft relays | [37](37.md) | | ||
| 172 | | `10015` | Interests list | [51](51.md) | | 174 | | `10015` | Interests list | [51](51.md) | |
| 173 | | `10019` | Nutzap Mint Recommendation | [61](61.md) | | 175 | | `10019` | Nutzap Mint Recommendation | [61](61.md) | |
| 174 | | `10030` | User emoji list | [51](51.md) | | 176 | | `10030` | User emoji list | [51](51.md) | |
| @@ -213,6 +215,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | |||
| 213 | | `30618` | Repository state announcements | [34](34.md) | | 215 | | `30618` | Repository state announcements | [34](34.md) | |
| 214 | | `30818` | Wiki article | [54](54.md) | | 216 | | `30818` | Wiki article | [54](54.md) | |
| 215 | | `30819` | Redirects | [54](54.md) | | 217 | | `30819` | Redirects | [54](54.md) | |
| 218 | | `31234` | Draft Event | [37](37.md) | | ||
| 216 | | `31388` | Link Set | [Corny Chat][cornychat-linkset] | | 219 | | `31388` | Link Set | [Corny Chat][cornychat-linkset] | |
| 217 | | `31890` | Feed | [NUD: Custom Feeds][NUD: Custom Feeds] | | 220 | | `31890` | Feed | [NUD: Custom Feeds][NUD: Custom Feeds] | |
| 218 | | `31922` | Date-Based Calendar Event | [52](52.md) | | 221 | | `31922` | Date-Based Calendar Event | [52](52.md) | |
| @@ -282,8 +285,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | |||
| 282 | | `l` | label, label namespace | -- | [32](32.md) | | 285 | | `l` | label, label namespace | -- | [32](32.md) | |
| 283 | | `L` | label namespace | -- | [32](32.md) | | 286 | | `L` | label namespace | -- | [32](32.md) | |
| 284 | | `m` | MIME type | -- | [94](94.md) | | 287 | | `m` | MIME type | -- | [94](94.md) | |
| 285 | | `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) | | 288 | | `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md), [22](22.md) | |
| 286 | | `P` | pubkey (hex) | -- | [57](57.md) | | 289 | | `P` | pubkey (hex) | -- | [22](22.md), [57](57.md) | |
| 287 | | `q` | event id (hex) | relay URL, pubkey (hex) | [18](18.md) | | 290 | | `q` | event id (hex) | relay URL, pubkey (hex) | [18](18.md) | |
| 288 | | `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) | | 291 | | `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) | |
| 289 | | `r` | relay url | marker | [65](65.md) | | 292 | | `r` | relay url | marker | [65](65.md) | |
| @@ -341,9 +344,9 @@ Please update these lists when proposing new NIPs. | |||
| 341 | 344 | ||
| 342 | ## Is this repository a centralizing factor? | 345 | ## Is this repository a centralizing factor? |
| 343 | 346 | ||
| 344 | To promote interoperability, we standards that everybody can follow, and we need them to define a **single way of doing each thing** without ever hurting **backwards-compatibility**, and for that purpose there is no way around getting everybody to agree on the same thing and keep a centralized index of these standards. However the fact that such index exists doesn't hurt the decentralization of Nostr. _At any point the central index can be challenged if it is failing to fulfill the needs of the protocol_ and it can migrate to other places and be maintained by other people. | 347 | To promote interoperability, we need standards that everybody can follow, and we need them to define a **single way of doing each thing** without ever hurting **backwards-compatibility**, and for that purpose there is no way around getting everybody to agree on the same thing and keep a centralized index of these standards. However the fact that such an index exists doesn't hurt the decentralization of Nostr. _At any point the central index can be challenged if it is failing to fulfill the needs of the protocol_ and it can migrate to other places and be maintained by other people. |
| 345 | 348 | ||
| 346 | It can even fork into multiple and then some clients would go one way, others would go another way, and some clients would adhere to both competing standards. This would hurt the simplicity, openness and interoperability of Nostr a little, but everything would still work in the short term. | 349 | It can even fork into multiple versions, and then some clients would go one way, others would go another way, and some clients would adhere to both competing standards. This would hurt the simplicity, openness and interoperability of Nostr a little, but everything would still work in the short term. |
| 347 | 350 | ||
| 348 | There is a list of notable Nostr software developers who have commit access to this repository, but that exists mostly for practical reasons, as by the nature of the thing we're dealing with the repository owner can revoke membership and rewrite history as they want -- and if these actions are unjustified or perceived as bad or evil the community must react. | 351 | There is a list of notable Nostr software developers who have commit access to this repository, but that exists mostly for practical reasons, as by the nature of the thing we're dealing with the repository owner can revoke membership and rewrite history as they want -- and if these actions are unjustified or perceived as bad or evil the community must react. |
| 349 | 352 | ||