Wikifreedia
All versions

NKBIP-01

Source

This NKBIP defines the minimum specification required for a nostr knowledge base (NKB). A reference for event creation can be found here ## Why modular articles?

semantic closure: Composable objects that are able to generate self contained meaning given the knowledge they draw from. When citing an idea, the standard practice is to cite the full text, but this practice fails for longer texts.

Search and Navigation: An article may have multiple concepts contained, but they may not be apparant through just the title or summary/abstract. Multiple articles may also contain an explaination of a single concept and individuals may need to read multiple takes on a single concept to understand it.

Remixability: Instead of writing a unique introduction, take an existing article fragment and use it as a section in your own article.

Organic Structure: A project can encompass many ideas to describe and build. If you want to teach machine learning you may want to pull in concepts from linear algebra, probability, numerical libraries for matrix algebra to fully explain what you are doing and detail the various aspects of your project. An anatomy textbook can link concepts together not only linearly but by anatomical relation. Not only can articles be read linearly but they themselves can be their own subnetwork of hyperlinks to related concepts at various levels of organization.

Kinds The most basic article can be constructed through two kinds with an analog to the standard kind 0 and kind 1 defined in NIP-01 and influence taken from NIP-23 and NIP-51: 

  • 30040: Article Header: the content is set to a stringified JSON object {title:<article title>, author:<string>, ...} which describes the main title of the article and the name of the author of this article is. The author may be the “petname” of the original pubkey posting, or if remixing another existing article that exists somewhere, the original author of the content. Additionally, kind:30040 is REQUIRED to have events listed in tags in the order* that they appear in the article. The events may be any existing note on nostr (including nested kind 30040s).
{
 "id": ...,
 "pubkey":...,
 "created_at": <unix timestamp in seconds>,
 "kind": 30040,
 "tags": [
   ['e', <event0-id>, <relay-url>],
   ['e', <event1-id>, <relay-url>],
   ['e', <event2-id>, <relay-url>],
    ...
  ],
  ...
 ],
 "content": `{'title':<article-title>, 'author':<string>, ...}`,
}
  • 30041: Article Note: MUST contain a title tag denoting the title of article section (“Introduction”, “References”, “1.0”, etc). The content section MAY be Markdown syntax or plaintext. Being parametric replaceable events, they may also have a tag of published at to denote their original publications. Relays operators have the option to keep previous versions.

 "kind": 30041,
 "created_at": ...,
 "content": "The simplest open protocol that is able to create a censorship-resistant global "social" network once and for all.\n\nIt doesn't rely on any trusted central server, hence it is resilient; it is based on cryptographic keys and signatures, so it is tamperproof; it does not rely on P2P techniques, and therefore it works."
 "tags": [
  ["title": "nostr - Notes and Other Stuff Transmitted by Relays"],
  ["published_at", ...],
 ],
 "pubkey": "...",
 "id": "..."