Skip to Content
Contributing

Contributing

Solidarity is split across two repositories. Contributions to the iOS app and to the ZK circuits follow different workflows.


Repositories

RepoLanguageWhat it contains
p2p-solidarity/solidarity Swift / iOSiOS app, P2P exchange, VC/VP, Apple Wallet
p2p-solidarity/passport-noir Noir / Rust / SwiftZK 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.xcodeproj

Dependencies 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 workingInfo.plist must contain:

  • NSLocalNetworkUsageDescription
  • NSBonjourServices

NFC in simulator — NFC requires a physical device. Passport scanning cannot be tested in simulator.

Simulator networking

xcrun simctl shutdown all xcrun simctl erase all

ZK 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 noirup

Quick 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 --workspace

Project 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:

  1. Create a new GitHub release in passport-noir with the xcframework as a binary attachment
  2. Update the binaryTarget URL and checksum in Package.swift
  3. In the solidarity app: File → Packages → Update to Latest Package Versions

What to Contribute Where

TaskRepo
New disclosure predicate (e.g. prove name prefix)passport-noir → circuits/disclosure/
OpenAC device binding integrationpassport-noir → circuits/device_binding/ + solidarity → Services/ZK/MoproProofService.swift
New credential adapter (e.g. mDL)passport-noir → circuits/<name>_adapter/
VP presentation UIsolidarity → Views/ScanViews/
OIDC flow improvementsolidarity → Services/Identity/OID4VPPresentationService.swift
P2P exchange protocolsolidarity → Services/Sharing/ProximityManager.swift
New trust level badgesolidarity → Models/VerificationStatus.swift
Last updated on