mirror of
https://github.com/arnaucube/gnark-plonky2-verifier.git
synced 2026-01-12 09:01:32 +01:00
structs and challenges
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
. "gnark-ed25519/goldilocks"
|
||||
"math/big"
|
||||
|
||||
"github.com/consensys/gnark/frontend"
|
||||
"github.com/consensys/gnark/std/math/emulated"
|
||||
)
|
||||
|
||||
func StrArrayToBigIntArray(input []string) []big.Int {
|
||||
@@ -23,3 +25,11 @@ func StrArrayToFrontendVariableArray(input []string) []frontend.Variable {
|
||||
}
|
||||
return output
|
||||
}
|
||||
|
||||
func Uint64ArrayToGoldilocksElementArray(input []uint64) []GoldilocksElement {
|
||||
var output []GoldilocksElement
|
||||
for i := 0; i < len(input); i++ {
|
||||
output = append(output, emulated.NewElement[emulated.Goldilocks](input[i]))
|
||||
}
|
||||
return output
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user