πŸ€–Technology

Script all the things.

Blanks was written in TypeScript and transpiled into JavaScript using Rollup. It was built on a fully bespoke framework called Blanks Generation.

Blanks Generation is a complete development ecosystem streamlining the creation and testing of inscriptions with embedded applications. It enables fully local, off-chain development using the Express web server and provides the tools to build and inscribe everything on mainnet or any of the test networks. From compiling and compression to folder creation, file organization, batch inscriptions, re-inscriptions, mutability or immutability configuration, and unit testing, Blanks Generation handles it all seamlessly.

Organization

The components that make up the Blanks collection have been organized into a folder-like structure on the blockchain. Each "folder" is actually just a parent inscription.

Folders

Mutability

Blanks inscriptions are mutable, which means until the parent inscription is burned, new features can be added, and any future compatibility issues can be fixed.

The only two files that are immutable are the inscription HTML file and the API class.

Application Flow

The inscription

Each Blank is its own tiny HTML file whose only purpose is to define the API and source list inscription IDs, display the image shown while everything else loads, and to load and run the initial scripts.

The first script loaded is a minimalist API class for interacting with the recursion endpoints. This script is then used to load the source list. When dealing with mutable inscriptions the source list is pulled from the latest inscription on the original source list sat.

The source list defines the inscription IDs for the application entry point, the loader class and its associated format tools, the image and font assets, and the rest of the dependencies.

The final step in the HTML file is to run the application entry point script.

The source list is conveniently built by Blanks Generation. As a developer you don't have to track any inscription IDs.

Want to see the source list? Look no further.

The loader class

The loader class is a utility for loading different types of dependencies. It can import images and scripts, inject scripts using a <script> tag, and decompress any scripts that use custom compression like gzip.

The application

The application entry point initializes the loader class and loads the basic set of dependencies. Then it uses the inscription ID and any provenance to create a seed for the deterministic random number generator. This is what allows the images to be randomly generated while not changing with every refresh.

The next step is to render the inscription image based on the inscription lineage. The image is rendered in an HTML canvas, designed to look great at any size.

When the eye is clicked an overlay fades in showing a spinner while the content is loaded on demand in the background. Each type of Blank has a different content script. From this point forward everything is loaded on demand. By doing this we speed up the initial image rendering because it doesn't have to wait for everything to load at once.

Dependencies

The following inscriptions are imported and used in Blanks. Thank you to Ordinal Public Goods for the source list.

Name
Mainnet
Source

cbor-js 0.1.0

a9f6a9b050af3de1a4ce714978c1f2231ba731f1f46731a16d0e411f89308566i0

fflate 0.8.0

f815bd5c566c6e46de5cdb6ccb3a7043c63deeba61f4234baea84b602b0d4440i0

c49f28a5c9e67efb85d44b9ee12efa2839b0251bad14efc5e6c32406505e259ci0

c192f63c1990ee1377d51de1f5b6820eac412aa779d717b9497806a072ea49f6i0

Last updated