Skip to content

Forte11Cuba/elcaju

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

151 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ElCaju πŸ₯œ

Ask DeepWiki
Ask questions about this project using DeepWiki AI

ElCaju Logo

Your private ecash wallet on Bitcoin

Flutter Dart Rust Bitcoin Cashu

elcaju.me β€’ Installation β€’ Features β€’ Technologies


πŸ“± About ElCaju

ElCaju is a Cashu wallet (ecash on Bitcoin) with Cuban identity, brother of LaChispa (Lightning). Designed to offer privacy, offline transactions, and a warm tropical experience.

What is Cashu?

Cashu is an ecash protocol that enables Bitcoin transactions with maximum privacy. Cashu tokens are:

  • Private: Fungible and untraceable
  • Offline: Store and send tokens without internet connection
  • Instant: No waiting for blockchain confirmations

✨ Features

Feature Description
πŸ” Total Privacy Fungible ecash tokens, no traceable history
πŸ“΄ Works Offline Store and share tokens without internet
⚑ Lightning Bridge Deposit and withdraw sats via Lightning Network
🏦 Multi-Mint Connect to multiple Cashu mints simultaneously
πŸ’± Multi-Unit Support for sat, USD, EUR and more
πŸ”‘ Your Seed, Your Money Backup with 12 words (BIP39)
πŸ”’ Optional PIN Protect access to your wallet
🌐 Bilingual Spanish and English
πŸŽ‰ Friendly UX Visual effects and confetti when receiving funds

πŸš€ Screenshots


πŸ”§ Technologies

Frontend

  • Flutter 3.27+: Cross-platform framework
  • Dart: Programming language
  • Provider: State management
  • QR Flutter: QR code generation

Backend & Core

  • cdk-flutter: Cashu Development Kit (Rust FFI)
  • SQLite: Local persistence via cdk-sqlite
  • Flutter Secure Storage: Secure storage for seed and PIN

Protocols

  • Cashu: NUT-00 to NUT-13 (ecash protocol)
  • Lightning Network: Deposits and withdrawals via BOLT11
  • BIP39: Seed phrase generation

πŸ“¦ Installation

Prerequisites

  • Flutter SDK (>=3.27.0)
  • Dart SDK (>=3.6.0)
  • Android Studio with Android SDK
  • Android NDK 26.3+ (install via Android Studio > SDK Manager > SDK Tools)
  • Rust toolchain (>=1.85.0)

Clone the Repository

git clone https://github.com/Forte11Cuba/elcaju.git
cd elcaju

Install Dependencies

flutter pub get

Configure Rust for Android (Linux/macOS)

# Install Rust if not already installed
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Update to latest stable (requires >= 1.85.0)
rustup update stable

# Install Android targets
rustup target add aarch64-linux-android   # arm64-v8a (modern devices)
rustup target add armv7-linux-androideabi # armeabi-v7a (older devices)
rustup target add x86_64-linux-android    # x86_64 (emulators)

Configure Android NDK Linkers

Create or edit ~/.cargo/config.toml with your NDK path:

[target.x86_64-unknown-linux-gnu]
linker = "gcc"
rustflags = ["-C", "link-arg=-fuse-ld=bfd"]

[target.aarch64-linux-android]
linker = "/path/to/Android/Sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"

[target.armv7-linux-androideabi]
linker = "/path/to/Android/Sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"

[target.x86_64-linux-android]
linker = "/path/to/Android/Sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang"

[env]
CC_armv7-linux-androideabi = "/path/to/Android/Sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi24-clang"
AR_armv7-linux-androideabi = "/path/to/Android/Sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
CC_x86_64-linux-android = "/path/to/Android/Sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android24-clang"
AR_x86_64-linux-android = "/path/to/Android/Sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"
CC_aarch64-linux-android = "/path/to/Android/Sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang"
AR_aarch64-linux-android = "/path/to/Android/Sdk/ndk/26.3.11579264/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar"

Note: Replace /path/to/Android/Sdk with your actual Android SDK path (usually ~/Android/Sdk on Linux or ~/Library/Android/sdk on macOS).

Compile Native Libraries

The cdk_flutter native libraries must be compiled manually:

# Navigate to cdk_flutter rust directory
cd ~/.pub-cache/git/cdk_flutter-*/rust

# Build for each architecture
cargo build --release --target aarch64-linux-android
cargo build --release --target armv7-linux-androideabi
cargo build --release --target x86_64-linux-android

# Copy libraries to project
mkdir -p /path/to/elcaju/android/app/src/main/jniLibs/{arm64-v8a,armeabi-v7a,x86_64}

