Contributing
Solidarity is split across two repositories. Contributions to the iOS app and to the ZK circuits follow different workflows.
Repositories
| Repo | Language | What it contains |
|---|---|---|
| p2p-solidarity/solidarity | Swift / iOS | iOS app, P2P exchange, VC/VP, Apple Wallet |
| p2p-solidarity/passport-noir | Noir / Rust / Swift | ZK circuits, mopro bindings, OpenAC protocol |
iOS App — p2p-solidarity/solidarity
Prerequisites
- Xcode 16.0+ with iOS 17.0+ SDK
- macOS 14.0+ (Sonoma or later)
- Apple Developer Account (for device testing, NFC, PassKit)
Quick Start
git clone https://github.com/p2p-solidarity/solidarity.git
cd solidarity
open solidarity.xcodeprojDependencies resolve automatically via Swift Package Manager (including OpenPassportSwift from passport-noir).
Press ⌘+R to build and run in simulator.
Project Structure
solidarity/
├── solidarity/
│ ├── Models/ # SwiftData models (Contact, IdentityCard, etc.)
│ ├── Views/
│ │ ├── Common/ # MainTabView, Toast, shared components
│ │ ├── PeopleViews/ # People tab + contact detail
│ │ ├── SharingViews/ # Share tab (QR display)
│ │ ├── MeViews/ # Me tab (identity management)
│ │ ├── ScanViews/ # QR scanner + proof presentation
│ │ ├── MatchViews/ # Proximity matching + exchange flow
│ │ ├── CardViews/ # Business card + Apple Wallet
│ │ ├── SettingsViews/ # All settings screens
│ │ └── Onboarding/ # First-launch flow
│ ├── Services/
│ │ ├── Identity/ # DID, VC, VP, OIDC, Passport pipeline
│ │ ├── Sharing/ # Proximity, PassKit, QR, payload encryption
│ │ ├── ZK/ # mopro, Semaphore, proof generation
│ │ ├── Card/ # QR generation/scanning, format handling
│ │ ├── Vault/ # Encrypted storage, time-lock
│ │ └── SocialGraph/ # Common friends hash exchange
│ └── SolidarityApp.swift
├── solidarityClip/ # App Clip
├── solidarityTests/
└── solidarityUITests/Testing P2P Features
P2P proximity requires two devices:
Option 1: Two physical devices
- Connect both to the same Wi-Fi
- Install via Xcode or TestFlight
Option 2: Physical device + simulator
- Ensure both are on the same network
QR testing (single device)
- Generate a QR code in Share tab → Save to Photos → scan with another device
Troubleshooting
Dependencies not resolving
File → Packages → Reset Package Caches
⌘+Shift+K (clean build folder)
⌘+B (rebuild)MultipeerConnectivity not working — Info.plist must contain:
NSLocalNetworkUsageDescriptionNSBonjourServices
NFC in simulator — NFC requires a physical device. Passport scanning cannot be tested in simulator.
Simulator networking
xcrun simctl shutdown all
xcrun simctl erase allZK Circuits — p2p-solidarity/passport-noir
Prerequisites
- Nargo (Noir toolchain) — install via
noirup - Rust + cargo (for mopro iOS bindings)
- Xcode (for xcframework build)
curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash
noirupQuick Start
git clone https://github.com/p2p-solidarity/passport-noir.git
cd passport-noir/circuits
# Compile all circuits
nargo compile
# Run all circuit tests
nargo test --workspaceProject Structure
passport-noir/
├── circuits/
│ ├── passport_verifier/ # RSA-2048 Active Authentication (ICAO 9303)
│ ├── data_integrity/ # DG hash chain Passive Authentication
│ ├── disclosure/ # TD3 MRZ selective disclosure (age, nationality, name)
│ ├── passport_adapter/ # OpenAC Prepare: passport → Pedersen commitment
│ ├── sdjwt_adapter/ # OpenAC Prepare: SD-JWT → Pedersen commitment
│ ├── openac_show/ # OpenAC Show: generic challenge binding + predicates
│ ├── prepare_link/ # OpenAC primitive: prepare commitment
│ ├── show_link/ # OpenAC primitive: challenge + scope binding
│ ├── device_binding/ # ECDSA P-256 Secure Enclave device binding
│ └── openac_core/ # Shared library: commit / show / predicate
├── mopro-binding/ # Rust FFI + iOS xcframework build
├── Sources/ # Swift Package entry point + OpenAC helper APIs
└── Package.swift # iOS 15+ Swift Package (distributed via GitHub releases)Circuit Development Workflow
# Work on a single circuit
cd circuits/disclosure
nargo check # type-check
nargo test # run tests in src/
nargo compile # compile to JSON artifact
# Build iOS xcframework (after circuit changes)
cd ../../mopro-binding
make build-ios # Rust → xcframework (takes ~10 min)Updating the Swift Package in the App
After building a new xcframework:
- Create a new GitHub release in
passport-noirwith the xcframework as a binary attachment - Update the
binaryTargetURL and checksum inPackage.swift - In the solidarity app: File → Packages → Update to Latest Package Versions
What to Contribute Where
| Task | Repo |
|---|---|
| New disclosure predicate (e.g. prove name prefix) | passport-noir → circuits/disclosure/ |
| OpenAC device binding integration | passport-noir → circuits/device_binding/ + solidarity → Services/ZK/MoproProofService.swift |
| New credential adapter (e.g. mDL) | passport-noir → circuits/<name>_adapter/ |
| VP presentation UI | solidarity → Views/ScanViews/ |
| OIDC flow improvement | solidarity → Services/Identity/OID4VPPresentationService.swift |
| P2P exchange protocol | solidarity → Services/Sharing/ProximityManager.swift |
| New trust level badge | solidarity → Models/VerificationStatus.swift |
Last updated on