How cashubtc/nutshell works
Main Components Overview
The system should be divided into these major components:
a) Core Components:
• Crypto Module (cashu/core/crypto/)
• Core Models and Base Classes (cashu/core/)
• Nuts Protocol Implementation (cashu/core/nuts/)
b) Wallet Components:
• Wallet API Server
• CLI Interface
• Lightning Integration
• Storage/Database Layer
c) Mint Components:
• Mint Server
• Lightning Backend Integrations
• Database Layer
• Event System
d) Supporting Systems:
• Nostr Integration
• Tor Integration
• Lightning Network Interfaces
Component Relationships and Data Flow
[Client/External] <-> [Wallet API/CLI] <-> [Core Crypto] <-> [Mint Server] <-> [Lightning Network]
Detailed Component Breakdown
a) Core Layer (Bottom):
[Crypto Operations (secp, b_dhke)] <-> [Nuts Protocol] <-> [Base Models]
b) Mint Layer (Middle):
[Lightning Backends] -> [Mint Server] -> [Ledger] -> [Database]
• > [Events System]
• > [Cache]
c) Wallet Layer (Top):
[CLI Interface] -> [Wallet API] -> [Proofs/Transactions] -> [Core]
• > [Lightning Integration]
• > [Local Storage]
Important Architectural Elements to Highlight
• Separation between:
• Core crypto operations
• Wallet functionality
• Mint services
• External integrations
• Modular nature of:
• Lightning backend implementations
• Database support (PostgreSQL/SQLite)
• Protocol implementations (Nuts)
Technical Stack Indicators
Technology badges or labels for:
• Python
• FastAPI (for API servers)
• Lightning Network
• PostgreSQL/SQLite
• Nostr
• Tor