· Core Type
A link is a value of kind link: a CID that points to a separate block. A typed link ({ "type":"link", "target":"x" }) records the expected type of its target, checked lazily.
This page defines the link primitive, one of the kinds of the IPLD data model. Its formal schema is attached as the schemaDefinition in this document's metadata, so the app can show it.
A link is how one immutable blob refers to another. A Change names its genesis and deps, a Ref names its heads, a Comment names its threadRoot, and a schema names the schemas it extends. The target is named by its hash, so following a link can never give you different bytes than the author saw, and the links from its heads pin a whole history. In DAG-CBOR a link is a CID under tag 42. In DAG-JSON it is {"/": "bafy…"}, the reserved envelope spelling. cid is the alias the blob schemas use, and Signed Blobs explains the two hash functions that can name the same bytes.
See also
cid: the alias blob schemas use for links.
Link schema: typed links in a schema.
Signed Blobs: content addressing and the two hash functions.
Data model: all the kinds.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime