Skip to content

About

Drop a Canton/Daml .dar and see what's inside: verified package IDs, templates, choices, CIP-56 token usage, and a version diff with an upgrade check. Runs fully in your browser.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Canton DAR Inspector

Listed on Canton Developer Hub

Drop a Canton / Daml .dar (or .dalf) file and see what it contains before you vet or upload it. Everything runs in your browser; the file is never uploaded.

What it shows

  • Package ID, re-computed. The SHA-256 of each package payload is calculated in the browser and checked against the hash stored in the archive and the ID in the file name. This is the same ID a participant shows when you vet the package.
  • Official Splice match. IDs are compared against packages from canton-network/splice, so you can see whether a file is an unmodified Splice release.
  • Token Standard (CIP-56) usage. Which templates implement Splice.Api.Token.* interfaces, and whether those interfaces come from the official API packages or an unrecognised package ID.
  • Contents. Modules, templates (fields, choices, consuming or not, argument and return types, implemented interfaces, keys), interfaces (view type, methods, choices) and serializable data types. Filterable.
  • Bundled dependencies with their IDs and LF versions.
  • Compare two versions. Drop an old and a new .dar to see templates, choices, fields, interfaces, data types and dependencies that were added, removed or changed. An upgrade check flags changes that Daml smart contract upgrades normally reject (removed templates, choices or fields, changed field types, new non-Optional fields, reordering). It is a structural check only; the dpm/damlc upgrade check is authoritative. Run against all 212 consecutive Splice releases (real upgrades), it flags none of them; reversed pairs such as amulet 0.1.25 → 0.1.24 are flagged.

Supports Daml-LF 2.x. LF 1.x packages are hash-verified but their contents are not decoded yet.

Develop

npm install
npm run dev        # http://localhost:5181
npm run selftest   # decode + diff the bundled sample DARs in Node
npm run build
npm run gen        # regenerate src/gen/lf.js after changing proto/

node scripts/known.mjs <dir-of-dars> regenerates src/known-packages.json (currently 283 IDs from all 246 DARs in canton-network/splice/daml/dars). node scripts/diff.mjs --all <dir-of-dars> diffs every consecutive version pair and prints any upgrade risks.

How it works

A .dar is a zip. Each .dalf inside is a protobuf Archive whose payload bytes are an ArchivePayload; the package ID is the SHA-256 of those payload bytes. The decoder (src/decoder.js) uses static protobufjs decoders generated from the official Daml-LF schema (src/gen/lf.js, built by scripts/gen-proto.mjs). Expression bodies are retyped as raw bytes before generation, which keeps large packages fast and avoids deep recursion. Because nothing is generated at runtime, the site runs under a strict Content-Security-Policy with no eval (see vercel.json).

License

Apache-2.0. See NOTICE for third-party schema and sample attributions. Not affiliated with Digital Asset or the Canton Foundation.

About

Drop a Canton/Daml .dar and see what's inside: verified package IDs, templates, choices, CIP-56 token usage, and a version diff with an upgrade check. Runs fully in your browser.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages