4NK_certificator/.env.example
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

21 lines
485 B
Plaintext

# Server configuration
RUST_LOG=info
# Bitcoin RPC
BITCOIN_RPC_URL=http://localhost:8332
BITCOIN_RPC_USER=bitcoin
BITCOIN_RPC_PASSWORD=your_password_here
BITCOIN_WALLET_NAME=certificator_wallet
# Database
DATABASE_URL=postgresql://certificator:password@certificator_db/certificator_db
# Redis
REDIS_URL=redis://certificator_redis:6379
# Relay
RELAY_WEBSOCKET_URL=ws://sdk_relay:8090
# Certificator DB password for docker-compose
CERTIFICATOR_DB_PASSWORD=secure_password_change_me