Closed ananas-block closed 1 year ago
I wrote this to avoid block-redeclaration errors, when proof and public signals are called in the same block having the same name makes error
you can call the variables differently, but this should not be an issue with the client class
it is an object result, i tried that even when coding elgamal test. ill try a different solution
shouldn't be necessary anyway
let {proof1, publicInputs1} = snarkjs.fullProve(); might work but you should generate two proofs in the same function
let proofAndPublicInputs = snarkjs.fullProve(); will work for sure
I am leaving the function, it makes things more clearer and practical, one method is to use proof and public signals as variables and change their values whenever fullprove is called, the names always stay netural, for me it is a matter of two lines that facilitate the fullprove procedure, I started doing what u wrote but i didn't see it useful. If you see that it makes difference, I can do it again
https://github.com/Shigoto-dev19/ZK-Battleships-Solana/blob/39e42bc8ee11b75b3559b9ad005c97b33dc9baf3/src/utils.ts#L60