added public inputs hash test, challenger test

This commit is contained in:
jtguibas
2022-10-10 15:11:32 -07:00
parent 8798b435d3
commit cae5d3b45f
6 changed files with 321 additions and 99 deletions

25
utils/utils.go Normal file
View File

@@ -0,0 +1,25 @@
package utils
import (
"math/big"
"github.com/consensys/gnark/frontend"
)
func StrArrayToBigIntArray(input []string) []big.Int {
var output []big.Int
for i := 0; i < len(input); i++ {
a := new(big.Int)
a, _ = a.SetString(input[i], 10)
output = append(output, *a)
}
return output
}
func StrArrayToFrontendVariableArray(input []string) []frontend.Variable {
var output []frontend.Variable
for i := 0; i < len(input); i++ {
output = append(output, frontend.Variable(input[i]))
}
return output
}