Recursive Inscriptions — Building On-Chain
Understand recursive inscriptions — how inscriptions can reference and compose other inscriptions to build complex on-chain applications.
1Simple Explanation
Recursive inscriptions are inscriptions that reference and use content from other inscriptions. Instead of embedding everything in one file, you can build on top of existing on-chain content — like building with Lego blocks that already exist on Bitcoin.
2Why It Matters
Recursive inscriptions solve the file size problem and enable composability:
- •Reuse code libraries — inscribe a JavaScript library once, reference it from many inscriptions
- •Build complex apps — create interactive experiences by combining multiple inscriptions
- •Save on fees — don't re-inscribe the same data; reference what's already on-chain
- •Enable upgradability — reference different versions of components
- •Create generative art — use on-chain code to generate unique outputs
3How It Works
An inscription can reference another inscription's content using the path:
/content/
- •For example, an HTML inscription can include:
- •
— load a JavaScript library - •
— display an image inscription - •
— load CSS styles
The Ordinals protocol serves the referenced content, enabling true on-chain composition.
4Real-World Example
A generative art project might work like this:
- •Inscription A: A p5.js library (inscribed once)
- •Inscription B: A rendering algorithm using p5.js
- •Inscription C-Z: Individual art pieces that reference both A and B with unique seed parameters
Each art piece is tiny (just parameters + references), but renders a full interactive artwork by composing on-chain components.
5Using Our Tools for Recursive Inscriptions
Our Inscription Creator tool supports recursive references:
- •Link on-chain assets — reference existing inscription IDs as dependencies
- •Preview locally — see how your recursive inscription will render
- •Optimize the package — minimize the unique data your inscription adds
- •Export — generate the final HTML ready for inscribing
This makes building recursive inscriptions visual and intuitive.