upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfiatjaf <faitjaf@gmail.com>2022-05-01 07:48:57 -0300
committerfiatjaf <faitjaf@gmail.com>2022-05-01 07:48:57 -0300
commitf25c7e672c23ca5463fa5c0fcb5e5f424d956862 (patch)
tree597462ec02ed56ef53f268279a31f62edd3f37eb
migrate nips from main nostr repo.
-rw-r--r--01.md107
-rw-r--r--02.md73
-rw-r--r--03.md23
-rw-r--r--04.md43
-rw-r--r--05.md52
-rw-r--r--06.md15
-rw-r--r--08.md17
-rw-r--r--09.md46
-rw-r--r--11.md58
-rw-r--r--12.md38
-rw-r--r--README.md26
11 files changed, 498 insertions, 0 deletions
diff --git a/01.md b/01.md
new file mode 100644
index 0000000..39aac0e
--- /dev/null
+++ b/01.md
@@ -0,0 +1,107 @@
1NIP-01
2======
3
4Basic protocol flow description
5-------------------------------
6
7`draft` `mandatory` `author:fiatjaf` `author:distbit` `author:scsibug` `author:kukks`
8
9This NIP defines the basic protocol that should be implemented by everybody. New NIPs may add new optional (or mandatory) fields and messages and features to the structures and flows described here.
10
11## Events and signatures
12
13Each user has a keypair. Signatures, public key and encodings are done according to the [Schnorr signatures standard for the curve `secp256k1`](https://bips.xyz/340).
14
15The only object type that exists is the `event`, which has the following format on the wire:
16
17```
18{
19 "id": <32-bytes sha256 of the the serialized event data>
20 "pubkey": <32-bytes hex-encoded public key of the event creator>,
21 "created_at": <unix timestamp in seconds>,
22 "kind": <integer>,
23 "tags": [
24 ["e", <32-bytes hex of the id of another event>, <recommended relay URL>],
25 ["p", <32-bytes hex of the key>, <recommended relay URL>],
26 ... // other kinds of tags may be included later
27 ]
28 "content": <arbitrary string>,
29 "sig": <64-bytes signature of the sha256 hash of the serialized event data, which is the same as the "id" field>,
30}
31```
32
33To obtain the `event.id`, we `sha256` the serialized event. The serialization is done over the UTF-8 JSON-serialized string (with no indentation or extra spaces) of the following structure:
34
35```
36[
37 0,
38 <pubkey, as a (lowercase) hex string>,
39 <created_at, as a number>,
40 <kind, as a number>,
41 <tags, as an array of arrays of strings>,
42 <content, as a string>
43]
44```
45
46## Communication between clients and relays
47
48Relays expose a websocket endpoint to which clients can connect.
49
50### From client to relay: sending events and creating subscriptions
51
52Clients can send 3 types of messages, which must be JSON arrays, according to the following patterns:
53
54 * `["EVENT", <event JSON as defined above>`], used to publish events.
55 * `["REQ", <subscription_id>, <filters JSON>...`], used to request events and subscribe to new updates.
56 * `["CLOSE", <subscription_id>]`, used to stop previous subscriptions.
57
58`<subscription_id>` is a random string that should be used to represent a subscription.
59
60`<filters>` is a JSON object that determines what events will be sent in that subscription, it can have the following attributes:
61
62```
63{
64 "ids": <a list of event ids or prefixes>,
65 "kinds": <a list of a kind numbers>,
66 "#e": <a list of event ids that are referenced in an "e" tag>,
67 "#p": <a list of pubkeys that are referenced in a "p" tag>,
68 "since": <a timestamp, events must be newer than this to pass>,
69 "until": <a timestamp, events must be older than this to pass>,
70 "authors": <a list of pubkeys or prefixes, the pubkey of an event must be one of these>
71}
72```
73
74Upon receiving a `REQ` message, the relay MUST query its internal database and return events that match the filter, then store that filter and send again all future events it receives to that same websocket until the websocket is closed. The `CLOSE` event is received with the same `<subscription_id>` or a new `REQ` is sent using the same `<subscription_id>`, in which case it should overwrite the previous subscription.
75
76Filter attributes containing lists (such as `ids`, `kinds`, or `#e`) are JSON arrays with one or more values. At least one of the array's values must match the relevant field in an event for the condition itself to be considered a match. For scalar event attributes such as `kind`, the attribute from the event must be contained in the filter list. For tag attributes such as `#e`, where an event may have multiple values, the event and filter condition values must have at least one item in common.
77
78The `ids` and `authors` lists contain lowercase hexadecimal strings, which may either be an exact 64-character match, or a prefix of the event value. A prefix match is when the filter string is an exact string prefix of the event value. The use of prefixes allows for more compact filters where a large number of values are queried, and can provide some privacy for clients that may not want to disclose the exact authors or events they are searching for.
79
80All conditions of a filter that are specified must match for an event for it to pass the filter, i.e., multiple conditions are interpreted as `&&` conditions.
81
82A `REQ` message may contain multiple filters. In this case events that match any of the filters are to be returned, i.e., multiple filters are to be interpreted as `||` conditions.
83
84### From relay to client: sending events and notices
85
86Relays can send 2 types of messages, which must also be JSON arrays, according to the following patterns:
87
88 * `["EVENT", <subscription_id>, <event JSON as defined above>]`, used to send events requested by clients.
89 * `["NOTICE", <message>]`, used to send human-readable error messages or other things to clients.
90
91This NIP defines no rules for how `NOTICE` messages should be sent or treated.
92
93`EVENT` messages MUST be sent only with a subscription ID related to a subscription previously initiated by the client (using the `REQ` message above).
94
95## Basic Event Kinds
96
97 - `0`: `set_metadata`: the `content` is set to a stringified JSON object `{name: <string>, about: <string>, picture: <url, string>}` describing the user who created the event. A relay may delete past `set_metadata` events once it gets a new one for the same pubkey.
98 - `1`: `text_note`: the `content` is set to the text content of a note (anything the user wants to say).
99 - `2`: `recommend_server`: the `content` is set to the URL (e.g., `https://somerelay.com`) of a relay the event creator wants to recommend to its followers.
100
101A relay may choose to treat different message kinds differently, and it may or may not choose to have a default way to handle kinds it doesn't know about.
102
103## Other Notes:
104
105- Clients should not open more than one websocket to each relay. It also is advised that clients do not open more than 3 subscriptions to the same relay. 3 is enough for most use cases and relays should impose limits to prevent over usage by clients.
106- The `tags` array can store a tag identifier as the first element of each subarray, plus arbitrary information afterwards (always as strings). This NIP defines `"p"` — meaning "pubkey", which points to a pubkey of someone that is referred to in the event —, and `"e"` — meaning "event", which points to the id of an event this event is quoting, replying to or referring to somehow.
107- The `<recommended relay URL>` item present on the `"e"` and `"p"` tags is an optional (could be set to `""`) URL of a relay the client could attempt to connect to fetch the tagged event or other events from a tagged profile. It MAY be ignored, but it exists to increase censorship resistance and make the spread of relay addresses more seamless across clients.
diff --git a/02.md b/02.md
new file mode 100644
index 0000000..ae3afb8
--- /dev/null
+++ b/02.md
@@ -0,0 +1,73 @@
1NIP-02
2======
3
4Contact List and Petnames
5-------------------------
6
7`draft` `optional` `author:fiatjaf` `author:arcbtc`
8
9A special event with kind `3`, meaning "contact list" is defined as having a list of `p` tags, one for each of the followed/known profiles one is following.
10
11Each tag entry should contain the key for the profile, a relay URL where events from that key can be found (can be set to `null` or a invalid string if not needed), and a local name (or "petname") for that profile (can also be set to `null`), i.e., `["p", <32-bytes hex key>, <main relay URL>, <petname>]`. The `content` can be anything and should be ignored.
12
13For example:
14
15```json
16{
17 "kind": 3,
18 "tags": [
19 ["p", "91cf9..4e5ca", "wss://alicerelay.com/", "alice"],
20 ["p", "14aeb..8dad4", "wss://bobrelay.com/nostr", "bob"],
21 ["p", "612ae..e610f", "ws://carolrelay.com/ws", "carol"]
22 ],
23 "content": "",
24 ...other fields
25```
26
27Every new contact list that gets published overwrites the past ones, so it should contain all entries. Relays and clients SHOULD delete past contact lists as soon as they receive a new one.
28
29## Uses
30
31### Contact list backup
32
33If one believes a relay will store their events for sufficient time, they can use this kind-3 event to backup their following list and recover on a different device.
34
35### Profile discovery and context augmentation
36
37A client may rely on the kind-3 event to display a list of followed people by profiles one is browsing; make lists of suggestions on who to follow based on the contact lists of other people one might be following or browsing; or show the data in other contexts.
38
39### Relay sharing
40
41A client may publish a full list of contacts with good relays for each of their contacts so other clients may use these to update their internal relay lists if needed, increasing censorship-resistant.
42
43### Petname scheme
44
45The data from these contact lists can be used by clients to construct local ["petname"](http://www.skyhunter.com/marcs/petnames/IntroPetNames.html) tables derived from other people's contact lists. This alleviates the need for global human-readable names. For example:
46
47A user has an internal contact list that says
48
49```json
50[
51 ["p", "21df6d143fb96c2ec9d63726bf9edc71", null, "erin"]
52]
53```
54
55And receives two contact lists, one from `21df6d143fb96c2ec9d63726bf9edc71` that says
56
57```json
58[
59 ["p", "a8bb3d884d5d90b413d9891fe4c4e46d", null, "david"]
60]
61```
62
63and another from `a8bb3d884d5d90b413d9891fe4c4e46d` that says
64
65```json
66[
67 ["p", "f57f54057d2a7af0efecc8b0b66f5708", null, "frank"]
68]
69```
70
71When the user sees `21df6d143fb96c2ec9d63726bf9edc71` the client can show _erin_ instead;
72When the user sees `a8bb3d884d5d90b413d9891fe4c4e46d` the client can show _david.erin_ instead;
73When the user sees `f57f54057d2a7af0efecc8b0b66f5708` the client can show _frank.david.erin_ instead.
diff --git a/03.md b/03.md
new file mode 100644
index 0000000..578c351
--- /dev/null
+++ b/03.md
@@ -0,0 +1,23 @@
1NIP-03
2======
3
4OpenTimestamps Attestations for Events
5--------------------------------------
6
7`draft` `optional` `author:fiatjaf`
8
9When there is an OTS available it MAY be included in the existing event body under the `ots` key:
10
11```
12{
13 id: ...,
14 kind: ...,
15 ...,
16 ...,
17 ots: <base64-encoded OTS file data>
18}
19```
20
21The _event id_ MUST be used as the raw hash to be included in the OpenTimestamps merkle tree.
22
23The attestation can be either provided by relays automatically (and the OTS binary contents just appended to the events it receives) or by clients themselves when they first upload the event to relays — and used by clients to show that an event is really "at least as old as [OTS date]".
diff --git a/04.md b/04.md
new file mode 100644
index 0000000..801dd53
--- /dev/null
+++ b/04.md
@@ -0,0 +1,43 @@
1NIP-04
2======
3
4Encrypted Direct Message
5------------------------
6
7`draft` `optional` `author:arcbtc`
8
9A special event with kind `4`, meaning "encrypted direct message". It is supposed to have the following attributes:
10
11**`content`** MUST be equal to the base64-encoded, aes-256-cbc encrypted string of anything a user wants to write, encrypted using a shared cipher generated by combining the recipient's public-key with the sender's private-key; this appended by the base64-encoded initialization vector as if it was a querystring parameter named "iv". The format is the following: `"content": "<encrypted_text>?iv=<initialization_vector>"`.
12
13**`tags`** MUST contain an entry identifying the receiver of the message (such that relays may naturally forward this event to them), in the form `["p", "<pubkey, as a hex string>"]`.
14
15**`tags`** MAY contain an entry identifying the previous message in a conversation or a message we are explicitly replying to (such that contextual, more organized conversations may happen), in the form `["e", "<event_id>"]`.
16
17Code sample for generating such an event in JavaScript:
18
19```js
20import crypto from 'crypto'
21import * as secp from 'noble-secp256k1'
22
23let sharedPoint = secp.getSharedSecret(ourPrivateKey, '02' + theirPublicKey)
24let sharedX = sharedPoint.substr(2, 64)
25
26let iv = crypto.randomFillSync(new Uint8Array(16))
27var cipher = crypto.createCipheriv(
28 'aes-256-cbc',
29 Buffer.from(sharedX, 'hex'),
30 iv
31)
32let encryptedMessage = cipher.update(text, 'utf8', 'base64')
33encryptedMessage += cipher.final('base64')
34let ivBase64 = Buffer.from(iv.buffer).toString('base64')
35
36let event = {
37 pubkey: ourPubKey,
38 created_at: Math.floor(Date.now() / 1000),
39 kind: 4,
40 tags: [['p', theirPublicKey]],
41 content: encryptedMessage + '?iv=' + ivBase64
42}
43```
diff --git a/05.md b/05.md
new file mode 100644
index 0000000..a006ac1
--- /dev/null
+++ b/05.md
@@ -0,0 +1,52 @@
1NIP-05
2======
3
4Mapping Nostr keys to DNS-based internet identifiers
5----------------------------------------------------
6
7`draft` `optional` `author:fiatjaf`
8
9On events of type `0` (`set_metadata`) one can specify the key `"nip05"` with an [internet identifier](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1) (an email-like address) as the value. Although there is a link to a very liberal "internet identifier" specification above, NIP-05 assumes the `<local-part>` part will be restricted to the characters `a-z0-9-_.`, case insensitive.
10
11Upon seeing that, the client splits the identifier into `<local-part>` and `<domain>` and use these values to make a GET request to `https://<domain>/.well-known/nostr.json?name=<local-part>`.
12
13The result should be a JSON document object with a key `"names"` that should then be a mapping of names to public keys. If the public key for the given `<name>` matches the `pubkey` from the `set_metadata` event, the client then concludes that the given pubkey can indeed be referenced by its identifier.
14
15### Example
16
17If a client sees an event like this:
18
19```json
20{
21 "pubkey": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9",
22 "kind": 0,
23 "content": "{\"name\": \"bob\", \"nip05\": \"bob@example.com\"}"
24 ...
25}
26```
27
28It will make a GET request to `https://example.com/.well-known/nostr.json?name=bob` and get back a response that will look like
29
30```json
31{
32 "names": {
33 "bob": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9"
34 }
35}
36```
37
38That will mean everything is alright.
39
40## Notes
41
42### User Discovery implementation suggestion
43
44A client can also use this to allow users to search other profiles. If a client has a search box or something like that, a user may be able to type "bob@example.com" there and the client would recognize that and do the proper queries to obtain a pubkey and suggest that to the user.
45
46### Showing just the domain as an identifier
47
48Clients may treat the identifier `_@domain` as the "root" identifier, and choose to display it as just the `<domain>`. For example, if Bob owns `bob.com`, he may not want an identifier like `bob@bob.com` as that is redundant. Instead Bob can use the identifier `_@bob.com` and expect Nostr clients to show and treat that as just `bob.com` for all purposes.
49
50### Reasoning for the `/.well-known/nostr.json?name=<local-part>` format
51
52By adding the `<local-part>` as a query string instead of as part of the path the protocol can support both dynamic servers that can generate JSON on-demand and static servers with a JSON file in it that may contain multiple names.
diff --git a/06.md b/06.md
new file mode 100644
index 0000000..c1e66fe
--- /dev/null
+++ b/06.md
@@ -0,0 +1,15 @@
1NIP-06
2======
3
4Basic key derivation from mnemonic seed phrase
5----------------------------------------------
6
7`draft` `optional` `author:fiatjaf`
8
9[BIP39](https://bips.xyz/39) is used to generate mnemonic seed words and derive a binary seed from them.
10
11[BIP32](https://bips.xyz/32) is used to derive the path `m/44'/1237'/0'/0/0` (according to the Nostr entry on [SLIP44](https://github.com/satoshilabs/slips/blob/master/slip-0044.md)).
12
13This is the default for a basic, normal, single-key client.
14
15Other types of clients can still get fancy and use other derivation paths for their own other purposes.
diff --git a/08.md b/08.md
new file mode 100644
index 0000000..99100c9
--- /dev/null
+++ b/08.md
@@ -0,0 +1,17 @@
1NIP-08
2======
3
4Handling Mentions
5-----------------
6
7`draft` `optional` `author:fiatjaf` `author:scsibug`
8
9This document standardizes the treatment given by clients of inline mentions of other events and pubkeys inside the content of `text_note`s.
10
11Clients that want to allow tagged mentions they MUST show an autocomplete component or something analogous to that whenever the user starts typing a special key (for example, "@") or presses some button to include a mention etc -- or these clients can come up with other ways to unambiguously differentiate between mentions and normal text.
12
13Once a mention is identified, for example, the pubkey `27866e9d854c78ae625b867eefdfa9580434bc3e675be08d2acb526610d96fbe`, the client MUST add that pubkey to the `.tags` with the tag `p`, then replace its textual reference (inside `.content`) with the notation `#[index]` in which "index" is equal to the 0-based index of the related tag in the tags array.
14
15The same process applies for mentioning event IDs.
16
17A client that receives a `text_note` event with such `#[index]` mentions in its `.content` CAN do a search-and-replace using the actual contents from the `.tags` array with the actual pubkey or event ID that is mentioned, doing any desired context augmentation (for example, linking to the pubkey or showing a preview of the mentioned event contents) it wants in the process.
diff --git a/09.md b/09.md
new file mode 100644
index 0000000..0a0d149
--- /dev/null
+++ b/09.md
@@ -0,0 +1,46 @@
1NIP-09
2======
3
4Event Deletion
5--------------
6
7`draft` `optional` `author:scsibug`
8
9A special event with kind `5`, meaning "deletion" is defined as having a list of one or more `e` tags, each referencing an event the author is requesting to be deleted.
10
11Each tag entry must contain an "e" event id intended for deletion.
12
13The event's `content` field MAY contain a text note describing the reason for the deletion.
14
15For example:
16
17```
18{
19 "kind": 5,
20 "pubkey": <32-bytes hex-encoded public key of the event creator>,
21 "tags": [
22 ["e", "dcd59..464a2"],
23 ["e", "968c5..ad7a4"],
24 ],
25 "content": "these posts were published by accident",
26 ...other fields
27}
28```
29
30Relays MAY delete or stop publishing any referenced events that have an identical `pubkey` as the deletion request. Clients may hide or otherwise indicate a deletion status for referenced events.
31
32## Client Usage
33
34Clients MAY choose to fully hide any events that are referenced by valid deletion events. This includes text notes, direct messages, or other yet-to-be defined event kinds. Alternatively, they MAY show the event along with an icon or other indication that the author has "disowned" the event. The `content` field MAY also be used to replace the deleted events own content, although a user interface should clearly indicate that this is a deletion reason, not the original content.
35
36A client MUST validate that each event `pubkey` referenced in the `e` tag of the deletion request is identical to the deletion request `pubkey`, before hiding or deleting any event. Relays can not, in general, perform this validation and should not be treated as authoritative.
37
38Clients display the deletion event itself in any way they choose, e.g., not at all, or with a prominent notice.
39
40## Relay Usage
41
42Relays MAY validate that a deletion event only references events that have the same `pubkey` as the deletion itself, however this is not required since relays may not have knowledge of all referenced events.
43
44## Deleting a Deletion
45
46Publishing a deletion event against a deletion has no effect. Clients and relays are not obliged to support "undelete" functionality.
diff --git a/11.md b/11.md
new file mode 100644
index 0000000..a8c9c53
--- /dev/null
+++ b/11.md
@@ -0,0 +1,58 @@
1NIP-11
2======
3
4Relay Information Document
5---------------------------
6
7`draft` `optional` `author:scsibug`
8
9Relays may provide server metadata to clients to inform them of capabilities, administrative contacts, and various server attributes. This is made available as a JSON document over HTTP, on the same URI as the relay's websocket.
10
11When a relay receives an HTTP(s) request with an `Accept` header of `application/nostr+json` to a URI supporting WebSocket upgrades, they SHOULD return a document with the following structure.
12
13```json
14{
15 name: <string identifying relay>,
16 description: <string with detailed information>,
17 pubkey: <administrative contact pubkey>,
18 contact: <administrative alternate contact>,
19 supported_nips: <a list of NIP numbers supported by the relay>,
20 software: <string identifying relay software URL>,
21 version: <string version identifier>
22}
23```
24
25Any field may be omitted, and clients MUST ignore any additional fields they do not understand.
26
27Field Descriptions
28-----------------
29
30### Name ###
31
32A relay may select a `name` for use in client software. This is a string, and SHOULD be less than 30 characters to avoid client truncation.
33
34### Description ###
35
36Detailed plain-text information about the relay may be contained in the `description` string. It is recommended that this contain no markup, formatting or line breaks for word wrapping, and simply use double newline characters to separate paragraphs. There are no limitations on length.
37
38### Pubkey ###
39
40An administrative contact may be listed with a `pubkey`, in the same format as Nostr events (32-byte hex for a `secp256k1` public key). If a contact is listed, this provides clients with a recommended address to send encrypted direct messages (See `NIP-04`) to a system administrator. Expected uses of this address are to report abuse or illegal content, file bug reports, or request other technical assistance.
41
42Relay operators have no obligation to respond to direct messages.
43
44### Contact ###
45
46An alternative contact may be listed under the `contact` field as well, with the same purpose as `pubkey`. Use of a Nostr public key and direct message SHOULD be preferred over this. Contents of this field SHOULD be a URI, using schemes such as `mailto` or `https` to provide users with a means of contact.
47
48### Supported NIPs ###
49
50As the Nostr protocol evolves, some functionality may only be available by relays that implement a specific `NIP`. This field is an array of the integer identifiers of `NIP`s that are implemented in the relay. Examples would include `1`, for `"NIP-01"` and `9`, for `"NIP-09"`. Client-side `NIPs` SHOULD not be advertised, and can be ignored by clients.
51
52### Software ###
53
54The relay server implementation MAY be provided in the `software` attribute. If present, this MUST be a URL to the project's homepage.
55
56### Version ###
57
58The relay MAY choose to publish its software version as a string attribute. The string format is defined by the relay implementation. It is recommended this be a version number or commit identifier.
diff --git a/12.md b/12.md
new file mode 100644
index 0000000..1d5ba1f
--- /dev/null
+++ b/12.md
@@ -0,0 +1,38 @@
1NIP-12
2======
3
4Generic Tag Queries
5-------------------
6
7`draft` `optional` `author:scsibug`
8
9Relays may support subscriptions over arbitrary tags. `NIP-01` requires relays to respond to queries for `e` and `p` tags. This NIP allows any tag present in an event to be queried.
10
11The `<filters>` object described in `NIP-01` is expanded to contain arbitrary keys with a `#` prefix. Any key in a filter beginning with `#` is a tag query, and MUST have a value of an array of strings. The filter condition matches if the event has a tag with the same name, and there is at least one tag value in common with the filter and event. The tag name is the first element of a tag array with the initial `#` removed, and the tag value is the second element. Subsequent elements are ignored for the purposes of tag queries.
12
13
14Example Subscription Filter
15---------------------------
16
17The following provides an example of a filter that matches events of kind `1` with a `foo` tag set to either `bar` or `baz`.
18
19```
20{
21 "kinds": [1],
22 "#foo": ["bar", "baz"]
23}
24```
25
26Client Behavior
27---------------
28
29Clients SHOULD use the `supported_nips` field to learn if a relay supports generic tag queries. Clients MAY send generic tag queries to any relay, if they are prepared to filter out extraneous responses from relays that do not support this NIP.
30
31Suggested Use Cases
32-------------------
33
34Motivating examples for generic tag queries are provided below. This NIP does not promote or standardize the use of any specific tag for any purpose.
35
36* Decentralized Commenting System: clients can comment on arbitrary web pages, and easily search for other comments, by using a `url` tag and value.
37* Location-specific Posts: clients can use a `geohash` tag to associate a post with a physical location. Clients can search for a set of geohashes of varying precisions near them to find local content.
38* Hashtags: clients can use simple `hashtag` tags to associate an event with an easily searchable topic name. Since Nostr events themselves are not searchable through the protocol, this provides a mechanism for user-driven search.
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..b9e4c01
--- /dev/null
+++ b/README.md
@@ -0,0 +1,26 @@
1# NIPs
2
3NIPs stand for **Nostr Implementation Possibilities**. They exist to document what MUST, what SHOULD and what MAY be implemented by [Nostr](https://github.com/fiatjaf/nostr)-compatible _relay_ and _client_ software.
4
5- [NIP-01: Basic protocol flow description](https://github.com/fiatjaf/nostr/blob/master/nips/01.md)
6- [NIP-02: Contact List and Petnames](https://github.com/fiatjaf/nostr/blob/master/nips/02.md)
7- [NIP-03: OpenTimestamps Attestations for Events](https://github.com/fiatjaf/nostr/blob/master/nips/03.md)
8- [NIP-04: Encrypted Direct Message](https://github.com/fiatjaf/nostr/blob/master/nips/04.md)
9- [NIP-05: Mapping Nostr keys to DNS-based internet identifiers](https://github.com/fiatjaf/nostr/blob/master/nips/05.md)
10- [NIP-06: Basic key derivation from mnemonic seed phrase](https://github.com/fiatjaf/nostr/blob/master/nips/06.md)
11- [NIP-08: Handling Mentions](https://github.com/fiatjaf/nostr/blob/master/nips/08.md)
12- [NIP-09: Event Deletion](https://github.com/fiatjaf/nostr/blob/master/nips/09.md)
13- [NIP-11: Relay Information Document](https://github.com/fiatjaf/nostr/blob/master/nips/11.md)
14- [NIP-12: Generic Tag Queries](https://github.com/fiatjaf/nostr/blob/master/nips/12.md)
15
16## Event Kinds
17
18| kind | description | NIP |
19|------|---------------------------|-----|
20| 0 | Metadata | 5 |
21| 1 | Text | 1 |
22| 3 | Contacts | 2 |
23| 4 | Encrypted Direct Messages | 4 |
24| 5 | Event Deletion | 9 |
25
26Please update this list when proposing NIPs introducing new event kinds.