yakmesh 1.5.1 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +120 -0
- package/announcements/discord-v1.5.0.md +7 -23
- package/announcements/discord-v1.6.0.md +49 -0
- package/announcements/telegram-v1.5.0.md +5 -9
- package/announcements/telegram-v1.6.0.md +15 -0
- package/announcements/x-v1.5.0.md +6 -12
- package/announcements/x-v1.6.0.md +13 -0
- package/dashboard/index.html +115 -41
- package/gossip/protocol.js +3 -3
- package/mesh/annex.js +1 -1
- package/mesh/echo-ranging.js +1 -1
- package/mesh/phantom-routing.js +1 -1
- package/mesh/temporal-encoder.js +1 -1
- package/oracle/network-identity.js +5 -5
- package/oracle/phase-epoch.js +6 -6
- package/package.json +3 -1
- package/server/index.js +91 -0
- package/yakbot/index.js +45 -1
- package/yakbot/register-commands.js +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,126 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to YAKMESH will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.7.0] - 2026-01-18
|
|
6
|
+
|
|
7
|
+
### 🛡️ SLH-DSA Backup Signatures & Monitoring Dashboard
|
|
8
|
+
|
|
9
|
+
This release adds defense-in-depth with FIPS 205 hash-based backup signatures and a comprehensive monitoring dashboard.
|
|
10
|
+
|
|
11
|
+
#### New Features
|
|
12
|
+
|
|
13
|
+
##### SLH-DSA Backup Signatures (FIPS 205)
|
|
14
|
+
- **Dual Algorithm Support:** ML-DSA (lattice-based) + SLH-DSA (hash-based)
|
|
15
|
+
- **Level 3:** SLH-DSA-SHA2-192f (hash-based, different cryptographic assumptions)
|
|
16
|
+
- **Level 5:** SLH-DSA-SHA2-256f (hash-based, paranoid mode)
|
|
17
|
+
- New functions: `signBackup()`, `verifyBackup()`, `signDual()`, `verifyDual()`
|
|
18
|
+
- Generate dual keypairs with `generateDualSignatureKeyPairs()`
|
|
19
|
+
- Defense-in-depth: if lattice assumptions break, hash-based signatures still hold
|
|
20
|
+
|
|
21
|
+
##### Monitoring Dashboard
|
|
22
|
+
- Updated `/dashboard` with YAKMESH branding
|
|
23
|
+
- New `/metrics` endpoint aggregates all node status
|
|
24
|
+
- **Oracle Status:** Health, network identity, verified peers
|
|
25
|
+
- **Crypto Info:** Active algorithms, security level, NIST standards
|
|
26
|
+
- **Time Source:** Trust level, stratum, precision indicators
|
|
27
|
+
- **Uptime Tracking:** Human-readable uptime display
|
|
28
|
+
|
|
29
|
+
##### Dev.to Automation
|
|
30
|
+
- GitHub Actions now posts to Dev.to on major releases
|
|
31
|
+
- Automated article creation with version info
|
|
32
|
+
- Add `DEVTO_API_KEY` to GitHub secrets to enable
|
|
33
|
+
|
|
34
|
+
#### Technical Details
|
|
35
|
+
|
|
36
|
+
##### SLH-DSA Key/Signature Sizes
|
|
37
|
+
| Level | Public Key | Secret Key | Signature |
|
|
38
|
+
|-------|------------|------------|-----------|
|
|
39
|
+
| 3 (192f) | 48 bytes | 96 bytes | ~35 KB |
|
|
40
|
+
| 5 (256f) | 64 bytes | 128 bytes | ~50 KB |
|
|
41
|
+
|
|
42
|
+
##### Performance (SLH-DSA is slower than ML-DSA)
|
|
43
|
+
- Sign: ~100-160ms (vs 3ms for ML-DSA)
|
|
44
|
+
- Verify: ~5-9ms (vs 1ms for ML-DSA)
|
|
45
|
+
- Use dual signatures only for high-value operations
|
|
46
|
+
|
|
47
|
+
#### Added
|
|
48
|
+
- `signBackup()`, `verifyBackup()` - SLH-DSA standalone operations
|
|
49
|
+
- `signDual()`, `verifyDual()` - Dual signature operations
|
|
50
|
+
- `generateDualSignatureKeyPairs()` - Generate both ML-DSA and SLH-DSA keypairs
|
|
51
|
+
- `getBackupSignatureAlgorithm()`, `getBackupSignatureName()` - Config accessors
|
|
52
|
+
- `/metrics` endpoint for comprehensive node status
|
|
53
|
+
- Dashboard cards for Oracle, Crypto, Time Source
|
|
54
|
+
- Uptime tracking with human-readable formatting
|
|
55
|
+
|
|
56
|
+
#### Changed
|
|
57
|
+
- `getCryptoSummary()` now includes `backupSignatureAlgorithm` and FIPS 205 in standards
|
|
58
|
+
- Dashboard rebranded from "Lantern Mesh" to "YAKMESH"
|
|
59
|
+
- `discord-release.yml` now includes Dev.to posting job
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## [1.6.0] - 2026-01-17
|
|
64
|
+
|
|
65
|
+
### 🔐 NIST Level 5 (Paranoid Mode) & Cryptographic Unification
|
|
66
|
+
|
|
67
|
+
This release adds support for NIST Level 5 security and unifies all hash operations to SHA3-256.
|
|
68
|
+
|
|
69
|
+
#### New Features
|
|
70
|
+
|
|
71
|
+
##### NIST Level 5 Support
|
|
72
|
+
- Configurable security levels: Level 3 (default) or Level 5 (paranoid)
|
|
73
|
+
- **Level 5 Algorithms:**
|
|
74
|
+
- ML-DSA-87 (Dilithium5) for signatures - 256-bit classical security
|
|
75
|
+
- ML-KEM-1024 (Kyber1024) for key encapsulation - 256-bit classical security
|
|
76
|
+
- New `security/crypto-config.js` module for centralized crypto configuration
|
|
77
|
+
- Runtime switchable via `setSecurityLevel(SecurityLevel.LEVEL_5)`
|
|
78
|
+
|
|
79
|
+
##### Crypto Agility Documentation
|
|
80
|
+
- New `docs/CRYPTO-AGILITY.md` formalizes algorithm upgrade procedures
|
|
81
|
+
- Version negotiation protocol for future algorithm transitions
|
|
82
|
+
- Monitoring list for future algorithm candidates (X-Wing, SLH-DSA, etc.)
|
|
83
|
+
|
|
84
|
+
##### Post-Quantum Test Suite
|
|
85
|
+
- Comprehensive cryptographic tests in `oracle/tests/crypto.test.js`
|
|
86
|
+
- Tests for ML-DSA-65/87, ML-KEM-768/1024
|
|
87
|
+
- Performance benchmarks for Level 3 vs Level 5 overhead
|
|
88
|
+
- Run with `npm run test:crypto`
|
|
89
|
+
|
|
90
|
+
#### Changed
|
|
91
|
+
|
|
92
|
+
##### Unified SHA3-256 Hashing
|
|
93
|
+
All hash operations now use SHA3-256 for post-quantum consistency:
|
|
94
|
+
- `oracle/network-identity.js` - HKDF now uses SHA3-256
|
|
95
|
+
- `oracle/phase-epoch.js` - Phase derivation uses SHA3-256
|
|
96
|
+
- `gossip/protocol.js` - Bloom filters and message IDs use SHA3-256
|
|
97
|
+
- `mesh/temporal-encoder.js` - Temporal hashes use SHA3-256
|
|
98
|
+
- `mesh/phantom-routing.js` - Key derivation uses SHA3-256
|
|
99
|
+
- `mesh/annex.js` - Session key derivation uses SHA3-256
|
|
100
|
+
- `mesh/echo-ranging.js` - Probe key derivation uses SHA3-256
|
|
101
|
+
|
|
102
|
+
### Added
|
|
103
|
+
- `security/crypto-config.js` - Centralized crypto configuration module
|
|
104
|
+
- `docs/CRYPTO-AGILITY.md` - Algorithm upgrade path documentation
|
|
105
|
+
- `oracle/tests/crypto.test.js` - PQ cryptography test suite
|
|
106
|
+
- `npm run test:crypto` script for running crypto tests
|
|
107
|
+
|
|
108
|
+
### Technical Details
|
|
109
|
+
- SHA3-256 provides 128-bit post-quantum security (Grover resistance)
|
|
110
|
+
- All symmetric keys derived from PQ-safe shared secrets
|
|
111
|
+
- No vulnerable classical asymmetric crypto in codebase
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## [1.5.1] - 2026-01-17
|
|
116
|
+
|
|
117
|
+
### 🔧 Maintenance Release
|
|
118
|
+
- Port fallback system for WebSocket and HTTP servers
|
|
119
|
+
- Process management script (`scripts/start.sh`)
|
|
120
|
+
- Discord webhook integration for releases
|
|
121
|
+
- Minor documentation updates
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
5
125
|
## [1.5.0] - 2026-01-17
|
|
6
126
|
|
|
7
127
|
### 🔧 Critical Fix: Network Identity Unification
|
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
# Yakmesh v1.5.
|
|
1
|
+
# Yakmesh v1.5.1
|
|
2
2
|
|
|
3
|
-
**🦬 Yakmesh v1.5.
|
|
3
|
+
**🦬 Yakmesh v1.5.1 Released**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## 🔧 Fixes & Improvements
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### Network Identity Unification
|
|
10
|
-
Node IDs now contain TWO components:
|
|
11
|
-
- **Network Name** - Derived from codebase hash (SAME for all nodes on network)
|
|
12
|
-
- **Instance ID** - Derived from public key (UNIQUE per node)
|
|
13
|
-
|
|
14
|
-
Format: `node-[network-name]-[instance-id]`
|
|
15
|
-
Example: `node-grid-carbide-reveal-pq-QHZx`
|
|
16
|
-
|
|
17
|
-
**Why this matters:**
|
|
18
|
-
✅ Nodes running identical code share the same network name
|
|
19
|
-
✅ Visual verification: same network name = same code = can trust peer
|
|
20
|
-
✅ Each node still has a unique instance identifier
|
|
21
|
-
✅ Human-readable verification phrases for extra confirmation
|
|
7
|
+
### Identity Initialization Fix
|
|
8
|
+
Fixed oracle initialization order so node identity correctly derives from codebase hash as originally designed.
|
|
22
9
|
|
|
23
10
|
### Automatic Port Fallback
|
|
24
|
-
|
|
11
|
+
Nodes now automatically find the next available port if default ports (3000, 9001) are occupied - no more crashes on busy systems.
|
|
25
12
|
|
|
26
13
|
### Process Management Script
|
|
27
14
|
New `scripts/start.sh` for proper background process management:
|
|
@@ -33,12 +20,9 @@ New `scripts/start.sh` for proper background process management:
|
|
|
33
20
|
./scripts/start.sh logs # View logs
|
|
34
21
|
```
|
|
35
22
|
|
|
36
|
-
## ⚠️ Breaking Change
|
|
37
|
-
Existing `node-key.json` files will trigger identity regeneration on first v1.5.0 startup. This is expected - the new format ensures network name derivation from codebase hash.
|
|
38
|
-
|
|
39
23
|
## 📦 Install/Upgrade
|
|
40
24
|
```bash
|
|
41
|
-
npm install yakmesh@1.5.
|
|
25
|
+
npm install yakmesh@1.5.1
|
|
42
26
|
```
|
|
43
27
|
|
|
44
28
|
---
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# 🔐 YAKMESH v1.6.0 - NIST Level 5 & Cryptographic Unification
|
|
2
|
+
|
|
3
|
+
**The paranoid mode has arrived.**
|
|
4
|
+
|
|
5
|
+
## What's New
|
|
6
|
+
|
|
7
|
+
### 🛡️ NIST Level 5 Support (Paranoid Mode)
|
|
8
|
+
Choose your security level:
|
|
9
|
+
- **Level 3** (default): ML-DSA-65/ML-KEM-768 - ~192-bit classical security
|
|
10
|
+
- **Level 5** (paranoid): ML-DSA-87/ML-KEM-1024 - ~256-bit classical security
|
|
11
|
+
|
|
12
|
+
```javascript
|
|
13
|
+
import { setSecurityLevel, SecurityLevel } from 'yakmesh/security/crypto-config';
|
|
14
|
+
setSecurityLevel(SecurityLevel.LEVEL_5); // Maximum security
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### 🔄 SHA3-256 Everywhere
|
|
18
|
+
All hash operations now use SHA3-256 for post-quantum consistency:
|
|
19
|
+
- Bloom filter hashing in gossip protocol
|
|
20
|
+
- Temporal mesh encoding
|
|
21
|
+
- Phantom routing key derivation
|
|
22
|
+
- Annex session keys
|
|
23
|
+
- Echo ranging probes
|
|
24
|
+
|
|
25
|
+
**Why?** SHA3-256 provides 128-bit quantum security (Grover resistance) with its sponge construction.
|
|
26
|
+
|
|
27
|
+
### 📋 Crypto Agility Documentation
|
|
28
|
+
New `docs/CRYPTO-AGILITY.md` formalizes our algorithm upgrade path:
|
|
29
|
+
- When to upgrade (NIST recommendations, new attacks, standards updates)
|
|
30
|
+
- 90-day dual-algorithm transition periods
|
|
31
|
+
- Version negotiation between nodes
|
|
32
|
+
|
|
33
|
+
### ✅ 36-Test PQ Crypto Suite
|
|
34
|
+
Comprehensive validation of all cryptographic operations:
|
|
35
|
+
```bash
|
|
36
|
+
npm run test:crypto
|
|
37
|
+
```
|
|
38
|
+
Tests ML-DSA-65/87, ML-KEM-768/1024, SHA3-256, and full handshake simulations.
|
|
39
|
+
|
|
40
|
+
## Upgrade
|
|
41
|
+
```bash
|
|
42
|
+
npm install yakmesh@1.6.0
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
**No classical asymmetric crypto. Only post-quantum. Only math.**
|
|
48
|
+
|
|
49
|
+
🦬 https://yakmesh.dev | 📦 npm: yakmesh
|
|
@@ -1,13 +1,9 @@
|
|
|
1
|
-
🦬 Yakmesh v1.5.
|
|
1
|
+
🦬 Yakmesh v1.5.1
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
• Fixed identity initialization order
|
|
4
|
+
• Auto port fallback when ports busy
|
|
5
|
+
• Process management script for deployments
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
• Same network name = same codebase = can peer
|
|
8
|
-
• Automatic port fallback
|
|
9
|
-
• Process management script
|
|
10
|
-
|
|
11
|
-
npm install yakmesh@1.5.0
|
|
7
|
+
npm install yakmesh@1.5.1
|
|
12
8
|
|
|
13
9
|
https://yakmesh.dev
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
🔐 YAKMESH v1.6.0 - Paranoid Mode
|
|
2
|
+
|
|
3
|
+
New:
|
|
4
|
+
• NIST Level 5 support (ML-DSA-87/ML-KEM-1024)
|
|
5
|
+
• SHA3-256 unified across all modules
|
|
6
|
+
• Crypto agility documentation
|
|
7
|
+
• 36-test PQ crypto suite
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
setSecurityLevel(SecurityLevel.LEVEL_5); // Maximum security
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
npm install yakmesh@1.6.0
|
|
14
|
+
|
|
15
|
+
🦬 https://yakmesh.dev
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
🦬 Yakmesh v1.5.
|
|
1
|
+
🦬 Yakmesh v1.5.1
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
• Fixed identity initialization order
|
|
4
|
+
• Auto port fallback when ports busy
|
|
5
|
+
• Process management script for deployments
|
|
4
6
|
|
|
5
|
-
|
|
6
|
-
^^^^^^^^^^^^^^^^^ unique
|
|
7
|
-
network name instance
|
|
7
|
+
npm install yakmesh@1.5.1
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
✅ Auto port fallback when ports busy
|
|
11
|
-
✅ Process management script included
|
|
12
|
-
|
|
13
|
-
Breaking: Nodes regenerate identity on first run (expected)
|
|
14
|
-
|
|
15
|
-
npm install yakmesh@1.5.0
|
|
9
|
+
https://yakmesh.dev
|
|
16
10
|
|
|
17
11
|
#PostQuantum #P2P #DecentralizedWeb #OpenSource
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
🔐 YAKMESH v1.6.0 - Paranoid Mode
|
|
2
|
+
|
|
3
|
+
NIST Level 5 support is here:
|
|
4
|
+
• ML-DSA-87 (Dilithium5) - 256-bit classical
|
|
5
|
+
• ML-KEM-1024 (Kyber1024) - 256-bit classical
|
|
6
|
+
|
|
7
|
+
Plus: SHA3-256 unified across all hashing operations.
|
|
8
|
+
|
|
9
|
+
No classical asymmetric crypto. Only post-quantum. Only math.
|
|
10
|
+
|
|
11
|
+
npm i yakmesh@1.6.0
|
|
12
|
+
|
|
13
|
+
🦬 yakmesh.dev
|
package/dashboard/index.html
CHANGED
|
@@ -3,20 +3,22 @@
|
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>
|
|
6
|
+
<title>YAKMESH Dashboard</title>
|
|
7
7
|
<style>
|
|
8
8
|
:root {
|
|
9
|
-
--bg-dark: #
|
|
10
|
-
--bg-card: #
|
|
11
|
-
--bg-hover: #
|
|
12
|
-
--border: #
|
|
13
|
-
--text: #
|
|
14
|
-
--text-dim: #
|
|
15
|
-
--accent: #
|
|
16
|
-
--accent-glow: rgba(
|
|
17
|
-
--
|
|
18
|
-
--
|
|
19
|
-
--
|
|
9
|
+
--bg-dark: #0f1419;
|
|
10
|
+
--bg-card: #1a2027;
|
|
11
|
+
--bg-hover: #242d38;
|
|
12
|
+
--border: #2d3a47;
|
|
13
|
+
--text: #e6edf3;
|
|
14
|
+
--text-dim: #8b949e;
|
|
15
|
+
--accent: #4ade80;
|
|
16
|
+
--accent-glow: rgba(74, 222, 128, 0.2);
|
|
17
|
+
--mountain: #4ade80;
|
|
18
|
+
--frost: #38bdf8;
|
|
19
|
+
--success: #4ade80;
|
|
20
|
+
--warning: #fbbf24;
|
|
21
|
+
--error: #f87171;
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
* {
|
|
@@ -27,7 +29,7 @@
|
|
|
27
29
|
|
|
28
30
|
body {
|
|
29
31
|
font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
|
|
30
|
-
background: var(--bg-dark);
|
|
32
|
+
background: linear-gradient(135deg, var(--bg-dark) 0%, #0a1520 100%);
|
|
31
33
|
color: var(--text);
|
|
32
34
|
min-height: 100vh;
|
|
33
35
|
padding: 2rem;
|
|
@@ -46,8 +48,9 @@
|
|
|
46
48
|
|
|
47
49
|
h1 {
|
|
48
50
|
font-size: 1.5rem;
|
|
49
|
-
font-weight:
|
|
50
|
-
color: var(--
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
color: var(--mountain);
|
|
53
|
+
letter-spacing: 0.05em;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
56
|
.subtitle {
|
|
@@ -306,10 +309,10 @@
|
|
|
306
309
|
</head>
|
|
307
310
|
<body>
|
|
308
311
|
<div class="header">
|
|
309
|
-
<span class="logo"
|
|
312
|
+
<span class="logo">🦬</span>
|
|
310
313
|
<div>
|
|
311
|
-
<h1>
|
|
312
|
-
<div class="subtitle">Post-Quantum Secure •
|
|
314
|
+
<h1>YAKMESH™ Dashboard</h1>
|
|
315
|
+
<div class="subtitle">Post-Quantum Secure • Sturdy & Secure • v1.7.0</div>
|
|
313
316
|
</div>
|
|
314
317
|
</div>
|
|
315
318
|
|
|
@@ -329,7 +332,7 @@
|
|
|
329
332
|
<div class="grid">
|
|
330
333
|
<!-- Node Identity -->
|
|
331
334
|
<div class="card">
|
|
332
|
-
<div class="card-title"
|
|
335
|
+
<div class="card-title">🦬 Node Identity</div>
|
|
333
336
|
<div id="node-identity">
|
|
334
337
|
<div class="empty-state">Connect to a node to view identity</div>
|
|
335
338
|
</div>
|
|
@@ -348,8 +351,8 @@
|
|
|
348
351
|
<div class="stat-label">Discovered Nodes</div>
|
|
349
352
|
</div>
|
|
350
353
|
<div class="stat">
|
|
351
|
-
<div class="stat-value" id="
|
|
352
|
-
<div class="stat-label">
|
|
354
|
+
<div class="stat-value" id="uptime">-</div>
|
|
355
|
+
<div class="stat-label">Uptime</div>
|
|
353
356
|
</div>
|
|
354
357
|
<div class="stat">
|
|
355
358
|
<div class="stat-value" id="gossip-messages">-</div>
|
|
@@ -358,6 +361,30 @@
|
|
|
358
361
|
</div>
|
|
359
362
|
</div>
|
|
360
363
|
|
|
364
|
+
<!-- Oracle Status -->
|
|
365
|
+
<div class="card">
|
|
366
|
+
<div class="card-title">🔮 Oracle Status</div>
|
|
367
|
+
<div id="oracle-status">
|
|
368
|
+
<div class="empty-state">Connect to view oracle status</div>
|
|
369
|
+
</div>
|
|
370
|
+
</div>
|
|
371
|
+
|
|
372
|
+
<!-- Crypto Configuration -->
|
|
373
|
+
<div class="card">
|
|
374
|
+
<div class="card-title">🔐 Post-Quantum Cryptography</div>
|
|
375
|
+
<div id="crypto-info">
|
|
376
|
+
<div class="empty-state">Connect to view crypto configuration</div>
|
|
377
|
+
</div>
|
|
378
|
+
</div>
|
|
379
|
+
|
|
380
|
+
<!-- Time Source -->
|
|
381
|
+
<div class="card">
|
|
382
|
+
<div class="card-title">⏱️ Time Source</div>
|
|
383
|
+
<div id="time-info">
|
|
384
|
+
<div class="empty-state">Connect to view time source</div>
|
|
385
|
+
</div>
|
|
386
|
+
</div>
|
|
387
|
+
|
|
361
388
|
<!-- Connected Peers -->
|
|
362
389
|
<div class="card">
|
|
363
390
|
<div class="card-title">
|
|
@@ -399,14 +426,6 @@
|
|
|
399
426
|
<li class="empty-state">No nodes discovered</li>
|
|
400
427
|
</ul>
|
|
401
428
|
</div>
|
|
402
|
-
|
|
403
|
-
<!-- Replication -->
|
|
404
|
-
<div class="card">
|
|
405
|
-
<div class="card-title">🔄 Replication Engine</div>
|
|
406
|
-
<div class="replication-log" id="replication-info">
|
|
407
|
-
<div class="empty-state">Connect to view replication info</div>
|
|
408
|
-
</div>
|
|
409
|
-
</div>
|
|
410
429
|
</div>
|
|
411
430
|
|
|
412
431
|
<script>
|
|
@@ -439,10 +458,10 @@
|
|
|
439
458
|
|
|
440
459
|
try {
|
|
441
460
|
// Fetch all data in parallel
|
|
442
|
-
const [node, peers,
|
|
461
|
+
const [node, peers, metrics, gossip, discovered] = await Promise.all([
|
|
443
462
|
fetch(`${nodeUrl}/node`).then(r => r.json()).catch(() => null),
|
|
444
463
|
fetch(`${nodeUrl}/peers`).then(r => r.json()).catch(() => []),
|
|
445
|
-
fetch(`${nodeUrl}/
|
|
464
|
+
fetch(`${nodeUrl}/metrics`).then(r => r.json()).catch(() => null),
|
|
446
465
|
fetch(`${nodeUrl}/gossip`).then(r => r.json()).catch(() => null),
|
|
447
466
|
fetch(`${nodeUrl}/discovered`).then(r => r.json()).catch(() => []),
|
|
448
467
|
]);
|
|
@@ -464,9 +483,73 @@
|
|
|
464
483
|
// Update stats
|
|
465
484
|
document.getElementById('peer-count').textContent = peers.length;
|
|
466
485
|
document.getElementById('discovered-count').textContent = discovered.length;
|
|
467
|
-
document.getElementById('
|
|
486
|
+
document.getElementById('uptime').textContent = metrics?.node?.uptimeFormatted || '-';
|
|
468
487
|
document.getElementById('gossip-messages').textContent = gossip?.seenMessages ?? '-';
|
|
469
488
|
|
|
489
|
+
// Update Oracle status
|
|
490
|
+
if (metrics?.oracle) {
|
|
491
|
+
const oracle = metrics.oracle;
|
|
492
|
+
const statusColor = oracle.status === 'healthy' ? 'var(--success)' : 'var(--error)';
|
|
493
|
+
document.getElementById('oracle-status').innerHTML = `
|
|
494
|
+
<div style="display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;">
|
|
495
|
+
<div style="width: 12px; height: 12px; border-radius: 50%; background: ${statusColor}; box-shadow: 0 0 8px ${statusColor};"></div>
|
|
496
|
+
<span style="font-weight: 600; color: ${statusColor}">${oracle.status.toUpperCase()}</span>
|
|
497
|
+
</div>
|
|
498
|
+
<div style="color: var(--text-dim); font-size: 0.85rem;">
|
|
499
|
+
<div>Network: ${oracle.networkName || 'N/A'}</div>
|
|
500
|
+
<div>ID: ${oracle.networkId || 'N/A'}</div>
|
|
501
|
+
<div style="word-break: break-all;">Fingerprint: ${oracle.fingerprint?.slice(0, 24) || 'N/A'}...</div>
|
|
502
|
+
<div>Verified Peers: ${oracle.verifiedPeers}</div>
|
|
503
|
+
</div>
|
|
504
|
+
`;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
// Update Crypto info
|
|
508
|
+
if (metrics?.crypto) {
|
|
509
|
+
const crypto = metrics.crypto;
|
|
510
|
+
document.getElementById('crypto-info').innerHTML = `
|
|
511
|
+
<div style="color: var(--text-dim); font-size: 0.85rem;">
|
|
512
|
+
<div style="margin-bottom: 0.75rem;">
|
|
513
|
+
<span style="color: var(--frost)">Security Level:</span>
|
|
514
|
+
<span style="color: var(--mountain); font-weight: 600;">${crypto.levelName}</span>
|
|
515
|
+
</div>
|
|
516
|
+
<div>Signature: <span style="color: var(--text)">${crypto.signatureAlgorithm}</span></div>
|
|
517
|
+
<div>Backup Sig: <span style="color: var(--text)">${crypto.backupSignatureAlgorithm || 'N/A'}</span></div>
|
|
518
|
+
<div>KEM: <span style="color: var(--text)">${crypto.kemAlgorithm}</span></div>
|
|
519
|
+
<div style="margin-top: 0.5rem;">
|
|
520
|
+
Classical: ${crypto.classicalSecurity} | Quantum: ${crypto.quantumSecurity}
|
|
521
|
+
</div>
|
|
522
|
+
<div style="margin-top: 0.5rem; font-size: 0.75rem;">
|
|
523
|
+
${crypto.nistStandards?.join(' • ') || ''}
|
|
524
|
+
</div>
|
|
525
|
+
</div>
|
|
526
|
+
`;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
// Update Time info
|
|
530
|
+
if (metrics?.time) {
|
|
531
|
+
const time = metrics.time;
|
|
532
|
+
const trustColors = {
|
|
533
|
+
ATOMIC: 'var(--success)',
|
|
534
|
+
GPS: 'var(--success)',
|
|
535
|
+
PTP: 'var(--warning)',
|
|
536
|
+
NTP: 'var(--text-dim)',
|
|
537
|
+
};
|
|
538
|
+
const trustColor = trustColors[time.trustLevel] || 'var(--text-dim)';
|
|
539
|
+
document.getElementById('time-info').innerHTML = `
|
|
540
|
+
<div style="display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem;">
|
|
541
|
+
<div style="width: 12px; height: 12px; border-radius: 50%; background: ${trustColor}; box-shadow: 0 0 8px ${trustColor};"></div>
|
|
542
|
+
<span style="font-weight: 600; color: ${trustColor}">${time.trustLevel}</span>
|
|
543
|
+
</div>
|
|
544
|
+
<div style="color: var(--text-dim); font-size: 0.85rem;">
|
|
545
|
+
<div>Stratum: ${time.stratum ?? 'N/A'}</div>
|
|
546
|
+
<div>Phase Tolerance: ${time.phaseTolerance ? time.phaseTolerance + 'ms' : 'N/A'}</div>
|
|
547
|
+
<div>Atomic Time: ${time.hasAtomicTime ? '✅ Yes' : '❌ No'}</div>
|
|
548
|
+
<div>High Precision: ${time.hasHighPrecisionTime ? '✅ Yes' : '❌ No'}</div>
|
|
549
|
+
</div>
|
|
550
|
+
`;
|
|
551
|
+
}
|
|
552
|
+
|
|
470
553
|
// Update peer list
|
|
471
554
|
const peerList = document.getElementById('peer-list');
|
|
472
555
|
if (peers.length === 0) {
|
|
@@ -508,15 +591,6 @@
|
|
|
508
591
|
`).join('');
|
|
509
592
|
}
|
|
510
593
|
|
|
511
|
-
// Update replication info
|
|
512
|
-
if (replication) {
|
|
513
|
-
document.getElementById('replication-info').innerHTML = `
|
|
514
|
-
<div>Log Entries: ${replication.replicationLogSize}</div>
|
|
515
|
-
<div>Peer States: ${replication.peerStates}</div>
|
|
516
|
-
<div>Tables: ${replication.tables?.join(', ') || 'N/A'}</div>
|
|
517
|
-
`;
|
|
518
|
-
}
|
|
519
|
-
|
|
520
594
|
} catch (e) {
|
|
521
595
|
console.error('Refresh failed:', e);
|
|
522
596
|
}
|
package/gossip/protocol.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* - Bloom filters for efficient seen-message tracking
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import {
|
|
11
|
+
import { sha3_256 } from '@noble/hashes/sha3.js';
|
|
12
12
|
import { bytesToHex } from '@noble/hashes/utils.js';
|
|
13
13
|
|
|
14
14
|
// Message types for gossip protocol
|
|
@@ -40,7 +40,7 @@ class BloomFilter {
|
|
|
40
40
|
|
|
41
41
|
_hash(value, seed) {
|
|
42
42
|
const data = `${seed}:${value}`;
|
|
43
|
-
const hash =
|
|
43
|
+
const hash = sha3_256(new TextEncoder().encode(data));
|
|
44
44
|
return new DataView(hash.buffer).getUint32(0, true) % this.size;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -448,7 +448,7 @@ export class GossipProtocol {
|
|
|
448
448
|
*/
|
|
449
449
|
_generateMessageId(topic, data) {
|
|
450
450
|
const payload = JSON.stringify({ topic, data, origin: this.identity.identity.nodeId, ts: Date.now() });
|
|
451
|
-
return bytesToHex(
|
|
451
|
+
return bytesToHex(sha3_256(new TextEncoder().encode(payload))).slice(0, 32);
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
/**
|
package/mesh/annex.js
CHANGED
|
@@ -295,7 +295,7 @@ class AnnexSession {
|
|
|
295
295
|
* Derive symmetric encryption key from shared secret
|
|
296
296
|
*/
|
|
297
297
|
_deriveEncryptionKey() {
|
|
298
|
-
return createHash('
|
|
298
|
+
return createHash('sha3-256')
|
|
299
299
|
.update(this.sharedSecret)
|
|
300
300
|
.update(ANNEX_CONFIG.keyDerivationSalt)
|
|
301
301
|
.update(this.sessionId)
|
package/mesh/echo-ranging.js
CHANGED
package/mesh/phantom-routing.js
CHANGED
package/mesh/temporal-encoder.js
CHANGED
|
@@ -27,7 +27,7 @@ const TME_CONFIG = {
|
|
|
27
27
|
maxSlicesPerStream: 256,
|
|
28
28
|
reconstructionWindowNs: 500_000_000,
|
|
29
29
|
timingToleranceNs: 5_000_000,
|
|
30
|
-
hashAlgorithm: '
|
|
30
|
+
hashAlgorithm: 'sha3-256', // Post-quantum consistent hashing
|
|
31
31
|
temporalHashLength: 32,
|
|
32
32
|
minSlicesForReconstruction: 0.6,
|
|
33
33
|
maxMissingConsecutive: 3,
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
import { sha3_256 } from '@noble/hashes/sha3.js';
|
|
23
23
|
import { hkdf } from '@noble/hashes/hkdf.js';
|
|
24
|
-
|
|
24
|
+
// Using sha3_256 for all hashing operations for post-quantum consistency
|
|
25
25
|
import { bytesToHex, hexToBytes, utf8ToBytes } from '@noble/hashes/utils.js';
|
|
26
26
|
|
|
27
27
|
// Phase modulation for rotating security
|
|
@@ -144,7 +144,7 @@ export function deriveNetworkName(codeHash, wordCount = 3) {
|
|
|
144
144
|
const salt = utf8ToBytes('quantum-mesh-salt-2025');
|
|
145
145
|
|
|
146
146
|
// Derive enough bytes for word indices (1 byte per word)
|
|
147
|
-
const derived = hkdf(
|
|
147
|
+
const derived = hkdf(sha3_256, hashBytes, salt, info, wordCount);
|
|
148
148
|
|
|
149
149
|
// Map each byte to a word (256 words = 8 bits = 1 byte per word)
|
|
150
150
|
const words = [];
|
|
@@ -170,7 +170,7 @@ export function deriveNetworkId(codeHash) {
|
|
|
170
170
|
const info = utf8ToBytes(IDENTITY_CONFIG.shortIdSalt);
|
|
171
171
|
const salt = utf8ToBytes('mesh-id-salt-2025');
|
|
172
172
|
|
|
173
|
-
const derived = hkdf(
|
|
173
|
+
const derived = hkdf(sha3_256, hashBytes, salt, info, 4);
|
|
174
174
|
|
|
175
175
|
// Base58-like encoding (no 0, O, I, l to avoid confusion)
|
|
176
176
|
const alphabet = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz';
|
|
@@ -196,7 +196,7 @@ export function deriveVerificationPhrase(codeHash) {
|
|
|
196
196
|
const salt = utf8ToBytes('verify-phrase-salt-2025');
|
|
197
197
|
|
|
198
198
|
// Derive 5 bytes for a 5-word phrase
|
|
199
|
-
const derived = hkdf(
|
|
199
|
+
const derived = hkdf(sha3_256, hashBytes, salt, info, 5);
|
|
200
200
|
|
|
201
201
|
const templates = [
|
|
202
202
|
'The {0} {1} reflects the {2} {3}',
|
|
@@ -251,7 +251,7 @@ export class NetworkIdentity {
|
|
|
251
251
|
// Stable fingerprint - one-way derivation for comparison
|
|
252
252
|
// NOT the same as the code hash, NEVER changes
|
|
253
253
|
const fpBytes = hkdf(
|
|
254
|
-
|
|
254
|
+
sha3_256,
|
|
255
255
|
hexToBytes(codeHash),
|
|
256
256
|
utf8ToBytes('fingerprint-salt'),
|
|
257
257
|
utf8ToBytes(IDENTITY_CONFIG.fingerprintSalt),
|
package/oracle/phase-epoch.js
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
import { sha3_256 } from '@noble/hashes/sha3.js';
|
|
24
24
|
import { bytesToHex, utf8ToBytes } from '@noble/hashes/utils.js';
|
|
25
25
|
import { hkdf } from '@noble/hashes/hkdf.js';
|
|
26
|
-
|
|
26
|
+
// Using sha3_256 for all hashing operations for post-quantum consistency
|
|
27
27
|
|
|
28
28
|
// ============================================================
|
|
29
29
|
// CONFIGURATION
|
|
@@ -245,7 +245,7 @@ export function derivePhaseModulated(inputKey, baseSalt, baseInfo, outputLength,
|
|
|
245
245
|
const salt = modulateSalt(baseSalt, epoch);
|
|
246
246
|
const info = modulateInfo(baseInfo, epoch);
|
|
247
247
|
|
|
248
|
-
return hkdf(
|
|
248
|
+
return hkdf(sha3_256, inputKey, salt, info, outputLength);
|
|
249
249
|
}
|
|
250
250
|
|
|
251
251
|
/**
|
|
@@ -477,9 +477,9 @@ export default {
|
|
|
477
477
|
getPhaseStatus,
|
|
478
478
|
formatPhaseId,
|
|
479
479
|
};
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
480
|
+
|
|
481
|
+
|
|
482
|
+
|
|
483
483
|
|
|
484
484
|
// Alias for backward compatibility
|
|
485
|
-
export { setPhaseConfig as setTimeSourceConfig };
|
|
485
|
+
export { setPhaseConfig as setTimeSourceConfig };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "yakmesh",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "YAKMESH: Yielding Atomic Kernel Modular Encryption Secured Hub - Post-quantum secure P2P mesh network for the 2026 threat landscape",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "server/index.js",
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"./oracle/code-proof": "./oracle/code-proof-protocol.js",
|
|
18
18
|
"./oracle/module-sealer": "./oracle/module-sealer.js",
|
|
19
19
|
"./oracle/codebase-lock": "./oracle/codebase-lock.js",
|
|
20
|
+
"./security/crypto-config": "./security/crypto-config.js",
|
|
20
21
|
"./mesh/network": "./mesh/network.js",
|
|
21
22
|
"./mesh/rate-limiter": "./mesh/rate-limiter.js",
|
|
22
23
|
"./mesh/message-validator": "./mesh/message-validator.js",
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
"test": "node --test oracle/tests/*.test.js",
|
|
37
38
|
"test:time": "node --test oracle/tests/time-source.test.js",
|
|
38
39
|
"test:phase": "node --test oracle/tests/phase-epoch.test.js",
|
|
40
|
+
"test:crypto": "node --test oracle/tests/crypto.test.js",
|
|
39
41
|
"test:all": "node test-novel-systems.mjs"
|
|
40
42
|
},
|
|
41
43
|
"dependencies": {
|
package/server/index.js
CHANGED
|
@@ -47,6 +47,19 @@ import {
|
|
|
47
47
|
} from '../oracle/time-source.js';
|
|
48
48
|
import { setTimeSourceConfig, getActiveConfig } from '../oracle/phase-epoch.js';
|
|
49
49
|
|
|
50
|
+
// Helper: Format uptime in human-readable format
|
|
51
|
+
function formatUptime(seconds) {
|
|
52
|
+
const days = Math.floor(seconds / 86400);
|
|
53
|
+
const hours = Math.floor((seconds % 86400) / 3600);
|
|
54
|
+
const mins = Math.floor((seconds % 3600) / 60);
|
|
55
|
+
const secs = seconds % 60;
|
|
56
|
+
|
|
57
|
+
if (days > 0) return `${days}d ${hours}h ${mins}m`;
|
|
58
|
+
if (hours > 0) return `${hours}h ${mins}m ${secs}s`;
|
|
59
|
+
if (mins > 0) return `${mins}m ${secs}s`;
|
|
60
|
+
return `${secs}s`;
|
|
61
|
+
}
|
|
62
|
+
|
|
50
63
|
// Optional adapter integration (loaded dynamically if enabled)
|
|
51
64
|
let ActiveAdapter = null;
|
|
52
65
|
|
|
@@ -140,6 +153,9 @@ export class YakmeshNode {
|
|
|
140
153
|
|
|
141
154
|
async start() {
|
|
142
155
|
console.log('\n🦬 Starting Yakmesh Node...\n');
|
|
156
|
+
|
|
157
|
+
// Record start time for uptime tracking
|
|
158
|
+
this._startTime = Date.now();
|
|
143
159
|
|
|
144
160
|
// 0. LOCK THE CODEBASE - Prevent any modifications during runtime
|
|
145
161
|
// This is critical for Code Proof Protocol security
|
|
@@ -898,6 +914,81 @@ export class YakmeshNode {
|
|
|
898
914
|
});
|
|
899
915
|
});
|
|
900
916
|
|
|
917
|
+
// =========================================
|
|
918
|
+
// Metrics Endpoint - Dashboard Data
|
|
919
|
+
// =========================================
|
|
920
|
+
|
|
921
|
+
app.get('/metrics', (req, res) => {
|
|
922
|
+
const startTime = this._startTime || Date.now();
|
|
923
|
+
const uptime = Math.floor((Date.now() - startTime) / 1000);
|
|
924
|
+
|
|
925
|
+
// Crypto configuration (imported at top of file)
|
|
926
|
+
let cryptoInfo = null;
|
|
927
|
+
try {
|
|
928
|
+
// Dynamic import not needed - use the imported module
|
|
929
|
+
cryptoInfo = this._cryptoSummary || {
|
|
930
|
+
levelName: 'NIST Level 3',
|
|
931
|
+
signatureAlgorithm: 'ML-DSA-65',
|
|
932
|
+
backupSignatureAlgorithm: 'SLH-DSA-SHA2-192f',
|
|
933
|
+
kemAlgorithm: 'ML-KEM-768',
|
|
934
|
+
classicalSecurity: '192-bit',
|
|
935
|
+
quantumSecurity: '128-bit',
|
|
936
|
+
nistStandards: ['FIPS 203 (ML-KEM)', 'FIPS 204 (ML-DSA)', 'FIPS 205 (SLH-DSA)'],
|
|
937
|
+
};
|
|
938
|
+
} catch (e) {
|
|
939
|
+
cryptoInfo = { error: 'Could not load crypto config' };
|
|
940
|
+
}
|
|
941
|
+
|
|
942
|
+
// Time source info
|
|
943
|
+
let timeInfo = null;
|
|
944
|
+
if (this.timeSource) {
|
|
945
|
+
const status = this.timeSource.getStatus();
|
|
946
|
+
timeInfo = {
|
|
947
|
+
trustLevel: status.trustLevel,
|
|
948
|
+
stratum: status.stratum,
|
|
949
|
+
phaseTolerance: status.phaseTolerance,
|
|
950
|
+
hasAtomicTime: this.timeSource.hasAtomicTime(),
|
|
951
|
+
hasHighPrecisionTime: this.timeSource.hasHighPrecisionTime(),
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
// Oracle status
|
|
956
|
+
let oracleInfo = null;
|
|
957
|
+
if (this.oracle) {
|
|
958
|
+
const integrity = this.oracle.verifySelfIntegrity();
|
|
959
|
+
oracleInfo = {
|
|
960
|
+
status: integrity.valid ? 'healthy' : 'compromised',
|
|
961
|
+
valid: integrity.valid,
|
|
962
|
+
networkName: this.genesisNetwork?.networkName || null,
|
|
963
|
+
networkId: this.genesisNetwork?.networkId || null,
|
|
964
|
+
fingerprint: this.genesisNetwork?.fingerprint || null,
|
|
965
|
+
verifiedPeers: this.codeProof?.getVerifiedPeers()?.length || 0,
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
// Mesh stats
|
|
970
|
+
const peerCount = this.mesh?.getPeers()?.length || 0;
|
|
971
|
+
const gossipStats = this.gossip?.getStats() || null;
|
|
972
|
+
|
|
973
|
+
res.json({
|
|
974
|
+
node: {
|
|
975
|
+
id: this.identity?.identity?.nodeId || null,
|
|
976
|
+
name: this.config?.node?.name || 'unknown',
|
|
977
|
+
version: '1.7.0',
|
|
978
|
+
uptime,
|
|
979
|
+
uptimeFormatted: formatUptime(uptime),
|
|
980
|
+
},
|
|
981
|
+
crypto: cryptoInfo,
|
|
982
|
+
time: timeInfo,
|
|
983
|
+
oracle: oracleInfo,
|
|
984
|
+
network: {
|
|
985
|
+
peers: peerCount,
|
|
986
|
+
gossip: gossipStats,
|
|
987
|
+
},
|
|
988
|
+
timestamp: new Date().toISOString(),
|
|
989
|
+
});
|
|
990
|
+
});
|
|
991
|
+
|
|
901
992
|
// =========================================
|
|
902
993
|
// Time Source Endpoints - Precision Timing
|
|
903
994
|
// =========================================
|
package/yakbot/index.js
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* - /changelog - Recent changes
|
|
8
8
|
* - /ask [question] - AI-powered Q&A about YAKMESH
|
|
9
9
|
* - /nodes - Check health of official YAKMESH nodes
|
|
10
|
+
* - /faq - Frequently asked questions
|
|
10
11
|
* - /ping - Bot latency check
|
|
11
12
|
* - Auto-greet new members
|
|
12
13
|
*
|
|
@@ -26,7 +27,7 @@ const config = {
|
|
|
26
27
|
geminiKey: process.env.GEMINI_API_KEY,
|
|
27
28
|
|
|
28
29
|
// Current version
|
|
29
|
-
version: '1.
|
|
30
|
+
version: '1.6.0',
|
|
30
31
|
|
|
31
32
|
// Official YAKMESH nodes for health checks
|
|
32
33
|
officialNodes: [
|
|
@@ -489,6 +490,7 @@ const commands = {
|
|
|
489
490
|
{ name: '📦 `/install`', value: 'Quick installation guide', inline: true },
|
|
490
491
|
{ name: '❓ `/ask <question>`', value: 'Ask YakBot about YAKMESH', inline: true },
|
|
491
492
|
{ name: '🔗 `/links`', value: 'All social and resource links', inline: true },
|
|
493
|
+
{ name: '❔ `/faq`', value: 'Frequently asked questions', inline: true },
|
|
492
494
|
{ name: '🏓 `/ping`', value: 'Check bot latency', inline: true },
|
|
493
495
|
{ name: '📈 `/botstats`', value: 'View bot performance metrics', inline: true },
|
|
494
496
|
],
|
|
@@ -497,6 +499,48 @@ const commands = {
|
|
|
497
499
|
await interaction.reply({ embeds: [embed] });
|
|
498
500
|
},
|
|
499
501
|
|
|
502
|
+
// /faq - Frequently asked questions
|
|
503
|
+
async faq(interaction) {
|
|
504
|
+
const embed = createEmbed({
|
|
505
|
+
title: '❔ Frequently Asked Questions',
|
|
506
|
+
description: 'Common questions about YAKMESH',
|
|
507
|
+
fields: [
|
|
508
|
+
{
|
|
509
|
+
name: '🦬 What is YAKMESH?',
|
|
510
|
+
value: 'YAKMESH (Yielding Atomic Kernel Modular Encryption Secured Hub) is a post-quantum secure P2P mesh network designed for the 2026 threat landscape.',
|
|
511
|
+
inline: false,
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
name: '🔐 What makes it "post-quantum"?',
|
|
515
|
+
value: 'We use ML-DSA-65/87 (NIST FIPS 204) for signatures and ML-KEM-768/1024 (NIST FIPS 203) for key exchange. These algorithms are resistant to quantum computer attacks.',
|
|
516
|
+
inline: false,
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
name: '💻 What are the requirements?',
|
|
520
|
+
value: 'Node.js 18+ is required. Install with `npm install yakmesh`.',
|
|
521
|
+
inline: false,
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
name: '🌐 How do nodes find each other?',
|
|
525
|
+
value: 'Nodes with identical code share the same "network name" derived from the codebase hash. Gossip protocol handles peer discovery.',
|
|
526
|
+
inline: false,
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
name: '🔒 Is traffic encrypted?',
|
|
530
|
+
value: 'Yes! Annex provides ML-KEM768 key exchange + AES-256-GCM encryption with perfect forward secrecy for P2P channels.',
|
|
531
|
+
inline: false,
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
name: '📦 Is it production ready?',
|
|
535
|
+
value: 'YAKMESH is actively developed. Check releases for stable versions. Current: v' + config.version,
|
|
536
|
+
inline: false,
|
|
537
|
+
},
|
|
538
|
+
],
|
|
539
|
+
footer: 'More questions? Use /ask <question> or check the docs!',
|
|
540
|
+
});
|
|
541
|
+
await interaction.reply({ embeds: [embed] });
|
|
542
|
+
},
|
|
543
|
+
|
|
500
544
|
// /botstats - Bot performance metrics
|
|
501
545
|
async botstats(interaction) {
|
|
502
546
|
const uptime = Date.now() - stats.startTime;
|
|
@@ -64,6 +64,10 @@ const commands = [
|
|
|
64
64
|
.setName('help')
|
|
65
65
|
.setDescription('Show all available YakBot commands'),
|
|
66
66
|
|
|
67
|
+
new SlashCommandBuilder()
|
|
68
|
+
.setName('faq')
|
|
69
|
+
.setDescription('Frequently asked questions about YAKMESH'),
|
|
70
|
+
|
|
67
71
|
new SlashCommandBuilder()
|
|
68
72
|
.setName('botstats')
|
|
69
73
|
.setDescription('View YakBot performance metrics and statistics'),
|