Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
sender_updated_pubkey: [newAlice.pubkey[0], newAlice.pubkey[1]],
sender_updated_detail: newAlice.detail,
signature_R8x: signature.R8[0],
signature_R8y: signature.R8[1],
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}`)