diff --git a/groth16.nimble b/groth16.nimble index dde65c4..b5510f6 100644 --- a/groth16.nimble +++ b/groth16.nimble @@ -6,6 +6,7 @@ license = "MIT OR Apache-2.0" skipDirs = @["groth16/example"] binDir = "build" namedBin = {"cli/cli_main": "nim-groth16"}.toTable() +installExt = @["nim"] requires "nim >= 2.0.0" requires "https://github.com/status-im/nim-taskpools >= 0.0.5" diff --git a/groth16/files/witness.nim b/groth16/files/witness.nim index 381e85c..93a6159 100644 --- a/groth16/files/witness.nim +++ b/groth16/files/witness.nim @@ -32,6 +32,14 @@ type nvars* : int values* : seq[Fr[BN254_Snarks]] +func makeWitnessBN254*(vals: seq[Fr[BN254_Snarks]]): Witness = + return Witness( + curve : "bn128" + , r : primeR + , nvars : vals.len + , values : vals + ) + #------------------------------------------------------------------------------- proc parseSection1_header( stream: Stream, user: var Witness, sectionLen: int ) =