privacy-scaling-explorations / snark-artifacts

A streamlined mechanism for distributing SNARK artifacts.
https://snark-artifacts.pse.dev
MIT License
4 stars 2 forks source link

feat: add script(s) to generate artifacts #33

Closed sripwoud closed 4 months ago

sripwoud commented 4 months ago

This script should help generating new zkey, wasm (verification.json too?) files for given circom src files.

sripwoud commented 4 months ago

@cedoor did not you mention there are already scripts defined in the circom or zupass repos we could reuse for that?

cedoor commented 4 months ago

Yes, there's a JS CLI here: https://github.com/proofcarryingdata/zupass/tree/main/packages/tools/artifacts.

I think @zk-kit/artifacts could include that CLI as well.

sripwoud commented 4 months ago

I had a look at the pcd CLI. We should definitely offer similar commands (download, generate...). So I will inspire myself from it. I would like to add TS support to it. Probably with https://github.com/commander-js/extra-typings or I would switch to https://github.com/yargs/yargs for the args parsing, I am not sure yet. Then inquirer for the interactivity.

in @zk-kit/artifacts, I think we had agreed moving https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/utils/src/snark-artifacts into it right? The CLI implementation would rely on these functions.
The CLI would be exposed with the bin field in package.json

cedoor commented 4 months ago

Yes exactly! That's what I was thinking about 👍🏽