Documentation ¶
Index ¶
- Constants
- func GenerateAndVerifyProof(r1cs constraint.ConstraintSystem, provingKey []groth16.ProvingKey, ...) (proof groth16.Proof, err error)
- func LoadProvingKey(filepath string) (pks []groth16.ProvingKey, err error)
- func LoadR1CSLen(filename string) (nbConstraints int, err error)
- func LoadVerifyingKey(filepath string) (verifyingKey groth16.VerifyingKey, err error)
- func WithRedis(redisType string, redisPass string) redis.Option
- type Proof
- type ProofModel
- type Prover
Constants ¶
View Source
const (
TableNamePrefix = "proof"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateAndVerifyProof ¶
func GenerateAndVerifyProof(r1cs constraint.ConstraintSystem, provingKey []groth16.ProvingKey, verifyingKey groth16.VerifyingKey, batchWitness *utils.BatchCreateUserWitness, zkKeyName string, batchNumber int64, ) (proof groth16.Proof, err error)
func LoadProvingKey ¶
func LoadProvingKey(filepath string) (pks []groth16.ProvingKey, err error)
func LoadR1CSLen ¶ added in v1.0.2
func LoadVerifyingKey ¶
func LoadVerifyingKey(filepath string) (verifyingKey groth16.VerifyingKey, err error)
Types ¶
type ProofModel ¶
type ProofModel interface { CreateProofTable() error DropProofTable() error CreateProof(row *Proof) error GetProofsBetween(start int64, end int64) (proofs []*Proof, err error) GetLatestProof() (p *Proof, err error) GetLatestConfirmedProof() (p *Proof, err error) GetProofByBatchNumber(height int64) (p *Proof, err error) GetProofNumber() (count int64) GetRowCounts() (count int64, err error) }
func NewProofModel ¶
func NewProofModel(db *gorm.DB, suffix string) ProofModel
type Prover ¶
type Prover struct { VerifyingKeys groth16.VerifyingKey ProvingKeys []groth16.ProvingKey SessionName string R1cs constraint.ConstraintSystem // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.