From 1fdbbb8b9c0ca836e92d5dcef028247ffe6bdc8e Mon Sep 17 00:00:00 2001 From: Jordi Baylina Date: Wed, 5 Sep 2018 05:24:24 +0200 Subject: [PATCH] Readme fixed and bigint exported --- README.md | 4 ++-- index.js | 1 + package.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b034e94..ff23791 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ const circuit = new zkSnark.Circuit(circuitDef); // input is a key value object where keys are the signal names // of all the inputs (public and private) // returns an array of values that represent the witness - circuit.generateWitness(input) + circuit.calculateWitness(input) ``` ### Trusted setup @@ -93,7 +93,7 @@ const input = { "main.pubIn1": "123", "main.out1": "456" } -const witness = circuit.generateWitness(input); +const witness = circuit.calculateWitness(input); const vk_proof = JSON.parse(fs.readFileSync("myCircuit.vk_proof", "utf8")); const {proof, publicSignals} = zkSnark.genProof(vk_proof, witness); diff --git a/index.js b/index.js index b21864f..8b69f41 100644 --- a/index.js +++ b/index.js @@ -21,3 +21,4 @@ exports.Circuit = require("./src/circuit.js"); exports.setup = require("./src/setup.js"); exports.genProof = require("./src/prover.js"); exports.isValid = require("./src/verifier.js"); +exports.bigInt = require("./src/bigint.js"); diff --git a/package.json b/package.json index 820ceff..ecee687 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zksnark", - "version": "0.0.1", + "version": "0.0.2", "description": "zkSnark implementation in javascript", "main": "index.js", "scripts": {