services

package
v0.0.0-...-8013fef Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CircuitData

type CircuitData struct {
	Circuit frontend.Circuit
	Curve   ecc.ID
	CS      constraint.ConstraintSystem
	PK      groth16.ProvingKey
	VK      groth16.VerifyingKey
}

type IProver

type IProver interface {
	Test(ctx context.Context) error
	GenerateProof(ctx context.Context, circuit frontend.Circuit, circuitName string) (groth16.Proof, error)
	VerifyProof(ctx context.Context, proof groth16.Proof, circuitName string, publicWitness witness.Witness) (bool, error)
}

type MockKVStore

type MockKVStore struct {
	CircuitData map[string]CircuitData
}

TODO: this should be replaced with a real persistence layer

type Prover

type Prover struct{}

func NewService

func NewService() Prover

func (Prover) GenerateProof

func (p Prover) GenerateProof(fullWitness witness.Witness, circuitName string) (groth16.Proof, error)

func (Prover) VerifyProof

func (Prover) VerifyProof(proof groth16.Proof, circuitName string, publicWitness witness.Witness) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL