Versions in this module Expand all Collapse all v2 v2.0.0 Jul 18, 2024 Changes in this version + const BatchSizeCircuit + var BatchSize = 10 + var ErrAmountTooHigh = errors.New("amount is bigger than balance") + var ErrIndexConsistency = errors.New("account's position should match account's index") + var ErrNonExistingAccount = errors.New("the account is not in the rollup database") + var ErrNonce = errors.New("incorrect nonce") + var ErrSizeByteSlice = errors.New("byte slice size is inconsistent with Account size") + var ErrWrongSignature = errors.New("invalid signature") + var SizeAccount = 160 + func Deserialize(res *Account, data []byte) error + type Account struct + func (ac *Account) Reset() + func (ac *Account) Serialize() []byte + type AccountConstraints struct + Balance frontend.Variable + Index frontend.Variable + Nonce frontend.Variable + PubKey eddsa.PublicKey + type Circuit struct + LeafReceiver [BatchSizeCircuit]frontend.Variable + LeafSender [BatchSizeCircuit]frontend.Variable + MerkleProofReceiverAfter [BatchSizeCircuit]merkle.MerkleProof + MerkleProofReceiverBefore [BatchSizeCircuit]merkle.MerkleProof + MerkleProofSenderAfter [BatchSizeCircuit]merkle.MerkleProof + MerkleProofSenderBefore [BatchSizeCircuit]merkle.MerkleProof + PublicKeysReceiver [BatchSizeCircuit]eddsa.PublicKey + PublicKeysSender [BatchSizeCircuit]eddsa.PublicKey + ReceiverAccountsAfter [BatchSizeCircuit]AccountConstraints + ReceiverAccountsBefore [BatchSizeCircuit]AccountConstraints + RootHashesAfter [BatchSizeCircuit]frontend.Variable + RootHashesBefore [BatchSizeCircuit]frontend.Variable + SenderAccountsAfter [BatchSizeCircuit]AccountConstraints + SenderAccountsBefore [BatchSizeCircuit]AccountConstraints + Transfers [BatchSizeCircuit]TransferConstraints + func (circuit *Circuit) Define(api frontend.API) error + type Operator struct + AccountMap map[string]uint64 + HashState []byte + State []byte + func NewOperator(nbAccounts int) Operator + type Queue struct + func NewQueue(BatchSizeCircuit int) Queue + type Transfer struct + func NewTransfer(amount uint64, from, to eddsa.PublicKey, nonce uint64) Transfer + func (t *Transfer) Sign(priv eddsa.PrivateKey, h hash.Hash) (eddsa.Signature, error) + func (t *Transfer) Verify(h hash.Hash) (bool, error) + type TransferConstraints struct + Amount frontend.Variable + Nonce frontend.Variable + ReceiverPubKey eddsa.PublicKey + SenderPubKey eddsa.PublicKey + Signature eddsa.Signature Other modules containing this package github.com/danivilardell/gnark