mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-12-09 08:38:50 +00:00
Compare commits
1 Commits
contradict
...
alexgleaso
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60fce9c520 |
14
17.md
14
17.md
@@ -57,7 +57,7 @@ Kind `14`s MUST never be signed. If it is signed, the message might leak to rela
|
|||||||
["file-type", "<file-mime-type>"],
|
["file-type", "<file-mime-type>"],
|
||||||
["encryption-algorithm", "<encryption-algorithm>"],
|
["encryption-algorithm", "<encryption-algorithm>"],
|
||||||
["decryption-key", "<decryption-key>"],
|
["decryption-key", "<decryption-key>"],
|
||||||
["decryption-nonce", "<decryption-nonce>"],
|
["decryptiion-nonce", "<decryption-nonce>"],
|
||||||
["x", "<the SHA-256 hexencoded string of the file>"],
|
["x", "<the SHA-256 hexencoded string of the file>"],
|
||||||
// rest of tags...
|
// rest of tags...
|
||||||
],
|
],
|
||||||
@@ -74,16 +74,16 @@ Kind 15 is used for sending encrypted file event messages:
|
|||||||
- `content`: The URL of the file (`<file-url>`).
|
- `content`: The URL of the file (`<file-url>`).
|
||||||
- `x` containing the SHA-256 hexencoded string of the file.
|
- `x` containing the SHA-256 hexencoded string of the file.
|
||||||
- `size` (optional) size of file in bytes
|
- `size` (optional) size of file in bytes
|
||||||
- `dim` (optional) size of the file in pixels in the form `<width>x<height>`
|
- `dim` (optional) size of file in pixels in the form `<width>x<height>`
|
||||||
- `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the client is loading the file
|
- `blurhash`(optional) the [blurhash](https://github.com/woltapp/blurhash) to show while the file is being loaded by the client
|
||||||
- `thumb` (optional) URL of thumbnail with same aspect ratio (encrypted with the same key, nonce)
|
- `thumb` (optional) url of thumbnail with same aspect ratio
|
||||||
- `fallback` (optional) zero or more fallback file sources in case `url` fails
|
- `fallback` (optional) zero or more fallback file sources in case `url` fails
|
||||||
|
|
||||||
Just like kind 14, kind `15`s MUST never be signed.
|
Just like kind 14, kind `15`s MUST never be signed.
|
||||||
|
|
||||||
## Chat Rooms
|
## Chat Rooms
|
||||||
|
|
||||||
The set of `pubkey` + `p` tags defines a chat room. If a new `p` tag is added or a current one is removed, a new room is created with a clean message history.
|
The set of `pubkey` + `p` tags defines a chat room. If a new `p` tag is added or a current one is removed, a new room is created with clean message history.
|
||||||
|
|
||||||
Clients SHOULD render messages of the same room in a continuous thread.
|
Clients SHOULD render messages of the same room in a continuous thread.
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ An optional `subject` tag defines the current name/topic of the conversation. An
|
|||||||
|
|
||||||
## Encrypting
|
## Encrypting
|
||||||
|
|
||||||
Following [NIP-59](59.md), the **unsigned** `kind:14` & `kind:15` chat messages must be sealed (`kind:13`) and then gift-wrapped (`kind:1059`) to each receiver and the sender individually.
|
Following [NIP-59](59.md), the **unsigned** `kind:14` & `kind:15` chat message must be sealed (`kind:13`) and then gift-wrapped (`kind:1059`) to each receiver and the sender individually.
|
||||||
|
|
||||||
```jsonc
|
```jsonc
|
||||||
{
|
{
|
||||||
@@ -173,7 +173,7 @@ The main limitation of this approach is having to send a separate encrypted even
|
|||||||
|
|
||||||
Clients implementing this NIP should by default only connect to the set of relays found in their `kind:10050` list. From that they should be able to load all messages both sent and received as well as get new live updates, making it for a very simple and lightweight implementation that should be fast.
|
Clients implementing this NIP should by default only connect to the set of relays found in their `kind:10050` list. From that they should be able to load all messages both sent and received as well as get new live updates, making it for a very simple and lightweight implementation that should be fast.
|
||||||
|
|
||||||
When sending a message to anyone, clients must then connect to the relays in the receiver's `kind:10050` and send the events there but can disconnect right after unless more messages are expected to be sent (e.g. the chat tab is still selected). Clients should also send a copy of their outgoing messages to their own `kind:10050` relay set.
|
When sending a message to anyone, clients must then connect to the relays in the receiver's `kind:10050` and send the events there, but can disconnect right after unless more messages are expected to be sent (e.g. the chat tab is still selected). Clients should also send a copy of their outgoing messages to their own `kind:10050` relay set.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
|
|||||||
4
23.md
4
23.md
@@ -60,7 +60,3 @@ References to other Nostr notes, articles or profiles must be made according to
|
|||||||
"id": "..."
|
"id": "..."
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Replies & Comments
|
|
||||||
|
|
||||||
Replies to `kind 30023` MUST use [NIP-22](./22.md) `kind 1111` comments.
|
|
||||||
19
73.md
19
73.md
@@ -14,10 +14,10 @@ There are certain established global content identifiers such as [Book ISBNs](ht
|
|||||||
## Supported IDs
|
## Supported IDs
|
||||||
|
|
||||||
| Type | `i` tag | `k` tag |
|
| Type | `i` tag | `k` tag |
|
||||||
| --- | --- | --- |
|
|- | - | - |
|
||||||
| URLs | "`<URL, normalized, no fragment>`" | "web" |
|
| URLs | "`<URL, normalized, no fragment>`" | "`<scheme-host, normalized>`" |
|
||||||
| Hashtags | "#`<topic, lowercase>`" | "#" |
|
| Hashtags | "#`<topic, lowercase>`" | "#" |
|
||||||
| Geohashes | "geo:`<geohash, lowercase>`" | "geo" |
|
| Geohashes| "geo:`<geohash, lowercase>`" | "geo" |
|
||||||
| Books | "isbn:`<id, without hyphens>`" | "isbn" |
|
| Books | "isbn:`<id, without hyphens>`" | "isbn" |
|
||||||
| Podcast Feeds | "podcast:guid:`<guid>`" | "podcast:guid" |
|
| Podcast Feeds | "podcast:guid:`<guid>`" | "podcast:guid" |
|
||||||
| Podcast Episodes | "podcast:item:guid:`<guid>`" | "podcast:item:guid" |
|
| Podcast Episodes | "podcast:item:guid:`<guid>`" | "podcast:item:guid" |
|
||||||
@@ -29,17 +29,6 @@ There are certain established global content identifiers such as [Book ISBNs](ht
|
|||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
### Webpages
|
|
||||||
|
|
||||||
For the webpage "https://myblog.example.com/post/2012-03-27/hello-world" the "i" and "k" tags are:
|
|
||||||
|
|
||||||
```jsonc
|
|
||||||
[
|
|
||||||
["i","https://myblog.example.com/post/2012-03-27/hello-world"],
|
|
||||||
["k", "web"]
|
|
||||||
]
|
|
||||||
```
|
|
||||||
|
|
||||||
### Books:
|
### Books:
|
||||||
|
|
||||||
- Book ISBN: `["i", "isbn:9780765382030"]` - https://isbnsearch.org/isbn/9780765382030
|
- Book ISBN: `["i", "isbn:9780765382030"]` - https://isbnsearch.org/isbn/9780765382030
|
||||||
@@ -67,3 +56,5 @@ Each `i` tag MAY have a url hint as the second argument to redirect people to a
|
|||||||
`["i", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f", https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg]`
|
`["i", "podcast:item:guid:d98d189b-dc7b-45b1-8720-d4b98690f31f", https://fountain.fm/episode/z1y9TMQRuqXl2awyrQxg]`
|
||||||
|
|
||||||
`["i", "isan:0000-0000-401A-0000-7", https://www.imdb.com/title/tt0120737]`
|
`["i", "isan:0000-0000-401A-0000-7", https://www.imdb.com/title/tt0120737]`
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
13
89.md
13
89.md
@@ -74,19 +74,6 @@ Using a `k` tag(s) (instead of having the kind of the `d` tag) provides:
|
|||||||
|
|
||||||
Multiple tags might be registered by the app, following NIP-19 nomenclature as the second value of the array.
|
Multiple tags might be registered by the app, following NIP-19 nomenclature as the second value of the array.
|
||||||
|
|
||||||
No contradictory hints can appear. Apps should not publish handlers with the same `platform:type` duple.
|
|
||||||
|
|
||||||
For example: an event with:
|
|
||||||
|
|
||||||
```jsonc
|
|
||||||
["web", "https://.../path1/<bech32>", "nevent"],
|
|
||||||
["web", "https://.../path2/<bech32>", "nevent"],
|
|
||||||
```
|
|
||||||
|
|
||||||
where the `web` + `nevent` duple is duplicated with contradictory values is invalid and clients SHOULD ignore it.
|
|
||||||
|
|
||||||
Applications that have different URLs should use different `kind:31990` to announce the different URLs that should be used per kind.
|
|
||||||
|
|
||||||
A tag without a second value in the array SHOULD be considered a generic handler for any NIP-19 entity that is not handled by a different tag.
|
A tag without a second value in the array SHOULD be considered a generic handler for any NIP-19 entity that is not handled by a different tag.
|
||||||
|
|
||||||
# Client tag
|
# Client tag
|
||||||
|
|||||||
13
README.md
13
README.md
@@ -127,10 +127,6 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
|
|||||||
| `20` | Picture | [68](68.md) |
|
| `20` | Picture | [68](68.md) |
|
||||||
| `21` | Video Event | [71](71.md) |
|
| `21` | Video Event | [71](71.md) |
|
||||||
| `22` | Short-form Portrait Video Event | [71](71.md) |
|
| `22` | Short-form Portrait Video Event | [71](71.md) |
|
||||||
| `30` | internal reference | [NKBIP-03] |
|
|
||||||
| `31` | external web reference | [NKBIP-03] |
|
|
||||||
| `32` | hardcopy reference | [NKBIP-03] |
|
|
||||||
| `33` | prompt reference | [NKBIP-03] |
|
|
||||||
| `40` | Channel Creation | [28](28.md) |
|
| `40` | Channel Creation | [28](28.md) |
|
||||||
| `41` | Channel Metadata | [28](28.md) |
|
| `41` | Channel Metadata | [28](28.md) |
|
||||||
| `42` | Channel Message | [28](28.md) |
|
| `42` | Channel Message | [28](28.md) |
|
||||||
@@ -217,8 +213,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
|
|||||||
| `30023` | Long-form Content | [23](23.md) |
|
| `30023` | Long-form Content | [23](23.md) |
|
||||||
| `30024` | Draft Long-form Content | [23](23.md) |
|
| `30024` | Draft Long-form Content | [23](23.md) |
|
||||||
| `30030` | Emoji sets | [51](51.md) |
|
| `30030` | Emoji sets | [51](51.md) |
|
||||||
| `30040` | Curated Publication Index | [NKBIP-01] |
|
| `30040` | Modular Article Header | [NKBIP-01] |
|
||||||
| `30041` | Curated Publication Content | [NKBIP-01] |
|
| `30041` | Modular Article Content | [NKBIP-01] |
|
||||||
| `30063` | Release artifact sets | [51](51.md) |
|
| `30063` | Release artifact sets | [51](51.md) |
|
||||||
| `30078` | Application-specific Data | [78](78.md) |
|
| `30078` | Application-specific Data | [78](78.md) |
|
||||||
| `30166` | Relay Discovery | [66](66.md) |
|
| `30166` | Relay Discovery | [66](66.md) |
|
||||||
@@ -252,9 +248,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
|
|||||||
[cornychat-slideset]: https://cornychat.com/datatypes#kind30388slideset
|
[cornychat-slideset]: https://cornychat.com/datatypes#kind30388slideset
|
||||||
[cornychat-linkset]: https://cornychat.com/datatypes#kind31388linkset
|
[cornychat-linkset]: https://cornychat.com/datatypes#kind31388linkset
|
||||||
[joinstr]: https://gitlab.com/1440000bytes/joinstr/-/blob/main/NIP.md
|
[joinstr]: https://gitlab.com/1440000bytes/joinstr/-/blob/main/NIP.md
|
||||||
[NKBIP-01]: https://wikistr.com/nkbip-01*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1
|
[NKBIP-01]: https://wikistr.com/nkbip-01
|
||||||
[NKBIP-02]: https://wikistr.com/nkbip-02*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1
|
[NKBIP-02]: https://wikistr.com/nkbip-02
|
||||||
[NKBIP-03]: https://wikistr.com/nkbip-03*fd208ee8c8f283780a9552896e4823cc9dc6bfd442063889577106940fd927c1
|
|
||||||
[blossom]: https://github.com/hzrd149/blossom
|
[blossom]: https://github.com/hzrd149/blossom
|
||||||
[Tidal-nostr]: https://wikistr.com/tidal-nostr
|
[Tidal-nostr]: https://wikistr.com/tidal-nostr
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user