mirror of
https://github.com/status-im/nim-codex.git
synced 2025-02-24 00:18:23 +00:00
adding outputs
This commit is contained in:
parent
5300d4f39d
commit
35a38dd9be
@ -69,12 +69,16 @@ when isMainModule:
|
|||||||
zkey = env.dir / fmt"{env.name}.zkey"
|
zkey = env.dir / fmt"{env.name}.zkey"
|
||||||
inputs = env.dir / fmt"input.json"
|
inputs = env.dir / fmt"input.json"
|
||||||
|
|
||||||
|
echo "Loading sample proof..."
|
||||||
var
|
var
|
||||||
inputData = inputs.readFile()
|
inputData = inputs.readFile()
|
||||||
inputJson = !JsonNode.parse(inputData)
|
inputJson = !JsonNode.parse(inputData)
|
||||||
proofInputs = Poseidon2Hash.jsonToProofInput(inputJson)
|
proofInputs = Poseidon2Hash.jsonToProofInput(inputJson)
|
||||||
circom = CircomCompat.init(r1cs, wasm, zkey)
|
circom = CircomCompat.init(r1cs, wasm, zkey)
|
||||||
|
|
||||||
|
echo "Sample proof loaded..."
|
||||||
|
echo "Proving..."
|
||||||
|
|
||||||
let proof = circom.prove(proofInputs).tryGet
|
let proof = circom.prove(proofInputs).tryGet
|
||||||
|
|
||||||
let verRes = circom.verify(proof, proofInputs).tryGet
|
let verRes = circom.verify(proof, proofInputs).tryGet
|
||||||
|
Loading…
x
Reference in New Issue
Block a user