2022-05-01 10:48:57 +00:00
# NIPs
2023-04-13 22:30:44 +00:00
NIPs stand for **Nostr Implementation Possibilities** .
2023-11-16 13:52:35 +00:00
2023-05-06 21:31:22 +00:00
They exist to document what may be implemented by [Nostr ](https://github.com/nostr-protocol/nostr )-compatible _relay_ and _client_ software.
2022-05-01 10:48:57 +00:00
2023-04-13 22:30:23 +00:00
---
- [List ](#list )
- [Event Kinds ](#event-kinds )
- [Message Types ](#message-types )
- [Client to Relay ](#client-to-relay )
- [Relay to Client ](#relay-to-client )
- [Standardized Tags ](#standardized-tags )
- [Criteria for acceptance of NIPs ](#criteria-for-acceptance-of-nips )
2023-11-16 13:52:35 +00:00
- [Is this repository a centralizing factor? ](#is-this-repository-a-centralizing-factor )
- [How this repository works ](#how-this-repository-works )
2024-02-16 01:15:32 +00:00
- [Breaking Changes ](#breaking-changes )
2023-04-13 22:30:23 +00:00
- [License ](#license )
---
## List
2022-05-01 11:02:54 +00:00
- [NIP-01: Basic protocol flow description ](01.md )
2023-12-07 16:01:57 +00:00
- [NIP-02: Follow List ](02.md )
2022-05-01 11:02:54 +00:00
- [NIP-03: OpenTimestamps Attestations for Events ](03.md )
2024-04-24 19:31:45 +00:00
- [NIP-04: Encrypted Direct Message ](04.md ) --- **unrecommended** : deprecated in favor of [NIP-17 ](17.md )
2022-05-01 11:02:54 +00:00
- [NIP-05: Mapping Nostr keys to DNS-based internet identifiers ](05.md )
- [NIP-06: Basic key derivation from mnemonic seed phrase ](06.md )
2022-05-06 23:54:45 +00:00
- [NIP-07: `window.nostr` capability for web browsers ](07.md )
2023-04-13 22:31:09 +00:00
- [NIP-08: Handling Mentions ](08.md ) --- **unrecommended** : deprecated in favor of [NIP-27 ](27.md )
2022-05-01 11:02:54 +00:00
- [NIP-09: Event Deletion ](09.md )
2023-02-13 12:00:09 +00:00
- [NIP-10: Conventions for clients' use of `e` and `p` tags in text events ](10.md )
2022-05-01 11:02:54 +00:00
- [NIP-11: Relay Information Document ](11.md )
2022-05-05 17:45:27 +00:00
- [NIP-13: Proof of Work ](13.md )
2023-07-12 03:38:43 +00:00
- [NIP-14: Subject tag in text events ](14.md )
2023-04-21 04:04:48 +00:00
- [NIP-15: Nostr Marketplace (for resilient marketplaces) ](15.md )
2024-04-24 19:31:45 +00:00
- [NIP-17: Private Direct Messages ](17.md )
2023-03-25 14:58:31 +00:00
- [NIP-18: Reposts ](18.md )
2022-12-17 16:16:13 +00:00
- [NIP-19: bech32-encoded entities ](19.md )
2023-07-12 09:37:51 +00:00
- [NIP-21: `nostr:` URI scheme ](21.md )
2023-02-13 12:00:09 +00:00
- [NIP-23: Long-form Content ](23.md )
2023-10-05 22:11:23 +00:00
- [NIP-24: Extra metadata fields and tags ](24.md )
2022-07-30 16:34:04 +00:00
- [NIP-25: Reactions ](25.md )
2022-11-28 20:31:50 +00:00
- [NIP-26: Delegated Event Signing ](26.md )
2023-03-22 13:13:04 +00:00
- [NIP-27: Text Note References ](27.md )
2022-09-11 00:52:09 +00:00
- [NIP-28: Public Chat ](28.md )
2024-02-28 14:50:54 +00:00
- [NIP-29: Relay-based Groups ](29.md )
2023-04-29 18:16:58 +00:00
- [NIP-30: Custom Emoji ](30.md )
2023-05-05 12:18:02 +00:00
- [NIP-31: Dealing with Unknown Events ](31.md )
2023-05-15 12:53:50 +00:00
- [NIP-32: Labeling ](32.md )
2024-03-06 03:35:59 +00:00
- [NIP-34: `git` stuff ](34.md )
2024-05-22 12:21:44 +00:00
- [NIP-35: Torrents ](35.md )
2022-12-01 23:41:15 +00:00
- [NIP-36: Sensitive Content ](36.md )
2023-08-25 11:41:26 +00:00
- [NIP-38: User Statuses ](38.md )
2023-03-10 16:43:39 +00:00
- [NIP-39: External Identities in Profiles ](39.md )
2022-12-17 16:16:13 +00:00
- [NIP-40: Expiration Timestamp ](40.md )
2023-01-02 19:49:37 +00:00
- [NIP-42: Authentication of clients to relays ](42.md )
2023-12-20 12:22:02 +00:00
- [NIP-44: Versioned Encryption ](44.md )
2024-07-31 15:53:17 +00:00
- [NIP-45: Counting results ](45.md )
2023-02-23 01:11:55 +00:00
- [NIP-46: Nostr Connect ](46.md )
2023-05-05 11:50:50 +00:00
- [NIP-47: Wallet Connect ](47.md )
2023-08-03 19:40:45 +00:00
- [NIP-48: Proxy Tags ](48.md )
2024-01-29 15:45:16 +00:00
- [NIP-49: Private Key Encryption ](49.md )
2023-08-21 09:49:21 +00:00
- [NIP-50: Search Capability ](50.md )
2023-03-09 17:16:57 +00:00
- [NIP-51: Lists ](51.md )
2023-06-11 00:57:57 +00:00
- [NIP-52: Calendar Events ](52.md )
2023-07-09 02:27:58 +00:00
- [NIP-53: Live Activities ](53.md )
2024-05-02 14:04:55 +00:00
- [NIP-54: Wiki ](54.md )
2024-06-06 13:11:52 +00:00
- [NIP-55: Android Signer Application ](55.md )
2023-02-07 21:15:38 +00:00
- [NIP-56: Reporting ](56.md )
2023-02-14 13:27:06 +00:00
- [NIP-57: Lightning Zaps ](57.md )
2023-02-25 15:17:33 +00:00
- [NIP-58: Badges ](58.md )
2024-01-30 22:47:56 +00:00
- [NIP-59: Gift Wrap ](59.md )
2023-02-07 19:52:35 +00:00
- [NIP-65: Relay List Metadata ](65.md )
2024-07-10 13:40:44 +00:00
- [NIP-70: Protected Events ](70.md )
2024-02-01 11:12:47 +00:00
- [NIP-71: Video Events ](71.md )
2023-08-08 16:31:54 +00:00
- [NIP-72: Moderated Communities ](72.md )
2023-09-01 13:07:52 +00:00
- [NIP-75: Zap Goals ](75.md )
2023-02-23 21:25:55 +00:00
- [NIP-78: Application-specific data ](78.md )
2023-11-07 12:16:43 +00:00
- [NIP-84: Highlights ](84.md )
2023-06-07 21:19:56 +00:00
- [NIP-89: Recommended Application Handlers ](89.md )
2023-07-25 14:20:24 +00:00
- [NIP-90: Data Vending Machines ](90.md )
2024-02-01 23:59:37 +00:00
- [NIP-92: Media Attachments ](92.md )
2023-04-24 17:57:37 +00:00
- [NIP-94: File Metadata ](94.md )
2024-01-08 17:05:01 +00:00
- [NIP-96: HTTP File Storage Integration ](96.md )
2023-04-24 10:22:47 +00:00
- [NIP-98: HTTP Auth ](98.md )
2023-07-18 20:48:23 +00:00
- [NIP-99: Classified Listings ](99.md )
2022-05-01 10:48:57 +00:00
## Event Kinds
2024-08-02 23:47:59 +00:00
| kind | description | NIP |
| ------------- | ------------------------------- | -------------------------------------- |
| `0` | User Metadata | [01 ](01.md ) |
| `1` | Short Text Note | [01 ](01.md ) |
| `2` | Recommend Relay | 01 (deprecated) |
| `3` | Follows | [02 ](02.md ) |
| `4` | Encrypted Direct Messages | [04 ](04.md ) |
| `5` | Event Deletion | [09 ](09.md ) |
| `6` | Repost | [18 ](18.md ) |
| `7` | Reaction | [25 ](25.md ) |
| `8` | Badge Award | [58 ](58.md ) |
| `9` | Group Chat Message | [29 ](29.md ) |
| `10` | Group Chat Threaded Reply | [29 ](29.md ) |
| `11` | Group Thread | [29 ](29.md ) |
| `12` | Group Thread Reply | [29 ](29.md ) |
| `13` | Seal | [59 ](59.md ) |
| `14` | Direct Message | [17 ](17.md ) |
| `16` | Generic Repost | [18 ](18.md ) |
| `40` | Channel Creation | [28 ](28.md ) |
| `41` | Channel Metadata | [28 ](28.md ) |
| `42` | Channel Message | [28 ](28.md ) |
| `43` | Channel Hide Message | [28 ](28.md ) |
| `44` | Channel Mute User | [28 ](28.md ) |
| `818` | Merge Requests | [54 ](54.md ) |
| `1021` | Bid | [15 ](15.md ) |
| `1022` | Bid confirmation | [15 ](15.md ) |
| `1040` | OpenTimestamps | [03 ](03.md ) |
| `1059` | Gift Wrap | [59 ](59.md ) |
| `1063` | File Metadata | [94 ](94.md ) |
| `1311` | Live Chat Message | [53 ](53.md ) |
| `1617` | Patches | [34 ](34.md ) |
| `1621` | Issues | [34 ](34.md ) |
| `1622` | Replies | [34 ](34.md ) |
| `1630` -`1633` | Status | [34 ](34.md ) |
| `1971` | Problem Tracker | [nostrocket][nostrocket] |
| `1984` | Reporting | [56 ](56.md ) |
| `1985` | Label | [32 ](32.md ) |
| `2003` | Torrent | [35 ](35.md ) |
| `2004` | Torrent Comment | [35 ](35.md ) |
| `2022` | Coinjoin Pool | [joinstr][joinstr] |
| `4550` | Community Post Approval | [72 ](72.md ) |
| `5000` -`5999` | Job Request | [90 ](90.md ) |
| `6000` -`6999` | Job Result | [90 ](90.md ) |
| `7000` | Job Feedback | [90 ](90.md ) |
| `9000` -`9030` | Group Control Events | [29 ](29.md ) |
| `9041` | Zap Goal | [75 ](75.md ) |
| `9734` | Zap Request | [57 ](57.md ) |
| `9735` | Zap | [57 ](57.md ) |
| `9802` | Highlights | [84 ](84.md ) |
| `10000` | Mute list | [51 ](51.md ) |
| `10001` | Pin list | [51 ](51.md ) |
| `10002` | Relay List Metadata | [65 ](65.md ) |
| `10003` | Bookmark list | [51 ](51.md ) |
| `10004` | Communities list | [51 ](51.md ) |
| `10005` | Public chats list | [51 ](51.md ) |
| `10006` | Blocked relays list | [51 ](51.md ) |
| `10007` | Search relays list | [51 ](51.md ) |
| `10009` | User groups | [51 ](51.md ), [29 ](29.md ) |
| `10015` | Interests list | [51 ](51.md ) |
| `10030` | User emoji list | [51 ](51.md ) |
2024-08-05 13:43:24 +00:00
| `10050` | Relay list to receive DMs | [51 ](51.md ), [17 ](17.md ) |
2024-08-02 23:47:59 +00:00
| `10096` | File storage server list | [96 ](96.md ) |
| `13194` | Wallet Info | [47 ](47.md ) |
| `21000` | Lightning Pub RPC | [Lightning.Pub][lnpub] |
| `22242` | Client Authentication | [42 ](42.md ) |
| `23194` | Wallet Request | [47 ](47.md ) |
| `23195` | Wallet Response | [47 ](47.md ) |
| `24133` | Nostr Connect | [46 ](46.md ) |
| `27235` | HTTP Auth | [98 ](98.md ) |
| `30000` | Follow sets | [51 ](51.md ) |
| `30001` | Generic lists | [51 ](51.md ) |
| `30002` | Relay sets | [51 ](51.md ) |
| `30003` | Bookmark sets | [51 ](51.md ) |
| `30004` | Curation sets | [51 ](51.md ) |
| `30005` | Video sets | [51 ](51.md ) |
| `30008` | Profile Badges | [58 ](58.md ) |
| `30009` | Badge Definition | [58 ](58.md ) |
| `30015` | Interest sets | [51 ](51.md ) |
| `30017` | Create or update a stall | [15 ](15.md ) |
| `30018` | Create or update a product | [15 ](15.md ) |
| `30019` | Marketplace UI/UX | [15 ](15.md ) |
| `30020` | Product sold as an auction | [15 ](15.md ) |
| `30023` | Long-form Content | [23 ](23.md ) |
| `30024` | Draft Long-form Content | [23 ](23.md ) |
| `30030` | Emoji sets | [51 ](51.md ) |
| `30063` | Release artifact sets | [51 ](51.md ) |
| `30078` | Application-specific Data | [78 ](78.md ) |
| `30311` | Live Event | [53 ](53.md ) |
| `30315` | User Statuses | [38 ](38.md ) |
| `30402` | Classified Listing | [99 ](99.md ) |
| `30403` | Draft Classified Listing | [99 ](99.md ) |
| `30617` | Repository announcements | [34 ](34.md ) |
| `30618` | Repository state announcements | [34 ](34.md ) |
| `30818` | Wiki article | [54 ](54.md ) |
| `30819` | Redirects | [54 ](54.md ) |
| `31890` | Feed | [NUD: Custom Feeds][NUD: Custom Feeds] |
| `31922` | Date-Based Calendar Event | [52 ](52.md ) |
| `31923` | Time-Based Calendar Event | [52 ](52.md ) |
| `31924` | Calendar | [52 ](52.md ) |
| `31925` | Calendar Event RSVP | [52 ](52.md ) |
| `31989` | Handler recommendation | [89 ](89.md ) |
| `31990` | Handler information | [89 ](89.md ) |
| `34235` | Video Event | [71 ](71.md ) |
| `34236` | Short-form Portrait Video Event | [71 ](71.md ) |
| `34237` | Video View Event | [71 ](71.md ) |
| `34550` | Community Definition | [72 ](72.md ) |
| `39000-9` | Group metadata events | [29 ](29.md ) |
2023-11-15 11:28:59 +00:00
2024-05-24 03:31:36 +00:00
[NUD: Custom Feeds]: https://wikifreedia.xyz/cip-01/97c70a44366a6535c1
2023-12-02 17:54:42 +00:00
[nostrocket]: https://github.com/nostrocket/NIPS/blob/main/Problems.md
[lnpub]: https://github.com/shocknet/Lightning.Pub/blob/master/proto/autogenerated/client.md
2024-05-26 10:58:14 +00:00
[joinstr]: https://gitlab.com/1440000bytes/joinstr/-/blob/main/NIP.md
2023-04-13 22:29:39 +00:00
2022-10-08 11:02:13 +00:00
## Message types
### Client to Relay
2023-04-13 22:28:57 +00:00
| type | description | NIP |
| ------- | --------------------------------------------------- | ----------- |
2023-08-13 16:47:45 +00:00
| `EVENT` | used to publish events | [01 ](01.md ) |
| `REQ` | used to request events and subscribe to new updates | [01 ](01.md ) |
| `CLOSE` | used to stop previous subscriptions | [01 ](01.md ) |
2023-04-13 22:28:57 +00:00
| `AUTH` | used to send authentication events | [42 ](42.md ) |
| `COUNT` | used to request event counts | [45 ](45.md ) |
2022-10-08 11:02:13 +00:00
### Relay to Client
2023-04-13 22:28:57 +00:00
| type | description | NIP |
| -------- | ------------------------------------------------------- | ----------- |
2023-08-13 16:47:45 +00:00
| `EOSE` | used to notify clients all stored events have been sent | [01 ](01.md ) |
| `EVENT` | used to send events requested to clients | [01 ](01.md ) |
| `NOTICE` | used to send human-readable messages to clients | [01 ](01.md ) |
| `OK` | used to notify clients if an EVENT was successful | [01 ](01.md ) |
2023-12-06 15:01:27 +00:00
| `CLOSED` | used to notify clients that a REQ was ended and why | [01 ](01.md ) |
2023-04-13 22:28:57 +00:00
| `AUTH` | used to send authentication challenges | [42 ](42.md ) |
| `COUNT` | used to send requested event counts to clients | [45 ](45.md ) |
2022-10-08 11:02:13 +00:00
2023-01-25 16:20:36 +00:00
## Standardized Tags
2024-05-22 12:28:00 +00:00
| name | value | other parameters | NIP |
| ----------------- | ------------------------------------ | ------------------------------- | ------------------------------------- |
| `e` | event id (hex) | relay URL, marker, pubkey (hex) | [01 ](01.md ), [10 ](10.md ) |
| `p` | pubkey (hex) | relay URL, petname | [01 ](01.md ), [02 ](02.md ) |
| `a` | coordinates to an event | relay URL | [01 ](01.md ) |
| `d` | identifier | -- | [01 ](01.md ) |
2024-07-10 13:40:44 +00:00
| `-` | -- | -- | [70 ](70.md ) |
2024-05-22 12:28:00 +00:00
| `g` | geohash | -- | [52 ](52.md ) |
2024-06-28 10:01:52 +00:00
| `h` | group id | -- | [29 ](29.md ) |
2024-05-22 12:28:00 +00:00
| `i` | identity | proof | [39 ](39.md ) |
| `k` | kind number (string) | -- | [18 ](18.md ), [25 ](25.md ), [72 ](72.md ) |
2024-06-08 14:05:18 +00:00
| `l` | label, label namespace | -- | [32 ](32.md ) |
2024-05-22 12:28:00 +00:00
| `L` | label namespace | -- | [32 ](32.md ) |
| `m` | MIME type | -- | [94 ](94.md ) |
| `q` | event id (hex) | relay URL | [18 ](18.md ) |
2024-06-02 21:38:01 +00:00
| `r` | a reference (URL, etc) | petname | [24 ](24.md ) |
2024-05-22 12:28:00 +00:00
| `r` | relay url | marker | [65 ](65.md ) |
| `t` | hashtag | -- | |
| `alt` | summary | -- | [31 ](31.md ) |
| `amount` | millisatoshis, stringified | -- | [57 ](57.md ) |
| `bolt11` | `bolt11` invoice | -- | [57 ](57.md ) |
| `challenge` | challenge string | -- | [42 ](42.md ) |
| `client` | name, address | relay URL | [89 ](89.md ) |
| `clone` | git clone URL | -- | [34 ](34.md ) |
| `content-warning` | reason | -- | [36 ](36.md ) |
| `delegation` | pubkey, conditions, delegation token | -- | [26 ](26.md ) |
| `description` | description | -- | [34 ](34.md ), [57 ](57.md ), [58 ](58.md ) |
| `emoji` | shortcode, image URL | -- | [30 ](30.md ) |
| `encrypted` | -- | -- | [90 ](90.md ) |
| `expiration` | unix timestamp (string) | -- | [40 ](40.md ) |
| `goal` | event id (hex) | relay URL | [75 ](75.md ) |
| `image` | image URL | dimensions in pixels | [23 ](23.md ), [58 ](58.md ) |
| `imeta` | inline metadata | -- | [92 ](92.md ) |
| `lnurl` | `bech32` encoded `lnurl` | -- | [57 ](57.md ) |
| `location` | location string | -- | [52 ](52.md ), [99 ](99.md ) |
2024-08-02 23:47:59 +00:00
| `name` | name | -- | [34 ](34.md ), [58 ](58.md ), [72 ](72.md ) |
2024-05-27 03:40:01 +00:00
| `nonce` | random | difficulty | [13 ](13.md ) |
2024-05-22 12:28:00 +00:00
| `preimage` | hash of `bolt11` invoice | -- | [57 ](57.md ) |
| `price` | price | currency, frequency | [99 ](99.md ) |
| `proxy` | external ID | protocol | [48 ](48.md ) |
| `published_at` | unix timestamp (string) | -- | [23 ](23.md ) |
| `relay` | relay url | -- | [42 ](42.md ), [17 ](17.md ) |
| `relays` | relay list | -- | [57 ](57.md ) |
| `server` | file storage server url | -- | [96 ](96.md ) |
| `subject` | subject | -- | [14 ](14.md ), [17 ](17.md ) |
| `summary` | article summary | -- | [23 ](23.md ) |
| `thumb` | badge thumbnail | dimensions in pixels | [58 ](58.md ) |
| `title` | article title | -- | [23 ](23.md ) |
| `web` | webpage URL | -- | [34 ](34.md ) |
| `zap` | pubkey (hex), relay URL | weight | [57 ](57.md ) |
2023-01-25 16:20:36 +00:00
2024-06-06 00:57:54 +00:00
Please update these lists when proposing new NIPs.
2022-05-02 12:30:30 +00:00
## Criteria for acceptance of NIPs
2024-05-27 15:31:29 +00:00
1. They should be fully implemented in at least two clients and one relay -- when applicable.
2022-05-02 12:30:30 +00:00
2. They should make sense.
2022-11-29 14:41:46 +00:00
3. They should be optional and backwards-compatible: care must be taken such that clients and relays that choose to not implement them do not stop working when interacting with the ones that choose to.
2023-01-02 10:16:59 +00:00
4. There should be no more than one way of doing the same thing.
5. Other rules will be made up when necessary.
2022-05-02 12:30:30 +00:00
2023-11-16 13:52:35 +00:00
## Is this repository a centralizing factor?
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.
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.
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.
2023-07-10 15:40:58 +00:00
2023-11-16 13:52:35 +00:00
## How this repository works
2023-07-10 15:40:58 +00:00
2023-11-16 13:52:35 +00:00
Standards may emerge in two ways: the first way is that someone starts doing something, then others copy it; the second way is that someone has an idea of a new standard that could benefit multiple clients and the protocol in general without breaking **backwards-compatibility** and the principle of having **a single way of doing things** , then they write that idea and submit it to this repository, other interested parties read it and give their feedback, then once most people reasonably agree we codify that in a NIP which client and relay developers that are interested in the feature can proceed to implement.
2023-07-10 15:40:58 +00:00
2023-11-16 13:52:35 +00:00
These two ways of standardizing things are supported by this repository. Although the second is preferred, an effort will be made to codify standards emerged outside this repository into NIPs that can be later referenced and easily understood and implemented by others -- but obviously as in any human system discretion may be applied when standards are considered harmful.
2023-07-10 15:40:58 +00:00
2024-02-16 01:15:32 +00:00
## Breaking Changes
[Breaking Changes ](BREAKING.md )
2022-05-02 12:30:30 +00:00
## License
All NIPs are public domain.
2023-11-17 23:05:23 +00:00
## Contributors
< a align = "center" href = "https://github.com/nostr-protocol/nips/graphs/contributors" >
< img src = "https://contrib.rocks/image?repo=nostr-protocol/nips" / >
< / a >