backend

command module
v0.0.0-...-84e837c Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

README

Backend

The backend implements the necessary logic to create encrypted records, decrypt encrypted records and create/verify zk-SNARKs.

Run the backend

For development purposes you can run the backend using the go run command.

$ go run .

Environment Variables

Following environment variables need to be set:

Name Description
PORT The port the service needs to listen
PRIVATE_KEY The private key of the authority to be able to create the authority smart contract and new user databases
ETHEREUM_CONNECTION The URL to connect to the Ethereum network

If you are using direnv all those variables will be set automatically to the local testing defaults.

API

GET /api/db/create

Create a new database for an user

GET /api/record/create

Create a new record

GET /api/record/invalidate

Invalidate a record

GET /api/zk/create

Create a zk-SNARK

GET /api/zk/verify

Verify a zk-SNARK

Run tests

$ go test ./...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
contracts

Jump to

Keyboard shortcuts

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