A reference implementation of a mobile wallet for the Cashu protocol - private, secure ecash for Bitcoin.
Cashu is a privacy-focused ecash protocol for Bitcoin that enables:
- Private transactions: Using blind signatures to ensure the mint cannot track who is spending tokens
- Offline payments: Send and receive payments without requiring an internet connection
- Programmable money: Support for script conditions like time locks, public key locks, and more
- Lightning Network integration: Seamless interoperability with the Lightning Network
- 🔒 Private Transactions: Send and receive Cashu tokens with complete privacy
- ⚡ Lightning Network Support: Deposit and withdraw using Lightning Network
- 🌐 Multi-Mint Support: Connect to multiple mints to distribute trust
- 🔄 Transaction History: View your complete transaction history
- 🌙 Dark Mode: Toggle between light and dark themes
- 🌍 Internationalization: Supports multiple languages (currently English and Spanish)
- 📱 Cross-Platform: Built with Flutter for iOS and Android
Coming soon
- Flutter SDK (>=3.0.0)
- Dart SDK (>=3.0.0)
- Android Studio / Xcode for mobile development
- Clone the repository:
git clone https://github.com/hvmelo/cashu_app.git
cd cashu_app- Install dependencies:
flutter pub get- Generate code for Riverpod providers, Freezed models, and other generated files:
# Clean any previous build artifacts
dart run build_runner clean
# Generate code with build_runner
dart run build_runner build --delete-conflicting-outputs- Generate localization files:
flutter gen-l10n- Run the app:
# Development environment
flutter run --flavor development --target lib/main_development.dart
# Staging environment (uses a real mint)
flutter run --flavor staging --target lib/main_staging.dartTo build a release version of the app:
# Android
flutter build apk --flavor development --target lib/main_development.dart
flutter build apk --flavor staging --target lib/main_staging.dart
# iOS
flutter build ios --flavor development --target lib/main_development.dart
flutter build ios --flavor staging --target lib/main_staging.dartlib/
├── config/ # App configuration and providers
├── data/ # Data layer with repositories
├── domain/ # Domain models and use cases
├── routing/ # App routing
├── ui/
│ ├── core/ # Core UI components, themes, and localization
│ ├── home/ # Home screen and related widgets
│ ├── mint/ # Mint-related screens and widgets
│ └── mint_manager/ # Mint management screens and widgets
├── utils/ # Utility classes and functions
└── main.dart # App entry point
The project uses several code generation tools:
- Riverpod: For state management and dependency injection
- Freezed: For immutable models
- JSON Serializable: For JSON serialization/deserialization
After making changes to files with annotations, run:
dart run build_runner build --delete-conflicting-outputsThe app supports different build configurations:
- Development: Connects to https://testnut.cashu.space
- Staging: Coming soon
- Production: Coming soon
The app supports multiple languages. To add a new language:
- Create a new ARB file in
lib/ui/core/l10n/ - Run the localization generator:
flutter gen-l10n-
Build failures after updating dependencies: Try cleaning the project and regenerating code:
flutter clean dart run build_runner clean dart run build_runner build --delete-conflicting-outputs
-
Missing generated files: Ensure you've run the build_runner:
dart run build_runner build --delete-conflicting-outputs
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Cashu Protocol - The core Cashu protocol
- CDK Flutter - Cashu Development Kit for Flutter
