Skip to content

`openpassort-rs` is a server-side Rust implementation designed for verifying zk-SNARK (Groth16) proofs on a Rust server-side..

License

Notifications You must be signed in to change notification settings

dog-18/openpassport-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ Under Development

This project is currently under development and is not yet functional.

openpassport-rs

PSE Hackathon 2024

A server-side Rust implementation for verifying zkSnark (Groth16) proofs using Actix-Web.

Rust Logo Rust Logo OpenPassport Logo

Overview

This project aims to provide a robust solution for zkSnark proof verification using Rust. The project is structured into three main crates:

  1. openpassport-rs/sdk: A Rust adaptation of the @openpassport/sdk library. Approximately 70% of the 1Step verification logic has been implemented.
  2. openpassport-rs/server: A server built with Actix-Web that exposes endpoints for initializing the verifier and verifying proofs.
  3. openpassport-rs/deno: A Deno crate that compiles TypeScript code, making it possible to run it within the Rust environment.
  4. openpassport-rs/wasm: A Wasm crate that compiles TypeScript code into AssemblyScript, making it possible to run it within the Rust environment. (That is in early development, just started on it some hours before the submission of the hackathon)

Development Status

  • The SDK is currently about 70% complete for the 1Step verification process.
  • The server is functional but still in development.
  • The Deno integration is in the experimental phase blocked by openpassport/issues/190.
  • The Wasm integration is in an early phase of development.

Project Structure

Here’s a visual representation of the folder hierarchy:

.
├── sdk
│   ├── Cargo.toml
│   ├── circuits
│   └── src
├── api
│   ├── Cargo.toml
│   └── src
├── wasm
│   ├── Cargo.toml
│   └── src
├── deno
│   ├── Cargo.toml
│   └── src
├── LICENSE
├── README.md
└── target

Getting Started

Prerequisites:

To get started with this project:

1. Clone the repository:

git clone https://github.com/yourusername/openpassport-rs.git
cd openpassport-rs

2. Set up the SDK:

cd sdk
cargo build

3. Run the Server: Navigate to the server directory and run the Actix-Web server:

cd ../server
cargo run

4. Set up Deno: Navigate to the deno directory and make sure Deno is installed. Run the Deno scripts:

cd ../deno
deno run --allow-read --allow-net src/openPassportVerifier.ts

Note: The crate is currently blocked due to an issue with the @openpassport/sdk TS package. You can follow the progress or contribute to the discussion in openpassport/issues/190

5. API Endpoints

  • Initialize Verifier:

    • Endpoint: /initialize
    • Method: POST
    • Description: Initializes the verifier with the given parameters.
  • Verify Passport:

    • Endpoint: /verify
    • Method: POST
    • Description: Verifies the passport proof.

License

This project is licensed under the MIT License.

About

`openpassort-rs` is a server-side Rust implementation designed for verifying zk-SNARK (Groth16) proofs on a Rust server-side..

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published