Built-in Blockchain Explorer
SatSigner includes a powerful built-in blockchain explorer that works with your configured Electrum or Esplora backend. Explore blocks, visualize difficulty adjustments, and analyze Bitcoin’s blockchain without relying on third-party websites.Overview
The explorer provides:- Block Explorer: Fetch and view detailed block information
- Difficulty Visualization: Interactive spiral visualization of mining epochs
- Transaction Browser: View transactions within blocks
- Network Statistics: Real-time blockchain metrics
- Privacy-First: Uses your own node or configured backend
Block Explorer
Features
View comprehensive block data:Implementation
Location:apps/mobile/app/(authenticated)/(tabs)/(signer,explorer,converter)/explorer/block/index.tsx:1
Fetching Blocks (Esplora)
/block-height/{height}- Get block hash at height/block/{hash}- Get block details
Fetching Blocks (Electrum)
Difficulty Calculation
Convert compact bits format to difficulty:Block Navigation
Navigate between blocks:User Interface
The block explorer UI provides:- Height Input: Jump to specific block height
- Navigation Buttons: Previous/Next block
- Latest Block Button: Fetch blockchain tip
- Block Details: All block metadata displayed
- Transaction List: View transactions in block
Difficulty Adjustment Visualizer
Overview
Visualize Bitcoin’s mining difficulty over time with an interactive spiral representation of each difficulty epoch (2016 blocks). Location:apps/mobile/app/(authenticated)/(tabs)/(signer,explorer,converter)/explorer/difficulty.tsx:1
Difficulty Epochs
Fetching Epoch Data
Current Difficulty Stats
Fetch real-time difficulty adjustment data:- Average block time for current epoch
- Time remaining until next difficulty adjustment
- Current epoch number
- Epoch date range
- Block height range
Spiral Visualization
Each epoch is displayed as a spiral:- Spiral position: Block order in epoch
- Color: Block properties (time, size, etc.)
- Tap interaction: View block details
Block Details Modal
Tapping a block shows detailed information:Epoch Navigation
Navigate between difficulty adjustment periods:Transaction Explorer
Viewing Block Transactions
Location:apps/mobile/app/(authenticated)/(tabs)/(signer,explorer,converter)/explorer/block/[block]/transactions.tsx:1
List all transactions in a block:
Backend Integration
Supported Backends
The explorer works with: Esplora- REST API interface
- JSON responses
- Public instances available
- Self-hostable
- Electrum protocol
- Binary responses
- Wide server availability
- Lower bandwidth
Backend Configuration
Select backend in Settings → Network:- Backend: Esplora
- URL: Public Esplora instance or custom node
Switching Backends
The explorer automatically adapts:Privacy Considerations
Using Your Own Node
Best Practice: Connect to your own node- No data leaked to third parties
- Complete privacy for block lookups
- No rate limiting
- Enhanced security
Third-Party Backends
When using public backends:- Block lookups are visible to server
- IP address exposed
- Consider using Tor (see Privacy Tools)
- Avoid patterns that leak wallet info
Data Minimization
- Only fetch blocks you need
- Don’t explore blocks related to your transactions
- Use Tor for additional privacy
- Self-host backend when possible
Performance Optimization
Caching Strategy
Lazy Loading
- Transactions loaded on demand
- Difficulty epochs fetched as needed
- Progressive rendering for large datasets
Use Cases
Blockchain Analysis
- Study Bitcoin’s block structure
- Analyze mining patterns
- Research difficulty adjustments
- Educational exploration
Transaction Verification
- Verify transaction inclusion
- Check confirmation count
- Inspect transaction details
- Validate payment proofs
Mining Research
- Study block timing distributions
- Analyze difficulty trends
- Research orphan rates
- Monitor network hashrate
Future Enhancements
Planned features:- Mempool Explorer: View unconfirmed transactions
- Address Lookup: Search any Bitcoin address
- UTXO Analysis: Visualize UTXO set
- Fee Estimation: Historical fee rate charts
- Network Graphs: Visualize network topology
- Script Decoder: Parse and explain Bitcoin scripts
Implementation Reference
Block Explorer:apps/mobile/app/(authenticated)/(tabs)/(signer,explorer,converter)/explorer/block/index.tsx:1
Difficulty Visualizer: apps/mobile/app/(authenticated)/(tabs)/(signer,explorer,converter)/explorer/difficulty.tsx:1
Esplora API: apps/mobile/api/esplora.ts:1
Electrum Client: apps/mobile/api/electrum.ts:1
Blockchain Types: apps/mobile/types/models/Blockchain.ts:1