Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse output of witness from ZoKrates CLI stdout and write it to file #6

Open
myronrotter opened this issue Jan 11, 2021 · 0 comments

Comments

@myronrotter
Copy link

ZoKrates CLI command zokrates compute-witness writes the witness to file but does not write the output of the witness to file.
However, ZoKrates CLI prints the output of the witness to sdtout. Therefore, as a workaround parse the output of the witness from the ZoKrates stdout and write it to file within the computeWitness function.

Example stdout of zokrates compute-witness:

'Computing witness...\n' +
'def main(_0) -> (1):\n' +
'\t(1 * _0) * (1 * _0) == 1 * _1\n' +
'\t(1 * ~one) * (1 * _1) == 1 * ~out_0\n' +
'\t return ~out_0\n' +
'\n' +
'Witness: \n' +
'\n' +
'["4"]\n'

Output of the witness is: '["4"]'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant