Skip to content

burnt-labs/email-wallet

 
 

Repository files navigation

Tx Auth Email Wallet

CLI Usage

npx circomkit compile <circuit_name>

# print circuit info if you want to
npx circomkit info <circuit_name>
  1. Commence circuit-specific setup. Normally, this requires us to download a Phase-1 PTAU file and provide it's path; however, Circomkit can determine the required PTAU and download it automatically when using bn128 curve, thanks to Perpetual Powers of Tau. In this case, sudoku_9x9 circuit has 4617 constraints, so Circomkit will download powersOfTau28_hez_final_13.ptau (see here).
npx circomkit setup <circuit_name>

# alternative: provide the PTAU yourself
npx circomkit setup <circuit_name> <path-to-ptau>
  1. Prepare your input file under ./inputs/<circuit_name>/default.json.

  2. We are ready to create a proof!

npx circomkit prove <circuit_name> default
  1. We can then verify our proof. You can try and modify the public input at ./build/<circuit_name>/default/public.json and see if the proof verifies or not!
npx circomkit verify <circuit_name> default

Configuration

Circomkit checks for circomkit.json to override it's default configurations. We could for example change the target version, prime field and the proof system by setting circomkit.json to be:

{
  "version": "2.1.2",
  "protocol": "plonk",
  "prime": "bls12381"
}

Testing

You can use the following commands to test the circuits:

# test everything
yarn test

# test a specific circuit
yarn test -g <circuit-name>

About

The ZKEmail Authenticator

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Circom 50.0%
  • TypeScript 28.3%
  • Rust 21.7%