19 lines
576 B
Nim
Raw Permalink Normal View History

2023-11-17 09:43:43 +01:00
import groth16/test_proof
import groth16/files/export_json
#-------------------------------------------------------------------------------
proc exampleProveAndVerify() =
2023-11-17 09:43:43 +01:00
let zkey_fname : string = "./build/product.zkey"
let wtns_fname : string = "./build/product.wtns"
let (_, proof) = testProveAndVerify( zkey_fname, wtns_fname)
2023-11-17 09:43:43 +01:00
exportPublicIO( "./build/nim_public.json" , proof )
exportProof( "./build/nim_proof.json" , proof )
#-------------------------------------------------------------------------------
when isMainModule:
exampleProveAndVerify()