Skip to content

Latest commit

 

History

History
151 lines (99 loc) · 8.46 KB

README.md

File metadata and controls

151 lines (99 loc) · 8.46 KB

Introduction

The Wizards of Ord

Faster, simpler, cheaper

The Wizards of Ord: Elements are a collection of open source libraries inscribed on Bitcoin through Ordinals Protocol's built-in brotli compression method. This relies on HTTP content-encoding headers for automatically compressing and decompressing data in the browser, resulting in a more efficient use of the expensive Bitcoin blockspace, ease of use, better performance and significant cost savings.

Inscriptions can now use these libraries directly inside their code, without having to explicitly fiddle with compression. As if loading them from a CDN.

Mission

We want to make it easy for anyone and everyone to create art on Ordinals. Are you new to Ordinals? We're here to help. Need to inscribe a library? We'll be happy to inscribe it for you. Have any questions? Hit us up in The Wizards of Ord Discord.

Inscribed libraries

All inscribed libraries are compressed with Ordinals protocol's built-in Brotli compression.

Library Version Release Date Inscription ID Source
p5.js 1.11.2 Nov 28, 2024 13a5c8e41dfc110514b450b2f15317988c0aaf276d3dbdcca9aa3c7d0b2188a7i0 GitHub
three.js r171 Nov 29, 2024 9029843543713fe7a5a9e76f17c20aa79a6b7f8d37caf0238539cc542c37de7ci0 GitHub
Degenerate Custom Jan 12, 2024 Multiple inscriptions on SAT 45018381985 degenerate
phaser.js 3.80.1 Feb 27, 2024 0d1a04b71975ec948b36cf3ccdff415fca851b9c17144413997395f5ea166e42i0 GitHub

How to use

Caution

Always test before you inscribe

  1. Copy code from Boilerplate. Check examples to see it in action.
  2. Add your generative art code.
  3. Preview your work.
  4. Alternatively, test your inscription using our regtest inscription bot if you're a wizard holder.
  5. Inscribe using your favorite method, preferrably with compression enabled.

Examples

p5.js

These example inscriptions serve a dual purpose: demonstrate the power of Elements and serve as examples of how to use the inscribed libraries. They use p5.js to apply mempool-like block effect to existing image inscriptions.

three.js

Degenerate

Boilerplate code

Elements provide boilerplate code for creating standalone generative art and collections. Their purpose is to serve as a good starting point for anyone looking to inscribe generative art using Ordinals on Bitcoin.

p5.js

three.js

Degenerate

Caution

Degenerate relies on WebAssembly workers. Due to CSP/iframe issues, they may not show well in preview.

Preview before inscribe

It's always a good idea to preview generative art code before inscribing. The following tool should be useful.

To populate the preview tool with a basic "Hello World" p5.js inscription, click the following link that pre-populates the code:

<!DOCTYPE html>
<html lang="en">
  <head>
    <script src="/content/7e37766541506810ba6399c4b2735121f508bd9209df43dd200bf2316b014594i0"></script>
    <style>
      html, body { margin: 0; padding: 0; }
      canvas { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); }
    </style>
    <meta charset="utf-8" />
  </head>
  <body>
    <script>
      function setup() {
        createCanvas(400, 400);
      }

      function draw() {
        textSize(32);
        fill(0);
        text("The Wizards of Ord", 100, 200);
      }
    </script>
  </body>
</html>

Regtest Inscription Bot

If you're a holder of The Wizards of Ord, our Discord server provides access to a dedicated bot for inscribing to a regtest server running with content proxy to mainnet.

Use the /inscribe command in our Discord server to test your inscriptions in the regtest environment.

Verify authenticity

You can compare the SHA checksum of the inscribed library and the official library, and verify that they're identical.

$ curl -s https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.9.2/p5.min.js | shasum
52cc687d6d49e6a5ac135245d3232836233c113b  -

$ curl -s https://ordinals.com/content/7e37766541506810ba6399c4b2735121f508bd9209df43dd200bf2316b014594i0 | shasum
52cc687d6d49e6a5ac135245d3232836233c113b  -

Why Elements over OCM Dimensions?

OCM Dimensions has been incredibly useful in creating genereative art inscriptions on Bitcoin.

However, it predates Ordinals protocols' built-in compression and instead relies on uncompressing on the client side with javascript. This results in larger inscription file sizes and a performance penalty, over Ordinals' built-in compression.

With Dimensions, there's also some additional overhead involved in explicitly compressing the files prior to inscribing. Relying on Ordinals protocols built-in compression avoids that, while making it cheaper to inscribe and have improved performance when loading art inscriptions in the browser.

Moreover, Elements include a more recent version of the inscribed libraries. For example, the inscribed p5.js as a part of Elements is v1.9.0 compared to v1.6.0 with OCM Dimensions.

Need help?

Join us in The Wizards of Ord Discord and we'll figure it out. Alternatively, tweet @lifofifo on X.