mirror of
https://github.com/tornadocash/tornado-core.git
synced 2025-05-10 10:15:06 -04:00
relay wip
This commit is contained in:
parent
6e05a678dd
commit
f3b1b7f96e
3 changed files with 46 additions and 1 deletions
|
@ -10,7 +10,7 @@ const unstringifyBigInts2 = require("snarkjs/src/stringifybigint").unstringifyBi
|
|||
const rbigint = (nbytes) => snarkjs.bigInt.leBuff2int(crypto.randomBytes(nbytes));
|
||||
const pedersenHash = (data) => babyjub.unpackPoint(pedersen.hash(data))[0];
|
||||
|
||||
async function snarkVerify(proof) {
|
||||
function snarkVerify(proof) {
|
||||
proof = unstringifyBigInts2(websnarkUtils.fromSolidityInput(proof));
|
||||
const verification_key = unstringifyBigInts2(require('../build/circuits/withdraw_verification_key.json'));
|
||||
return groth.isValid(verification_key, proof, proof.publicSignals);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue