2 Commits

Author SHA1 Message Date
4NK Dev
0fbd4333ed feat: complete implementation of 4NK Certificator
 New features:
- RelayMonitor: WebSocket connection to sdk_relay with message handling
- PaymentWatcher: Bitcoin RPC monitoring for payments on watched addresses
- AnchorEngine: Complete anchoring logic with Bitcoin tx creation/broadcast
- Prometheus metrics: /metrics endpoint with gauges and counters
- Verification API: POST /api/v1/anchors/verify to verify on-chain anchors
- Payments API: GET /api/v1/payments/{address} for payment history

🔧 Implementation details:
- Real-time message monitoring from relay (Handshake, Commit, NewTx, Cipher)
- Block scanning for payments to watched addresses
- Mempool monitoring for pending payments
- Automatic anchor creation based on block intervals
- Payment condition verification (priceMoSats * MB >= total_paid)
- OP_RETURN transaction creation with 'NKA1' protocol identifier
- Complete database operations for processes, metrics, anchors, payments

📊 Monitoring:
- 4nk_certificator_processes_total
- 4nk_certificator_anchors_created_total
- 4nk_certificator_anchors_confirmed_total
- 4nk_certificator_data_volume_bytes

Version: 0.1.0 - Full MVP
2025-10-01 09:39:22 +00:00
4NK Dev
4acfa96a5c feat: initial commit - 4NK Certificator service
- Bitcoin mainnet anchoring service for 4NK relay data volumes
- REST API for processes, metrics, and anchors
- PostgreSQL database with SQLx
- Docker support with compose file
- Configuration via TOML
- Periodic anchoring based on block intervals
- Conditional payment system (priceMoSats, btcAddress)
- Process state snapshot with cryptographic hash
- Health check endpoint

Version: 0.1.0 (MVP)
2025-10-01 09:35:33 +00:00