Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
signature_S: signature.S,
sender_proof: [bobHash],
sender_proof_pos: [1]
}
const circuit = new Circuit(circuitDef)
console.log('Calculating witnesses....')
const witness = circuit.calculateWitness(circuitInput)
console.log('Generating proof....')
const { proof, publicSignals } = zkSnark.genProof(
unstringifyBigInts(provingKey), witness
)
const isValid = zkSnark.isValid(
unstringifyBigInts(verificationKey),
proof,
publicSignals
)
console.log(`Inputs passes circuit: ${isValid}`)