Wonkies
API

Read it yourself

Everything the explorer draws comes from one static JSON file. No key, no sign-up, no rate limit. CORS is open, so you can fetch it from anywhere. If you would rather skip us entirely, the same data lives in the contract — see the bottom of this page.

GET/assets/collection/collection.json

The whole collection: traits by layer, one-of-ones, and the trait indices of every token.

{
  "layers": {
    "body":  [ { "id": "b1", "name": "Groblau", "rarity": "Common",
                 "community": false, "handle": "", "file": "b1.png" }, … ],
    "eyes":  [ … ],
    "mouth": [ … ]
  },
  "oneofone": [ { "name": "by Gathi", "handle": "Gathi", "file": "006-by-gathi.png" }, … ],
  "tokens":   [ [6, 41, 17], [28, 3, 51], … ]
}

tokens[i] is [bodyIndex, eyesIndex, mouthIndex] into layers, and token id is i + 1. A trait with community: true was drawn by handle — credit them.

Trait images

GET/assets/collection/traits/{layer}/{file}

50×50 PNG with transparency, exactly the pixels stored on-chain. Layer is body, eyes or mouth.

GET/assets/collection/oneofone/{file}

50×50 PNG of a one-of-one.

Render a token

Three layers on white, in this order. No smoothing, or the pixels blur.

const data = await (await fetch("https://wonkies.art/assets/collection/collection.json")).json();

function render(ctx, tokenId) {
  const [b, e, m] = data.tokens[tokenId - 1];
  ctx.imageSmoothingEnabled = false;
  ctx.fillStyle = "#ffffff";
  ctx.fillRect(0, 0, 50, 50);
  const layers = [["body", b], ["eyes", e], ["mouth", m]];
  for (const [layer, idx] of layers) {
    const t = data.layers[layer][idx];
    const img = new Image();
    img.src = `https://wonkies.art/assets/collection/traits/${layer}/${t.file}`;
    img.onload = () => ctx.drawImage(img, 0, 0, 50, 50);
  }
}

Credits

Who drew what, as a CSV with X links for every community trait.

GET/collection/#export

Opens the explorer and downloads the CSV straight away.

Straight from the chain

The contract stores the trait pixels and composes the SVG itself, so you do not need this site at all. tokenURI(id) returns a base64 JSON with the image inline.

cast call <CONTRACT> "tokenURI(uint256)(string)" 1 --rpc-url $ETH_RPC

Contract address goes here once the mint contract is verified.

Rules

None worth the name. The art is CC0, the data is free, attribution is appreciated but not required. If you build something on top of it, tell us and we will boost it.