All pages
Powered by GitBook
1 of 1

Loading...

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.