Feb 2, 2026
Introducing the zNinjaPro Swift SDK
A native Swift SDK for privacy-preserving shielded pool workflows on Solana, built for mobile performance and SwiftPM ergonomics.
Building a great iOS experience for on-chain apps usually means juggling performance, cryptography, and platform constraints. The zNinjaPro Swift SDK is designed to make that easier by providing a native Swift developer experience for integrating shielded (privacy-preserving) pool workflows on Solana—with an emphasis on mobile-friendly execution and clean Swift Package Manager integration.
Repo: https://github.com/zNinjaPro/swift-sdk
What this SDK is for
The Swift SDK is intended for teams building:
- iOS/macOS wallets that want private balances and private transfers
- Consumer apps that need privacy-preserving deposits/withdrawals
- Apps that benefit from local proof generation (or proof orchestration) while keeping UX smooth
At a high level, the SDK focuses on giving Swift developers the building blocks needed to:
- Represent notes/commitments, keys, and shielded state
- Maintain or sync Merkle paths and membership proofs
- Build transactions for shielded pool actions (deposit/withdraw/transfer flows)
- Integrate with Solana RPC and app-side state scanning (as applicable)
Why native Swift matters
Mobile apps have different constraints than server-side tooling:
- Performance and battery: cryptographic operations should be efficient and avoid unnecessary overhead.
- Secure key handling: native code integrates more naturally with iOS security patterns.
- Reliable builds: SwiftPM makes dependency management and CI straightforward.
- Developer velocity: Swift-first APIs reduce friction compared to bridging from other ecosystems.
This SDK aims to keep the “hard parts” of shielded workflows encapsulated behind clear interfaces—so app teams can focus on UI/UX and product logic.
Key components (conceptually)
Depending on your integration needs, you typically interact with:
- Core primitives: hashing, note representation, serialization helpers
- Merkle utilities: tree operations and path verification helpers
- Proof plumbing: witness/proof orchestration (e.g., “generate proof from inputs + circuit artifacts”)
- Transaction building: forming the data needed for on-chain instructions
The result is a package you can add to a Swift app and evolve alongside your product—without rewriting cryptographic or proof-related logic in each application.
Getting started with Swift Package Manager
Add the package dependency in Xcode (or in Package.swift) using the repo URL:
https://github.com/zNinjaPro/swift-sdk
Adjust the version and product names to match the package manifest in the repo.
Typical app flow (high-level)
A privacy-preserving flow usually looks like:
- Initialize SDK components (configuration, RPC endpoints, parameters)
- Scan/sync shielded state (notes, commitments, spent status) relevant to the user
- Build an action (deposit/transfer/withdraw) with user inputs
- Generate or attach a ZK proof (locally or via a proving service depending on your architecture)
- Submit the transaction to Solana and track confirmation
- Update local state after finalization
Because apps vary widely, the SDK is structured so you can integrate it “as deep” as needed—from basic primitives all the way up to transaction assembly.
Example usage (pseudocode)
// Pseudocode only — names and types will differ
let sdk = ShieldedPoolSDK(config: config)
let client = sdk.client(rpc: rpc)
// Sync notes and Merkle state
let state = try await client.syncState(for: user)
// Build a private transfer
let action = try client.buildTransfer(
amount: 5_000_000_000,
recipient: recipientShieldedAddress,
state: state
)
// Generate or attach proof
let proof = try await sdk.prover.prove(action)
// Submit transaction
let signature = try await client.submit(action, proof: proof)
try await client.confirm(signature)
How to adopt it safely
If you’re adding privacy features to an existing wallet/app, a smooth adoption path is:
- Start by integrating the SDK in a sandbox build and wiring basic RPC connectivity
- Enable read-only sync first (scan/sync state without sending transactions)
- Add one write path (usually deposit or withdraw) with strong logging + telemetry
- Expand to transfers and more advanced features once UX and reliability are proven
Roadmap-friendly by design
Privacy systems evolve: circuits, parameters, and transaction formats can change over time. The Swift SDK is meant to provide a stable surface area for app teams while keeping internals maintainable. That includes:
- Clear module boundaries (core primitives vs higher-level flows)
- Testable logic and deterministic serialization
- A structure that supports CI and reproducible builds
Repository
The Swift SDK lives here:
https://github.com/zNinjaPro/swift-sdk
If you’re integrating it into an iOS wallet or privacy-enabled app on Solana, this repo is the best starting point for native Swift support.