nostr-protocol / nips
- воскресенье, 5 февраля 2023 г. в 00:37:33
Nostr Implementation Possibilities
NIPs stand for Nostr Implementation Possibilities. They exist to document what MUST, what SHOULD and what MAY be implemented by Nostr-compatible relay and client software.
window.nostr capability for web browserse and p tags in text events.nostr: URL scheme| kind | description | NIP |
|---|---|---|
| 0 | Metadata | 1, 5 |
| 1 | Text | 1 |
| 2 | Recommend Relay | 1 |
| 3 | Contacts | 2 |
| 4 | Encrypted Direct Messages | 4 |
| 5 | Event Deletion | 9 |
| 7 | Reaction | 25 |
| 40 | Channel Creation | 28 |
| 41 | Channel Metadata | 28 |
| 42 | Channel Message | 28 |
| 43 | Channel Hide Message | 28 |
| 44 | Channel Mute User | 28 |
| 45-49 | Public Chat Reserved | 28 |
| 22242 | Client Authentication | 42 |
| 10000-19999 | Replaceable Events Reserved | 16 |
| 20000-29999 | Ephemeral Events Reserved | 16 |
| 30000-39999 | Param. Repl. Events Reserved | 33 |
| type | description | NIP |
|---|---|---|
| EVENT | used to publish events | 1 |
| REQ | used to request events and subscribe to new updates | 1 |
| CLOSE | used to stop previous subscriptions | 1 |
| AUTH | used to send authentication events | 42 |
| type | description | NIP |
|---|---|---|
| EVENT | used to send events requested to clients | 1 |
| NOTICE | used to send human-readable messages to clients | 1 |
| EOSE | used to notify clients all stored events have been sent | 15 |
| OK | used to notify clients if an EVENT was successuful | 20 |
| AUTH | used to send authentication challenges | 42 |
Please update these lists when proposing NIPs introducing new event kinds.
When experimenting with kinds, keep in mind the classification introduced by NIP-16.
| name | value | other parameters | NIP |
|---|---|---|---|
| e | event id (hex) | relay URL, marker | 1, 10 |
| p | pubkey (hex) | relay URL | 1 |
| r | a reference (URL, etc) | 12 | |
| t | hashtag | 12 | |
| g | geohash | 12 | |
| nonce | random | 13 | |
| subject | subject | 14 | |
| d | identifier | 33 | |
| expiration | unix timestamp (string) | 40 |
All NIPs are public domain.