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

Compatibility and Project Structure #15

Open
benjaminstrasser opened this issue Apr 26, 2020 · 0 comments
Open

Compatibility and Project Structure #15

benjaminstrasser opened this issue Apr 26, 2020 · 0 comments

Comments

@benjaminstrasser
Copy link

I am currently working on getting witness- and proof-generation working via wasm in angular.
I am using snarkjs to generate a witness by using the WitnessCalculatorBuilder (This doesn't seem to be the current preferred way but works relatively well. It would be nice to simply expose/export this functionality as well).
I am now looking into converting the witness JSON returned by witness-generation into the required bin format, but this seems to be more difficult than expected as there is currently no function exported by this library. Because I am using angular I cannot serialize the JSON run the cli and then deserialize the bin file. After that, it looks like the function to actually generate the proof is attached to the window, which can also cause problems. Is there a possibility to change the structure of this project to simplify its use in applications like angular, which want to import a library that exposes/exports certain functions.

In this case, the exported functions could be:
buildWittnes(witness: object) : witness: ArrayBuffer
genZKSnarkProof(witness: ArrayBuffer, pk: ArrayBuffer) : proof: object

This seems to be the last step in regards to using circom, snarkjs and wasmsnark that would make it possible to get our software production-ready, as proof-generation via js is just too slow for our purpose.

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