FnzeroSafe is an open-source Solana wallet security workspace for encrypted keystores, desktop signing, mobile wallets, dApp signing, Pump trading, Squads multisig, bot integration, and advanced desktop-only Program workflows.
中文 | English | Website | Telegram | Discord
- Project Overview
- Repository Layout
- Development Environment
- Run In Development
- Package For Release
- Command Reference
- Configuration
- Security Model
- Documentation
- Before Submitting To GitHub
- License
FnzeroSafe is a local-first Solana wallet and key-management workspace. It combines a Rust core crate, an interactive CLI, a local desktop API, a Next.js web interface, a Tauri desktop shell, and a Flutter mobile app for iOS and Android.
| Area | Coverage |
|---|---|
| Wallets | Create wallets, import keystores/private keys/mnemonics, unlock wallets, export encrypted backups |
| Security | Password keystores, encrypted local API bodies, local API token, TOTP, biometric confirmation, sensitive log filtering |
| Assets | SOL balance, SPL Token accounts, Token-2022 accounts, mint metadata, transaction history |
| Payments | SOL transfer, SPL transfer, WSOL wrap/unwrap/close ATA |
| dApps | In-app WebView, Solana provider injection, message/transaction preview, user-confirmed signing |
| Squads | Squads v4 multisig create/info/proposals/approve/reject/execute, SOL/SPL payment proposals |
| Trading | Pump.fun and PumpSwap sell flows, cashback views and claims, SWQoS token configuration |
| Programs | Desktop-only Program deploy, upgrade, source build, authority and deployment workflows |
| Automation | Rust SDK, CLI helpers, local API, examples for bot integration |
| Edition | Path | Technology | Primary Use |
|---|---|---|---|
| Desktop app | apps/desktop |
Next.js + Tauri + Rust API | Full local wallet console, dApp signing, Pump, Squads, Program workflows |
| Mobile app | apps/mobile |
Flutter + flutter_rust_bridge + Rust core |
iOS/Android wallet, assets, payments, dApp signing, Pump, Squads |
| Rust core / CLI | crates/core |
Rust | Keystore, CLI, SDK-style integration and automation |
| Shared services | crates/app-services |
Rust | Business logic shared by desktop and mobile |
| Mobile bridge | crates/mobile-bridge |
Rust FFI | FRB-friendly API consumed by Flutter |
| Capability | Desktop | iOS | Android | Notes |
|---|---|---|---|---|
| Wallet create/import/unlock/export | Yes | Yes | Yes | Secrets stay in encrypted keystores |
| SOL/SPL assets and history | Yes | Yes | Yes | Uses Solana RPC |
| SOL/SPL/WSOL payments | Yes | Yes | Yes | User confirmation required |
| dApp message signing | Yes | Yes | Yes | WebView/provider flow on mobile |
| dApp transaction signing/sending | Yes | Yes | Yes | User confirmation required |
| Squads multisig | Yes | Yes | Yes | Create, proposals, approve/reject/execute |
| PumpFun/PumpSwap | Yes | Partial mobile integration | Partial mobile integration | Mobile submit flows continue to mature |
| Program deploy | Yes | No | No | Desktop-only by design |
| Program upgrade | Yes | No | No | Desktop-only by design |
| Program source build | Yes | No | No | Desktop-only by design |
| Generic Program invoke | Yes | No | No | Desktop-only by design |
| Platform | Status | Main Command | Output |
|---|---|---|---|
| Desktop development | Supported | make dev |
Tauri app, Next.js on 127.0.0.1:3840, API on 127.0.0.1:3841 |
| macOS desktop package | Supported on macOS | make package-macos |
release/macos/*.dmg and .app |
| Windows desktop package | Supported on Windows runner | make package-windows |
release/windows/*.msi and/or .exe |
| iOS app package | Supported with Xcode iOS platform/signing | make package-ios |
release/ios/*.app or .ipa |
| Android app package | Supported | make package-android |
release/android/*.apk and .aab |
| CLI | Supported | cargo run -p fnzero-safe-core --features full -- start |
Interactive terminal wallet tools |
/
├─ Cargo.toml
├─ Makefile
├─ crates/
│ ├─ core/ # Rust SDK and CLI binary: fnzero-safe
│ ├─ app-services/ # Shared wallet/assets/payments/dApp/Squads services
│ ├─ desktop-api/ # Local Axum API used by desktop/web
│ └─ mobile-bridge/ # flutter_rust_bridge FFI layer
├─ apps/
│ ├─ desktop/ # Next.js UI and Tauri desktop shell
│ └─ mobile/ # Flutter iOS/Android app
├─ packages/
│ └─ shared-contracts/ # Shared API contracts and interface notes
├─ examples/ # Bot and keystore examples
├─ docs/ # Internal testing and development notes
└─ release/ # Package output directory, ignored by Git
The public product name is FnzeroSafe. Internal Cargo package names such as fnzero-safe-core, fnzero-safe-desktop-api, and fnzero-safe-mobile-bridge keep workspace crates unique.
| Tool | Recommended Version | Used For |
|---|---|---|
| Rust | 1.89+ | Workspace, CLI, desktop API, mobile bridge |
| Node.js | 20 or 22+ | Desktop web app |
| npm | 10+ | Desktop dependencies and scripts |
| Flutter / Dart | Flutter 3.24+ | iOS and Android app |
| Xcode | Current stable | macOS desktop package, iOS simulator/device/archive |
| Android Studio / SDK / NDK | Current stable | Android builds and emulators |
| JDK | 17 | Android Gradle builds |
cargo-ndk |
Latest | Android Rust bridge libraries |
flutter_rust_bridge_codegen |
FRB 2.x | Regenerating Dart/Rust bridge code |
rustup update
npm --version
flutter doctor -v
cargo install cargo-ndk
cargo install flutter_rust_bridge_codegen
npm --prefix apps/desktop install
cd apps/mobile && flutter pub getRegenerate mobile bridge bindings after changing crates/mobile-bridge/src/api.rs:
cd apps/mobile
./tool/generate_bridge.sh| Host | Notes |
|---|---|
| macOS | Required for macOS desktop packages and iOS builds. Install the matching iOS platform/runtime from Xcode > Settings > Components. |
| Windows | Recommended for make package-windows with the MSVC target and Visual Studio build tools. |
| Android | Use JDK 17. Override auto-detection with ANDROID_JAVA_HOME=/path/to/jdk17 make package-android. |
| iOS signing | Unsigned .app builds can use make package-ios; signed IPA/TestFlight builds require an Apple developer team, provisioning profile, and export options. |
Run from the repository root:
npm --prefix apps/desktop install
make devmake dev stops stale local development processes first, then starts:
| Service | URL |
|---|---|
| English UI | http://127.0.0.1:3840/en/ |
| Chinese UI | http://127.0.0.1:3840/zh/ |
| Local API health | http://127.0.0.1:3841/api/health |
The local API is designed for loopback use only. Do not expose 3841 through a public proxy, tunnel, or port forward.
cd apps/mobile
./tool/bootstrap_mobile.sh
flutter pub get
./tool/generate_bridge.sh
./tool/build_ios_native.sh
flutter run -d iosiOS requirements:
- Xcode command line tools are selected with
xcode-select. - The matching iOS platform/runtime is installed in Xcode Components.
- iOS deployment target is 15.0.
- Physical devices and TestFlight require normal Xcode signing setup.
cd apps/mobile
./tool/bootstrap_mobile.sh
flutter pub get
./tool/generate_bridge.sh
./tool/build_android_native.sh
flutter run -d androidAndroid notes:
- Android application id is
dev.fnzero.safe. - Android
minSdkis 26. - Rust bridge
.solibraries are generated forarm64-v8a,armeabi-v7a,x86, andx86_64. - JDK 17 is recommended for Gradle.
cargo run -p fnzero-safe-core --features full -- startInstall the CLI locally from source:
cargo install --path crates/core --features full
fnzero-safe startAll package commands copy artifacts into the root release/ directory:
release/
├─ android/
│ ├─ app-release.apk
│ └─ app-release.aab
├─ ios/
│ └─ *.app or *.ipa
├─ macos/
│ ├─ FnzeroSafe.app
│ └─ FnzeroSafe_*.dmg
└─ windows/
└─ *.msi and/or *.exe
release/ is ignored by Git.
make package-macosThis runs the desktop production build and copies .dmg and .app artifacts into release/macos/.
make package-windowsThis builds the Tauri Windows package and copies .msi and/or .exe artifacts into release/windows/.
Recommended build environment: a Windows runner with Rust, Node.js, npm, and Microsoft Visual Studio build tools installed. Cross-building Windows installers from macOS requires extra toolchain setup.
Override the target when needed:
TAURI_WINDOWS_TARGET=x86_64-pc-windows-msvc make package-windowsUnsigned local .app build:
make package-iosSigned IPA build:
IOS_CODESIGN=true IOS_EXPORT_OPTIONS_PLIST=/path/to/ExportOptions.plist make package-iosThe command first builds the Rust iOS FnzeroSafeMobileBridge.xcframework, then runs the Flutter iOS package step and copies artifacts into release/ios/.
make package-androidIf JDK 17 is not auto-detected:
ANDROID_JAVA_HOME=/path/to/jdk17 make package-androidAndroid release signing:
cp apps/mobile/android/key.properties.example apps/mobile/android/key.properties
# Edit key.properties so storeFile, storePassword, keyAlias, and keyPassword point to your upload keystore.
make package-androidThe command builds Rust Android native libraries, a release APK, and a release AAB, then copies artifacts into release/android/.
make packageThis runs Android, iOS, macOS, and Windows package targets in sequence. For CI, run each platform on its native runner when possible.
| Command | Description |
|---|---|
make dev |
Start desktop development; stale local app/API processes are stopped first |
make package-macos |
Build macOS desktop package into release/macos/ |
make package-windows |
Build Windows desktop package into release/windows/ |
make package-ios |
Build iOS .app or signed .ipa into release/ios/ |
make package-android |
Build Android APK/AAB into release/android/ |
make package |
Build all package targets |
cargo fmt --all -- --check |
Check Rust formatting |
cargo check --workspace --all-features |
Check the full Rust workspace |
cargo test --workspace |
Run Rust tests |
cargo clippy --workspace --all-targets --all-features -- -D warnings |
Run strict Rust linting |
npm --prefix apps/desktop run lint |
Run desktop lint and sensitive-input checks |
npm --prefix apps/desktop run build |
Build the Next.js static frontend |
cd apps/mobile && flutter analyze |
Analyze the Flutter app |
cd apps/mobile && flutter test --dart-define=FNZERO_MOBILE_DEV_BRIDGE=true |
Run Flutter tests with the dev bridge fallback |
| Variable | Purpose |
|---|---|
FNZERO_SAFE_API_TOKEN |
Fixed local API token for desktop/web development |
FNZERO_SAFE_DB_PATH |
Override wallet database path |
FNZERO_SAFE_ALLOWED_ORIGINS |
Comma-separated list of additional trusted local API origins |
FNZERO_SAFE_ALLOW_SECRET_EXPORT=true |
Allow plaintext private key/mnemonic export from non-desktop local debugging contexts |
FNZERO_SAFE_ALLOW_DIRECT_SECRET_INPUT=true |
Allow direct plaintext private key submission from web debugging contexts |
FNZERO_MOBILE_DEV_BRIDGE=true |
Use Flutter dev bridge fallback for tests without native libraries |
ANDROID_JAVA_HOME |
JDK 17 path for Android package builds |
IOS_CODESIGN=true |
Build a signed iOS IPA instead of an unsigned .app |
IOS_EXPORT_OPTIONS_PLIST |
Export options plist path for signed iOS IPA builds |
TAURI_WINDOWS_TARGET |
Override the Tauri Windows target triple |
FNZERO_SAFE_FLASHBLOCK_SWQOS_API_TOKEN |
FlashBlock SWQoS token |
FNZERO_SAFE_BLOCKRAZOR_SWQOS_API_TOKEN |
BlockRazor SWQoS token |
FNZERO_SAFE_ASTRALANE_SWQOS_API_TOKEN |
Astralane SWQoS token |
FNZERO_SAFE_SPEEDLANDING_SWQOS_API_TOKEN |
SpeedLanding SWQoS token |
Legacy SOL_SAFEKEY_* variables are still accepted as fallbacks for existing local setups.
- Local-first API: the desktop API binds to loopback and requires a local API token for protected routes.
- Encrypted sensitive requests: password and secret-bearing JSON requests are encrypted before crossing the local web/API boundary.
- Keystore-first storage: saved wallets store encrypted keystore JSON, not plaintext private keys.
- Mobile private storage: mobile keystore files stay in app private storage; wallet metadata and biometric settings use secure storage.
- Biometric confirmation: mobile signing actions can be gated by platform biometrics; desktop Touch ID uses macOS Keychain access control.
- Explicit signing confirmation: payments, dApp signing, transaction sending, and Squads actions go through a confirmation screen.
- Plaintext export controls: plaintext private key and mnemonic export are intentionally gated and should be used only for migration or local debugging.
- No mobile Program workflows: mobile builds do not expose Program deploy, upgrade, source build, or generic invoke APIs.
Always back up encrypted keystores before depositing funds. Passwords and seed phrases cannot be recovered by FnzeroSafe.
- Desktop UI README
- Mobile README
- Mobile Internal Test Checklist
- UI Wallet User Guide
- Bot Integration Guide
- CLI User Guide
- Interactive Tutorial
- Program Deployment Guide
Recommended validation:
cargo fmt --all -- --check
cargo check --workspace --all-features
cargo test --workspace
cargo clippy --workspace --all-targets --all-features -- -D warnings
npm --prefix apps/desktop run lint
npm --prefix apps/desktop run build
cd apps/mobile && flutter analyze
cd apps/mobile && flutter test --dart-define=FNZERO_MOBILE_DEV_BRIDGE=truePackage validation when release artifacts are needed:
make package-android
make package-macos
# Run package-ios on a macOS host with the required iOS platform/runtime installed.
# Run package-windows on a Windows host with MSVC build tools installed.For security-sensitive changes, include the threat model and the validation commands you ran in the pull request.
MIT License. See LICENSE.