Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.01 KB

README.md

File metadata and controls

48 lines (33 loc) · 1.01 KB

ZuAuth Simple Server

A minimal web server with a single endpoint that verifies an ETHBerlin ZK ticket PCD using ZuAuth.

Setup

To run in local development or in a hosted environment, you'll first need to make sure you have Node.js.

Then, you'll need to install dependencies and start the server.

npm install # install deps
npm start

You can also use Yarn instead of NPM.

yarn # install deps
yarn start

Usage

Once the server is running, you can verify a proof by querying this endpoint.

GET /verify?proof=<proof>

Where <proof> is a serialized ZKEdDSAEventTicketPCD sent by the client.

Here's what the endpoint responds with when <proof> is a valid, serialized ZK proof of an ETHBerlin ticket.

{
  "success": true
}

Here's what the endpoint responds with otherwise - e.g., if an error occurs or the proof is not a valid ZK proof of an ETHBerlin tiket.

{
  "success": false,
  "error": "<error message here>"
}