From 34eeb360239f87d248ccb8d3db5be342503891b9 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 21 Jan 2025 11:03:06 -0500 Subject: [PATCH 1/7] Tiny notes --- B1.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 B1.md diff --git a/B1.md b/B1.md new file mode 100644 index 00000000..d2011350 --- /dev/null +++ b/B1.md @@ -0,0 +1,35 @@ +NIP-B1 +====== + +Tiny Notes +---------- + +`draft` `optional` + +This NIP defines `kind:25` as a simple plaintext note that is limited to 140 visible characters. + +The `.content` property contains some human-readable text. + +Clients MUST force the `.content` to be less than 140 characters and crop all incoming events to the same amount. + +Markup languages such as markdown MUST NOT be used. + +Replies to `kind:25` MUST use [NIP-22](22.md) comments while applying the same content rules as defined here. + +Reactions MUST use [NIP-25](25.md) with a `k` tag to `25`. Clients MUST only download and display reactions that include the `k` tag in notifications. + +Zap Events MUST also include the `k` tag of the source event. Clients MUST only render zaps that include the `k` tag in notifications. + +## Cached Information + +Tiny notes strongly rely on in-event caches to speed up the rendering process and calculate the 140 char limit. + +User citations MUST use [https://github.com/nostr-protocol/nips/blob/master/19.md](NIP-19) `nostr:nprofile` urls with a `4`th TLV type including the current name of the user. The user's display name MUST be used to match the 140 limit. `p` tags SHOULD only be added if the logged in user wants to notify the tagged user. + +Quoted notes that are `kind:25` MUST use [https://github.com/nostr-protocol/nips/blob/master/19.md](NIP-19) `nostr:nevent` or `nostr:naddr` with a `4`th TLV type including the quoted text. The quoted text MUST be used to match the 140 limit. The `q` tag MUST be used. + +Quoted notes that are not `kind:25` MUST not be previewed or rendered by the client. Instead, the Client must render the quoted text from the TLV as a link. The link should open a separate app that can render those events using [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md). The `q` tag MUST be used. + +Links to images MUST include [NIP-92](92.md) imeta tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x`. + +Links to websites MUST include [PR1674](https://github.com/nostr-protocol/nips/pull/1674) open graph tags. \ No newline at end of file From 8e63436f3bf36bfe70f5b2548b6b789b5ae48aba Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 21 Jan 2025 11:10:14 -0500 Subject: [PATCH 2/7] Update B1.md --- B1.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/B1.md b/B1.md index d2011350..a0811e61 100644 --- a/B1.md +++ b/B1.md @@ -6,11 +6,11 @@ Tiny Notes `draft` `optional` -This NIP defines `kind:25` as a simple plaintext note that is limited to 140 visible characters. +This NIP defines `kind:25` as a simple plaintext note that is limited to 140 **visible** characters. The `.content` property contains some human-readable text. -Clients MUST force the `.content` to be less than 140 characters and crop all incoming events to the same amount. +Clients MUST force outgoing `.content` to be less or equal to 140 characters and crop all incoming events to the same amount. Markup languages such as markdown MUST NOT be used. @@ -22,14 +22,14 @@ Zap Events MUST also include the `k` tag of the source event. Clients MUST only ## Cached Information -Tiny notes strongly rely on in-event caches to speed up the rendering process and calculate the 140 char limit. +Tiny notes strongly rely on in-event caches to speed up the rendering process and calculate the 140-char limit. -User citations MUST use [https://github.com/nostr-protocol/nips/blob/master/19.md](NIP-19) `nostr:nprofile` urls with a `4`th TLV type including the current name of the user. The user's display name MUST be used to match the 140 limit. `p` tags SHOULD only be added if the logged in user wants to notify the tagged user. +User citations MUST use a variation of [NIP-19](NIP-19)'s `nostr:nprofile` urls with a `4`th TLV type that receives the current name of the user. The user's display name MUST be used to match the 140 limit. `p` tags SHOULD only be added if the logged-in user wants to notify the tagged user. -Quoted notes that are `kind:25` MUST use [https://github.com/nostr-protocol/nips/blob/master/19.md](NIP-19) `nostr:nevent` or `nostr:naddr` with a `4`th TLV type including the quoted text. The quoted text MUST be used to match the 140 limit. The `q` tag MUST be used. +Quoted notes that are `kind:25` MUST use [NIP-19](NIP-19)'s `nostr:nevent` or `nostr:naddr` with a `4`th TLV type including the quoted text. The quoted text MUST be used to match the 140 limit. The `q` tag MUST be added to all quoted events. Quoted notes that are not `kind:25` MUST not be previewed or rendered by the client. Instead, the Client must render the quoted text from the TLV as a link. The link should open a separate app that can render those events using [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md). The `q` tag MUST be used. -Links to images MUST include [NIP-92](92.md) imeta tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x`. +Links to images MUST include [NIP-92](92.md) `imeta` tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x` and should be previewed in full-width mode -Links to websites MUST include [PR1674](https://github.com/nostr-protocol/nips/pull/1674) open graph tags. \ No newline at end of file +Links to websites MUST include [PR1674](https://github.com/nostr-protocol/nips/pull/1674) open graph tags and should be previewed in full-width mode From e0b2dba9899847a8be06b3412521301ae609c3ff Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 21 Jan 2025 11:17:07 -0500 Subject: [PATCH 3/7] Fixes the use of naddr --- B1.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/B1.md b/B1.md index a0811e61..ac3fb7aa 100644 --- a/B1.md +++ b/B1.md @@ -26,7 +26,7 @@ Tiny notes strongly rely on in-event caches to speed up the rendering process an User citations MUST use a variation of [NIP-19](NIP-19)'s `nostr:nprofile` urls with a `4`th TLV type that receives the current name of the user. The user's display name MUST be used to match the 140 limit. `p` tags SHOULD only be added if the logged-in user wants to notify the tagged user. -Quoted notes that are `kind:25` MUST use [NIP-19](NIP-19)'s `nostr:nevent` or `nostr:naddr` with a `4`th TLV type including the quoted text. The quoted text MUST be used to match the 140 limit. The `q` tag MUST be added to all quoted events. +Quoted notes that are `kind:25` MUST use [NIP-19](NIP-19)'s `nostr:nevent` with a `4`th TLV type including the quoted text. The quoted text MUST be used to match the 140 limit. The `q` tag MUST be added to all quoted events. Quoted notes that are not `kind:25` MUST not be previewed or rendered by the client. Instead, the Client must render the quoted text from the TLV as a link. The link should open a separate app that can render those events using [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md). The `q` tag MUST be used. From 66d05c5dbed933b1bec244b2dea08dbbc2bd8863 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 21 Jan 2025 11:23:53 -0500 Subject: [PATCH 4/7] Adds what to do when imeta and og are not present. --- B1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/B1.md b/B1.md index ac3fb7aa..a542a7c0 100644 --- a/B1.md +++ b/B1.md @@ -30,6 +30,6 @@ Quoted notes that are `kind:25` MUST use [NIP-19](NIP-19)'s `nostr:nevent` with Quoted notes that are not `kind:25` MUST not be previewed or rendered by the client. Instead, the Client must render the quoted text from the TLV as a link. The link should open a separate app that can render those events using [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md). The `q` tag MUST be used. -Links to images MUST include [NIP-92](92.md) `imeta` tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x` and should be previewed in full-width mode +Links to images MUST include [NIP-92](92.md) `imeta` tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x` and should be previewed in full-width mode. If the `imeta` tags are not present, images MUST not be previewed and stay as a link. -Links to websites MUST include [PR1674](https://github.com/nostr-protocol/nips/pull/1674) open graph tags and should be previewed in full-width mode +Links to websites MUST include [PR1674](https://github.com/nostr-protocol/nips/pull/1674) open graph tags and should be previewed in full-width mode. If the open graph tags are not present, url MUST not be previewed and stay as a link. From 61ad09caaa702334d74c96b2c8581dabdf4aa90a Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 21 Jan 2025 11:34:34 -0500 Subject: [PATCH 5/7] Adds what to do when the image does not match the hash --- B1.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/B1.md b/B1.md index a542a7c0..9306667d 100644 --- a/B1.md +++ b/B1.md @@ -10,7 +10,7 @@ This NIP defines `kind:25` as a simple plaintext note that is limited to 140 **v The `.content` property contains some human-readable text. -Clients MUST force outgoing `.content` to be less or equal to 140 characters and crop all incoming events to the same amount. +Clients MUST force outgoing `.content` to be less or equal to 140 characters and crop all incoming events to the same amount. Relays MUST also not accept content with over 140 chars, considering the rules below. Markup languages such as markdown MUST NOT be used. @@ -30,6 +30,6 @@ Quoted notes that are `kind:25` MUST use [NIP-19](NIP-19)'s `nostr:nevent` with Quoted notes that are not `kind:25` MUST not be previewed or rendered by the client. Instead, the Client must render the quoted text from the TLV as a link. The link should open a separate app that can render those events using [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md). The `q` tag MUST be used. -Links to images MUST include [NIP-92](92.md) `imeta` tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x` and should be previewed in full-width mode. If the `imeta` tags are not present, images MUST not be previewed and stay as a link. +Links to images MUST include [NIP-92](92.md) `imeta` tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x` and should be previewed in full-width mode. If the `imeta` tags are not present, images MUST not be previewed and stay as a link. If the `x` hash doesn't match the file, the image should not be previewed. Links to websites MUST include [PR1674](https://github.com/nostr-protocol/nips/pull/1674) open graph tags and should be previewed in full-width mode. If the open graph tags are not present, url MUST not be previewed and stay as a link. From bb5aa3d973133a2cb98aa772cc50c377ef399f59 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Tue, 21 Jan 2025 17:38:27 -0500 Subject: [PATCH 6/7] Changing to 210 chars because Gigi thinks it is better. --- B1.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/B1.md b/B1.md index 9306667d..d0b61afb 100644 --- a/B1.md +++ b/B1.md @@ -6,11 +6,11 @@ Tiny Notes `draft` `optional` -This NIP defines `kind:25` as a simple plaintext note that is limited to 140 **visible** characters. +This NIP defines `kind:25` as a simple plaintext note that is limited to 210 **visible** characters. The `.content` property contains some human-readable text. -Clients MUST force outgoing `.content` to be less or equal to 140 characters and crop all incoming events to the same amount. Relays MUST also not accept content with over 140 chars, considering the rules below. +Clients MUST force outgoing `.content` to be less or equal to 210 characters and crop all incoming events to the same amount. Relays MUST also not accept content with over 210 chars, considering the rules below. Markup languages such as markdown MUST NOT be used. @@ -22,7 +22,7 @@ Zap Events MUST also include the `k` tag of the source event. Clients MUST only ## Cached Information -Tiny notes strongly rely on in-event caches to speed up the rendering process and calculate the 140-char limit. +Tiny notes strongly rely on in-event caches to speed up the rendering process and calculate the 210-char limit. User citations MUST use a variation of [NIP-19](NIP-19)'s `nostr:nprofile` urls with a `4`th TLV type that receives the current name of the user. The user's display name MUST be used to match the 140 limit. `p` tags SHOULD only be added if the logged-in user wants to notify the tagged user. From 9901a48a87dbfc6f4966adf03e93f9e8ce970dc2 Mon Sep 17 00:00:00 2001 From: Vitor Pamplona Date: Mon, 24 Feb 2025 18:01:26 -0500 Subject: [PATCH 7/7] Minor fixes --- B1.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/B1.md b/B1.md index d0b61afb..ca843e00 100644 --- a/B1.md +++ b/B1.md @@ -10,26 +10,28 @@ This NIP defines `kind:25` as a simple plaintext note that is limited to 210 **v The `.content` property contains some human-readable text. -Clients MUST force outgoing `.content` to be less or equal to 210 characters and crop all incoming events to the same amount. Relays MUST also not accept content with over 210 chars, considering the rules below. +Clients MUST force outgoing `.content` to be less or equal to 210 characters and crop all incoming events to the same amount. + +Relays MUST not accept `.content` with over 210 chars, considering the rules below. Markup languages such as markdown MUST NOT be used. -Replies to `kind:25` MUST use [NIP-22](22.md) comments while applying the same content rules as defined here. +Replies to `kind:25` MUST use [NIP-22](22.md) comments while applying the same `.content` rules as defined here. -Reactions MUST use [NIP-25](25.md) with a `k` tag to `25`. Clients MUST only download and display reactions that include the `k` tag in notifications. +Reactions MUST use [NIP-25](25.md) with a `k` tag to `25`. Clients MUST only download and display reactions that include the `k=25` tag for its notifications. -Zap Events MUST also include the `k` tag of the source event. Clients MUST only render zaps that include the `k` tag in notifications. +Zap Events MUST also include the `k` tag of the source event. Clients MUST only render zaps that include the `k=25` tag in notifications. ## Cached Information Tiny notes strongly rely on in-event caches to speed up the rendering process and calculate the 210-char limit. -User citations MUST use a variation of [NIP-19](NIP-19)'s `nostr:nprofile` urls with a `4`th TLV type that receives the current name of the user. The user's display name MUST be used to match the 140 limit. `p` tags SHOULD only be added if the logged-in user wants to notify the tagged user. +User citations MUST use a variation of [NIP-19](NIP-19)'s `nostr:nprofile` urls with a `4`th TLV type that receives the current display name of the user. The user's display name MUST be used to match the 210 limit. `p` tags SHOULD only be added if the logged-in user wants to notify the tagged user. -Quoted notes that are `kind:25` MUST use [NIP-19](NIP-19)'s `nostr:nevent` with a `4`th TLV type including the quoted text. The quoted text MUST be used to match the 140 limit. The `q` tag MUST be added to all quoted events. +Quoted notes that are `kind:25` MUST use [NIP-19](NIP-19)'s `nostr:nevent` with a `4`th TLV type including the quoted text. The quoted text MUST be used to match the 210 limit. The `q` tag MUST be added to all quoted events. -Quoted notes that are not `kind:25` MUST not be previewed or rendered by the client. Instead, the Client must render the quoted text from the TLV as a link. The link should open a separate app that can render those events using [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md). The `q` tag MUST be used. +Quoted notes that are not `kind:25` MUST not be previewed or rendered by the client. Instead, the Client must render the quoted text from the TLV with a link. The link should open a separate app that can render those events using [NIP-89](https://github.com/nostr-protocol/nips/blob/master/89.md). The `q` tag MUST be used. -Links to images MUST include [NIP-92](92.md) `imeta` tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x` and should be previewed in full-width mode. If the `imeta` tags are not present, images MUST not be previewed and stay as a link. If the `x` hash doesn't match the file, the image should not be previewed. +Links to images MUST include [NIP-92](92.md) `imeta` tags with required fields: `url`, `m`, `blurhash`, `dim`, and `x` and should be previewed in full-width mode. If the `imeta` tags are not present, images MUST not be previewed and stay as a link. If the `x` hash doesn't match the file hash, the image should not be previewed and stay as a link. -Links to websites MUST include [PR1674](https://github.com/nostr-protocol/nips/pull/1674) open graph tags and should be previewed in full-width mode. If the open graph tags are not present, url MUST not be previewed and stay as a link. +Links to websites MUST include [PR1674](https://github.com/nostr-protocol/nips/pull/1674) open graph tags and should be previewed in full-width mode. If the open graph tags are not present, url MUST not be previewed and stay as a link.