Paso 1 de 6
Un tema, un nombre normalizado
El tag d es el tema en una forma normal fija, así que el artículo de cualquiera sobre "Wiki Article" acaba bajo "wiki-article" y se pueden encontrar juntos.
NIP-54
BorradorEventos
Una enciclopedia abierta donde cualquiera puede escribir un artículo sobre cualquier tema. Los artículos son eventos direccionables kind 30818 en Djot, muchos autores pueden cubrir el mismo tema y los lectores eligen versiones mediante reacciones, seguidos y relays de confianza. Los forks, las solicitudes de fusión y las redirecciones también son eventos.
Edita el formulario o el JSON: ambos se mantienen sincronizados, la insignia indica si el resultado es válido y, al tocar cualquier campo, se explica qué hace.
Cómo se conectan las partes: Fork y fusión
Aún sin firmar · Solo claves de demo. Las claves secretas de estos personajes son públicas a propósito.
Selecciona cualquier campo del formulario o del JSON para ver qué hace.
Paso 1 de 6
El tag d es el tema en una forma normal fija, así que el artículo de cualquiera sobre "Wiki Article" acaba bajo "wiki-article" y se pueden encontrar juntos.
Ningún capítulo del curso cubre este NIP todavía. El editor de arriba es la forma más rápida de empezar.
El contenido de los artículos enlaza a perfiles y eventos con URIs nostr:.
Los artículos largos son parecidos pero pertenecen a un solo autor; los artículos wiki son temas compartidos.
Las reacciones aceptan solicitudes de fusión y recomiendan artículos.
Las listas de buenos autores (10101) y relays (10102) de wiki ayudan a elegir versiones.
El texto de las especificaciones se cita en inglés del repositorio nostr-protocol/nips. Nuestras explicaciones y la interfaz están traducidas. Código fuente en GitHub en el commit 0046368
This NIP defines kind:30818 (an addressable event) for descriptions (or encyclopedia entries) of particular subjects, and it's expected that multiple people will write articles about the exact same subjects, with either small variations or completely independent content.
Articles are identified by lowercase, normalized d tags.
{
"content": "A wiki is a hypertext publication collaboratively edited and managed by its own audience.",
"tags": [
["d", "wiki"],
["title", "Wiki"]
]
}
d tag normalization rules-.- SHOULD be collapsed to a single -.- SHOULD be removed.For example:
"Wiki Article" → "wiki-article""What's Up?" → "whats-up"" Hello World " → "hello-world""Article 1" → "article-1""ウィキペディア" → "ウィキペディア" (Japanese, no case change)"Ñoño" → "ñoño" (Spanish, lowercased)"Москва" → "москва" (Russian, lowercased)"日本語 Article" → "日本語-article" (mixed scripts)The content should be Djot with two special functionalities:
[Bob](nostr:npub1...).d tag normalization rules above.For example:
Bitcoin is a [cryptocurrency][] invented by [Satoshi Nakamoto][].
See also: [proof of work][] and [lightning network][Lightning Network].
[Satoshi Nakamoto]: nostr:npub1satoshi...
In the article above:
[cryptocurrency][] links to the wiki article with d tag "cryptocurrency" (no reference defined, so it becomes a wikilink)[Satoshi Nakamoto][] links to the npub (reference is defined)[proof of work][] links to the article with d tag "proof-of-work"[lightning network][Lightning Network] links to "lightning-network", displays as "lightning network"Wikilinks also work with non-Latin scripts following the same normalization rules:
[ビットコイン][] → links to article with d tag "ビットコイン"[Japanese Article][日本語 記事] → links to "日本語-記事", displays as "Japanese Article"[Биткойн][] → links to article with d tag "биткойн" (Cyrillic, lowercased)NIP-21 nostr: links can also be used to link to profiles or arbitrary Nostr events. It is not recommended to link to specific versions of articles — the wikilink syntax should be preferred instead, since it should be left to the reader and their client to decide what version of any given article they want to read.
title: for when the display title should be different from the d tag.summary: for display in lists.a and e: for referencing the original event a wiki article was forked from.Event kind:818 represents a request to merge from a forked article into the source. It is directed to a pubkey and references the original article and the modified event.
{
"content": "I added information about the block size limit",
"kind": 818,
"tags": [
["a", "30818:<destination-pubkey>:bitcoin", "<relay-url>"],
["e", "<version-against-which-the-modification-was-made>", "<relay-url>"],
["p", "<destination-pubkey>"],
["e", "<version-to-be-merged>", "<relay-url>", "source"]
]
}
.content: an optional explanation detailing why this merge is being requested.a tag: tag of the article which should be modified (i.e. the target of this merge request).e tag: optional version of the article on which this modification is based.e tag with source marker: the ID of the event that should be merged. This event id MUST be of a kind:30818 as defined in this NIP.The destination pubkey can create NIP-25 reactions that tag the kind:818 event with + or - to accept or reject the merge request.
Event kind:30819 is also defined to stand for "wiki redirects", i.e. if one thinks "BTC" should redirect to "Bitcoin" they can issue one of these events instead of replicating the content. These events can be used for automatically redirecting between articles on a client, but also for generating crowdsourced "disambiguation" pages (common in Wikipedia).
{
"kind": 30819,
"tags": [
["d", "btc"],
["a", "30818:<pubkey>:bitcoin", "<relay-url>"]
],
"content": ""
}
As there could be many articles for each given name, some kind of prioritization must be done by clients. Criteria for this should vary between users and clients, but some means that can be used are described below:
NIP-25 reactions are very simple and can be used to create a simple web-of-trust between wiki article writers and their content. While just counting a raw number of "likes" is unproductive, reacting to any wiki article event with a + can be interpreted as a recommendation for that article specifically and a partial recommendation of the author of that article. When 2 or 3-level deep recommendations are followed, suddenly a big part of all the articles may have some form of tagging.
NIP-51 lists of relays can be created with the kind 10102 and then used by wiki clients in order to determine where to query articles first and to rank these differently in relation to other events fetched from other relays.
NIP-02 contact lists can form the basis of a recommendation system that is then expanded with relay lists and reaction lists through nested queries. These lists form a good starting point only because they are so widespread.
NIP-51 lists can also be used to create a list of users that are trusted only in the context of wiki authorship or wiki curationship.
Wiki-events can tag other wiki-events with a fork marker to specify that this event came from a different version. Both a and e tags SHOULD be used and have the fork marker applied, to identify the exact version it was forked from.
Wiki-events can tag other wiki-events with a defer marker to indicate that it considers someone else's entry as a "better" version of itself. If using a defer marker both a and e tags SHOULD be used.
This is a stronger signal of trust than a + reaction.
This marker is useful when a user edits someone else's entry; if the original author includes the editor's changes and the editor doesn't want to keep/maintain an independent version, the defer tag could effectively be considered a "deletion" of the editor's version and putting that pubkey's WoT weight behind the original author's version.
Djot is a markup language created by John MacFarlane (author of Pandoc and co-author of CommonMark). It was chosen for the following reasons: