From 2ffd8ec36360512c5f5087519b667434b4dc7832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=8E=9F=E6=99=B4=E5=A4=AA?= Date: Fri, 29 Nov 2024 14:40:11 +0000 Subject: [PATCH 1/6] use example domain --- 46.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/46.md b/46.md index 824059c..7f8859f 100644 --- a/46.md +++ b/46.md @@ -213,7 +213,7 @@ _remote-signer_ MAY publish it's metadata by using [NIP-05](05.md) and [NIP-89]( }, "nip46": { "relays": ["wss://relay1","wss://relay2"...], - "nostrconnect_url": "https://remote-signer-domain.com/" + "nostrconnect_url": "https://remote-signer-domain.example/" } } ``` From fe1fe75caecfaaf0dcd675fb706a91347c9b3c80 Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Sat, 30 Nov 2024 15:57:50 +0900 Subject: [PATCH 2/6] mark kind 30001 as deprecated. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d362e6a..61fdbe8 100644 --- a/README.md +++ b/README.md @@ -183,7 +183,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `24242` | Blobs stored on mediaservers | [Blossom][blossom] | | `27235` | HTTP Auth | [98](98.md) | | `30000` | Follow sets | [51](51.md) | -| `30001` | Generic lists | [51](51.md) | +| `30001` | Generic lists | 51 (deprecated) | | `30002` | Relay sets | [51](51.md) | | `30003` | Bookmark sets | [51](51.md) | | `30004` | Curation sets | [51](51.md) | From 54c0c1352d73595b99b568248b87fe4542d30141 Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Sun, 1 Dec 2024 00:15:39 +0900 Subject: [PATCH 3/6] BREAKING.md: fix change of 7822a8b1 --- BREAKING.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BREAKING.md b/BREAKING.md index 40391e0..39be5a0 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -36,7 +36,8 @@ reverse chronological order. | 2023-12-27 | [17c67ef5](https://github.com/nostr-protocol/nips/commit/17c67ef5) | [94](94.md) | 'aes-256-gcm' tag was removed | | 2023-12-03 | [0ba45895](https://github.com/nostr-protocol/nips/commit/0ba45895) | [01](01.md) | WebSocket status code `4000` was replaced by 'CLOSED' message | | 2023-11-28 | [6de35f9e](https://github.com/nostr-protocol/nips/commit/6de35f9e) | [89](89.md) | 'client' tag value was changed | -| 2023-11-20 | [7822a8b1](https://github.com/nostr-protocol/nips/commit/7822a8b1) | [51](51.md) | `kind: 30000` and `kind: 30001` were deprecated | +| 2023-11-20 | [7822a8b1](https://github.com/nostr-protocol/nips/commit/7822a8b1) | [51](51.md) | `kind: 30001` was deprecated | +| 2023-11-20 | [7822a8b1](https://github.com/nostr-protocol/nips/commit/7822a8b1) | [51](51.md) | the meaning of `kind: 30000` was changed | | 2023-11-11 | [cbdca1e9](https://github.com/nostr-protocol/nips/commit/cbdca1e9) | [84](84.md) | 'range' tag was removed | | 2023-11-10 | [c945d8bd](https://github.com/nostr-protocol/nips/commit/c945d8bd) | [32](32.md) | 'l' tag annotations was removed | | 2023-11-07 | [108b7f16](https://github.com/nostr-protocol/nips/commit/108b7f16) | [01](01.md) | 'OK' message must have 4 items | From 33efff81a6909da9a85e81d296a711810f1848a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=8E=9F=E6=99=B4=E5=A4=AA?= Date: Wed, 4 Dec 2024 14:30:42 +0000 Subject: [PATCH 4/6] NIP-44: Proper base64 explanation "Encoding algorithm" instead of "compression algorithm" --- 44.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/44.md b/44.md index 8f781b8..b70acb2 100644 --- a/44.md +++ b/44.md @@ -63,7 +63,7 @@ NIP-44 version 2 has the following design characteristics: - SHA256 is used instead of SHA3 or BLAKE because it is already used in nostr. Also BLAKE's speed advantage is smaller in non-parallel environments. - A custom padding scheme is used instead of padmé because it provides better leakage reduction for small messages. -- Base64 encoding is used instead of another compression algorithm because it is widely available, and is already used in nostr. +- Base64 encoding is used instead of another encoding algorithm because it is widely available, and is already used in nostr. ### Encryption From 2776a2aa143e88295421bfc960e12adfcae5f8f8 Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Fri, 6 Dec 2024 00:58:50 +0900 Subject: [PATCH 5/6] add `P` tag to README. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 61fdbe8..9107bd7 100644 --- a/README.md +++ b/README.md @@ -282,6 +282,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `L` | label namespace | -- | [32](32.md) | | `m` | MIME type | -- | [94](94.md) | | `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) | +| `P` | pubkey (hex) | -- | [57](57.md) | | `q` | event id (hex) | relay URL, pubkey (hex) | [18](18.md) | | `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) | | `r` | relay url | marker | [65](65.md) | From 6d16019e9e98807b23b7ae1faf5edeead7ddee7a Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Thu, 5 Dec 2024 16:59:18 -0300 Subject: [PATCH 6/6] nip46: abandon nip04 entirely and just use nip44. --- 46.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/46.md b/46.md index 7f8859f..d170628 100644 --- a/46.md +++ b/46.md @@ -72,12 +72,12 @@ _user_ passes this token to _remote-signer_, which then sends `connect` *respons { "kind": 24133, "pubkey": , - "content": )>, + "content": )>, "tags": [["p", ]], } ``` -The `content` field is a JSON-RPC-like message that is [NIP-04](04.md) encrypted and has the following structure: +The `content` field is a JSON-RPC-like message that is [NIP-44](44.md) encrypted and has the following structure: ```jsonc { @@ -109,7 +109,7 @@ Each of the following are methods that the _client_ sends to the _remote-signer_ ### Requested permissions -The `connect` method may be provided with `optional_requested_permissions` for user convenience. The permissions are a comma-separated list of `method[:params]`, i.e. `nip04_encrypt,sign_event:4` meaning permissions to call `nip04_encrypt` and to call `sign_event` with `kind:4`. Optional parameter for `sign_event` is the kind number, parameters for other methods are to be defined later. Same permission format may be used for `perms` field of `metadata` in `nostrconnect://` string. +The `connect` method may be provided with `optional_requested_permissions` for user convenience. The permissions are a comma-separated list of `method[:params]`, i.e. `nip44_encrypt,sign_event:4` meaning permissions to call `nip44_encrypt` and to call `sign_event` with `kind:4`. Optional parameter for `sign_event` is the kind number, parameters for other methods are to be defined later. Same permission format may be used for `perms` field of `metadata` in `nostrconnect://` string. ## Response Events `kind:24133` @@ -118,13 +118,13 @@ The `connect` method may be provided with `optional_requested_permissions` for u "id": , "kind": 24133, "pubkey": , - "content": )>, + "content": )>, "tags": [["p", ]], "created_at": } ``` -The `content` field is a JSON-RPC-like message that is [NIP-04](04.md) encrypted and has the following structure: +The `content` field is a JSON-RPC-like message that is [NIP-44](44.md) encrypted and has the following structure: ```json { @@ -150,7 +150,7 @@ The `content` field is a JSON-RPC-like message that is [NIP-04](04.md) encrypted { "kind": 24133, "pubkey": "eff37350d839ce3707332348af4549a96051bd695d3223af4aabce4993531d86", - "content": nip04({ + "content": nip44({ "id": , "method": "sign_event", "params": [json_stringified(<{ @@ -170,7 +170,7 @@ The `content` field is a JSON-RPC-like message that is [NIP-04](04.md) encrypted { "kind": 24133, "pubkey": "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52", - "content": nip04({ + "content": nip44({ "id": , "result": json_stringified() }), @@ -224,4 +224,4 @@ The `` MAY be used to verify the domain from _remote-s _remote-signer_ MAY publish a NIP-89 `kind: 31990` event with `k` tag of `24133`, which MAY also include one or more `relay` tags and MAY include `nostrconnect_url` tag. The semantics of `relay` and `nostrconnect_url` tags are the same as in the section above. -_client_ MAY improve UX by discovering _remote-signers_ using their `kind: 31990` events. _client_ MAY then pre-generate `nostrconnect://` strings for the _remote-signers_, and SHOULD in that case verify that `kind: 31990` event's author is mentioned in signer's `nostr.json?name=_` file as ``. +_client_ MAY improve UX by discovering _remote-signers_ using their `kind: 31990` events. _client_ MAY then pre-generate `nostrconnect://` strings for the _remote-signers_, and SHOULD in that case verify that `kind: 31990` event's author is mentioned in signer's `nostr.json?name=_` file as ``.