upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon <ukanikola@gmail.com>2023-10-11 20:55:27 +0900
committerGitHub <noreply@github.com>2023-10-11 08:55:27 -0300
commit324c7aafdcd316fb971c1f26b964d2b53c939a10 (patch)
tree9a6d527d87bee9871dcc6871b4dc65b395c4aaef
parent21c6c12c524cb71f18e068c9bcf223cda0214b5f (diff)
Change wording to imply that reactions can target any event (#815)
* kind:17 generic reactions. * `kind 7` is available for all kind events. * `k` tag is not required.
-rw-r--r--25.md6
-rw-r--r--README.md82
2 files changed, 46 insertions, 42 deletions
diff --git a/25.md b/25.md
index 63c07a7..7b29140 100644
--- a/25.md
+++ b/25.md
@@ -7,7 +7,7 @@ Reactions
7 7
8`draft` `optional` `author:jb55` 8`draft` `optional` `author:jb55`
9 9
10A reaction is a `kind 7` note that is used to react to other notes. 10A reaction is a `kind 7` event that is used to react to other events.
11 11
12The generic reaction, represented by the `content` set to a `+` string, SHOULD 12The generic reaction, represented by the `content` set to a `+` string, SHOULD
13be interpreted as a "like" or "upvote". 13be interpreted as a "like" or "upvote".
@@ -34,6 +34,9 @@ The last `e` tag MUST be the `id` of the note that is being reacted to.
34 34
35The last `p` tag MUST be the `pubkey` of the event being reacted to. 35The last `p` tag MUST be the `pubkey` of the event being reacted to.
36 36
37The reaction event MAY include a `k` tag with the stringified kind number
38of the reacted event as its value.
39
37Example code 40Example code
38 41
39```swift 42```swift
@@ -43,6 +46,7 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost
43 } 46 }
44 tags.append(["e", liked.id]) 47 tags.append(["e", liked.id])
45 tags.append(["p", liked.pubkey]) 48 tags.append(["p", liked.pubkey])
49 tags.append(["k", liked.kind])
46 let ev = NostrEvent(content: "+", pubkey: pubkey, kind: 7, tags: tags) 50 let ev = NostrEvent(content: "+", pubkey: pubkey, kind: 7, tags: tags)
47 ev.calculate_id() 51 ev.calculate_id()
48 ev.sign(privkey: privkey) 52 ev.sign(privkey: privkey)
diff --git a/README.md b/README.md
index 1097bc5..dc70887 100644
--- a/README.md
+++ b/README.md
@@ -156,47 +156,47 @@ Please update these lists when proposing NIPs introducing new event kinds.
156 156
157## Standardized Tags 157## Standardized Tags
158 158
159| name | value | other parameters | NIP | 159| name | value | other parameters | NIP |
160| ----------------- | ------------------------------------ | -------------------- | ------------------------ | 160| ----------------- | ------------------------------------ | -------------------- | ------------------------------------- |
161| `e` | event id (hex) | relay URL, marker | [01](01.md), [10](10.md) | 161| `e` | event id (hex) | relay URL, marker | [01](01.md), [10](10.md) |
162| `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) | 162| `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) |
163| `a` | coordinates to an event | relay URL | [01](01.md) | 163| `a` | coordinates to an event | relay URL | [01](01.md) |
164| `d` | identifier | -- | [01](01.md) | 164| `d` | identifier | -- | [01](01.md) |
165| `alt` | summary | -- | [31](31.md) | 165| `alt` | summary | -- | [31](31.md) |
166| `g` | geohash | -- | [52](52.md) | 166| `g` | geohash | -- | [52](52.md) |
167| `i` | identity | proof | [39](39.md) | 167| `i` | identity | proof | [39](39.md) |
168| `k` | kind number (string) | -- | [18](18.md), [72](72.md) | 168| `k` | kind number (string) | -- | [18](18.md), [25](25.md), [72](72.md) |
169| `l` | label, label namespace | annotations | [32](32.md) | 169| `l` | label, label namespace | annotations | [32](32.md) |
170| `L` | label namespace | -- | [32](32.md) | 170| `L` | label namespace | -- | [32](32.md) |
171| `m` | MIME type | -- | [94](94.md) | 171| `m` | MIME type | -- | [94](94.md) |
172| `r` | a reference (URL, etc) | petname | | 172| `r` | a reference (URL, etc) | petname | |
173| `r` | relay url | marker | [65](65.md) | 173| `r` | relay url | marker | [65](65.md) |
174| `t` | hashtag | -- | | 174| `t` | hashtag | -- | |
175| `amount` | millisatoshis, stringified | -- | [57](57.md) | 175| `amount` | millisatoshis, stringified | -- | [57](57.md) |
176| `bolt11` | `bolt11` invoice | -- | [57](57.md) | 176| `bolt11` | `bolt11` invoice | -- | [57](57.md) |
177| `challenge` | challenge string | -- | [42](42.md) | 177| `challenge` | challenge string | -- | [42](42.md) |
178| `content-warning` | reason | -- | [36](36.md) | 178| `content-warning` | reason | -- | [36](36.md) |
179| `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) | 179| `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) |
180| `description` | invoice/badge description | -- | [57](57.md), [58](58.md) | 180| `description` | invoice/badge description | -- | [57](57.md), [58](58.md) |
181| `emoji` | shortcode, image URL | -- | [30](30.md) | 181| `emoji` | shortcode, image URL | -- | [30](30.md) |
182| `expiration` | unix timestamp (string) | -- | [40](40.md) | 182| `expiration` | unix timestamp (string) | -- | [40](40.md) |
183| `goal` | event id (hex) | relay URL | [75](75.md) | 183| `goal` | event id (hex) | relay URL | [75](75.md) |
184| `image` | image URL | dimensions in pixels | [23](23.md), [58](58.md) | 184| `image` | image URL | dimensions in pixels | [23](23.md), [58](58.md) |
185| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) | 185| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) |
186| `location` | location string | -- | [52](52.md), [99](99.md) | 186| `location` | location string | -- | [52](52.md), [99](99.md) |
187| `name` | badge name | -- | [58](58.md) | 187| `name` | badge name | -- | [58](58.md) |
188| `nonce` | random | -- | [13](13.md) | 188| `nonce` | random | -- | [13](13.md) |
189| `preimage` | hash of `bolt11` invoice | -- | [57](57.md) | 189| `preimage` | hash of `bolt11` invoice | -- | [57](57.md) |
190| `price` | price | currency, frequency | [99](99.md) | 190| `price` | price | currency, frequency | [99](99.md) |
191| `proxy` | external ID | protocol | [48](48.md) | 191| `proxy` | external ID | protocol | [48](48.md) |
192| `published_at` | unix timestamp (string) | -- | [23](23.md) | 192| `published_at` | unix timestamp (string) | -- | [23](23.md) |
193| `relay` | relay url | -- | [42](42.md) | 193| `relay` | relay url | -- | [42](42.md) |
194| `relays` | relay list | -- | [57](57.md) | 194| `relays` | relay list | -- | [57](57.md) |
195| `subject` | subject | -- | [14](14.md) | 195| `subject` | subject | -- | [14](14.md) |
196| `summary` | article summary | -- | [23](23.md) | 196| `summary` | article summary | -- | [23](23.md) |
197| `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) | 197| `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) |
198| `title` | article title | -- | [23](23.md) | 198| `title` | article title | -- | [23](23.md) |
199| `zap` | pubkey (hex), relay URL | weight | [57](57.md) | 199| `zap` | pubkey (hex), relay URL | weight | [57](57.md) |
200 200
201## Criteria for acceptance of NIPs 201## Criteria for acceptance of NIPs
202 202