diff options
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 169 |
1 files changed, 134 insertions, 35 deletions
| @@ -1,6 +1,23 @@ | |||
| 1 | # NIPs | 1 | # NIPs |
| 2 | 2 | ||
| 3 | NIPs 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. | 3 | NIPs stand for **Nostr Implementation Possibilities**. |
| 4 | They exist to document what may be implemented by [Nostr](https://github.com/nostr-protocol/nostr)-compatible _relay_ and _client_ software. | ||
| 5 | |||
| 6 | --- | ||
| 7 | |||
| 8 | - [List](#list) | ||
| 9 | - [Event Kinds](#event-kinds) | ||
| 10 | - [Event Kind Ranges](#event-kind-ranges) | ||
| 11 | - [Message Types](#message-types) | ||
| 12 | - [Client to Relay](#client-to-relay) | ||
| 13 | - [Relay to Client](#relay-to-client) | ||
| 14 | - [Standardized Tags](#standardized-tags) | ||
| 15 | - [Criteria for acceptance of NIPs](#criteria-for-acceptance-of-nips) | ||
| 16 | - [License](#license) | ||
| 17 | |||
| 18 | --- | ||
| 19 | |||
| 20 | ## List | ||
| 4 | 21 | ||
| 5 | - [NIP-01: Basic protocol flow description](01.md) | 22 | - [NIP-01: Basic protocol flow description](01.md) |
| 6 | - [NIP-02: Contact List and Petnames](02.md) | 23 | - [NIP-02: Contact List and Petnames](02.md) |
| @@ -9,68 +26,150 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh | |||
| 9 | - [NIP-05: Mapping Nostr keys to DNS-based internet identifiers](05.md) | 26 | - [NIP-05: Mapping Nostr keys to DNS-based internet identifiers](05.md) |
| 10 | - [NIP-06: Basic key derivation from mnemonic seed phrase](06.md) | 27 | - [NIP-06: Basic key derivation from mnemonic seed phrase](06.md) |
| 11 | - [NIP-07: `window.nostr` capability for web browsers](07.md) | 28 | - [NIP-07: `window.nostr` capability for web browsers](07.md) |
| 12 | - [NIP-08: Handling Mentions](08.md) | 29 | - [NIP-08: Handling Mentions](08.md) --- **unrecommended**: deprecated in favor of [NIP-27](27.md) |
| 13 | - [NIP-09: Event Deletion](09.md) | 30 | - [NIP-09: Event Deletion](09.md) |
| 14 | - [NIP-10: Conventions for clients' use of `e` and `p` tags in text events.](10.md) | 31 | - [NIP-10: Conventions for clients' use of `e` and `p` tags in text events](10.md) |
| 15 | - [NIP-11: Relay Information Document](11.md) | 32 | - [NIP-11: Relay Information Document](11.md) |
| 16 | - [NIP-12: Generic Tag Queries](12.md) | 33 | - [NIP-12: Generic Tag Queries](12.md) |
| 17 | - [NIP-13: Proof of Work](13.md) | 34 | - [NIP-13: Proof of Work](13.md) |
| 18 | - [NIP-14: Subject tag in text events.](14.md) | 35 | - [NIP-14: Subject tag in text events.](14.md) |
| 19 | - [NIP-15: End of Stored Events Notice](15.md) | 36 | - [NIP-15: Nostr Marketplace (for resilient marketplaces)](15.md) |
| 20 | - [NIP-16: Event Treatment](16.md) | 37 | - [NIP-16: Event Treatment](16.md) |
| 21 | - [NIP-18: Reposts](18.md) | 38 | - [NIP-18: Reposts](18.md) |
| 22 | - [NIP-19: bech32-encoded entities](19.md) | 39 | - [NIP-19: bech32-encoded entities](19.md) |
| 23 | - [NIP-20: Command Results](20.md) | 40 | - [NIP-20: Command Results](20.md) |
| 24 | - [NIP-22: Event created_at Limits](22.md) | 41 | - [NIP-21: `nostr:` URL scheme](21.md) |
| 42 | - [NIP-22: Event `created_at` Limits](22.md) | ||
| 43 | - [NIP-23: Long-form Content](23.md) | ||
| 25 | - [NIP-25: Reactions](25.md) | 44 | - [NIP-25: Reactions](25.md) |
| 26 | - [NIP-26: Delegated Event Signing](26.md) | 45 | - [NIP-26: Delegated Event Signing](26.md) |
| 46 | - [NIP-27: Text Note References](27.md) | ||
| 27 | - [NIP-28: Public Chat](28.md) | 47 | - [NIP-28: Public Chat](28.md) |
| 28 | - [NIP-33: Parameterized Replaceable Events](33.md) | 48 | - [NIP-33: Parameterized Replaceable Events](33.md) |
| 29 | - [NIP-36: Sensitive Content](36.md) | 49 | - [NIP-36: Sensitive Content](36.md) |
| 50 | - [NIP-39: External Identities in Profiles](39.md) | ||
| 30 | - [NIP-40: Expiration Timestamp](40.md) | 51 | - [NIP-40: Expiration Timestamp](40.md) |
| 52 | - [NIP-42: Authentication of clients to relays](42.md) | ||
| 53 | - [NIP-45: Counting results](45.md) | ||
| 54 | - [NIP-46: Nostr Connect](46.md) | ||
| 55 | - [NIP-47: Wallet Connect](47.md) | ||
| 56 | - [NIP-50: Keywords filter](50.md) | ||
| 57 | - [NIP-51: Lists](51.md) | ||
| 58 | - [NIP-56: Reporting](56.md) | ||
| 59 | - [NIP-57: Lightning Zaps](57.md) | ||
| 60 | - [NIP-58: Badges](58.md) | ||
| 61 | - [NIP-65: Relay List Metadata](65.md) | ||
| 62 | - [NIP-78: Application-specific data](78.md) | ||
| 63 | - [NIP-94: File Metadata](94.md) | ||
| 31 | 64 | ||
| 32 | ## Event Kinds | 65 | ## Event Kinds |
| 33 | 66 | ||
| 34 | | kind | description | NIP | | 67 | | kind | description | NIP | |
| 35 | |-------------|-----------------------------|------------------------| | 68 | | ------- | -------------------------- | ----------- | |
| 36 | | 0 | Metadata | [1](01.md), [5](05.md) | | 69 | | `0` | Metadata | [1](01.md) | |
| 37 | | 1 | Text | [1](01.md) | | 70 | | `1` | Short Text Note | [1](01.md) | |
| 38 | | 2 | Recommend Relay | [1](01.md) | | 71 | | `2` | Recommend Relay | [1](01.md) | |
| 39 | | 3 | Contacts | [2](02.md) | | 72 | | `3` | Contacts | [2](02.md) | |
| 40 | | 4 | Encrypted Direct Messages | [4](04.md) | | 73 | | `4` | Encrypted Direct Messages | [4](04.md) | |
| 41 | | 5 | Event Deletion | [9](09.md) | | 74 | | `5` | Event Deletion | [9](09.md) | |
| 42 | | 6 | Repost | [18](18.md) | | 75 | | `6` | Reposts | [18](18.md) | |
| 43 | | 7 | Reaction | [25](25.md) | | 76 | | `7` | Reaction | [25](25.md) | |
| 44 | | 40 | Channel Creation | [28](28.md) | | 77 | | `8` | Badge Award | [58](58.md) | |
| 45 | | 41 | Channel Metadata | [28](28.md) | | 78 | | `40` | Channel Creation | [28](28.md) | |
| 46 | | 42 | Channel Message | [28](28.md) | | 79 | | `41` | Channel Metadata | [28](28.md) | |
| 47 | | 43 | Channel Hide Message | [28](28.md) | | 80 | | `42` | Channel Message | [28](28.md) | |
| 48 | | 44 | Channel Mute User | [28](28.md) | | 81 | | `43` | Channel Hide Message | [28](28.md) | |
| 49 | | 45-49 | Public Chat Reserved | [28](28.md) | | 82 | | `44` | Channel Mute User | [28](28.md) | |
| 50 | | 10000-19999 | Replaceable Events Reserved | [16](16.md) | | 83 | | `1063` | File Metadata | [94](94.md) | |
| 51 | | 20000-29999 | Ephemeral Events Reserved | [16](16.md) | | 84 | | `1984` | Reporting | [56](56.md) | |
| 85 | | `9734` | Zap Request | [57](57.md) | | ||
| 86 | | `9735` | Zap | [57](57.md) | | ||
| 87 | | `10000` | Mute List | [51](51.md) | | ||
| 88 | | `10001` | Pin List | [51](51.md) | | ||
| 89 | | `10002` | Relay List Metadata | [65](65.md) | | ||
| 90 | | `13194` | Wallet Info | [47](47.md) | | ||
| 91 | | `22242` | Client Authentication | [42](42.md) | | ||
| 92 | | `23194` | Wallet Request | [47](47.md) | | ||
| 93 | | `23195` | Wallet Response | [47](47.md) | | ||
| 94 | | `24133` | Nostr Connect | [46](46.md) | | ||
| 95 | | `30000` | Categorized People List | [51](51.md) | | ||
| 96 | | `30001` | Categorized Bookmark List | [51](51.md) | | ||
| 97 | | `30008` | Profile Badges | [58](58.md) | | ||
| 98 | | `30009` | Badge Definition | [58](58.md) | | ||
| 99 | | `30017` | Create or update a stall | [15](15.md) | | ||
| 100 | | `30018` | Create or update a product | [15](15.md) | | ||
| 101 | | `30023` | Long-form Content | [23](23.md) | | ||
| 102 | | `30078` | Application-specific Data | [78](78.md) | | ||
| 103 | |||
| 104 | ### Event Kind Ranges | ||
| 52 | 105 | ||
| 106 | | range | description | NIP | | ||
| 107 | | ---------------- | -------------------------------- | ----------- | | ||
| 108 | | `1000`--`9999` | Regular Events | [16](16.md) | | ||
| 109 | | `10000`--`19999` | Replaceable Events | [16](16.md) | | ||
| 110 | | `20000`--`29999` | Ephemeral Events | [16](16.md) | | ||
| 111 | | `30000`--`39999` | Parameterized Replaceable Events | [33](33.md) | | ||
| 53 | 112 | ||
| 54 | ## Message types | 113 | ## Message types |
| 55 | 114 | ||
| 56 | ### Client to Relay | 115 | ### Client to Relay |
| 57 | | type | description | NIP | | 116 | |
| 58 | |-------|-----------------------------------------------------|------------| | 117 | | type | description | NIP | |
| 59 | | EVENT | used to publish events | [1](01.md) | | 118 | | ------- | --------------------------------------------------- | ----------- | |
| 60 | | REQ | used to request events and subscribe to new updates | [1](01.md) | | 119 | | `AUTH` | used to send authentication events | [42](42.md) | |
| 61 | | CLOSE | used to stop previous subscriptions | [1](01.md) | | 120 | | `CLOSE` | used to stop previous subscriptions | [1](01.md) | |
| 121 | | `COUNT` | used to request event counts | [45](45.md) | | ||
| 122 | | `EVENT` | used to publish events | [1](01.md) | | ||
| 123 | | `REQ` | used to request events and subscribe to new updates | [1](01.md) | | ||
| 62 | 124 | ||
| 63 | ### Relay to Client | 125 | ### Relay to Client |
| 64 | | type | description | NIP | | 126 | |
| 65 | |--------|---------------------------------------------------------|-------------| | 127 | | type | description | NIP | |
| 66 | | EVENT | used to send events requested to clients | [1](01.md) | | 128 | | -------- | ------------------------------------------------------- | ----------- | |
| 67 | | NOTICE | used to send human-readable messages to clients | [1](01.md) | | 129 | | `AUTH` | used to send authentication challenges | [42](42.md) | |
| 68 | | EOSE | used to notify clients all stored events have been sent | [15](15.md) | | 130 | | `COUNT` | used to send requested event counts to clients | [45](45.md) | |
| 69 | | OK | used to notify clients if an EVENT was successuful | [20](20.md) | | 131 | | `EOSE` | used to notify clients all stored events have been sent | [1](01.md) | |
| 132 | | `EVENT` | used to send events requested to clients | [1](01.md) | | ||
| 133 | | `NOTICE` | used to send human-readable messages to clients | [1](01.md) | | ||
| 134 | | `OK` | used to notify clients if an EVENT was successful | [20](20.md) | | ||
| 70 | 135 | ||
| 71 | Please update these lists when proposing NIPs introducing new event kinds. | 136 | Please update these lists when proposing NIPs introducing new event kinds. |
| 72 | 137 | ||
| 73 | When experimenting with kinds, keep in mind the classification introduced by [NIP-16](16.md). | 138 | When experimenting with kinds, keep in mind the classification introduced by [NIP-16](16.md) and [NIP-33](33.md). |
| 139 | |||
| 140 | ## Standardized Tags | ||
| 141 | |||
| 142 | | name | value | other parameters | NIP | | ||
| 143 | | ----------------- | ------------------------------------ | -------------------- | ------------------------ | | ||
| 144 | | `a` | coordinates to an event | relay URL | [33](33.md), [23](23.md) | | ||
| 145 | | `d` | identifier | -- | [33](33.md) | | ||
| 146 | | `e` | event id (hex) | relay URL, marker | [1](01.md), [10](10.md) | | ||
| 147 | | `g` | geohash | -- | [12](12.md) | | ||
| 148 | | `i` | identity | proof | [39](39.md) | | ||
| 149 | | `p` | pubkey (hex) | relay URL | [1](01.md) | | ||
| 150 | | `r` | a reference (URL, etc) | -- | [12](12.md) | | ||
| 151 | | `t` | hashtag | -- | [12](12.md) | | ||
| 152 | | `amount` | millisats | -- | [57](57.md) | | ||
| 153 | | `bolt11` | `bolt11` invoice | -- | [57](57.md) | | ||
| 154 | | `challenge` | challenge string | -- | [42](42.md) | | ||
| 155 | | `content-warning` | reason | -- | [36](36.md) | | ||
| 156 | | `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) | | ||
| 157 | | `description` | badge description | -- | [58](58.md) | | ||
| 158 | | `description` | invoice description | -- | [57](57.md) | | ||
| 159 | | `expiration` | unix timestamp (string) | -- | [40](40.md) | | ||
| 160 | | `image` | image URL | dimensions in pixels | [23](23.md), [58](58.md) | | ||
| 161 | | `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) | | ||
| 162 | | `name` | badge name | -- | [58](58.md) | | ||
| 163 | | `nonce` | random | -- | [13](13.md) | | ||
| 164 | | `preimage` | hash of `bolt11` invoice | -- | [57](57.md) | | ||
| 165 | | `published_at` | unix timestamp (string) | -- | [23](23.md) | | ||
| 166 | | `relay` | relay url | -- | [42](42.md) | | ||
| 167 | | `relays` | relay list | -- | [57](57.md) | | ||
| 168 | | `subject` | subject | -- | [14](14.md) | | ||
| 169 | | `summary` | article summary | -- | [23](23.md) | | ||
| 170 | | `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) | | ||
| 171 | | `title` | article title | -- | [23](23.md) | | ||
| 172 | | `zap` | profile name | type of value | [57](57.md) | | ||
| 74 | 173 | ||
| 75 | ## Criteria for acceptance of NIPs | 174 | ## Criteria for acceptance of NIPs |
| 76 | 175 | ||