npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

compact-zkir-lint

v0.2.0

Published

Find Compact circuit bugs before your users do. Detects JS/ZK divergence patterns where compact-runtime succeeds but proof validation fails.

Readme

compact-zkir-lint

Your Compact circuit compiled fine. Your tests pass. But the proof server rejects your transaction.

compact-zkir-lint tells you why before your users do.

npx compact-zkir-lint -r contracts/src/artifacts/
  addLiquidity (v2, k=13): 1 error(s)
    instructions: 343  inputs: 5  constrain_bits: 12  cond_select: 8
    guarded regions: 3 (max depth 2)  proof payload: ~384KB
    ERROR [DIV-001] inst 128: constrain_bits(bits=64) on arithmetic in conditional branch (guard=824)

1 error(s) | 4/11 circuits affected

Install and run

# Scan a single circuit
npx compact-zkir-lint circuit.zkir

# Scan all circuits in your compiled artifacts
npx compact-zkir-lint -r contracts/src/artifacts/

# Profile proving time across environments
npx compact-zkir-lint --profile -r contracts/src/artifacts/

# CI-friendly: SARIF output, non-zero exit on errors
npx compact-zkir-lint -r contracts/src/artifacts/ --format sarif > results.sarif

No dependencies on Midnight packages. Reads the .zkir JSON files that the compiler already produces. Works offline.

What it finds

In ZK circuits, both branches of an if/else execute unconditionally — only the result is selected via cond_select. Constraints inside dead branches fire on invalid intermediate values, causing proof failures that JS testing can't catch.

compact-zkir-lint detects 16 patterns across four categories:

| Category | Rules | Severity | |----------|-------|----------| | Divergence (DIV-) | DIV-001 through DIV-005 | error / warn | | Runtime (RT-) | RT-001 through RT-004 | warn / info | | Statistics (STATS-) | STATS-001, STATS-002 | info | | Performance (PERF-) | PERF-001 through PERF-006 | error / warn / info |

See the full rules reference for details, examples, and fix guidance.

How it works

  1. Parses compiled .zkir JSON files (v2 format, zero dependencies)
  2. Builds a data-flow graph: which instruction produces which memory variable
  3. Tracks guard propagation: which variables are inside conditional branches
  4. Memoized zero-analysis: determines if dead-branch values default to zero (safe) vs non-zero (dangerous)
  5. Flags constraint instructions operating on branch-local values before they reach a cond_select merge

Documentation

Acknowledgements

License

Apache-2.0