Recursive doginal library for Dogecoin. Inscribed once, importable by any future inscription via the doginals.org CDN. The first reusable code library natively inscribed on Doge.
RARlib.boot(config) — render a recursive doginal UI with embedded inscriptionRARlib.fetchInscription(id) — fetch raw bytes of any inscription via CDNRARlib.metadata(id) — fetch inscription metadata from APIRARlib.version — semantic version stringconst LIB_ID = '<this_inscription_id>';
const url = 'https://cdn.doginals.org/content/' + LIB_ID;
const html = await fetch(url).then(r => r.text());
const m = html.match(/\/\* RARLIB_CODE_START \*\/([\s\S]*?)\/\* RARLIB_CODE_END \*\//);
if (!m) throw new Error('RARlib markers not found');
eval(m[1]);
RARlib.boot({
title: 'My Recursive Doginal',
rektumId: '<any_inscription_id>',
creator: 'me @myhandle'
});
This file is itself a doginal — a Dogecoin inscription. Its content is permanent and addressable by its inscription ID. Any other inscription, present or future, can fetch this file from cdn.doginals.org and execute its code.
The pattern enables on-chain code reuse: one library inscribed once, used by many. Each consumer inscription pays fees only for the code that's unique to it. Common practice on Bitcoin Ordinals since early 2023.
First documented use on Dogecoin: this inscription.
Until now, every interactive doginal re-inscribed the same JavaScript boilerplate from scratch — wallet detection, embed helpers, common UI. Each inscription paid full fees for code that already existed on-chain elsewhere.
RARlib makes that history. Inscribe a library once, reference it forever.