handlers

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateReq

type GenerateReq struct {
	CircuitName string         `json:"circuit_name"`
	Inputs      proof.ZKInputs `json:"inputs"`
}

GenerateReq is request for proof generation

type VerifyReq

type VerifyReq struct {
	CircuitName string          `json:"circuit_name"`
	ZKP         proof.FullProof `json:"zkp"`
}

VerifyReq is request for proof verification

type VerifyResp

type VerifyResp struct {
	Valid bool `json:"valid"`
}

VerifyResp is response for proof verification

type ZKHandler

type ZKHandler struct {
	ProverConfig configs.ProverConfig
}

ZKHandler is handler for zkp operations

func NewZKHandler

func NewZKHandler(proverConfig configs.ProverConfig) *ZKHandler

NewZKHandler creates new instance of handler

func (*ZKHandler) GenerateProof

func (h *ZKHandler) GenerateProof(w http.ResponseWriter, r *http.Request)

GenerateProof is a handler for proof generation POST /api/v1/proof/generate

func (*ZKHandler) VerifyProof

func (h *ZKHandler) VerifyProof(w http.ResponseWriter, r *http.Request)

VerifyProof is a handler for zkp verification POST /api/v1/proof/verify

Jump to

Keyboard shortcuts

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