moxzi
Docs / On-chain builds / Publishing to a registry

Publishing to a registryalpha

How does a wasm get the "built on-chain" verdict, and who decides it?

A build that ran on the compiler canister can be published to an ICRC-118 registry with a record of how it was made, and the registry can check that record against the compiler itself. The reference registry is astroflora: l55bi-3aaaa-aaaai-atk4a-cai, with a UI at https://registry.astroflora.xyz.

Two things before the first publish#

Publication is open, and gated twice.

Both are done on the registry's Publishing access page. A refusal from the registry names the missing step.

The commands#

moxzi build src/Main.mo --remote https://icp-api.io --canister xcn6l-iqaaa-aaaai-raq6q-cai
moxzi publish out/Main.wasm --registry l55bi-3aaaa-aaaai-atk4a-cai \
      --namespace com.example.myapp --version 1.0.0 --canister xcn6l-iqaaa-aaaai-raq6q-cai

--canister points publish at the build that made the file, so the entry carries the source digest, the options digest, the compiler version and the linked hash, read from the compiler's own records rather than computed on your machine. --previous chains a release to the one it upgrades; moxzi deprecate marks one superseded without removing it.

The verdict is pulled, not pushed#

After the upload, publish asks the registry to pull the compiler's attestation. The registry calls the compiler canister with the linked sha256 of the bytes it now holds (attestLinked), and files what it hears as the compiler's own ICRC-126 attestation. Then it prints one of three words:

Nothing the CLI prints is evidence. The compiler's records are public canister state and its answer is a query, so anyone can repeat the question: change one byte of a verified wasm and the answer is a definite null.

What cannot be attested#

A --compact-rts link is the off-chain runtime's build; publish refuses it unless you pass --allow-offchain. --ephemeral and memory caps rewrite the module after the compiler signed off, so those artifacts publish as unverified.

On this pageTwo things before the first publishThe commandsThe verdict is pulled, not pushedWhat cannot be attested