-
Notifications
You must be signed in to change notification settings - Fork 586
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
NIP-62: Curated Publications #1600
base: master
Are you sure you want to change the base?
Changes from all commits
4ae7501
4c5b62f
9662559
855b39d
4c60810
9c19137
2111dd0
1c393c9
a359589
0f64626
190a860
c96a0b1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
NIP-62 | ||
====== | ||
|
||
Curated Publication | ||
---------- | ||
|
||
`draft` `optional` | ||
|
||
This NIP defines the minimum specification for curated publication - ordered, optionally-hierarchical assemblies of nostr events. Collections provide a standard way to organize and present related content, similar to how books organize chapters or journals organize articles. | ||
|
||
## Event Kinds | ||
|
||
This NIP defines two primary event kinds: | ||
|
||
- `30040`: Publication Index | ||
- `30041`: Publication Content | ||
|
||
## kind 30040: Publication Index | ||
|
||
A publication index defines the structure and metadata of a collection. It serves as a table of contents that references the actual content sections. | ||
|
||
### Requirements | ||
|
||
- The `content` field MUST be empty | ||
- MUST include a `title` tag containing the full title of the collection | ||
- MUST be uniquely identifiable by the combination of: | ||
- `d` tag | ||
- `pubkey` | ||
- `kind` | ||
- MUST include `a` tags listing the events in desired display order. | ||
- Format: `["a", "<kind:pubkey:dtag>", "<relay hint>", "<event id>"]` | ||
- Optional event ID field enables version tracking while maintaining updateable references | ||
- Referenced events SHOULD be kind 30041 sections or nested kind 30040 indices | ||
- Additional event kinds MAY be supported | ||
- MUST include an `auto-update` tag specifying update behavior: | ||
- Format: `["auto-update", "<yes|ask|no>"]` | ||
- Controls whether clients should automatically update to newer versions | ||
- For derivative works: | ||
- MUST include a `p` tag identifying the original author | ||
- MUST include an `E` tag referencing the original event immediately after the `p` tag | ||
|
||
### Example Index | ||
|
||
```json | ||
{ | ||
"id": "<event_id>", | ||
"pubkey": "<event_originator_pubkey>", | ||
"created_at": 1725087283, | ||
"kind": 30040, | ||
"tags": [ | ||
["d", "aesop's-fables-by-aesop"], | ||
["title", "Aesop's Fables"], | ||
["author", "Aesop"], | ||
["i", "isbn:9780765382030"], | ||
["t", "fables"], | ||
["t", "classical"], | ||
["t", "literature"], | ||
["published_on", "2003-05-13"], | ||
["published_by", "public domain"], | ||
["image", "https://imageserver.com/piclink.jpg"], | ||
["summary", "Collection of selected fables from the ancient Greek philosopher, known as Aesop."], | ||
["a", "<kind:pubkey:dtag>", "<relay hint>", "<event id>"], | ||
["a", "<kind:pubkey:dtag>", "<relay hint>", "<event id>"], | ||
["auto-update", "<yes|ask|no>"], | ||
["p", "<pubkey_0>"], | ||
["A", "<original_event_id>", "<relay_url>", "<pubkey>"] | ||
], | ||
"sig": "<event_signature>" | ||
} | ||
``` | ||
|
||
## 30041: Publication Content | ||
|
||
Also known as sections, zettels, episodes, or chapters contain the actual content that makes up a collection. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should be "that makes up a publication." |
||
|
||
### Requirements | ||
|
||
- MUST include a `d` tag | ||
- MUST include a `title` tag describing the section (e.g., "Introduction", "Chapter 1", etc.) | ||
- The `content` field: | ||
- MUST contain text meant for display to the end user | ||
- MAY contain AsciiDoc markup | ||
- MAY contain wikilinks (denoted by double brackets) | ||
|
||
### Example Section | ||
|
||
```json | ||
{ | ||
"id": "<event_id>", | ||
"pubkey": "8ae74c618a4713f32129...", | ||
"created_at": 1708083476, | ||
"kind": 30041, | ||
"tags": [ | ||
["title", "The Farmer and The Snake"], | ||
["d", "aesop's-fables-by-aesop-the-farmer-and-the-snake"], | ||
["wikilink", "fable", "<pubkey>", "wss://thecitadel.nostr1.com", "<event id>"] | ||
], | ||
"content": "== The Farmer and The Snake\nA [[fable]], by Aesop.\nONE WINTER a Farmer found a Snake stiff and frozen with cold. He had compassion on it, and taking it up, placed it in his bosom. The Snake was quickly revived by the warmth, and resuming its natural instincts, bit its benefactor, inflicting on him a mortal wound. 'Oh,' cried the Farmer with his last breath, 'I am rightly served for pitying a scoundrel.'\nThe greatest kindness will not bind the ungrateful.", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wikilinks in NIP-54 does not have a tag for reference and is different from this, is this intentional? How about using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can use nostr: links in any text; that's just a rendering issue. This is a wikilink from a note that isn't a wiki page, where the specific version might need to be specified and where the client doesn't necessarily handle wikis. We should maybe use something like the new a-tag, instead of an eventID. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The wikilink specification here intentionally diverges from NIP-54. I agree we could use a parameterized replaceable event reference like with One of the goals with wikilinks, in terms of client implementation, is that they always "just work." Even if, for one reason or another, the specific referenced event can't be found, a client might tie the wikilink to a search feature to find related events by keyword. That's just one possibility, but that's why we're both diverging from NIP-54 somewhat, and not just using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok I see. Thanks for explaining. |
||
"sig": "49cab8c75fb35cec71d07258..." | ||
} | ||
``` | ||
|
||
## Extensions | ||
|
||
Collections are flexible and can be extended for different types of content. Examples include: | ||
|
||
- Books | ||
- Academic journals | ||
- Course materials | ||
- Documentation | ||
|
||
Additional tags relevant to the specific content type MAY be included in both index and section events. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typos: