mirror of
https://github.com/nostr-protocol/nips.git
synced 2024-12-22 08:25:53 -05:00
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.
This commit is contained in:
parent
21c6c12c52
commit
324c7aafdc
6
25.md
6
25.md
|
@ -7,7 +7,7 @@ Reactions
|
|||
|
||||
`draft` `optional` `author:jb55`
|
||||
|
||||
A reaction is a `kind 7` note that is used to react to other notes.
|
||||
A reaction is a `kind 7` event that is used to react to other events.
|
||||
|
||||
The generic reaction, represented by the `content` set to a `+` string, SHOULD
|
||||
be 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.
|
|||
|
||||
The last `p` tag MUST be the `pubkey` of the event being reacted to.
|
||||
|
||||
The reaction event MAY include a `k` tag with the stringified kind number
|
||||
of the reacted event as its value.
|
||||
|
||||
Example code
|
||||
|
||||
```swift
|
||||
|
@ -43,6 +46,7 @@ func make_like_event(pubkey: String, privkey: String, liked: NostrEvent) -> Nost
|
|||
}
|
||||
tags.append(["e", liked.id])
|
||||
tags.append(["p", liked.pubkey])
|
||||
tags.append(["k", liked.kind])
|
||||
let ev = NostrEvent(content: "+", pubkey: pubkey, kind: 7, tags: tags)
|
||||
ev.calculate_id()
|
||||
ev.sign(privkey: privkey)
|
||||
|
|
82
README.md
82
README.md
|
@ -156,47 +156,47 @@ Please update these lists when proposing NIPs introducing new event kinds.
|
|||
|
||||
## Standardized Tags
|
||||
|
||||
| name | value | other parameters | NIP |
|
||||
| ----------------- | ------------------------------------ | -------------------- | ------------------------ |
|
||||
| `e` | event id (hex) | relay URL, marker | [01](01.md), [10](10.md) |
|
||||
| `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) |
|
||||
| `a` | coordinates to an event | relay URL | [01](01.md) |
|
||||
| `d` | identifier | -- | [01](01.md) |
|
||||
| `alt` | summary | -- | [31](31.md) |
|
||||
| `g` | geohash | -- | [52](52.md) |
|
||||
| `i` | identity | proof | [39](39.md) |
|
||||
| `k` | kind number (string) | -- | [18](18.md), [72](72.md) |
|
||||
| `l` | label, label namespace | annotations | [32](32.md) |
|
||||
| `L` | label namespace | -- | [32](32.md) |
|
||||
| `m` | MIME type | -- | [94](94.md) |
|
||||
| `r` | a reference (URL, etc) | petname | |
|
||||
| `r` | relay url | marker | [65](65.md) |
|
||||
| `t` | hashtag | -- | |
|
||||
| `amount` | millisatoshis, stringified | -- | [57](57.md) |
|
||||
| `bolt11` | `bolt11` invoice | -- | [57](57.md) |
|
||||
| `challenge` | challenge string | -- | [42](42.md) |
|
||||
| `content-warning` | reason | -- | [36](36.md) |
|
||||
| `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) |
|
||||
| `description` | invoice/badge description | -- | [57](57.md), [58](58.md) |
|
||||
| `emoji` | shortcode, image URL | -- | [30](30.md) |
|
||||
| `expiration` | unix timestamp (string) | -- | [40](40.md) |
|
||||
| `goal` | event id (hex) | relay URL | [75](75.md) |
|
||||
| `image` | image URL | dimensions in pixels | [23](23.md), [58](58.md) |
|
||||
| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) |
|
||||
| `location` | location string | -- | [52](52.md), [99](99.md) |
|
||||
| `name` | badge name | -- | [58](58.md) |
|
||||
| `nonce` | random | -- | [13](13.md) |
|
||||
| `preimage` | hash of `bolt11` invoice | -- | [57](57.md) |
|
||||
| `price` | price | currency, frequency | [99](99.md) |
|
||||
| `proxy` | external ID | protocol | [48](48.md) |
|
||||
| `published_at` | unix timestamp (string) | -- | [23](23.md) |
|
||||
| `relay` | relay url | -- | [42](42.md) |
|
||||
| `relays` | relay list | -- | [57](57.md) |
|
||||
| `subject` | subject | -- | [14](14.md) |
|
||||
| `summary` | article summary | -- | [23](23.md) |
|
||||
| `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) |
|
||||
| `title` | article title | -- | [23](23.md) |
|
||||
| `zap` | pubkey (hex), relay URL | weight | [57](57.md) |
|
||||
| name | value | other parameters | NIP |
|
||||
| ----------------- | ------------------------------------ | -------------------- | ------------------------------------- |
|
||||
| `e` | event id (hex) | relay URL, marker | [01](01.md), [10](10.md) |
|
||||
| `p` | pubkey (hex) | relay URL, petname | [01](01.md), [02](02.md) |
|
||||
| `a` | coordinates to an event | relay URL | [01](01.md) |
|
||||
| `d` | identifier | -- | [01](01.md) |
|
||||
| `alt` | summary | -- | [31](31.md) |
|
||||
| `g` | geohash | -- | [52](52.md) |
|
||||
| `i` | identity | proof | [39](39.md) |
|
||||
| `k` | kind number (string) | -- | [18](18.md), [25](25.md), [72](72.md) |
|
||||
| `l` | label, label namespace | annotations | [32](32.md) |
|
||||
| `L` | label namespace | -- | [32](32.md) |
|
||||
| `m` | MIME type | -- | [94](94.md) |
|
||||
| `r` | a reference (URL, etc) | petname | |
|
||||
| `r` | relay url | marker | [65](65.md) |
|
||||
| `t` | hashtag | -- | |
|
||||
| `amount` | millisatoshis, stringified | -- | [57](57.md) |
|
||||
| `bolt11` | `bolt11` invoice | -- | [57](57.md) |
|
||||
| `challenge` | challenge string | -- | [42](42.md) |
|
||||
| `content-warning` | reason | -- | [36](36.md) |
|
||||
| `delegation` | pubkey, conditions, delegation token | -- | [26](26.md) |
|
||||
| `description` | invoice/badge description | -- | [57](57.md), [58](58.md) |
|
||||
| `emoji` | shortcode, image URL | -- | [30](30.md) |
|
||||
| `expiration` | unix timestamp (string) | -- | [40](40.md) |
|
||||
| `goal` | event id (hex) | relay URL | [75](75.md) |
|
||||
| `image` | image URL | dimensions in pixels | [23](23.md), [58](58.md) |
|
||||
| `lnurl` | `bech32` encoded `lnurl` | -- | [57](57.md) |
|
||||
| `location` | location string | -- | [52](52.md), [99](99.md) |
|
||||
| `name` | badge name | -- | [58](58.md) |
|
||||
| `nonce` | random | -- | [13](13.md) |
|
||||
| `preimage` | hash of `bolt11` invoice | -- | [57](57.md) |
|
||||
| `price` | price | currency, frequency | [99](99.md) |
|
||||
| `proxy` | external ID | protocol | [48](48.md) |
|
||||
| `published_at` | unix timestamp (string) | -- | [23](23.md) |
|
||||
| `relay` | relay url | -- | [42](42.md) |
|
||||
| `relays` | relay list | -- | [57](57.md) |
|
||||
| `subject` | subject | -- | [14](14.md) |
|
||||
| `summary` | article summary | -- | [23](23.md) |
|
||||
| `thumb` | badge thumbnail | dimensions in pixels | [58](58.md) |
|
||||
| `title` | article title | -- | [23](23.md) |
|
||||
| `zap` | pubkey (hex), relay URL | weight | [57](57.md) |
|
||||
|
||||
## Criteria for acceptance of NIPs
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user