Closed spencer-coti closed 1 year ago
For anyone searching for this in the future, here is how I was able to do it:
const buffer = readFileSync(PATH_TO_OUT_FILE)
const program = Uint8Array.from(buffer)
console.log(program)
You will notice that the output is the same as when you compile with zokrates-js
Abstract
I would like to be able to use the output file generated by running
zokrates compile -i ...
as the input to thecomputeWitness
function in zokrates-jsMotivation
The CLI is already a powerful tool and very comfortable to work with, so I would prefer to use this output as opposed to finding a way to import the raw code to a NodeJS script, format it as needed and compile it there. This problem is further compounded by the fact that my circuit is very large and imports modules from the standard library as well as from custom modules.