Skip to main content

Nanopublication

What a nanopublication is: its four parts, its content-based identifier, its signature, and why it never changes once published.

What a nanopublication is​

A nanopublication is the smallest unit of publishable information: a few statements that together say one thing, packaged with who made them and where they come from. It is written as RDF, so both people and software can read it, and each one has its own web address.

Anything can be the subject: a scientific claim, a definition of a term, a link between two things, an opinion, a piece of documentation like this paragraph. What matters is that each nanopublication makes one point and carries its own attribution.

Nanopublication · Open in Nanodash

The four parts​

Every nanopublication has four parts, called graphs. The assertion holds the actual content. The provenance says where that content comes from: who asserted it, what it was derived from. The publication info describes the nanopublication itself: when it was created, by whom, under which license, and its digital signature. The head is a short list that names the other three.

In the RDF this looks like:

this: a np:Nanopublication ; np:hasAssertion sub:assertion ; np:hasProvenance sub:provenance ; np:hasPublicationInfo sub:pubinfo .

Nanopublication · Open in Nanodash

The assertion​

The assertion is the content, and it can be any RDF. Most nanopublications keep it small — one to a handful of statements — because a nanopublication is meant to be about one thing. If two things need saying, they are better said in two nanopublications, each of which can then be referred to, revised or retracted on its own.

Whatever a nanopublication introduces — a new term, a new resource, a new definition — is identified by a URI in the assertion, normally minted under the nanopublication's own address.

Nanopublication · Open in Nanodash

The provenance​

The provenance part says where the assertion comes from. The two most common statements are prov:wasAttributedTo, naming the person or agent who made the assertion, and prov:wasDerivedFrom, pointing to a source such as a paper, a dataset, or another nanopublication.

Provenance is about the content, not about the act of publishing: a nanopublication that copies a claim from a paper attributes the claim to the paper here, while the person who did the copying appears in the publication info as the creator.

Nanopublication · Open in Nanodash

The publication info​

The publication info describes the nanopublication as an object. It usually holds the creation time (dct:created), the creator (dct:creator), a license (dct:license), and a short label (rdfs:label) that is shown wherever the nanopublication is listed. It also records which templates were used to make it, which lets it be reopened and revised in a form later.

This is also where the digital signature lives, and where a nanopublication says what it introduces, describes, or supersedes.

Nanopublication · Open in Nanodash

The identifier​

A nanopublication's address ends in a code computed from its own content, such as RAGtlyskGNfHtX-dWRqUoSx6nPc0P0st6WII5zRpF9CUw. Such addresses are called trusty URIs. Because the code is derived from the content, the content cannot change without the address changing too, and anyone holding a copy can verify that it is the genuine one.

The code always starts with RA and is 45 characters long. The full address is usually written as https://w3id.org/np/RA…, which resolves to the nanopublication on the network and can be opened in a browser.

Nanopublication · Open in Nanodash

Signatures​

A nanopublication is signed with a private key, and the signature is stored in the publication info together with the matching public key and the identity of the signer. The signature covers the whole content, so it proves that the nanopublication was made by the holder of that key and has not been altered since.

Keys belong to people and to software agents. A person links a key to their identity by publishing an introduction nanopublication, and once the network has accepted that introduction, everything signed with the key counts as theirs. Signatures are what the network uses to decide whose word counts for what — which nanopublications a person may retract, which spaces they belong to, and so on.

Nanopublication · Open in Nanodash

Nothing can be changed afterwards​

Once published, a nanopublication cannot be edited, and it cannot be deleted from the network either. The address is tied to the content, and copies spread to several servers as soon as it is published.

Instead of editing, one publishes a new version that supersedes the old one, and instead of deleting, one publishes a retraction. Both leave the original in place but tell every tool to treat it as outdated. This is what makes a nanopublication citable: what was cited stays exactly as it was, even after its author has moved on.

Nanopublication · Open in Nanodash

Publishing​

Nanopublications are published to a network of registries. It is enough to send a nanopublication to one of them; the others pick it up from their peers within minutes. Tools such as Nanodash and the command-line client do this for you.

There is a separate test network for trying things out. Nanopublications published there do not reach the real network and are not counted by it, so it is the place for experiments and for a first attempt at something new. On the real network, publishing is final.

Nanopublication · Open in Nanodash

Finding nanopublications​

Every nanopublication can be opened directly by its address. Beyond that, the network keeps them searchable by their types, by who published them, by what they introduce, and by full text. Nanodash shows nanopublications in the context of the spaces, resources and people they belong to, and Nanopub Query offers the same data as an API for software.

A nanopublication is easier to find, and more useful once found, when it carries a good label and a type — see the publication info — and when the things it introduces have labels of their own.

Nanopublication · Open in Nanodash

Allowed identifiers​

Subjects and objects in a nanopublication may be identified by http and https URIs, and also by content-addressed ipfs and ipns identifiers and by decentralized did and at identifiers. Predicates, and the addresses of the nanopublication and its four parts, must be http or https.

Older tools accept only http and https everywhere, and some display the newer identifier kinds as plain text rather than as links.

Nanopublication · Open in Nanodash

Tools​

Nanodash is the web application for reading, creating and publishing nanopublications; it is where the forms, spaces and pages described in this documentation live. The command-line client, nanopub-java, checks, signs, publishes and retracts nanopublications from a terminal, and is also the library behind Nanodash and the registry. Libraries exist for Python and JavaScript as well.

Whichever tool is used, the result is the same kind of nanopublication, and one made with one tool can be opened and revised with another.

Nanopublication · Open in Nanodash

This page is a copy of the topic Nanopublication of the Nanopublication Docs. Each paragraph is a nanopublication. In Nanodash you also find their examples, related paragraphs, and version history, and members of the nanopub space can edit them there.