Documentation ¶
Index ¶
- func Ark(api frontend.API, in []frontend.Variable, c []*big.Int, r int) []frontend.Variable
- func ComputeCCS() constraint.ConstraintSystem
- func CreateVkPk()
- func GenerateProof(inputData types.BatchStruct, batchNum int) (any, string, []byte, error)
- func GenerateVerificationKey() (groth16.ProvingKey, groth16.VerifyingKey, error)
- func GetMerkleRoot(api frontend.API, leaves [common.BatchSize]frontend.Variable) frontend.Variable
- func GetMerkleRootCheck(transactions []types.GetTransactionStruct) string
- func MiMC7(api frontend.API, nRounds int, xIn, k frontend.Variable) frontend.Variable
- func Mix(api frontend.API, in []frontend.Variable, m [][]*big.Int) []frontend.Variable
- func MixLast(api frontend.API, in []frontend.Variable, m [][]*big.Int, s int) frontend.Variable
- func MixS(api frontend.API, in []frontend.Variable, s []*big.Int, r int) []frontend.Variable
- func MultiMiMC7(api frontend.API, nRounds int, in []frontend.Variable, k frontend.Variable) frontend.Variable
- func POSEIDON_C(t int) []*big.Int
- func POSEIDON_M(t int) [][]*big.Int
- func POSEIDON_P(t int) [][]*big.Int
- func POSEIDON_S(t int) []*big.Int
- func Poseidon(api frontend.API, inputs []frontend.Variable) frontend.Variable
- func PoseidonEx(api frontend.API, inputs []frontend.Variable, initialState frontend.Variable, ...) []frontend.Variable
- func ReadProvingKeyFromFile(filename string) (groth16.ProvingKey, error)
- func Sigma(api frontend.API, in frontend.Variable) frontend.Variable
- type MyCircuit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeCCS ¶
func ComputeCCS() constraint.ConstraintSystem
func CreateVkPk ¶
func CreateVkPk()
func GenerateProof ¶
GenerateProof generates a proof for the given input data and returns the proof and the error batchDbCount is the number of batches in the database and it will be passed as batchNum here
func GenerateVerificationKey ¶
func GenerateVerificationKey() (groth16.ProvingKey, groth16.VerifyingKey, error)
func GetMerkleRoot ¶
func GetMerkleRootCheck ¶
func GetMerkleRootCheck(transactions []types.GetTransactionStruct) string
func MultiMiMC7 ¶
func POSEIDON_C ¶
func POSEIDON_M ¶
func POSEIDON_P ¶
func POSEIDON_S ¶
func PoseidonEx ¶
func ReadProvingKeyFromFile ¶
func ReadProvingKeyFromFile(filename string) (groth16.ProvingKey, error)
Types ¶
type MyCircuit ¶
type MyCircuit struct { To [common.BatchSize]frontend.Variable `gnark:",public"` From [common.BatchSize]frontend.Variable `gnark:",public"` Amount [common.BatchSize]frontend.Variable `gnark:",public"` TransactionHash [common.BatchSize]frontend.Variable `gnark:",public"` FromBalances [common.BatchSize]frontend.Variable `gnark:",public"` ToBalances [common.BatchSize]frontend.Variable `gnark:",public"` Messages [common.BatchSize]frontend.Variable `gnark:",public"` PublicKeys [common.BatchSize]eddsa.PublicKey `gnark:",public"` Signatures [common.BatchSize]eddsa.Signature `gnark:",public"` }
Click to show internal directories.
Click to hide internal directories.