7 Commits

Author SHA1 Message Date
4NK Dev
db0e11ce48 chore: sync from 4NK_env superproject 2025-10-01T16:23:07Z 2025-10-01 16:23:07 +00:00
4NK Dev
8006ba9986 feat: WS endpoint + DB extensions + metrics wiring + payments API
- /ws endpoint and session registry
- DB: update_anchor_tx, get_payments_for_address, counters helpers
- Metrics: increment anchors, data volume
- Monitor: add volume counter and block height via RPC
- Payments API: return real payments
- CI: add fmt/clippy/tests steps
2025-10-01 10:04:17 +00:00
4NK Dev
6154fa25a3 ci: docker_tag=ext - add Gitea Actions workflow to build/push 4nk_certificator:ext 2025-10-01 09:57:17 +00:00
4NK Dev
cabc273cb2 style: format code (whitespace cleanup) 2025-10-01 09:45:33 +00:00
4NK Dev
3b3650d7de docs: add complete implementation documentation
📚 Documentation complète de l'implémentation:
- Vue d'ensemble des 1682 lignes de code
- Détails de chaque module (Monitor, PaymentWatcher, AnchorEngine)
- Architecture technique complète
- Workflow de bout en bout
- Guide de déploiement
- Tests manuels et automatisés à faire
- Roadmap v0.2.0 et v0.3.0

Status: MVP 100% fonctionnel 
2025-10-01 09:44:52 +00:00
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