diff options
| author | Kieran <kieran@harkin.me> | 2024-08-27 14:18:58 +0100 |
|---|---|---|
| committer | Kieran <kieran@harkin.me> | 2024-08-27 14:27:00 +0100 |
| commit | 765a18c81024f3933999d53e432542048ccd7e97 (patch) | |
| tree | 72e60189db82e8be78650f3ad64bba742ee76a86 | |
| parent | fade0164f52033314bf0a5ef9bd63c2483afae9b (diff) | |
nchatnchat
| -rw-r--r-- | 17.md | 5 | ||||
| -rw-r--r-- | 19.md | 3 | ||||
| -rw-r--r-- | 28.md | 5 |
3 files changed, 13 insertions, 0 deletions
| @@ -123,6 +123,11 @@ This NIP offers the following privacy and security features: | |||
| 123 | 123 | ||
| 124 | The main limitation of this approach is having to send a separate encrypted event to each receiver. Group chats with more than 100 participants should find a more suitable messaging scheme. | 124 | The main limitation of this approach is having to send a separate encrypted event to each receiver. Group chats with more than 100 participants should find a more suitable messaging scheme. |
| 125 | 125 | ||
| 126 | ## NIP-19 entity | ||
| 127 | To create an `nchat` link: | ||
| 128 | - `kind`: `17` | ||
| 129 | - `special`: one or more pubkeys concatenated | ||
| 130 | |||
| 126 | ## Implementation | 131 | ## Implementation |
| 127 | 132 | ||
| 128 | 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. | 133 | 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. |
| @@ -36,6 +36,7 @@ These are the possible bech32 prefixes with `TLV`: | |||
| 36 | - `nevent`: a nostr event | 36 | - `nevent`: a nostr event |
| 37 | - `naddr`: a nostr _replaceable event_ coordinate | 37 | - `naddr`: a nostr _replaceable event_ coordinate |
| 38 | - `nrelay`: a nostr relay (deprecated) | 38 | - `nrelay`: a nostr relay (deprecated) |
| 39 | - `nchat`: a nostr chat conversation | ||
| 39 | 40 | ||
| 40 | These possible standardized `TLV` types are indicated here: | 41 | These possible standardized `TLV` types are indicated here: |
| 41 | 42 | ||
| @@ -44,6 +45,7 @@ These possible standardized `TLV` types are indicated here: | |||
| 44 | - for `nprofile` it will be the 32 bytes of the profile public key | 45 | - for `nprofile` it will be the 32 bytes of the profile public key |
| 45 | - for `nevent` it will be the 32 bytes of the event id | 46 | - for `nevent` it will be the 32 bytes of the event id |
| 46 | - for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced. For normal replaceable events use an empty string. | 47 | - for `naddr`, it is the identifier (the `"d"` tag) of the event being referenced. For normal replaceable events use an empty string. |
| 48 | - for `nchat`, see chat nip for details. | ||
| 47 | - `1`: `relay` | 49 | - `1`: `relay` |
| 48 | - for `nprofile`, `nevent` and `naddr`, _optionally_, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii | 50 | - for `nprofile`, `nevent` and `naddr`, _optionally_, a relay in which the entity (profile or event) is more likely to be found, encoded as ascii |
| 49 | - this may be included multiple times | 51 | - this may be included multiple times |
| @@ -53,6 +55,7 @@ These possible standardized `TLV` types are indicated here: | |||
| 53 | - `3`: `kind` | 55 | - `3`: `kind` |
| 54 | - for `naddr`, the 32-bit unsigned integer of the kind, big-endian | 56 | - for `naddr`, the 32-bit unsigned integer of the kind, big-endian |
| 55 | - for `nevent`, _optionally_, the 32-bit unsigned integer of the kind, big-endian | 57 | - for `nevent`, _optionally_, the 32-bit unsigned integer of the kind, big-endian |
| 58 | - for `nchat`, the NIP number of the chat. | ||
| 56 | 59 | ||
| 57 | ## Examples | 60 | ## Examples |
| 58 | 61 | ||
| @@ -133,6 +133,11 @@ Clients MAY hide event 42s for users other than the user who sent the event 44. | |||
| 133 | } | 133 | } |
| 134 | ``` | 134 | ``` |
| 135 | 135 | ||
| 136 | ## NIP-19 entity | ||
| 137 | To create an `nchat` link: | ||
| 138 | - `kind`: `28` | ||
| 139 | - `special`: `id` from `kind: 40` | ||
| 140 | |||
| 136 | ## Relay recommendations | 141 | ## Relay recommendations |
| 137 | 142 | ||
| 138 | Clients SHOULD use the relay URLs of the metadata events. | 143 | Clients SHOULD use the relay URLs of the metadata events. |