Skip to content

atheonxyz/sdk-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Verity SDK Examples

Example apps demonstrating how to use the Verity zero-knowledge proof SDK.

Swift (iOS)

A SwiftUI app that generates and verifies zero-knowledge proofs on-device using the Verity SDK. Precompiled prover/verifier schemes are downloaded on demand — not bundled in the app.

Prerequisites

  • Xcode 16+
  • XcodeGen (brew install xcodegen)
  • iOS 16+ device or simulator

Setup

cd swift/VerityDemo
xcodegen generate
open VerityDemo.xcodeproj

Xcode will automatically fetch the Verity SPM package from the v0.3.0 release.

Run

  1. Select an iOS simulator or device target in Xcode.
  2. Build and run (Cmd+R).
  3. Pick a circuit from the list.
  4. Tap Download Precompiled Schemes (one-time, cached locally).
  5. Tap Generate Proof.

Toggle Use Precompiled Schemes off to compile from the circuit JSON at runtime instead (slower but requires no download).

Hosting Precompiled Schemes

The .pkp (prover) and .pkv (verifier) files are not included in this repo. They are downloaded at runtime from a configurable URL.

To host them yourself:

  1. Create a GitHub Release (e.g. schemes-v0.3.0) on this repo.
  2. Upload each .pkp and .pkv file as a release asset:
    t_add_dsc_720_prover.pkp
    t_add_dsc_720_verifier.pkv
    t_add_id_data_720_prover.pkp
    t_add_id_data_720_verifier.pkv
    t_add_integrity_commit_prover.pkp
    t_add_integrity_commit_verifier.pkv
    t_attest_prover.pkp
    t_attest_verifier.pkv
    
  3. Update SchemeDownloader.baseURL in Services/SchemeDownloader.swift to match your hosting URL.

Pre-built scheme files can be generated with the Verity SDK's prepare() + saveProver()/saveVerifier() methods, or found in the main verity repo under examples/ios/VerityDemo/VerityDemo/Resources/circuits/.

Bundled Circuits

Circuit Description
Age Check (Fragmented) 4-step chained passport proof (t_add_dsc_720, t_add_id_data_720, t_add_integrity_commit, t_attest)

Features

  • On-demand scheme download with local caching
  • Live phase-by-phase progress logging
  • Timing and memory diagnostics
  • Fragmented (multi-step) proof support with per-step breakdown

Kotlin (Android)

Coming soon.

About

Example apps for the Verity zero-knowledge proof SDK

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages