Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiny notes (210 max chars) #1710

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions B1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
NIP-B1
======

Tiny Notes
----------

`draft` `optional`

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 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.

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=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 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 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 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 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.