High-performance, non-custodial, cross-platform BSV wallet with embeddable swipe-to-pay buttons, PayMail, and hybrid authentication (OAuth 2.1 + Passkeys). Built in Rust for efficiency, scalability, and security. 💪
- Non-Custodial BSV Wallet: Secure HD wallet with
rust-svfor key generation and address derivation. 🔑 - PayMail Integration: Supports alias creation, resolution, and P2P transactions via
paymail-rs. 📧 - Hybrid Authentication: OAuth 2.1 (Google) and Passkey support with 2FA (TOTP) for secure login. 🔒
- Real-Time Indexing: RustBus integration for balance and transaction history queries. 🔍
- Cross-Platform UI: Built with Dioxus v0.6 for web, desktop, and mobile, featuring responsive components (
Home,Auth,Profile,Settings, etc.). 📱 - Dynamic Theming: Light/dark theme support with user-configurable settings. 🌗
- Swipe-to-Pay: Embeddable
SwipeButtonfor rapid payments in external projects. ⚡ - Pre-Created UTXOs: Optimized for fast transaction building. 🚀
- Secure Storage: Sled database and OS keyring for private keys and user data. 🛡️
- Telemetry & Monitoring: Tracks auth and payment events with local logging and optional external endpoint reporting. 📊
- Rate Limiting: Protects auth and payment operations (5 requests/minute). 🛑
- Input Validation: Sanitizes emails, validates PayMail prefixes, TOTP codes, and currency inputs. ✅
- Caching: Efficient price caching with TTL for balance conversions. ⏱️
- Error Handling: Unified
ZipErrorwith user-friendly messages viaErrorDisplay. ❗ - Session Management: Robust session tracking with timestamps and telemetry. 🔐
git clone https://github.com/murphsicles/zip
cd zip
cargo build --release
On Linux (e.g., Ubuntu), install the following system libraries for Dioxus and keyring support:
sudo apt-get update
sudo apt-get install -y libglib2.0-dev libgtk-3-dev libwebkit2gtk-4.1-dev
On macOS, use Homebrew:
brew install glib gtk+3 webkitgtk
On Windows, no additional libraries are typically required for Dioxus’s desktop feature, but ensure the Windows Credential Manager is enabled for keyring.
- Set environment variables in
.env:OAUTH_CLIENT_ID,OAUTH_CLIENT_SECRET,OAUTH_AUTH_URL,OAUTH_TOKEN_URL,OAUTH_REDIRECT_URIfor OAuth.RUSTBUS_ENDPOINTfor RustBus integration.LOG_LEVEL(e.g.,info,debug) for logging.TELEMETRY_ENDPOINTfor optional external telemetry reporting.
- Run the app:
cargo run
Run all tests to verify functionality:
cargo test
- Auth Tests: Covers OAuth, Passkey, 2FA, session management, and email validation (
tests/auth_tests.rs). - Blockchain Tests: Validates wallet address generation, balance updates, PayMail aliases, and rate limiting (
tests/blockchain_tests.rs). - UI Tests: Ensures rendering of
Home,Auth,Profile,Settings,NavBar, etc., with session-aware navigation (tests/ui_tests.rs). - Config Tests: Verifies environment variable loading and logging setup (
tests/config_tests.rs). - Utils Tests: Tests error handling, telemetry, caching, and validation (
tests/utils_tests.rs).
Run performance benchmarks:
cargo bench
This project is licensed under the Open BSV License. See the LICENSE file for details.
- src/auth/: Authentication logic (
AuthManager,OAuthManager,PasskeyManager,Session). - src/blockchain/: Wallet and PayMail operations (
WalletManager,PaymailManager,TransactionManager). - src/config/: Environment configuration (
EnvConfig). - src/ui/: Dioxus components (
App,Home,Auth,Profile,Settings,NavBar,ThemeProvider,ThemeSwitcher). - src/utils/: Utilities for logging, telemetry, caching, security, rate limiting, and session management.
- tests/: Comprehensive test suites for all modules.
Contributions are welcome! Please submit pull requests or open issues on GitHub.
For questions, reach out via GitHub Issues.