2023-11-17 09:43:43 +01:00
|
|
|
|
|
|
|
|
import groth16/test_proof
|
|
|
|
|
import groth16/files/export_json
|
|
|
|
|
|
|
|
|
|
#-------------------------------------------------------------------------------
|
|
|
|
|
|
2025-05-28 19:36:01 -06:00
|
|
|
proc exampleProveAndVerify() =
|
2023-11-17 09:43:43 +01:00
|
|
|
let zkey_fname : string = "./build/product.zkey"
|
|
|
|
|
let wtns_fname : string = "./build/product.wtns"
|
2025-05-28 19:36:01 -06:00
|
|
|
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:
|
2025-05-28 19:36:01 -06:00
|
|
|
exampleProveAndVerify()
|