Skip to content

ethb3rlin/zuauth-simple-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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>"
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%