ncantu fe7f49b6cd Update API anchorage, services, and website skeleton
**Motivations:**
- Synchronisation des modifications sur l'API anchorage, les services et le website skeleton
- Ajout de scripts de monitoring et de diagnostic pour l'API anchorage
- Documentation des problèmes de mutex et de provisioning UTXO

**Root causes:**
- N/A (commit de synchronisation)

**Correctifs:**
- N/A (commit de synchronisation)

**Evolutions:**
- Ajout de scripts de monitoring et de diagnostic pour l'API anchorage
- Amélioration de la gestion des mutex et des UTXOs
- Mise à jour de la documentation

**Pages affectées:**
- api-anchorage/src/bitcoin-rpc.js
- api-anchorage/src/routes/anchor.js
- api-anchorage/src/routes/health.js
- api-anchorage/src/server.js
- api-anchorage/README-MONITORING.md
- api-anchorage/cleanup-stale-locks.mjs
- api-anchorage/diagnose.mjs
- api-anchorage/unlock-utxos.mjs
- service-login-verify/src/persistentNonceCache.ts
- signet-dashboard/src/server.js
- signet-dashboard/public/*
- userwallet/src/hooks/useChannel.ts
- userwallet/src/services/relayNotificationService.ts
- userwallet/src/utils/defaultContract.ts
- website-skeleton/src/*
- docs/DOMAINS_AND_PORTS.md
- docs/INTERFACES.md
- features/*
- fixKnowledge/*
2026-01-28 15:11:59 +01:00

276 lines
15 KiB
HTML

<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bitcoin Ancrage - Dashboard de Supervision</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<header>
<h1>Bitcoin Ancrage - Dashboard de Supervision</h1>
<p class="subtitle">Surveillance de la blockchain et outils de test</p>
<p class="external-links">
<a href="https://mempool.4nkweb.com/fr/" target="_blank" rel="noopener noreferrer" class="external-link">
🔗 Explorer Mempool
</a>
<a href="/hash-list" class="external-link">
📋 Liste des Hash
</a>
<a href="/utxo-list" class="external-link">
✅ Liste des UTXO
</a>
<a href="/join-signet" class="external-link">
🔗 Rejoindre le Réseau
</a>
<a href="/api-docs" class="external-link">
📚 Documentation API
</a>
<a href="/learn" class="external-link">
📖 Apprendre Bitcoin
</a>
</p>
</header>
<main>
<!-- Section Supervision -->
<section class="supervision-section">
<h2>État de la Blockchain</h2>
<div class="grid">
<div class="card">
<h3>Hauteur de Bloc</h3>
<p class="value" id="block-height">-</p>
</div>
<div class="card">
<h3>Dernier Bloc Miné</h3>
<p class="value" id="last-block-time">-</p>
</div>
<div class="card">
<h3>Transactions dans le Dernier Bloc</h3>
<p class="value" id="last-block-tx-count">-</p>
</div>
<div class="card">
<h3>Balance Mature</h3>
<p class="value" id="balance-mature">-</p>
</div>
<div class="card">
<h3>Balance Immature</h3>
<p class="value" id="balance-immature">-</p>
</div>
<div class="card">
<h3>Nombre d'Ancrages</h3>
<p class="value" id="anchor-count">
<span id="anchor-count-value">-</span>
<span id="anchor-count-spinner" class="spinner" style="display: none;"></span>
</p>
</div>
<div class="card">
<h3>Capacité d'Ancrage Restante</h3>
<p class="value" id="available-for-anchor">
<span id="available-for-anchor-value">-</span>
<span id="available-for-anchor-spinner" class="spinner" style="display: none;"></span>
</p>
</div>
<div class="card">
<h3>Nombre de Pairs</h3>
<p class="value" id="peer-count">-</p>
</div>
<div class="card">
<h3>Difficulté de Minage</h3>
<p class="value" id="mining-difficulty">-</p>
</div>
<div class="card">
<h3>Temps Moyen entre Blocs</h3>
<p class="value" id="avg-block-time">
<span id="avg-block-time-value">-</span>
<span id="avg-block-time-spinner" class="spinner" style="display: none;"></span>
</p>
</div>
<div class="card">
<h3>Frais Moyens</h3>
<p class="value" id="avg-fee">
<span id="avg-fee-value">-</span>
<span id="avg-fee-spinner" class="spinner" style="display: none;"></span>
</p>
</div>
<div class="card">
<h3>Montant Moyen des Transactions</h3>
<p class="value" id="avg-tx-amount">
<span id="avg-tx-amount-value">-</span>
<span id="avg-tx-amount-spinner" class="spinner" style="display: none;"></span>
</p>
</div>
</div>
</section>
<!-- Avertissement de sécurité -->
<section class="security-warning-section">
<div class="security-warning">
<strong>⚠️ Avertissement de sécurité</strong>
<p>
<strong>Le serveur ne stocke pas vos documents.</strong> Cependant, soyez vigilant :
HTTPS n'est pas une protection parfaite et les navigateurs sont très imparfaits.
Évitez d'envoyer des documents contenant des informations sensibles ou confidentielles.
</p>
</div>
</section>
<!-- Section Test d'Ancrage -->
<section class="anchor-section">
<h2>Test de l'API d'Ancrage</h2>
<div class="card">
<label for="anchor-api-key">Clé API :</label>
<input type="text" id="anchor-api-key" placeholder="Entrez votre clé API">
<div class="tabs">
<button class="tab-button active" onclick="switchTab('text', this)">Saisie de Texte</button>
<button class="tab-button" onclick="switchTab('file', this)">Sélection de Fichier</button>
</div>
<div id="text-tab" class="tab-content active">
<label for="anchor-text">Texte à ancrer :</label>
<textarea id="anchor-text" rows="5" placeholder="Entrez le texte à ancrer..."></textarea>
<button onclick="generateHashFromText()">Générer le Hash</button>
</div>
<div id="file-tab" class="tab-content">
<label for="anchor-file">Fichier à ancrer :</label>
<input type="file" id="anchor-file" onchange="handleFileSelect(event)">
<p class="file-limit-info" style="font-size: 0.9em; color: #999; margin-top: 5px; margin-bottom: 10px;">
<strong>Limite de taille :</strong> 100 MB maximum
</p>
<div id="file-info" class="file-info"></div>
<button onclick="generateHashFromFile()">Générer le Hash</button>
</div>
<div class="hash-section">
<label for="anchor-hash">Hash SHA256 :</label>
<input type="text" id="anchor-hash" placeholder="Le hash sera généré automatiquement...">
<div class="hash-buttons">
<button onclick="verifyHash()">Vérifier le Hash</button>
<button onclick="anchorDocument()">Ancrer le Document</button>
</div>
</div>
<div id="anchor-result" class="result"></div>
</div>
</section>
<!-- Section Faucet -->
<section class="faucet-section">
<h2>Faucet Bitcoin Ancrage</h2>
<div class="card">
<p>Recevez 50 000 ✅ (0.0005 🛡) sur votre adresse Bitcoin Ancrage</p>
<label for="faucet-api-key">Clé API :</label>
<input type="text" id="faucet-api-key" placeholder="Entrez votre clé API">
<label for="faucet-address">Adresse Bitcoin :</label>
<input type="text" id="faucet-address" placeholder="tb1q..." pattern="^(tb1|bcrt1|2|3)[a-zA-HJ-NP-Z0-9]{25,62}$">
<button onclick="requestFaucet()">Demander des ✅</button>
<div id="faucet-result" class="result"></div>
</div>
</section>
<!-- Section Test API ClamAV -->
<section class="clamav-section">
<h2>Test de l'API ClamAV</h2>
<div class="card">
<p>Scannez un fichier pour détecter les virus avec ClamAV</p>
<label for="clamav-file">Fichier à scanner :</label>
<input type="file" id="clamav-file" onchange="handleClamavFileSelect(event)">
<p class="file-limit-info" style="font-size: 0.9em; color: #999; margin-top: 5px; margin-bottom: 10px;">
<strong>Limite de taille :</strong> 100 MB maximum
</p>
<div id="clamav-file-info" class="file-info"></div>
<button onclick="scanWithClamav()">Scanner le Fichier</button>
<div id="clamav-result" class="result"></div>
</div>
</section>
<!-- Section Test API Filigrane -->
<section class="filigrane-section">
<h2>Test de l'API Filigrane</h2>
<div class="card">
<label for="filigrane-api-key">Clé API :</label>
<input type="text" id="filigrane-api-key" placeholder="Entrez votre clé API">
<div class="tabs">
<button class="tab-button active" onclick="switchTabFiligrane('text', this)">Saisie de Texte</button>
<button class="tab-button" onclick="switchTabFiligrane('file', this)">Sélection de Fichier</button>
</div>
<div id="filigrane-text-tab" class="tab-content active">
<label for="filigrane-text">Texte à convertir en PDF et filigraner :</label>
<textarea id="filigrane-text" rows="5" placeholder="Entrez le texte à convertir en PDF et filigraner..."></textarea>
</div>
<div id="filigrane-file-tab" class="tab-content">
<label for="filigrane-file">Fichier à filigraner :</label>
<input type="file" id="filigrane-file" onchange="handleFiligraneFileSelect(event)">
<p class="file-limit-info" style="font-size: 0.9em; color: #999; margin-top: 5px; margin-bottom: 10px;">
<strong>Limite de taille :</strong> 100 MB maximum
</p>
<div id="filigrane-file-info" class="file-info"></div>
</div>
<div class="watermark-section" style="margin-top: 20px; padding-top: 20px; border-top: 2px solid var(--border-color);">
<label for="filigrane-watermark-text">Texte libre du filigrane (optionnel) :</label>
<input type="text" id="filigrane-watermark-text" placeholder="Texte à afficher dans le filigrane">
<label for="filigrane-watermark-signature">Signature cryptographique (optionnel) :</label>
<input type="text" id="filigrane-watermark-signature" placeholder="Signature à afficher dans le filigrane">
<label for="filigrane-watermark-depositor">Nom du dépositaire (optionnel) :</label>
<input type="text" id="filigrane-watermark-depositor" placeholder="Nom du dépositaire">
<label for="filigrane-watermarked-filename">Nom de fichier du PDF filigrané (optionnel) :</label>
<input type="text" id="filigrane-watermarked-filename" placeholder="Si vide, utilise le nom d'origine avec extension .pdf">
<label for="filigrane-original-filename">Nom de fichier du document d'origine (optionnel) :</label>
<input type="text" id="filigrane-original-filename" placeholder="Si vide et texte saisi, utilise 'origin.md'">
<div class="watermark-checkboxes" style="margin-top: 15px;">
<div class="watermark-checkbox">
<input type="checkbox" id="filigrane-watermark-date-utc">
<label for="filigrane-watermark-date-utc">Ajouter la date UTC</label>
</div>
<div class="watermark-checkbox">
<input type="checkbox" id="filigrane-watermark-date-local">
<label for="filigrane-watermark-date-local">Ajouter la date locale</label>
</div>
<div class="watermark-checkbox">
<input type="checkbox" id="filigrane-watermark-block-number">
<label for="filigrane-watermark-block-number">Ajouter le numéro de bloc</label>
</div>
<div class="watermark-checkbox">
<input type="checkbox" id="filigrane-watermark-block-hash">
<label for="filigrane-watermark-block-hash">Ajouter le hash du bloc</label>
</div>
<div class="watermark-checkbox">
<input type="checkbox" id="filigrane-watermark-document-hash">
<label for="filigrane-watermark-document-hash">Ajouter le hash du document d'origine</label>
</div>
</div>
</div>
<button onclick="testFiligrane()" style="margin-top: 20px;">Tester l'API Filigrane</button>
<div id="filigrane-result" class="result"></div>
</div>
</section>
</main>
<footer>
<p>Bitcoin Ancrage Dashboard - Équipe 4NK</p>
<p>Dernière mise à jour : <span id="last-update">-</span></p>
<a href="https://git.4nkweb.com/4nk/anchorage_layer_simple.git" target="_blank" rel="noopener noreferrer" class="git-link" title="Voir le code source sur Git">
<svg class="git-icon" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<path d="M23.546 10.93L13.067.452c-.604-.603-1.582-.603-2.188 0L8.708 2.627l2.76 2.76c.645-.215 1.379-.07 1.889.441.516.515.658 1.258.438 1.9l2.658 2.66c.645-.223 1.387-.083 1.9.435.721.72.721 1.884 0 2.604-.719.719-1.881.719-2.6 0-.539-.541-.674-1.337-.404-1.996L12.86 8.955v6.525c.176.086.342.203.488.348.713.721.713 1.883 0 2.6-.719.721-1.884.721-2.599 0-.72-.719-.72-1.879 0-2.598.182-.18.387-.316.605-.406V8.835c-.217-.091-.424-.222-.6-.401-.545-.545-.676-1.342-.396-2.011L7.636 3.7.45 10.881c-.6.605-.6 1.584 0 2.189l10.48 10.477c.604.604 1.582.604 2.186 0l10.43-10.43c.605-.603.605-1.582 0-2.187"/>
</svg>
</a>
</footer>
</div>
<script src="app.js?v=20260124"></script>
</body>
</html>