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 🙏

© 2024 – Pkg Stats / Ryan Hefner

create-circom-project

v0.2.1

Published

A circom started project for simpler use and zero-knowledge project development with simple commands

Downloads

4

Readme

Create a Circom Project

Circom is a programming language and a toolchain for building and verifying zero-knowledge proofs (ZKPs). This command npx create-circom-project will create a new project with help you get started with a circom project in a min, with all the toolchain support pre-made. Also a bunch of useful scripts are provided to help you get started with your project. These are in form of npm run commands.

Commands available :-

  • npm run build - This will compile and build the r1cs and wasm files from the circom circuits.
  • npm run setup - This will executed the trusted setup needed with the help of the powersOfTau file in the project root, and generate the keys for the prover and verifier.
  • npm run inspect - This will inspect the circuit and print the circuit details. This uses circomspect to inspect the circuit.
  • npm run generate-verifier - This will generate the solidity verifier contract for the circom circuit.
  • npm run clean - This will clean the existing build folder and the other generated files.
  • npm run verify - This will run the scripts/main.js files, which will verify the proof generated by the prover. This is a sample script to help you get started with your project.

The project structure is as follows :-

├── README.md
├── circuits
│   ├── build
│   │   ├── circuit.r1cs
│   │   ├── circuit_js
│   │   │   ├── circuit.wasm
│   │   │   ├── generate_witness.js
│   │   │   └── witness_calculator.js
│   │   └── keys
│   │       ├── circuit_0000.zkey
│   │       └── verification_key.json
│   └── circuit.circom
├── contracts
│   └── Verifier.sol
├── hardhat.config.js
├── package-lock.json
├── package.json
├── powersOfTau28_hez_final_12.ptau
└── scripts
    ├── main.js
    └── utils
        ├── generateProof.js
        └── verify.js

The circuits files or .circom files are in the circom/ folder. The generated and other custom contracts are in the folder contracts/. The circom/build/ folder contains all the generated files from a circom circuit. Inside the folder circom/build/keys/ there will stay the keys generated for prover and the verifier. The project comes with native support of hardhat so you can compile your circuits with npx hardhat compile. All the other available hardhat commands are also available. The hardhat.config.js file is already configured to work with circom.

Install the dependencies for this command

  • Install rust
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
  • Install circom
git clone https://github.com/iden3/circom.git
cd circom
cargo build --release
cargo install --path circom