upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes1
-rw-r--r--01.md6
-rw-r--r--18.md8
-rw-r--r--23.md4
-rw-r--r--32.md4
-rw-r--r--34.md7
-rw-r--r--38.md2
-rw-r--r--46.md85
-rw-r--r--52.md6
-rw-r--r--55.md178
-rw-r--r--58.md3
-rw-r--r--60.md205
-rw-r--r--61.md132
-rw-r--r--65.md4
-rw-r--r--71.md119
-rw-r--r--73.md24
-rw-r--r--75.md2
-rw-r--r--94.md13
-rw-r--r--96.md2
-rw-r--r--99.md2
-rw-r--r--BREAKING.md3
-rw-r--r--README.md119
22 files changed, 683 insertions, 246 deletions
diff --git a/.gitattributes b/.gitattributes
deleted file mode 100644
index a252d3d..0000000
--- a/.gitattributes
+++ /dev/null
@@ -1 +0,0 @@
1*.md linguist-detectable
diff --git a/01.md b/01.md
index 9e50204..d62f317 100644
--- a/01.md
+++ b/01.md
@@ -77,11 +77,11 @@ This NIP defines 3 standard tags that can be used across all event kinds with th
77 77
78- The `e` tag, used to refer to an event: `["e", <32-bytes lowercase hex of the id of another event>, <recommended relay URL, optional>]` 78- The `e` tag, used to refer to an event: `["e", <32-bytes lowercase hex of the id of another event>, <recommended relay URL, optional>]`
79- The `p` tag, used to refer to another user: `["p", <32-bytes lowercase hex of a pubkey>, <recommended relay URL, optional>]` 79- The `p` tag, used to refer to another user: `["p", <32-bytes lowercase hex of a pubkey>, <recommended relay URL, optional>]`
80- The `a` tag, used to refer to a (maybe parameterized) replaceable event 80- The `a` tag, used to refer to an addressable or replaceable event
81 - for an addressable event: `["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:<d tag value>, <recommended relay URL, optional>]` 81 - for an addressable event: `["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:<d tag value>, <recommended relay URL, optional>]`
82 - for a normal replaceable event: `["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:, <recommended relay URL, optional>]` 82 - for a normal replaceable event: `["a", <kind integer>:<32-bytes lowercase hex of a pubkey>:, <recommended relay URL, optional>]`
83 83
84As a convention, all single-letter (only english alphabet letters: a-z, A-Z) key tags are expected to be indexed by relays, such that it is possible, for example, to query or subscribe to events that reference the event `"5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"` by using the `{"#e": ["5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"]}` filter. 84As a convention, all single-letter (only english alphabet letters: a-z, A-Z) key tags are expected to be indexed by relays, such that it is possible, for example, to query or subscribe to events that reference the event `"5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"` by using the `{"#e": ["5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36"]}` filter. Only the first value in any given tag is indexed.
85 85
86### Kinds 86### Kinds
87 87
@@ -95,7 +95,7 @@ And also a convention for kind ranges that allow for easier experimentation and
95- for kind `n` such that `1000 <= n < 10000 || 4 <= n < 45 || n == 1 || n == 2`, events are **regular**, which means they're all expected to be stored by relays. 95- for kind `n` such that `1000 <= n < 10000 || 4 <= n < 45 || n == 1 || n == 2`, events are **regular**, which means they're all expected to be stored by relays.
96- for kind `n` such that `10000 <= n < 20000 || n == 0 || n == 3`, events are **replaceable**, which means that, for each combination of `pubkey` and `kind`, only the latest event MUST be stored by relays, older versions MAY be discarded. 96- for kind `n` such that `10000 <= n < 20000 || n == 0 || n == 3`, events are **replaceable**, which means that, for each combination of `pubkey` and `kind`, only the latest event MUST be stored by relays, older versions MAY be discarded.
97- for kind `n` such that `20000 <= n < 30000`, events are **ephemeral**, which means they are not expected to be stored by relays. 97- for kind `n` such that `20000 <= n < 30000`, events are **ephemeral**, which means they are not expected to be stored by relays.
98- for kind `n` such that `30000 <= n < 40000`, events are **parameterized replaceable**, which means that, for each combination of `pubkey`, `kind` and the `d` tag's first value, only the latest event MUST be stored by relays, older versions MAY be discarded. 98- for kind `n` such that `30000 <= n < 40000`, events are **addressable** by their `kind`, `pubkey` and `d` tag value -- which means that, for each combination of `kind`, `pubkey` and the `d` tag value, only the latest event MUST be stored by relays, older versions MAY be discarded.
99 99
100In case of replaceable events with the same timestamp, the event with the lowest id (first in lexical order) should be retained, and the other discarded. 100In case of replaceable events with the same timestamp, the event with the lowest id (first in lexical order) should be retained, and the other discarded.
101 101
diff --git a/18.md b/18.md
index 27c5915..41c9442 100644
--- a/18.md
+++ b/18.md
@@ -25,6 +25,14 @@ quote reposted. The `q` tag ensures quote reposts are not pulled and included
25as replies in threads. It also allows you to easily pull and count all of the 25as replies in threads. It also allows you to easily pull and count all of the
26quotes for a post. 26quotes for a post.
27 27
28`q` tags should follow the same conventions as NIP 10 `e` tags, with the exception
29of the `mark` argument.
30
31`["q", <event-id>, <relay-url>, <pubkey>]`
32
33Quote reposts MUST include the [NIP-21](21.md) `nevent`, `note`, or `naddr` of the
34event in the content.
35
28## Generic Reposts 36## Generic Reposts
29 37
30Since `kind 6` reposts are reserved for `kind 1` contents, we use `kind 16` 38Since `kind 6` reposts are reserved for `kind 1` contents, we use `kind 16`
diff --git a/23.md b/23.md
index d8fb51a..e5e85ff 100644
--- a/23.md
+++ b/23.md
@@ -20,7 +20,7 @@ The `.content` of these events should be a string text in Markdown syntax. To ma
20 20
21### Metadata 21### Metadata
22 22
23For the date of the last update the `.created_at` field should be used, for "tags"/"hashtags" (i.e. topics about which the event might be of relevance) the `t` tag should be used, as per NIP-12. 23For the date of the last update the `.created_at` field should be used, for "tags"/"hashtags" (i.e. topics about which the event might be of relevance) the `t` tag should be used.
24 24
25Other metadata fields can be added as tags to the event as necessary. Here we standardize 4 that may be useful, although they remain strictly optional: 25Other metadata fields can be added as tags to the event as necessary. Here we standardize 4 that may be useful, although they remain strictly optional:
26 26
@@ -31,7 +31,7 @@ Other metadata fields can be added as tags to the event as necessary. Here we st
31 31
32### Editability 32### Editability
33 33
34These articles are meant to be editable, so they should make use of the parameterized replaceability feature and include a `d` tag with an identifier for the article. Clients should take care to only publish and read these events from relays that implement that. If they don't do that they should also take care to hide old versions of the same article they may receive. 34These articles are meant to be editable, so they should include a `d` tag with an identifier for the article. Clients should take care to only publish and read these events from relays that implement that. If they don't do that they should also take care to hide old versions of the same article they may receive.
35 35
36### Linking 36### Linking
37 37
diff --git a/32.md b/32.md
index 66f0283..a99e52a 100644
--- a/32.md
+++ b/32.md
@@ -8,7 +8,7 @@ Labeling
8 8
9This NIP defines two new indexable tags to label events and a new event kind (`kind:1985`) to attach those labels to existing events. This supports several use cases, including distributed moderation, collection management, license assignment, and content classification. 9This NIP defines two new indexable tags to label events and a new event kind (`kind:1985`) to attach those labels to existing events. This supports several use cases, including distributed moderation, collection management, license assignment, and content classification.
10 10
11New Tags: 11New Tags:
12 12
13- `L` denotes a label namespace 13- `L` denotes a label namespace
14- `l` denotes a label 14- `l` denotes a label
@@ -146,7 +146,7 @@ Other Notes
146----------- 146-----------
147 147
148When using this NIP to bulk-label many targets at once, events may be requested for deletion using [NIP-09](09.md) and a replacement 148When using this NIP to bulk-label many targets at once, events may be requested for deletion using [NIP-09](09.md) and a replacement
149may be published. We have opted not to use parameterizable/replaceable events for this due to the 149may be published. We have opted not to use addressable/replaceable events for this due to the
150complexity in coming up with a standard `d` tag. In order to avoid ambiguity when querying, 150complexity in coming up with a standard `d` tag. In order to avoid ambiguity when querying,
151publishers SHOULD limit labeling events to a single namespace. 151publishers SHOULD limit labeling events to a single namespace.
152 152
diff --git a/34.md b/34.md
index 9363aeb..35bc1be 100644
--- a/34.md
+++ b/34.md
@@ -104,7 +104,9 @@ The first patch in a series MAY be a cover letter in the format produced by `git
104 104
105## Issues 105## Issues
106 106
107Issues are Markdown text that is just human-readable conversational threads related to the repository: bug reports, feature requests, questions or comments of any kind. Like patches, these SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag. 107Issues are Markdown text that is just human-readable conversational threads related to the repository: bug reports, feature requests, questions or comments of any kind. Like patches, these SHOULD be sent to the relays specified in that repository's announcement event's `"relays"` tag.
108
109Issues may have a `subject` tag, which clients can utilize to display a header. Additionally, one or more `t` tags may be included to provide labels for the issue.
108 110
109```json 111```json
110{ 112{
@@ -113,6 +115,9 @@ Issues are Markdown text that is just human-readable conversational threads rela
113 "tags": [ 115 "tags": [
114 ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"], 116 ["a", "30617:<base-repo-owner-pubkey>:<base-repo-id>"],
115 ["p", "<repository-owner>"] 117 ["p", "<repository-owner>"]
118 ["subject", "<issue-subject>"]
119 ["t", "<issue-label>"]
120 ["t", "<another-issue-label>"]
116 ] 121 ]
117} 122}
118``` 123```
diff --git a/38.md b/38.md
index 8b22b2a..ece5e5f 100644
--- a/38.md
+++ b/38.md
@@ -46,7 +46,7 @@ Two common status types are defined: `general` and `music`. `general` represent
46 46
47Any other status types can be used but they are not defined by this NIP. 47Any other status types can be used but they are not defined by this NIP.
48 48
49The status MAY include an `r`, `p`, `e` or `a` tag linking to a URL, profile, note, or parameterized replaceable event. 49The status MAY include an `r`, `p`, `e` or `a` tag linking to a URL, profile, note, or addressable event.
50 50
51The `content` MAY include emoji(s), or [NIP-30](30.md) custom emoji(s). If the `content` is an empty string then the client should clear the status. 51The `content` MAY include emoji(s), or [NIP-30](30.md) custom emoji(s). If the `content` is an empty string then the client should clear the status.
52 52
diff --git a/46.md b/46.md
index e1675b0..c356a9c 100644
--- a/46.md
+++ b/46.md
@@ -4,6 +4,10 @@ NIP-46
4Nostr Remote Signing 4Nostr Remote Signing
5-------------------- 5--------------------
6 6
7## Changes
8
9`remote-signer-key` is introduced, passed in bunker url, clients must differentiate between `remote-signer-pubkey` and `user-pubkey`, must call `get_public_key` after connect.
10
7## Rationale 11## Rationale
8 12
9Private keys should be exposed to as few systems - apps, operating systems, devices - as possible as each system adds to the attack surface. 13Private keys should be exposed to as few systems - apps, operating systems, devices - as possible as each system adds to the attack surface.
@@ -12,51 +16,53 @@ This NIP describes a method for 2-way communication between a remote signer and
12 16
13## Terminology 17## Terminology
14 18
15- **Local keypair**: A local public and private key-pair used to encrypt content and communicate with the remote signer. Usually created by the client application. 19- **user**: A person that is trying to use Nostr.
16- **Remote user pubkey**: The public key that the user wants to sign as. The remote signer has control of the private key that matches this public key. 20- **client**: A user-facing application that _user_ is looking at and clicking buttons in. This application will send requests to _remote-signer_.
17- **Remote signer pubkey**: This is the public key of the remote signer itself. This is needed in both `create_account` command because you don't yet have a remote user pubkey. 21- **remote-signer**: A daemon or server running somewhere that will answer requests from _client_, also known as "bunker".
22- **client-keypair/pubkey**: The keys generated by _client_. Used to encrypt content and communicate with _remote-signer_.
23- **remote-signer-keypair/pubkey**: The keys used by _remote-signer_ to encrypt content and communicate with _client_. This keypair MAY be same as _user-keypair_, but not necessarily.
24- **user-keypair/pubkey**: The actual keys representing _user_ (that will be used to sign events in response to `sign_event` requests, for example). The _remote-signer_ generally has control over these keys.
18 25
19All pubkeys specified in this NIP are in hex format. 26All pubkeys specified in this NIP are in hex format.
20 27
21## Initiating a connection 28## Initiating a connection
22 29
23To initiate a connection between a client and a remote signer there are a few different options. 30There are two ways to initiate a connection:
24
25### Direct connection initiated by remote signer
26 31
27This is most common in a situation where you have your own nsecbunker or other type of remote signer and want to connect through a client that supports remote signing. 32### Direct connection initiated by _remote-signer_
28 33
29The remote signer would provide a connection token in the form: 34_remote-signer_ provides connection token in the form:
30 35
31``` 36```
32bunker://<remote-user-pubkey>?relay=<wss://relay-to-connect-on>&relay=<wss://another-relay-to-connect-on>&secret=<optional-secret-value> 37bunker://<remote-signer-pubkey>?relay=<wss://relay-to-connect-on>&relay=<wss://another-relay-to-connect-on>&secret=<optional-secret-value>
33``` 38```
34 39
35This token is pasted into the client by the user and the client then uses the details to connect to the remote signer via the specified relay(s). Optional secret can be used for single successfully established connection only, remote signer SHOULD ignore new attempts to establish connection with old optional secret. 40_user_ pastes this token on _client_, which then uses the details to connect to _remote-signer_ via the specified relays. Optional secret can be used for single successfully established connection only, _remote-signer_ SHOULD ignore new attempts to establish connection with old optional secret.
36 41
37### Direct connection initiated by the client 42### Direct connection initiated by the client
38 43
39In this case, basically the opposite direction of the first case, the client provides a connection token (or encodes the token in a QR code) and the signer initiates a connection to the client via the specified relay(s). 44In this case, basically the opposite direction of the first case, _client_ provides a connection token (or encodes the token in a QR code) and _remote-signer_ initiates a connection via the specified relays.
40 45
41``` 46```
42nostrconnect://<local-keypair-pubkey>?relay=<wss://relay-to-connect-on>&metadata=<json metadata in the form: {"name":"...", "url": "...", "description": "..."}> 47nostrconnect://<client-pubkey>?relay=<wss://relay-to-connect-on>&metadata=<json metadata in the form: {"name":"...", "url": "...", "description": "..."}>
43``` 48```
44 49
45## The flow 50## The flow
46 51
471. Client creates a local keypair. This keypair doesn't need to be communicated to the user since it's largely disposable (i.e. the user doesn't need to see this pubkey). Clients might choose to store it locally and they should delete it when the user logs out. 521. _client_ generates `client-keypair`. This keypair doesn't need to be communicated to _user_ since it's largely disposable. _client_ might choose to store it locally and they should delete it on logout;
482. Client gets the remote user pubkey (either via a `bunker://` connection string or a NIP-05 login-flow; shown below) 532. _client_ gets `remote-signer-pubkey` (either via a `bunker://` connection string or a NIP-05 login-flow; shown below);
493. Clients use the local keypair to send requests to the remote signer by `p`-tagging and encrypting to the remote user pubkey. 543. _client_ use `client-keypair` to send requests to _remote-signer_ by `p`-tagging and encrypting to `remote-signer-pubkey`;
504. The remote signer responds to the client by `p`-tagging and encrypting to the local keypair pubkey. 554. _remote-signer_ responds to _client_ by `p`-tagging and encrypting to the `client-pubkey`.
51 56
52### Example flow for signing an event 57### Example flow for signing an event
53 58
54- Remote user pubkey (e.g. signing as) `fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52` 59- `remote-signer-pubkey` is `fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52`
55- Local pubkey is `eff37350d839ce3707332348af4549a96051bd695d3223af4aabce4993531d86` 60- `user-pubkey` is also `fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52`
61- `client-pubkey` is `eff37350d839ce3707332348af4549a96051bd695d3223af4aabce4993531d86`
56 62
57#### Signature request 63#### Signature request
58 64
59```json 65```js
60{ 66{
61 "kind": 24133, 67 "kind": 24133,
62 "pubkey": "eff37350d839ce3707332348af4549a96051bd695d3223af4aabce4993531d86", 68 "pubkey": "eff37350d839ce3707332348af4549a96051bd695d3223af4aabce4993531d86",
@@ -70,13 +76,13 @@ nostrconnect://<local-keypair-pubkey>?relay=<wss://relay-to-connect-on>&metadata
70 created_at: 1714078911 76 created_at: 1714078911
71 }>)] 77 }>)]
72 }), 78 }),
73 "tags": [["p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"]], // p-tags the remote user pubkey 79 "tags": [["p", "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52"]], // p-tags the remote-signer-pubkey
74} 80}
75``` 81```
76 82
77#### Response event 83#### Response event
78 84
79```json 85```js
80{ 86{
81 "kind": 24133, 87 "kind": 24133,
82 "pubkey": "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52", 88 "pubkey": "fa984bd7dbb282f07e16e7ae87b26a2a7b9b90b7246a44771f0cf5ae58018f52",
@@ -84,7 +90,7 @@ nostrconnect://<local-keypair-pubkey>?relay=<wss://relay-to-connect-on>&metadata
84 "id": <random_string>, 90 "id": <random_string>,
85 "result": json_stringified(<signed-event>) 91 "result": json_stringified(<signed-event>)
86 }), 92 }),
87 "tags": [["p", "eff37350d839ce3707332348af4549a96051bd695d3223af4aabce4993531d86"]], // p-tags the local keypair pubkey 93 "tags": [["p", "eff37350d839ce3707332348af4549a96051bd695d3223af4aabce4993531d86"]], // p-tags the client-pubkey
88} 94}
89``` 95```
90 96
@@ -94,20 +100,18 @@ nostrconnect://<local-keypair-pubkey>?relay=<wss://relay-to-connect-on>&metadata
94 100
95## Request Events `kind: 24133` 101## Request Events `kind: 24133`
96 102
97```jsonc 103```js
98{ 104{
99 "id": <id>,
100 "kind": 24133, 105 "kind": 24133,
101 "pubkey": <local_keypair_pubkey>, 106 "pubkey": <local_keypair_pubkey>,
102 "content": <nip04(<request>)>, 107 "content": <nip04(<request>)>,
103 "tags": [["p", <remote_user_pubkey>]], // NB: in the `create_account` event, the remote signer pubkey should be `p` tagged. 108 "tags": [["p", <remote-signer-pubkey>]],
104 "created_at": <unix timestamp in seconds>
105} 109}
106``` 110```
107 111
108The `content` field is a JSON-RPC-like message that is [NIP-04](04.md) encrypted and has the following structure: 112The `content` field is a JSON-RPC-like message that is [NIP-04](04.md) encrypted and has the following structure:
109 113
110```json 114```jsonc
111{ 115{
112 "id": <random_string>, 116 "id": <random_string>,
113 "method": <method_name>, 117 "method": <method_name>,
@@ -125,15 +129,16 @@ Each of the following are methods that the client sends to the remote signer.
125 129
126| Command | Params | Result | 130| Command | Params | Result |
127| ------------------------ | ------------------------------------------------- | ---------------------------------------------------------------------- | 131| ------------------------ | ------------------------------------------------- | ---------------------------------------------------------------------- |
128| `connect` | `[<remote_user_pubkey>, <optional_secret>, <optional_requested_permissions>]` | "ack" | 132| `connect` | `[<user_pubkey>, <optional_secret>, <optional_requested_permissions>]` | "ack" |
129| `sign_event` | `[<{kind, content, tags, created_at}>]` | `json_stringified(<signed_event>)` | 133| `sign_event` | `[<{kind, content, tags, created_at}>]` | `json_stringified(<signed_event>)` |
130| `ping` | `[]` | "pong" | 134| `ping` | `[]` | "pong" |
131| `get_relays` | `[]` | `json_stringified({<relay_url>: {read: <boolean>, write: <boolean>}})` | 135| `get_relays` | `[]` | `json_stringified({<relay_url>: {read: <boolean>, write: <boolean>}})` |
132| `get_public_key` | `[]` | `<hex-pubkey>` | 136| `get_public_key` | `[]` | `<user-pubkey>` |
133| `nip04_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip04_ciphertext>` | 137| `nip04_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip04_ciphertext>` |
134| `nip04_decrypt` | `[<third_party_pubkey>, <nip04_ciphertext_to_decrypt>]` | `<plaintext>` | 138| `nip04_decrypt` | `[<third_party_pubkey>, <nip04_ciphertext_to_decrypt>]` | `<plaintext>` |
135| `nip44_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip44_ciphertext>` | 139| `nip44_encrypt` | `[<third_party_pubkey>, <plaintext_to_encrypt>]` | `<nip44_ciphertext>` |
136| `nip44_decrypt` | `[<third_party_pubkey>, <nip44_ciphertext_to_decrypt>]` | `<plaintext>` | 140| `nip44_decrypt` | `[<third_party_pubkey>, <nip44_ciphertext_to_decrypt>]` | `<plaintext>` |
141| `create_account` | `[<username>, <domain>, <optional_email>, <optional_requested_permissions>]` | `<newly_created_user_pubkey>` |
137 142
138### Requested permissions 143### Requested permissions
139 144
@@ -145,9 +150,9 @@ The `connect` method may be provided with `optional_requested_permissions` for u
145{ 150{
146 "id": <id>, 151 "id": <id>,
147 "kind": 24133, 152 "kind": 24133,
148 "pubkey": <remote_signer_pubkey>, 153 "pubkey": <remote-signer-pubkey>,
149 "content": <nip04(<response>)>, 154 "content": <nip04(<response>)>,
150 "tags": [["p", <local_keypair_pubkey>]], 155 "tags": [["p", <client-pubkey>]],
151 "created_at": <unix timestamp in seconds> 156 "created_at": <unix timestamp in seconds>
152} 157}
153``` 158```
@@ -184,18 +189,6 @@ Clients should display (in a popup or new tab) the URL from the `error` field an
184 189
185![signing-example-with-auth-challenge](https://i.nostr.build/W3aj.png) 190![signing-example-with-auth-challenge](https://i.nostr.build/W3aj.png)
186 191
187## Remote Signer Commands
188
189Remote signers might support additional commands when communicating directly with it. These commands follow the same flow as noted above, the only difference is that when the client sends a request event, the `p`-tag is the pubkey of the remote signer itself and the `content` payload is encrypted to the same remote signer pubkey.
190
191### Methods/Commands
192
193Each of the following are methods that the client sends to the remote signer.
194
195| Command | Params | Result |
196| ---------------- | ------------------------------------------ | ------------------------------------ |
197| `create_account` | `[<username>, <domain>, <optional_email>, <optional_requested_permissions>]` | `<newly_created_remote_user_pubkey>` |
198
199## Appendix 192## Appendix
200 193
201### NIP-05 Login Flow 194### NIP-05 Login Flow
@@ -204,7 +197,7 @@ Clients might choose to present a more familiar login flow, so users can type a
204 197
205When the user types a NIP-05 the client: 198When the user types a NIP-05 the client:
206 199
207- Queries the `/.well-known/nostr.json` file from the domain for the NIP-05 address provided to get the user's pubkey (this is the **remote user pubkey**) 200- Queries the `/.well-known/nostr.json` file from the domain for the NIP-05 address provided to get the user's pubkey (this is the `user-pubkey`)
208- In the same `/.well-known/nostr.json` file, queries for the `nip46` key to get the relays that the remote signer will be listening on. 201- In the same `/.well-known/nostr.json` file, queries for the `nip46` key to get the relays that the remote signer will be listening on.
209- Now the client has enough information to send commands to the remote signer on behalf of the user. 202- Now the client has enough information to send commands to the remote signer on behalf of the user.
210 203
@@ -216,9 +209,9 @@ In this last case, most often used to facilitate an OAuth-like signin flow, the
216 209
217First the client will query for `kind: 31990` events that have a `k` tag of `24133`. 210First the client will query for `kind: 31990` events that have a `k` tag of `24133`.
218 211
219These are generally shown to a user, and once the user selects which remote signer to use and provides the remote user pubkey they want to use (via npub, pubkey, or nip-05 value), the client can initiate a connection. Note that it's on the user to select the remote signer that is actually managing the remote key that they would like to use in this case. If the remote user pubkey is managed on another remote signer, the connection will fail. 212These are generally shown to a user, and once the user selects which remote signer to use and provides the `user-pubkey` they want to use (via npub, pubkey, or nip-05 value), the client can initiate a connection. Note that it's on the user to select the _remote-signer_ that is actually managing the `user-keypair` that they would like to use in this case. If the `user-pubkey` is managed on another _remote-signer_ the connection will fail.
220 213
221In addition, it's important that clients validate that the pubkey of the announced remote signer matches the pubkey of the `_` entry in the `/.well-known/nostr.json` file of the remote signer's announced domain. 214In addition, it's important that clients validate that the pubkey of the announced _remote-signer_ matches the pubkey of the `_` entry in the `/.well-known/nostr.json` file of the remote signer's announced domain.
222 215
223Clients that allow users to create new accounts should also consider validating the availability of a given username in the namespace of remote signer's domain by checking the `/.well-known/nostr.json` file for existing usernames. Clients can then show users feedback in the UI before sending a `create_account` event to the remote signer and receiving an error in return. Ideally, remote signers would also respond with understandable error messages if a client tries to create an account with an existing username. 216Clients that allow users to create new accounts should also consider validating the availability of a given username in the namespace of remote signer's domain by checking the `/.well-known/nostr.json` file for existing usernames. Clients can then show users feedback in the UI before sending a `create_account` event to the remote signer and receiving an error in return. Ideally, remote signers would also respond with understandable error messages if a client tries to create an account with an existing username.
224 217
diff --git a/52.md b/52.md
index c6d6b96..cc2625a 100644
--- a/52.md
+++ b/52.md
@@ -20,7 +20,7 @@ This kind of calendar event starts on a date and ends before a different date in
20 20
21#### Format 21#### Format
22 22
23The format uses a parameterized replaceable event kind `31922`. 23The format uses an _addressable event_ of `kind:31922`.
24 24
25The `.content` of these events should be a detailed description of the calendar event. It is required but can be an empty string. 25The `.content` of these events should be a detailed description of the calendar event. It is required but can be an empty string.
26 26
@@ -79,7 +79,7 @@ This kind of calendar event spans between a start time and end time.
79 79
80#### Format 80#### Format
81 81
82The format uses a parameterized replaceable event kind `31923`. 82The format uses an _addressable event_ kind `31923`.
83 83
84The `.content` of these events should be a detailed description of the calendar event. It is required but can be an empty string. 84The `.content` of these events should be a detailed description of the calendar event. It is required but can be an empty string.
85 85
@@ -193,7 +193,7 @@ The RSVP MAY tag the author of the calendar event it is in response to using a `
193 193
194### Format 194### Format
195 195
196The format uses a parameterized replaceable event kind `31925`. 196The format uses an _addressable event_ kind `31925`.
197 197
198The `.content` of these events is optional and should be a free-form note that adds more context to this calendar event response. 198The `.content` of these events is optional and should be a free-form note that adds more context to this calendar event response.
199 199
diff --git a/55.md b/55.md
index c0ee957..54dc44a 100644
--- a/55.md
+++ b/55.md
@@ -53,8 +53,8 @@ val launcher = rememberLauncherForActivityResult(
53 Toast.LENGTH_SHORT 53 Toast.LENGTH_SHORT
54 ).show() 54 ).show()
55 } else { 55 } else {
56 val signature = activityResult.data?.getStringExtra("signature") 56 val result = activityResult.data?.getStringExtra("result")
57 // Do something with signature ... 57 // Do something with result ...
58 } 58 }
59 } 59 }
60) 60)
@@ -101,10 +101,10 @@ launcher.launch(intent)
101 context.startActivity(intent) 101 context.startActivity(intent)
102 ``` 102 ```
103 - result: 103 - result:
104 - If the user approved intent it will return the **npub** in the signature field 104 - If the user approved intent it will return the **pubkey** in the result field
105 105
106 ```kotlin 106 ```kotlin
107 val npub = intent.data?.getStringExtra("signature") 107 val pubkey = intent.data?.getStringExtra("result")
108 // The package name of the signer application 108 // The package name of the signer application
109 val packageName = intent.data?.getStringExtra("package") 109 val packageName = intent.data?.getStringExtra("package")
110 ``` 110 ```
@@ -118,16 +118,16 @@ launcher.launch(intent)
118 intent.putExtra("type", "sign_event") 118 intent.putExtra("type", "sign_event")
119 // To handle results when not waiting between intents 119 // To handle results when not waiting between intents
120 intent.putExtra("id", event.id) 120 intent.putExtra("id", event.id)
121 // Send the current logged in user npub 121 // Send the current logged in user pubkey
122 intent.putExtra("current_user", npub) 122 intent.putExtra("current_user", pubkey)
123 123
124 context.startActivity(intent) 124 context.startActivity(intent)
125 ``` 125 ```
126 - result: 126 - result:
127 - If the user approved intent it will return the **signature**, **id** and **event** fields 127 - If the user approved intent it will return the **result**, **id** and **event** fields
128 128
129 ```kotlin 129 ```kotlin
130 val signature = intent.data?.getStringExtra("signature") 130 val signature = intent.data?.getStringExtra("result")
131 // The id you sent 131 // The id you sent
132 val id = intent.data?.getStringExtra("id") 132 val id = intent.data?.getStringExtra("id")
133 val signedEventJson = intent.data?.getStringExtra("event") 133 val signedEventJson = intent.data?.getStringExtra("event")
@@ -142,18 +142,18 @@ launcher.launch(intent)
142 intent.putExtra("type", "nip04_encrypt") 142 intent.putExtra("type", "nip04_encrypt")
143 // to control the result in your application in case you are not waiting the result before sending another intent 143 // to control the result in your application in case you are not waiting the result before sending another intent
144 intent.putExtra("id", "some_id") 144 intent.putExtra("id", "some_id")
145 // Send the current logged in user npub 145 // Send the current logged in user pubkey
146 intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) 146 intent.putExtra("current_user", account.keyPair.pubkey)
147 // Send the hex pubKey that will be used for encrypting the data 147 // Send the hex pubkey that will be used for encrypting the data
148 intent.putExtra("pubKey", pubKey) 148 intent.putExtra("pubkey", pubkey)
149 149
150 context.startActivity(intent) 150 context.startActivity(intent)
151 ``` 151 ```
152 - result: 152 - result:
153 - If the user approved intent it will return the **signature** and **id** fields 153 - If the user approved intent it will return the **result** and **id** fields
154 154
155 ```kotlin 155 ```kotlin
156 val encryptedText = intent.data?.getStringExtra("signature") 156 val encryptedText = intent.data?.getStringExtra("result")
157 // the id you sent 157 // the id you sent
158 val id = intent.data?.getStringExtra("id") 158 val id = intent.data?.getStringExtra("id")
159 ``` 159 ```
@@ -167,10 +167,10 @@ launcher.launch(intent)
167 intent.putExtra("type", "nip44_encrypt") 167 intent.putExtra("type", "nip44_encrypt")
168 // to control the result in your application in case you are not waiting the result before sending another intent 168 // to control the result in your application in case you are not waiting the result before sending another intent
169 intent.putExtra("id", "some_id") 169 intent.putExtra("id", "some_id")
170 // Send the current logged in user npub 170 // Send the current logged in user pubkey
171 intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) 171 intent.putExtra("current_user", account.keyPair.pubkey)
172 // Send the hex pubKey that will be used for encrypting the data 172 // Send the hex pubkey that will be used for encrypting the data
173 intent.putExtra("pubKey", pubKey) 173 intent.putExtra("pubkey", pubkey)
174 174
175 context.startActivity(intent) 175 context.startActivity(intent)
176 ``` 176 ```
@@ -192,18 +192,18 @@ launcher.launch(intent)
192 intent.putExtra("type", "nip04_decrypt") 192 intent.putExtra("type", "nip04_decrypt")
193 // to control the result in your application in case you are not waiting the result before sending another intent 193 // to control the result in your application in case you are not waiting the result before sending another intent
194 intent.putExtra("id", "some_id") 194 intent.putExtra("id", "some_id")
195 // Send the current logged in user npub 195 // Send the current logged in user pubkey
196 intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) 196 intent.putExtra("current_user", account.keyPair.pubkey)
197 // Send the hex pubKey that will be used for decrypting the data 197 // Send the hex pubkey that will be used for decrypting the data
198 intent.putExtra("pubKey", pubKey) 198 intent.putExtra("pubkey", pubkey)
199 199
200 context.startActivity(intent) 200 context.startActivity(intent)
201 ``` 201 ```
202 - result: 202 - result:
203 - If the user approved intent it will return the **signature** and **id** fields 203 - If the user approved intent it will return the **result** and **id** fields
204 204
205 ```kotlin 205 ```kotlin
206 val plainText = intent.data?.getStringExtra("signature") 206 val plainText = intent.data?.getStringExtra("result")
207 // the id you sent 207 // the id you sent
208 val id = intent.data?.getStringExtra("id") 208 val id = intent.data?.getStringExtra("id")
209 ``` 209 ```
@@ -217,18 +217,41 @@ launcher.launch(intent)
217 intent.putExtra("type", "nip04_decrypt") 217 intent.putExtra("type", "nip04_decrypt")
218 // to control the result in your application in case you are not waiting the result before sending another intent 218 // to control the result in your application in case you are not waiting the result before sending another intent
219 intent.putExtra("id", "some_id") 219 intent.putExtra("id", "some_id")
220 // Send the current logged in user npub 220 // Send the current logged in user pubkey
221 intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) 221 intent.putExtra("current_user", account.keyPair.pubkey)
222 // Send the hex pubKey that will be used for decrypting the data 222 // Send the hex pubkey that will be used for decrypting the data
223 intent.putExtra("pubKey", pubKey) 223 intent.putExtra("pubkey", pubkey)
224 224
225 context.startActivity(intent) 225 context.startActivity(intent)
226 ``` 226 ```
227 - result: 227 - result:
228 - If the user approved intent it will return the **signature** and **id** fields 228 - If the user approved intent it will return the **result** and **id** fields
229 229
230 ```kotlin 230 ```kotlin
231 val plainText = intent.data?.getStringExtra("signature") 231 val plainText = intent.data?.getStringExtra("result")
232 // the id you sent
233 val id = intent.data?.getStringExtra("id")
234 ```
235
236- **get_relays**
237 - params:
238
239 ```kotlin
240 val intent = Intent(Intent.ACTION_VIEW, Uri.parse("nostrsigner:"))
241 intent.`package` = "com.example.signer"
242 intent.putExtra("type", "get_relays")
243 // to control the result in your application in case you are not waiting the result before sending another intent
244 intent.putExtra("id", "some_id")
245 // Send the current logged in user pubkey
246 intent.putExtra("current_user", account.keyPair.pubkey)
247
248 context.startActivity(intent)
249 ```
250 - result:
251 - If the user approved intent it will return the **result** and **id** fields
252
253 ```kotlin
254 val relayJsonText = intent.data?.getStringExtra("result")
232 // the id you sent 255 // the id you sent
233 val id = intent.data?.getStringExtra("id") 256 val id = intent.data?.getStringExtra("id")
234 ``` 257 ```
@@ -242,15 +265,15 @@ launcher.launch(intent)
242 intent.putExtra("type", "decrypt_zap_event") 265 intent.putExtra("type", "decrypt_zap_event")
243 // to control the result in your application in case you are not waiting the result before sending another intent 266 // to control the result in your application in case you are not waiting the result before sending another intent
244 intent.putExtra("id", "some_id") 267 intent.putExtra("id", "some_id")
245 // Send the current logged in user npub 268 // Send the current logged in user pubkey
246 intent.putExtra("current_user", account.keyPair.pubKey.toNpub()) 269 intent.putExtra("current_user", account.keyPair.pubkey)
247 context.startActivity(intent) 270 context.startActivity(intent)
248 ``` 271 ```
249 - result: 272 - result:
250 - If the user approved intent it will return the **signature** and **id** fields 273 - If the user approved intent it will return the **result** and **id** fields
251 274
252 ```kotlin 275 ```kotlin
253 val eventJson = intent.data?.getStringExtra("signature") 276 val eventJson = intent.data?.getStringExtra("result")
254 // the id you sent 277 // the id you sent
255 val id = intent.data?.getStringExtra("id") 278 val id = intent.data?.getStringExtra("id")
256 ``` 279 ```
@@ -259,11 +282,11 @@ launcher.launch(intent)
259 282
260To get the result back from Signer Application you should use contentResolver.query in Kotlin. If you are using another framework check the documentation of your framework or a third party library to get the result. 283To get the result back from Signer Application you should use contentResolver.query in Kotlin. If you are using another framework check the documentation of your framework or a third party library to get the result.
261 284
262If the user did not check the "remember my choice" option, the npub is not in Signer Application or the signer type is not recognized the `contentResolver` will return null 285If the user did not check the "remember my choice" option, the pubkey is not in Signer Application or the signer type is not recognized the `contentResolver` will return null
263 286
264For the SIGN_EVENT type Signer Application returns two columns "signature" and "event". The column event is the signed event json 287For the SIGN_EVENT type Signer Application returns two columns "result" and "event". The column event is the signed event json
265 288
266For the other types Signer Application returns the column "signature" 289For the other types Signer Application returns the column "result"
267 290
268If the user chose to always reject the event, signer application will return the column "rejected" and you should not open signer application 291If the user chose to always reject the event, signer application will return the column "rejected" and you should not open signer application
269 292
@@ -282,15 +305,15 @@ If the user chose to always reject the event, signer application will return the
282 ) 305 )
283 ``` 306 ```
284 - result: 307 - result:
285 - Will return the **npub** in the signature column 308 - Will return the **pubkey** in the result column
286 309
287 ```kotlin 310 ```kotlin
288 if (result == null) return 311 if (result == null) return
289 312
290 if (result.moveToFirst()) { 313 if (result.moveToFirst()) {
291 val index = it.getColumnIndex("signature") 314 val index = it.getColumnIndex("result")
292 if (index < 0) return 315 if (index < 0) return
293 val npub = it.getString(index) 316 val pubkey = it.getString(index)
294 } 317 }
295 ``` 318 ```
296 319
@@ -300,20 +323,20 @@ If the user chose to always reject the event, signer application will return the
300 ```kotlin 323 ```kotlin
301 val result = context.contentResolver.query( 324 val result = context.contentResolver.query(
302 Uri.parse("content://com.example.signer.SIGN_EVENT"), 325 Uri.parse("content://com.example.signer.SIGN_EVENT"),
303 listOf("$eventJson", "", "${logged_in_user_npub}"), 326 listOf("$eventJson", "", "${logged_in_user_pubkey}"),
304 null, 327 null,
305 null, 328 null,
306 null 329 null
307 ) 330 )
308 ``` 331 ```
309 - result: 332 - result:
310 - Will return the **signature** and the **event** columns 333 - Will return the **result** and the **event** columns
311 334
312 ```kotlin 335 ```kotlin
313 if (result == null) return 336 if (result == null) return
314 337
315 if (result.moveToFirst()) { 338 if (result.moveToFirst()) {
316 val index = it.getColumnIndex("signature") 339 val index = it.getColumnIndex("result")
317 val indexJson = it.getColumnIndex("event") 340 val indexJson = it.getColumnIndex("event")
318 val signature = it.getString(index) 341 val signature = it.getString(index)
319 val eventJson = it.getString(indexJson) 342 val eventJson = it.getString(indexJson)
@@ -326,20 +349,20 @@ If the user chose to always reject the event, signer application will return the
326 ```kotlin 349 ```kotlin
327 val result = context.contentResolver.query( 350 val result = context.contentResolver.query(
328 Uri.parse("content://com.example.signer.NIP04_ENCRYPT"), 351 Uri.parse("content://com.example.signer.NIP04_ENCRYPT"),
329 listOf("$plainText", "${hex_pub_key}", "${logged_in_user_npub}"), 352 listOf("$plainText", "${hex_pub_key}", "${logged_in_user_pubkey}"),
330 null, 353 null,
331 null, 354 null,
332 null 355 null
333 ) 356 )
334 ``` 357 ```
335 - result: 358 - result:
336 - Will return the **signature** column 359 - Will return the **result** column
337 360
338 ```kotlin 361 ```kotlin
339 if (result == null) return 362 if (result == null) return
340 363
341 if (result.moveToFirst()) { 364 if (result.moveToFirst()) {
342 val index = it.getColumnIndex("signature") 365 val index = it.getColumnIndex("result")
343 val encryptedText = it.getString(index) 366 val encryptedText = it.getString(index)
344 } 367 }
345 ``` 368 ```
@@ -350,20 +373,20 @@ If the user chose to always reject the event, signer application will return the
350 ```kotlin 373 ```kotlin
351 val result = context.contentResolver.query( 374 val result = context.contentResolver.query(
352 Uri.parse("content://com.example.signer.NIP44_ENCRYPT"), 375 Uri.parse("content://com.example.signer.NIP44_ENCRYPT"),
353 listOf("$plainText", "${hex_pub_key}", "${logged_in_user_npub}"), 376 listOf("$plainText", "${hex_pub_key}", "${logged_in_user_pubkey}"),
354 null, 377 null,
355 null, 378 null,
356 null 379 null
357 ) 380 )
358 ``` 381 ```
359 - result: 382 - result:
360 - Will return the **signature** column 383 - Will return the **result** column
361 384
362 ```kotlin 385 ```kotlin
363 if (result == null) return 386 if (result == null) return
364 387
365 if (result.moveToFirst()) { 388 if (result.moveToFirst()) {
366 val index = it.getColumnIndex("signature") 389 val index = it.getColumnIndex("result")
367 val encryptedText = it.getString(index) 390 val encryptedText = it.getString(index)
368 } 391 }
369 ``` 392 ```
@@ -374,20 +397,20 @@ If the user chose to always reject the event, signer application will return the
374 ```kotlin 397 ```kotlin
375 val result = context.contentResolver.query( 398 val result = context.contentResolver.query(
376 Uri.parse("content://com.example.signer.NIP04_DECRYPT"), 399 Uri.parse("content://com.example.signer.NIP04_DECRYPT"),
377 listOf("$encryptedText", "${hex_pub_key}", "${logged_in_user_npub}"), 400 listOf("$encryptedText", "${hex_pub_key}", "${logged_in_user_pubkey}"),
378 null, 401 null,
379 null, 402 null,
380 null 403 null
381 ) 404 )
382 ``` 405 ```
383 - result: 406 - result:
384 - Will return the **signature** column 407 - Will return the **result** column
385 408
386 ```kotlin 409 ```kotlin
387 if (result == null) return 410 if (result == null) return
388 411
389 if (result.moveToFirst()) { 412 if (result.moveToFirst()) {
390 val index = it.getColumnIndex("signature") 413 val index = it.getColumnIndex("result")
391 val encryptedText = it.getString(index) 414 val encryptedText = it.getString(index)
392 } 415 }
393 ``` 416 ```
@@ -398,44 +421,68 @@ If the user chose to always reject the event, signer application will return the
398 ```kotlin 421 ```kotlin
399 val result = context.contentResolver.query( 422 val result = context.contentResolver.query(
400 Uri.parse("content://com.example.signer.NIP44_DECRYPT"), 423 Uri.parse("content://com.example.signer.NIP44_DECRYPT"),
401 listOf("$encryptedText", "${hex_pub_key}", "${logged_in_user_npub}"), 424 listOf("$encryptedText", "${hex_pub_key}", "${logged_in_user_pubkey}"),
402 null, 425 null,
403 null, 426 null,
404 null 427 null
405 ) 428 )
406 ``` 429 ```
407 - result: 430 - result:
408 - Will return the **signature** column 431 - Will return the **result** column
409 432
410 ```kotlin 433 ```kotlin
411 if (result == null) return 434 if (result == null) return
412 435
413 if (result.moveToFirst()) { 436 if (result.moveToFirst()) {
414 val index = it.getColumnIndex("signature") 437 val index = it.getColumnIndex("result")
415 val encryptedText = it.getString(index) 438 val encryptedText = it.getString(index)
416 } 439 }
417 ``` 440 ```
418 441
442- **get_relays**
443 - params:
444
445 ```kotlin
446 val result = context.contentResolver.query(
447 Uri.parse("content://com.example.signer.GET_RELAYS"),
448 listOf("${logged_in_user_pubkey}"),
449 null,
450 null,
451 null
452 )
453 ```
454 - result:
455 - Will return the **result** column
456
457 ```kotlin
458 if (result == null) return
459
460 if (result.moveToFirst()) {
461 val index = it.getColumnIndex("result")
462 val relayJsonText = it.getString(index)
463 }
464 ```
465
419- **decrypt_zap_event** 466- **decrypt_zap_event**
420 - params: 467 - params:
421 468
422 ```kotlin 469 ```kotlin
423 val result = context.contentResolver.query( 470 val result = context.contentResolver.query(
424 Uri.parse("content://com.example.signer.DECRYPT_ZAP_EVENT"), 471 Uri.parse("content://com.example.signer.DECRYPT_ZAP_EVENT"),
425 listOf("$eventJson", "", "${logged_in_user_npub}"), 472 listOf("$eventJson", "", "${logged_in_user_pubkey}"),
426 null, 473 null,
427 null, 474 null,
428 null 475 null
429 ) 476 )
430 ``` 477 ```
431 - result: 478 - result:
432 - Will return the **signature** column 479 - Will return the **result** column
433 480
434 ```kotlin 481 ```kotlin
435 if (result == null) return 482 if (result == null) return
436 483
437 if (result.moveToFirst()) { 484 if (result.moveToFirst()) {
438 val index = it.getColumnIndex("signature") 485 val index = it.getColumnIndex("result")
439 val eventJson = it.getString(index) 486 val eventJson = it.getString(index)
440 } 487 }
441 ``` 488 ```
@@ -472,28 +519,35 @@ Android intents and browser urls have limitations, so if you are using the `retu
472 - params: 519 - params:
473 520
474 ```js 521 ```js
475 window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_encrypt&callbackUrl=https://example.com/?event=`; 522 window.href = `nostrsigner:${plainText}?pubkey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_encrypt&callbackUrl=https://example.com/?event=`;
476 ``` 523 ```
477 524
478- **nip44_encrypt** 525- **nip44_encrypt**
479 - params: 526 - params:
480 527
481 ```js 528 ```js
482 window.href = `nostrsigner:${plainText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_encrypt&callbackUrl=https://example.com/?event=`; 529 window.href = `nostrsigner:${plainText}?pubkey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_encrypt&callbackUrl=https://example.com/?event=`;
483 ``` 530 ```
484 531
485- **nip04_decrypt** 532- **nip04_decrypt**
486 - params: 533 - params:
487 534
488 ```js 535 ```js
489 window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_decrypt&callbackUrl=https://example.com/?event=`; 536 window.href = `nostrsigner:${encryptedText}?pubkey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip04_decrypt&callbackUrl=https://example.com/?event=`;
490 ``` 537 ```
491 538
492- **nip44_decrypt** 539- **nip44_decrypt**
493 - params: 540 - params:
494 541
495 ```js 542 ```js
496 window.href = `nostrsigner:${encryptedText}?pubKey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_decrypt&callbackUrl=https://example.com/?event=`; 543 window.href = `nostrsigner:${encryptedText}?pubkey=${hex_pub_key}&compressionType=none&returnType=signature&type=nip44_decrypt&callbackUrl=https://example.com/?event=`;
544 ```
545
546- **get_relays**
547 - params:
548
549 ```js
550 window.href = `nostrsigner:?compressionType=none&returnType=signature&type=get_relays&callbackUrl=https://example.com/?event=`;
497 ``` 551 ```
498 552
499- **decrypt_zap_event** 553- **decrypt_zap_event**
diff --git a/58.md b/58.md
index b6324f4..23921bd 100644
--- a/58.md
+++ b/58.md
@@ -13,8 +13,7 @@ user profiles:
13 13
142. A "Badge Award" event is a kind `8` event with a single `a` tag referencing a "Badge Definition" event and one or more `p` tags, one for each pubkey the badge issuer wishes to award. Awarded badges are immutable and non-transferrable. 142. A "Badge Award" event is a kind `8` event with a single `a` tag referencing a "Badge Definition" event and one or more `p` tags, one for each pubkey the badge issuer wishes to award. Awarded badges are immutable and non-transferrable.
15 15
163. A "Profile Badges" event is defined as a parameterized replaceable event 163. A "Profile Badges" event is defined as an _addressable event_ with kind `30008` with a `d` tag with the value `profile_badges`.
17with kind `30008` with a `d` tag with the value `profile_badges`.
18Profile badges contain an ordered list of pairs of `a` and `e` tags referencing a `Badge Definition` and a `Badge Award` for each badge to be displayed. 17Profile badges contain an ordered list of pairs of `a` and `e` tags referencing a `Badge Definition` and a `Badge Award` for each badge to be displayed.
19 18
20### Badge Definition event 19### Badge Definition event
diff --git a/60.md b/60.md
new file mode 100644
index 0000000..64cd282
--- /dev/null
+++ b/60.md
@@ -0,0 +1,205 @@
1# NIP-60
2## Cashu Wallet
3`draft` `optional`
4
5This NIP defines the operations of a cashu-based wallet.
6
7A cashu wallet is a wallet which information is stored in relays to make it accessible across applications.
8
9The purpose of this NIP is:
10* ease-of-use: new users immediately are able to receive funds without creating accounts with other services.
11* interoperability: users' wallets follows them across applications.
12
13This NIP doesn't deal with users' *receiving* money from someone else, it's just to keep state of the user's wallet.
14
15# High-level flow
161. A user has a `kind:37375` event that represents a wallet.
172. A user has `kind:7375` events that represent the unspent proofs of the wallet. -- The proofs are encrypted with the user's private key.
183. A user has `kind:7376` events that represent the spending history of the wallet -- This history is for informational purposes only and is completely optional.
19
20## Wallet Event
21```jsonc
22{
23 "kind": 37375,
24 "content": nip44_encrypt([
25 [ "balance", "100", "sat" ],
26 [ "privkey", "hexkey" ] // explained in NIP-61
27 ]),
28 "tags": [
29 [ "d", "my-wallet" ],
30 [ "mint", "https://mint1" ],
31 [ "mint", "https://mint2" ],
32 [ "mint", "https://mint3" ],
33 [ "name", "my shitposting wallet" ],
34 [ "unit", "sat" ],
35 [ "description", "a wallet for my day-to-day shitposting" ],
36 [ "relay", "wss://relay1" ],
37 [ "relay", "wss://relay2" ],
38 ]
39}
40```
41
42The wallet event is a parameterized replaceable event `kind:37375`.
43
44Tags:
45* `d` - wallet ID.
46* `mint` - Mint(s) this wallet uses -- there MUST be one or more mint tags.
47* `relay` - Relays where the wallet and related events can be found. -- one ore more relays SHOULD be specified. If missing, clients should follow [[NIP-65]].
48* `unit` - Base unit of the wallet (e.g. "sat", "usd", etc).
49* `name` - Optional human-readable name for the wallet.
50* `description` - Optional human-readable description of the wallet.
51* `balance` - Optional best-effort balance of the wallet that can serve as a placeholder while an accurate balance is computed from fetching all unspent proofs.
52* `privkey` - Private key used to unlock P2PK ecash. MUST be stored encrypted in the `.content` field. **This is a different private key exclusively used for the wallet, not associated in any way to the user's nostr private key** -- This is only used when receiving funds from others, described in NIP-61.
53
54Any tag, other than the `d` tag, can be [[NIP-44]] encrypted into the `.content` field.
55
56### Deleting a wallet event
57Due to PRE being hard to delete, if a user wants to delete a wallet, they should empty the event and keep just the `d` identifier and add a `deleted` tag.
58
59## Token Event
60Token events are used to record the unspent proofs that come from the mint.
61
62There can be multiple `kind:7375` events for the same mint, and multiple proofs inside each `kind:7375` event.
63
64```jsonc
65{
66 "kind": 7375,
67 "content": nip44_encrypt({
68 "mint": "https://stablenut.umint.cash",
69 "proofs": [
70 {
71 "id": "005c2502034d4f12",
72 "amount": 1,
73 "secret": "z+zyxAVLRqN9lEjxuNPSyRJzEstbl69Jc1vtimvtkPg=",
74 "C": "0241d98a8197ef238a192d47edf191a9de78b657308937b4f7dd0aa53beae72c46"
75 }
76 ]
77 }),
78 "tags": [
79 [ "a", "37375:<pubkey>:my-wallet" ]
80 ]
81}
82```
83
84`.content` is a [[NIP-44]] encrypted payload storing the mint and the unencoded proofs.
85* `a` an optional tag linking the token to a specific wallet.
86
87### Spending proofs
88When one or more proofs of a token are spent, the token event should be [[NIP-09]]-deleted and, if some proofs are unspent from the same token event, a new token event should be created rolling over the unspent proofs and adding any change outputs to the new token event.
89
90## Spending History Event
91Clients SHOULD publish `kind:7376` events to create a transaction history when their balance changes.
92
93```jsonc
94{
95 "kind": 7376,
96 "content": nip44_encrypt([
97 [ "direction", "in" ], // in = received, out = sent
98 [ "amount", "1", "sat" ],
99 [ "e", "<event-id-of-spent-token>", "<relay-hint>", "created" ],
100 ]),
101 "tags": [
102 [ "a", "37375:<pubkey>:my-wallet" ],
103 ]
104}
105```
106
107* `direction` - The direction of the transaction; `in` for received funds, `out` for sent funds.
108* `a` - The wallet the transaction is related to.
109
110Clients MUST add `e` tags to create references of destroyed and created token events along with the marker of the meaning of the tag:
111* `created` - A new token event was created.
112* `destroyed` - A token event was destroyed.
113* `redeemed` - A [[NIP-61]] nutzap was redeemed.
114
115All tags can be [[NIP-44]] encrypted. Clients SHOULD leave `e` tags with a `redeemed` marker unencrypted.
116
117Multiple `e` tags can be added to a `kind:7376` event.
118
119# Flow
120A client that wants to check for user's wallets information starts by fetching `kind:10019` events from the user's relays, if no event is found, it should fall back to using the user's [[NIP-65]] relays.
121
122## Fetch wallet and token list
123From those relays, the client should fetch wallet and token events.
124
125`"kinds": [37375, 7375], "authors": ["<my-pubkey>"]`
126
127## Fetch proofs
128While the client is fetching (and perhaps validating) proofs it can use the optional `balance` tag of the wallet event to display a estimate of the balance of the wallet.
129
130## Spending token
131If Alice spends 4 sats from this token event
132```jsonconc
133{
134 "kind": 7375,
135 "id": "event-id-1",
136 "content": nip44_encrypt({
137 "mint": "https://stablenut.umint.cash",
138 "proofs": [
139 { "id": "1", "amount": 1 },
140 { "id": "2", "amount": 2 },
141 { "id": "3", "amount": 4 },
142 { "id": "4", "amount": 8 },
143 ]
144 }),
145 "tags": [
146 [ "a", "37375:<pubkey>:my-wallet" ]
147 ]
148}
149```
150
151Her client:
152* MUST roll over the unspent proofs:
153```jsonconc
154{
155 "kind": 7375,
156 "id": "event-id-2",
157 "content": nip44_encrypt({
158 "mint": "https://stablenut.umint.cash",
159 "proofs": [
160 { "id": "1", "amount": 1 },
161 { "id": "2", "amount": 2 },
162 { "id": "4", "amount": 8 },
163 ]
164 }),
165 "tags": [
166 [ "a", "37375:<pubkey>:my-wallet" ]
167 ]
168}
169```
170* MUST delete event `event-id-1`
171* SHOULD create a `kind:7376` event to record the spend
172```jsonconc
173{
174 "kind": 7376,
175 "content": nip44_encrypt([
176 [ "direction", "out" ],
177 [ "amount", "4", "sats" ],
178 [ "e", "<event-id-1>", "<relay-hint>", "destroyed" ],
179 [ "e", "<event-id-2>", "<relay-hint>", "created" ],
180 ]),
181 "tags": [
182 [ "a", "37375:<pubkey>:my-wallet" ],
183 ]
184}
185```
186
187## Redeeming a quote (optional)
188When creating a quote at a mint, an event can be used to keep the state of the quote ID, which will be used to check when the quote has been paid. These events should be created with an expiration tag [[NIP-40]] matching the expiration of the bolt11 received from the mint; this signals to relays when they can safely discard these events.
189
190Application developers are encouraged to use local state when possible and only publish this event when it makes sense in the context of their application.
191
192```jsonc
193{
194 "kind": 7374,
195 "content": nip44_encrypt("quote-id"),
196 "tags": [
197 [ "expiration", "<expiration-timestamp>" ],
198 [ "mint", "<mint-url>" ],
199 [ "a", "37375:<pubkey>:my-wallet" ]
200 ]
201}
202```
203
204## Appendix 1: Validating proofs
205Clients can optionally validate proofs to make sure they are not working from an old state; this logic is left up to particular implementations to decide when and why to do it, but if some proofs are checked and deemed to have been spent, the client should delete the token and roll over any unspent proof.
diff --git a/61.md b/61.md
new file mode 100644
index 0000000..33442a3
--- /dev/null
+++ b/61.md
@@ -0,0 +1,132 @@
1# NIP-61:
2## Nut Zaps
3
4A Nut Zap is a P2PK cashu token where the payment itself is the receipt.
5
6# High-level flow
7Alice wants to nutzap 1 sat to Bob because of an event `event-id-1` she liked.
8
9## Alice nutzaps Bob
101. Alice fetches event `kind:10019` from Bob to see the mints Bob trusts.
112. She mints a token at that mint (or swaps some tokens she already had in that mint) p2pk-locked to the pubkey Bob has listed in his `kind:10019`.
123. She publishes a `kind:9321` event to the relays Bob indicated with the proofs she minted.
13
14## Bob receives the nutzap
151. At some point, Bob's client fetches `kind:9321` events p-tagging him from his relays.
162. Bob's client swaps the token into his wallet.
17
18# Nutzap informational event
19```jsonc
20{
21 "kind": 10019,
22 "tags": [
23 [ "relay", "wss://relay1" ],
24 [ "relay", "wss://relay2" ],
25 [ "mint", "https://mint1", "usd", "sat" ],
26 [ "mint", "https://mint2", "sat" ],
27 [ "pubkey", "<p2pk-pubkey>" ]
28 ]
29}
30```
31
32`kind:10019` is an event that is useful for others to know how to send money to the user.
33
34* `relay` - Relays where the user will be reading token events from. If a user wants to send money to the user, they should write to these relays.
35* `mint` - Mints the user is explicitly agreeing to use to receive funds on. Clients SHOULD not send money on mints not listed here or risk burning their money. Additional markers can be used to list the supported base units of the mint.
36* `pubkey` - Pubkey that SHOULD be used to P2PK-lock receiving nutzaps. If not present, clients SHOULD use the pubkey of the recipient. This is explained in Appendix 1.
37
38## Nutzap event
39Event `kind:9321` is a nutzap event published by the sender, p-tagging the recipient. The outputs are P2PK-locked to the pubkey the recipient indicated in their `kind:10019` event or to the recipient pubkey if the `kind:10019` event doesn't have a explicit pubkey.
40
41Clients MUST prefix the pubkey they p2pk-lock with `"02"` (for nostr<>cashu pubkey compatibility).
42
43```jsonc
44{
45 kind: 9321,
46 content: "Thanks for this great idea.",
47 pubkey: "sender-pubkey",
48 tags: [
49 [ "amount", "1" ],
50 [ "unit", "sat" ],
51 [ "proof", "{\"amount\":1,\"C\":\"02277c66191736eb72fce9d975d08e3191f8f96afb73ab1eec37e4465683066d3f\",\"id\":\"000a93d6f8a1d2c4\",\"secret\":\"[\\\"P2PK\\\",{\\\"nonce\\\":\\\"b00bdd0467b0090a25bdf2d2f0d45ac4e355c482c1418350f273a04fedaaee83\\\",\\\"data\\\":\\\"02eaee8939e3565e48cc62967e2fde9d8e2a4b3ec0081f29eceff5c64ef10ac1ed\\\"}]\"}" ],
52 [ "u", "https://stablenut.umint.cash", ],
53 [ "e", "<zapped-event-id>", "<relay-hint>" ],
54 [ "p", "e9fbced3a42dcf551486650cc752ab354347dd413b307484e4fd1818ab53f991" ], // recipient of nut zap
55 ]
56}
57```
58
59* `.content` is an optional comment for the nutzap
60* `amount` is a shorthand for the combined amount of all outputs. -- Clients SHOULD validate that the sum of the amounts in the outputs matches.
61* `unit` is the base unit of the amount.
62* `proof` is one ore more proofs p2pk-locked to the pubkey the recipient specified in their `kind:10019` event.
63* `u` is the mint the URL of the mint EXACTLY as specified by the recipient's `kind:10019`.
64* `e` zero or one event that is being nutzapped.
65* `p` exactly one pubkey, specifying the recipient of the nutzap.
66
67WIP: Clients SHOULD embed a DLEQ proof in the nutzap event to make it possible to verify nutzaps without talking to the mint.
68
69# Sending a nutzap
70
71* The sender fetches the recipient's `kind:10019`.
72* The sender mints/swaps ecash on one of the recipient's listed mints.
73* The sender p2pk locks to the recipient's specified pubkey in their
74
75# Receiving nutzaps
76
77Clients should REQ for nut zaps:
78* Filtering with `#u` for mints they expect to receive ecash from.
79 * this is to prevent even interacting with mints the user hasn't explicitly signaled.
80* Filtering with `since` of the most recent `kind:7376` event the same user has created.
81 * this can be used as a marker of the nut zaps that have already been swaped by the user -- clients might choose to use other kinds of markers, including internal state -- this is just a guidance of one possible approach.
82
83Clients MIGHT choose to use some kind of filtering (e.g. WoT) to ignore spam.
84
85`{ "kinds": [9321], "#p": "my-pubkey", "#u": [ "<mint-1>", "<mint-2>"], "since": <latest-created_at-of-kind-7376> }`.
86
87Upon receiving a new nut zap, the client should swap the tokens into a wallet the user controls, either a [[NIP-60]] wallet, their own LN wallet or anything else.
88
89## Updating nutzap-redemption history
90When claiming a token the client SHOULD create a `kind:7376` event and `e` tag the original nut zap event. This is to record that this token has already been claimed (and shouldn't be attempted again) and as signaling to the recipient that the ecash has been redeemed.
91
92Multiple `kind:9321` events can be tagged in the same `kind:7376` event.
93
94```jsonc
95{
96 "kind": 7376,
97 "content": nip44_encrypt([
98 [ "direction", "in" ], // in = received, out = sent
99 [ "amount", "1", "sat" ],
100 [ "e", "<7375-event-id>", "relay-hint", "created" ] // new token event that was created
101 ]),
102 "tags": [
103 [ "a", "37375:<pubkey>:my-wallet" ], // an optional wallet tag
104 [ "e", "<9321-event-id>", "relay-hint", "redeemed" ], // nutzap event that has been redeemed
105 [ "p", "sender-pubkey" ] // pubkey of the author of the 9321 event (nutzap sender)
106 ]
107}
108```
109
110Events that redeem a nutzap SHOULD be published to the sender's [[NIP-65]] relays.
111
112## Verifying a Cashu Zap
113* Clients SHOULD check that the receiving user has issued a `kind:10019` tagging the mint where the cashu has been minted.
114* Clients SHOULD check that the token is locked to the pubkey the user has listed in their `kind:10019`.
115
116## Final Considerations
117
1181. Clients SHOULD guide their users to use NUT-11 (P2PK) compatible-mints in their `kind:10019` event to avoid receiving nut zaps anyone can spend
119
1202. Clients SHOULD normalize and deduplicate mint URLs as described in NIP-65.
121
1223. A nut zap MUST be sent to a mint the recipient has listed in their `kind:10019` event or to the NIP-65 relays of the recipient, failure to do so may result in the recipient donating the tokens to the mint since the recipient might never see the event.
123
124## Appendix 1: Alternative P2PK pubkey
125Clients might not have access to the user's private key (i.e. NIP-07, NIP-46 signing) and, as such, the private key to sign cashu spends might not be available, which would make spending the P2PK incoming nutzaps impossible.
126
127For this scenarios clients can:
128
129* add a `pubkey` tag to the `kind:10019` (indicating which pubkey senders should P2PK to)
130* store the private key in the `kind:37375` event in the nip44-encrypted `content` field.
131
132This is to avoid depending on NIP-07/46 adaptations to sign cashu payloads. \ No newline at end of file
diff --git a/65.md b/65.md
index 71660d4..df06de0 100644
--- a/65.md
+++ b/65.md
@@ -62,3 +62,7 @@ This NIP allows Clients to connect directly with the most up-to-date relay set f
625. If a relay signals support for this NIP in their [NIP-11](11.md) document that means they're willing to accept kind 10002 events from a broad range of users, not only their paying customers or whitelisted group. 625. If a relay signals support for this NIP in their [NIP-11](11.md) document that means they're willing to accept kind 10002 events from a broad range of users, not only their paying customers or whitelisted group.
63 63
646. Clients SHOULD deduplicate connections by normalizing relay URIs according to [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-6). 646. Clients SHOULD deduplicate connections by normalizing relay URIs according to [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-6).
65
66## Related articles
67- [Outbox model](https://mikedilger.com/gossip-model/)
68- [What is the Outbox Model?](https://habla.news/u/hodlbod@coracle.social/8YjqXm4SKY-TauwjOfLXS)
diff --git a/71.md b/71.md
index 5cf3b36..5edd7c6 100644
--- a/71.md
+++ b/71.md
@@ -16,25 +16,64 @@ There are two types of video events represented by different kinds: horizontal a
16 16
17#### Format 17#### Format
18 18
19The format uses a parameterized replaceable event kind `34235` for horizontal videos and `34236` for vertical videos. 19The format uses an _addressable event_ kind `34235` for horizontal videos and `34236` for vertical videos.
20 20
21The `.content` of these events is a summary or description on the video content. 21The `.content` of these events is a summary or description on the video content.
22 22
23The list of tags are as follows: 23The primary source of video information is the `imeta` tags which is defined in [NIP-92](92.md)
24* `d` (required) universally unique identifier (UUID). Generated by the client creating the video event. 24
25* `url` (required) the url to the video file 25Each `imeta` tag can be used to specify a variant of the video by the `dim` & `m` properties.
26* `m` a string indicating the data type of the file. The [MIME types](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) format must be used, and they should be lowercase. 26
27Example:
28```json
29[
30 ["imeta",
31 "dim 1920x1080",
32 "url https://myvideo.com/1080/12345.mp4",
33 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
34 "m video/mp4",
35 "image https://myvideo.com/1080/12345.jpg",
36 "image https://myotherserver.com/1080/12345.jpg",
37 "fallback https://myotherserver.com/1080/12345.mp4",
38 "fallback https://andanotherserver.com/1080/12345.mp4",
39 "service nip96",
40 ],
41 ["imeta",
42 "dim 1280x720",
43 "url https://myvideo.com/720/12345.mp4",
44 "x e1d4f808dae475ed32fb23ce52ef8ac82e3cc760702fca10d62d382d2da3697d",
45 "m video/mp4",
46 "image https://myvideo.com/720/12345.jpg",
47 "image https://myotherserver.com/720/12345.jpg",
48 "fallback https://myotherserver.com/720/12345.mp4",
49 "fallback https://andanotherserver.com/720/12345.mp4",
50 "service nip96",
51 ],
52 ["imeta",
53 "dim 1280x720",
54 "url https://myvideo.com/720/12345.m3u8",
55 "x 704e720af2697f5d6a198ad377789d462054b6e8d790f8a3903afbc1e044014f",
56 "m application/x-mpegURL",
57 "image https://myvideo.com/720/12345.jpg",
58 "image https://myotherserver.com/720/12345.jpg",
59 "fallback https://myotherserver.com/720/12345.m3u8",
60 "fallback https://andanotherserver.com/720/12345.m3u8",
61 "service nip96",
62 ],
63]
64```
65
66Where `url` is the primary server url and `fallback` are other servers hosting the same file, both `url` and `fallback` should be weighted equally and clients are recommended to use any of the provided video urls.
67
68The `image` tag contains a preview image (at the same resolution). Multiple `image` tags may be used to specify fallback copies in the same way `fallback` is used for `url`.
69
70Additionally `service nip96` may be included to allow clients to search the authors NIP-96 server list to find the file using the hash.
71
72### Other tags:
27* `title` (required) title of the video 73* `title` (required) title of the video
28* `"published_at"`, for the timestamp in unix seconds (stringified) of the first time the video was published 74* `published_at`, for the timestamp in unix seconds (stringified) of the first time the video was published
29* `x` containing the SHA-256 hexencoded string of the file.
30* `size` (optional) size of file in bytes
31* `dim` (optional) size of file in pixels in the form `<width>x<height>`
32* `duration` (optional) video duration in seconds 75* `duration` (optional) video duration in seconds
33* `magnet` (optional) URI to magnet file
34* `i` (optional) torrent infohash
35* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code 76* `text-track` (optional, repeated) link to WebVTT file for video, type of supplementary information (captions/subtitles/chapters/metadata), optional language code
36* `thumb` (optional) url of thumbnail with same aspect ratio
37* `image` (optional) url of preview image with same dimensions
38* `content-warning` (optional) warning about content of NSFW video 77* `content-warning` (optional) warning about content of NSFW video
39* `alt` (optional) description for accessibility 78* `alt` (optional) description for accessibility
40* `segment` (optional, repeated) start timestamp in format `HH:MM:SS.sss`, end timestamp in format `HH:MM:SS.sss`, chapter/segment title, chapter thumbnail-url 79* `segment` (optional, repeated) start timestamp in format `HH:MM:SS.sss`, end timestamp in format `HH:MM:SS.sss`, chapter/segment title, chapter thumbnail-url
@@ -53,19 +92,23 @@ The list of tags are as follows:
53 ["d", "<UUID>"], 92 ["d", "<UUID>"],
54 93
55 ["title", "<title of video>"], 94 ["title", "<title of video>"],
56 ["thumb", "<thumbnail image for video>"],
57 ["published_at", "<unix timestamp>"], 95 ["published_at", "<unix timestamp>"],
58 ["alt", <description>], 96 ["alt", <description>],
59 97
60 // Video Data 98 // Video Data
61 ["url",<string with URI of file>], 99 ["imeta",
62 ["m", <MIME type>], 100 "dim 1920x1080",
63 ["x",<Hash SHA-256>], 101 "url https://myvideo.com/1080/12345.mp4",
64 ["size", <size of file in bytes>], 102 "x 3093509d1e0bc604ff60cb9286f4cd7c781553bc8991937befaacfdc28ec5cdc",
103 "m video/mp4",
104 "image https://myvideo.com/1080/12345.jpg",
105 "image https://myotherserver.com/1080/12345.jpg",
106 "fallback https://myotherserver.com/1080/12345.mp4",
107 "fallback https://andanotherserver.com/1080/12345.mp4",
108 "service nip96",
109 ],
110
65 ["duration", <duration of video in seconds>], 111 ["duration", <duration of video in seconds>],
66 ["dim", <size of file in pixels>],
67 ["magnet",<magnet URI> ],
68 ["i",<torrent infohash>],
69 ["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"], 112 ["text-track", "<encoded `kind 6000` event>", "<recommended relay urls>"],
70 ["content-warning", "<reason>"], 113 ["content-warning", "<reason>"],
71 ["segment", <start>, <end>, "<title>", "<thumbnail URL>"], 114 ["segment", <start>, <end>, "<title>", "<thumbnail URL>"],
@@ -83,36 +126,4 @@ The list of tags are as follows:
83 ["r", "<url>"] 126 ["r", "<url>"]
84 ] 127 ]
85} 128}
86``` 129``` \ No newline at end of file
87
88## Video View
89
90A video event view is a response to a video event to track a user's view or progress viewing the video.
91
92### Format
93
94The format uses a parameterized replaceable event kind `34237`.
95
96The `.content` of these events is optional and could be a free-form note that acts like a bookmark for the user.
97
98The list of tags are as follows:
99* `a` (required) reference tag to kind `34235` or `34236` video event being viewed
100* `d` (required) same as `a` reference tag value
101* `viewed` (optional, repeated) timestamp of the user's start time in seconds, timestamp of the user's end time in seconds
102
103
104```json
105{
106 "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>,
107 "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>,
108 "created_at": <Unix timestamp in seconds>,
109 "kind": 34237,
110 "content": "<note>",
111 "tags": [
112 ["a", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>", "<optional relay url>"],
113 ["e", "<event-id", "<relay-url>"]
114 ["d", "<34235 | 34236>:<video event author pubkey>:<d-identifier of video event>"],
115 ["viewed", <start>, <end>],
116 ]
117}
118```
diff --git a/73.md b/73.md
index d50ab22..afed8d1 100644
--- a/73.md
+++ b/73.md
@@ -6,17 +6,29 @@ External Content IDs
6 6
7`draft` `optional` 7`draft` `optional`
8 8
9There are certain established global content identifiers that would be useful to reference in nostr events so that clients can query all events assosiated with these ids. 9There are certain established global content identifiers such as [Book ISBNs](https://en.wikipedia.org/wiki/ISBN), [Podcast GUIDs](https://podcastnamespace.org/tag/guid), and [Movie ISANs](https://en.wikipedia.org/wiki/International_Standard_Audiovisual_Number) that are useful to reference in nostr events so that clients can query all the events assosiated with these ids.
10 10
11- Book [ISBNs](https://en.wikipedia.org/wiki/ISBN)
12- Podcast [GUIDs](https://podcastnamespace.org/tag/guid)
13- Movie [ISANs](https://en.wikipedia.org/wiki/International_Standard_Audiovisual_Number)
14
15Since the `i` tag is already used for similar references in kind-0 metadata events it makes sense to use it for these content ids as well.
16 11
12`i` tags are used for referencing these external content ids, with `k` tags representing the external content id kind so that clients can query all the events for a specific kind.
17 13
18## Supported IDs 14## Supported IDs
19 15
16| Type | `i` tag | `k` tag |
17|- | - | - |
18| URLs | "`<URL, normalized, no fragment>`" | "`<scheme-host, normalized>`" |
19| Hashtags | "#`<topic, lowercase>`" | "#" |
20| Geohashes| "geo:`<geohash, lowercase>`" | "geo" |
21| Books | "isbn:`<id, without hyphens>`" | "isbn" |
22| Podcast Feeds | "podcast:guid:`<guid>`" | "podcast:guid" |
23| Podcast Episodes | "podcast:item:guid:`<guid>`" | "podcast:item:guid" |
24| Podcast Publishers | "podcast:publisher:guid:`<guid>`" | "podcast:publisher:guid" |
25| Movies | "isan:`<id, without version part>`" | "isan" |
26| Papers | "doi:`<id, lowercase>`" | "doi" |
27
28---
29
30## Examples
31
20### Books: 32### Books:
21 33
22- Book ISBN: `["i", "isbn:9780765382030"]` - https://isbnsearch.org/isbn/9780765382030 34- Book ISBN: `["i", "isbn:9780765382030"]` - https://isbnsearch.org/isbn/9780765382030
diff --git a/75.md b/75.md
index 885c391..ad933d5 100644
--- a/75.md
+++ b/75.md
@@ -77,7 +77,7 @@ Clients MAY display funding goals on user profiles.
77 77
78When zapping a goal event, clients MUST include the relays in the `relays` tag of the goal event in the zap request `relays` tag. 78When zapping a goal event, clients MUST include the relays in the `relays` tag of the goal event in the zap request `relays` tag.
79 79
80When zapping a parameterized replaceable event with a `goal` tag, clients SHOULD tag the goal event id in the `e` tag of the zap request. 80When zapping an addressable event with a `goal` tag, clients SHOULD tag the goal event id in the `e` tag of the zap request.
81 81
82## Use cases 82## Use cases
83 83
diff --git a/94.md b/94.md
index a057cb2..021cc4c 100644
--- a/94.md
+++ b/94.md
@@ -26,6 +26,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
26* `summary` (optional) text excerpt 26* `summary` (optional) text excerpt
27* `alt` (optional) description for accessibility 27* `alt` (optional) description for accessibility
28* `fallback` (optional) zero or more fallback file sources in case `url` fails 28* `fallback` (optional) zero or more fallback file sources in case `url` fails
29* `service` (optional) service type which is serving the file (eg. [NIP-96](96.md))
29 30
30```jsonc 31```jsonc
31{ 32{
@@ -33,15 +34,15 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr
33 "tags": [ 34 "tags": [
34 ["url",<string with URI of file>], 35 ["url",<string with URI of file>],
35 ["m", <MIME type>], 36 ["m", <MIME type>],
36 ["x",<Hash SHA-256>], 37 ["x", <Hash SHA-256>],
37 ["ox",<Hash SHA-256>], 38 ["ox", <Hash SHA-256>],
38 ["size", <size of file in bytes>], 39 ["size", <size of file in bytes>],
39 ["dim", <size of file in pixels>], 40 ["dim", <size of file in pixels>],
40 ["magnet",<magnet URI> ], 41 ["magnet", <magnet URI> ],
41 ["i",<torrent infohash>], 42 ["i", <torrent infohash>],
42 ["blurhash", <value>], 43 ["blurhash", <value>],
43 ["thumb", <string with thumbnail URI>], 44 ["thumb", <string with thumbnail URI>, <Hash SHA-256>],
44 ["image", <string with preview URI>], 45 ["image", <string with preview URI>, <Hash SHA-256>],
45 ["summary", <excerpt>], 46 ["summary", <excerpt>],
46 ["alt", <description>] 47 ["alt", <description>]
47 ], 48 ],
diff --git a/96.md b/96.md
index 4e9ce16..05c1b18 100644
--- a/96.md
+++ b/96.md
@@ -143,7 +143,7 @@ The upload response is a json object as follows:
143 // and, optionally, all file metadata the server wants to make available 143 // and, optionally, all file metadata the server wants to make available
144 // 144 //
145 // nip94_event field is absent if unsuccessful upload 145 // nip94_event field is absent if unsuccessful upload
146 "nip94_event2": { 146 "nip94_event": {
147 // Required tags: "url" and "ox" 147 // Required tags: "url" and "ox"
148 "tags": [ 148 "tags": [
149 // Can be same from /.well-known/nostr/nip96.json's "download_url" field 149 // Can be same from /.well-known/nostr/nip96.json's "download_url" field
diff --git a/99.md b/99.md
index e2ffc3b..724ce5f 100644
--- a/99.md
+++ b/99.md
@@ -26,7 +26,7 @@ The `.pubkey` field of these events are treated as the party creating the listin
26 26
27### Metadata 27### Metadata
28 28
29- For "tags"/"hashtags" (i.e. categories or keywords of relevance for the listing) the `"t"` event tag should be used, as per [NIP-12](12.md). 29- For "tags"/"hashtags" (i.e. categories or keywords of relevance for the listing) the `"t"` event tag should be used.
30- For images, whether included in the markdown content or not, clients SHOULD use `image` tags as described in [NIP-58](58.md). This allows clients to display images in carousel format more easily. 30- For images, whether included in the markdown content or not, clients SHOULD use `image` tags as described in [NIP-58](58.md). This allows clients to display images in carousel format more easily.
31 31
32The following tags, used for structured metadata, are standardized and SHOULD be included. Other tags may be added as necessary. 32The following tags, used for structured metadata, are standardized and SHOULD be included. Other tags may be added as necessary.
diff --git a/BREAKING.md b/BREAKING.md
index 83b104b..b4bd53d 100644
--- a/BREAKING.md
+++ b/BREAKING.md
@@ -5,6 +5,9 @@ reverse chronological order.
5 5
6| Date | Commit | NIP | Change | 6| Date | Commit | NIP | Change |
7| ----------- | --------- | -------- | ------ | 7| ----------- | --------- | -------- | ------ |
8| 2024-10-15 | [1cda2dcc](https://github.com/nostr-protocol/nips/commit/1cda2dcc) | [NIP-71](71.md) | some tags were replaced with `imeta` tag |
9| 2024-10-15 | [1cda2dcc](https://github.com/nostr-protocol/nips/commit/1cda2dcc) | [NIP-71](71.md) | `kind: 34237` was dropped |
10| 2024-10-07 | [7bb8997b](https://github.com/nostr-protocol/nips/commit/7bb8997b) | [NIP-55](55.md) | some fields and passing data were changed |
8| 2024-08-18 | [3aff37bd](https://github.com/nostr-protocol/nips/commit/3aff37bd) | [NIP-54](54.md) | content should be Asciidoc | 11| 2024-08-18 | [3aff37bd](https://github.com/nostr-protocol/nips/commit/3aff37bd) | [NIP-54](54.md) | content should be Asciidoc |
9| 2024-07-31 | [3ea2f1a4](https://github.com/nostr-protocol/nips/commit/3ea2f1a4) | [NIP-45](45.md) | [444ad28d](https://github.com/nostr-protocol/nips/commit/444ad28d) was reverted | 12| 2024-07-31 | [3ea2f1a4](https://github.com/nostr-protocol/nips/commit/3ea2f1a4) | [NIP-45](45.md) | [444ad28d](https://github.com/nostr-protocol/nips/commit/444ad28d) was reverted |
10| 2024-07-30 | [444ad28d](https://github.com/nostr-protocol/nips/commit/444ad28d) | [NIP-45](45.md) | NIP-45 was deprecated | 13| 2024-07-30 | [444ad28d](https://github.com/nostr-protocol/nips/commit/444ad28d) | [NIP-45](45.md) | NIP-45 was deprecated |
diff --git a/README.md b/README.md
index b22f1a3..400f1ec 100644
--- a/README.md
+++ b/README.md
@@ -73,6 +73,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
73- [NIP-57: Lightning Zaps](57.md) 73- [NIP-57: Lightning Zaps](57.md)
74- [NIP-58: Badges](58.md) 74- [NIP-58: Badges](58.md)
75- [NIP-59: Gift Wrap](59.md) 75- [NIP-59: Gift Wrap](59.md)
76- [NIP-60: Cashu Wallet](60.md)
77- [NIP-61: Nutzaps](61.md)
76- [NIP-64: Chess (PGN)](64.md) 78- [NIP-64: Chess (PGN)](64.md)
77- [NIP-65: Relay List Metadata](65.md) 79- [NIP-65: Relay List Metadata](65.md)
78- [NIP-70: Protected Events](70.md) 80- [NIP-70: Protected Events](70.md)
@@ -140,8 +142,12 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
140| `5000`-`5999` | Job Request | [90](90.md) | 142| `5000`-`5999` | Job Request | [90](90.md) |
141| `6000`-`6999` | Job Result | [90](90.md) | 143| `6000`-`6999` | Job Result | [90](90.md) |
142| `7000` | Job Feedback | [90](90.md) | 144| `7000` | Job Feedback | [90](90.md) |
145| `7374` | Reserved Cashu Wallet Tokens | [60](60.md) |
146| `7375` | Cashu Wallet Tokens | [60](60.md) |
147| `7376` | Cashu Wallet History | [60](60.md) |
143| `9000`-`9030` | Group Control Events | [29](29.md) | 148| `9000`-`9030` | Group Control Events | [29](29.md) |
144| `9041` | Zap Goal | [75](75.md) | 149| `9041` | Zap Goal | [75](75.md) |
150| `9321` | Nutzap | [61](61.md) |
145| `9467` | Tidal login | [Tidal-nostr] | 151| `9467` | Tidal login | [Tidal-nostr] |
146| `9734` | Zap Request | [57](57.md) | 152| `9734` | Zap Request | [57](57.md) |
147| `9735` | Zap | [57](57.md) | 153| `9735` | Zap | [57](57.md) |
@@ -156,9 +162,10 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
156| `10007` | Search relays list | [51](51.md) | 162| `10007` | Search relays list | [51](51.md) |
157| `10009` | User groups | [51](51.md), [29](29.md) | 163| `10009` | User groups | [51](51.md), [29](29.md) |
158| `10015` | Interests list | [51](51.md) | 164| `10015` | Interests list | [51](51.md) |
165| `10019` | Nutzap Mint Recommendation | [61](61.md) |
159| `10030` | User emoji list | [51](51.md) | 166| `10030` | User emoji list | [51](51.md) |
160| `10050` | Relay list to receive DMs | [51](51.md), [17](17.md) | 167| `10050` | Relay list to receive DMs | [51](51.md), [17](17.md) |
161| `10063` | User server list | [blossom] | 168| `10063` | User server list | [Blossom][blossom] |
162| `10096` | File storage server list | [96](96.md) | 169| `10096` | File storage server list | [96](96.md) |
163| `13194` | Wallet Info | [47](47.md) | 170| `13194` | Wallet Info | [47](47.md) |
164| `21000` | Lightning Pub RPC | [Lightning.Pub][lnpub] | 171| `21000` | Lightning Pub RPC | [Lightning.Pub][lnpub] |
@@ -166,7 +173,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
166| `23194` | Wallet Request | [47](47.md) | 173| `23194` | Wallet Request | [47](47.md) |
167| `23195` | Wallet Response | [47](47.md) | 174| `23195` | Wallet Response | [47](47.md) |
168| `24133` | Nostr Connect | [46](46.md) | 175| `24133` | Nostr Connect | [46](46.md) |
169| `24242` | Blobs stored on mediaservers | [blossom] | 176| `24242` | Blobs stored on mediaservers | [Blossom][blossom] |
170| `27235` | HTTP Auth | [98](98.md) | 177| `27235` | HTTP Auth | [98](98.md) |
171| `30000` | Follow sets | [51](51.md) | 178| `30000` | Follow sets | [51](51.md) |
172| `30001` | Generic lists | [51](51.md) | 179| `30001` | Generic lists | [51](51.md) |
@@ -191,12 +198,14 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
191| `30078` | Application-specific Data | [78](78.md) | 198| `30078` | Application-specific Data | [78](78.md) |
192| `30311` | Live Event | [53](53.md) | 199| `30311` | Live Event | [53](53.md) |
193| `30315` | User Statuses | [38](38.md) | 200| `30315` | User Statuses | [38](38.md) |
201| `30388` | Slide Set | [Corny Chat][cornychat-slideset] |
194| `30402` | Classified Listing | [99](99.md) | 202| `30402` | Classified Listing | [99](99.md) |
195| `30403` | Draft Classified Listing | [99](99.md) | 203| `30403` | Draft Classified Listing | [99](99.md) |
196| `30617` | Repository announcements | [34](34.md) | 204| `30617` | Repository announcements | [34](34.md) |
197| `30618` | Repository state announcements | [34](34.md) | 205| `30618` | Repository state announcements | [34](34.md) |
198| `30818` | Wiki article | [54](54.md) | 206| `30818` | Wiki article | [54](54.md) |
199| `30819` | Redirects | [54](54.md) | 207| `30819` | Redirects | [54](54.md) |
208| `31388` | Link Set | [Corny Chat][cornychat-linkset] |
200| `31890` | Feed | [NUD: Custom Feeds][NUD: Custom Feeds] | 209| `31890` | Feed | [NUD: Custom Feeds][NUD: Custom Feeds] |
201| `31922` | Date-Based Calendar Event | [52](52.md) | 210| `31922` | Date-Based Calendar Event | [52](52.md) |
202| `31923` | Time-Based Calendar Event | [52](52.md) | 211| `31923` | Time-Based Calendar Event | [52](52.md) |
@@ -206,17 +215,19 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
206| `31990` | Handler information | [89](89.md) | 215| `31990` | Handler information | [89](89.md) |
207| `34235` | Video Event | [71](71.md) | 216| `34235` | Video Event | [71](71.md) |
208| `34236` | Short-form Portrait Video Event | [71](71.md) | 217| `34236` | Short-form Portrait Video Event | [71](71.md) |
209| `34237` | Video View Event | [71](71.md) |
210| `34550` | Community Definition | [72](72.md) | 218| `34550` | Community Definition | [72](72.md) |
219| `37375` | Cashu Wallet Event | [60](60.md) |
211| `39000-9` | Group metadata events | [29](29.md) | 220| `39000-9` | Group metadata events | [29](29.md) |
212 221
213[NUD: Custom Feeds]: https://wikifreedia.xyz/cip-01/ 222[NUD: Custom Feeds]: https://wikifreedia.xyz/cip-01/
214[nostrocket]: https://github.com/nostrocket/NIPS/blob/main/Problems.md 223[nostrocket]: https://github.com/nostrocket/NIPS/blob/main/Problems.md
215[lnpub]: https://github.com/shocknet/Lightning.Pub/blob/master/proto/autogenerated/client.md 224[lnpub]: https://github.com/shocknet/Lightning.Pub/blob/master/proto/autogenerated/client.md
225[cornychat-slideset]: https://cornychat.com/datatypes#kind30388slideset
226[cornychat-linkset]: https://cornychat.com/datatypes#kind31388linkset
216[joinstr]: https://gitlab.com/1440000bytes/joinstr/-/blob/main/NIP.md 227[joinstr]: https://gitlab.com/1440000bytes/joinstr/-/blob/main/NIP.md
217[NKBIP-01]: https://wikistr.com/nkbip-01 228[NKBIP-01]: https://wikistr.com/nkbip-01
218[NKBIP-02]: https://wikistr.com/nkbip-02 229[NKBIP-02]: https://wikistr.com/nkbip-02
219[Blossom]: https://wikistr.com/blossom 230[blossom]: https://github.com/hzrd149/blossom
220[Tidal-nostr]: https://wikistr.com/tidal-nostr 231[Tidal-nostr]: https://wikistr.com/tidal-nostr
221 232
222## Message types 233## Message types
@@ -245,56 +256,56 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos
245 256
246## Standardized Tags 257## Standardized Tags
247 258
248| name | value | other parameters | NIP | 259| name | value | other parameters | NIP |
249| ----------------- | ------------------------------------ | ------------------------------- | ------------------------------------- | 260| ----------------- | ------------------------------------ | ------------------------------- | -------------------------------------------------- |
250| `e` | event id (hex) | relay URL, marker, pubkey (hex) | [01](01.md), [10](10.md) | 261| `e` | event id (hex) | relay URL, marker, pubkey (hex) | [01](01.md), [10](10.md) |
251| `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) | 262| `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) |
252| `a` | coordinates to an event | relay URL | [01](01.md) | 263| `a` | coordinates to an event | relay URL | [01](01.md) |
253| `d` | identifier | -- | [01](01.md) | 264| `d` | identifier | -- | [01](01.md) |
254| `-` | -- | -- | [70](70.md) | 265| `-` | -- | -- | [70](70.md) |
255| `g` | geohash | -- | [52](52.md) | 266| `g` | geohash | -- | [52](52.md) |
256| `h` | group id | -- | [29](29.md) | 267| `h` | group id | -- | [29](29.md) |
257| `i` | external identity | proof, url hint | [39](39.md), [73](73.md) | 268| `i` | external identity | proof, url hint | [39](39.md), [73](73.md) |
258| `k` | kind number (string) | -- | [18](18.md), [25](25.md), [72](72.md) | 269| `k` | kind | -- | [18](18.md), [25](25.md), [72](72.md), [73](73.md) |
259| `l` | label, label namespace | -- | [32](32.md) | 270| `l` | label, label namespace | -- | [32](32.md) |
260| `L` | label namespace | -- | [32](32.md) | 271| `L` | label namespace | -- | [32](32.md) |
261| `m` | MIME type | -- | [94](94.md) | 272| `m` | MIME type | -- | [94](94.md) |
262| `q` | event id (hex) | relay URL | [18](18.md) | 273| `q` | event id (hex) | relay URL, pubkey (hex) | [18](18.md) |
263| `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) | 274| `r` | a reference (URL, etc) | -- | [24](24.md), [25](25.md) |
264| `r` | relay url | marker | [65](65.md) | 275| `r` | relay url | marker | [65](65.md) |
265| `t` | hashtag | -- | [24](24.md) | 276| `t` | hashtag | -- | [24](24.md), [34](34.md) |
266| `alt` | summary | -- | [31](31.md) | 277| `alt` | summary | -- | [31](31.md) |
267| `amount` | millisatoshis, stringified | -- | [57](57.md) | 278| `amount` | millisatoshis, stringified | -- | [57](57.md) |
268| `bolt11` | `bolt11` invoice | -- | [57](57.md) | 279| `bolt11` | `bolt11` invoice | -- | [57](57.md) |
269| `challenge` | challenge string | -- | [42](42.md) | 280| `challenge` | challenge string | -- | [42](42.md) |
270| `client` | name, address | relay URL | [89](89.md) | 281| `client` | name, address | relay URL | [89](89.md) |
271| `clone` | git clone URL | -- | [34](34.md) | 282| `clone` | git clone URL | -- | [34](34.md) |
272| `content-warning` | reason | -- | [36](36.md) | 283| `content-warning` | reason | -- | [36](36.md) |
273| `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) | 284| `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) |
274| `description` | description | -- | [34](34.md), [57](57.md), [58](58.md) | 285| `description` | description | -- | [34](34.md), [57](57.md), [58](58.md) |
275| `emoji` | shortcode, image URL | -- | [30](30.md) | 286| `emoji` | shortcode, image URL | -- | [30](30.md) |
276| `encrypted` | -- | -- | [90](90.md) | 287| `encrypted` | -- | -- | [90](90.md) |
277| `expiration` | unix timestamp (string) | -- | [40](40.md) | 288| `expiration` | unix timestamp (string) | -- | [40](40.md) |
278| `goal` | event id (hex) | relay URL | [75](75.md) | 289| `goal` | event id (hex) | relay URL | [75](75.md) |
279| `image` | image URL | dimensions in pixels | [23](23.md), [52](52.md), [58](58.md) | 290| `image` | image URL | dimensions in pixels | [23](23.md), [52](52.md), [58](58.md) |
280| `imeta` | inline metadata | -- | [92](92.md) | 291| `imeta` | inline metadata | -- | [92](92.md) |
281| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) | 292| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) |
282| `location` | location string | -- | [52](52.md), [99](99.md) | 293| `location` | location string | -- | [52](52.md), [99](99.md) |
283| `name` | name | -- | [34](34.md), [58](58.md), [72](72.md) | 294| `name` | name | -- | [34](34.md), [58](58.md), [72](72.md) |
284| `nonce` | random | difficulty | [13](13.md) | 295| `nonce` | random | difficulty | [13](13.md) |
285| `preimage` | hash of `bolt11` invoice | -- | [57](57.md) | 296| `preimage` | hash of `bolt11` invoice | -- | [57](57.md) |
286| `price` | price | currency, frequency | [99](99.md) | 297| `price` | price | currency, frequency | [99](99.md) |
287| `proxy` | external ID | protocol | [48](48.md) | 298| `proxy` | external ID | protocol | [48](48.md) |
288| `published_at` | unix timestamp (string) | -- | [23](23.md) | 299| `published_at` | unix timestamp (string) | -- | [23](23.md) |
289| `relay` | relay url | -- | [42](42.md), [17](17.md) | 300| `relay` | relay url | -- | [42](42.md), [17](17.md) |
290| `relays` | relay list | -- | [57](57.md) | 301| `relays` | relay list | -- | [57](57.md) |
291| `server` | file storage server url | -- | [96](96.md) | 302| `server` | file storage server url | -- | [96](96.md) |
292| `subject` | subject | -- | [14](14.md), [17](17.md) | 303| `subject` | subject | -- | [14](14.md), [17](17.md), [34](34.md) |
293| `summary` | summary | -- | [23](23.md), [52](52.md) | 304| `summary` | summary | -- | [23](23.md), [52](52.md) |
294| `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) | 305| `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) |
295| `title` | article title | -- | [23](23.md) | 306| `title` | article title | -- | [23](23.md) |
296| `web` | webpage URL | -- | [34](34.md) | 307| `web` | webpage URL | -- | [34](34.md) |
297| `zap` | pubkey (hex), relay URL | weight | [57](57.md) | 308| `zap` | pubkey (hex), relay URL | weight | [57](57.md) |
298 309
299Please update these lists when proposing new NIPs. 310Please update these lists when proposing new NIPs.
300 311