NKBIP-01: Curated Publications Specification
This NIP defines the minimum specification for curated publication - ordered, optionally-hierarchical assemblies of Nostr events. Publications 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 Index30041: Publication Content
KIND 30040: Publication Index
A publication index defines the structure and metadata of a publication. It serves as a table of contents that references the actual content sections.
Requirements
- The
contentfield MUST be empty - MUST include a
titletag containing the full title of the publication - MUST be uniquely identifiable by the combination of:
dtag (normalized to lowercase letters, numbers, and hyphens, analog to [[NIP-54]].pubkeykind- MUST include
atags 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, especially 30818 and 30023
- MUST include an
auto-updatetag specifying update behavior: - Format:
["auto-update", "<yes|ask|no>"] - Controls whether clients should automatically update to newer versions
- For derivative works:
- MUST include a
ptag identifying the original author - MUST include an
Etag referencing the original event immediately after theptag - MAY contain the tag “source”, which defines a URL which contains the location of the original text, and/or an
itag. - MAY contain the tag “version”, which describes the edition.
- MAY contain the tag “type” indicates how the publication should be displayed in the viewer/reader. Some suggested types are:
- book (default)
- illustrated
- magazine
- documentation
- academic
- blog
Example Index
{
"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"],
["source", "https://booksonline.org/"],
["type", "book"],
["version", "3rd edition"],
["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>"],
["E", "<original_event_id>", "<relay_url>", "<pubkey>"]
],
"sig": "<event_signature>"
}
KIND 30041: Publication Content
Also known as sections, zettels, episodes, or chapters contain the actual content that makes up a publication.
Requirements
- MUST include a
dtag - MUST include a
titletag describing the section (e.g., “Introduction”, “Chapter 1”, etc.) - The
contentfield: - MUST contain text meant for display to the end user
- MAY contain AsciiDoc markup
- MAY contain wikilinks (denoted by double brackets)
Example Section
{
"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.",
"sig": "49cab8c75fb35cec71d07258..."
}
Extensions
Publications are flexible and can be extended for different types of content. Examples include:
- Books
- Academic journals
- Course materials
- Documentation
- Blogs, including those from different npubs
Additional tags relevant to the specific content type MAY be included in both index and section events.
Bookstr Macro
The Wikistr implementation can find 30041 events using a the bookstr macro, which is a variation of the wikistr macro.
It is structured:
[ [type:book chapter:verse | version] ]
and is a form common to Bible notations. For example:
[ [bible: John 3:16 | KJV] ]