2022-05-01 06:48:57 -04:00
# NIPs
2023-02-13 12:06:21 -05:00
NIPs stand for **Nostr Implementation Possibilities** . They exist to document what may be implemented by [Nostr ](https://github.com/fiatjaf/nostr )-compatible _relay_ and _client_ software.
2022-05-01 06:48:57 -04:00
2022-05-01 07:02:54 -04:00
- [NIP-01: Basic protocol flow description ](01.md )
- [NIP-02: Contact List and Petnames ](02.md )
- [NIP-03: OpenTimestamps Attestations for Events ](03.md )
- [NIP-04: Encrypted Direct Message ](04.md )
- [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 19:54:45 -04:00
- [NIP-07: `window.nostr` capability for web browsers ](07.md )
2023-03-22 18:50:03 -04:00
- [NIP-08: Handling Mentions ](08.md ) – `unrecommended` : deprecated in favor of [NIP-27 ](27.md )
2022-05-01 07:02:54 -04:00
- [NIP-09: Event Deletion ](09.md )
2023-02-13 07:00:09 -05:00
- [NIP-10: Conventions for clients' use of `e` and `p` tags in text events ](10.md )
2022-05-01 07:02:54 -04:00
- [NIP-11: Relay Information Document ](11.md )
- [NIP-12: Generic Tag Queries ](12.md )
2022-05-05 13:45:27 -04:00
- [NIP-13: Proof of Work ](13.md )
2022-05-29 09:58:34 -04:00
- [NIP-14: Subject tag in text events. ](14.md )
- [NIP-16: Event Treatment ](16.md )
2023-03-25 10:58:31 -04:00
- [NIP-18: Reposts ](18.md )
2022-12-17 11:16:13 -05:00
- [NIP-19: bech32-encoded entities ](19.md )
2022-11-10 13:07:13 -05:00
- [NIP-20: Command Results ](20.md )
2023-01-24 08:23:00 -05:00
- [NIP-21: `nostr:` URL scheme ](21.md )
2023-02-13 07:00:09 -05:00
- [NIP-22: Event `created_at` Limits ](22.md )
- [NIP-23: Long-form Content ](23.md )
2022-07-30 12:34:04 -04:00
- [NIP-25: Reactions ](25.md )
2022-11-28 15:31:50 -05:00
- [NIP-26: Delegated Event Signing ](26.md )
2023-03-22 09:13:04 -04:00
- [NIP-27: Text Note References ](27.md )
2022-09-10 20:52:09 -04:00
- [NIP-28: Public Chat ](28.md )
2023-01-04 08:26:08 -05:00
- [NIP-33: Parameterized Replaceable Events ](33.md )
2022-12-01 18:41:15 -05:00
- [NIP-36: Sensitive Content ](36.md )
2023-03-10 11:43:39 -05:00
- [NIP-39: External Identities in Profiles ](39.md )
2022-12-17 11:16:13 -05:00
- [NIP-40: Expiration Timestamp ](40.md )
2023-01-02 14:49:37 -05:00
- [NIP-42: Authentication of clients to relays ](42.md )
2023-01-03 23:11:17 -05:00
- [NIP-45: Counting results ](45.md )
2023-02-22 20:11:55 -05:00
- [NIP-46: Nostr Connect ](46.md )
2023-01-27 05:47:12 -05:00
- [NIP-50: Keywords filter ](50.md )
2023-03-09 12:16:57 -05:00
- [NIP-51: Lists ](51.md )
2023-02-07 16:15:38 -05:00
- [NIP-56: Reporting ](56.md )
2023-02-14 08:27:06 -05:00
- [NIP-57: Lightning Zaps ](57.md )
2023-02-25 10:17:33 -05:00
- [NIP-58: Badges ](58.md )
2023-02-07 14:52:35 -05:00
- [NIP-65: Relay List Metadata ](65.md )
2023-02-23 16:25:55 -05:00
- [NIP-78: Application-specific data ](78.md )
2022-05-01 06:48:57 -04:00
## Event Kinds
2023-03-09 12:16:57 -05:00
2023-03-07 05:28:53 -05:00
| kind | description | NIP |
| ------------- | -------------------------------- | ----------- |
| 0 | Metadata | [1 ](01.md ) |
| 1 | Short Text Note | [1 ](01.md ) |
| 2 | Recommend Relay | [1 ](01.md ) |
| 3 | Contacts | [2 ](02.md ) |
| 4 | Encrypted Direct Messages | [4 ](04.md ) |
| 5 | Event Deletion | [9 ](09.md ) |
2023-03-29 14:37:54 -04:00
| 6 | Reposts | [18 ](18.md ) |
2023-03-07 05:28:53 -05:00
| 7 | Reaction | [25 ](25.md ) |
| 8 | Badge Award | [58 ](58.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 ) |
| 1984 | Reporting | [56 ](56.md ) |
| 9734 | Zap Request | [57 ](57.md ) |
| 9735 | Zap | [57 ](57.md ) |
2023-03-09 12:16:57 -05:00
| 10000 | Mute List | [51 ](51.md ) |
| 10001 | Pin List | [51 ](51.md ) |
2023-03-07 05:28:53 -05:00
| 10002 | Relay List Metadata | [65 ](65.md ) |
| 22242 | Client Authentication | [42 ](42.md ) |
| 24133 | Nostr Connect | [46 ](46.md ) |
2023-03-09 12:16:57 -05:00
| 30000 | Categorized People List | [51 ](51.md ) |
| 30001 | Categorized Bookmark List | [51 ](51.md ) |
2023-03-07 05:28:53 -05:00
| 30008 | Profile Badges | [58 ](58.md ) |
| 30009 | Badge Definition | [58 ](58.md ) |
| 30023 | Long-form Content | [23 ](23.md ) |
| 30078 | Application-specific Data | [78 ](78.md ) |
2023-04-13 18:29:39 -04:00
### Event Kind Ranges
| range | description | NIP |
| ---------------- | -------------------------------- | ----------- |
| `1000` --`9999` | Regular Events | [16 ](16.md ) |
| `10000` --`19999` | Replaceable Events | [16 ](16.md ) |
| `20000` --`29999` | Ephemeral Events | [16 ](16.md ) |
| `30000` --`39999` | Parameterized Replaceable Events | [33 ](33.md ) |
2022-10-08 07:02:13 -04:00
## Message types
### Client to Relay
2023-04-13 18:28:57 -04:00
| type | description | NIP |
| ------- | --------------------------------------------------- | ----------- |
| `AUTH` | used to send authentication events | [42 ](42.md ) |
| `CLOSE` | used to stop previous subscriptions | [1 ](01.md ) |
| `COUNT` | used to request event counts | [45 ](45.md ) |
| `EVENT` | used to publish events | [1 ](01.md ) |
| `REQ` | used to request events and subscribe to new updates | [1 ](01.md ) |
2022-10-08 07:02:13 -04:00
### Relay to Client
2023-04-13 18:28:57 -04:00
| type | description | NIP |
| -------- | ------------------------------------------------------- | ----------- |
| `AUTH` | used to send authentication challenges | [42 ](42.md ) |
| `COUNT` | used to send requested event counts to clients | [45 ](45.md ) |
| `EOSE` | used to notify clients all stored events have been sent | [1 ](01.md ) |
| `EVENT` | used to send events requested to clients | [1 ](01.md ) |
| `NOTICE` | used to send human-readable messages to clients | [1 ](01.md ) |
| `OK` | used to notify clients if an EVENT was successful | [20 ](20.md ) |
2022-10-08 07:02:13 -04:00
Please update these lists when proposing NIPs introducing new event kinds.
2022-05-02 08:30:30 -04:00
2023-04-13 18:28:38 -04:00
When experimenting with kinds, keep in mind the classification introduced by [NIP-16 ](16.md ) and [NIP-33 ](33.md ).
2022-07-11 14:40:58 -04:00
2023-01-25 11:20:36 -05:00
## Standardized Tags
2023-04-13 18:28:03 -04:00
| name | value | other parameters | NIP |
| -------------- | ------------------------------------ | -------------------- | ------------------------ |
| `a` | coordinates to an event | relay URL | [33 ](33.md ), [23 ](23.md ) |
| `d` | identifier | -- | [33 ](33.md ) |
| `e` | event id (hex) | relay URL, marker | [1 ](01.md ), [10 ](10.md ) |
| `g` | geohash | -- | [12 ](12.md ) |
| `i` | identity | proof | [39 ](39.md ) |
| `p` | pubkey (hex) | relay URL | [1 ](01.md ) |
| `r` | a reference (URL, etc) | -- | [12 ](12.md ) |
| `t` | hashtag | -- | [12 ](12.md ) |
| `amount` | millisats | -- | [57 ](57.md ) |
| `bolt11` | `bolt11` invoice | -- | [57 ](57.md ) |
| `challenge` | challenge string | -- | [42 ](42.md ) |
| `delegation` | pubkey, conditions, delegation token | -- | [26 ](26.md ) |
| `description` | badge description | -- | [58 ](58.md ) |
| `description` | invoice description | -- | [57 ](57.md ) |
| `expiration` | unix timestamp (string) | -- | [40 ](40.md ) |
| `image` | image URL | dimensions in pixels | [23 ](23.md ), [58 ](58.md ) |
| `lnurl` | `bech32` encoded `lnurl` | -- | [57 ](57.md ) |
| `name` | badge name | -- | [58 ](58.md ) |
| `nonce` | random | -- | [13 ](13.md ) |
| `preimage` | hash of `bolt11` invoice | -- | [57 ](57.md ) |
| `published_at` | unix timestamp (string) | -- | [23 ](23.md ) |
| `relay` | relay url | -- | [42 ](42.md ) |
| `relays` | relay list | -- | [57 ](57.md ) |
| `subject` | subject | -- | [14 ](14.md ) |
| `summary` | article summary | -- | [23 ](23.md ) |
| `thumb` | badge thumbnail | dimensions in pixels | [58 ](58.md ) |
| `title` | article title | -- | [23 ](23.md ) |
| `zap` | profile name | type of value | [57 ](57.md ) |
2023-01-25 11:20:36 -05:00
2022-05-02 08:30:30 -04:00
## Criteria for acceptance of NIPs
2023-01-02 05:16:59 -05:00
1. They should be implemented in at least two clients and one relay -- when applicable.
2022-05-02 08:30:30 -04:00
2. They should make sense.
2022-11-29 09:41:46 -05: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 05:16:59 -05: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 08:30:30 -04:00
## License
All NIPs are public domain.