Core Business Workflow
Client-Side Operations
Account Management
- Generate new cryptocurrency wallets
- Import existing wallets via private keys or seed phrases
Transaction Processing
- Construct, sign, and broadcast transactions
- Query balance and transaction history
Node Operations
Blockchain Query Services
- Provide real-time gas prices
- Retrieve account nonce values
- Broadcast signed transactions to the network
Network Participation
- Validate and propagate transactions
- Maintain consensus with the blockchain
Server-Side Infrastructure
API Services
- Node status monitoring
- Historical transaction data endpoints
Notification System
- Real-time message push for deposits
- System announcement delivery
Ledger Processing
- Transaction record parsing
- Blockchain data indexing
Backend Architecture Modules
The wallet backend consists of six specialized components:
| Module | Functionality | Key Features |
|---|---|---|
| WalletAPI | Frontend interface layer | Balance checks, transaction status, TX construction |
| Ledger | Blockchain data processor | ES synchronization, UTXO management |
| Node | Blockchain interaction | Block listening, account queries |
| MQ | Message broker | RabbitMQ event distribution |
| WalletRPC | Service middleware | Node abstraction layer |
| ScheduleJob | Scheduled tasks | Transaction tracking, market data |
Event-Driven Data Flow
Address Registration Process
- Client โ WalletAPI: Stores device-address mapping
- WalletAPI โ WalletRPC: Syncs addresses to Elasticsearch
- SQL2Es: Maintains searchable address registry
Notification System
- Block Producer: Node triggers MQ on new blocks
Consumer Service:
- Processes raw block data
- Cross-references with ES database
- Triggers push notifications via third-party services
Wallet Operations
- Balance Checks: Hybrid approach (ES for BTC, direct node query for ETH)
- Transaction History: Fully ES-based retrieval
TX Construction: Chain-specific implementations:
- BTC: UTXO validation
- ETH: Account index reference
Technical Implementation Details
Blockchain Data Synchronization
- Bitcoin: UTXO mapping and balance calculation
- Ethereum: Transaction history parsing
- Elasticsearch: Unified query interface
Scheduled Operations
Market Data Updates
- Exchange rate polling
- Asset valuation refreshes
Transaction Monitoring
- Confirmation tracking
- Pending TX status updates
Architectural Considerations
Chain-Specific Implementations
- UTXO Model (Bitcoin): Requires full transaction history parsing
- Account Model (Ethereum): Enables direct node queries
Performance Optimizations
- Elasticsearch indexing for historical data
- gRPC for inter-service communication
- RabbitMQ for event distribution
FAQ Section
What's the difference between UTXO and account-based blockchain queries?
UTXO chains like Bitcoin require parsing entire transaction history, while account-based systems like Ethereum enable direct balance checks through nodes.
How are wallet deposit notifications triggered?
The system listens for new blocks, parses transactions, and cross-references with registered addresses before pushing notifications.
Why use Elasticsearch for wallet data?
ES provides fast search capabilities for transaction history and address lookups, complementing blockchain nodes' real-time data.
How often does the system update market data?
Scheduled jobs run at regular intervals (typically 5-15 minutes) to refresh exchange rates and asset valuations.
What happens during chain reorganizations?
The system monitors chain depth and updates transaction status accordingly, with configurable confirmation thresholds.