Running the Example
This guide will help to run the example project to test out the generated circuit.
Getting started
You only need a standard node
environment to run the example.
Start by downloding the example from the registry home page
Example project directory structure
Circuit Directory
This folder contains all the circuits that were auto-generated by the metadata from the pattern. You shouldn't directly edit the circom files in the regex/
directory. Use the zk-regex
SDK to generate it from your field.json
files.
zk-regex decomposed -d field.json -c fieldRegex.circom -t fieldRegex -g true
circuit/proof.circom
will be the main entry point for the circuit. Later you will see that this is imported in the tests.
Library
This folder only contains a script to generate the circuit inputs from a given email. The output of the script will be directly used in the circuit for proof generation
Worker Script
This script is used by the Registry SDK when generating circuit inputs in the browser. It basically acts as a sandboxed environment using WebWorkers to convert an email to circuit inputs.
Test Entry Point
This is the test entry point. You will need to paste in your raw email in a variable in the file before running it.
Unzip the project and install dependencies
Add your raw email sample
index.ts
Run the test
Once the witness generation is successful, the circuit works.
Last updated