deps circom_runtime
This commit is contained in:
parent
fac9718ef6
commit
a5254903f4
250
build/cli.cjs
250
build/cli.cjs
@ -2,16 +2,24 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var fs = _interopDefault(require('fs'));
|
||||
var fs = require('fs');
|
||||
var ffjavascript = require('ffjavascript');
|
||||
var path = _interopDefault(require('path'));
|
||||
var Blake2b = _interopDefault(require('blake2b-wasm'));
|
||||
var readline = _interopDefault(require('readline'));
|
||||
var crypto = _interopDefault(require('crypto'));
|
||||
var circomRuntime = _interopDefault(require('circom_runtime'));
|
||||
var Logger = _interopDefault(require('logplease'));
|
||||
var path = require('path');
|
||||
var Blake2b = require('blake2b-wasm');
|
||||
var readline = require('readline');
|
||||
var crypto = require('crypto');
|
||||
var circomRuntime = require('circom_runtime');
|
||||
var Logger = require('logplease');
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
||||
var path__default = /*#__PURE__*/_interopDefaultLegacy(path);
|
||||
var Blake2b__default = /*#__PURE__*/_interopDefaultLegacy(Blake2b);
|
||||
var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
|
||||
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
||||
var circomRuntime__default = /*#__PURE__*/_interopDefaultLegacy(circomRuntime);
|
||||
var Logger__default = /*#__PURE__*/_interopDefaultLegacy(Logger);
|
||||
|
||||
const SUBARRAY_SIZE = 0x40000;
|
||||
|
||||
@ -96,7 +104,7 @@ async function open(fileName, openFlags, cacheSize, pageSize) {
|
||||
cacheSize = cacheSize || 4096*64;
|
||||
if (["w+", "wx+", "r", "ax+", "a+"].indexOf(openFlags) <0)
|
||||
throw new Error("Invalid open option");
|
||||
const fd =await fs.promises.open(fileName, openFlags);
|
||||
const fd =await fs__default['default'].promises.open(fileName, openFlags);
|
||||
|
||||
const stats = await fd.stat();
|
||||
|
||||
@ -445,7 +453,7 @@ class FastFile {
|
||||
async discard() {
|
||||
const self = this;
|
||||
await self.close();
|
||||
await fs.promises.unlink(this.fileName);
|
||||
await fs__default['default'].promises.unlink(this.fileName);
|
||||
}
|
||||
|
||||
async writeULE32(v, pos) {
|
||||
@ -1219,13 +1227,13 @@ async function r1csExportJson(r1csFileName, logger) {
|
||||
import pkg from "../package.json";
|
||||
const version = pkg.version;
|
||||
*/
|
||||
const __dirname$1 = path.dirname(new URL((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('cli.cjs', document.baseURI).href))).pathname);
|
||||
const __dirname$1 = path__default['default'].dirname(new URL((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('cli.cjs', document.baseURI).href))).pathname);
|
||||
|
||||
let pkgS;
|
||||
try {
|
||||
pkgS = fs.readFileSync(path.join(__dirname$1, "package.json"));
|
||||
pkgS = fs__default['default'].readFileSync(path__default['default'].join(__dirname$1, "package.json"));
|
||||
} catch (err) {
|
||||
pkgS = fs.readFileSync(path.join(__dirname$1, "..","package.json"));
|
||||
pkgS = fs__default['default'].readFileSync(path__default['default'].join(__dirname$1, "..","package.json"));
|
||||
}
|
||||
|
||||
const pkg = JSON.parse(pkgS);
|
||||
@ -1490,7 +1498,7 @@ function hashToG2(curve, hash) {
|
||||
|
||||
function getG2sp(curve, persinalization, challenge, g1s, g1sx) {
|
||||
|
||||
const h = Blake2b(64);
|
||||
const h = Blake2b__default['default'](64);
|
||||
const b1 = new Uint8Array([persinalization]);
|
||||
h.update(b1);
|
||||
h.update(challenge);
|
||||
@ -1579,7 +1587,7 @@ function hashIsEqual(h1, h2) {
|
||||
|
||||
function cloneHasher(h) {
|
||||
const ph = h.getPartialHash();
|
||||
const res = Blake2b(64);
|
||||
const res = Blake2b__default['default'](64);
|
||||
res.setPartialHash(ph);
|
||||
return res;
|
||||
}
|
||||
@ -1599,7 +1607,7 @@ function askEntropy() {
|
||||
if (process.browser) {
|
||||
return window.prompt("Enter a random text. (Entropy): ", "");
|
||||
} else {
|
||||
const rl = readline.createInterface({
|
||||
const rl = readline__default['default'].createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
@ -1615,8 +1623,8 @@ async function getRandomRng(entropy) {
|
||||
while (!entropy) {
|
||||
entropy = await askEntropy();
|
||||
}
|
||||
const hasher = Blake2b(64);
|
||||
hasher.update(crypto.randomBytes(64));
|
||||
const hasher = Blake2b__default['default'](64);
|
||||
hasher.update(crypto__default['default'].randomBytes(64));
|
||||
const enc = new TextEncoder(); // always utf-8
|
||||
hasher.update(enc.encode(entropy));
|
||||
const hash = Buffer.from(hasher.digest());
|
||||
@ -1643,7 +1651,7 @@ function rngFromBeaconParams(beaconHash, numIterationsExp) {
|
||||
let curHash = beaconHash;
|
||||
for (let i=0; i<nIterationsOuter; i++) {
|
||||
for (let j=0; j<nIterationsInner; j++) {
|
||||
curHash = crypto.createHash("sha256").update(curHash).digest();
|
||||
curHash = crypto__default['default'].createHash("sha256").update(curHash).digest();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1861,7 +1869,7 @@ async function readContribution(fd, curve) {
|
||||
const buffV = new Uint8Array(curve.G1.F.n8*2*6+curve.G2.F.n8*2*3);
|
||||
toPtauPubKeyRpr(buffV, 0, curve, c.key, false);
|
||||
|
||||
const responseHasher = Blake2b(64);
|
||||
const responseHasher = Blake2b__default['default'](64);
|
||||
responseHasher.setPartialHash(c.partialHash);
|
||||
responseHasher.update(buffV);
|
||||
c.responseHash = responseHasher.digest();
|
||||
@ -1998,14 +2006,14 @@ async function writeContributions(fd, curve, contributions) {
|
||||
function calculateFirstChallengeHash(curve, power, logger) {
|
||||
if (logger) logger.debug("Calculating First Challenge Hash");
|
||||
|
||||
const hasher = new Blake2b(64);
|
||||
const hasher = new Blake2b__default['default'](64);
|
||||
|
||||
const vG1 = new Uint8Array(curve.G1.F.n8*2);
|
||||
const vG2 = new Uint8Array(curve.G2.F.n8*2);
|
||||
curve.G1.toRprUncompressed(vG1, 0, curve.G1.g);
|
||||
curve.G2.toRprUncompressed(vG2, 0, curve.G2.g);
|
||||
|
||||
hasher.update(Blake2b(64).digest());
|
||||
hasher.update(Blake2b__default['default'](64).digest());
|
||||
|
||||
let n;
|
||||
|
||||
@ -2250,7 +2258,7 @@ contributions(7)
|
||||
|
||||
async function newAccumulator(curve, power, fileName, logger) {
|
||||
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const fd = await createBinFile(fileName, "ptau", 1, 7);
|
||||
|
||||
@ -2315,7 +2323,7 @@ async function newAccumulator(curve, power, fileName, logger) {
|
||||
|
||||
const firstChallengeHash = calculateFirstChallengeHash(curve, power, logger);
|
||||
|
||||
if (logger) logger.debug(formatHash(Blake2b(64).digest(), "Blank Contribution Hash:"));
|
||||
if (logger) logger.debug(formatHash(Blake2b__default['default'](64).digest(), "Blank Contribution Hash:"));
|
||||
|
||||
if (logger) logger.info(formatHash(firstChallengeHash, "First Contribution Hash:"));
|
||||
|
||||
@ -2326,7 +2334,7 @@ async function newAccumulator(curve, power, fileName, logger) {
|
||||
// Format of the outpu
|
||||
|
||||
async function exportChallenge(pTauFilename, challengeFilename, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
const {fd: fdFrom, sections} = await readBinFile$1(pTauFilename, "ptau", 1);
|
||||
|
||||
const {curve, power} = await readPTauHeader(fdFrom, sections);
|
||||
@ -2334,7 +2342,7 @@ async function exportChallenge(pTauFilename, challengeFilename, logger) {
|
||||
const contributions = await readContributions(fdFrom, curve, sections);
|
||||
let lastResponseHash, curChallengeHash;
|
||||
if (contributions.length == 0) {
|
||||
lastResponseHash = Blake2b(64).digest();
|
||||
lastResponseHash = Blake2b__default['default'](64).digest();
|
||||
curChallengeHash = calculateFirstChallengeHash(curve, power);
|
||||
} else {
|
||||
lastResponseHash = contributions[contributions.length-1].responseHash;
|
||||
@ -2348,7 +2356,7 @@ async function exportChallenge(pTauFilename, challengeFilename, logger) {
|
||||
|
||||
const fdTo = await createOverride(challengeFilename);
|
||||
|
||||
const toHash = Blake2b(64);
|
||||
const toHash = Blake2b__default['default'](64);
|
||||
await fdTo.write(lastResponseHash);
|
||||
toHash.update(lastResponseHash);
|
||||
|
||||
@ -2395,7 +2403,7 @@ async function exportChallenge(pTauFilename, challengeFilename, logger) {
|
||||
|
||||
async function importResponse(oldPtauFilename, contributionFilename, newPTauFilename, name, importPoints, logger) {
|
||||
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const noHash = new Uint8Array(64);
|
||||
for (let i=0; i<64; i++) noHash[i] = 0xFF;
|
||||
@ -2445,7 +2453,7 @@ async function importResponse(oldPtauFilename, contributionFilename, newPTauFile
|
||||
if(!hashIsEqual(contributionPreviousHash,lastChallengeHash))
|
||||
throw new Error("Wrong contribution. this contribution is not based on the previus hash");
|
||||
|
||||
const hasherResponse = new Blake2b(64);
|
||||
const hasherResponse = new Blake2b__default['default'](64);
|
||||
hasherResponse.update(contributionPreviousHash);
|
||||
|
||||
const startSections = [];
|
||||
@ -2474,7 +2482,7 @@ async function importResponse(oldPtauFilename, contributionFilename, newPTauFile
|
||||
if (logger) logger.info(formatHash(hashResponse, "Contribution Response Hash imported: "));
|
||||
|
||||
if (importPoints) {
|
||||
const nextChallengeHasher = new Blake2b(64);
|
||||
const nextChallengeHasher = new Blake2b__default['default'](64);
|
||||
nextChallengeHasher.update(hashResponse);
|
||||
|
||||
await hashSection(nextChallengeHasher, fdNew, "G1", 2, (2 ** power) * 2 -1, "tauG1", logger);
|
||||
@ -2705,7 +2713,7 @@ async function verifyContribution(curve, cur, prev, logger) {
|
||||
|
||||
async function verify(tauFilename, logger) {
|
||||
let sr;
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd, sections} = await readBinFile$1(tauFilename, "ptau", 1);
|
||||
const {curve, power, ceremonyPower} = await readPTauHeader(fd, sections);
|
||||
@ -2722,7 +2730,7 @@ async function verify(tauFilename, logger) {
|
||||
betaG1: curve.G1.g,
|
||||
betaG2: curve.G2.g,
|
||||
nextChallenge: calculateFirstChallengeHash(curve, ceremonyPower, logger),
|
||||
responseHash: Blake2b(64).digest()
|
||||
responseHash: Blake2b__default['default'](64).digest()
|
||||
};
|
||||
|
||||
if (contrs.length == 0) {
|
||||
@ -2742,7 +2750,7 @@ async function verify(tauFilename, logger) {
|
||||
if (!res) return false;
|
||||
|
||||
|
||||
const nextContributionHasher = Blake2b(64);
|
||||
const nextContributionHasher = Blake2b__default['default'](64);
|
||||
nextContributionHasher.update(curContr.responseHash);
|
||||
|
||||
// Verify powers and compute nextChallengeHash
|
||||
@ -2876,7 +2884,7 @@ async function verify(tauFilename, logger) {
|
||||
const buffV = new Uint8Array(curve.G1.F.n8*2*6+curve.G2.F.n8*2*3);
|
||||
toPtauPubKeyRpr(buffV, 0, curve, curContr.key, false);
|
||||
|
||||
const responseHasher = Blake2b(64);
|
||||
const responseHasher = Blake2b__default['default'](64);
|
||||
responseHasher.setPartialHash(curContr.partialHash);
|
||||
responseHasher.update(buffV);
|
||||
const responseHash = responseHasher.digest();
|
||||
@ -2938,12 +2946,12 @@ async function verify(tauFilename, logger) {
|
||||
nextContributionHasher.update(basesU);
|
||||
|
||||
const scalars = new Uint8Array(4*(n-1));
|
||||
crypto.randomFillSync(scalars);
|
||||
crypto__default['default'].randomFillSync(scalars);
|
||||
|
||||
|
||||
if (i>0) {
|
||||
const firstBase = G.fromRprLEM(bases, 0);
|
||||
const r = crypto.randomBytes(4).readUInt32BE(0, true);
|
||||
const r = crypto__default['default'].randomBytes(4).readUInt32BE(0, true);
|
||||
|
||||
R1 = G.add(R1, G.timesScalar(lastBase, r));
|
||||
R2 = G.add(R2, G.timesScalar(firstBase, r));
|
||||
@ -2984,7 +2992,7 @@ async function verify(tauFilename, logger) {
|
||||
|
||||
const seed= new Array(8);
|
||||
for (let i=0; i<8; i++) {
|
||||
seed[i] = crypto.randomBytes(4).readUInt32BE(0, true);
|
||||
seed[i] = crypto__default['default'].randomBytes(4).readUInt32BE(0, true);
|
||||
}
|
||||
|
||||
for (let p=0; p<= power; p ++) {
|
||||
@ -3132,7 +3140,7 @@ async function applyKeyToChallengeSection(fdOld, fdNew, responseHasher, curve, g
|
||||
// Format of the output
|
||||
|
||||
async function challengeContribute(curve, challengeFilename, responesFileName, entropy, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const fdFrom = await readExisting$2(challengeFilename);
|
||||
|
||||
@ -3155,7 +3163,7 @@ async function challengeContribute(curve, challengeFilename, responesFileName, e
|
||||
const fdTo = await createOverride(responesFileName);
|
||||
|
||||
// Calculate the hash
|
||||
const challengeHasher = Blake2b(64);
|
||||
const challengeHasher = Blake2b__default['default'](64);
|
||||
for (let i=0; i<fdFrom.totalSize; i+= fdFrom.pageSize) {
|
||||
if (logger) logger.debug(`Hashing challenge ${i}/${fdFrom.totalSize}`);
|
||||
const s = Math.min(fdFrom.totalSize - i, fdFrom.pageSize);
|
||||
@ -3181,7 +3189,7 @@ async function challengeContribute(curve, challengeFilename, responesFileName, e
|
||||
});
|
||||
}
|
||||
|
||||
const responseHasher = Blake2b(64);
|
||||
const responseHasher = Blake2b__default['default'](64);
|
||||
|
||||
await fdTo.write(challengeHash);
|
||||
responseHasher.update(challengeHash);
|
||||
@ -3224,7 +3232,7 @@ async function beacon(oldPtauFilename, newPTauFilename, name, beaconHashStr,num
|
||||
}
|
||||
|
||||
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd: fdOld, sections} = await readBinFile$1(oldPtauFilename, "ptau", 1);
|
||||
const {curve, power, ceremonyPower} = await readPTauHeader(fdOld, sections);
|
||||
@ -3253,7 +3261,7 @@ async function beacon(oldPtauFilename, newPTauFilename, name, beaconHashStr,num
|
||||
|
||||
curContribution.key = keyFromBeacon(curve, lastChallengeHash, beaconHash, numIterationsExp);
|
||||
|
||||
const responseHasher = new Blake2b(64);
|
||||
const responseHasher = new Blake2b__default['default'](64);
|
||||
responseHasher.update(lastChallengeHash);
|
||||
|
||||
const fdNew = await createBinFile(newPTauFilename, "ptau", 1, 7);
|
||||
@ -3284,7 +3292,7 @@ async function beacon(oldPtauFilename, newPTauFilename, name, beaconHashStr,num
|
||||
|
||||
if (logger) logger.info(formatHash(hashResponse, "Contribution Response Hash imported: "));
|
||||
|
||||
const nextChallengeHasher = new Blake2b(64);
|
||||
const nextChallengeHasher = new Blake2b__default['default'](64);
|
||||
nextChallengeHasher.update(hashResponse);
|
||||
|
||||
await hashSection(fdNew, "G1", 2, (2 ** power) * 2 -1, "tauG1", logger);
|
||||
@ -3375,7 +3383,7 @@ async function beacon(oldPtauFilename, newPTauFilename, name, beaconHashStr,num
|
||||
// Format of the output
|
||||
|
||||
async function contribute(oldPtauFilename, newPTauFilename, name, entropy, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd: fdOld, sections} = await readBinFile$1(oldPtauFilename, "ptau", 1);
|
||||
const {curve, power, ceremonyPower} = await readPTauHeader(fdOld, sections);
|
||||
@ -3408,7 +3416,7 @@ async function contribute(oldPtauFilename, newPTauFilename, name, entropy, logge
|
||||
curContribution.key = createPTauKey(curve, lastChallengeHash, rng);
|
||||
|
||||
|
||||
const responseHasher = new Blake2b(64);
|
||||
const responseHasher = new Blake2b__default['default'](64);
|
||||
responseHasher.update(lastChallengeHash);
|
||||
|
||||
const fdNew = await createBinFile(newPTauFilename, "ptau", 1, 7);
|
||||
@ -3439,7 +3447,7 @@ async function contribute(oldPtauFilename, newPTauFilename, name, entropy, logge
|
||||
|
||||
if (logger) logger.info(formatHash(hashResponse, "Contribution Response Hash imported: "));
|
||||
|
||||
const nextChallengeHasher = new Blake2b(64);
|
||||
const nextChallengeHasher = new Blake2b__default['default'](64);
|
||||
nextChallengeHasher.update(hashResponse);
|
||||
|
||||
await hashSection(fdNew, "G1", 2, (2 ** power) * 2 -1, "tauG1");
|
||||
@ -3968,8 +3976,8 @@ async function newZKey(r1csName, ptauName, zkeyName, logger) {
|
||||
const TAU_G2 = 1;
|
||||
const ALPHATAU_G1 = 2;
|
||||
const BETATAU_G1 = 3;
|
||||
await Blake2b.ready();
|
||||
const csHasher = Blake2b(64);
|
||||
await Blake2b__default['default'].ready();
|
||||
const csHasher = Blake2b__default['default'](64);
|
||||
|
||||
const {fd: fdPTau, sections: sectionsPTau} = await readBinFile$1(ptauName, "ptau", 1, 1<<22, 1<<24);
|
||||
const {curve, power} = await readPTauHeader(fdPTau, sectionsPTau);
|
||||
@ -5176,7 +5184,7 @@ const sameRatio$2 = sameRatio;
|
||||
async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, logger) {
|
||||
|
||||
let sr;
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd, sections} = await readBinFile$1(zkeyFileName, "zkey", 2);
|
||||
const zkey = await readHeader(fd, sections, "groth16");
|
||||
@ -5187,7 +5195,7 @@ async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, lo
|
||||
|
||||
const mpcParams = await readMPCParams(fd, curve, sections);
|
||||
|
||||
const accumulatedHasher = Blake2b(64);
|
||||
const accumulatedHasher = Blake2b__default['default'](64);
|
||||
accumulatedHasher.update(mpcParams.csHash);
|
||||
let curDelta = curve.G1.g;
|
||||
for (let i=0; i<mpcParams.contributions.length; i++) {
|
||||
@ -5233,7 +5241,7 @@ async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, lo
|
||||
|
||||
hashPubKey(accumulatedHasher, curve, c);
|
||||
|
||||
const contributionHasher = Blake2b(64);
|
||||
const contributionHasher = Blake2b__default['default'](64);
|
||||
hashPubKey(contributionHasher, curve, c);
|
||||
|
||||
c.contributionHash = contributionHasher.digest();
|
||||
@ -5390,7 +5398,7 @@ async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, lo
|
||||
const bases2 = await fd2.read(n*sG);
|
||||
|
||||
const scalars = new Uint8Array(4*n);
|
||||
crypto.randomFillSync(scalars);
|
||||
crypto__default['default'].randomFillSync(scalars);
|
||||
|
||||
|
||||
const r1 = await G.multiExpAffine(bases1, scalars);
|
||||
@ -5422,7 +5430,7 @@ async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, lo
|
||||
|
||||
const seed= new Array(8);
|
||||
for (let i=0; i<8; i++) {
|
||||
seed[i] = crypto.randomBytes(4).readUInt32BE(0, true);
|
||||
seed[i] = crypto__default['default'].randomBytes(4).readUInt32BE(0, true);
|
||||
}
|
||||
const rng = new ffjavascript.ChaCha(seed);
|
||||
for (let i=0; i<zkey.domainSize-1; i++) { // Note that last one is zero
|
||||
@ -5568,7 +5576,7 @@ async function phase2verifyFromR1cs(r1csFileName, pTauFileName, zkeyFileName, lo
|
||||
}
|
||||
|
||||
async function phase2contribute(zkeyNameOld, zkeyNameNew, name, entropy, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd: fdOld, sections: sections} = await readBinFile$1(zkeyNameOld, "zkey", 2);
|
||||
const zkey = await readHeader(fdOld, sections, "groth16");
|
||||
@ -5582,7 +5590,7 @@ async function phase2contribute(zkeyNameOld, zkeyNameNew, name, entropy, logger)
|
||||
|
||||
const rng = await getRandomRng(entropy);
|
||||
|
||||
const transcriptHasher = Blake2b(64);
|
||||
const transcriptHasher = Blake2b__default['default'](64);
|
||||
transcriptHasher.update(mpcParams.csHash);
|
||||
for (let i=0; i<mpcParams.contributions.length; i++) {
|
||||
hashPubKey(transcriptHasher, curve, mpcParams.contributions[i]);
|
||||
@ -5635,7 +5643,7 @@ async function phase2contribute(zkeyNameOld, zkeyNameNew, name, entropy, logger)
|
||||
await fdOld.close();
|
||||
await fdNew.close();
|
||||
|
||||
const contributionHasher = Blake2b(64);
|
||||
const contributionHasher = Blake2b__default['default'](64);
|
||||
hashPubKey(contributionHasher, curve, curContribution);
|
||||
|
||||
const contribuionHash = contributionHasher.digest();
|
||||
@ -5647,7 +5655,7 @@ async function phase2contribute(zkeyNameOld, zkeyNameNew, name, entropy, logger)
|
||||
}
|
||||
|
||||
async function beacon$1(zkeyNameOld, zkeyNameNew, name, beaconHashStr, numIterationsExp, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const beaconHash = hex2ByteArray(beaconHashStr);
|
||||
if ( (beaconHash.byteLength == 0)
|
||||
@ -5679,7 +5687,7 @@ async function beacon$1(zkeyNameOld, zkeyNameNew, name, beaconHashStr, numIterat
|
||||
|
||||
const rng = await rngFromBeaconParams(beaconHash, numIterationsExp);
|
||||
|
||||
const transcriptHasher = Blake2b(64);
|
||||
const transcriptHasher = Blake2b__default['default'](64);
|
||||
transcriptHasher.update(mpcParams.csHash);
|
||||
for (let i=0; i<mpcParams.contributions.length; i++) {
|
||||
hashPubKey(transcriptHasher, curve, mpcParams.contributions[i]);
|
||||
@ -5735,7 +5743,7 @@ async function beacon$1(zkeyNameOld, zkeyNameNew, name, beaconHashStr, numIterat
|
||||
await fdOld.close();
|
||||
await fdNew.close();
|
||||
|
||||
const contributionHasher = Blake2b(64);
|
||||
const contributionHasher = Blake2b__default['default'](64);
|
||||
hashPubKey(contributionHasher, curve, curContribution);
|
||||
|
||||
const contribuionHash = contributionHasher.digest();
|
||||
@ -5755,7 +5763,7 @@ async function zkeyExportJson(zkeyFileName, verbose) {
|
||||
// Format of the output
|
||||
|
||||
async function bellmanContribute(curve, challengeFilename, responesFileName, entropy, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const rng = await getRandomRng(entropy);
|
||||
|
||||
@ -5814,7 +5822,7 @@ async function bellmanContribute(curve, challengeFilename, responesFileName, ent
|
||||
//////////
|
||||
/// Read contributions
|
||||
//////////
|
||||
const transcriptHasher = Blake2b(64);
|
||||
const transcriptHasher = Blake2b__default['default'](64);
|
||||
|
||||
const mpcParams = {};
|
||||
// csHash
|
||||
@ -5865,7 +5873,7 @@ async function bellmanContribute(curve, challengeFilename, responesFileName, ent
|
||||
await fdTo.write(c.transcript);
|
||||
}
|
||||
|
||||
const contributionHasher = Blake2b(64);
|
||||
const contributionHasher = Blake2b__default['default'](64);
|
||||
hashPubKey(contributionHasher, curve, curContribution);
|
||||
|
||||
const contributionHash = contributionHasher.digest();
|
||||
@ -6289,7 +6297,7 @@ async function joinABC(curve, zkey, a, b, c, logger) {
|
||||
return outBuff;
|
||||
}
|
||||
|
||||
const { WitnessCalculatorBuilder } = circomRuntime;
|
||||
const { WitnessCalculatorBuilder } = circomRuntime__default['default'];
|
||||
|
||||
async function wtnsCalculate(input, wasmFileName, wtnsFileName, options) {
|
||||
|
||||
@ -6388,7 +6396,7 @@ async function groth16Verify(vk_verifier, publicSignals, proof, logger) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const { WitnessCalculatorBuilder: WitnessCalculatorBuilder$1 } = circomRuntime;
|
||||
const { WitnessCalculatorBuilder: WitnessCalculatorBuilder$1 } = circomRuntime__default['default'];
|
||||
|
||||
async function wtnsDebug(input, wasmFileName, wtnsFileName, symName, options, logger) {
|
||||
|
||||
@ -6460,10 +6468,10 @@ async function wtnsExportJson(wtnsFileName) {
|
||||
along with jaz. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
const {stringifyBigInts: stringifyBigInts$3, unstringifyBigInts: unstringifyBigInts$1} = ffjavascript.utils;
|
||||
const logger = Logger.create("snarkJS", {showTimestamp:false});
|
||||
Logger.setLogLevel("INFO");
|
||||
const logger = Logger__default['default'].create("snarkJS", {showTimestamp:false});
|
||||
Logger__default['default'].setLogLevel("INFO");
|
||||
|
||||
const __dirname$2 = path.dirname(new URL((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('cli.cjs', document.baseURI).href))).pathname);
|
||||
const __dirname$2 = path__default['default'].dirname(new URL((typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('cli.cjs', document.baseURI).href))).pathname);
|
||||
|
||||
const commands = [
|
||||
{
|
||||
@ -6744,7 +6752,7 @@ function changeExt(fileName, newExt) {
|
||||
async function r1csInfo$1(params, options) {
|
||||
const r1csName = params[0] || "circuit.r1cs";
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
await r1csInfo(r1csName, logger);
|
||||
|
||||
@ -6757,7 +6765,7 @@ async function r1csPrint$1(params, options) {
|
||||
const r1csName = params[0] || "circuit.r1cs";
|
||||
const symName = params[1] || changeExt(r1csName, "sym");
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const cir = await readR1cs(r1csName, true, true, false);
|
||||
|
||||
@ -6774,12 +6782,12 @@ async function r1csExportJSON(params, options) {
|
||||
const r1csName = params[0] || "circuit.r1cs";
|
||||
const jsonName = params[1] || changeExt(r1csName, "json");
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const r1csObj = await r1csExportJson(r1csName, logger);
|
||||
|
||||
const S = JSON.stringify(r1csObj, null, 1);
|
||||
await fs.promises.writeFile(jsonName, S);
|
||||
await fs__default['default'].promises.writeFile(jsonName, S);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -6790,9 +6798,9 @@ async function wtnsCalculate$1(params, options) {
|
||||
const inputName = params[1] || "input.json";
|
||||
const witnessName = params[2] || "witness.wtns";
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const input = unstringifyBigInts$1(JSON.parse(await fs.promises.readFile(inputName, "utf8")));
|
||||
const input = unstringifyBigInts$1(JSON.parse(await fs__default['default'].promises.readFile(inputName, "utf8")));
|
||||
|
||||
await wtnsCalculate(input, wasmName, witnessName);
|
||||
|
||||
@ -6808,9 +6816,9 @@ async function wtnsDebug$1(params, options) {
|
||||
const witnessName = params[2] || "witness.wtns";
|
||||
const symName = params[3] || changeExt(wasmName, "sym");
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const input = unstringifyBigInts$1(JSON.parse(await fs.promises.readFile(inputName, "utf8")));
|
||||
const input = unstringifyBigInts$1(JSON.parse(await fs__default['default'].promises.readFile(inputName, "utf8")));
|
||||
|
||||
await wtnsDebug(input, wasmName, witnessName, symName, options, logger);
|
||||
|
||||
@ -6824,11 +6832,11 @@ async function wtnsExportJson$1(params, options) {
|
||||
const wtnsName = params[0] || "witness.wtns";
|
||||
const jsonName = params[1] || "witness.json";
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const w = await wtnsExportJson(wtnsName);
|
||||
|
||||
await fs.promises.writeFile(jsonName, JSON.stringify(stringifyBigInts$3(w), null, 1));
|
||||
await fs__default['default'].promises.writeFile(jsonName, JSON.stringify(stringifyBigInts$3(w), null, 1));
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -6866,12 +6874,12 @@ async function groth16Prove$1(params, options) {
|
||||
const proofName = params[2] || "proof.json";
|
||||
const publicName = params[3] || "public.json";
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const {proof, publicSignals} = await groth16Prove(zkeyName, witnessName, logger);
|
||||
|
||||
await fs.promises.writeFile(proofName, JSON.stringify(stringifyBigInts$3(proof), null, 1), "utf-8");
|
||||
await fs.promises.writeFile(publicName, JSON.stringify(stringifyBigInts$3(publicSignals), null, 1), "utf-8");
|
||||
await fs__default['default'].promises.writeFile(proofName, JSON.stringify(stringifyBigInts$3(proof), null, 1), "utf-8");
|
||||
await fs__default['default'].promises.writeFile(publicName, JSON.stringify(stringifyBigInts$3(publicSignals), null, 1), "utf-8");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -6885,14 +6893,14 @@ async function groth16FullProve$1(params, options) {
|
||||
const proofName = params[3] || "proof.json";
|
||||
const publicName = params[4] || "public.json";
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const input = unstringifyBigInts$1(JSON.parse(await fs.promises.readFile(inputName, "utf8")));
|
||||
const input = unstringifyBigInts$1(JSON.parse(await fs__default['default'].promises.readFile(inputName, "utf8")));
|
||||
|
||||
const {proof, publicSignals} = await groth16FullProve(input, wasmName, zkeyName, logger);
|
||||
|
||||
await fs.promises.writeFile(proofName, JSON.stringify(stringifyBigInts$3(proof), null, 1), "utf-8");
|
||||
await fs.promises.writeFile(publicName, JSON.stringify(stringifyBigInts$3(publicSignals), null, 1), "utf-8");
|
||||
await fs__default['default'].promises.writeFile(proofName, JSON.stringify(stringifyBigInts$3(proof), null, 1), "utf-8");
|
||||
await fs__default['default'].promises.writeFile(publicName, JSON.stringify(stringifyBigInts$3(publicSignals), null, 1), "utf-8");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -6904,11 +6912,11 @@ async function groth16Verify$1(params, options) {
|
||||
const publicName = params[1] || "public.json";
|
||||
const proofName = params[2] || "proof.json";
|
||||
|
||||
const verificationKey = unstringifyBigInts$1(JSON.parse(fs.readFileSync(verificationKeyName, "utf8")));
|
||||
const pub = unstringifyBigInts$1(JSON.parse(fs.readFileSync(publicName, "utf8")));
|
||||
const proof = unstringifyBigInts$1(JSON.parse(fs.readFileSync(proofName, "utf8")));
|
||||
const verificationKey = unstringifyBigInts$1(JSON.parse(fs__default['default'].readFileSync(verificationKeyName, "utf8")));
|
||||
const pub = unstringifyBigInts$1(JSON.parse(fs__default['default'].readFileSync(publicName, "utf8")));
|
||||
const proof = unstringifyBigInts$1(JSON.parse(fs__default['default'].readFileSync(proofName, "utf8")));
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const isValid = await groth16Verify(verificationKey, pub, proof, logger);
|
||||
|
||||
@ -6924,12 +6932,12 @@ async function zkeyExportVKey(params, options) {
|
||||
const zkeyName = params[0] || "circuit_final.zkey";
|
||||
const verificationKeyName = params[1] || "verification_key.json";
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const vKey = await zkeyExportVerificationKey(zkeyName);
|
||||
|
||||
const S = JSON.stringify(ffjavascript.utils.stringifyBigInts(vKey), null, 1);
|
||||
await fs.promises.writeFile(verificationKeyName, S);
|
||||
await fs__default['default'].promises.writeFile(verificationKeyName, S);
|
||||
}
|
||||
|
||||
// zkey export json [circuit_final.zkey] [circuit.zkey.json]",
|
||||
@ -6937,12 +6945,12 @@ async function zkeyExportJson$1(params, options) {
|
||||
const zkeyName = params[0] || "circuit_final.zkey";
|
||||
const zkeyJsonName = params[1] || "circuit_final.zkey.json";
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const zKey = await zkeyExportJson(zkeyName);
|
||||
|
||||
const S = JSON.stringify(ffjavascript.utils.stringifyBigInts(zKey), null, 1);
|
||||
await fs.promises.writeFile(zkeyJsonName, S);
|
||||
await fs__default['default'].promises.writeFile(zkeyJsonName, S);
|
||||
}
|
||||
|
||||
// solidity genverifier [circuit_final.zkey] [verifier.sol]
|
||||
@ -6962,19 +6970,19 @@ async function zkeyExportSolidityVerifier(params, options) {
|
||||
verifierName = params[1];
|
||||
}
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
let templateName;
|
||||
try {
|
||||
templateName = path.join( __dirname$2, "templates", "verifier_groth16.sol");
|
||||
await fs.promises.stat(templateName);
|
||||
templateName = path__default['default'].join( __dirname$2, "templates", "verifier_groth16.sol");
|
||||
await fs__default['default'].promises.stat(templateName);
|
||||
} catch (err) {
|
||||
templateName = path.join( __dirname$2, "..", "templates", "verifier_groth16.sol");
|
||||
templateName = path__default['default'].join( __dirname$2, "..", "templates", "verifier_groth16.sol");
|
||||
}
|
||||
|
||||
const verifierCode = await exportSolidityVerifier(zkeyName, templateName);
|
||||
|
||||
fs.writeFileSync(verifierName, verifierCode, "utf-8");
|
||||
fs__default['default'].writeFileSync(verifierName, verifierCode, "utf-8");
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -6997,10 +7005,10 @@ async function zkeyExportSolidityCalldata(params, options) {
|
||||
proofName = params[1];
|
||||
}
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const pub = unstringifyBigInts$1(JSON.parse(fs.readFileSync(publicName, "utf8")));
|
||||
const proof = unstringifyBigInts$1(JSON.parse(fs.readFileSync(proofName, "utf8")));
|
||||
const pub = unstringifyBigInts$1(JSON.parse(fs__default['default'].readFileSync(publicName, "utf8")));
|
||||
const proof = unstringifyBigInts$1(JSON.parse(fs__default['default'].readFileSync(proofName, "utf8")));
|
||||
|
||||
let inputs = "";
|
||||
for (let i=0; i<pub.length; i++) {
|
||||
@ -7054,7 +7062,7 @@ async function powersOfTauNew(params, options) {
|
||||
|
||||
const curve = await getCurveFromName(curveName);
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return await newAccumulator(curve, power, ptauName, logger);
|
||||
}
|
||||
@ -7071,7 +7079,7 @@ async function powersOfTauExportChallenge(params, options) {
|
||||
challengeName = params[1];
|
||||
}
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return await exportChallenge(ptauName, challengeName, logger);
|
||||
}
|
||||
@ -7091,7 +7099,7 @@ async function powersOfTauChallengeContribute(params, options) {
|
||||
responseName = params[2];
|
||||
}
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return await challengeContribute(curve, challengeName, responseName, options.entropy, logger);
|
||||
}
|
||||
@ -7111,7 +7119,7 @@ async function powersOfTauImport(params, options) {
|
||||
if (options.nopoints) importPoints = false;
|
||||
if (options.nocheck) doCheck = false;
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const res = await importResponse(oldPtauName, response, newPtauName, options.name, importPoints, logger);
|
||||
|
||||
@ -7126,7 +7134,7 @@ async function powersOfTauVerify(params, options) {
|
||||
|
||||
ptauName = params[0];
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const res = await verify(ptauName, logger);
|
||||
if (res === true) {
|
||||
@ -7147,7 +7155,7 @@ async function powersOfTauBeacon(params, options) {
|
||||
beaconHashStr = params[2];
|
||||
numIterationsExp = params[3];
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return await beacon(oldPtauName, newPtauName, options.name ,beaconHashStr, numIterationsExp, logger);
|
||||
}
|
||||
@ -7159,7 +7167,7 @@ async function powersOfTauContribute(params, options) {
|
||||
oldPtauName = params[0];
|
||||
newPtauName = params[1];
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return await contribute(oldPtauName, newPtauName, options.name , options.entropy, logger);
|
||||
}
|
||||
@ -7171,7 +7179,7 @@ async function powersOfTauPreparePhase2(params, options) {
|
||||
oldPtauName = params[0];
|
||||
newPtauName = params[1];
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return await preparePhase2(oldPtauName, newPtauName, logger);
|
||||
}
|
||||
@ -7183,7 +7191,7 @@ async function powersOfTauConvert(params, options) {
|
||||
oldPtauName = params[0];
|
||||
newPtauName = params[1];
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return await convert(oldPtauName, newPtauName, logger);
|
||||
}
|
||||
@ -7199,7 +7207,7 @@ async function powersOfTauTruncate(params, options) {
|
||||
template = template.slice(0, template.length-1);
|
||||
template = template+"_";
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return await truncate(ptauName, template, logger);
|
||||
}
|
||||
@ -7212,12 +7220,12 @@ async function powersOfTauExportJson(params, options) {
|
||||
ptauName = params[0];
|
||||
jsonName = params[1];
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const pTau = await exportJson(ptauName, logger);
|
||||
|
||||
const S = JSON.stringify(stringifyBigInts$3(pTau), null, 1);
|
||||
await fs.promises.writeFile(jsonName, S);
|
||||
await fs__default['default'].promises.writeFile(jsonName, S);
|
||||
|
||||
}
|
||||
|
||||
@ -7246,7 +7254,7 @@ async function zkeyNew(params, options) {
|
||||
zkeyName = params[2];
|
||||
}
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return newZKey(r1csName, ptauName, zkeyName, logger);
|
||||
}
|
||||
@ -7264,7 +7272,7 @@ async function zkeyExportBellman(params, options) {
|
||||
mpcparamsName = params[1];
|
||||
}
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return phase2exportMPCParams(zkeyName, mpcparamsName, logger);
|
||||
|
||||
@ -7281,7 +7289,7 @@ async function zkeyImportBellman(params, options) {
|
||||
mpcParamsName = params[1];
|
||||
zkeyNameNew = params[2];
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return phase2importMPCParams(zkeyNameOld, mpcParamsName, zkeyNameNew, options.name, logger);
|
||||
}
|
||||
@ -7310,7 +7318,7 @@ async function zkeyVerifyFromR1cs(params, options) {
|
||||
zkeyName = params[2];
|
||||
}
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const res = await phase2verifyFromR1cs(r1csName, ptauName, zkeyName, logger);
|
||||
if (res === true) {
|
||||
@ -7345,7 +7353,7 @@ async function zkeyVerifyFromInit(params, options) {
|
||||
zkeyName = params[2];
|
||||
}
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
const res = await phase2verifyFromInit(initZKeyName, ptauName, zkeyName, logger);
|
||||
if (res === true) {
|
||||
@ -7363,7 +7371,7 @@ async function zkeyContribute(params, options) {
|
||||
zkeyOldName = params[0];
|
||||
zkeyNewName = params[1];
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return phase2contribute(zkeyOldName, zkeyNewName, options.name, options.entropy, logger);
|
||||
}
|
||||
@ -7380,7 +7388,7 @@ async function zkeyBeacon(params, options) {
|
||||
beaconHashStr = params[2];
|
||||
numIterationsExp = params[3];
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return await beacon$1(zkeyOldName, zkeyNewName, options.name ,beaconHashStr, numIterationsExp, logger);
|
||||
}
|
||||
@ -7401,7 +7409,7 @@ async function zkeyBellmanContribute(params, options) {
|
||||
responseName = params[2];
|
||||
}
|
||||
|
||||
if (options.verbose) Logger.setLogLevel("DEBUG");
|
||||
if (options.verbose) Logger__default['default'].setLogLevel("DEBUG");
|
||||
|
||||
return bellmanContribute(curve, challengeName, responseName, options.entropy, logger);
|
||||
}
|
||||
|
126
build/main.cjs
126
build/main.cjs
@ -2,20 +2,26 @@
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var ffjavascript = require('ffjavascript');
|
||||
var fs = _interopDefault(require('fs'));
|
||||
var Blake2b = _interopDefault(require('blake2b-wasm'));
|
||||
var readline = _interopDefault(require('readline'));
|
||||
var crypto = _interopDefault(require('crypto'));
|
||||
var circomRuntime = _interopDefault(require('circom_runtime'));
|
||||
var fs = require('fs');
|
||||
var Blake2b = require('blake2b-wasm');
|
||||
var readline = require('readline');
|
||||
var crypto = require('crypto');
|
||||
var circomRuntime = require('circom_runtime');
|
||||
|
||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
||||
|
||||
var fs__default = /*#__PURE__*/_interopDefaultLegacy(fs);
|
||||
var Blake2b__default = /*#__PURE__*/_interopDefaultLegacy(Blake2b);
|
||||
var readline__default = /*#__PURE__*/_interopDefaultLegacy(readline);
|
||||
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
||||
var circomRuntime__default = /*#__PURE__*/_interopDefaultLegacy(circomRuntime);
|
||||
|
||||
async function open(fileName, openFlags, cacheSize, pageSize) {
|
||||
cacheSize = cacheSize || 4096*64;
|
||||
if (["w+", "wx+", "r", "ax+", "a+"].indexOf(openFlags) <0)
|
||||
throw new Error("Invalid open option");
|
||||
const fd =await fs.promises.open(fileName, openFlags);
|
||||
const fd =await fs__default['default'].promises.open(fileName, openFlags);
|
||||
|
||||
const stats = await fd.stat();
|
||||
|
||||
@ -364,7 +370,7 @@ class FastFile {
|
||||
async discard() {
|
||||
const self = this;
|
||||
await self.close();
|
||||
await fs.promises.unlink(this.fileName);
|
||||
await fs__default['default'].promises.unlink(this.fileName);
|
||||
}
|
||||
|
||||
async writeULE32(v, pos) {
|
||||
@ -1063,7 +1069,7 @@ function hashIsEqual(h1, h2) {
|
||||
|
||||
function cloneHasher(h) {
|
||||
const ph = h.getPartialHash();
|
||||
const res = Blake2b(64);
|
||||
const res = Blake2b__default['default'](64);
|
||||
res.setPartialHash(ph);
|
||||
return res;
|
||||
}
|
||||
@ -1083,7 +1089,7 @@ function askEntropy() {
|
||||
if (process.browser) {
|
||||
return window.prompt("Enter a random text. (Entropy): ", "");
|
||||
} else {
|
||||
const rl = readline.createInterface({
|
||||
const rl = readline__default['default'].createInterface({
|
||||
input: process.stdin,
|
||||
output: process.stdout
|
||||
});
|
||||
@ -1099,8 +1105,8 @@ async function getRandomRng(entropy) {
|
||||
while (!entropy) {
|
||||
entropy = await askEntropy();
|
||||
}
|
||||
const hasher = Blake2b(64);
|
||||
hasher.update(crypto.randomBytes(64));
|
||||
const hasher = Blake2b__default['default'](64);
|
||||
hasher.update(crypto__default['default'].randomBytes(64));
|
||||
const enc = new TextEncoder(); // always utf-8
|
||||
hasher.update(enc.encode(entropy));
|
||||
const hash = Buffer.from(hasher.digest());
|
||||
@ -1127,7 +1133,7 @@ function rngFromBeaconParams(beaconHash, numIterationsExp) {
|
||||
let curHash = beaconHash;
|
||||
for (let i=0; i<nIterationsOuter; i++) {
|
||||
for (let j=0; j<nIterationsInner; j++) {
|
||||
curHash = crypto.createHash("sha256").update(curHash).digest();
|
||||
curHash = crypto__default['default'].createHash("sha256").update(curHash).digest();
|
||||
}
|
||||
}
|
||||
|
||||
@ -1769,7 +1775,7 @@ async function joinABC(curve, zkey, a, b, c, logger) {
|
||||
return outBuff;
|
||||
}
|
||||
|
||||
const { WitnessCalculatorBuilder } = circomRuntime;
|
||||
const { WitnessCalculatorBuilder } = circomRuntime__default['default'];
|
||||
|
||||
async function wtnsCalculate(input, wasmFileName, wtnsFileName, options) {
|
||||
|
||||
@ -1891,7 +1897,7 @@ function hashToG2(curve, hash) {
|
||||
|
||||
function getG2sp(curve, persinalization, challenge, g1s, g1sx) {
|
||||
|
||||
const h = Blake2b(64);
|
||||
const h = Blake2b__default['default'](64);
|
||||
const b1 = new Uint8Array([persinalization]);
|
||||
h.update(b1);
|
||||
h.update(challenge);
|
||||
@ -2080,7 +2086,7 @@ async function readContribution$1(fd, curve) {
|
||||
const buffV = new Uint8Array(curve.G1.F.n8*2*6+curve.G2.F.n8*2*3);
|
||||
toPtauPubKeyRpr(buffV, 0, curve, c.key, false);
|
||||
|
||||
const responseHasher = Blake2b(64);
|
||||
const responseHasher = Blake2b__default['default'](64);
|
||||
responseHasher.setPartialHash(c.partialHash);
|
||||
responseHasher.update(buffV);
|
||||
c.responseHash = responseHasher.digest();
|
||||
@ -2217,14 +2223,14 @@ async function writeContributions(fd, curve, contributions) {
|
||||
function calculateFirstChallengeHash(curve, power, logger) {
|
||||
if (logger) logger.debug("Calculating First Challenge Hash");
|
||||
|
||||
const hasher = new Blake2b(64);
|
||||
const hasher = new Blake2b__default['default'](64);
|
||||
|
||||
const vG1 = new Uint8Array(curve.G1.F.n8*2);
|
||||
const vG2 = new Uint8Array(curve.G2.F.n8*2);
|
||||
curve.G1.toRprUncompressed(vG1, 0, curve.G1.g);
|
||||
curve.G2.toRprUncompressed(vG2, 0, curve.G2.g);
|
||||
|
||||
hasher.update(Blake2b(64).digest());
|
||||
hasher.update(Blake2b__default['default'](64).digest());
|
||||
|
||||
let n;
|
||||
|
||||
@ -2320,7 +2326,7 @@ contributions(7)
|
||||
|
||||
async function newAccumulator(curve, power, fileName, logger) {
|
||||
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const fd = await createBinFile(fileName, "ptau", 1, 7);
|
||||
|
||||
@ -2385,7 +2391,7 @@ async function newAccumulator(curve, power, fileName, logger) {
|
||||
|
||||
const firstChallengeHash = calculateFirstChallengeHash(curve, power, logger);
|
||||
|
||||
if (logger) logger.debug(formatHash(Blake2b(64).digest(), "Blank Contribution Hash:"));
|
||||
if (logger) logger.debug(formatHash(Blake2b__default['default'](64).digest(), "Blank Contribution Hash:"));
|
||||
|
||||
if (logger) logger.info(formatHash(firstChallengeHash, "First Contribution Hash:"));
|
||||
|
||||
@ -2396,7 +2402,7 @@ async function newAccumulator(curve, power, fileName, logger) {
|
||||
// Format of the outpu
|
||||
|
||||
async function exportChallenge(pTauFilename, challengeFilename, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
const {fd: fdFrom, sections} = await readBinFile(pTauFilename, "ptau", 1);
|
||||
|
||||
const {curve, power} = await readPTauHeader(fdFrom, sections);
|
||||
@ -2404,7 +2410,7 @@ async function exportChallenge(pTauFilename, challengeFilename, logger) {
|
||||
const contributions = await readContributions(fdFrom, curve, sections);
|
||||
let lastResponseHash, curChallengeHash;
|
||||
if (contributions.length == 0) {
|
||||
lastResponseHash = Blake2b(64).digest();
|
||||
lastResponseHash = Blake2b__default['default'](64).digest();
|
||||
curChallengeHash = calculateFirstChallengeHash(curve, power);
|
||||
} else {
|
||||
lastResponseHash = contributions[contributions.length-1].responseHash;
|
||||
@ -2418,7 +2424,7 @@ async function exportChallenge(pTauFilename, challengeFilename, logger) {
|
||||
|
||||
const fdTo = await createOverride(challengeFilename);
|
||||
|
||||
const toHash = Blake2b(64);
|
||||
const toHash = Blake2b__default['default'](64);
|
||||
await fdTo.write(lastResponseHash);
|
||||
toHash.update(lastResponseHash);
|
||||
|
||||
@ -2465,7 +2471,7 @@ async function exportChallenge(pTauFilename, challengeFilename, logger) {
|
||||
|
||||
async function importResponse(oldPtauFilename, contributionFilename, newPTauFilename, name, importPoints, logger) {
|
||||
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const noHash = new Uint8Array(64);
|
||||
for (let i=0; i<64; i++) noHash[i] = 0xFF;
|
||||
@ -2515,7 +2521,7 @@ async function importResponse(oldPtauFilename, contributionFilename, newPTauFile
|
||||
if(!hashIsEqual(contributionPreviousHash,lastChallengeHash))
|
||||
throw new Error("Wrong contribution. this contribution is not based on the previus hash");
|
||||
|
||||
const hasherResponse = new Blake2b(64);
|
||||
const hasherResponse = new Blake2b__default['default'](64);
|
||||
hasherResponse.update(contributionPreviousHash);
|
||||
|
||||
const startSections = [];
|
||||
@ -2544,7 +2550,7 @@ async function importResponse(oldPtauFilename, contributionFilename, newPTauFile
|
||||
if (logger) logger.info(formatHash(hashResponse, "Contribution Response Hash imported: "));
|
||||
|
||||
if (importPoints) {
|
||||
const nextChallengeHasher = new Blake2b(64);
|
||||
const nextChallengeHasher = new Blake2b__default['default'](64);
|
||||
nextChallengeHasher.update(hashResponse);
|
||||
|
||||
await hashSection(nextChallengeHasher, fdNew, "G1", 2, (2 ** power) * 2 -1, "tauG1", logger);
|
||||
@ -2775,7 +2781,7 @@ async function verifyContribution(curve, cur, prev, logger) {
|
||||
|
||||
async function verify(tauFilename, logger) {
|
||||
let sr;
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd, sections} = await readBinFile(tauFilename, "ptau", 1);
|
||||
const {curve, power, ceremonyPower} = await readPTauHeader(fd, sections);
|
||||
@ -2792,7 +2798,7 @@ async function verify(tauFilename, logger) {
|
||||
betaG1: curve.G1.g,
|
||||
betaG2: curve.G2.g,
|
||||
nextChallenge: calculateFirstChallengeHash(curve, ceremonyPower, logger),
|
||||
responseHash: Blake2b(64).digest()
|
||||
responseHash: Blake2b__default['default'](64).digest()
|
||||
};
|
||||
|
||||
if (contrs.length == 0) {
|
||||
@ -2812,7 +2818,7 @@ async function verify(tauFilename, logger) {
|
||||
if (!res) return false;
|
||||
|
||||
|
||||
const nextContributionHasher = Blake2b(64);
|
||||
const nextContributionHasher = Blake2b__default['default'](64);
|
||||
nextContributionHasher.update(curContr.responseHash);
|
||||
|
||||
// Verify powers and compute nextChallengeHash
|
||||
@ -2946,7 +2952,7 @@ async function verify(tauFilename, logger) {
|
||||
const buffV = new Uint8Array(curve.G1.F.n8*2*6+curve.G2.F.n8*2*3);
|
||||
toPtauPubKeyRpr(buffV, 0, curve, curContr.key, false);
|
||||
|
||||
const responseHasher = Blake2b(64);
|
||||
const responseHasher = Blake2b__default['default'](64);
|
||||
responseHasher.setPartialHash(curContr.partialHash);
|
||||
responseHasher.update(buffV);
|
||||
const responseHash = responseHasher.digest();
|
||||
@ -3008,12 +3014,12 @@ async function verify(tauFilename, logger) {
|
||||
nextContributionHasher.update(basesU);
|
||||
|
||||
const scalars = new Uint8Array(4*(n-1));
|
||||
crypto.randomFillSync(scalars);
|
||||
crypto__default['default'].randomFillSync(scalars);
|
||||
|
||||
|
||||
if (i>0) {
|
||||
const firstBase = G.fromRprLEM(bases, 0);
|
||||
const r = crypto.randomBytes(4).readUInt32BE(0, true);
|
||||
const r = crypto__default['default'].randomBytes(4).readUInt32BE(0, true);
|
||||
|
||||
R1 = G.add(R1, G.timesScalar(lastBase, r));
|
||||
R2 = G.add(R2, G.timesScalar(firstBase, r));
|
||||
@ -3054,7 +3060,7 @@ async function verify(tauFilename, logger) {
|
||||
|
||||
const seed= new Array(8);
|
||||
for (let i=0; i<8; i++) {
|
||||
seed[i] = crypto.randomBytes(4).readUInt32BE(0, true);
|
||||
seed[i] = crypto__default['default'].randomBytes(4).readUInt32BE(0, true);
|
||||
}
|
||||
|
||||
for (let p=0; p<= power; p ++) {
|
||||
@ -3202,7 +3208,7 @@ async function applyKeyToChallengeSection(fdOld, fdNew, responseHasher, curve, g
|
||||
// Format of the output
|
||||
|
||||
async function challengeContribute(curve, challengeFilename, responesFileName, entropy, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const fdFrom = await readExisting$2(challengeFilename);
|
||||
|
||||
@ -3225,7 +3231,7 @@ async function challengeContribute(curve, challengeFilename, responesFileName, e
|
||||
const fdTo = await createOverride(responesFileName);
|
||||
|
||||
// Calculate the hash
|
||||
const challengeHasher = Blake2b(64);
|
||||
const challengeHasher = Blake2b__default['default'](64);
|
||||
for (let i=0; i<fdFrom.totalSize; i+= fdFrom.pageSize) {
|
||||
if (logger) logger.debug(`Hashing challenge ${i}/${fdFrom.totalSize}`);
|
||||
const s = Math.min(fdFrom.totalSize - i, fdFrom.pageSize);
|
||||
@ -3251,7 +3257,7 @@ async function challengeContribute(curve, challengeFilename, responesFileName, e
|
||||
});
|
||||
}
|
||||
|
||||
const responseHasher = Blake2b(64);
|
||||
const responseHasher = Blake2b__default['default'](64);
|
||||
|
||||
await fdTo.write(challengeHash);
|
||||
responseHasher.update(challengeHash);
|
||||
@ -3294,7 +3300,7 @@ async function beacon(oldPtauFilename, newPTauFilename, name, beaconHashStr,num
|
||||
}
|
||||
|
||||
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd: fdOld, sections} = await readBinFile(oldPtauFilename, "ptau", 1);
|
||||
const {curve, power, ceremonyPower} = await readPTauHeader(fdOld, sections);
|
||||
@ -3323,7 +3329,7 @@ async function beacon(oldPtauFilename, newPTauFilename, name, beaconHashStr,num
|
||||
|
||||
curContribution.key = keyFromBeacon(curve, lastChallengeHash, beaconHash, numIterationsExp);
|
||||
|
||||
const responseHasher = new Blake2b(64);
|
||||
const responseHasher = new Blake2b__default['default'](64);
|
||||
responseHasher.update(lastChallengeHash);
|
||||
|
||||
const fdNew = await createBinFile(newPTauFilename, "ptau", 1, 7);
|
||||
@ -3354,7 +3360,7 @@ async function beacon(oldPtauFilename, newPTauFilename, name, beaconHashStr,num
|
||||
|
||||
if (logger) logger.info(formatHash(hashResponse, "Contribution Response Hash imported: "));
|
||||
|
||||
const nextChallengeHasher = new Blake2b(64);
|
||||
const nextChallengeHasher = new Blake2b__default['default'](64);
|
||||
nextChallengeHasher.update(hashResponse);
|
||||
|
||||
await hashSection(fdNew, "G1", 2, (2 ** power) * 2 -1, "tauG1", logger);
|
||||
@ -3445,7 +3451,7 @@ async function beacon(oldPtauFilename, newPTauFilename, name, beaconHashStr,num
|
||||
// Format of the output
|
||||
|
||||
async function contribute(oldPtauFilename, newPTauFilename, name, entropy, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd: fdOld, sections} = await readBinFile(oldPtauFilename, "ptau", 1);
|
||||
const {curve, power, ceremonyPower} = await readPTauHeader(fdOld, sections);
|
||||
@ -3478,7 +3484,7 @@ async function contribute(oldPtauFilename, newPTauFilename, name, entropy, logge
|
||||
curContribution.key = createPTauKey(curve, lastChallengeHash, rng);
|
||||
|
||||
|
||||
const responseHasher = new Blake2b(64);
|
||||
const responseHasher = new Blake2b__default['default'](64);
|
||||
responseHasher.update(lastChallengeHash);
|
||||
|
||||
const fdNew = await createBinFile(newPTauFilename, "ptau", 1, 7);
|
||||
@ -3509,7 +3515,7 @@ async function contribute(oldPtauFilename, newPTauFilename, name, entropy, logge
|
||||
|
||||
if (logger) logger.info(formatHash(hashResponse, "Contribution Response Hash imported: "));
|
||||
|
||||
const nextChallengeHasher = new Blake2b(64);
|
||||
const nextChallengeHasher = new Blake2b__default['default'](64);
|
||||
nextChallengeHasher.update(hashResponse);
|
||||
|
||||
await hashSection(fdNew, "G1", 2, (2 ** power) * 2 -1, "tauG1");
|
||||
@ -4363,7 +4369,7 @@ async function loadSymbols(symFileName) {
|
||||
}
|
||||
}
|
||||
|
||||
const { WitnessCalculatorBuilder: WitnessCalculatorBuilder$1 } = circomRuntime;
|
||||
const { WitnessCalculatorBuilder: WitnessCalculatorBuilder$1 } = circomRuntime__default['default'];
|
||||
|
||||
async function wtnsDebug(input, wasmFileName, wtnsFileName, symName, options, logger) {
|
||||
|
||||
@ -4508,8 +4514,8 @@ async function newZKey(r1csName, ptauName, zkeyName, logger) {
|
||||
const TAU_G2 = 1;
|
||||
const ALPHATAU_G1 = 2;
|
||||
const BETATAU_G1 = 3;
|
||||
await Blake2b.ready();
|
||||
const csHasher = Blake2b(64);
|
||||
await Blake2b__default['default'].ready();
|
||||
const csHasher = Blake2b__default['default'](64);
|
||||
|
||||
const {fd: fdPTau, sections: sectionsPTau} = await readBinFile(ptauName, "ptau", 1, 1<<22, 1<<24);
|
||||
const {curve, power} = await readPTauHeader(fdPTau, sectionsPTau);
|
||||
@ -5386,7 +5392,7 @@ const sameRatio$2 = sameRatio;
|
||||
async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, logger) {
|
||||
|
||||
let sr;
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd, sections} = await readBinFile(zkeyFileName, "zkey", 2);
|
||||
const zkey = await readHeader(fd, sections, "groth16");
|
||||
@ -5397,7 +5403,7 @@ async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, lo
|
||||
|
||||
const mpcParams = await readMPCParams(fd, curve, sections);
|
||||
|
||||
const accumulatedHasher = Blake2b(64);
|
||||
const accumulatedHasher = Blake2b__default['default'](64);
|
||||
accumulatedHasher.update(mpcParams.csHash);
|
||||
let curDelta = curve.G1.g;
|
||||
for (let i=0; i<mpcParams.contributions.length; i++) {
|
||||
@ -5443,7 +5449,7 @@ async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, lo
|
||||
|
||||
hashPubKey(accumulatedHasher, curve, c);
|
||||
|
||||
const contributionHasher = Blake2b(64);
|
||||
const contributionHasher = Blake2b__default['default'](64);
|
||||
hashPubKey(contributionHasher, curve, c);
|
||||
|
||||
c.contributionHash = contributionHasher.digest();
|
||||
@ -5600,7 +5606,7 @@ async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, lo
|
||||
const bases2 = await fd2.read(n*sG);
|
||||
|
||||
const scalars = new Uint8Array(4*n);
|
||||
crypto.randomFillSync(scalars);
|
||||
crypto__default['default'].randomFillSync(scalars);
|
||||
|
||||
|
||||
const r1 = await G.multiExpAffine(bases1, scalars);
|
||||
@ -5632,7 +5638,7 @@ async function phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, lo
|
||||
|
||||
const seed= new Array(8);
|
||||
for (let i=0; i<8; i++) {
|
||||
seed[i] = crypto.randomBytes(4).readUInt32BE(0, true);
|
||||
seed[i] = crypto__default['default'].randomBytes(4).readUInt32BE(0, true);
|
||||
}
|
||||
const rng = new ffjavascript.ChaCha(seed);
|
||||
for (let i=0; i<zkey.domainSize-1; i++) { // Note that last one is zero
|
||||
@ -5778,7 +5784,7 @@ async function phase2verifyFromR1cs(r1csFileName, pTauFileName, zkeyFileName, lo
|
||||
}
|
||||
|
||||
async function phase2contribute(zkeyNameOld, zkeyNameNew, name, entropy, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const {fd: fdOld, sections: sections} = await readBinFile(zkeyNameOld, "zkey", 2);
|
||||
const zkey = await readHeader(fdOld, sections, "groth16");
|
||||
@ -5792,7 +5798,7 @@ async function phase2contribute(zkeyNameOld, zkeyNameNew, name, entropy, logger)
|
||||
|
||||
const rng = await getRandomRng(entropy);
|
||||
|
||||
const transcriptHasher = Blake2b(64);
|
||||
const transcriptHasher = Blake2b__default['default'](64);
|
||||
transcriptHasher.update(mpcParams.csHash);
|
||||
for (let i=0; i<mpcParams.contributions.length; i++) {
|
||||
hashPubKey(transcriptHasher, curve, mpcParams.contributions[i]);
|
||||
@ -5845,7 +5851,7 @@ async function phase2contribute(zkeyNameOld, zkeyNameNew, name, entropy, logger)
|
||||
await fdOld.close();
|
||||
await fdNew.close();
|
||||
|
||||
const contributionHasher = Blake2b(64);
|
||||
const contributionHasher = Blake2b__default['default'](64);
|
||||
hashPubKey(contributionHasher, curve, curContribution);
|
||||
|
||||
const contribuionHash = contributionHasher.digest();
|
||||
@ -5857,7 +5863,7 @@ async function phase2contribute(zkeyNameOld, zkeyNameNew, name, entropy, logger)
|
||||
}
|
||||
|
||||
async function beacon$1(zkeyNameOld, zkeyNameNew, name, beaconHashStr, numIterationsExp, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const beaconHash = hex2ByteArray(beaconHashStr);
|
||||
if ( (beaconHash.byteLength == 0)
|
||||
@ -5889,7 +5895,7 @@ async function beacon$1(zkeyNameOld, zkeyNameNew, name, beaconHashStr, numIterat
|
||||
|
||||
const rng = await rngFromBeaconParams(beaconHash, numIterationsExp);
|
||||
|
||||
const transcriptHasher = Blake2b(64);
|
||||
const transcriptHasher = Blake2b__default['default'](64);
|
||||
transcriptHasher.update(mpcParams.csHash);
|
||||
for (let i=0; i<mpcParams.contributions.length; i++) {
|
||||
hashPubKey(transcriptHasher, curve, mpcParams.contributions[i]);
|
||||
@ -5945,7 +5951,7 @@ async function beacon$1(zkeyNameOld, zkeyNameNew, name, beaconHashStr, numIterat
|
||||
await fdOld.close();
|
||||
await fdNew.close();
|
||||
|
||||
const contributionHasher = Blake2b(64);
|
||||
const contributionHasher = Blake2b__default['default'](64);
|
||||
hashPubKey(contributionHasher, curve, curContribution);
|
||||
|
||||
const contribuionHash = contributionHasher.digest();
|
||||
@ -5965,7 +5971,7 @@ async function zkeyExportJson(zkeyFileName, verbose) {
|
||||
// Format of the output
|
||||
|
||||
async function bellmanContribute(curve, challengeFilename, responesFileName, entropy, logger) {
|
||||
await Blake2b.ready();
|
||||
await Blake2b__default['default'].ready();
|
||||
|
||||
const rng = await getRandomRng(entropy);
|
||||
|
||||
@ -6024,7 +6030,7 @@ async function bellmanContribute(curve, challengeFilename, responesFileName, ent
|
||||
//////////
|
||||
/// Read contributions
|
||||
//////////
|
||||
const transcriptHasher = Blake2b(64);
|
||||
const transcriptHasher = Blake2b__default['default'](64);
|
||||
|
||||
const mpcParams = {};
|
||||
// csHash
|
||||
@ -6075,7 +6081,7 @@ async function bellmanContribute(curve, challengeFilename, responesFileName, ent
|
||||
await fdTo.write(c.transcript);
|
||||
}
|
||||
|
||||
const contributionHasher = Blake2b(64);
|
||||
const contributionHasher = Blake2b__default['default'](64);
|
||||
hashPubKey(contributionHasher, curve, curContribution);
|
||||
|
||||
const contributionHash = contributionHasher.digest();
|
||||
|
4576
build/snarkjs.js
4576
build/snarkjs.js
File diff suppressed because one or more lines are too long
2
build/snarkjs.min.js
vendored
2
build/snarkjs.min.js
vendored
File diff suppressed because one or more lines are too long
415
package-lock.json
generated
415
package-lock.json
generated
@ -138,6 +138,11 @@
|
||||
"@types/node": "*"
|
||||
}
|
||||
},
|
||||
"@ungap/promise-all-settled": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz",
|
||||
"integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q=="
|
||||
},
|
||||
"acorn": {
|
||||
"version": "7.4.1",
|
||||
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
|
||||
@ -195,7 +200,6 @@
|
||||
"version": "3.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
|
||||
"integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-convert": "^1.9.0"
|
||||
}
|
||||
@ -204,7 +208,6 @@
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz",
|
||||
"integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"normalize-path": "^3.0.0",
|
||||
"picomatch": "^2.0.4"
|
||||
@ -214,7 +217,6 @@
|
||||
"version": "1.0.10",
|
||||
"resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",
|
||||
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"sprintf-js": "~1.0.2"
|
||||
}
|
||||
@ -234,8 +236,7 @@
|
||||
"balanced-match": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
|
||||
"dev": true
|
||||
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
|
||||
},
|
||||
"big-integer": {
|
||||
"version": "1.6.48",
|
||||
@ -245,8 +246,7 @@
|
||||
"binary-extensions": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA=="
|
||||
},
|
||||
"blake2b-wasm": {
|
||||
"version": "git+https://github.com/jbaylina/blake2b-wasm.git#0d5f024b212429c7f50a7f533aa3a2406b5b42b3",
|
||||
@ -264,7 +264,6 @@
|
||||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
@ -274,7 +273,6 @@
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fill-range": "^7.0.1"
|
||||
}
|
||||
@ -282,8 +280,7 @@
|
||||
"browser-stdout": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz",
|
||||
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw=="
|
||||
},
|
||||
"buffer-from": {
|
||||
"version": "1.1.1",
|
||||
@ -316,8 +313,7 @@
|
||||
"camelcase": {
|
||||
"version": "5.3.1",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
|
||||
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="
|
||||
},
|
||||
"chai": {
|
||||
"version": "4.2.0",
|
||||
@ -373,31 +369,241 @@
|
||||
}
|
||||
},
|
||||
"circom_runtime": {
|
||||
"version": "0.1.5",
|
||||
"resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.5.tgz",
|
||||
"integrity": "sha512-BT3d9VCrH/rBRbThDXG731JwezKyskxyE46nACO6Tt/jaorn27LDxFDORdAAjyD0RAoBt+6FpaTp3qlYSx7Pjg==",
|
||||
"version": "0.1.10",
|
||||
"resolved": "https://registry.npmjs.org/circom_runtime/-/circom_runtime-0.1.10.tgz",
|
||||
"integrity": "sha512-4c4BfMHvTiVaWMVEHUaE8SRkpN7RKINYjvh/0/2jMoXA1rDBoPip6M6u5ss9lIrCA1EtXmR/1D/wyiDG7ZKIPA==",
|
||||
"requires": {
|
||||
"ffjavascript": "0.2.10",
|
||||
"ffjavascript": "0.2.33",
|
||||
"fnv-plus": "^1.3.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"ansi-colors": {
|
||||
"version": "4.1.1",
|
||||
"resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz",
|
||||
"integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA=="
|
||||
},
|
||||
"ansi-styles": {
|
||||
"version": "4.3.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
|
||||
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
|
||||
"requires": {
|
||||
"color-convert": "^2.0.1"
|
||||
}
|
||||
},
|
||||
"camelcase": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz",
|
||||
"integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg=="
|
||||
},
|
||||
"chalk": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz",
|
||||
"integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==",
|
||||
"requires": {
|
||||
"ansi-styles": "^4.1.0",
|
||||
"supports-color": "^7.1.0"
|
||||
}
|
||||
},
|
||||
"chokidar": {
|
||||
"version": "3.4.3",
|
||||
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.3.tgz",
|
||||
"integrity": "sha512-DtM3g7juCXQxFVSNPNByEC2+NImtBuxQQvWlHunpJIS5Ocr0lG306cC7FCi7cEA0fzmybPUIl4txBIobk1gGOQ==",
|
||||
"requires": {
|
||||
"anymatch": "~3.1.1",
|
||||
"braces": "~3.0.2",
|
||||
"fsevents": "~2.1.2",
|
||||
"glob-parent": "~5.1.0",
|
||||
"is-binary-path": "~2.1.0",
|
||||
"is-glob": "~4.0.1",
|
||||
"normalize-path": "~3.0.0",
|
||||
"readdirp": "~3.5.0"
|
||||
}
|
||||
},
|
||||
"color-convert": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
||||
"requires": {
|
||||
"color-name": "~1.1.4"
|
||||
}
|
||||
},
|
||||
"color-name": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
|
||||
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
|
||||
},
|
||||
"debug": {
|
||||
"version": "4.2.0",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.2.0.tgz",
|
||||
"integrity": "sha512-IX2ncY78vDTjZMFUdmsvIRFY2Cf4FnD0wRs+nQwJU8Lu99/tPFdb0VybiiMTPe3I6rQmwsqQqRBvxU+bZ/I8sg==",
|
||||
"requires": {
|
||||
"ms": "2.1.2"
|
||||
}
|
||||
},
|
||||
"decamelize": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz",
|
||||
"integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ=="
|
||||
},
|
||||
"diff": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz",
|
||||
"integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A=="
|
||||
},
|
||||
"escape-string-regexp": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz",
|
||||
"integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA=="
|
||||
},
|
||||
"ffjavascript": {
|
||||
"version": "0.2.10",
|
||||
"resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.10.tgz",
|
||||
"integrity": "sha512-GQI6gHYYG5/iD4Kt3VzezzK7fARJzP0zkc82V/+JAdjfeKBXhDSo5rpKFuK3cDcrdW0Fu2emuYNMEAuFqhEQvQ==",
|
||||
"version": "0.2.33",
|
||||
"resolved": "https://registry.npmjs.org/ffjavascript/-/ffjavascript-0.2.33.tgz",
|
||||
"integrity": "sha512-am1FeHarw5CxQJpYZpHkIkzvPhl714jHFmS2Z4ocThiL99aZ8fnYnfc++0fEqZMw5xRsNBCiZArkPklcpP0seQ==",
|
||||
"requires": {
|
||||
"big-integer": "^1.6.48",
|
||||
"wasmcurves": "0.0.5",
|
||||
"mocha": "^8.2.1",
|
||||
"wasmcurves": "0.0.14",
|
||||
"worker-threads": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"wasmcurves": {
|
||||
"version": "0.0.5",
|
||||
"resolved": "https://registry.npmjs.org/wasmcurves/-/wasmcurves-0.0.5.tgz",
|
||||
"integrity": "sha512-BmI4GXLjLawGg2YkvHa8zRsnWec+d1uwoxE+Iov8cqOpDL7GA5XO2pk2yuDbXHMzwIug2exnKot3baRZ86R0pA==",
|
||||
"find-up": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
|
||||
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
|
||||
"requires": {
|
||||
"big-integer": "^1.6.42",
|
||||
"blakejs": "^1.1.0"
|
||||
"locate-path": "^6.0.0",
|
||||
"path-exists": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"flat": {
|
||||
"version": "5.0.2",
|
||||
"resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz",
|
||||
"integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ=="
|
||||
},
|
||||
"has-flag": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
|
||||
"integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.14.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz",
|
||||
"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"locate-path": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
|
||||
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
|
||||
"requires": {
|
||||
"p-locate": "^5.0.0"
|
||||
}
|
||||
},
|
||||
"log-symbols": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz",
|
||||
"integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==",
|
||||
"requires": {
|
||||
"chalk": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"mocha": {
|
||||
"version": "8.2.1",
|
||||
"resolved": "https://registry.npmjs.org/mocha/-/mocha-8.2.1.tgz",
|
||||
"integrity": "sha512-cuLBVfyFfFqbNR0uUKbDGXKGk+UDFe6aR4os78XIrMQpZl/nv7JYHcvP5MFIAb374b2zFXsdgEGwmzMtP0Xg8w==",
|
||||
"requires": {
|
||||
"@ungap/promise-all-settled": "1.1.2",
|
||||
"ansi-colors": "4.1.1",
|
||||
"browser-stdout": "1.3.1",
|
||||
"chokidar": "3.4.3",
|
||||
"debug": "4.2.0",
|
||||
"diff": "4.0.2",
|
||||
"escape-string-regexp": "4.0.0",
|
||||
"find-up": "5.0.0",
|
||||
"glob": "7.1.6",
|
||||
"growl": "1.10.5",
|
||||
"he": "1.2.0",
|
||||
"js-yaml": "3.14.0",
|
||||
"log-symbols": "4.0.0",
|
||||
"minimatch": "3.0.4",
|
||||
"ms": "2.1.2",
|
||||
"nanoid": "3.1.12",
|
||||
"serialize-javascript": "5.0.1",
|
||||
"strip-json-comments": "3.1.1",
|
||||
"supports-color": "7.2.0",
|
||||
"which": "2.0.2",
|
||||
"wide-align": "1.1.3",
|
||||
"workerpool": "6.0.2",
|
||||
"yargs": "13.3.2",
|
||||
"yargs-parser": "13.1.2",
|
||||
"yargs-unparser": "2.0.0"
|
||||
}
|
||||
},
|
||||
"p-limit": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
||||
"requires": {
|
||||
"yocto-queue": "^0.1.0"
|
||||
}
|
||||
},
|
||||
"p-locate": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
|
||||
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
|
||||
"requires": {
|
||||
"p-limit": "^3.0.2"
|
||||
}
|
||||
},
|
||||
"path-exists": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
|
||||
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="
|
||||
},
|
||||
"readdirp": {
|
||||
"version": "3.5.0",
|
||||
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz",
|
||||
"integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==",
|
||||
"requires": {
|
||||
"picomatch": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"serialize-javascript": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-5.0.1.tgz",
|
||||
"integrity": "sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA==",
|
||||
"requires": {
|
||||
"randombytes": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
"resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
|
||||
"integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
|
||||
"requires": {
|
||||
"has-flag": "^4.0.0"
|
||||
}
|
||||
},
|
||||
"which": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
|
||||
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
|
||||
"requires": {
|
||||
"isexe": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"yargs-unparser": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz",
|
||||
"integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==",
|
||||
"requires": {
|
||||
"camelcase": "^6.0.0",
|
||||
"decamelize": "^4.0.0",
|
||||
"flat": "^5.0.2",
|
||||
"is-plain-obj": "^2.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -421,7 +627,6 @@
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz",
|
||||
"integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"string-width": "^3.1.0",
|
||||
"strip-ansi": "^5.2.0",
|
||||
@ -431,20 +636,17 @@
|
||||
"emoji-regex": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
|
||||
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"emoji-regex": "^7.0.1",
|
||||
"is-fullwidth-code-point": "^2.0.0",
|
||||
@ -457,7 +659,6 @@
|
||||
"version": "1.9.3",
|
||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
|
||||
"integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"color-name": "1.1.3"
|
||||
}
|
||||
@ -465,8 +666,7 @@
|
||||
"color-name": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=",
|
||||
"dev": true
|
||||
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
|
||||
},
|
||||
"commander": {
|
||||
"version": "2.20.3",
|
||||
@ -483,8 +683,7 @@
|
||||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "6.0.5",
|
||||
@ -519,8 +718,7 @@
|
||||
"decamelize": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
|
||||
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
|
||||
"dev": true
|
||||
"integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA="
|
||||
},
|
||||
"deep-eql": {
|
||||
"version": "3.0.1",
|
||||
@ -708,8 +906,7 @@
|
||||
"esprima": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz",
|
||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==",
|
||||
"dev": true
|
||||
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
|
||||
},
|
||||
"esquery": {
|
||||
"version": "1.3.1",
|
||||
@ -829,7 +1026,6 @@
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
}
|
||||
@ -838,7 +1034,6 @@
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz",
|
||||
"integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"locate-path": "^3.0.0"
|
||||
}
|
||||
@ -877,14 +1072,12 @@
|
||||
"fs.realpath": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
|
||||
},
|
||||
"fsevents": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz",
|
||||
"integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==",
|
||||
"dev": true,
|
||||
"optional": true
|
||||
},
|
||||
"function-bind": {
|
||||
@ -902,8 +1095,7 @@
|
||||
"get-caller-file": {
|
||||
"version": "2.0.5",
|
||||
"resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
|
||||
},
|
||||
"get-func-name": {
|
||||
"version": "2.0.0",
|
||||
@ -926,7 +1118,6 @@
|
||||
"version": "7.1.6",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
|
||||
"integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"fs.realpath": "^1.0.0",
|
||||
"inflight": "^1.0.4",
|
||||
@ -940,7 +1131,6 @@
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz",
|
||||
"integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-glob": "^4.0.1"
|
||||
}
|
||||
@ -957,8 +1147,7 @@
|
||||
"growl": {
|
||||
"version": "1.10.5",
|
||||
"resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz",
|
||||
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA=="
|
||||
},
|
||||
"has": {
|
||||
"version": "1.0.3",
|
||||
@ -984,8 +1173,7 @@
|
||||
"he": {
|
||||
"version": "1.2.0",
|
||||
"resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
|
||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
|
||||
"dev": true
|
||||
"integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
|
||||
},
|
||||
"iconv-lite": {
|
||||
"version": "0.4.24",
|
||||
@ -1022,7 +1210,6 @@
|
||||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
@ -1031,8 +1218,7 @@
|
||||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
},
|
||||
"inquirer": {
|
||||
"version": "7.3.3",
|
||||
@ -1119,7 +1305,6 @@
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
|
||||
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"binary-extensions": "^2.0.0"
|
||||
}
|
||||
@ -1154,8 +1339,7 @@
|
||||
"is-extglob": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
|
||||
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
|
||||
"dev": true
|
||||
"integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "3.0.0",
|
||||
@ -1167,7 +1351,6 @@
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
|
||||
"integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-extglob": "^2.1.1"
|
||||
}
|
||||
@ -1187,8 +1370,12 @@
|
||||
"is-number": {
|
||||
"version": "7.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
|
||||
"dev": true
|
||||
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="
|
||||
},
|
||||
"is-plain-obj": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz",
|
||||
"integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA=="
|
||||
},
|
||||
"is-reference": {
|
||||
"version": "1.2.1",
|
||||
@ -1220,8 +1407,7 @@
|
||||
"isexe": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=",
|
||||
"dev": true
|
||||
"integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
|
||||
},
|
||||
"jest-worker": {
|
||||
"version": "26.6.2",
|
||||
@ -1293,7 +1479,6 @@
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz",
|
||||
"integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-locate": "^3.0.0",
|
||||
"path-exists": "^3.0.0"
|
||||
@ -1344,7 +1529,6 @@
|
||||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
@ -1455,8 +1639,7 @@
|
||||
"ms": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==",
|
||||
"dev": true
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"mute-stream": {
|
||||
"version": "0.0.8",
|
||||
@ -1469,6 +1652,11 @@
|
||||
"resolved": "https://registry.npmjs.org/nanoassert/-/nanoassert-1.1.0.tgz",
|
||||
"integrity": "sha1-TzFS4JVA/eKMdvRLGbvNHVpCR40="
|
||||
},
|
||||
"nanoid": {
|
||||
"version": "3.1.12",
|
||||
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz",
|
||||
"integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A=="
|
||||
},
|
||||
"natural-compare": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
|
||||
@ -1502,8 +1690,7 @@
|
||||
"normalize-path": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
|
||||
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA=="
|
||||
},
|
||||
"object-inspect": {
|
||||
"version": "1.9.0",
|
||||
@ -1544,7 +1731,6 @@
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
@ -1582,7 +1768,6 @@
|
||||
"version": "2.3.0",
|
||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
|
||||
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-try": "^2.0.0"
|
||||
}
|
||||
@ -1591,7 +1776,6 @@
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz",
|
||||
"integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"p-limit": "^2.0.0"
|
||||
}
|
||||
@ -1599,8 +1783,7 @@
|
||||
"p-try": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
|
||||
},
|
||||
"parent-module": {
|
||||
"version": "1.0.1",
|
||||
@ -1614,14 +1797,12 @@
|
||||
"path-exists": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz",
|
||||
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=",
|
||||
"dev": true
|
||||
"integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU="
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||
},
|
||||
"path-key": {
|
||||
"version": "2.0.1",
|
||||
@ -1644,8 +1825,7 @@
|
||||
"picomatch": {
|
||||
"version": "2.2.2",
|
||||
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz",
|
||||
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg=="
|
||||
},
|
||||
"prelude-ls": {
|
||||
"version": "1.1.2",
|
||||
@ -1710,7 +1890,6 @@
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
|
||||
"integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"safe-buffer": "^5.1.0"
|
||||
}
|
||||
@ -1733,14 +1912,12 @@
|
||||
"require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
|
||||
"dev": true
|
||||
"integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I="
|
||||
},
|
||||
"require-main-filename": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
|
||||
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
|
||||
},
|
||||
"resolve": {
|
||||
"version": "1.19.0",
|
||||
@ -1816,8 +1993,7 @@
|
||||
"safe-buffer": {
|
||||
"version": "5.2.1",
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="
|
||||
},
|
||||
"safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
@ -1843,8 +2019,7 @@
|
||||
"set-blocking": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=",
|
||||
"dev": true
|
||||
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
|
||||
},
|
||||
"shebang-command": {
|
||||
"version": "1.2.0",
|
||||
@ -1919,8 +2094,7 @@
|
||||
"sprintf-js": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz",
|
||||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=",
|
||||
"dev": true
|
||||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "4.2.0",
|
||||
@ -1968,7 +2142,6 @@
|
||||
"version": "5.2.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz",
|
||||
"integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^4.1.0"
|
||||
},
|
||||
@ -1976,16 +2149,14 @@
|
||||
"ansi-regex": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz",
|
||||
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==",
|
||||
"dev": true
|
||||
"integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg=="
|
||||
}
|
||||
}
|
||||
},
|
||||
"strip-json-comments": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz",
|
||||
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==",
|
||||
"dev": true
|
||||
"integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig=="
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "5.5.0",
|
||||
@ -2069,7 +2240,6 @@
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
|
||||
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-number": "^7.0.0"
|
||||
}
|
||||
@ -2137,14 +2307,12 @@
|
||||
"which-module": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
|
||||
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=",
|
||||
"dev": true
|
||||
"integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
|
||||
},
|
||||
"wide-align": {
|
||||
"version": "1.1.3",
|
||||
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
|
||||
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"string-width": "^1.0.2 || 2"
|
||||
},
|
||||
@ -2152,20 +2320,17 @@
|
||||
"ansi-regex": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
|
||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
|
||||
"dev": true
|
||||
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
|
||||
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"is-fullwidth-code-point": "^2.0.0",
|
||||
"strip-ansi": "^4.0.0"
|
||||
@ -2175,7 +2340,6 @@
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
|
||||
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-regex": "^3.0.0"
|
||||
}
|
||||
@ -2193,11 +2357,15 @@
|
||||
"resolved": "https://registry.npmjs.org/worker-threads/-/worker-threads-1.0.0.tgz",
|
||||
"integrity": "sha512-vK6Hhvph8oLxocEJIlc3YfGAZhm210uGzjZsXSu+JYLAQ/s/w4Tqgl60JrdH58hW8NSGP4m3bp8a92qPXgX05w=="
|
||||
},
|
||||
"workerpool": {
|
||||
"version": "6.0.2",
|
||||
"resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.2.tgz",
|
||||
"integrity": "sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q=="
|
||||
},
|
||||
"wrap-ansi": {
|
||||
"version": "5.1.0",
|
||||
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz",
|
||||
"integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"ansi-styles": "^3.2.0",
|
||||
"string-width": "^3.0.0",
|
||||
@ -2207,20 +2375,17 @@
|
||||
"emoji-regex": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
|
||||
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"emoji-regex": "^7.0.1",
|
||||
"is-fullwidth-code-point": "^2.0.0",
|
||||
@ -2232,8 +2397,7 @@
|
||||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
},
|
||||
"write": {
|
||||
"version": "1.0.3",
|
||||
@ -2247,14 +2411,12 @@
|
||||
"y18n": {
|
||||
"version": "4.0.1",
|
||||
"resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz",
|
||||
"integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==",
|
||||
"dev": true
|
||||
"integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ=="
|
||||
},
|
||||
"yargs": {
|
||||
"version": "13.3.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz",
|
||||
"integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"cliui": "^5.0.0",
|
||||
"find-up": "^3.0.0",
|
||||
@ -2271,20 +2433,17 @@
|
||||
"emoji-regex": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==",
|
||||
"dev": true
|
||||
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
|
||||
},
|
||||
"is-fullwidth-code-point": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
|
||||
"dev": true
|
||||
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
|
||||
},
|
||||
"string-width": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
|
||||
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"emoji-regex": "^7.0.1",
|
||||
"is-fullwidth-code-point": "^2.0.0",
|
||||
@ -2297,7 +2456,6 @@
|
||||
"version": "13.1.2",
|
||||
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz",
|
||||
"integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"camelcase": "^5.0.0",
|
||||
"decamelize": "^1.2.0"
|
||||
@ -2313,6 +2471,11 @@
|
||||
"lodash": "^4.17.15",
|
||||
"yargs": "^13.3.0"
|
||||
}
|
||||
},
|
||||
"yocto-queue": {
|
||||
"version": "0.1.0",
|
||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@
|
||||
"dependencies": {
|
||||
"@iden3/binfileutils": "0.0.7",
|
||||
"blake2b-wasm": "https://github.com/jbaylina/blake2b-wasm.git",
|
||||
"circom_runtime": "0.1.5",
|
||||
"circom_runtime": "0.1.10",
|
||||
"fastfile": "0.0.18",
|
||||
"ffjavascript": "0.2.32",
|
||||
"logplease": "^1.2.15",
|
||||
|
Loading…
Reference in New Issue
Block a user