From f6b08429a270fbae71f0ae1689a5adf8fa91c543 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Thu, 27 Jun 2024 17:00:16 -0700 Subject: [PATCH 01/17] Clarify what happens when a duplicate subscription is sent, remove CLOSED on duplicate subscription --- 01.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/01.md b/01.md index c11a0954..d298046b 100644 --- a/01.md +++ b/01.md @@ -131,7 +131,7 @@ Clients can send 3 types of messages, which must be JSON arrays, according to th } ``` -Upon receiving a `REQ` message, the relay SHOULD query its internal database and return events that match the filter, then store that filter and send again all future events it receives to that same websocket until the websocket is closed. The `CLOSE` event is received with the same `` or a new `REQ` is sent using the same ``, in which case relay MUST overwrite the previous subscription. +Upon receiving a `REQ` message, the relay SHOULD return events that match the filter. Any new events it receives SHOULD be sent to that same websocket until the connection is closed, a `CLOSE` event is received with the same ``, or a new `REQ` is sent using the same `` (in which case a new subscription is created, replacing the old one). Filter attributes containing lists (`ids`, `authors`, `kinds` and tag filters like `#e`) are JSON arrays with one or more values. At least one of the arrays' values must match the relevant field in an event for the condition to be considered a match. For scalar event attributes such as `authors` and `kind`, the attribute from the event must be contained in the filter list. In the case of tag attributes such as `#e`, for which an event may have multiple values, the event and filter condition values must have at least one item in common. @@ -169,7 +169,6 @@ This NIP defines no rules for how `NOTICE` messages should be sent or treated. * `["OK", "b1a649ebe8...", false, "pow: difficulty 26 is less than 30"]` * `["OK", "b1a649ebe8...", false, "error: could not connect to the database"]` - `CLOSED` messages MUST be sent in response to a `REQ` when the relay refuses to fulfill it. It can also be sent when a relay decides to kill a subscription on its side before a client has disconnected or sent a `CLOSE`. This message uses the same pattern of `OK` messages with the machine-readable prefix and human-readable message. Some examples: - * `["CLOSED", "sub1", "duplicate: sub1 already opened"]` * `["CLOSED", "sub1", "unsupported: filter contains unknown elements"]` * `["CLOSED", "sub1", "error: could not connect to the database"]` * `["CLOSED", "sub1", "error: shutting down idle subscription"]` From c7a357285d7265ecd95df70bb684a0c14b675ae5 Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Wed, 21 Aug 2024 23:27:27 +0900 Subject: [PATCH 02/17] BREAKING.md: add changes --- BREAKING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BREAKING.md b/BREAKING.md index cac35454..83b104b6 100644 --- a/BREAKING.md +++ b/BREAKING.md @@ -5,6 +5,7 @@ reverse chronological order. | Date | Commit | NIP | Change | | ----------- | --------- | -------- | ------ | +| 2024-08-18 | [3aff37bd](https://github.com/nostr-protocol/nips/commit/3aff37bd) | [NIP-54](54.md) | content should be Asciidoc | | 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 | | 2024-07-30 | [444ad28d](https://github.com/nostr-protocol/nips/commit/444ad28d) | [NIP-45](45.md) | NIP-45 was deprecated | | 2024-07-26 | [ecee40df](https://github.com/nostr-protocol/nips/commit/ecee40df) | [NIP-19](19.md) | `nrelay` was deprecated | @@ -47,6 +48,7 @@ reverse chronological order. | 2023-06-18 | [83cbd3e1](https://github.com/nostr-protocol/nips/commit/83cbd3e1) | [NIP-11](11.md) | 'image' was renamed to 'icon' | | 2023-04-13 | [bf0a0da6](https://github.com/nostr-protocol/nips/commit/bf0a0da6) | [NIP-15](15.md) | different NIP was re-added as NIP-15 | | 2023-04-09 | [fb5b7c73](https://github.com/nostr-protocol/nips/commit/fb5b7c73) | [NIP-15](15.md) | NIP-15 was merged into NIP-01 | +| 2023-03-29 | [599e1313](https://github.com/nostr-protocol/nips/commit/599e1313) | [NIP-18](18.md) | NIP-18 was bring back | | 2023-03-15 | [e1004d3d](https://github.com/nostr-protocol/nips/commit/e1004d3d) | [NIP-19](19.md) | `1: relay` was changed to optionally | Breaking changes prior to 2023-03-01 are not yet documented. From 27c67f0c71397ca9e8ea85eee0264b8aa83e2999 Mon Sep 17 00:00:00 2001 From: Tomas Bezouska Date: Sun, 25 Aug 2024 22:55:25 +0200 Subject: [PATCH 03/17] Update 17.md --- 17.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/17.md b/17.md index 0f51367a..d22dbdef 100644 --- a/17.md +++ b/17.md @@ -102,7 +102,7 @@ Clients SHOULD publish kind `14` events to the `10050`-listed relays. If that is ## Relays -It's advisable that relays do not serve `kind:14` to clients other than the ones tagged in them. +It's advisable that relays do not serve `kind:1059` to clients other than the ones tagged in them. It's advisable that users choose relays that conform to these practices. From da34c57e99dbf6cadfb3b4176b7c4ff33ac5674c Mon Sep 17 00:00:00 2001 From: dtonon Date: Thu, 29 Aug 2024 16:25:15 +0200 Subject: [PATCH 04/17] NIP-05: add identification vs verification note --- 05.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/05.md b/05.md index a1d488df..eeca551a 100644 --- a/05.md +++ b/05.md @@ -58,6 +58,15 @@ A client may implement support for finding users' public keys from _internet ide ## Notes +### Identification, not verification + +The NIP-05 is not intended to _verify_ a user, but only to _identify_ them, for the purpose of facilitating the exchange of a contact or their search. +Exceptions are people who own (e.g., a company) or are connected (e.g., a project) to a well-known domain, who can exploit NIP-05 as an attestation of their relationship with it, and thus to the organization behind it, thereby gaining an element of trust. + +### User discovery implementation suggestion + +A client can use this to allow users to search other profiles. If a client has a search box or something like that, a user may be able to type "bob@example.com" there and the client would recognize that and do the proper queries to obtain a pubkey and suggest that to the user. + ### Clients must always follow public keys, not NIP-05 addresses For example, if after finding that `bob@bob.com` has the public key `abc...def`, the user clicks a button to follow that profile, the client must keep a primary reference to `abc...def`, not `bob@bob.com`. If, for any reason, the address `https://bob.com/.well-known/nostr.json?name=bob` starts returning the public key `1d2...e3f` at any time in the future, the client must not replace `abc...def` in his list of followed profiles for the user (but it should stop displaying "bob@bob.com" for that user, as that will have become an invalid `"nip05"` property). @@ -66,10 +75,6 @@ For example, if after finding that `bob@bob.com` has the public key `abc...def`, Keys must be returned in hex format. Keys in NIP-19 `npub` format are only meant to be used for display in client UIs, not in this NIP. -### User Discovery implementation suggestion - -A client can also use this to allow users to search other profiles. If a client has a search box or something like that, a user may be able to type "bob@example.com" there and the client would recognize that and do the proper queries to obtain a pubkey and suggest that to the user. - ### Showing just the domain as an identifier Clients may treat the identifier `_@domain` as the "root" identifier, and choose to display it as just the ``. For example, if Bob owns `bob.com`, he may not want an identifier like `bob@bob.com` as that is redundant. Instead, Bob can use the identifier `_@bob.com` and expect Nostr clients to show and treat that as just `bob.com` for all purposes. From 1002104ece1fe3de7a091084d97e031c7291c9c0 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sun, 1 Sep 2024 00:44:30 +0200 Subject: [PATCH 05/17] nip44: clarify ecdh hashing --- 44.md | 1 + 1 file changed, 1 insertion(+) diff --git a/44.md b/44.md index f3071ea9..339d3002 100644 --- a/44.md +++ b/44.md @@ -142,6 +142,7 @@ validation rules, refer to BIP-340. The operation produces a shared point, and we encode the shared point's 32-byte x coordinate, using method `bytes(P)` from BIP340. Private and public keys must be validated as per BIP340: pubkey must be a valid, on-curve point, and private key must be a scalar in range `[1, secp256k1_order - 1]`. + Some libraries, like libsecp256k1, apply sha256 on the output. The hashing is unnecessary in NIP44. - Operators - `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the `i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`. From be17e5dcd9943c1d4854eccd5714241d4fe246e1 Mon Sep 17 00:00:00 2001 From: Paul Miller Date: Sun, 1 Sep 2024 16:13:12 +0200 Subject: [PATCH 06/17] Clarify function name in libsecp256k1 --- 44.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/44.md b/44.md index 339d3002..ccd1f505 100644 --- a/44.md +++ b/44.md @@ -142,7 +142,8 @@ validation rules, refer to BIP-340. The operation produces a shared point, and we encode the shared point's 32-byte x coordinate, using method `bytes(P)` from BIP340. Private and public keys must be validated as per BIP340: pubkey must be a valid, on-curve point, and private key must be a scalar in range `[1, secp256k1_order - 1]`. - Some libraries, like libsecp256k1, apply sha256 on the output. The hashing is unnecessary in NIP44. + NIP44 doesn't do hashing of the output: keep this in mind, because some libraries hash it using sha256. + As an example, in libsecp256k1, unhashed version is available in `secp256k1_ec_pubkey_tweak_mul` - Operators - `x[i:j]`, where `x` is a byte array and `i, j <= 0` returns a `(j - i)`-byte array with a copy of the `i`-th byte (inclusive) to the `j`-th byte (exclusive) of `x`. From 14ec14dac92d891715239bfb83ed1c9bdf2ac382 Mon Sep 17 00:00:00 2001 From: Silberengel <153727378+SilberWitch@users.noreply.github.com> Date: Mon, 2 Sep 2024 18:51:07 -0700 Subject: [PATCH 07/17] Missing events added to README, including NKBIP-01 and NKBIP-02 (#1464) * Missing events added to README, including NKBIP-01 and NKBIP-02 * Just format * kind conflict resolved, 2nd blossom kind added * Revert "kind conflict resolved, 2nd blossom kind added" This reverts commit 5a8ecc0c278336ee3134385d5640e8b8f3f136f2. * formatting changes merged, kind conflict resolved, 2nd blossom kind added * relay reviews --------- Co-authored-by: Asai Toshiya Co-authored-by: fiatjaf_ --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 80b8dcf2..0ebd9d22 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `1971` | Problem Tracker | [nostrocket][nostrocket] | | `1984` | Reporting | [56](56.md) | | `1985` | Label | [32](32.md) | +| `1986` | Relay reviews | | +| `1987` | AI Embeddings / Vector lists | [NKBIP-02] | | `2003` | Torrent | [35](35.md) | | `2004` | Torrent Comment | [35](35.md) | | `2022` | Coinjoin Pool | [joinstr][joinstr] | @@ -141,6 +143,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `9000`-`9030` | Group Control Events | [29](29.md) | | `9041` | Zap Goal | [75](75.md) | | `9734` | Zap Request | [57](57.md) | +| `9467` | Tidal login | [Tidal-nostr] | | `9735` | Zap | [57](57.md) | | `9802` | Highlights | [84](84.md) | | `10000` | Mute list | [51](51.md) | @@ -155,6 +158,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `10015` | Interests list | [51](51.md) | | `10030` | User emoji list | [51](51.md) | | `10050` | Relay list to receive DMs | [51](51.md), [17](17.md) | +| `10063` | User server list | [blossom] | | `10096` | File storage server list | [96](96.md) | | `13194` | Wallet Info | [47](47.md) | | `21000` | Lightning Pub RPC | [Lightning.Pub][lnpub] | @@ -162,6 +166,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `23194` | Wallet Request | [47](47.md) | | `23195` | Wallet Response | [47](47.md) | | `24133` | Nostr Connect | [46](46.md) | +| `24242` | Blobs stored on mediaservers | [blossom] | | `27235` | HTTP Auth | [98](98.md) | | `30000` | Follow sets | [51](51.md) | | `30001` | Generic lists | [51](51.md) | @@ -179,6 +184,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `30023` | Long-form Content | [23](23.md) | | `30024` | Draft Long-form Content | [23](23.md) | | `30030` | Emoji sets | [51](51.md) | +| `30040` | Modular Article Header | [NKBIP-01] | +| `30041` | Modular Article Content | [NKBIP-01] | | `30063` | Release artifact sets | [51](51.md) | | `30078` | Application-specific Data | [78](78.md) | | `30311` | Live Event | [53](53.md) | @@ -202,10 +209,14 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `34550` | Community Definition | [72](72.md) | | `39000-9` | Group metadata events | [29](29.md) | -[NUD: Custom Feeds]: https://wikifreedia.xyz/cip-01/97c70a44366a6535c1 +[NUD: Custom Feeds]: https://wikifreedia.xyz/cip-01/ [nostrocket]: https://github.com/nostrocket/NIPS/blob/main/Problems.md [lnpub]: https://github.com/shocknet/Lightning.Pub/blob/master/proto/autogenerated/client.md [joinstr]: https://gitlab.com/1440000bytes/joinstr/-/blob/main/NIP.md +[NKBIP-01]: https://wikistr.com/nkbip-01 +[NKBIP-02]: https://wikistr.com/nkbip-02 +[Blossom]: https://wikistr.com/blossom +[Tidal-nostr]: https://wikistr.com/tidal-nostr ## Message types From b4a2561df7325b8624bc5ffad154ec946ade2f1e Mon Sep 17 00:00:00 2001 From: kehiy Date: Mon, 2 Sep 2024 20:33:45 +0330 Subject: [PATCH 08/17] style: fix header styles in same format --- 09.md | 2 +- 10.md | 4 ++-- 11.md | 6 +++--- 26.md | 2 +- 32.md | 2 +- 35.md | 2 +- 38.md | 2 +- 44.md | 2 +- 45.md | 2 +- 46.md | 6 +++++- 55.md | 6 ++++-- 64.md | 2 +- 71.md | 2 +- 73.md | 2 +- 96.md | 6 ++++-- 15 files changed, 28 insertions(+), 20 deletions(-) diff --git a/09.md b/09.md index e1be5429..b1a28ac1 100644 --- a/09.md +++ b/09.md @@ -2,7 +2,7 @@ NIP-09 ====== Event Deletion Request --------------- +---------------------- `draft` `optional` diff --git a/10.md b/10.md index dfd4cb9e..67b01f27 100644 --- a/10.md +++ b/10.md @@ -2,8 +2,8 @@ NIP-10 ====== -On "e" and "p" tags in Text Events (kind 1). --------------------------------------------- +On "e" and "p" tags in Text Events (kind 1) +------------------------------------------- `draft` `optional` diff --git a/11.md b/11.md index a50038a0..21c61e45 100644 --- a/11.md +++ b/11.md @@ -2,7 +2,7 @@ NIP-11 ====== Relay Information Document ---------------------------- +-------------------------- `draft` `optional` @@ -172,7 +172,7 @@ There is no need to specify retention times for _ephemeral events_ since they ar ### Content Limitations Some relays may be governed by the arbitrary laws of a nation state. This -may limit what content can be stored in cleartext on those relays. All +may limit what content can be stored in clear-text on those relays. All clients are encouraged to use encryption to work around this limitation. It is not possible to describe the limitations of each country's laws @@ -183,7 +183,7 @@ countries' laws might end up being enforced on them, and then indirectly on their users' content. Users should be able to avoid relays in countries they don't like, -and/or select relays in more favourable zones. Exposing this +and/or select relays in more favorable zones. Exposing this flexibility is up to the client software. ```json diff --git a/26.md b/26.md index 86c46e1f..445dd54a 100644 --- a/26.md +++ b/26.md @@ -2,7 +2,7 @@ NIP-26 ======= Delegated Event Signing ------ +----------------------- `draft` `optional` diff --git a/32.md b/32.md index 92d18ebd..e06cad58 100644 --- a/32.md +++ b/32.md @@ -2,7 +2,7 @@ NIP-32 ====== Labeling ---------- +-------- `draft` `optional` diff --git a/35.md b/35.md index 04cfb46d..980bc856 100644 --- a/35.md +++ b/35.md @@ -2,7 +2,7 @@ NIP-35 ====== Torrents ------------ +-------- `draft` `optional` diff --git a/38.md b/38.md index d841d764..684843a3 100644 --- a/38.md +++ b/38.md @@ -3,7 +3,7 @@ NIP-38 ====== User Statuses --------------- +------------- `draft` `optional` diff --git a/44.md b/44.md index f3071ea9..78c2323a 100644 --- a/44.md +++ b/44.md @@ -1,5 +1,5 @@ NIP-44 -===== +====== Encrypted Payloads (Versioned) ------------------------------ diff --git a/45.md b/45.md index 6b253960..219368e4 100644 --- a/45.md +++ b/45.md @@ -2,7 +2,7 @@ NIP-45 ====== Event Counts --------------- +------------ `draft` `optional` diff --git a/46.md b/46.md index 57fd2b01..389a3e8c 100644 --- a/46.md +++ b/46.md @@ -1,4 +1,8 @@ -# NIP-46 - Nostr Remote Signing +NIP-46 +====== + +Nostr Remote Signing +-------------------- ## Rationale diff --git a/55.md b/55.md index 4565e8c3..c0ee9579 100644 --- a/55.md +++ b/55.md @@ -1,6 +1,8 @@ -# NIP-55 +NIP-55 +====== -## Android Signer Application +Android Signer Application +-------------------------- `draft` `optional` diff --git a/64.md b/64.md index 6d8d3736..7c2329a4 100644 --- a/64.md +++ b/64.md @@ -2,7 +2,7 @@ NIP-64 ====== Chess (Portable Game Notation) ------ +------------------------------ `draft` `optional` diff --git a/71.md b/71.md index be1587c9..302bbbf1 100644 --- a/71.md +++ b/71.md @@ -2,7 +2,7 @@ NIP-71 ====== Video Events ---------------- +------------ `draft` `optional` diff --git a/73.md b/73.md index 12228d36..d50ab22a 100644 --- a/73.md +++ b/73.md @@ -2,7 +2,7 @@ NIP-73 ====== External Content IDs -------------------------- +-------------------- `draft` `optional` diff --git a/96.md b/96.md index be709991..fab0c1a8 100644 --- a/96.md +++ b/96.md @@ -1,6 +1,8 @@ -# NIP-96 +NIP-96 +====== -## HTTP File Storage Integration +HTTP File Storage Integration +----------------------------- `draft` `optional` From 378dfaa5dbf44bd1f17fd70f8727b636b7c99239 Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Tue, 3 Sep 2024 14:07:46 -0300 Subject: [PATCH 09/17] nip54: remove markdown leftovers. --- 54.md | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/54.md b/54.md index cf225448..39528cf9 100644 --- a/54.md +++ b/54.md @@ -6,7 +6,7 @@ Wiki `draft` `optional` -This NIP defines `kind:30818` (an _addressable event_) for long-form text content similar to [NIP-23](23.md), but with one important difference: articles are meant to be descriptions, or encyclopedia entries, of particular subjects, and it's expected that multiple people will write articles about the exact same subjects, with either small variations or completely independent content. +This NIP defines `kind:30818` (an _addressable event_) for descriptions (or encyclopedia entries) of particular subjects, and it's expected that multiple people will write articles about the exact same subjects, with either small variations or completely independent content. Articles are identified by lowercase, normalized ascii `d` tags. @@ -26,21 +26,25 @@ Articles are identified by lowercase, normalized ascii `d` tags. - Any non-letter character MUST be converted to a `-`. - All letters MUST be converted to lowercase. -### Content rules +### Content -The content should be Asciidoc, following the same rules as of [NIP-23](23.md), although it takes some extra (optional) metadata tags: +The `content` should be Asciidoc with two extra functionalities: **wikilinks** and **nostr:...** links. - - `title`: for when the display title should be different from the `d` tag. - - `summary`: for display in lists. - - `a` and `e`: for referencing the original event a wiki article was forked from. - -One extra functionality is added: **wikilinks**. Unlike normal Asciidoc links `[]()` that link to webpages, wikilinks `[[]]` link to other articles in the wiki. In this case, the wiki is the entirety of Nostr. Clicking on a wikilink should cause the client to ask relays for events with `d` tags equal to the target of that wikilink. +Unlike normal Asciidoc links `http://example.com[]` that link to external webpages, wikilinks `[[]]` link to other articles in the wiki. In this case, the wiki is the entirety of Nostr. Clicking on a wikilink should cause the client to ask relays for events with `d` tags equal to the target of that wikilink. Wikilinks can take these two forms: 1. `[[Target Page]]` -- in this case it will link to the page `target-page` (according to `d` tag normalization rules above) and be displayed as `Target Page`; 2. `[[target page|see this]]` -- in this case it will link to the page `target-page`, but will be displayed as `see this`. +`nostr:...` links, as per [NIP-21](21.md), should link to profiles or arbitrary Nostr events. Although it is not recommended to link to specific versions of articles -- instead the _wikilink_ syntax should be preferred, since it should be left to the reader and their client to decide what version of any given article they want to read. + +### Optional extra tags + + - `title`: for when the display title should be different from the `d` tag. + - `summary`: for display in lists. + - `a` and `e`: for referencing the original event a wiki article was forked from. + ### Merge Requests Event `kind:818` represents a request to merge from a forked article into the source. It is directed to a pubkey and references the original article and the modified event. From e6552476aa2e5ca7256be572a9aa226ec8a022ee Mon Sep 17 00:00:00 2001 From: kehiy Date: Tue, 3 Sep 2024 20:41:31 +0330 Subject: [PATCH 10/17] format(all): json formatting --- 02.md | 4 ++-- 05.md | 4 ++-- 09.md | 4 ++-- 11.md | 26 +++++++++++++++----------- 15.md | 19 ++++++++++--------- 17.md | 10 +++++----- 25.md | 8 ++++---- 28.md | 26 +++++++++++++------------- 29.md | 28 ++++++++++++++-------------- 32.md | 26 +++++++++++++------------- 34.md | 7 ++++--- 35.md | 2 +- 38.md | 4 +++- 39.md | 5 +++-- 42.md | 8 ++++---- 46.md | 2 +- 47.md | 10 ++++------ 50.md | 4 ++-- 51.md | 2 +- 53.md | 10 +++++----- 54.md | 8 ++++---- 56.md | 12 ++++++++---- 57.md | 2 +- 58.md | 12 ++++++------ 59.md | 4 ++-- 64.md | 12 ++++++------ 65.md | 4 ++-- 71.md | 2 +- 72.md | 6 +++--- 75.md | 20 ++++++++++---------- 84.md | 4 ++-- 89.md | 22 ++++++++++++---------- 90.md | 26 +++++++++++++------------- 94.md | 4 ++-- 96.md | 51 +++++++++++++++++++++++++-------------------------- 99.md | 2 +- 36 files changed, 206 insertions(+), 194 deletions(-) diff --git a/02.md b/02.md index 4029b222..8354bf0b 100644 --- a/02.md +++ b/02.md @@ -14,7 +14,7 @@ The `.content` is not used. For example: -```json +```jsonc { "kind": 3, "tags": [ @@ -23,7 +23,7 @@ For example: ["p", "612ae..e610f", "ws://carolrelay.com/ws", "carol"] ], "content": "", - ...other fields + // other fields... } ``` diff --git a/05.md b/05.md index eeca551a..ca6da7be 100644 --- a/05.md +++ b/05.md @@ -16,12 +16,12 @@ The result should be a JSON document object with a key `"names"` that should the If a client sees an event like this: -```json +```jsonc { "pubkey": "b0635d6a9851d3aed0cd6c495b282167acf761729078d975fc341b22650b07b9", "kind": 0, "content": "{\"name\": \"bob\", \"nip05\": \"bob@example.com\"}" - ... + // other fields... } ``` diff --git a/09.md b/09.md index b1a28ac1..23ffeab1 100644 --- a/09.md +++ b/09.md @@ -12,7 +12,7 @@ The event's `content` field MAY contain a text note describing the reason for th For example: -``` +```jsonc { "kind": 5, "pubkey": <32-bytes hex-encoded public key of the event creator>, @@ -24,7 +24,7 @@ For example: ["k", "30023"] ], "content": "these posts were published by accident", - ...other fields + // other fields... } ``` diff --git a/11.md b/11.md index 21c61e45..0ca58708 100644 --- a/11.md +++ b/11.md @@ -66,7 +66,7 @@ These are limitations imposed by the relay on clients. Your client should expect that requests which exceed these *practical* limitations are rejected or fail immediately. -```json +```jsonc { "limitation": { "max_message_length": 16384, @@ -83,7 +83,7 @@ are rejected or fail immediately. "created_at_lower_limit": 31536000, "created_at_upper_limit": 3 }, - ... + // other fields... } ``` @@ -146,14 +146,15 @@ Retention times are given in seconds, with `null` indicating infinity. If zero is provided, this means the event will not be stored at all, and preferably an error will be provided when those are received. -```json +```jsonc { "retention": [ {"kinds": [0, 1, [5, 7], [40, 49]], "time": 3600}, {"kinds": [[40000, 49999]], "time": 100}, {"kinds": [[30000, 39999]], "count": 1000}, {"time": 3600, "count": 10000} - ] + ], + // other fields... } ``` @@ -186,10 +187,10 @@ Users should be able to avoid relays in countries they don't like, and/or select relays in more favorable zones. Exposing this flexibility is up to the client software. -```json +```jsonc { "relay_countries": [ "CA", "US" ], - ... + // other fields... } ``` @@ -208,12 +209,12 @@ local community. This would encourage users to follow the global feed on that relay, in addition to their usual individual follows. To support this goal, relays MAY specify some of the following values. -```json +```jsonc { "language_tags": ["en", "en-419"], "tags": ["sfw-only", "bitcoin-only", "anime"], "posting_policy": "https://example.com/posting-policy.html", - ... + // other fields... } ``` @@ -260,10 +261,10 @@ Relays that require payments may want to expose their fee schedules. A URL pointing to an image to be used as an icon for the relay. Recommended to be squared in shape. -```json +```jsonc { "icon": "https://nostr.build/i/53866b44135a27d624e99c6165cabd76ac8f72797209700acb189fce75021f47.jpg", - ... + // other fields... } ``` @@ -271,9 +272,11 @@ A URL pointing to an image to be used as an icon for the relay. Recommended to b As of 2 May 2023 the following command provided these results: +```bash +$ curl -H "Accept: application/nostr+json" https://eden.nostr.land | jq ``` -~> curl -H "Accept: application/nostr+json" https://eden.nostr.land | jq +```json { "description": "nostr.land family of relays (us-or-01)", "name": "nostr.land", @@ -312,3 +315,4 @@ As of 2 May 2023 the following command provided these results: ] }, } +``` diff --git a/15.md b/15.md index 2a4e2c20..b55b4448 100644 --- a/15.md +++ b/15.md @@ -73,10 +73,10 @@ Fields that are not self-explanatory: **Event Tags** -```json +```jsonc { "tags": [["d", , "address": , - "message": ", + "message": , "contact": { "nostr": <32-bytes hex of a pubkey>, "phone": , @@ -237,7 +237,7 @@ Create a customized user experience using the `naddr` from [NIP-19](19.md#sharea **Event Content** -```json +```jsonc { "name": , "about": , @@ -248,7 +248,7 @@ Create a customized user experience using the `naddr` from [NIP-19](19.md#sharea "darkMode": }, "merchants": [array of pubkeys (optional)], - ... + // other fields... } ``` @@ -290,10 +290,11 @@ This event leverages naddr to enable comprehensive customization and sharing of ### Event `1021`: Bid -```json +```jsonc { "content": , "tags": [["e", ]], + // other fields... } ``` @@ -335,4 +336,4 @@ Customer support is handled over whatever communication method was specified. If ## Additional -Standard data models can be found here +Standard data models can be found [here](https://raw.githubusercontent.com/lnbits/nostrmarket/main/models.py) diff --git a/17.md b/17.md index d22dbdef..4b96bce3 100644 --- a/17.md +++ b/17.md @@ -12,18 +12,18 @@ This NIP defines an encrypted direct messaging scheme using [NIP-44](44.md) encr Kind `14` is a chat message. `p` tags identify one or more receivers of the message. -```js +```jsonc { "id": "",   "pubkey": "", - "created_at": now(), + "created_at": "",   "kind": 14,   "tags": [     ["p", "", ""],     ["p", "", ""],     ["e", "", "", "reply"] // if this is a reply ["subject", ""], -    ... +    // rest of tags...   ],   "content": "", } @@ -86,7 +86,7 @@ Clients CAN offer disappearing messages by setting an `expiration` tag in the gi Kind `10050` indicates the user's preferred relays to receive DMs. The event MUST include a list of `relay` tags with relay URIs. -```js +```jsonc { "kind": 10050, "tags": [ @@ -94,7 +94,7 @@ Kind `10050` indicates the user's preferred relays to receive DMs. The event MUS ["relay", "wss://myrelay.nostr1.com"], ], "content": "", - //...other fields + // other fields... } ``` diff --git a/25.md b/25.md index f0386034..671c55fa 100644 --- a/25.md +++ b/25.md @@ -57,14 +57,14 @@ Reactions to a website If the target of the reaction is a website, the reaction MUST be a `kind 17` event and MUST include an `r` tag with the website's URL. -```json +```jsonc { "kind": 17, "content": "⭐", "tags": [ ["r", "https://example.com/"] ], - ...other fields + // other fields... } ``` @@ -79,14 +79,14 @@ The client may specify a custom emoji ([NIP-30](30.md)) `:shortcode:` in the reaction content. The client should refer to the emoji tag and render the content as an emoji if shortcode is specified. -```json +```jsonc { "kind": 7, "content": ":soapbox:", "tags": [ ["emoji", "soapbox", "https://gleasonator.com/emoji/Gleasonator/soapbox.png"] ], - ...other fields + // other fields... } ``` diff --git a/28.md b/28.md index 16320880..73c76b2b 100644 --- a/28.md +++ b/28.md @@ -25,10 +25,10 @@ Create a public chat channel. In the channel creation `content` field, Client SHOULD include basic channel metadata (`name`, `about`, `picture` and `relays` as specified in kind 41). -```json +```jsonc { "content": "{\"name\": \"Demo Channel\", \"about\": \"A test channel.\", \"picture\": \"https://placekitten.com/200/200\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}", - ... + // other fields... } ``` @@ -52,11 +52,11 @@ Clients MAY add additional metadata fields. Clients SHOULD use [NIP-10](10.md) marked "e" tags to recommend a relay. -```json +```jsonc { "content": "{\"name\": \"Updated Demo Channel\", \"about\": \"Updating a test channel.\", \"picture\": \"https://placekitten.com/201/201\", \"relays\": [\"wss://nos.lol\", \"wss://nostr.mom\"]}", "tags": [["e", , ]], - ... + // other fields... } ``` @@ -71,26 +71,26 @@ Clients SHOULD append [NIP-10](10.md) "p" tags to replies. Root message: -```json +```jsonc { "content": , "tags": [["e", , , "root"]], - ... + // other fields... } ``` Reply to another message: -```json +```jsonc { "content": , "tags": [ ["e", , , "root"], ["e", , , "reply"], ["p", , ], - ... + // rest of tags... ], - ... + // other fields... } ``` @@ -107,11 +107,11 @@ Clients MAY hide event 42s for other users other than the user who sent the even (For example, if three users 'hide' an event giving a reason that includes the word 'pornography', a Nostr client that is an iOS app may choose to hide that message for all iOS clients.) -```json +```jsonc { "content": "{\"reason\": \"Dick pic\"}", "tags": [["e", ]], - ... + // other fields... } ``` @@ -125,11 +125,11 @@ Clients SHOULD hide event 42s shown to a given user, if there is an event 44 fro Clients MAY hide event 42s for users other than the user who sent the event 44. -```json +```jsonc { "content": "{\"reason\": \"Posting dick pics\"}", "tags": [["p", ]], - ... + // other fields... } ``` diff --git a/29.md b/29.md index f8672680..6232f8b6 100644 --- a/29.md +++ b/29.md @@ -42,14 +42,14 @@ Relays should prevent late publication (messages published now with a timestamp This is the basic unit of a "microblog" root text note sent to a group. -```js +```jsonc "kind": 11, "content": "hello my friends lovers of pizza", "tags": [ ["h", ""], - ["previous", "", "", ...] + ["previous", "", "", /*...*/] ] - ... + // other fields... ``` - *threaded text reply* (`kind:12`) @@ -63,14 +63,14 @@ This is the basic unit of a "microblog" reply note sent to a group. It's the sam This is the basic unit of a _chat message_ sent to a group. -```js +```jsonc "kind": 9, "content": "hello my friends lovers of pizza", "tags": [ ["h", ""], - ["previous", "", "", ...] + ["previous", "", "", /*...*/] ] - ... + // other fields... ``` - *chat message threaded reply* (`kind:10`) @@ -83,7 +83,7 @@ Similar to `kind:12`, this is the basic unit of a chat message sent to a group. Any user can send one of these events to the relay in order to be automatically or manually added to the group. If the group is `open` the relay will automatically issue a `kind:9000` in response adding this user. Otherwise group admins may choose to query for these requests and act upon them. -```js +```json { "kind": 9021, "content": "optional reason", @@ -97,7 +97,7 @@ Any user can send one of these events to the relay in order to be automatically Any user can send one of these events to the relay in order to be automatically removed from the group. The relay will automatically issue a `kind:9001` in response removing this user. -```js +```json { "kind": 9022, "content": "optional reason", @@ -111,13 +111,13 @@ Any user can send one of these events to the relay in order to be automatically Clients can send these events to a relay in order to accomplish a moderation action. Relays must check if the pubkey sending the event is capable of performing the given action. The relay may discard the event after taking action or keep it as a moderation log. -```js +```json { "kind": 90xx, "content": "optional reason", "tags": [ ["h", ""], - ["previous", ...] + ["previous", /*...*/] ] } ``` @@ -142,7 +142,7 @@ This event defines the metadata for the group -- basically how clients should di If the group is forked and hosted in multiple relays, there will be multiple versions of this event in each different relay and so on. -```js +```jsonc { "kind": 39000, "content": "", @@ -154,7 +154,7 @@ If the group is forked and hosted in multiple relays, there will be multiple ver ["public"], // or ["private"] ["open"] // or ["closed"] ] - ... + // other fields... } ``` @@ -177,7 +177,7 @@ The list of capabilities, as defined by this NIP, for now, is the following: - `edit-group-status` - `delete-group` -```js +```json { "kind": 39001, "content": "list of admins for the pizza lovers group", @@ -186,7 +186,7 @@ The list of capabilities, as defined by this NIP, for now, is the following: ["p", "", "ceo", "add-user", "edit-metadata", "delete-event", "remove-user"], ["p", "", "secretary", "add-user", "delete-event"] ] - ... + // other fields... } ``` diff --git a/32.md b/32.md index e06cad58..66f02836 100644 --- a/32.md +++ b/32.md @@ -57,7 +57,7 @@ Example events A suggestion that multiple pubkeys be associated with the `permies` topic. -```json +```jsonc { "kind": 1985, "tags": [ @@ -66,13 +66,13 @@ A suggestion that multiple pubkeys be associated with the `permies` topic. ["p", , ], ["p", , ] ], - ... + // other fields... } ``` A report flagging violence toward a human being as defined by ontology.example.com. -```json +```jsonc { "kind": 1985, "tags": [ @@ -81,13 +81,13 @@ A report flagging violence toward a human being as defined by ontology.example.c ["p", , ], ["p", , ] ], - ... + // other fields... } ``` A moderation suggestion for a chat event. -```json +```jsonc { "kind": 1985, "tags": [ @@ -95,13 +95,13 @@ A moderation suggestion for a chat event. ["l", "approve", "nip28.moderation"], ["e", , ] ], - ... + // other fields... } ``` Assignment of a license to an event. -```json +```jsonc { "kind": 1985, "tags": [ @@ -109,14 +109,14 @@ Assignment of a license to an event. ["l", "MIT", "license"], ["e", , ] ], - ... + // other fields... } ``` Publishers can self-label by adding `l` tags to their own non-1985 events. In this case, the kind 1 event's author is labeling their note as being related to Milan, Italy using ISO 3166-2. -```json +```jsonc { "kind": 1, "tags": [ @@ -124,13 +124,13 @@ is labeling their note as being related to Milan, Italy using ISO 3166-2. ["l", "IT-MI", "ISO-3166-2"] ], "content": "It's beautiful here in Milan!", - ... + // other fields... } ``` Author is labeling their note language as English using ISO-639-1. -```json +```jsonc { "kind": 1, "tags": [ @@ -138,7 +138,7 @@ Author is labeling their note language as English using ISO-639-1. ["l", "en", "ISO-639-1"] ], "content": "English text", - ... + // other fields... } ``` @@ -169,7 +169,7 @@ be handled in some other way. Appendix: Known Ontologies -------------------------- +-------------------------- Below is a non-exhaustive list of ontologies currently in widespread use. diff --git a/34.md b/34.md index 69f460b7..9363aeb1 100644 --- a/34.md +++ b/34.md @@ -106,7 +106,7 @@ The first patch in a series MAY be a cover letter in the format produced by `git Issues 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. -```jsonc +```json { "kind": 1621, "content": "", @@ -132,8 +132,9 @@ Replies are also Markdown text. The difference is that they MUST be issued as re // other "e" and "p" tags should be applied here when necessary, following the threading rules of NIP-10 ["p", "", "", "mention"], ["e", "", "", "reply"], - // ... - ] + // rest of tags... + ], + // other fields... } ``` diff --git a/35.md b/35.md index 980bc856..3891f6f4 100644 --- a/35.md +++ b/35.md @@ -37,7 +37,7 @@ A second level prefix should be included where the database supports multiple me In some cases the url mapping isnt direct, mapping the url in general is out of scope for this NIP, the section above is only a guide so that implementers have enough information to succsesfully map the url if they wish. -```jsonc +```json { "kind": 2003, "content": "", diff --git a/38.md b/38.md index 684843a3..8b22b2a7 100644 --- a/38.md +++ b/38.md @@ -17,7 +17,7 @@ A special event with `kind:30315` "User Status" is defined as an *optionally exp For example: -```js +```json { "kind": 30315, "content": "Sign up for nostrasia!", @@ -26,7 +26,9 @@ For example: ["r", "https://nostr.world"] ], } +``` +```json { "kind": 30315, "content": "Intergalatic - Beastie Boys", diff --git a/39.md b/39.md index b7c3b9c6..3777ac55 100644 --- a/39.md +++ b/39.md @@ -13,7 +13,8 @@ Nostr protocol users may have other online identities such as usernames, profile ## `i` tag on a metadata event A new optional `i` tag is introduced for `kind 0` metadata event defined in [NIP-01](01.md): -```json + +```jsonc { "id": , "pubkey": , @@ -23,7 +24,7 @@ A new optional `i` tag is introduced for `kind 0` metadata event defined in [NIP ["i", "mastodon:bitcoinhackers.org/@semisol", "109775066355589974"] ["i", "telegram:1087295469", "nostrdirectory/770"] ], - ... + // other fields... } ``` diff --git a/42.md b/42.md index 8c70de49..fdc5d104 100644 --- a/42.md +++ b/42.md @@ -22,13 +22,13 @@ A relay may want to require clients to authenticate to access restricted resourc This NIP defines a new message, `AUTH`, which relays CAN send when they support authentication and clients can send to relays when they want to authenticate. When sent by relays the message has the following form: -```json +``` ["AUTH", ] ``` And, when sent by clients, the following form: -```json +``` ["AUTH", ] ``` @@ -38,14 +38,14 @@ And, when sent by clients, the following form: The signed event is an ephemeral event not meant to be published or queried, it must be of `kind: 22242` and it should have at least two tags, one for the relay URL and one for the challenge string as received from the relay. Relays MUST exclude `kind: 22242` events from being broadcasted to any client. `created_at` should be the current time. Example: -```json +```jsonc { "kind": 22242, "tags": [ ["relay", "wss://relay.example.com/"], ["challenge", "challengestringhere"] ], - ... + // other fields... } ``` diff --git a/46.md b/46.md index 389a3e8c..e1675b0d 100644 --- a/46.md +++ b/46.md @@ -94,7 +94,7 @@ nostrconnect://?relay=&metadata ## Request Events `kind: 24133` -```json +```jsonc { "id": , "kind": 24133, diff --git a/47.md b/47.md index e4e432ca..a19230fa 100644 --- a/47.md +++ b/47.md @@ -173,7 +173,7 @@ Request: "amount": 123, // invoice amount in msats, required "pubkey": "03...", // payee pubkey, required "preimage": "0123456789abcdef...", // preimage of the payment, optional - "tlv_records: [ // tlv records, optional + "tlv_records": [ // tlv records, optional { "type": 5482373484, // tlv type "value": "0123456789abcdef" // hex encoded tlv value @@ -208,7 +208,7 @@ Request: "method": "multi_pay_keysend", "params": { "keysends": [ - {"id": "4c5b24a351", pubkey": "03...", "amount": 123}, + {"id": "4c5b24a351", "pubkey": "03...", "amount": 123}, {"id": "3da52c32a1", "pubkey": "02...", "amount": 567, "preimage": "abc123..", "tlv_records": [{"type": 696969, "value": "77616c5f6872444873305242454d353736"}]}, ], } @@ -358,8 +358,7 @@ Request: ```jsonc { "method": "get_balance", - "params": { - } + "params": {} } ``` @@ -379,8 +378,7 @@ Request: ```jsonc { "method": "get_info", - "params": { - } + "params": {} } ``` diff --git a/50.md b/50.md index 2a31cb11..9eea1f85 100644 --- a/50.md +++ b/50.md @@ -15,9 +15,9 @@ extensible framework for performing such queries. ## `search` filter field A new `search` field is introduced for `REQ` messages from clients: -```json +```jsonc { - ... + // other fields on filter object... "search": } ``` diff --git a/51.md b/51.md index f7a468e7..3792d7fe 100644 --- a/51.md +++ b/51.md @@ -111,7 +111,7 @@ Some clients have used these lists in the past, but they should work on transiti ### A _release artifact set_ of an Example App -```json +```jsonc { "id": "567b41fc9060c758c4216fe5f8d3df7c57daad7ae757fa4606f0c39d4dd220ef", "pubkey": "d6dc95542e18b8b7aec2f14610f55c335abebec76f3db9e58c254661d0593a0c", diff --git a/53.md b/53.md index 15bdbc95..ee12fef9 100644 --- a/53.md +++ b/53.md @@ -16,7 +16,7 @@ A special event with `kind:30311` "Live Event" is defined as an _addressable eve For example: -```json +```jsonc { "kind": 30311, "tags": [ @@ -35,10 +35,10 @@ For example: ["p", "91cf9..4e5ca", "wss://provider1.com/", "Host", ""], ["p", "14aeb..8dad4", "wss://provider2.com/nostr", "Speaker"], ["p", "612ae..e610f", "ws://provider3.com/ws", "Participant"], - ["relays", "wss://one.com", "wss://two.com", ...] + ["relays", "wss://one.com", "wss://two.com", /*...*/] ], "content": "", - ... + // other fields... } ``` @@ -64,14 +64,14 @@ This feature is important to avoid malicious event owners adding large account h Event `kind:1311` is live chat's channel message. Clients MUST include the `a` tag of the activity with a `root` marker. Other Kind-1 tags such as `reply` and `mention` can also be used. -```json +```jsonc { "kind": 1311, "tags": [ ["a", "30311::", "", "root"], ], "content": "Zaps to live streams is beautiful.", - ... + // other fields... } ``` diff --git a/54.md b/54.md index cf225448..611ec7a1 100644 --- a/54.md +++ b/54.md @@ -11,7 +11,7 @@ This NIP defines `kind:30818` (an _addressable event_) for long-form text conten Articles are identified by lowercase, normalized ascii `d` tags. ### Articles -```jsonc +```json { "content": "A wiki is a hypertext publication collaboratively edited and managed by its own audience.", "tags": [ @@ -96,13 +96,13 @@ Asciidoc has a strict spec, multiple implementations in many languages, and supp # Appendix 1: Merge requests Users can request other users to get their entries merged into someone else's entry by creating a `kind:818` event. -```jsonc +```json { "content": "I added information about how to make hot ice-creams", "kind": 818, "tags": [ [ "a", "30818::hot-ice-creams", "" ], - [ "e", "", "' ], + [ "e", "", "" ], [ "p", "" ], [ "e", "", "", "source" ] ] @@ -114,4 +114,4 @@ Users can request other users to get their entries merged into someone else's en `e` tag: optional version of the article in which this modifications is based `e` tag with `source` marker: the ID of the event that should be merged. This event id MUST be of a `kind:30818` as defined in this NIP. -The destination-pubkey (the pubkey being requested to merge something into their article can create [[NIP-25]] reactions that tag the `kind:818` event with `+` or `-` +The destination-pubkey is the pubkey being requested to merge something into their article can create [[NIP-25]] reactions that tag the `kind:818` event with `+` or `-` diff --git a/56.md b/56.md index fc8d8985..f7b1b1a9 100644 --- a/56.md +++ b/56.md @@ -41,7 +41,7 @@ further qualification and querying. Example events -------------- -```json +```jsonc { "kind": 1984, "tags": [ @@ -50,9 +50,11 @@ Example events ["l", "NS-nud", "social.nos.ontology"] ], "content": "", - ... + // other fields... } +``` +```jsonc { "kind": 1984, "tags": [ @@ -60,16 +62,18 @@ Example events ["p", ] ], "content": "He's insulting the king!", - ... + // other fields... } +``` +```jsonc { "kind": 1984, "tags": [ ["p", , "impersonation"] ], "content": "Profile is impersonating nostr:", - ... + // other fields... } ``` diff --git a/57.md b/57.md index 1c0b3149..b5338110 100644 --- a/57.md +++ b/57.md @@ -171,7 +171,7 @@ A client can retrieve `zap receipt`s on events and pubkeys using a NIP-01 filter When an event includes one or more `zap` tags, clients wishing to zap it SHOULD calculate the lnurl pay request based on the tags value instead of the event author's profile field. The tag's second argument is the `hex` string of the receiver's pub key and the third argument is the relay to download the receiver's metadata (Kind-0). An optional fourth parameter specifies the weight (a generalization of a percentage) assigned to the respective receiver. Clients should parse all weights, calculate a sum, and then a percentage to each receiver. If weights are not present, CLIENTS should equally divide the zap amount to all receivers. If weights are only partially present, receivers without a weight should not be zapped (`weight = 0`). -```js +```jsonc { "tags": [ [ "zap", "82341f882b6eabcd2ba7f1ef90aad961cf074af15b9ef44a09f9d2a8fbfbe6a2", "wss://nostr.oxtr.dev", "1" ], // 25% diff --git a/58.md b/58.md index 438574be..b6324f4e 100644 --- a/58.md +++ b/58.md @@ -74,7 +74,7 @@ Clients SHOULD attempt to render the most appropriate badge thumbnail according ### Example of a Badge Definition event -```json +```jsonc { "pubkey": "alice", "kind": 30009, @@ -85,13 +85,13 @@ Clients SHOULD attempt to render the most appropriate badge thumbnail according ["image", "https://nostr.academy/awards/bravery.png", "1024x1024"], ["thumb", "https://nostr.academy/awards/bravery_256x256.png", "256x256"] ], - ... + // other fields... } ``` ### Example of Badge Award event -```json +```jsonc { "id": "", "kind": 8, @@ -101,14 +101,14 @@ Clients SHOULD attempt to render the most appropriate badge thumbnail according ["p", "bob", "wss://relay"], ["p", "charlie", "wss://relay"] ], - ... + // other fields... } ``` ### Example of a Profile Badges event Honorable Bob The Brave: -```json +```jsonc { "kind": 30008, "pubkey": "bob", @@ -119,6 +119,6 @@ Honorable Bob The Brave: ["a", "30009:alice:honor"], ["e", "", "wss://nostr.academy"] ], - ... + // other fields... } ``` diff --git a/59.md b/59.md index 4dc857f6..a4fc99dc 100644 --- a/59.md +++ b/59.md @@ -41,7 +41,7 @@ A `seal` is a `kind:13` event that wraps a `rumor` with the sender's regular key to a receiver's pubkey but there is no `p` tag pointing to the receiver. There is no way to know who the rumor is for without the receiver's or the sender's private key. The only public information in this event is who is signing it. -```js +```json { "id": "", "pubkey": "", @@ -60,7 +60,7 @@ Tags MUST must always be empty in a `kind:13`. The inner event MUST always be un A `gift wrap` event is a `kind:1059` event that wraps any other event. `tags` SHOULD include any information needed to route the event to its intended recipient, including the recipient's `p` tag or [NIP-13](13.md) proof of work. -```js +```json { "id": "", "pubkey": "", diff --git a/64.md b/64.md index 7c2329a4..616c5d6f 100644 --- a/64.md +++ b/64.md @@ -16,23 +16,23 @@ The `.content` of these notes is a string representing a [PGN-database][pgn_form ### Notes -```json +```jsonc { "kind": 64, "content": "1. e4 *", - ... + // other fields... } ``` -```json +```jsonc { "kind": 64, "tags": [ ["alt", "Fischer vs. Spassky in Belgrade on 1992-11-04 (F/S Return Match, Round 29)"], - ... + // rest of tags... ], - "content": "[Event \"F/S Return Match\"]\n[Site \"Belgrade, Serbia JUG\"]\n[Date \"1992.11.04\"]\n[Round \"29\"]\n[White \"Fischer, Robert J.\"]\n[Black \"Spassky, Boris V.\"]\n[Result \"1/2-1/2\"]\n\n1. e4 e5 2. Nf3 Nc6 3. Bb5 {This opening is called the Ruy Lopez.} 3... a6\n4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7\n11. c4 c6 12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5 17. dxe5\nNxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6 21. Nc4 Nxc4 22. Bxc4 Nb6\n23. Ne5 Rae8 24. Bxf7+ Rxf7 25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5\nhxg5 29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8 34. Kf2 Bf5\n35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3 39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6\nNf2 42. g4 Bd3 43. Re6 1/2-1/2" - ... + "content": "[Event \"F/S Return Match\"]\n[Site \"Belgrade, Serbia JUG\"]\n[Date \"1992.11.04\"]\n[Round \"29\"]\n[White \"Fischer, Robert J.\"]\n[Black \"Spassky, Boris V.\"]\n[Result \"1/2-1/2\"]\n\n1. e4 e5 2. Nf3 Nc6 3. Bb5 {This opening is called the Ruy Lopez.} 3... a6\n4. Ba4 Nf6 5. O-O Be7 6. Re1 b5 7. Bb3 d6 8. c3 O-O 9. h3 Nb8 10. d4 Nbd7\n11. c4 c6 12. cxb5 axb5 13. Nc3 Bb7 14. Bg5 b4 15. Nb1 h6 16. Bh4 c5 17. dxe5\nNxe4 18. Bxe7 Qxe7 19. exd6 Qf6 20. Nbd2 Nxd6 21. Nc4 Nxc4 22. Bxc4 Nb6\n23. Ne5 Rae8 24. Bxf7+ Rxf7 25. Nxf7 Rxe1+ 26. Qxe1 Kxf7 27. Qe3 Qg5 28. Qxg5\nhxg5 29. b3 Ke6 30. a3 Kd6 31. axb4 cxb4 32. Ra5 Nd5 33. f3 Bc8 34. Kf2 Bf5\n35. Ra7 g6 36. Ra6+ Kc5 37. Ke1 Nf4 38. g3 Nxh3 39. Kd2 Kb5 40. Rd6 Kc5 41. Ra6\nNf2 42. g4 Bd3 43. Re6 1/2-1/2", + // other fields... } ``` diff --git a/65.md b/65.md index f32c9653..71660d4d 100644 --- a/65.md +++ b/65.md @@ -12,7 +12,7 @@ The event MUST include a list of `r` tags with relay URIs and a `read` or `write The `.content` is not used. -```json +```jsonc { "kind": 10002, "tags": [ @@ -22,7 +22,7 @@ The `.content` is not used. ["r", "wss://nostr-relay.example.com", "read"] ], "content": "", - ...other fields + // other fields... } ``` diff --git a/71.md b/71.md index 302bbbf1..5cf3b369 100644 --- a/71.md +++ b/71.md @@ -42,7 +42,7 @@ The list of tags are as follows: * `p` (optional, repeated) 32-bytes hex pubkey of a participant in the video, optional recommended relay URL * `r` (optional, repeated) references / links to web pages -```json +```jsonc { "id": <32-bytes lowercase hex-encoded SHA-256 of the the serialized event data>, "pubkey": <32-bytes lowercase hex-encoded public key of the event creator>, diff --git a/72.md b/72.md index b2f523b4..582410ad 100644 --- a/72.md +++ b/72.md @@ -35,7 +35,7 @@ The goal of this NIP is to enable public communities. It defines the replaceable ["relay", "", "approvals"], ["relay", ""] ], - ... + // other fields... } ``` @@ -50,7 +50,7 @@ Any Nostr event can be posted to a community. Clients MUST add one or more commu ["a", "34550::", ""], ], "content": "hello world", - // ... + // other fields... } ``` @@ -75,7 +75,7 @@ Moderators MAY request deletion of their approval of a post at any time using [N ["k", ""] ], "content": "", - // ... + // other fields... } ``` diff --git a/75.md b/75.md index a6f2bffe..885c3910 100644 --- a/75.md +++ b/75.md @@ -21,15 +21,16 @@ The following tags are defined as REQUIRED. Example event: -```json +```jsonc { "kind": 9041, "tags": [ - ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...], + ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", /*...*/], ["amount", "210000"], ], "content": "Nostrasia travel expenses", - ... + // other fields... +} ``` The following tags are OPTIONAL. @@ -38,18 +39,18 @@ The following tags are OPTIONAL. - `image` - an image for the goal - `summary` - a brief description -```json +```jsonc { "kind": 9041, "tags": [ - ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", ...], + ["relays", "wss://alicerelay.example.com", "wss://bobrelay.example.com", /*...*/], ["amount", "210000"], ["closed_at", ""], ["image", ""], ["summary", ""], ], "content": "Nostrasia travel expenses", - ... + // other fields... } ``` @@ -59,15 +60,14 @@ The goal MAY include multiple beneficiary pubkeys by specifying [`zap` tags](57. Addressable events can link to a goal by using a `goal` tag specifying the event id and an optional relay hint. -```json +```jsonc { - ... "kind": 3xxxx, "tags": [ - ... ["goal", "", ""], + // rest of tags... ], - ... + // other fields... } ``` diff --git a/84.md b/84.md index d5f54d4c..e3063c2f 100644 --- a/84.md +++ b/84.md @@ -26,14 +26,14 @@ useful when highlighting non-nostr content for which the client might be able to (e.g. prompting the user or reading a `` tag on the document). A role MAY be included as the last value of the tag. -```json +```jsonc { "tags": [ ["p", "", "", "author"], ["p", "", "", "author"], ["p", "", "", "editor"] ], - ... + // other fields... } ``` diff --git a/89.md b/89.md index 54aa30bc..24aa3c57 100644 --- a/89.md +++ b/89.md @@ -27,7 +27,7 @@ There are three actors to this workflow: ## Events ### Recommendation event -```json +```jsonc { "kind": 31989, "pubkey": , @@ -35,7 +35,8 @@ There are three actors to this workflow: ["d", ], ["a", "31990:app1-pubkey:", "wss://relay1", "ios"], ["a", "31990:app2-pubkey:", "wss://relay2", "web"] - ] + ], + // other fields... } ``` @@ -47,7 +48,7 @@ The second value of the tag SHOULD be a relay hint. The third value of the tag SHOULD be the platform where this recommendation might apply. ## Handler information -```json +```jsonc { "kind": 31990, "pubkey": "", @@ -59,7 +60,8 @@ The third value of the tag SHOULD be the platform where this recommendation migh ["web", "https://..../p/", "nprofile"], ["web", "https://..../e/"], ["ios", ".../"] - ] + ], + // other fields... } ``` @@ -77,13 +79,13 @@ A tag without a second value in the array SHOULD be considered a generic handler # Client tag When publishing events, clients MAY include a `client` tag. Identifying the client that published the note. This tag is a tuple of `name`, `address` identifying a handler event and, a relay `hint` for finding the handler event. This has privacy implications for users, so clients SHOULD allow users to opt-out of using this tag. -```json +```jsonc { "kind": 1, "tags": [ ["client", "My Client", "31990:app1-pubkey:", "wss://relay1"] ] - ... + // other fields... } ``` @@ -99,14 +101,14 @@ The client MIGHT query for the user's and the user's follows handler. ### User A recommends a `kind:31337`-handler User A might be a user of Zapstr, a `kind:31337`-centric client (tracks). Using Zapstr, user A publishes an event recommending Zapstr as a `kind:31337`-handler. -```json +```jsonc { "kind": 31989, "tags": [ ["d", "31337"], ["a", "31990:1743058db7078661b94aaf4286429d97ee5257d14a86d6bfa54cb0482b876fb0:abcd", , "web"] ], - ... + // other fields... } ``` @@ -115,7 +117,7 @@ User B might see in their timeline an event referring to a `kind:31337` event (e User B's client, not knowing how to handle a `kind:31337` might display the event using its `alt` tag (as described in NIP-31). When the user clicks on the event, the application queries for a handler for this `kind`: -```json +``` ["REQ", , { "kinds": [31989], "#d": ["31337"], "authors": [, ] }] ``` @@ -126,6 +128,6 @@ User B's client sees the application's `kind:31990` which includes the informati ### Alternative query bypassing `kind:31989` Alternatively, users might choose to query directly for `kind:31990` for an event kind. Clients SHOULD be careful doing this and use spam-prevention mechanisms or querying high-quality restricted relays to avoid directing users to malicious handlers. -```json +``` ["REQ", , { "kinds": [31990], "#k": [], "authors": [...] }] ``` diff --git a/90.md b/90.md index 5a15ebb6..696ebd59 100644 --- a/90.md +++ b/90.md @@ -36,7 +36,7 @@ There are two actors in the workflow described in this NIP: ## Job request (`kind:5000-5999`) A request to process data, published by a customer. This event signals that a customer is interested in receiving the result of some kind of compute. -```json +```jsonc { "kind": 5xxx, // kind in 5000-5999 range "content": "", @@ -46,7 +46,8 @@ A request to process data, published by a customer. This event signals that a cu [ "relays", "wss://..." ], [ "bid", "" ], [ "t", "bitcoin" ] - ] + ], + // other fields... } ``` @@ -81,19 +82,18 @@ If the user wants to keep the input parameters a secret, they can encrypt the `i ["param", "top-p", "0.7"], ["param", "frequency_penalty", "1"] ] - ``` This param data will be encrypted and added to the `content` field and `p` tag should be present -```json +```jsonc { "content": "BE2Y4xvS6HIY7TozIgbEl3sAHkdZoXyLRRkZv4fLPh3R7LtviLKAJM5qpkC7D6VtMbgIt4iNcMpLtpo...", "tags": [ ["p", "04f74530a6ede6b24731b976b8e78fb449ea61f40ff10e3d869a3030c4edc91f"], ["encrypted"] ], - ... + // other fields... } ``` @@ -102,7 +102,7 @@ This param data will be encrypted and added to the `content` field and `p` tag s Service providers publish job results, providing the output of the job result. They should tag the original job request event id as well as the customer's pubkey. -```json +```jsonc { "pubkey": "", "content": "", @@ -114,7 +114,7 @@ Service providers publish job results, providing the output of the job result. T ["p", ""], ["amount", "requested-payment-amount", ""] ], - ... + // other fields... } ``` @@ -127,7 +127,7 @@ Service providers publish job results, providing the output of the job result. T If the request has encrypted params, then output should be encrypted and placed in `content` field. If the output is encrypted, then avoid including `i` tag with input-data as clear text. Add a tag encrypted to mark the output content as `encrypted` -```json +```jsonc { "pubkey": "", "content": "", @@ -139,7 +139,7 @@ Add a tag encrypted to mark the output content as `encrypted` ["amount", "requested-payment-amount", ""], ["encrypted"] ], - ... + // other fields... } ``` @@ -147,7 +147,7 @@ Add a tag encrypted to mark the output content as `encrypted` Service providers can give feedback about a job back to the customer. -```json +```jsonc { "kind": 7000, "content": "", @@ -157,7 +157,7 @@ Service providers can give feedback about a job back to the customer. ["e", "", ""], ["p", ""], ], - ... + // other fields... } ``` @@ -211,7 +211,7 @@ This gives a higher level of flexibility to service providers (which sophisticat # Appendix 2: Service provider discoverability Service Providers MAY use NIP-89 announcements to advertise their support for job kinds: -```js +```jsonc { "kind": 31990, "pubkey": "", @@ -223,7 +223,7 @@ Service Providers MAY use NIP-89 announcements to advertise their support for jo ["k", "5005"], // e.g. translation ["t", "bitcoin"] // e.g. optionally advertises it specializes in bitcoin audio transcription that won't confuse "Drivechains" with "Ridechains" ], - ... + // other fields... } ``` diff --git a/94.md b/94.md index e35dfa1c..a057cb2d 100644 --- a/94.md +++ b/94.md @@ -27,7 +27,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr * `alt` (optional) description for accessibility * `fallback` (optional) zero or more fallback file sources in case `url` fails -```json +```jsonc { "kind": 1063, "tags": [ @@ -46,7 +46,7 @@ This NIP specifies the use of the `1063` event type, having in `content` a descr ["alt", ] ], "content": "", - ... + // other fields... } ``` diff --git a/96.md b/96.md index fab0c1a8..75d7f1f9 100644 --- a/96.md +++ b/96.md @@ -19,7 +19,7 @@ will not have to learn anything about nostr relays. File storage servers wishing to be accessible by nostr users should opt-in by making available an https route at `/.well-known/nostr/nip96.json` with `api_url`: -```js +```jsonc { // Required // File upload and deletion are served from this url @@ -59,7 +59,7 @@ File storage servers wishing to be accessible by nostr users should opt-in by ma "file_expiration": [14, 90], "media_transformations": { "image": [ - 'resizing' + "resizing" ] } } @@ -127,14 +127,14 @@ The `server` MUST link the user's `pubkey` string as the owner of the file so to The upload response is a json object as follows: -```js +```jsonc { // "success" if successful or "error" if not - status: "success", + "status": "success", // Free text success, failure or info message - message: "Upload successful.", + "message": "Upload successful.", // Optional. See "Delayed Processing" section - processing_url: "...", + "processing_url": "...", // This uses the NIP-94 event format but DO NOT need // to fill some fields like "id", "pubkey", "created_at" and "sig" // @@ -143,9 +143,9 @@ The upload response is a json object as follows: // and, optionally, all file metadata the server wants to make available // // nip94_event field is absent if unsuccessful upload - nip94_event: { + "nip94_event2":{ // Required tags: "url" and "ox" - tags: [ + "tags": [ // Can be same from /.well-known/nostr/nip96.json's "download_url" field // (or "api_url" field if "download_url" is absent or empty) with appended // original file hash. @@ -171,7 +171,7 @@ The upload response is a json object as follows: ["dim", "800x600"] // ... other optional NIP-94 tags ], - content: "" + "content": "" }, // ... other custom fields (please consider adding them to this NIP or to NIP-94 tags) } @@ -202,12 +202,12 @@ the file processing is done. If the processing isn't done, the server should reply at the `processing_url` url with **200 OK** and the following JSON: -``` +```jsonc { // It should be "processing". If "error" it would mean the processing failed. - status: "processing", - message: "Processing. Please check again later for updated status.", - percentage: 15 // Processing percentage. An integer between 0 and 100. + "status": "processing", + "message": "Processing. Please check again later for updated status.", + "percentage": 15 // Processing percentage. An integer between 0 and 100. } ``` @@ -270,10 +270,10 @@ in the same file hash). The successful response is a 200 OK one with just basic JSON fields: -``` +```json { - status: "success", - message: "File deleted." + "status": "success", + "message": "File deleted." } ``` @@ -287,7 +287,7 @@ Returns a list of files linked to the authenticated users pubkey. Example Response: -```js +```jsonc { "count": 1, // server page size, eg. max(1, min(server_max_page_size, arg_count)) "total": 1, // total number of files @@ -295,17 +295,16 @@ Example Response: "files": [ { "tags": [ - ["ox": "719171db19525d9d08dd69cb716a18158a249b7b3b3ec4bbdec5698dca104b7b"], - ["x": "5d2899290e0e69bcd809949ee516a4a1597205390878f780c098707a7f18e3df"], + ["ox", "719171db19525d9d08dd69cb716a18158a249b7b3b3ec4bbdec5698dca104b7b"], + ["x", "5d2899290e0e69bcd809949ee516a4a1597205390878f780c098707a7f18e3df"], ["size", "123456"], ["alt", "a meme that makes you laugh"], ["expiration", "1715691139"], // ...other metadata - ] + ], "content": "haha funny meme", // caption "created_at": 1715691130 // upload timestamp - }, - ... + } ] } ``` @@ -324,14 +323,14 @@ Note: HTTP File Storage Server developers may skip this section. This is meant f A File Server Preference event is a kind 10096 replaceable event meant to select one or more servers the user wants to upload files to. Servers are listed as `server` tags: -```js -{ - // ... +```json +{. "kind": 10096, "content": "", "tags": [ ["server", "https://file.server.one"], ["server", "https://file.server.two"] - ] + ], + // other fields... } ``` diff --git a/99.md b/99.md index b1b7ce9b..e2ffc3b8 100644 --- a/99.md +++ b/99.md @@ -54,7 +54,7 @@ Other standard tags that might be useful. ## Example Event -```json +```jsonc { "kind": 30402, "created_at": 1675642635, From c8dc1eadffe0ff894ec39e291c5b28bb18e6db9e Mon Sep 17 00:00:00 2001 From: K Date: Tue, 3 Sep 2024 23:47:11 +0330 Subject: [PATCH 11/17] Update 96.md --- 96.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/96.md b/96.md index 75d7f1f9..4e9ce166 100644 --- a/96.md +++ b/96.md @@ -143,7 +143,7 @@ The upload response is a json object as follows: // and, optionally, all file metadata the server wants to make available // // nip94_event field is absent if unsuccessful upload - "nip94_event2":{ + "nip94_event2": { // Required tags: "url" and "ox" "tags": [ // Can be same from /.well-known/nostr/nip96.json's "download_url" field @@ -166,7 +166,7 @@ The upload response is a json object as follows: // The server can but does not need to store this value. ["x", "543244319525d9d08dd69cb716a18158a249b7b3b3ec4bbde5435543acb34443"], // Optional. Recommended for helping clients to easily know file type before downloading it. - ["m", "image/png"] + ["m", "image/png"], // Optional. Recommended for helping clients to reserve an adequate UI space to show the file before downloading it. ["dim", "800x600"] // ... other optional NIP-94 tags From 7edd3d23a953494bcce5def703a0d7a02a5ffa9c Mon Sep 17 00:00:00 2001 From: Asai Toshiya Date: Tue, 10 Sep 2024 00:32:25 +0900 Subject: [PATCH 12/17] README: update kinds table --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ebd9d22..b22f1a38 100644 --- a/README.md +++ b/README.md @@ -142,8 +142,8 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `7000` | Job Feedback | [90](90.md) | | `9000`-`9030` | Group Control Events | [29](29.md) | | `9041` | Zap Goal | [75](75.md) | -| `9734` | Zap Request | [57](57.md) | | `9467` | Tidal login | [Tidal-nostr] | +| `9734` | Zap Request | [57](57.md) | | `9735` | Zap | [57](57.md) | | `9802` | Highlights | [84](84.md) | | `10000` | Mute list | [51](51.md) | @@ -174,6 +174,7 @@ They exist to document what may be implemented by [Nostr](https://github.com/nos | `30003` | Bookmark sets | [51](51.md) | | `30004` | Curation sets | [51](51.md) | | `30005` | Video sets | [51](51.md) | +| `30007` | Kind mute sets | [51](51.md) | | `30008` | Profile Badges | [58](58.md) | | `30009` | Badge Definition | [58](58.md) | | `30015` | Interest sets | [51](51.md) | From e7eb776288b424e8cd43080b33b21506942f91e0 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Mon, 9 Sep 2024 12:38:51 -0700 Subject: [PATCH 13/17] Revert example code update --- 13.md | 45 +++++++++++++++++++-------------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/13.md b/13.md index 0900d2d7..cf5b1acd 100644 --- a/13.md +++ b/13.md @@ -48,37 +48,30 @@ Validating Here is some reference C code for calculating the difficulty (aka number of leading zero bits) in a nostr event id: ```c -#include -#include -#include +int zero_bits(unsigned char b) +{ + int n = 0; -int countLeadingZeroes(const char *hex) { - int count = 0; + if (b == 0) + return 8; - for (int i = 0; i < strlen(hex); i++) { - int nibble = (int)strtol((char[]){hex[i], '\0'}, NULL, 16); - if (nibble == 0) { - count += 4; - } else { - count += __builtin_clz(nibble) - 28; - break; - } - } + while (b >>= 1) + n++; - return count; + return 7-n; } -int main(int argc, char *argv[]) { - if (argc != 2) { - fprintf(stderr, "Usage: %s \n", argv[0]); - return 1; - } - - const char *hex_string = argv[1]; - int result = countLeadingZeroes(hex_string); - printf("Leading zeroes in hex string %s: %d\n", hex_string, result); - - return 0; +/* find the number of leading zero bits in a hash */ +int count_leading_zero_bits(unsigned char *hash) +{ + int bits, total, i; + for (i = 0, total = 0; i < 32; i++) { + bits = zero_bits(hash[i]); + total += bits; + if (bits != 8) + break; + } + return total; } ``` From c343175a32f492cd1a40749fdd7c523c083bdb19 Mon Sep 17 00:00:00 2001 From: Zig Blathazar <42387185+ZigBalthazar@users.noreply.github.com> Date: Tue, 10 Sep 2024 23:37:36 +0330 Subject: [PATCH 14/17] Update 10.md --- 10.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10.md b/10.md index 67b01f27..94db4fae 100644 --- a/10.md +++ b/10.md @@ -43,7 +43,7 @@ They are citing from this event. `root-id` and `reply-id` are as above. Where: * `` is the id of the event being referenced. - * `` is the URL of a recommended relay associated with the reference. Clients SHOULD add a valid `` field, but may instead leave it as `""`. + * `` is the URL of a recommended relay associated with the reference. Clients SHOULD add a valid `` field, but may instead leave it as `""`. * `` is optional and if present is one of `"reply"`, `"root"`, or `"mention"`. * `` is optional, SHOULD be the pubkey of the author of the referenced event From d8ab9849b36f741ced25e40e9639c72b8062a38e Mon Sep 17 00:00:00 2001 From: kehiy Date: Wed, 11 Sep 2024 13:17:16 +0330 Subject: [PATCH 15/17] make *.md linguist detectable. --- .gitattributes | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..a252d3d7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.md linguist-detectable From 37a02e817b4b3e3ee7599fb1d28d97db133ef05c Mon Sep 17 00:00:00 2001 From: Zig Blathazar <42387185+ZigBalthazar@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:45:47 +0330 Subject: [PATCH 16/17] custom emojis in reactions (#1492) --- 30.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/30.md b/30.md index c2f8bb07..54a8b375 100644 --- a/30.md +++ b/30.md @@ -54,3 +54,19 @@ In kind 1 events, the `content` should be emojified. "created_at": 1682630000 } ``` + +### Kind 7 events + +In kind 7 events, the `content` should be emojified. + +```json +{ + "kind": 7, + "content": ":dezh:", + "tags": [ + ["emoji", "dezh", "https://raw.githubusercontent.com/dezh-tech/brand-assets/main/dezh/logo/black-normal.svg"] + ], + "pubkey": "79c2cae114ea28a981e7559b4fe7854a473521a8d22a66bbab9fa248eb820ff6", + "created_at": 1682630000 +} +``` From efcc86950dd32721e00f868b480a74e9dbd9ca1b Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Fri, 13 Sep 2024 16:17:35 -0300 Subject: [PATCH 17/17] remove this annoying file. --- .gitattributes | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index a252d3d7..00000000 --- a/.gitattributes +++ /dev/null @@ -1 +0,0 @@ -*.md linguist-detectable