upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--19.md11
-rw-r--r--23.md75
-rw-r--r--README.md1
3 files changed, 84 insertions, 3 deletions
diff --git a/19.md b/19.md
index e63ca00..f3dd2b8 100644
--- a/19.md
+++ b/19.md
@@ -35,6 +35,7 @@ These are the possible bech32 prefixes with `TLV`:
35 - `nprofile`: a nostr profile 35 - `nprofile`: a nostr profile
36 - `nevent`: a nostr event 36 - `nevent`: a nostr event
37 - `nrelay`: a nostr relay 37 - `nrelay`: a nostr relay
38 - `nref`: a nostr parameterized replaceable event coordinate (NIP-33)
38 39
39These possible standardized `TLV` types are indicated here: 40These possible standardized `TLV` types are indicated here:
40 41
@@ -42,11 +43,15 @@ These possible standardized `TLV` types are indicated here:
42 - depends on the bech32 prefix: 43 - depends on the bech32 prefix:
43 - for `nprofile` it will be the 32 bytes of the profile public key 44 - for `nprofile` it will be the 32 bytes of the profile public key
44 - for `nevent` it will be the 32 bytes of the event id 45 - for `nevent` it will be the 32 bytes of the event id
45 - for `nrelay`, this is the relay URL. 46 - for `nrelay`, this is the relay URL
47 - for `nref`, it is the identifier (the `"d"` tag) of the event being referenced
46 - for `nprofile`, `nevent` and `nrelay` this may be included only once. 48 - for `nprofile`, `nevent` and `nrelay` this may be included only once.
47- `1`: `relay` 49- `1`: `relay`
48 - A relay in which the entity (profile or event) is more likely to be found, encoded as UTF-8. This may be included multiple times. 50 - for `nprofile`, `nevent` and `nref`, a relay in which the entity (profile or event) is more likely to be found, encoded as UTF-8. This may be included multiple times
49 - not applicable to `nrelay`. 51- `2`: `author`
52 - for `nref`, the 32 bytes of the pubkey of the event
53
54
50## Examples 55## Examples
51 56
52- `npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6` should decode into the public key hex `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d` and vice-versa 57- `npub180cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwsyjh6w6` should decode into the public key hex `3bf0c63fcb93463407af97a5e5ee64fa883d107ef9e558472c4eb9aaaefa459d` and vice-versa
diff --git a/23.md b/23.md
new file mode 100644
index 0000000..b8b8698
--- /dev/null
+++ b/23.md
@@ -0,0 +1,75 @@
1NIP-23
2======
3
4Long-form Content
5-----------------
6
7`draft` `optional` `author:fiatjaf`
8
9This NIP defines `kind:30023` (a parameterized replaceable event according to NIP-33) for long-form text content, generally referred to as "articles" or "blog posts".
10
11"Social" clients that deal primarily with `kind:1` notes should not be expected to implement this NIP.
12
13### Format
14
15The `.content` of these events should be a string text in Markdown syntax, including YAML front-matter for other metadata that may be necessary.
16
17### Metadata
18
19This NIP defines only `title` as the metadata. For the date of publication the event `.created_at` field should be used, and for "tags"/"hashtags" (i.e. topics about which the event might be of relevance) the `"t"` event tag should be used, as in NIP-12.
20
21### Editability
22
23These articles are meant to be editable, so they should make use of the replaceability feature of NIP-33 and include a `"d"` tag with an identifier for the article. Clients should take care to only publish and read these events from relays that implement that. If they don't do that they should also take care to hide old versions of the same article they may receive.
24
25### Linking
26
27The article may be linked to using the NIP-19 `nref` code, which should contain both the public key of the author and the article identifier (the `"d"` tag) and some relays. With that information it is possible to locate the article.
28
29### References
30
31Writing clients should implement support for parsing pasted NIP-19 `nref` identifiers and adding them automatically to the list of `.tags` of the event, replacing the actual content with a string like `#[tag_index]` in the same way as NIP-08 -- or, if the reference is in the form of a URL (for example, `[click here](nref...)`) then they should be replaced with just the tag number directly (for example, `[click here][0]`).
32
33Reader clients should parse the Markdown and replace these references with either internal links so the referenced events can be accessed directly, with NIP-21 `nostr:` links or direct links to web clients that will handle these references.
34
35The idea here is that having these tags is that reader clients can display a list of backreferences at the bottom when one article mentions another.
36
37### `kind:1` interface
38
39In case there is the desire for users or clients to share the written article on their "social" clients, a `kind:1` event must be used.
40
41Since "social" clients aren't expected to understand this NIP, these notes should contain a URL like `nostr:nref1...` specifying the `nref1` code for the article, such that it can be rendered clickable and other users can use a different client than their "social" to read the article -- and also if their client handles both kinds of posts, their client may recognize the URL and handle it internally.
42
43For clients that want to implement the ability for users to comment on these articles. `kind:1` notes should be used as the comments. They must be made in reply to another `kind:1` as above, such that other people on "social" clients can see the comments and get the context from the note above and load the article being commented on if they so desire.
44
45## Example of an event
46
47Article text:
48
49```markdown
50title: Lorem Ipsum
51---
52
53Lorem [ipsum][4] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
54
55Read more at #[3].
56```
57
58Derived event:
59
60```json
61{
62 "kind": 30023,
63 "created_at": 1000000000,
64 "title": "Lorem Ipsum\\n---\\n\\nLorem [ipsum][4] dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.\n\nRead more at #[3].",
65 "tags": [
66 ["d", "lorem-ipsum"],
67 ["t", "lorem"],
68 ["t", "ipsum"],
69 ["e", "b3e392b11f5d4f28321cedd09303a748acfd0487aea5a7450b3481c60b6e4f87", "wss://relay.example.com"],
70 ["e", "a695f6b60119d9521934a691347d9f78e8770b56da16bb255ee286ddf9fda919", "wss://relay.nostr.org"]
71 ],
72 "pubkey": "...",
73 "id": "..."
74}
75```
diff --git a/README.md b/README.md
index 829e61b..0115e68 100644
--- a/README.md
+++ b/README.md
@@ -41,6 +41,7 @@ NIPs stand for **Nostr Implementation Possibilities**. They exist to document wh
41| 3 | Contacts | [2](02.md) | 41| 3 | Contacts | [2](02.md) |
42| 4 | Encrypted Direct Messages | [4](04.md) | 42| 4 | Encrypted Direct Messages | [4](04.md) |
43| 5 | Event Deletion | [9](09.md) | 43| 5 | Event Deletion | [9](09.md) |
44| 30023 | Long-form Content | [23](23.md) |
44| 7 | Reaction | [25](25.md) | 45| 7 | Reaction | [25](25.md) |
45| 40 | Channel Creation | [28](28.md) | 46| 40 | Channel Creation | [28](28.md) |
46| 41 | Channel Metadata | [28](28.md) | 47| 41 | Channel Metadata | [28](28.md) |