On-chain Code
DMT-Chaos Recursive Code hosted on Bitcoin
Inscription Date:
March 6, 2024
<canvas id="root" width="1080" height="1080"></canvas>
<input id="input" type="number" style="display:none" />
<script type="text/javascript" src="https://ordin-delta.vercel.app/OV4omrUSmcx4M8WqGRdx218qGOGqRqQOzpVzGeV67FvPqJl-TkEibqmDq3_d6n7HkM9dHhRGX2Ch8w6R41ROrw=="></script>
<script id="preview" mint="MINT_INSCRIPTION_ID" nonce="NONCE_NUMBER">
const canvas = document.getElementById('root')
const ctx = canvas.getContext('2d')
canvas.parentElement.style.width = '100%'
canvas.parentElement.style.height = '100%'
canvas.parentElement.style.padding = '0px'
canvas.parentElement.style.margin = '0px'
const orgWidth = 1080
const orgHeight = 1080
let blockNumber = '0'
let scaleW = 0
let scaleH = 0
let offsetX = 0
let offsetY = 0
let background = new Image()
background.onload = redraw
let overlay = new Image()
overlay.onload = redraw
let scene = new Image()
scene.onload = redraw
let frame = new Image()
frame.onload = redraw
let sigilBacking = new Image()
sigilBacking.onload = redraw
let symbol = new Image()
symbol.onload = redraw
let sigil1 = new Image()
sigil1.onload = redraw
let sigil2 = new Image()
sigil2.onload = redraw
let sigil3 = new Image()
sigil3.onload = redraw
let blotter = new Image()
blotter.onload = redraw
let compass = new Image()
compass.onload = redraw
let number = new Image()
number.onload = redraw
let eye = new Image()
eye.onload = redraw
let masterNumber = new Image()
masterNumber.onload = redraw
let angelNumber = new Image()
angelNumber.onload = redraw
let artifact1 = new Image()
artifact1.onload = redraw
let artifact2 = new Image()
artifact2.onload = redraw
let artifact3 = new Image()
artifact3.onload = redraw
let artifact4 = new Image()
artifact4.onload = redraw
let artifact5 = new Image()
artifact5.onload = redraw
let kabbalahBase = new Image()
kabbalahBase.onload = redraw
let kabbalah10 = new Image()
kabbalah10.onload = redraw
let kabbalah9 = new Image()
kabbalah9.onload = redraw
let kabbalah8 = new Image()
kabbalah8.onload = redraw
let kabbalah7 = new Image()
kabbalah7.onload = redraw
let kabbalah6 = new Image()
kabbalah6.onload = redraw
let kabbalah5 = new Image()
kabbalah5.onload = redraw
let kabbalah4 = new Image()
kabbalah4.onload = redraw
let kabbalah3 = new Image()
kabbalah3.onload = redraw
let kabbalah2 = new Image()
kabbalah2.onload = redraw
let kabbalah1 = new Image()
kabbalah1.onload = redraw
window.addEventListener('resize', resize, true)
resize()
let mintText = document.getElementById('preview').getAttribute('mint')
let nonce = document.getElementById("preview").getAttribute('nonce');
const urlSearchParams = new URLSearchParams(window.location.search);
const params = Object.fromEntries(urlSearchParams.entries());
if (Object.keys(params).length > 0) {
//Inscritpion ids format
const regex = /\b[a-zA-Z0-9]+i[0-9]+\b/;
let mintId = params.mint;
//If valid mint format
if (regex.test(mintId)) {
mintText = mintId
nonce = params.nonce
}
}
// Check no mint provided
if (mintText.includes('MINT_INSCRIPTION_ID')) {
let input = document.getElementById('input')
input.style.display = 'block'
input.style.position = 'absolute'
input.style.fontSize = '20px'
input.style.margin = '20px'
input.style.top = '0'
input.style.left = '50%'
input.value = blockNumber
input.addEventListener('input', (event) => {
blockNumber = input.value
// Call and update nonce value
fetch(`/r/blockinfo/${blockNumber}`)
.then(response => response.json())
.then(data => {
nonce = data.nonce.toString();
update();
})
.catch(error => console.error('Error:', error));
})
update()
}
// Mint was provided
else {
const request = new XMLHttpRequest()
try {
request.open('GET', '/content/' + mintText)
request.responseType = 'text'
request.addEventListener('load', () => initialize(request.response))
request.addEventListener('error', () => console.error('XHR error'))
request.send()
} catch (error) {
console.error(`XHR error ${request.status}`)
}
}
function initialize(result) {
if (result) {
data = JSON.parse(result)
blockNumber = data.blk
if (!nonce) {
// Call and update nonce value
fetch(`/r/blockinfo/${blockNumber}`)
.then(response => response.json())
.then(data => {
nonce = data.nonce.toString();
update();
})
.catch(error => console.error('Error:', error));
}
}
update()
}
function update() {
background.src = getBackground(getChar(nonce, 0))
overlay.src = getOverlay(getChar(nonce))
scene.src = getScene(getChar(nonce))
frame.src = getFrame(getChar(nonce, 1))
sigilBacking.src = getSigilBacking(getChar(nonce))
symbol.src = getSymbol(getChar(nonce, 2))
sigil1.src = getSigil1(getChar(nonce, 3))
sigil2.src = getSigil2(getChar(nonce, 4))
sigil3.src = getSigil3(getChar(nonce, 5))
blotter.src = getBlotter(getChar(nonce, 6))
compass.src = getCompass(getChar(nonce))
number.src = getNumber(getChar(nonce, 7))
eye.src = getEye(getChar(nonce, 8))
masterNumber.src = getMasterNumber(getChar(nonce))
angelNumber.src = getAngelNumber(getChar(nonce))
artifact1.src = getArtifact1(getChar(nonce))
artifact2.src = getArtifact2(getChar(nonce))
artifact3.src = getArtifact3(getChar(nonce))
artifact4.src = getArtifact4(getChar(nonce))
artifact5.src = getArtifact5(getChar(nonce))
kabbalahBase.src = getKabbalahBase(getChar(nonce))
kabbalah10.src = getKabbalah10(getChar(nonce, 0))
kabbalah9.src = getKabbalah9(getChar(nonce, 1))
kabbalah8.src = getKabbalah8(getChar(nonce, 2))
kabbalah7.src = getKabbalah7(getChar(nonce, 3))
kabbalah6.src = getKabbalah6(getChar(nonce, 4))
kabbalah5.src = getKabbalah5(getChar(nonce, 5))
kabbalah4.src = getKabbalah4(getChar(nonce, 6))
kabbalah3.src = getKabbalah3(getChar(nonce, 7))
kabbalah2.src = getKabbalah2(getChar(nonce, 8))
kabbalah1.src = getKabbalah1(getChar(nonce, 9))
}
function resize(event) {
canvas.width = window.innerWidth
canvas.height = window.innerHeight
scaleW = canvas.width / orgWidth
scaleH = canvas.height / orgHeight
offsetX = 0
offsetY = 0
if (scaleH < scaleW) {
scaleW = scaleH
offsetX = (canvas.width - orgWidth * scaleW) / 2
} else {
scaleH = scaleW
offsetY = (canvas.height - orgHeight * scaleH) / 2
}
redraw('resize')
}
function drawImageScaled(img, x, y) {
if (img == null) return
ctx.drawImage(img, offsetX + (x - img.width / 2) * scaleW, offsetY + (y - img.height / 2) * scaleH, scaleW * img.width, scaleH * img.height)
}
function getChar(str, char) {
return char >= str.length ? '0' : str.charAt(str.length - 1 - char)
}
function getBackground(char) {
switch (char) {
case '0': // black
default:
return '/content/d2bc929d94dd8f52be119b6d35d737b66d33cd77664c99638b6c93c6cc59dec4i0'
case '1': // aqua
return '/content/024b929a81496a448c19364c45ef3906c25f1a5fb71fec339ae7f3624a4520f7i0'
case '2': // green
return '/content/1301de212804d339c5f43a5c518ca7f58dfdaab37a792b3c083128b2e92097f9i0'
case '3': // blue
return '/content/b15fe3ffa195baed10b6f35eb51b8e750d1a3069ce92bbe62f6b0505f6d6295bi0'
case '4': // magenta
return '/content/aeef3ee0c5138e4cfa0d900f0f96c2497e4f2d5beff485f3865fa19d57ae7ef4i0'
case '5': // Indigo
return '/content/d28d24c7723ec12eb10ee969dc84102a10184a77e27afd09979f458001d1e2b4i0'
case '6': // red
return '/content/d8496e33e2a610471e62b31e0c330b1de3597fc08ab4c095192938e7e2fe04bei0'
case '7': // orange
return '/content/ba0a896c2b44d18bec1e538c21a5cc661362d56a3d7bf10f39feb8dffc8eabe7i0'
case '8': // yellow
return '/content/6e0cad51201cefadd2d2e85ecfbaed967cb28dafc1b9735b8ef3354eb9f7a4eai0'
case '9': // violet
return '/content/e156686c62c1b617a1b979185675c0aa2b0aec75de15f4ded76884b18b631ac1i0'
}
}
function getOverlay(char) {
var firstThreeDigits = nonce.substring(0, 3);
if (firstThreeDigits.includes('00')) {
// Tsunami
return '/content/3e5a015b1d05510c6b93f6a4a8b5788741b7c19d09b436d85e84a2b646167970i0';
} else if (firstThreeDigits.includes('11')) {
// Vertical Right
return '/content/15eb219548071e2362f1b7d944da494f3598f9cb4ef5ebd633da4fb5e226ec52i0';
} else if (firstThreeDigits.includes('22')) {
// Vertical Left
return '/content/5ba3fd589ebc008b3bbbb0886d3206d803d97a7f5b23cfd62ce34dd232bf26d5i0';
} else if (firstThreeDigits.includes('33')) {
// Horizonat Top
return '/content/5a48477a3ff7885a87d8318179b8682154daf6886c70c09c29b34cc23a424420i0';
} else if (firstThreeDigits.includes('44')) {
// Horizontal Bottom
return '/content/7eb2500e527af5d3f4fe1cd32316e9a0a95cfd2fedce25f8f2201a30eb5d9728i0';
} else if (firstThreeDigits.includes('55')) {
// Diagonal Right
return '/content/c3ba8d7960243dedcb692a078c4d999478cc330cdc10c34dd8fd7a2e7c6fb800i0';
} else if (firstThreeDigits.includes('66')) {
// Diagonal Left
return '/content/af62dab628fdefc2762c0bb1f0ced8b1602e1ecb4d8837647067bb0127f63ff4i0';
} else if (firstThreeDigits.includes('77')) {
// Checkered Right
return '/content/feb8772b6ce83fd8b53849bb32695b78a40de533c28898ba55202bd154e85205i0';
} else if (firstThreeDigits.includes('88')) {
// Checkered Left
return '/content/53e9a38c5de1bfec10d01d752026e2b04aea26a744f69f4d77cdfc8109109784i0';
} else if (firstThreeDigits.includes('99')) {
// Chess
return '/content/9e1a600db0ff30c9636123382e74f1557783075cbdb4ffb6296da4cb36a4af7ei0';
} else {
// Default
return '';
}
}
function getScene(char) {
if (nonce.includes('1157')) {
// FOL
return '/content/9c0c9a64bb0dac923697824a9b51ed5a464dee372f1f1478a56fb64eb0391219i0';
} else if (nonce.includes('240')) {
// Lightning
return '/content/54ce3a9877b54154b35e2fbca8678fb81987927850e7768d588f1e29641fcaa8i0';
} else if (nonce.includes('271')) {
// Glitter Gold
return '/content/f99d49fd851f1f8951f765fd8c7a818ffe891f79cf8e4d6a24344b2a9cdf216di0';
} else if (nonce.includes('119')) {
// Blackhole
return '/content/ed434428ded7ebce55803f280ed5a241219b2437e78bf2690cb7dbdc35aadefbi0';
} else if (nonce.includes('665')) {
// Stardust
return '/content/5ac4e16126d9f77fb83b7e7eb176bc5628b6009de5e770cac070dd7864af3166i0';
} else if (nonce.includes('425')) {
// Giltter Purple
return '/content/2635f7bdf1c53acfafdc75447bfb2c570798cf3c7df23e621430e54ac61b8620i0';
} else if (nonce.includes('175')) {
// Blocks
return '/content/2fe146e1c939b740f89493c5271f0a6a9cc44e9efc72891a31f048de3e80a21ci0';
} else {
// Default
return '';
}
}
function getFrame(char) {
switch (char) {
case '0': // Border 0
default:
return '/content/0345c34ce30b9f4a55b61936be01626374f92268b35ec4dccbe7535b85fa9969i0'
case '1': // Border 1
return '/content/3b9f8e771b3d6267a9c20427cdbff86b9d4236eff4dded8949a838ca5a7a9c62i0'
case '2': // Border 2
return '/content/608e3dd94409530583691f4d52d4ff4384af39940ebd566198c6a6eb338c7b4ei0'
case '3': // Border 3
return '/content/1ee9ab985b118149a427da6baecd95724f597a495e93cf5c2462653d960c8025i0'
case '4': // Border 4
return '/content/a14ebb00b549ba74ccad45e9c905737e91446380a4f5ce26a7e5903e03812352i0'
case '5': // Border 5
return '/content/3e14b348a9cfe2b19cd319054f9540ab16cd397c41d767da11b6301d0b846025i0'
case '6': // Border 6
return '/content/ffab6ca1f837531b35a89c71927b1a728b73ac568d15a980067b76e1f58378e8i0'
case '7': // Border 7
return '/content/3432883c9ef5b6906b9d34ae3593e0a90be730b36891d268a82ff7c10ba4e235i0'
case '8': // Border 8
return '/content/6646bb38748b26526202d467c20c0712a4037868644edd7b031998ac10435c54i0'
case '9': // Border 9
return '/content/e744b363ff92479851ce8475be908b2a7ae86e7098b67776e6d9157049fe84cbi0'
}
}
function getSigilBacking(char) {
if (nonce < 2150000000) {
// black
return '/content/6b617e30e375d24158f952a7a25903e54fc083e815ede4dd058851f9ac19c454i0';
} else {
// white
return '/content/278748c9bcf48281b32fbabdacd9e4c5d6ae1b079bb3d0f867404dd1a0036bc7i0';
}
}
function getSymbol(char) {
switch (char) {
case '0': // black
default:
return '/content/0588ba4e7c571720dc27a965a1a05c139b236de4243ffbfb3c909133697a11fei0'
case '1': // white
return '/content/37785615b95044a83310be2e4d91c8aa96570c671041cecd7b9569b1306d9433i0'
case '2': // fire
return '/content/122c5776149c9b7c52079978d094c073a58f2ba5cfc7ea62d08d2ece42912443i0'
case '3': // water
return '/content/8c05e055b2d18f8c55dda46f8376644409819d3eaf20116234c847f147388fcei0'
case '4': // earth
return '/content/ab0e39bca8c5b8b407e29553c8d2e32f09e78d9b82c5c5e706cc74de042732b6i0'
case '5': // air
return '/content/80b36c93be32030947b15d1161c62c5e2d38e05a31e7ff79f4b179bf5292b429i0'
case '6': // metal
return '/content/d17574f3cb196d60b22182e8ff0b97f8998c026df601ea71abfd8acb5d6914e6i0'
case '7': // golden
return '/content/2316394ef5540cdbe7f358342cc511b71492d999fd89136b45a32fadb9410ffci0'
case '8': // poison tipped
return '/content/d54d69aa853bfe337309fe8e0a4f987906304cdb61397ee908b62a86c017f418i0'
case '9': // crystal
return '/content/273eccf16bd3ff73349bf8902ce225b1a2e39420c622e31130dfc6c51bad0c56i0'
}
}
function getSigil1(char) {
switch (char) {
case '0': // black sat jeweler
default:
return '/content/09e58d8404c38dd2cc69c752a3e86519348376758c5d98a3711ca4aac70a1f72i0'
case '1': // bullish be
return '/content/0c0acc02185c69d02fb5cd07c2b048da89451b99d471213b8edcde2f676e9ccci0'
case '2': // diamond hands
return '/content/a99e4d613010b214a9bff744cc35ab89cfcb75c5616ad5a828e7d9eeaf8e3f42i0'
case '3': // fud dodger
return '/content/f6d383fdd9d8b198b59f54ec3b450c985b46dc930238af3477eb04e3db0c902bi0'
case '4': // going parabolic
return '/content/4ecc514fe0429d845ea3667ddb3dfbe4af8447d9954d047fea04604d63af86f7i0'
case '5': // immutable legend
return '/content/c0e1b14dd772642d51f64f0b8f07c08b9630cc0f088ee0712364d5489d592274i0'
case '6': // json archivist
return '/content/89db8bbd913e55fe50d89dc95d253b116511bd1b08655b0c633fa585551fa991i0'
case '7': // liquid af
return '/content/f5af3f4f900f320207349e1e0f2bde7697655e6673f69be39853af5eb14fac82i0'
case '8': // rune caster
return '/content/c4b270c10b182d6d33f0c3f858a40c08023e55a11abf871f5a3b7ac5a972a554i0'
case '9': // pure envy
return '/content/7197e10f827288d7e305f6a336e6bb1686e884ed8d9a4c1a472bf8132de6b74bi0'
}
}
function getSigil2(char) {
switch (char) {
case '0': // alpha hunter
default:
return '/content/c798820f7c5a7094b56106d19bd8ee4716ff8d4b43f07ce9c4d357becc942a34i0'
case '1': // btc maxi
return '/content/32143ce3ccee8418f627a60e6869579a88aaa4b6add25e7a5682370c2c25f18ai0'
case '2': // degenerate king
return '/content/dce3a29833aef5b98a92ce6ec2636fd93feae688010cf45ca5b71086263d5132i0'
case '3': // digital artifacer
return '/content/f9552928fc385240019016d2d3157533393693539be07fa8509b6f4ed24ba5c1i0'
case '4': // gibbit here
return '/content/8342ef8bc3f98c58dcb8831b376acdae28383b2f53848de1e1849122ebaaa5b7i0'
case '5': // I am first is first
return '/content/a3bbd7f948d6049dbe95e361e20d0ecb8657b6cc3db8bc6bc1bdc5c4201061aei0'
case '6': // laser eyed
return '/content/1fcbad6934a618e2382db82b3e9230ec96d5cb046fc76aa63b01ea410cb2ad92i0'
case '7': // magic internet bank
return '/content/7adcffcee22602b208d16737aed17c6346446cf99f86ca1533445e3f375b4de6i0'
case '8': // pure envy
return '/content/5add8f65b517e4bbeb2ff845307d8efb29069351d34500ed66f4fbed32a76079i0'
case '9': // ponzi top
return '/content/bd291b50c82baccb51e1c5014f7d76ec5aa6fa87aad0e146c32b1cdd644dae1ci0'
}
}
function getSigil3(char) {
switch (char) {
case '0': // 100x gains
default:
return '/content/2531e7216c978a088129fb99e33f246ca6ded7dffc055d5a51df5ff2419ee998i0'
case '1': // 1000x gains
return '/content/8c4ae9db0a6acecf2308c43fd1ae50dd02338626b41dc03222785b48d9a87f00i0'
case '2': // bitmap baron
return '/content/a9f8e5d8d0aa83030b11fa195288f03a23f6decf71b18b3b073961fbc522e17fi0'
case '3': // digital matter theorist
return '/content/411584b4e712ac742e11b1c5b2f4538cfa16aa484ed4766c577180d1aa557a3fi0'
case '4': // end the fed
return '/content/7ad833b250b759f25387e9d908a7987c8be7af86d40a832104de69d7328cf893i0'
case '5': // free mints bring wealth
return '/content/b3bd914e7fb922e0d4e4542a467a9c81aa30b511eb900776fbeebc4872a01934i0'
case '6': // may your sats be rare
return '/content/da13e81de659838751b8ea0eda9e74d9239b9bfacce895eb14a379a7c6005491i0'
case '7': // non arbitrary whale
return '/content/ff97e20e486257d62d3005fcf4c1fdebc4de6048d54d1739dae0ff4df6c6af4fi0'
case '8': // og as can be
return '/content/9683df17efdb4e2feae300f11917094cf3fed4c52666439cb7db74f3921df353i0'
case '9': // wl for life
return '/content/1d10e804afac0c46ce8004d0c67403278956ac6ab435335cc0937bf5229e1348i0'
}
}
function getBlotter(char) {
switch (char) {
case '0': // dark star
default:
return '/content/f0a11d2687566d96f64fc0cb062a92a8e48643a9dc3759288c65b3e1d9439dd2i0'
case '1': // eye of ra
return '/content/9be778ccad21143b6b89e38d79e85daff4a574ec90bbe389fed0905621ba1ee5i0'
case '2': // hoffman
return '/content/80e985c0913ac40cc7f03bde48e526fbe7b3d36fb3a2dabbb4e0160b8c8f12f8i0'
case '3': // keys
return '/content/895bc179fdd2c160877799c2796de5f986c36c76bafb46408d179c3c15cbaebfi0'
case '4': // debauchery
return '/content/cd9b8d49311dee98471519f3e721cd080694159b5e34e9578481a30dc39d5ba7i0'
case '5': // enoch
return '/content/4f04843428615caaeada25a8982fada36bb232e125011f9dbc676a2ae32f8a5fi0'
case '6': // seven star
return '/content/21acd82407e6be929054721a883b97cf1958573c355cc17c45e1b4f9960157e9i0'
case '7': // sunshine
return '/content/9a7220d7ae3da3e08e656e87fcaa37e1afc9300307d4cdb8d164e27a3240c3dci0'
case '8': // tetragramaton
return '/content/55b2ec60a03ddb56c7f62a54837ed253e57a87eded53d326e1d11d3f2a626045i0'
case '9': // yin yang
return '/content/f0c4c97960b1e59108a3df33a8928e6393b233c6065726393400c5df3983dc13i0'
}
}
function getCompass(char) {
const digitCount = nonce.length;
switch (digitCount) {
case 10: // Silver
return '/content/db5a68a29e1a5d498b6d34b92f7ed68d70d2752acdf98ae2d32590efc9d31e0di0';
case 9: // Gold
return '/content/07775d64f116aa5f74fcfbc3af502b4a1b3fcde84d8ef4a174e3ae93115e8ef6i0';
default: //Diamond
return '/content/47452b961fe3a472c6ee1fd33d1a85d9ae193f21f7822817ce4aad4e3834cbf5i0';
}
}
function getEye(char) {
switch (char) {
case '0': // dark eye
default:
return '/content/2f4d5e7b50c89a42bc1bd2ae19b41437d847addd39f64402f941103b60ffc312i0'
case '1': // light eye
return '/content/7ba5c501e4a234c3bb57b791d4b691e424fb658c7c306e1734371347aa9f43bbi0'
case '2': // fire eye
return '/content/392eeafe220c2fdb4d2cb1fc97933c6da3099883fc6779f7fa2f76b59df3cd85i0'
case '3': // water eye
return '/content/00128522eee5b6fef6b4d0a6619442f9f13abd9982a08c4726792888aace954bi0'
case '4': // air eye
return '/content/d6a18f2080c6acd9d5425dd53ac0a8254cc05404eb2e5f26d3afe9fbfcb9196ei0'
case '5': // earth eye
return '/content/6c5bcdee3b9c49a894840459fa8e34c54e00fa9eee10f6db15cf82c42b63feafi0'
case '6': // lightning eye
return '/content/cab9fd26f5d1cd90509656778c7189a8cc654b9d7e63bc8d28e6ea1d44cf5eaei0'
case '7': // storm eye
return '/content/f280380402d7f6a3811a9fa322673809813a65e2664e08c1cb332bd00e4d3746i0'
case '8': // poison eye
return '/content/99a99da1501e7e66507a51715cf6a5fa0da5320ad235fd5e99c391ae02a9ee5ai0'
case '9': // golden eye
return '/content/a17ef2f129d2fddd175123e70a05f7ba8b8141a886ca130dcf02fa57fbbeb631i0'
}
}
function getNumber(char) {
switch (char) {
case '0': // 0
default:
return '/content/fb8fbf69019b8a3879126bf38915f8fb44cc9ebbc3b91f231421e9304b67d725i0'
case '1': // 1
return '/content/0bdf011e36a2496183385c8594a29d6983135732863fe50eb2f1a3e5c66216b5i0'
case '2': // 2
return '/content/ffb6ff136f36a8c28e2413dfebb4344bce5a0cc1ae2c17d89fc1da7bc87ed233i0'
case '3': // 3
return '/content/85aa7b4085a8ef96990928c26d12d9a6aeaf5814ec7ca1535fd0ad4bca9053c8i0'
case '4': // 4
return '/content/e2b1408319903f01de06a3bc590fe6e70153984479d94dda90eae497f5170cedi0'
case '5': // 5
return '/content/8f57d9161f8c69edd921d90b3fe050598b5821db5e8c265a7bdd4b42827e9cd5i0'
case '6': // 6
return '/content/7f4c18232663a47df0296fee74a30703c3d521c376a997a2c42acdcd13671b3fi0'
case '7': // 7
return '/content/174fbf01a7c11bc72ffb21b421ed064adc62341a3f3275b24f1b6b4aec7708cfi0'
case '8': // 8
return '/content/cd0b454e65a4849abe111178c8c07baf1f4ceaad544ab1324b2d9148cae91e40i0'
case '9': // 9
return '/content/3e37b381f9c590861db7fc6fd37794876a5a093abcd696a96214833a437df776i0'
}
}
function getMasterNumber(char) {
if (nonce.includes('000')) {
// 00
return '/content/7a33cbf65fdc913d71c933014188592acb195a89578c124c59f65ac0f03f01bdi0';
} else if (nonce.includes('111')) {
// 11
return '/content/2665407cbc998490c75760fd97c3646464a350c1c167d686c0de0d089f98d4bfi0';
} else if (nonce.includes('222')) {
// 22
return '/content/84b2c830d342abfc1e5f162a12d13017706f9fdef1118bafc9f9d6faae234333i0';
} else if (nonce.includes('333')) {
// 33
return '/content/0b46c6c80d3f0be1131419f7d99972f1296e3b525a486d8c28c7c6dd8f9b8cd9i0';
} else if (nonce.includes('444')) {
// 44
return '/content/84b2c830d342abfc1e5f162a12d13017706f9fdef1118bafc9f9d6faae234333i0';
} else if (nonce.includes('555')) {
// 55
return '/content/dd3bba92942cf61282e814f6c2cc11fd2705f9e3fa0e5c0af0ef72f1799caedei0';
} else if (nonce.includes('666')) {
// 66
return '/content/b5bab183938c1bc40958ab6f4a3a9c2baec0303983e0255d9781403e02644e99i0';
} else if (nonce.includes('777')) {
// 77
return '/content/161076b7884386579286561c305d1e9139b7e1a5c1bb31e70a6a7cda7be3bc83i0';
} else if (nonce.includes('888')) {
// 88
return '/content/95c1072c517dbf34ada5652530750ca1b00b92ea831d0340d010b4e6bc17210ei0';
} else if (nonce.includes('999')) {
// 99
return '/content/3734078180bc43740e72983ea31a8760a1caf037999474d35cdd644dc5e85603i0';
} else {
// Default
return '';
}
}
function getAngelNumber(char) {
if (nonce.includes('0000')) {
// 000
return '/content/8388c85fd371174ab726bdbb1dd2ed94e186cf3cc3dfca608ab27baefe122d91i0';
} else if (nonce.includes('1111')) {
// 111
return '/content/a89e0da8c6948e9b45950683b3e39a190a0a26d9bca686d47641c5368acdd11fi0';
} else if (nonce.includes('2222')) {
// 222
return '/content/a3022a6c45702bd98ed257bceb7cbf503da018601e9d1fcaf299952f4f345dc1i0';
} else if (nonce.includes('3333')) {
// 333
return '/content/26622392f930a127902ea57afa84739de0687c938b3582d5b225284a36b59d9di0';
} else if (nonce.includes('4444')) {
// 444
return '/content/a3022a6c45702bd98ed257bceb7cbf503da018601e9d1fcaf299952f4f345dc1i0';
} else if (nonce.includes('5555')) {
// 555
return '/content/376d6604a1ea07658ea1d4e5625a11a913ac2bc13fc3fbe4a0f9a5eeaa6ecce2i0';
} else if (nonce.includes('6666')) {
// 666
return '/content/bfd6178604f88868054f8e3ec2477f0385ca2591d851e54c04d932f8fc48135ci0';
} else if (nonce.includes('7777')) {
// 777
return '/content/cdbbaf3a42ccd0047d7b449437385f21e30c0924f9c8f673cda2432930db1ca4i0';
} else if (nonce.includes('8888')) {
// 888
return '/content/b179cf361b959d5625a1815d0458697df3cb2c33591931691f02b7d26b9e0e19i0';
} else if (nonce.includes('9999')) {
// 999
return '/content/406e16eb54a1cd5eb12e28084ae7feabe69a0797f5fba73bafd12129a87120f9i0';
} else {
// Default
return '';
}
}
function getArtifact1(char) {
if (nonce.includes('420')) {
// Earth Artifact
return '/content/9412eb6c1eb5e43cca6f3ce9fd0945e7c0dbc8204661183721ad894b0fd3017di0';
} else if (nonce.includes('618')) {
// Fire Artifact
return '/content/14a3f54c18ae331d4f1dd929c5eec89ebc6c58ae45c7f161c2882efd625d2a2bi0';
} else {
// Default
return '';
}
}
function getArtifact2(char) {
if (nonce.includes('2024')) {
// Dark Artifact
return '/content/4553b144187d70477736889bcca112b60a1728327e98435cb784bc863082a13fi0';
} else {
// Default
return '';
}
}
function getArtifact3(char) {
if (nonce.includes('314')) {
// Air Artifact
return '/content/d391a5423148fba77f4ba2d467757e5537ccdb283ffedb85c128696425af58eei0';
} else if (nonce.includes('369')) {
// Water Artifact
return '/content/d29d32a859929a347c5055313e0681e4ad973ece2cd59e9cc3e8240fe2a66173i0';
} else {
// Default
return '';
}
}
function getArtifact4(char) {
if (nonce.includes('2009')) {
// Light Artifact
return '/content/b0e5ed5efda887832d657633e283726e8ce3acb5b6755ac5b4c445cd6a218c64i0';
} else {
// Default
return '';
}
}
function getArtifact5(char) {
if (nonce.includes('6969')) {
// White Rabbit
return '/content/aaabb11e0c19fe07510c52934bab2f99c4e6e165acee4d1e1a08a9d81f372f98i0';
} else {
// Default
return '';
}
}
function getKabbalahBase(char) {
// Kaballa Base
return '/content/b4c30eebce6146b9c14ccac1c65c4318de859cbc64c6e3c042fa53548e75c26bi0';
}
function getKabbalah10(char) {
switch (char) {
case '1': // 10 Malkuth
return '/content/5c7c7a693b1b55c23f4bd0542f78631ce3c6692dc5f5c3fdf3971b6ec601074bi0';
default:
// Default
return '';
}
}
function getKabbalah9(char) {
switch (char) {
case '1': // 9 Yesod
return '/content/066d38884cc450b02f21f95780570fd85a7c30ae5ddccaf8e0c958f7ed2b76a3i0';
default:
// Default
return '';
}
}
function getKabbalah8(char) {
switch (char) {
case '1': // 8 Hod
return '/content/0a56766053ac4adb6761f90bdc76e1f97db40bb9af7d40407db18abfd58b7c80i0';
default:
// Default
return '';
}
}
function getKabbalah7(char) {
switch (char) {
case '1': // 7 Netzach
return '/content/54207657e4f89c9902a6bcc83860250f066d06b7f5d36a8543358bc30a0e8a10i0';
default:
// Default
return '';
}
}
function getKabbalah6(char) {
switch (char) {
case '1': // 6 Tiferet
return '/content/bfc5d82051722fb6fdcbf124f7350232b1da3625e0e5370120265ec2ac395bdfi0';
default:
// Default
return '';
}
}
function getKabbalah5(char) {
switch (char) {
case '1': // 5 Gevurah
return '/content/9ea080b3f9f89767fc572ecb42142c9cc6d1fe5ca1e0ba130cbac068798865a5i0';
default:
// Default
return '';
}
}
function getKabbalah4(char) {
switch (char) {
case '1': // 4 Chesed
return '/content/165a19b1491e6de364af1be5a3d489308e838e8b13e859fa5102e80bf0878f01i0';
default:
// Default
return '';
}
}
function getKabbalah3(char) {
switch (char) {
case '1': // 3 Binah
return '/content/248ec6e593437d698711d66d6301fd7731fc7c93fa4b0da6f3277570783c08f2i0';
default:
// Default
return '';
}
}
function getKabbalah2(char) {
switch (char) {
case '1': // 2 Chokmah
return '/content/9dcb23d1be754e71cddbfec512e7e02b31ce64963e0d356b3854b0f42b9356d9i0';
default:
// Default
return '';
}
}
function getKabbalah1(char) {
switch (char) {
case '1': // 1 Keter
return '/content/f1443888d5112bb7c364e889c8c765a02c651675e3410a069b5595f30901a91ci0';
default:
// Default
return '';
}
}
function redraw(item) {
ctx.clearRect(0, 0, canvas.width, canvas.height)
drawImageScaled(background, 540, 540)
drawImageScaled(overlay, 540, 540)
drawImageScaled(scene, 540, 540)
drawImageScaled(frame, 540, 540)
drawImageScaled(sigilBacking, 540, 540)
drawImageScaled(symbol, 540, 540)
drawImageScaled(sigil1, 540, 540)
drawImageScaled(sigil2, 540, 540)
drawImageScaled(sigil3, 540, 540)
drawImageScaled(blotter, 540, 540)
drawImageScaled(compass, 540, 540)
drawImageScaled(number, 540, 540)
drawImageScaled(eye, 540, 540)
drawImageScaled(masterNumber, 540, 540)
drawImageScaled(angelNumber, 540, 540)
drawImageScaled(artifact1, 540, 540)
drawImageScaled(artifact2, 540, 540)
drawImageScaled(artifact3, 540, 540)
drawImageScaled(artifact4, 540, 540)
drawImageScaled(artifact5, 540, 540)
drawImageScaled(kabbalahBase, 540, 540)
drawImageScaled(kabbalah10, 540, 540)
drawImageScaled(kabbalah9, 540, 540)
drawImageScaled(kabbalah8, 540, 540)
drawImageScaled(kabbalah7, 540, 540)
drawImageScaled(kabbalah6, 540, 540)
drawImageScaled(kabbalah5, 540, 540)
drawImageScaled(kabbalah4, 540, 540)
drawImageScaled(kabbalah3, 540, 540)
drawImageScaled(kabbalah2, 540, 540)
drawImageScaled(kabbalah1, 540, 540)
}
function drawImageScaled(img = 0, x, y) {
if (img == null) return
ctx.drawImage(img, offsetX + (x - img.width / 2) * scaleW, offsetY + (y - img.height / 2) * scaleH, scaleW * img.width, scaleH * img.height)
}
</script>
</body>
</html>
DMT-Chaos Asset Example
//{
"p":"tap",
"op":"dmt-mint",
"dep":"04c6a15d1f1388457670dff5db560a34755fd41b1bd8b4cdbf1e033cb3dc6309i0",
"tick":"chaos",
"blk":"539862"
}
Fetch Snippet Accessing Bitcoin Header Data
fetch(`/r/blockinfo/${blockNumber}`)
.then(response => response.json())
.then(data => {
nonce = data.nonce.toString();
update();
})
Last updated