mirror of
https://github.com/logos-storage/nim-groth16.git
synced 2026-08-02 13:53:14 +00:00
add a "makeWitness" convenience function
This commit is contained in:
parent
3ddf4948f9
commit
7a610c2217
@ -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"
|
||||
|
||||
@ -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 ) =
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user