UNPKG

snarkjs

Version:

zkSNARKs implementation in JavaScript

32 lines (22 loc) 1.19 kB
/* Copyright 2018 0KIMS association. This file is part of snarkJS. snarkJS is a free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. snarkJS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with snarkJS. If not, see <https://www.gnu.org/licenses/>. */ import newZKey from "./zkey_new.js"; import phase2verifyFromInit from "./zkey_verify_frominit.js"; export default async function phase2verifyFromR1cs(r1csFileName, pTauFileName, zkeyFileName, logger) { // const initFileName = "~" + zkeyFileName + ".init"; const initFileName = {type: "bigMem"}; await newZKey(r1csFileName, pTauFileName, initFileName, logger); return await phase2verifyFromInit(initFileName, pTauFileName, zkeyFileName, logger); }