API for the Bitcoin Lightning Wallet, P2P & Marketplace Platform
A complete platform built on the Bitcoin Lightning Network, integrated with the Blink API, enabling fast payments, P2P transaction, digital marketplaces, and real-world BTC usage in physical stores to.
This project creates a Bitcoin-first ecosystem, where users can:
- BTC transactions and payments using the Lightning Network
- Make user → user internal transactions with zero fees
- Perform P2P BTC ↔ fiat swaps using a logical escrow system
- Discover nearby stores that accept Bitcoin through an interactive map (BTC Map)
- Create marketplaces with Lightning payments via QR Code
Frontend ( Mobile Android/ iOS "React Native" )
↓
Spring Boot (Java)
├── Auth & Users
├── Marketplace
├── Admin & APIs públicas
└── Integrações Fiat (M-Pesa)
↓
Axum (Rust)
├── Wallet Core
├── Lightning Payments
├── P2P Escrow Engine
└── WASM Runtime
↓
Blink API (BTC / Lightning)
- Java 17+
- Spring Boot
- Spring Security (JWT Authentication)
- Spring Data JPA
- PostgreSQL / MySQL
- Redis (cache and locks)
Responsibilities:
- User registration and authentication
- Marketplace and product management
- Admin dashboard
- Fiat integrations (e.g. M-Pesa)
- API orchestration
- Rust
- Axum
- Tokio
- Tower
- Reqwest
Responsibilities:
- Lightning wallet core
- BTC payments
- User → user internal transfers
- P2P escrow engine
- Direct integration with the Blink API
- Rust + wasm-bindgen
- Wasmtime (server-side runtime)
Used for:
- Critical escrow logic
- Deterministic validations
- Fee and conversion calculations
- Secure and isolated execution
- Send and receive BTC
- Balance displayed in sats Bitcoin and mozabican fiat
- Instant internal transfers (user → user)
- Users can create buy/sell offers
- Other users can accept offers
- Atomic execution:
- Fiat payment confirmed
- BTC released
- No on-chain smart contracts
- Shows Bitcoin-accepting stores within a 20 km radius
- Store details and navigation support
- Encourages real-world BTC usage
- Any user can create a marketplace
- Free plan with up to 500 MB of storage
- Product catalog and menu pages
- QR Code generation
- Lightning payments supported by:
- Alfred Wallet
- Blink
- Other Lightning wallets (e.g. Breez)
- Users can view all marketplaces in the app on a map interface.
- Blink API — Bitcoin & Lightning Network
- BTC Map — Merchant discovery
- M-Pesa / Fiat APIs — Fiat payments
- Lightning Network — Fast, low-fee transactions
To build a scalable and secure platform that:
- Encourages the use of Bitcoin for everyday payments in Mozambique
- Enables instant, low-fee payments
- Connects users, merchants, and marketplaces
- Uses modern, high-performance technologies
MIT License