Skip to content

Commit

Permalink
add a command to extract a vk
Browse files Browse the repository at this point in the history
  • Loading branch information
kustosz committed Sep 25, 2023
1 parent a424bff commit b750697
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,30 @@ func main() {
return ps.ExportSolidity(output)
},
},
{
Name: "export-vk",
Flags: []cli.Flag{
&cli.StringFlag{Name: "keys-file", Usage: "proving system file", Required: true},
&cli.StringFlag{Name: "output", Usage: "output file", Required: true},
},
Action: func(context *cli.Context) error {
keys := context.String("keys-file")
ps, err := prover.ReadSystemFromFile(keys)
if err != nil {
return err
}
outPath := context.String("output")

file, err := os.Create(outPath)
defer file.Close()
if err != nil {
return err
}
output := file
_, err = ps.VerifyingKey.WriteTo(output)
return err
},
},
{
Name: "gen-test-params",
Flags: []cli.Flag{
Expand Down

0 comments on commit b750697

Please sign in to comment.