cp target/aarch64-linux-android/release/libcdk_flutter.so \
   /path/to/elcaju/android/app/src/main/jniLibs/arm64-v8a/

cp target/armv7-linux-androideabi/release/libcdk_flutter.so \
   /path/to/elcaju/android/app/src/main/jniLibs/armeabi-v7a/

cp target/x86_64-linux-android/release/libcdk_flutter.so \
   /path/to/elcaju/android/app/src/main/jniLibs/x86_64/

Run in Development

flutter run

Build for Production

# Android APK (includes all architectures, ~55MB)
flutter build apk --release

# Android App Bundle (recommended for Play Store)
flutter build appbundle --release

Quick Build (arm64 only)

For faster builds targeting only modern devices:

# Build only arm64 library
cargo build --release --target aarch64-linux-android

# Copy to project
cp target/aarch64-linux-android/release/libcdk_flutter.so \
   android/app/src/main/jniLibs/arm64-v8a/

# Build APK (~40MB)
flutter build apk --release

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚          Flutter UI (Dart)              β”‚
β”‚   Provider + Streams + Intl             β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚     WalletProvider / SettingsProvider   β”‚
β”‚   (Multi-unit: Map<mintUrl:unit>)       β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚          cdk-flutter (FFI)              β”‚
β”‚      flutter_rust_bridge v2.11.1        β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚           Rust Core (CDK)               β”‚
β”‚  Cashu 0.13.4 + SQLite + Bitcoin        β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Project Structure

elcaju/
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ main.dart                 # Entry point
β”‚   β”œβ”€β”€ core/
β”‚   β”‚   β”œβ”€β”€ constants/            # Colors, dimensions
β”‚   β”‚   β”œβ”€β”€ theme/                # App theme
β”‚   β”‚   └── utils/                # Formatters, validators
β”‚   β”œβ”€β”€ providers/
β”‚   β”‚   β”œβ”€β”€ wallet_provider.dart  # Wallet logic
β”‚   β”‚   └── settings_provider.dart# Preferences and PIN
β”‚   β”œβ”€β”€ screens/
β”‚   β”‚   β”œβ”€β”€ 1_splash/             # Loading screen
β”‚   β”‚   β”œβ”€β”€ 2_onboarding/         # Create/restore wallet
β”‚   β”‚   β”œβ”€β”€ 3_home/               # Main screen
β”‚   β”‚   β”œβ”€β”€ 4_receive/            # Receive tokens
β”‚   β”‚   β”œβ”€β”€ 5_send/               # Send tokens
β”‚   β”‚   β”œβ”€β”€ 6_mint/               # Deposit via Lightning
β”‚   β”‚   β”œβ”€β”€ 7_melt/               # Withdraw to Lightning
β”‚   β”‚   └── 8_settings/           # Settings
β”‚   β”œβ”€β”€ widgets/
β”‚   β”‚   β”œβ”€β”€ common/               # Buttons, cards, etc.
β”‚   β”‚   └── effects/              # Confetti and animations
β”‚   └── l10n/                     # Translations ES/EN
└── assets/
    └── img/                      # Logo and assets

πŸ” Security

Feature Implementation
Seed Phrase Stored with Flutter Secure Storage (native encryption)
PIN Secure hash, local verification
Local Data SQLite with proofs encrypted by Cashu protocol
No Tracking We don't collect user data
Open Source 100% auditable

Important

⚠️ Backup your seed phrase (12 words). Without it, you won't be able to recover your funds if you lose your device.


πŸ“± Compatibility

Platform Status Minimum Version
βœ… Android Supported API 24 (Android 7.0)
🚧 iOS Coming soon iOS 12.0+
🚧 Web Coming soon -

🌐 Default Mint

ElCaju comes preconfigured with the Cuba Bitcoin mint:

https://mint.cubabitcoin.org

You can add other Cashu mints from the settings.


🀝 Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a branch for your feature (git checkout -b feature/new-feature)
  3. Commit your changes (git commit -m 'Add new feature')
  4. Push to the branch (git push origin feature/new-feature)
  5. Open a Pull Request

Report Bugs

Open an issue with:

  • Problem description
  • Steps to reproduce
  • Android version/device
  • Relevant logs

πŸ“„ License

This project is under the MIT License - see the LICENSE file for more details.


πŸ™ Credits


Made with 🧑 by Forte11

Cashu4Community β€’ Cuba Bitcoin β€’ elcaju.me

About

Cashu Wallet building with Flutter with cdk-flutter

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors