prover-server

module
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

README

Prover Server

Prover Server is a REST API Wrapper & golang binding for SnarkJS

List of implemented features:

  • Generate proof

Requirements

Installation

  1. Build prover server:

    go build ./cmd/prover/prover.go
    
  2. Edit config file configs/prover.yaml

  3. Put compiled circuits into <circuitsBasePath>/<circuitName> directory. Where <circuitsBasePath> is config option with default value circuits, and <circuitName> is name of the circuit that will be passed as a param to an API call. See SnarkJS Readme for instructions on how to compile circuits.

  4. Run prover server:

    ./prover
    

API

Generate proof

POST /api/v1/proof/generate
Content-Type: application/json
{
  "inputs": {...}, // circuit specific inputs
  "circuit_name": "..." // name of directory 
}

Docker images

Build and run container with snarkjs prover:

docker build -t prover-server .
docker run -it -p 8002:8002 prover-server

Build and run container with rapidsnark prover:

docker build -t prover-server-rapidsnark -f Dockerfile-rapidsnark .
docker run -it -p 8002:8002 prover-server-rapidsnark

License

prover-server is part of the iden3 project copyright 2021 0KIMS association and published with GPL-3 license. Please check the LICENSE file for more details.

Directories

Path Synopsis
cmd
pkg
app
log

Jump to

Keyboard shortcuts

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