Skip to content

invers-technology/snarkjs-groth16-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snarkjs Groth16 Prover and Verifier with Typescript

Setup

sh setup.sh

Usage

import { Prover, Verifier } from "../src";

const compiledCircuitPath = "tests/mul.wasm";
const zkeyPath = "tests/mul_0001.zkey";
const vKeyPath = "tests/verification_key.json";

const prover = new Prover(compiledCircuitPath, zkeyPath);
const verifier = new Verifier(vKeyPath);

const inputs = { a: 2, b: 3 };
const { proof, publicSignals } = await prover.prove(inputs);
const verified = await verifier.verify(proof, publicSignals);

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors