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

@tokamak-zk-evm/subcircuit-library

v2.0.15

Published

Prebuilt R1CS subcircuit library package for Tokamak zk-EVM

Readme

Tokamak zk-EVM Subcircuit Library

Tokamak zk-EVM Subcircuit Library is a prebuilt R1CS subcircuit library package for Tokamak zk-EVM.

The published package exposes consumer-facing subcircuit artifacts, metadata, witness-generation helpers, and synced Circom constants used by Tokamak zk-EVM consumers on the main branch.

Release notes are maintained in the repository changelog.

Installation

npm install @tokamak-zk-evm/subcircuit-library

Package Contents

  • subcircuits/library/r1cs/: prebuilt R1CS subcircuit artifacts.
  • subcircuits/library/wasm/: per-subcircuit WASM artifacts used for witness generation and runtime loading.
  • subcircuits/library/json/: per-subcircuit JSON outputs generated alongside the compiled library.
  • subcircuits/library/*.json: library-wide metadata such as setup parameters, global wiring, frontend configuration, and the subcircuit catalog.
  • subcircuits/library/*.js: witness-generation helper scripts published with the library.
  • subcircuits/circom/constants.circom: synced Circom constants used by the generated library.
  • build-metadata.json: build metadata for the published package, including the tokamak-l2js package version used to generate the library.

Consumers

  • tokamak-cli: orchestrates install, setup, proving, and verification flows that package the generated subcircuit library into runnable resources.
  • synthesizer: consumes the published library metadata and WASM artifacts to synthesize transaction-specific circuit inputs.
  • backend: uses the subcircuit library as setup and proving input for the Tokamak zk-SNARK backend.
  • Tokamak-zk-EVM-contracts: integrates the generated subcircuit library through repository-level coordination with the Tokamak zk-EVM stack.

Example Integration

The synthesizer packages use the library as an installed artifact package rather than as a source dependency:

  1. They load library-wide metadata such as setup parameters, wiring data, frontend configuration, and the subcircuit catalog from the published package.
  2. They resolve that metadata into an internal subcircuit-library model used by the synthesizer runtime.
  3. They load the matching WASM subcircuit artifacts from the installed package to drive witness generation and execution-specific subcircuit handling.
  4. The web-facing synthesizer build can bundle those published assets ahead of time, while the Node-targeted synthesizer resolves them from the installed package at runtime.

Compatibility

Published artifacts are consumer-facing and platform-neutral. Maintainer-side regeneration of the library is documented separately.

| Surface | Compatibility | | --- | --- | | Consumer support | Supported for main-branch consumers of tokamak-cli, synthesizer, backend, and Tokamak-zk-EVM-contracts. | | Runtime shape | Consumers integrate against published R1CS, JSON metadata, WASM artifacts, witness-generation helpers, and synced Circom constants. | | Maintainer tooling | Source regeneration of the library is maintained on Node.js 18+ for macOS and Linux. |

FAQ

Is this package source circuits or prebuilt artifacts?

It is the published prebuilt subcircuit library package. Consumers use the generated artifacts that are shipped through npm.

How do consumers use this package?

Consumers install the package and read its published artifacts and metadata. They do not use it as an application-level API library.

What formats does the package publish?

The package publishes R1CS artifacts, WASM artifacts, JSON metadata, witness-generation helper scripts, and synced constants.circom.

Is it compatible with the Tokamak zk-EVM main branch?

Yes. This package is documented and maintained as the consumer-facing subcircuit library surface for main-branch Tokamak zk-EVM consumers.

Was this package previously called QAP compiler?

The maintainer-side generation algorithm and tooling are still referred to as qap-compiler in repository-internal contexts. The published consumer package is the Tokamak zk-EVM Subcircuit Library.

Further Documentation

Original Contribution

  • JehyukJang: Overall planning and direction. Constraints optimization.
  • pleiadex: Initial subcircuits design and implementation. Script development.
  • jdhyun09: Improvement of EVM compatibility. Constraints optimization.

License

Dual-licensed under MIT OR Apache-2.0.