Nutsack - Modern Cashu Wallet for iOS

Overview
Nutsack is a modern Cashu ecash wallet for iOS that integrates seamlessly with Nostr, implementing NIP-60 (wallet data) and NIP-61 (nutzaps). It provides a beautiful, native iOS experience for managing ecash with full backup and social payment capabilities.
Features
🏦 Core Wallet Features
Multi-Mint Support: Connect to multiple Cashu mints for improved reliability
Lightning Integration: Mint ecash from Lightning invoices and melt back to Lightning
Send & Receive: Share ecash tokens via QR codes, text, or Nostr
Real-time Balance: Live balance updates with fiat conversion (USD, EUR, BTC)
Transaction History: Comprehensive tracking of all ecash movements
Proof Management: View, select, and manage individual ecash proofs
DLEQ Verification: Automatic verification of mint signatures for enhanced security
⚡ Nostr Integration
Nostr Authentication: Login with nsec or create new Nostr account
NIP-60 Backup: Automatic wallet backup to Nostr relays
NIP-61 Nutzaps: Zap other Nostr users with ecash
Contact Integration: See your Nostr follows and zap them easily
Multi-Relay Support: Connect to multiple Nostr relays with health monitoring
Mint Discovery: Find new mints through NIP-38000 announcements
🎨 UI/UX Features
Beautiful Dark Theme: Elegant design with glassmorphic effects
Native iOS Feel: Built with SwiftUI for smooth, native performance
QR Code Scanner: Scan ecash tokens, Lightning invoices, and mint URLs
Intuitive Navigation: Tab-based interface with clear actions
Real-time Updates: Live balance updates and transaction notifications
Pie Chart Visualization: Visual breakdown of balance across mints
Smooth Animations: Delightful animations for payments and interactions
🔒 Security Features
Biometric Lock: Protect your wallet with Face ID/Touch ID
Encrypted Storage: Local key storage with encryption
Mint Blacklisting: Block untrusted mints
Token Validation: Automatic validation of received tokens
Relay Health Monitoring: Track relay connection status
Architecture
The app is built using modern iOS technologies:
SwiftUI for the declarative UI layer
SwiftData for local persistence
NDKSwift for Nostr protocol integration
CashuSwift for Cashu protocol operations
Combine for reactive programming
Key Components
WalletManager: Core wallet operations and state management
NostrManager: Handles all Nostr operations including authentication and event publishing
MintDiscoveryManager: Discovers and manages Cashu mints
WalletDataSources: Reactive data sources for UI updates
AppState: Global app state and user preferences
Requirements
iOS 17.0+
Xcode 15.0+
Swift 5.9+
Installation
Building from Source
Clone the repository:
git clone https://github.com/pablof7z/Nutsack.git
cd Nutsack
Install XcodeGen if you haven't already:
brew install xcodegen
Generate the Xcode project:
./refresh-project.sh
Open the project in Xcode:
open NutsackiOS.xcodeproj
Build and run the project on your device or simulator
TestFlight
Coming soon! We'll be releasing Nutsack on TestFlight for beta testing.
Development
Building
# Refresh project after file changes
./refresh-project.sh
# Build with clean output
./build.sh
# Build for specific device
DESTINATION="platform=iOS Simulator,name=iPhone 16 Pro" ./build.sh
Testing
The project includes comprehensive Maestro UI tests:
# Run all tests
maestro test maestro-tests/
# Run specific test
maestro test maestro-tests/01-onboarding.yaml
Deploying to TestFlight
./deploy.sh
Configuration
Default Mints
The app comes pre-configured with trusted mints. Users can add their own mints via:
Scanning mint QR codes
Entering mint URLs manually
Discovering mints through Nostr
Relay Configuration
Default relays are configured for optimal performance. Users can customize relays in Settings.
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
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
Testing
The app includes comprehensive test coverage:
Unit tests for wallet operations
UI tests using Maestro
Integration tests for Nostr functionality
Run tests with:
swift test
Security
Private keys are encrypted and stored locally
All Nostr communications use standard encryption
Ecash tokens are validated before acceptance
Mint trust is explicit and user-controlled
Regular security audits are performed
Roadmap
[ ] Multi-language support
[ ] Backup/restore from seed phrase
[ ] Push notifications for received payments
[ ] Widget support for balance display
[ ] WalletConnect integration
[ ] Hardware wallet support
[ ] Tor support for enhanced privacy
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Built with NDKSwift
Uses CashuSwift for Cashu operations
Implements Nostr Protocol NIPs
UI inspired by macademia wallet
Contact
Nostr:
npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft
GitHub: @pablof7z
Made with 🥜 for the ecash future