How unstoppableswap/core works
Main Components Identification
a) Core Components:
• Swap Protocol Implementation (swap/)
• GUI Application (src-gui/)
• Tauri Backend Bridge (src-tauri/)
• Cryptocurrency Nodes Integration:
• Monero Integration (monero-wallet/, monero-rpc/)
• Bitcoin Integration (visible in swap/src/bitcoin/)
b) Actor Types:
• Maker (ASB - Atomic Swap Backend)
• Taker (CLI/GUI Client)
Architectural Layers
┌─ Presentation Layer ─────────────────────┐
• GUI (React/Tauri Frontend) │
• CLI Interface │
• Application Bridge ────────────────────┤
• Tauri Bindings │
• Core Protocol Layer ──────────────────┤
• Swap Protocol Implementation │
• Network Communication │
• Cryptocurrency Integration Layer ────┤
• Bitcoin Wallet/Node Interface │
• Monero Wallet/Node Interface │
• ┘
Key Interactions to Highlight
a) Network Flow:
• P2P Communication between Maker and Taker
• Tor Network Integration
• Libp2p Implementation
b) Swap Protocol Flow:
• Quote Exchange
• Setup Phase
• Lock Transactions
• Signature Exchange
• Redeem/Refund/Punish Mechanisms
Data Flow Representation
• User Interface → Protocol Communications
• Protocol → Blockchain Interactions
• Inter-party Communications (Maker ↔ Taker)
• Database Operations (SQLite)
Component Details
Frontend (GUI):
┌─ GUI Layer ──────────────┐
• React Components │
• State Management │
• API Integration │
• ┘
Protocol Core:
┌─ Swap Protocol ────────────┐
• State Machines │
• Cryptographic Operations │
• Transaction Management │
• ┘