zkPass
zkPass Developer's Guide
zkPass Developer's Guide
  • â›Šī¸Introduction
  • ZKPASS OVERVIEW
    • đŸ›ī¸Architecture
    • 🧱zkPass Components
    • 🤝Trust Models
    • 🚚Deployment
      • Public-Cloud Hosting
      • Private-Cloud Hosting
      • On-Premise Hosting
    • đŸŽ¯SDK Objectives
    • 🔑API Key
  • zkPass Modules
    • â˜ī¸DVR
      • đŸ—ģHigh Level View
      • đŸ—ī¸Key Concepts
        • User Data
        • DVR Info
        • zkPass Proof
      • đŸ‘ĨDVR Client Roles
        • Data Issuer
          • Providing User Data Retrieval API
        • Data Holder
          • 1. Retrieving the DVR
          • 2. Retrieving the User Data
          • 3. Generating the Proof
          • 4. Verifying the Proof
        • Proof Verifier
          • 1. Providing DVR Retrieval API
          • 2. Providing Proof Verification API
      • 🔎DVR Query
        • Building Query Engine
        • Processing Query
        • Query Grammar
      • đŸ—ī¸Integration Guidelines
      • 🌊DVR Workflows
  • SDK Tutorial
    • Typescript
      • Running Code
      • Code Snippet
      • Directory Structure
    • Rust
      • Running Code
      • Code Snippet
      • Directory Structure
  • API Reference
    • Typescript
      • Classes
        • Class: DvrModuleClient
      • Functions
        • Functions: ffiHelper
        • Functions: jwtHelper
        • Functions: publicKeyOptionUtils
      • Type Aliases
        • Types
        • Types: ffiType
      • Interfaces
        • Interfaces
      • Constants
        • Constants
        • Enums
      • Errors
    • Rust
      • Building Rust doc
    • RESTful API
      • Overview
      • Endpoints
        • Generate Proof
      • Utilities
        • Generate Key Pair
        • Sign User Data and DVR
        • Encrypt User Data and DVR
      • Errors
  • Glossary
    • DVR
    • User Data
    • ZKP
Powered by GitBook
On this page
Export as PDF
  1. SDK Tutorial
  2. Rust

Directory Structure

Here's the directory structure for Rust SDK tutorial.

├── Cargo.lock
├── cargo-test.sh
├── Cargo.toml
├── download-so.sh
├── generate-docs.sh
├── lib
│   └── libdvr_client.so
├── localization
│   ├── en-US.ftl
│   └── id-ID.ftl
├── privacy-apps
│   ├── client_utils
│   └── dvr_types
├── README.md
├── rust-toolchain.toml
├── target
│   ├── CACHEDIR.TAG
│   ├── debug
│   ├── release
│   └── tmp
├── test
│   └── data
├── test.sh
├── zkpass-core
│   ├── Cargo.toml
│   └── src
├── zkpass-demo
│   ├── Cargo.toml
│   ├── src
│   ├── test
│   └── tests
└── zkpass-query
    ├── risc0
    ├── sp1
    └── types

The privacy-apps components :

  1. DVR types provide the necessary definitions for developers to interact with libdvr_client.so.

  2. Client utils contain FFI helpers for working with DVR types.

zkpass-demo
├── Cargo.toml
├── src
│   ├── data_holder.rs
│   ├── data_issuer.rs
│   ├── helper.rs
│   ├── lib_loader.rs
│   ├── main.rs
│   ├── proof_verifier.rs
│   ├── sample_keys.rs
│   ├── sample_proof.rs
│   └── test.rs
├── test
│   └── data
│       └── multiple
└── tests
    └── integration_test.rs

The zkpass-demo components :

  1. data_holder.rs: Handles the entire process, from generating tokens to verifying proofs.

  2. data_issuer.rs: Manages the process of generating user data tokens.

  3. proof_verifier.rs: Handles the generation of DVR tokens and the proof verification process.

  4. lib_loader.rs: Contains the detailed logic for interacting with libdvr_client.so.

PreviousCode SnippetNextTypescript

Last updated 6 months ago