Skip to content

Lightprotocol/circuit-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Circuits Template

This repo contains a minimal circuit in the circuit directory, a script to build it and a test to generate a proof and verify it.

The circuit proves that the addition of a + b == c if enforce unequal 0. This is an unsafe pattern since you cannot rely that the public input c is actually the sum of a + b since the enforce input is a private input. Also this highlights the difficulty of implementing conditional logic in circuits. All paths need to be defined at compile time of the circuit. Enforce is a work around this.

Run

Install Deps

npm i

build the circuit

npm run build

run

npm test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published