Back to Projects
Wallet as a Service
Blocsafe
Multi-chain wallet supporting 8 blockchains, payment gateway, realtime webhooks & blockchain indexing.
3 min read•8 Chains
8 blockchain networksPayment gateway integrationReal-time webhooksCustom blockchain indexer
Tech Stack
Node.jsPostgreSQLRedisWebSocketBlockchainWeb3
Overview
Blocsafe is a comprehensive Wallet-as-a-Service (WaaS) platform that provides businesses with the infrastructure to manage cryptocurrency wallets across multiple blockchains. The platform includes a payment gateway, webhook system, and custom blockchain indexing solution.
The Problem
Businesses wanting to integrate cryptocurrency into their operations face significant challenges:
- Multi-chain complexity: Each blockchain has different APIs, transaction formats, and confirmation times
- Infrastructure costs: Running full nodes for multiple chains is expensive
- Security requirements: Wallet security requires specialized expertise
- Real-time data: Businesses need instant notifications for transactions
Solution Architecture
Multi-Chain Wallet System
plaintext
┌────────────────────────────────────────────┐
│ Blocsafe API Gateway │
├────────────────────────────────────────────┤
│ Unified Wallet Interface │
├────────┬────────┬────────┬────────┬───────┤
│Bitcoin │Ethereum│ BNB │ Tron │ More │
│ Core │ Node │ Chain │ Node │ ... │
└────────┴────────┴────────┴────────┴───────┘Supported Blockchains
- Bitcoin (BTC) - Native SegWit support
- Ethereum (ETH) - Full ERC-20 token support
- BNB Smart Chain - BEP-20 tokens
- Tron (TRX) - TRC-20 tokens
- Polygon (MATIC) - Layer 2 scaling
- Arbitrum - Ethereum L2
- Optimism - Ethereum L2
- Avalanche - C-Chain support
Key Features
Payment Gateway
Built a payment gateway that enables:
- Instant payment pages: Generate payment links in seconds
- Multi-currency support: Accept any supported cryptocurrency
- Automatic conversion: Convert to stablecoin or fiat
- Webhook notifications: Real-time payment confirmations
Blockchain Indexer
Developed a custom blockchain indexer for real-time data:
typescript
// Transaction processing pipeline
TransactionStream
→ Decode & Validate
→ Extract Events
→ Match Addresses
→ Trigger Webhooks
→ Update BalancesWebhook System
Real-time notifications with:
- Guaranteed delivery: Retry logic with exponential backoff
- Event filtering: Subscribe to specific events
- Payload signing: HMAC signature verification
- Delivery tracking: Full audit trail
Technical Implementation
HD Wallet Generation
Used BIP-32/39/44 standards for hierarchical deterministic wallets:
- Master seed encrypted with AES-256
- Unique derivation paths per customer
- Automatic address rotation for privacy
Transaction Processing
Built a robust transaction processing system:
- Transaction mempool monitoring
- Confirmation tracking (1-6 blocks)
- Automatic fee estimation
- Failed transaction recovery
Results
- 8 blockchains supported from single API
- < 3 seconds average transaction detection
- 99.99% webhook delivery rate
- Zero security incidents
Technologies Used
- Backend: Node.js, NestJS, TypeScript
- Database: PostgreSQL, Redis
- Blockchain: Web3.js, ethers.js, bitcoinjs-lib
- Real-time: WebSocket, Redis Pub/Sub
- Infrastructure: Docker, Kubernetes, AWS