Recursion

Inscriptions can reference other inscriptions instead of duplicating them.

Block space is scarce, so repeating the same library or image in every item of a collection is wasteful. Recursive inscriptions solve this by requesting the content of other inscriptions through a small set of endpoints, composing large works out of pieces already on the chain.

Endpoints

PathReturns
/content/<ID>The raw content of an inscription
/r/blockheightLatest block height
/r/blockhashLatest block hash
/r/zat/<ORDINAL>Inscriptions carried by a zat
/r/children/<ID>Ids of the children of an inscription
/r/metadata/<ID>Inscription metadata

Example

html
<script src="/content/8b41…c92di0"></script>
<img src="/content/2ad7…f41ai0" />

What it enables

  • Generative art that pulls a rendering library inscribed once and used forever.
  • Collections that share a palette, font or sprite sheet across thousands of items.
  • Artifacts that respond to chain state, such as the current blockheight.
A recursive inscription is only as durable as the inscriptions it depends on. Those dependencies are immutable, but the work will not render if you view it outside a client that resolves the endpoints.