yakmesh 2.8.2 → 3.0.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 +637 -0
- package/CONTRIBUTING.md +42 -0
- package/Caddyfile +77 -0
- package/README.md +119 -29
- package/adapters/adapter-mlv-bible/README.md +124 -0
- package/adapters/adapter-mlv-bible/index.js +400 -0
- package/adapters/chat-mod-adapter.js +532 -0
- package/adapters/content-adapter.js +273 -0
- package/content/api.js +50 -41
- package/content/index.js +2 -2
- package/content/store.js +355 -173
- package/dashboard/index.html +19 -3
- package/database/replication.js +117 -37
- package/docs/CRYPTO-AGILITY.md +204 -0
- package/docs/MTLS-RESEARCH.md +367 -0
- package/docs/NAMCHE-SPEC.md +681 -0
- package/docs/PEERQUANTA-YAKMESH-INTEGRATION.md +407 -0
- package/docs/PRECISION-DISCLOSURE.md +96 -0
- package/docs/README.md +76 -0
- package/docs/ROADMAP-2.4.0.md +447 -0
- package/docs/ROADMAP-2.5.0.md +244 -0
- package/docs/SECURITY-AUDIT-REPORT.md +306 -0
- package/docs/SST-INTEGRATION.md +712 -0
- package/docs/STEADYWATCH-IMPLEMENTATION.md +303 -0
- package/docs/TERNARY-AUDIT-REPORT.md +247 -0
- package/docs/TME-FAQ.md +221 -0
- package/docs/WHITEPAPER.md +623 -0
- package/docs/adapters.html +1001 -0
- package/docs/advanced-systems.html +1045 -0
- package/docs/annex.html +1046 -0
- package/docs/api.html +970 -0
- package/docs/business/response-templates.md +160 -0
- package/docs/c2c.html +1225 -0
- package/docs/cli.html +1332 -0
- package/docs/configuration.html +1248 -0
- package/docs/darshan.html +1085 -0
- package/docs/dharma.html +966 -0
- package/docs/docs-bundle.html +1075 -0
- package/docs/docs.css +3120 -0
- package/docs/docs.js +556 -0
- package/docs/doko.html +969 -0
- package/docs/geo-proof.html +858 -0
- package/docs/getting-started.html +840 -0
- package/docs/gumba-tutorial.html +1144 -0
- package/docs/gumba.html +1098 -0
- package/docs/index.html +914 -0
- package/docs/jhilke.html +1312 -0
- package/docs/karma.html +1100 -0
- package/docs/katha.html +1037 -0
- package/docs/lama.html +978 -0
- package/docs/mandala.html +1067 -0
- package/docs/mani.html +964 -0
- package/docs/mantra.html +967 -0
- package/docs/mesh.html +1409 -0
- package/docs/nakpak.html +869 -0
- package/docs/namche.html +928 -0
- package/docs/nav-order.json +53 -0
- package/docs/prahari.html +1043 -0
- package/docs/prism-bash.min.js +1 -0
- package/docs/prism-javascript.min.js +1 -0
- package/docs/prism-json.min.js +1 -0
- package/docs/prism-tomorrow.min.css +1 -0
- package/docs/prism.min.js +1 -0
- package/docs/privacy.html +699 -0
- package/docs/quick-reference.html +1181 -0
- package/docs/sakshi.html +1402 -0
- package/docs/sandboxing.md +386 -0
- package/docs/seva.html +911 -0
- package/docs/sherpa.html +871 -0
- package/docs/studio.html +860 -0
- package/docs/stupa.html +995 -0
- package/docs/tailwind.min.css +2 -0
- package/docs/tattva.html +1332 -0
- package/docs/terms.html +686 -0
- package/docs/time-server-deployment.md +166 -0
- package/docs/time-sources.html +1392 -0
- package/docs/tivra.html +1127 -0
- package/docs/trademark-policy.html +686 -0
- package/docs/tribhuj.html +1183 -0
- package/docs/trust-security.html +1029 -0
- package/docs/tutorials/backup-recovery.html +654 -0
- package/docs/tutorials/dashboard.html +604 -0
- package/docs/tutorials/domain-setup.html +605 -0
- package/docs/tutorials/host-website.html +456 -0
- package/docs/tutorials/mesh-network.html +505 -0
- package/docs/tutorials/mobile-access.html +445 -0
- package/docs/tutorials/privacy.html +467 -0
- package/docs/tutorials/raspberry-pi.html +600 -0
- package/docs/tutorials/security-basics.html +539 -0
- package/docs/tutorials/share-files.html +431 -0
- package/docs/tutorials/troubleshooting.html +637 -0
- package/docs/tutorials/trust-karma.html +419 -0
- package/docs/tutorials/yak-protocol.html +456 -0
- package/docs/tutorials.html +1034 -0
- package/docs/vani.html +1270 -0
- package/docs/webserver.html +809 -0
- package/docs/yak-protocol.html +940 -0
- package/docs/yak-timeserver-design.md +475 -0
- package/docs/yakapp.html +1015 -0
- package/docs/ypc27.html +1069 -0
- package/docs/yurt.html +1344 -0
- package/embedded-docs/bundle.js +334 -74
- package/gossip/protocol.js +247 -27
- package/identity/key-resolver.js +262 -0
- package/identity/machine-seed.js +632 -0
- package/identity/node-key.js +669 -368
- package/identity/tribhuj-ratchet.js +506 -0
- package/knowledge-base.js +37 -8
- package/launcher/yakmesh.bat +62 -0
- package/launcher/yakmesh.sh +70 -0
- package/mesh/annex.js +462 -108
- package/mesh/beacon-broadcast.js +113 -1
- package/mesh/darshan.js +1718 -0
- package/mesh/gumba.js +1567 -0
- package/mesh/jhilke.js +651 -0
- package/mesh/katha.js +1012 -0
- package/mesh/nakpak-routing.js +8 -5
- package/mesh/network.js +724 -34
- package/mesh/pulse-sync.js +4 -1
- package/mesh/rate-limiter.js +127 -15
- package/mesh/seva.js +526 -0
- package/mesh/sherpa-discovery.js +89 -8
- package/mesh/sybil-defense.js +19 -5
- package/mesh/temporal-encoder.js +4 -3
- package/mesh/vani.js +1364 -0
- package/mesh/yurt.js +1340 -0
- package/models/entropy-sentinel.onnx +0 -0
- package/models/karma-trust.onnx +0 -0
- package/models/manifest.json +43 -0
- package/models/sakshi-anomaly.onnx +0 -0
- package/oracle/code-proof-protocol.js +7 -6
- package/oracle/codebase-lock.js +257 -28
- package/oracle/index.js +74 -15
- package/oracle/ma902-snmp.js +678 -0
- package/oracle/module-sealer.js +5 -3
- package/oracle/network-identity.js +16 -0
- package/oracle/packet-checksum.js +201 -0
- package/oracle/sst.js +579 -0
- package/oracle/ternary-144t.js +714 -0
- package/oracle/ternary-ml.js +481 -0
- package/oracle/time-api.js +239 -0
- package/oracle/time-source.js +137 -47
- package/oracle/validation-oracle-hardened.js +1111 -1071
- package/oracle/validation-oracle.js +4 -2
- package/oracle/ypc27.js +211 -0
- package/package.json +20 -3
- package/protocol/yak-handler.js +35 -9
- package/protocol/yak-protocol.js +28 -13
- package/reference/cpp/yakmesh_mceliece_shard.cpp +168 -0
- package/reference/cpp/yakmesh_ypc27.cpp +179 -0
- package/sbom.json +87 -0
- package/scripts/security-audit.mjs +264 -0
- package/scripts/update-docs-nav.js +194 -0
- package/scripts/update-docs-sidebar.cjs +164 -0
- package/security/crypto-config.js +4 -3
- package/security/dharma-moderation.js +517 -0
- package/security/doko-identity.js +193 -143
- package/security/domain-consensus.js +86 -85
- package/security/fs-hardening.js +620 -0
- package/security/hardware-attestation.js +5 -3
- package/security/hybrid-trust.js +227 -87
- package/security/karma-rate-limiter.js +692 -0
- package/security/khata-protocol.js +22 -21
- package/security/khata-trust-integration.js +277 -150
- package/security/memory-safety.js +635 -0
- package/security/mesh-auth.js +11 -10
- package/security/mesh-revocation.js +373 -5
- package/security/namche-gateway.js +298 -69
- package/security/sakshi.js +460 -3
- package/security/sangha.js +770 -0
- package/security/secure-config.js +473 -0
- package/security/silicon-parity.js +13 -10
- package/security/steadywatch.js +1142 -0
- package/security/strike-system.js +32 -3
- package/security/temporal-signing.js +488 -0
- package/security/trit-commitment.js +464 -0
- package/server/crypto/annex.js +247 -0
- package/server/darshan-api.js +343 -0
- package/server/index.js +3259 -362
- package/server/komm-api.js +668 -0
- package/utils/accel.js +2273 -0
- package/utils/ternary-id.js +79 -0
- package/utils/verify-worker.js +57 -0
- package/webserver/index.js +95 -5
- package/assets/yakmesh-logo.png +0 -0
- package/assets/yakmesh-logo.svg +0 -80
- package/assets/yakmesh-logo2.png +0 -0
- package/assets/yakmesh-logo2sm.png +0 -0
- package/assets/ymsm.png +0 -0
- package/website/assets/silhouettes/adapters.svg +0 -107
- package/website/assets/silhouettes/api-endpoints.svg +0 -115
- package/website/assets/silhouettes/atomic-clock.svg +0 -83
- package/website/assets/silhouettes/base-camp.svg +0 -81
- package/website/assets/silhouettes/bridge.svg +0 -69
- package/website/assets/silhouettes/docs-bundle.svg +0 -113
- package/website/assets/silhouettes/doko-basket.svg +0 -70
- package/website/assets/silhouettes/fortress.svg +0 -93
- package/website/assets/silhouettes/gateway.svg +0 -54
- package/website/assets/silhouettes/gears.svg +0 -93
- package/website/assets/silhouettes/globe-satellite.svg +0 -67
- package/website/assets/silhouettes/karma-wheel.svg +0 -137
- package/website/assets/silhouettes/lama-council.svg +0 -141
- package/website/assets/silhouettes/mandala-network.svg +0 -169
- package/website/assets/silhouettes/mani-stones.svg +0 -149
- package/website/assets/silhouettes/mantra-wheel.svg +0 -116
- package/website/assets/silhouettes/mesh-nodes.svg +0 -113
- package/website/assets/silhouettes/nakpak.svg +0 -56
- package/website/assets/silhouettes/peak-lightning.svg +0 -73
- package/website/assets/silhouettes/sherpa.svg +0 -69
- package/website/assets/silhouettes/stupa-tower.svg +0 -119
- package/website/assets/silhouettes/tattva-eye.svg +0 -78
- package/website/assets/silhouettes/terminal.svg +0 -74
- package/website/assets/silhouettes/webserver.svg +0 -145
- package/website/assets/silhouettes/yak.svg +0 -78
- package/website/assets/yakmesh-logo.png +0 -0
- package/website/assets/yakmesh-logo.webp +0 -0
- package/website/assets/yakmesh-logo128x140.webp +0 -0
- package/website/assets/yakmesh-logo2.png +0 -0
- package/website/assets/yakmesh-logo2.svg +0 -51
- package/website/assets/yakmesh-logo40x44.webp +0 -0
- package/website/assets/yakmesh.gif +0 -0
- package/website/assets/yakmesh.ico +0 -0
- package/website/assets/yakmesh.jpg +0 -0
- package/website/assets/yakmesh.pdf +0 -0
- package/website/assets/yakmesh.png +0 -0
- package/website/assets/yakmesh.svg +0 -70
- package/website/assets/yakmesh128.webp +0 -0
- package/website/assets/yakmesh32.png +0 -0
- package/website/assets/yakmesh32.svg +0 -65
- package/website/assets/yakmesh32o.ico +0 -2
- package/website/assets/yakmesh32o.svg +0 -65
- package/website/assets/yakmesh32o.svgz +0 -0
package/docs/mesh.html
ADDED
|
@@ -0,0 +1,1409 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en" data-theme="mesh">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<link rel="icon" href="favicon.ico" sizes="32x32">
|
|
7
|
+
<link rel="icon" href="icon.svg" type="image/svg+xml">
|
|
8
|
+
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
|
9
|
+
<title>Mesh Network | YAKMESH Documentation</title>
|
|
10
|
+
<meta name="description" content="YAKMESH mesh networking infrastructure. WebSocket-based P2P communication, gossip protocol, onion routing, and distributed peer coordination.">
|
|
11
|
+
<link rel="stylesheet" href="tailwind.min.css">
|
|
12
|
+
<link rel="stylesheet" href="prism-tomorrow.min.css" media="print" onload="this.media='all'">
|
|
13
|
+
<noscript><link rel="stylesheet" href="prism-tomorrow.min.css"></noscript>
|
|
14
|
+
<link rel="stylesheet" href="docs.css">
|
|
15
|
+
<style>
|
|
16
|
+
.theme-accent { color: #14b8a6; }
|
|
17
|
+
.theme-accent-hover:hover { color: #2dd4bf; }
|
|
18
|
+
.theme-badge { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; }
|
|
19
|
+
.theme-border { border-color: #14b8a6; }
|
|
20
|
+
.theme-callout { background: rgba(20, 184, 166, 0.1); border-color: #0d9488; }
|
|
21
|
+
.active-link { background: rgba(20, 184, 166, 0.2) !important; color: #2dd4bf !important; }
|
|
22
|
+
.mesh-table { width: 100%; border-collapse: collapse; }
|
|
23
|
+
.mesh-table th, .mesh-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid #2e4c43; }
|
|
24
|
+
.mesh-table th { color: #14b8a6; font-weight: 600; background: rgba(20, 184, 166, 0.1); }
|
|
25
|
+
.mesh-table code { background: #1f332d; padding: 0.25rem 0.5rem; border-radius: 4px; color: #2dd4bf; }
|
|
26
|
+
.module-card { background: linear-gradient(135deg, rgba(20, 184, 166, 0.15), rgba(13, 148, 136, 0.1)); border-left: 4px solid #14b8a6; }
|
|
27
|
+
.module-card-network { background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(13, 148, 136, 0.1)); border-left: 4px solid #14b8a6; }
|
|
28
|
+
.module-card-annex { background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(139, 92, 246, 0.1)); border-left: 4px solid #a855f7; }
|
|
29
|
+
.module-card-beacon { background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.1)); border-left: 4px solid #fbbf24; }
|
|
30
|
+
.module-card-sherpa { background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1)); border-left: 4px solid #22c55e; }
|
|
31
|
+
.module-card-nakpak { background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.1)); border-left: 4px solid #3b82f6; }
|
|
32
|
+
.module-card-pulse { background: linear-gradient(135deg, rgba(236, 72, 153, 0.2), rgba(219, 39, 119, 0.1)); border-left: 4px solid #ec4899; }
|
|
33
|
+
.module-card-security { background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1)); border-left: 4px solid #ef4444; }
|
|
34
|
+
.module-card-echo { background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(79, 70, 229, 0.1)); border-left: 4px solid #6366f1; }
|
|
35
|
+
.module-card-temporal { background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1)); border-left: 4px solid #f59e0b; }
|
|
36
|
+
.mesh-philosophy { font-style: italic; background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(99, 102, 241, 0.1)); border-left: 4px solid #14b8a6; }
|
|
37
|
+
</style>
|
|
38
|
+
|
|
39
|
+
<!-- Open Graph -->
|
|
40
|
+
<meta property="og:type" content="article">
|
|
41
|
+
<meta property="og:site_name" content="Yakmesh Documentation">
|
|
42
|
+
<meta property="og:title" content="Mesh Network — Yakmesh">
|
|
43
|
+
<meta property="og:description" content="P2P mesh infrastructure — deep dive into mesh networking and node interconnection.">
|
|
44
|
+
</head>
|
|
45
|
+
<body class="bg-mountain-900 text-white min-h-screen">
|
|
46
|
+
<!-- YAKMESH-ICON-SPRITE-START -->
|
|
47
|
+
<svg xmlns="http://www.w3.org/2000/svg" style="display:none">
|
|
48
|
+
<!--
|
|
49
|
+
Yakmesh Docs Icon Sprite Sheet
|
|
50
|
+
24×24 viewBox — stroke/fill set via .doc-icon CSS
|
|
51
|
+
Usage: <svg class="doc-icon"><use href="#icon-name"/></svg>
|
|
52
|
+
-->
|
|
53
|
+
|
|
54
|
+
<!-- ═══ GUIDES ═══ -->
|
|
55
|
+
|
|
56
|
+
<symbol id="icon-home" viewBox="0 0 24 24">
|
|
57
|
+
<path d="M3 9.5L12 3l9 6.5V20a1 1 0 01-1 1H4a1 1 0 01-1-1V9.5z"/>
|
|
58
|
+
<polyline points="9 22 9 12 15 12 15 22"/>
|
|
59
|
+
</symbol>
|
|
60
|
+
|
|
61
|
+
<symbol id="icon-rocket" viewBox="0 0 24 24">
|
|
62
|
+
<path d="M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 00-2.91-.09z"/>
|
|
63
|
+
<path d="M12 15l-3-3a22 22 0 012-3.95A12.88 12.88 0 0122 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 01-4 2z"/>
|
|
64
|
+
<path d="M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0"/>
|
|
65
|
+
<path d="M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5"/>
|
|
66
|
+
</symbol>
|
|
67
|
+
|
|
68
|
+
<symbol id="icon-book" viewBox="0 0 24 24">
|
|
69
|
+
<path d="M4 19.5A2.5 2.5 0 016.5 17H20"/>
|
|
70
|
+
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z"/>
|
|
71
|
+
<line x1="8" y1="7" x2="16" y2="7"/>
|
|
72
|
+
<line x1="8" y1="11" x2="13" y2="11"/>
|
|
73
|
+
</symbol>
|
|
74
|
+
|
|
75
|
+
<!-- ═══ PROTOCOL STACK ═══ -->
|
|
76
|
+
|
|
77
|
+
<!-- YAK:// — Content addressing (yak horns) -->
|
|
78
|
+
<symbol id="icon-yak" viewBox="0 0 24 24">
|
|
79
|
+
<path d="M4 4c1 3 3 5 5 6"/>
|
|
80
|
+
<path d="M20 4c-1 3-3 5-5 6"/>
|
|
81
|
+
<circle cx="12" cy="14" r="5"/>
|
|
82
|
+
<circle cx="10" cy="13" r="0.5" fill="currentColor"/>
|
|
83
|
+
<circle cx="14" cy="13" r="0.5" fill="currentColor"/>
|
|
84
|
+
<path d="M10 16c1 1 3 1 4 0"/>
|
|
85
|
+
</symbol>
|
|
86
|
+
|
|
87
|
+
<!-- ANNEX — Encrypted bridge -->
|
|
88
|
+
<symbol id="icon-annex" viewBox="0 0 24 24">
|
|
89
|
+
<path d="M4 18h3a4 4 0 004-4V8"/>
|
|
90
|
+
<path d="M20 18h-3a4 4 0 01-4-4V8"/>
|
|
91
|
+
<circle cx="7" cy="6" r="2"/>
|
|
92
|
+
<circle cx="17" cy="6" r="2"/>
|
|
93
|
+
<line x1="7" y1="8" x2="7" y2="18"/>
|
|
94
|
+
<line x1="17" y1="8" x2="17" y2="18"/>
|
|
95
|
+
</symbol>
|
|
96
|
+
|
|
97
|
+
<!-- JHILKE — Cricket / steganographic key lifecycle -->
|
|
98
|
+
<symbol id="icon-jhilke" viewBox="0 0 24 24">
|
|
99
|
+
<ellipse cx="12" cy="14" rx="4" ry="6"/>
|
|
100
|
+
<path d="M8 10c-2-3-4-6-3-8"/>
|
|
101
|
+
<path d="M16 10c2-3 4-6 3-8"/>
|
|
102
|
+
<line x1="10" y1="20" x2="8" y2="23"/>
|
|
103
|
+
<line x1="14" y1="20" x2="16" y2="23"/>
|
|
104
|
+
<path d="M9 12l-4 2"/>
|
|
105
|
+
<path d="M15 12l4 2"/>
|
|
106
|
+
</symbol>
|
|
107
|
+
|
|
108
|
+
<!-- NAKPAK — Onion layers / backpack -->
|
|
109
|
+
<symbol id="icon-nakpak" viewBox="0 0 24 24">
|
|
110
|
+
<circle cx="12" cy="12" r="10" opacity="0.3"/>
|
|
111
|
+
<circle cx="12" cy="12" r="7" opacity="0.5"/>
|
|
112
|
+
<circle cx="12" cy="12" r="4" opacity="0.8"/>
|
|
113
|
+
<circle cx="12" cy="12" r="1.5" fill="currentColor"/>
|
|
114
|
+
</symbol>
|
|
115
|
+
|
|
116
|
+
<!-- NAMCHE — Gateway door -->
|
|
117
|
+
<symbol id="icon-namche" viewBox="0 0 24 24">
|
|
118
|
+
<rect x="3" y="3" width="18" height="18" rx="2"/>
|
|
119
|
+
<path d="M9 3v18"/>
|
|
120
|
+
<path d="M15 3v18"/>
|
|
121
|
+
<line x1="3" y1="8" x2="9" y2="8"/>
|
|
122
|
+
<line x1="15" y1="8" x2="21" y2="8"/>
|
|
123
|
+
<circle cx="12" cy="14" r="1" fill="currentColor"/>
|
|
124
|
+
</symbol>
|
|
125
|
+
|
|
126
|
+
<!-- DOKO — Basket / certificate -->
|
|
127
|
+
<symbol id="icon-doko" viewBox="0 0 24 24">
|
|
128
|
+
<path d="M6 8l-2 12h16l-2-12"/>
|
|
129
|
+
<path d="M6 8c0-3 2.7-5 6-5s6 2 6 5"/>
|
|
130
|
+
<line x1="8" y1="10" x2="10" y2="18"/>
|
|
131
|
+
<line x1="16" y1="10" x2="14" y2="18"/>
|
|
132
|
+
<line x1="12" y1="10" x2="12" y2="18"/>
|
|
133
|
+
</symbol>
|
|
134
|
+
|
|
135
|
+
<!-- SHERPA — Mountain climber -->
|
|
136
|
+
<symbol id="icon-sherpa" viewBox="0 0 24 24">
|
|
137
|
+
<path d="M4 20L10 6l3 6 3-4 4 12"/>
|
|
138
|
+
<line x1="4" y1="20" x2="20" y2="20"/>
|
|
139
|
+
<circle cx="13" cy="4" r="1.5"/>
|
|
140
|
+
</symbol>
|
|
141
|
+
|
|
142
|
+
<!-- MANDALA — Network topology web -->
|
|
143
|
+
<symbol id="icon-mandala" viewBox="0 0 24 24">
|
|
144
|
+
<circle cx="12" cy="12" r="9"/>
|
|
145
|
+
<circle cx="12" cy="12" r="4.5"/>
|
|
146
|
+
<line x1="12" y1="3" x2="12" y2="21"/>
|
|
147
|
+
<line x1="3" y1="12" x2="21" y2="12"/>
|
|
148
|
+
<line x1="5.6" y1="5.6" x2="18.4" y2="18.4"/>
|
|
149
|
+
<line x1="18.4" y1="5.6" x2="5.6" y2="18.4"/>
|
|
150
|
+
</symbol>
|
|
151
|
+
|
|
152
|
+
<!-- MANTRA — Gossip / prayer wheel -->
|
|
153
|
+
<symbol id="icon-mantra" viewBox="0 0 24 24">
|
|
154
|
+
<circle cx="12" cy="10" r="7"/>
|
|
155
|
+
<path d="M12 3v14"/>
|
|
156
|
+
<path d="M8 7c2 1.5 6 1.5 8 0"/>
|
|
157
|
+
<path d="M8 13c2-1.5 6-1.5 8 0"/>
|
|
158
|
+
<line x1="12" y1="17" x2="12" y2="22"/>
|
|
159
|
+
<line x1="9" y1="22" x2="15" y2="22"/>
|
|
160
|
+
</symbol>
|
|
161
|
+
|
|
162
|
+
<!-- GUMBA — Temple / access control -->
|
|
163
|
+
<symbol id="icon-gumba" viewBox="0 0 24 24">
|
|
164
|
+
<path d="M12 2L3 9h18z"/>
|
|
165
|
+
<line x1="5" y1="9" x2="5" y2="19"/>
|
|
166
|
+
<line x1="9" y1="9" x2="9" y2="19"/>
|
|
167
|
+
<line x1="15" y1="9" x2="15" y2="19"/>
|
|
168
|
+
<line x1="19" y1="9" x2="19" y2="19"/>
|
|
169
|
+
<line x1="3" y1="19" x2="21" y2="19"/>
|
|
170
|
+
<line x1="3" y1="21" x2="21" y2="21"/>
|
|
171
|
+
</symbol>
|
|
172
|
+
|
|
173
|
+
<!-- YURT — Camp / room -->
|
|
174
|
+
<symbol id="icon-yurt" viewBox="0 0 24 24">
|
|
175
|
+
<path d="M3 20L12 4l9 16"/>
|
|
176
|
+
<line x1="3" y1="20" x2="21" y2="20"/>
|
|
177
|
+
<path d="M10 20v-5a2 2 0 014 0v5"/>
|
|
178
|
+
<path d="M6 14h12"/>
|
|
179
|
+
</symbol>
|
|
180
|
+
|
|
181
|
+
<!-- KATHA — Chat / story scroll -->
|
|
182
|
+
<symbol id="icon-katha" viewBox="0 0 24 24">
|
|
183
|
+
<path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"/>
|
|
184
|
+
<line x1="8" y1="8" x2="16" y2="8"/>
|
|
185
|
+
<line x1="8" y1="12" x2="13" y2="12"/>
|
|
186
|
+
</symbol>
|
|
187
|
+
|
|
188
|
+
<!-- VANI — Voice / microphone -->
|
|
189
|
+
<symbol id="icon-vani" viewBox="0 0 24 24">
|
|
190
|
+
<rect x="9" y="2" width="6" height="11" rx="3"/>
|
|
191
|
+
<path d="M5 10a7 7 0 0014 0"/>
|
|
192
|
+
<line x1="12" y1="17" x2="12" y2="22"/>
|
|
193
|
+
<line x1="8" y1="22" x2="16" y2="22"/>
|
|
194
|
+
</symbol>
|
|
195
|
+
|
|
196
|
+
<!-- DARSHAN — Eye / viewing -->
|
|
197
|
+
<symbol id="icon-darshan" viewBox="0 0 24 24">
|
|
198
|
+
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8S1 12 1 12z"/>
|
|
199
|
+
<circle cx="12" cy="12" r="3"/>
|
|
200
|
+
</symbol>
|
|
201
|
+
|
|
202
|
+
<!-- STUPA — Tower / distributed storage -->
|
|
203
|
+
<symbol id="icon-stupa" viewBox="0 0 24 24">
|
|
204
|
+
<line x1="12" y1="2" x2="12" y2="5"/>
|
|
205
|
+
<path d="M10 5h4l1 3H9z"/>
|
|
206
|
+
<ellipse cx="12" cy="11" rx="5" ry="3"/>
|
|
207
|
+
<ellipse cx="12" cy="15" rx="6" ry="3"/>
|
|
208
|
+
<ellipse cx="12" cy="19" rx="7" ry="3"/>
|
|
209
|
+
</symbol>
|
|
210
|
+
|
|
211
|
+
<!-- LAMA — Crystal ball / consensus -->
|
|
212
|
+
<symbol id="icon-lama" viewBox="0 0 24 24">
|
|
213
|
+
<circle cx="12" cy="10" r="7"/>
|
|
214
|
+
<path d="M12 3c-1.5 2-2 5 0 7s4.5 2 6 0"/>
|
|
215
|
+
<path d="M7 19h10"/>
|
|
216
|
+
<path d="M9 22h6"/>
|
|
217
|
+
<line x1="9" y1="17" x2="9" y2="19"/>
|
|
218
|
+
<line x1="15" y1="17" x2="15" y2="19"/>
|
|
219
|
+
</symbol>
|
|
220
|
+
|
|
221
|
+
<!-- MANI — Prayer stone / time sync -->
|
|
222
|
+
<symbol id="icon-mani" viewBox="0 0 24 24">
|
|
223
|
+
<circle cx="12" cy="12" r="9"/>
|
|
224
|
+
<polyline points="12 6 12 12 16 14"/>
|
|
225
|
+
<circle cx="12" cy="12" r="1" fill="currentColor"/>
|
|
226
|
+
</symbol>
|
|
227
|
+
|
|
228
|
+
<!-- KARMA — Yin-yang / reputation -->
|
|
229
|
+
<symbol id="icon-karma" viewBox="0 0 24 24">
|
|
230
|
+
<circle cx="12" cy="12" r="9"/>
|
|
231
|
+
<path d="M12 3a4.5 4.5 0 010 9 4.5 4.5 0 000 9"/>
|
|
232
|
+
<circle cx="12" cy="7.5" r="1.5" fill="currentColor"/>
|
|
233
|
+
<circle cx="12" cy="16.5" r="1.5"/>
|
|
234
|
+
</symbol>
|
|
235
|
+
|
|
236
|
+
<!-- TATTVA — Quantum elements / atom -->
|
|
237
|
+
<symbol id="icon-tattva" viewBox="0 0 24 24">
|
|
238
|
+
<circle cx="12" cy="12" r="2.5" fill="currentColor" stroke="none"/>
|
|
239
|
+
<ellipse cx="12" cy="12" rx="10" ry="4"/>
|
|
240
|
+
<ellipse cx="12" cy="12" rx="10" ry="4" transform="rotate(60 12 12)"/>
|
|
241
|
+
<ellipse cx="12" cy="12" rx="10" ry="4" transform="rotate(120 12 12)"/>
|
|
242
|
+
</symbol>
|
|
243
|
+
|
|
244
|
+
<!-- TRIBHUJ — Triangle / balanced ternary -->
|
|
245
|
+
<symbol id="icon-tribhuj" viewBox="0 0 24 24">
|
|
246
|
+
<polygon points="12,3 21,20 3,20"/>
|
|
247
|
+
<line x1="12" y1="3" x2="12" y2="20"/>
|
|
248
|
+
<line x1="7.5" y1="11.5" x2="16.5" y2="11.5"/>
|
|
249
|
+
<circle cx="12" cy="14" r="1" fill="currentColor"/>
|
|
250
|
+
</symbol>
|
|
251
|
+
|
|
252
|
+
<!-- YPC-27 — Lock / cipher -->
|
|
253
|
+
<symbol id="icon-ypc27" viewBox="0 0 24 24">
|
|
254
|
+
<rect x="5" y="11" width="14" height="10" rx="2"/>
|
|
255
|
+
<path d="M8 11V7a4 4 0 118 0v4"/>
|
|
256
|
+
<circle cx="12" cy="16" r="1" fill="currentColor"/>
|
|
257
|
+
<line x1="12" y1="17" x2="12" y2="19"/>
|
|
258
|
+
</symbol>
|
|
259
|
+
|
|
260
|
+
<!-- SAKSHI — Witness / aperture eye -->
|
|
261
|
+
<symbol id="icon-sakshi" viewBox="0 0 24 24">
|
|
262
|
+
<circle cx="12" cy="12" r="9"/>
|
|
263
|
+
<path d="M12 3l3 9-3 9"/>
|
|
264
|
+
<path d="M12 3l-3 9 3 9"/>
|
|
265
|
+
<circle cx="12" cy="12" r="2.5"/>
|
|
266
|
+
<circle cx="12" cy="12" r="0.8" fill="currentColor"/>
|
|
267
|
+
</symbol>
|
|
268
|
+
|
|
269
|
+
<!-- PRAMAAN — Globe / geographic proof -->
|
|
270
|
+
<symbol id="icon-pramaan" viewBox="0 0 24 24">
|
|
271
|
+
<circle cx="12" cy="12" r="9"/>
|
|
272
|
+
<ellipse cx="12" cy="12" rx="4" ry="9"/>
|
|
273
|
+
<line x1="3" y1="9" x2="21" y2="9"/>
|
|
274
|
+
<line x1="3" y1="15" x2="21" y2="15"/>
|
|
275
|
+
<path d="M18 4l-2 2 1 3"/>
|
|
276
|
+
<path d="M6 18l2-1 3 1"/>
|
|
277
|
+
</symbol>
|
|
278
|
+
|
|
279
|
+
<!-- SURAKSHA — Shield / security -->
|
|
280
|
+
<symbol id="icon-suraksha" viewBox="0 0 24 24">
|
|
281
|
+
<path d="M12 2l8 4v6c0 5.5-3.8 10.7-8 12-4.2-1.3-8-6.5-8-12V6z"/>
|
|
282
|
+
<polyline points="9 12 11 14 15 10"/>
|
|
283
|
+
</symbol>
|
|
284
|
+
|
|
285
|
+
<!-- TIVRA — Lightning bolt / acceleration -->
|
|
286
|
+
<symbol id="icon-tivra" viewBox="0 0 24 24">
|
|
287
|
+
<polygon points="13,2 3,14 12,14 11,22 21,10 12,10"/>
|
|
288
|
+
</symbol>
|
|
289
|
+
|
|
290
|
+
<!-- PRAHARI — Satellite / sentinel -->
|
|
291
|
+
<symbol id="icon-prahari" viewBox="0 0 24 24">
|
|
292
|
+
<rect x="9" y="9" width="6" height="6" rx="1" transform="rotate(45 12 12)"/>
|
|
293
|
+
<line x1="12" y1="5" x2="12" y2="2"/>
|
|
294
|
+
<line x1="19" y1="12" x2="22" y2="12"/>
|
|
295
|
+
<line x1="12" y1="19" x2="12" y2="22"/>
|
|
296
|
+
<line x1="5" y1="12" x2="2" y2="12"/>
|
|
297
|
+
<path d="M7 7L5 5"/>
|
|
298
|
+
<path d="M17 7l2-2"/>
|
|
299
|
+
</symbol>
|
|
300
|
+
|
|
301
|
+
<!-- DHARMA — Balance scale / content moderation -->
|
|
302
|
+
<symbol id="icon-dharma" viewBox="0 0 24 24">
|
|
303
|
+
<line x1="12" y1="3" x2="12" y2="21"/>
|
|
304
|
+
<line x1="4" y1="7" x2="20" y2="7"/>
|
|
305
|
+
<path d="M4 7l2 7h0a3 3 0 006 0h0l2-7"/>
|
|
306
|
+
<path d="M14 7l2 7h0a3 3 0 006 0h0l2-7"/>
|
|
307
|
+
<line x1="10" y1="21" x2="14" y2="21"/>
|
|
308
|
+
</symbol>
|
|
309
|
+
|
|
310
|
+
<!-- SEVA — Helping hands / NPU sharing -->
|
|
311
|
+
<symbol id="icon-seva" viewBox="0 0 24 24">
|
|
312
|
+
<path d="M12 22c-4 0-8-2-8-6 0-2 1-3 3-4l5-3 5 3c2 1 3 2 3 4 0 4-4 6-8 6z"/>
|
|
313
|
+
<path d="M12 11V5"/>
|
|
314
|
+
<path d="M9 8l3-3 3 3"/>
|
|
315
|
+
<circle cx="12" cy="16" r="2"/>
|
|
316
|
+
</symbol>
|
|
317
|
+
|
|
318
|
+
<!-- ═══ APPLICATIONS ═══ -->
|
|
319
|
+
|
|
320
|
+
<!-- YakApp — Messenger -->
|
|
321
|
+
<symbol id="icon-yakapp" viewBox="0 0 24 24">
|
|
322
|
+
<path d="M21 11.5a8.38 8.38 0 01-.9 3.8 8.5 8.5 0 01-7.6 4.7 8.38 8.38 0 01-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 01-.9-3.8 8.5 8.5 0 014.7-7.6 8.38 8.38 0 013.8-.9h.5a8.48 8.48 0 018 8v.5z"/>
|
|
323
|
+
</symbol>
|
|
324
|
+
|
|
325
|
+
<!-- C2C — Core to Cosmos -->
|
|
326
|
+
<symbol id="icon-c2c" viewBox="0 0 24 24">
|
|
327
|
+
<circle cx="12" cy="12" r="3"/>
|
|
328
|
+
<circle cx="12" cy="12" r="9"/>
|
|
329
|
+
<path d="M12 3v3"/>
|
|
330
|
+
<path d="M12 18v3"/>
|
|
331
|
+
<path d="M3 12h3"/>
|
|
332
|
+
<path d="M18 12h3"/>
|
|
333
|
+
</symbol>
|
|
334
|
+
|
|
335
|
+
<!-- Studio — Creative suite -->
|
|
336
|
+
<symbol id="icon-studio" viewBox="0 0 24 24">
|
|
337
|
+
<circle cx="13.5" cy="6.5" r="2.5"/>
|
|
338
|
+
<path d="M6 21l4-10 3 5 4-7 4 12"/>
|
|
339
|
+
<rect x="2" y="2" width="20" height="20" rx="2"/>
|
|
340
|
+
</symbol>
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
<!-- ═══ REFERENCE ═══ -->
|
|
344
|
+
|
|
345
|
+
<!-- Quick Reference — Clipboard -->
|
|
346
|
+
<symbol id="icon-quickref" viewBox="0 0 24 24">
|
|
347
|
+
<path d="M16 4h2a2 2 0 012 2v14a2 2 0 01-2 2H6a2 2 0 01-2-2V6a2 2 0 012-2h2"/>
|
|
348
|
+
<rect x="8" y="2" width="8" height="4" rx="1"/>
|
|
349
|
+
<line x1="8" y1="10" x2="16" y2="10"/>
|
|
350
|
+
<line x1="8" y1="14" x2="16" y2="14"/>
|
|
351
|
+
<line x1="8" y1="18" x2="12" y2="18"/>
|
|
352
|
+
</symbol>
|
|
353
|
+
|
|
354
|
+
<!-- GRANTH — Docs bundle -->
|
|
355
|
+
<symbol id="icon-granth" viewBox="0 0 24 24">
|
|
356
|
+
<path d="M4 19.5A2.5 2.5 0 016.5 17H20"/>
|
|
357
|
+
<path d="M6.5 2H20v20H6.5A2.5 2.5 0 014 19.5v-15A2.5 2.5 0 016.5 2z"/>
|
|
358
|
+
<path d="M8 7h8"/>
|
|
359
|
+
<path d="M8 11h5"/>
|
|
360
|
+
<path d="M8 15h3"/>
|
|
361
|
+
</symbol>
|
|
362
|
+
|
|
363
|
+
<!-- API — Signal tower -->
|
|
364
|
+
<symbol id="icon-api" viewBox="0 0 24 24">
|
|
365
|
+
<line x1="12" y1="10" x2="12" y2="22"/>
|
|
366
|
+
<path d="M8 6a6 6 0 018 0"/>
|
|
367
|
+
<path d="M5 3a10 10 0 0114 0"/>
|
|
368
|
+
<circle cx="12" cy="10" r="2"/>
|
|
369
|
+
</symbol>
|
|
370
|
+
|
|
371
|
+
<!-- Adapters — Plug connector -->
|
|
372
|
+
<symbol id="icon-adapters" viewBox="0 0 24 24">
|
|
373
|
+
<path d="M6 3v4"/>
|
|
374
|
+
<path d="M10 3v4"/>
|
|
375
|
+
<path d="M4 7h8v3a4 4 0 01-8 0V7z"/>
|
|
376
|
+
<line x1="8" y1="14" x2="8" y2="17"/>
|
|
377
|
+
<path d="M14 10h4v3a2 2 0 01-4 0v-3z"/>
|
|
378
|
+
<line x1="16" y1="7" x2="16" y2="10"/>
|
|
379
|
+
<line x1="16" y1="13" x2="16" y2="17"/>
|
|
380
|
+
<line x1="8" y1="17" x2="16" y2="17"/>
|
|
381
|
+
<line x1="12" y1="17" x2="12" y2="21"/>
|
|
382
|
+
</symbol>
|
|
383
|
+
|
|
384
|
+
<!-- ═══ EXTRA (pages outside nav-order) ═══ -->
|
|
385
|
+
|
|
386
|
+
<!-- Terminal / CLI -->
|
|
387
|
+
<symbol id="icon-terminal" viewBox="0 0 24 24">
|
|
388
|
+
<rect x="2" y="3" width="20" height="18" rx="2"/>
|
|
389
|
+
<polyline points="7 9 10 12 7 15"/>
|
|
390
|
+
<line x1="13" y1="15" x2="17" y2="15"/>
|
|
391
|
+
</symbol>
|
|
392
|
+
|
|
393
|
+
<!-- Gear / Configuration -->
|
|
394
|
+
<symbol id="icon-gear" viewBox="0 0 24 24">
|
|
395
|
+
<circle cx="12" cy="12" r="3"/>
|
|
396
|
+
<path d="M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 01-2.83 2.83l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"/>
|
|
397
|
+
</symbol>
|
|
398
|
+
|
|
399
|
+
<!-- Server / Web hosting -->
|
|
400
|
+
<symbol id="icon-server" viewBox="0 0 24 24">
|
|
401
|
+
<rect x="2" y="2" width="20" height="8" rx="2"/>
|
|
402
|
+
<rect x="2" y="14" width="20" height="8" rx="2"/>
|
|
403
|
+
<line x1="6" y1="6" x2="6.01" y2="6"/>
|
|
404
|
+
<line x1="6" y1="18" x2="6.01" y2="18"/>
|
|
405
|
+
</symbol>
|
|
406
|
+
|
|
407
|
+
<!-- ═══ CHROME / UI ═══ -->
|
|
408
|
+
|
|
409
|
+
<!-- Mountain peak — logo icon (replaces 🏔️) -->
|
|
410
|
+
<symbol id="icon-mountain" viewBox="0 0 24 24">
|
|
411
|
+
<path d="M8 21l4.5-9 3 5.5L19 12l3 9H2l6-9z"/>
|
|
412
|
+
<path d="M12 12l1.5-3L16 14"/>
|
|
413
|
+
</symbol>
|
|
414
|
+
|
|
415
|
+
<!-- Dashboard / bar chart (replaces 📊) -->
|
|
416
|
+
<symbol id="icon-dashboard" viewBox="0 0 24 24">
|
|
417
|
+
<line x1="18" y1="20" x2="18" y2="10"/>
|
|
418
|
+
<line x1="12" y1="20" x2="12" y2="4"/>
|
|
419
|
+
<line x1="6" y1="20" x2="6" y2="14"/>
|
|
420
|
+
<rect x="2" y="2" width="20" height="20" rx="2" stroke-opacity="0.4"/>
|
|
421
|
+
</symbol>
|
|
422
|
+
|
|
423
|
+
<!-- ═══ GENERIC / CONTENT ICONS ═══ -->
|
|
424
|
+
|
|
425
|
+
<!-- Lock / encrypted (replaces 🔐) -->
|
|
426
|
+
<symbol id="icon-lock" viewBox="0 0 24 24">
|
|
427
|
+
<rect x="3" y="11" width="18" height="11" rx="2"/>
|
|
428
|
+
<path d="M7 11V7a5 5 0 0110 0v4"/>
|
|
429
|
+
</symbol>
|
|
430
|
+
|
|
431
|
+
<!-- Signal / broadcast (replaces 📡) -->
|
|
432
|
+
<symbol id="icon-signal" viewBox="0 0 24 24">
|
|
433
|
+
<path d="M2 12a10 10 0 0118 0"/>
|
|
434
|
+
<path d="M5 12a7 7 0 0112 0"/>
|
|
435
|
+
<path d="M8 12a4 4 0 016 0"/>
|
|
436
|
+
<circle cx="11" cy="12" r="1"/>
|
|
437
|
+
</symbol>
|
|
438
|
+
|
|
439
|
+
<!-- Link / chain (replaces 🔗) -->
|
|
440
|
+
<symbol id="icon-link" viewBox="0 0 24 24">
|
|
441
|
+
<path d="M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71"/>
|
|
442
|
+
<path d="M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71"/>
|
|
443
|
+
</symbol>
|
|
444
|
+
|
|
445
|
+
<!-- Globe / network (replaces 🌐) -->
|
|
446
|
+
<symbol id="icon-globe" viewBox="0 0 24 24">
|
|
447
|
+
<circle cx="12" cy="12" r="10"/>
|
|
448
|
+
<line x1="2" y1="12" x2="22" y2="12"/>
|
|
449
|
+
<path d="M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z"/>
|
|
450
|
+
</symbol>
|
|
451
|
+
|
|
452
|
+
<!-- Sync / refresh (replaces 🔄) -->
|
|
453
|
+
<symbol id="icon-sync" viewBox="0 0 24 24">
|
|
454
|
+
<polyline points="23 4 23 10 17 10"/>
|
|
455
|
+
<polyline points="1 20 1 14 7 14"/>
|
|
456
|
+
<path d="M3.51 9a9 9 0 0114.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0020.49 15"/>
|
|
457
|
+
</symbol>
|
|
458
|
+
|
|
459
|
+
<!-- Users / group (replaces 👥) -->
|
|
460
|
+
<symbol id="icon-users" viewBox="0 0 24 24">
|
|
461
|
+
<path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/>
|
|
462
|
+
<circle cx="9" cy="7" r="4"/>
|
|
463
|
+
<path d="M23 21v-2a4 4 0 00-3-3.87"/>
|
|
464
|
+
<path d="M16 3.13a4 4 0 010 7.75"/>
|
|
465
|
+
</symbol>
|
|
466
|
+
|
|
467
|
+
<!-- Shield / protection (replaces 🛡) -->
|
|
468
|
+
<symbol id="icon-shield" viewBox="0 0 24 24">
|
|
469
|
+
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/>
|
|
470
|
+
</symbol>
|
|
471
|
+
|
|
472
|
+
<!-- Heartbeat / pulse (replaces 💓) -->
|
|
473
|
+
<symbol id="icon-heartbeat" viewBox="0 0 24 24">
|
|
474
|
+
<path d="M3 12h4l3-9 4 18 3-9h4"/>
|
|
475
|
+
</symbol>
|
|
476
|
+
|
|
477
|
+
<!-- Map pin / location (replaces 📍) -->
|
|
478
|
+
<symbol id="icon-pin" viewBox="0 0 24 24">
|
|
479
|
+
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0118 0z"/>
|
|
480
|
+
<circle cx="12" cy="10" r="3"/>
|
|
481
|
+
</symbol>
|
|
482
|
+
|
|
483
|
+
<!-- Traffic light / status (replaces 🚦) -->
|
|
484
|
+
<symbol id="icon-traffic" viewBox="0 0 24 24">
|
|
485
|
+
<rect x="7" y="2" width="10" height="20" rx="3"/>
|
|
486
|
+
<circle cx="12" cy="7" r="1.5"/>
|
|
487
|
+
<circle cx="12" cy="12" r="1.5"/>
|
|
488
|
+
<circle cx="12" cy="17" r="1.5"/>
|
|
489
|
+
</symbol>
|
|
490
|
+
|
|
491
|
+
<!-- Check circle (replaces ✅) -->
|
|
492
|
+
<symbol id="icon-check" viewBox="0 0 24 24">
|
|
493
|
+
<path d="M22 11.08V12a10 10 0 11-5.93-9.14"/>
|
|
494
|
+
<polyline points="22 4 12 14.01 9 11.01"/>
|
|
495
|
+
</symbol>
|
|
496
|
+
|
|
497
|
+
<!-- Megaphone / broadcast (replaces 📢) -->
|
|
498
|
+
<symbol id="icon-megaphone" viewBox="0 0 24 24">
|
|
499
|
+
<path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"/>
|
|
500
|
+
</symbol>
|
|
501
|
+
|
|
502
|
+
<!-- Pen / signed (replaces ✍) -->
|
|
503
|
+
<symbol id="icon-pen" viewBox="0 0 24 24">
|
|
504
|
+
<path d="M12 20h9"/>
|
|
505
|
+
<path d="M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4L16.5 3.5z"/>
|
|
506
|
+
</symbol>
|
|
507
|
+
|
|
508
|
+
<!-- Warning / alert (replaces ⚠) -->
|
|
509
|
+
<symbol id="icon-warning" viewBox="0 0 24 24">
|
|
510
|
+
<path d="M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z"/>
|
|
511
|
+
<line x1="12" y1="9" x2="12" y2="13"/>
|
|
512
|
+
<line x1="12" y1="17" x2="12.01" y2="17"/>
|
|
513
|
+
</symbol>
|
|
514
|
+
|
|
515
|
+
<!-- Hourglass / timer (replaces ⏳) -->
|
|
516
|
+
<symbol id="icon-hourglass" viewBox="0 0 24 24">
|
|
517
|
+
<path d="M6 2h12v5l-4 4 4 4v5H6v-5l4-4-4-4V2z"/>
|
|
518
|
+
</symbol>
|
|
519
|
+
|
|
520
|
+
<!-- Scroll / document (replaces 📜) -->
|
|
521
|
+
<symbol id="icon-scroll" viewBox="0 0 24 24">
|
|
522
|
+
<path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/>
|
|
523
|
+
<polyline points="14 2 14 8 20 8"/>
|
|
524
|
+
<line x1="16" y1="13" x2="8" y2="13"/>
|
|
525
|
+
<line x1="16" y1="17" x2="8" y2="17"/>
|
|
526
|
+
</symbol>
|
|
527
|
+
|
|
528
|
+
<!-- Bolt / lightning (replaces ⚡) -->
|
|
529
|
+
<symbol id="icon-bolt" viewBox="0 0 24 24">
|
|
530
|
+
<polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/>
|
|
531
|
+
</symbol>
|
|
532
|
+
|
|
533
|
+
<!-- Target / crosshair (replaces 🎯) -->
|
|
534
|
+
<symbol id="icon-target" viewBox="0 0 24 24">
|
|
535
|
+
<circle cx="12" cy="12" r="10"/>
|
|
536
|
+
<circle cx="12" cy="12" r="6"/>
|
|
537
|
+
<circle cx="12" cy="12" r="2"/>
|
|
538
|
+
</symbol>
|
|
539
|
+
|
|
540
|
+
<!-- Handshake / trust (replaces 🤝) -->
|
|
541
|
+
<symbol id="icon-handshake" viewBox="0 0 24 24">
|
|
542
|
+
<path d="M11 17l-3.5-3.5a2.12 2.12 0 013-3L14 14"/>
|
|
543
|
+
<path d="M20.88 7.12l-3.17 3.17"/>
|
|
544
|
+
<path d="M3.12 7.12l3.17 3.17"/>
|
|
545
|
+
<path d="M2 12h4"/>
|
|
546
|
+
<path d="M18 12h4"/>
|
|
547
|
+
<path d="M7.76 4.25L12 2l4.24 2.25"/>
|
|
548
|
+
</symbol>
|
|
549
|
+
|
|
550
|
+
<!-- Leaf / organic (replaces 🌿) -->
|
|
551
|
+
<symbol id="icon-leaf" viewBox="0 0 24 24">
|
|
552
|
+
<path d="M17 8C8 10 5.9 16.17 3.82 21.34l1.89.66.95-2.3c.48.17.98.3 1.34.3C19 20 22 3 22 3c-1 0-8 0-10 2"/>
|
|
553
|
+
<path d="M7 15c2-2 5.5-3 9-3"/>
|
|
554
|
+
</symbol>
|
|
555
|
+
|
|
556
|
+
<!-- Satellite (replaces 🛰) -->
|
|
557
|
+
<symbol id="icon-satellite" viewBox="0 0 24 24">
|
|
558
|
+
<path d="M13 7L9 3 5 7l4 4"/>
|
|
559
|
+
<path d="M17 11l4 4-4 4-4-4"/>
|
|
560
|
+
<line x1="8" y1="11" x2="13" y2="16"/>
|
|
561
|
+
<line x1="3" y1="21" x2="3.01" y2="21"/>
|
|
562
|
+
<path d="M6 18a3 3 0 000 0"/>
|
|
563
|
+
<path d="M9 15a6 6 0 000 0"/>
|
|
564
|
+
</symbol>
|
|
565
|
+
|
|
566
|
+
<!-- Phone / mobile (replaces 📱) -->
|
|
567
|
+
<symbol id="icon-phone" viewBox="0 0 24 24">
|
|
568
|
+
<rect x="5" y="2" width="14" height="20" rx="2"/>
|
|
569
|
+
<line x1="12" y1="18" x2="12.01" y2="18"/>
|
|
570
|
+
</symbol>
|
|
571
|
+
|
|
572
|
+
<!-- Masks / theater (replaces 🎭) -->
|
|
573
|
+
<symbol id="icon-masks" viewBox="0 0 24 24">
|
|
574
|
+
<circle cx="12" cy="12" r="10"/>
|
|
575
|
+
<path d="M8 14s1.5 2 4 2 4-2 4-2"/>
|
|
576
|
+
<line x1="9" y1="9" x2="9.01" y2="9"/>
|
|
577
|
+
<line x1="15" y1="9" x2="15.01" y2="9"/>
|
|
578
|
+
</symbol>
|
|
579
|
+
|
|
580
|
+
<!-- Stars / cosmos (replaces 🌌) -->
|
|
581
|
+
<symbol id="icon-cosmos" viewBox="0 0 24 24">
|
|
582
|
+
<polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/>
|
|
583
|
+
</symbol>
|
|
584
|
+
|
|
585
|
+
<!-- Gem / diamond (replaces 💎) -->
|
|
586
|
+
<symbol id="icon-gem" viewBox="0 0 24 24">
|
|
587
|
+
<polygon points="6 3 18 3 22 9 12 22 2 9 6 3"/>
|
|
588
|
+
<line x1="2" y1="9" x2="22" y2="9"/>
|
|
589
|
+
<line x1="12" y1="22" x2="8" y2="9"/>
|
|
590
|
+
<line x1="12" y1="22" x2="16" y2="9"/>
|
|
591
|
+
<line x1="8" y1="9" x2="10" y2="3"/>
|
|
592
|
+
<line x1="16" y1="9" x2="14" y2="3"/>
|
|
593
|
+
</symbol>
|
|
594
|
+
|
|
595
|
+
<!-- Search / magnifying glass (replaces 🔍) -->
|
|
596
|
+
<symbol id="icon-search" viewBox="0 0 24 24">
|
|
597
|
+
<circle cx="11" cy="11" r="8"/>
|
|
598
|
+
<line x1="21" y1="21" x2="16.65" y2="16.65"/>
|
|
599
|
+
</symbol>
|
|
600
|
+
|
|
601
|
+
</svg>
|
|
602
|
+
<!-- YAKMESH-ICON-SPRITE-END -->
|
|
603
|
+
<a href="#mainContent" class="skip-link">Skip to main content</a>
|
|
604
|
+
|
|
605
|
+
<nav class="docs-sidebar" id="sidebar">
|
|
606
|
+
<a href="index.html" class="sidebar-logo">
|
|
607
|
+
<span class="logo-icon"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mountain"/></svg></span>
|
|
608
|
+
<span class="logo-text">Yakmesh</span>
|
|
609
|
+
</a>
|
|
610
|
+
<a href="/dashboard" class="sidebar-dashboard-link"><svg class="doc-icon" aria-hidden="true"><use href="#icon-dashboard"/></svg> <span>Dashboard</span></a>
|
|
611
|
+
<ul class="sidebar-nav">
|
|
612
|
+
<li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-book"/></svg> Guides</span></li>
|
|
613
|
+
<li><a href="index.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-home"/></svg> <span>Overview</span></a></li>
|
|
614
|
+
<li><a href="getting-started.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-rocket"/></svg> <span>Getting Started</span></a></li>
|
|
615
|
+
<li><a href="tutorials.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-book"/></svg> <span>Tutorials</span></a></li>
|
|
616
|
+
<li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-yak"/></svg> Protocol Stack</span></li>
|
|
617
|
+
<li><a href="yak-protocol.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-yak"/></svg> <span>YAK://</span></a></li>
|
|
618
|
+
<li><a href="annex.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-annex"/></svg> <span>ANNEX</span></a></li>
|
|
619
|
+
<li><a href="jhilke.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-jhilke"/></svg> <span>JHILKE</span></a></li>
|
|
620
|
+
<li><a href="nakpak.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-nakpak"/></svg> <span>NAKPAK</span></a></li>
|
|
621
|
+
<li><a href="namche.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-namche"/></svg> <span>NAMCHE</span></a></li>
|
|
622
|
+
<li><a href="doko.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-doko"/></svg> <span>DOKO</span></a></li>
|
|
623
|
+
<li><a href="sherpa.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-sherpa"/></svg> <span>SHERPA</span></a></li>
|
|
624
|
+
<li><a href="mandala.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mandala"/></svg> <span>MANDALA</span></a></li>
|
|
625
|
+
<li><a href="mantra.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mantra"/></svg> <span>MANTRA</span></a></li>
|
|
626
|
+
<li><a href="gumba.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-gumba"/></svg> <span>GUMBA</span></a></li>
|
|
627
|
+
<li><a href="yurt.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-yurt"/></svg> <span>YURT</span></a></li>
|
|
628
|
+
<li><a href="katha.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-katha"/></svg> <span>KATHA</span></a></li>
|
|
629
|
+
<li><a href="vani.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-vani"/></svg> <span>VANI</span></a></li>
|
|
630
|
+
<li><a href="darshan.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-darshan"/></svg> <span>DARSHAN</span></a></li>
|
|
631
|
+
<li><a href="stupa.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-stupa"/></svg> <span>STUPA</span></a></li>
|
|
632
|
+
<li><a href="lama.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-lama"/></svg> <span>LAMA</span></a></li>
|
|
633
|
+
<li><a href="mani.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mani"/></svg> <span>MANI</span></a></li>
|
|
634
|
+
<li><a href="karma.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-karma"/></svg> <span>KARMA</span></a></li>
|
|
635
|
+
<li><a href="tattva.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-tattva"/></svg> <span>TATTVA</span></a></li>
|
|
636
|
+
<li><a href="tribhuj.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-tribhuj"/></svg> <span>TRIBHUJ</span></a></li>
|
|
637
|
+
<li><a href="ypc27.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-ypc27"/></svg> <span>YPC-27</span></a></li>
|
|
638
|
+
<li><a href="sakshi.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-sakshi"/></svg> <span>SAKSHI</span></a></li>
|
|
639
|
+
<li><a href="geo-proof.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-pramaan"/></svg> <span>PRAMAAN</span></a></li>
|
|
640
|
+
<li><a href="trust-security.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-suraksha"/></svg> <span>SURAKSHA</span></a></li>
|
|
641
|
+
<li><a href="tivra.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-tivra"/></svg> <span>TIVRA</span></a></li>
|
|
642
|
+
<li><a href="prahari.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-prahari"/></svg> <span>PRAHARI</span></a></li>
|
|
643
|
+
<li><a href="dharma.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-dharma"/></svg> <span>DHARMA</span></a></li>
|
|
644
|
+
<li><a href="seva.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-seva"/></svg> <span>SEVA</span></a></li>
|
|
645
|
+
<li><a href="docs-bundle.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-granth"/></svg> <span>GRANTH</span></a></li>
|
|
646
|
+
<li><a href="api.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-api"/></svg> <span>API</span></a></li>
|
|
647
|
+
<li><a href="adapters.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-adapters"/></svg> <span>Adapters</span></a></li>
|
|
648
|
+
<li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-rocket"/></svg> Applications</span></li>
|
|
649
|
+
<li><a href="yakapp.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-yakapp"/></svg> <span>YakApp</span></a></li>
|
|
650
|
+
<li><a href="c2c.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-c2c"/></svg> <span>C2C</span></a></li>
|
|
651
|
+
<li><a href="studio.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-studio"/></svg> <span>Studio</span></a></li>
|
|
652
|
+
<li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-gear"/></svg> Infrastructure</span></li>
|
|
653
|
+
<li><a href="cli.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-terminal"/></svg> <span>CLI</span></a></li>
|
|
654
|
+
<li><a href="configuration.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-gear"/></svg> <span>Configuration</span></a></li>
|
|
655
|
+
<li><a href="mesh.html" class="active"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mandala"/></svg> <span>Mesh Network</span></a></li>
|
|
656
|
+
<li><a href="time-sources.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-mani"/></svg> <span>Time Sources</span></a></li>
|
|
657
|
+
<li><a href="webserver.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-server"/></svg> <span>Web Server</span></a></li>
|
|
658
|
+
<li><a href="advanced-systems.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-tivra"/></svg> <span>Advanced Systems</span></a></li>
|
|
659
|
+
<li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-book"/></svg> Tutorials</span></li>
|
|
660
|
+
<li><a href="gumba-tutorial.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-gumba"/></svg> <span>GUMBA Tutorial</span></a></li>
|
|
661
|
+
<li class="sidebar-section"><span><svg class="doc-icon" aria-hidden="true"><use href="#icon-quickref"/></svg> Reference</span></li>
|
|
662
|
+
<li><a href="quick-reference.html"><svg class="doc-icon" aria-hidden="true"><use href="#icon-quickref"/></svg> <span>Quick Ref</span></a></li>
|
|
663
|
+
</ul>
|
|
664
|
+
</nav>
|
|
665
|
+
|
|
666
|
+
<button class="sidebar-toggle" id="sidebarToggle" title="Toggle sidebar">
|
|
667
|
+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
668
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 19l-7-7 7-7m8 14l-7-7 7-7" />
|
|
669
|
+
</svg>
|
|
670
|
+
</button>
|
|
671
|
+
|
|
672
|
+
<!-- Mobile overlay for tap-to-close sidebar -->
|
|
673
|
+
<div class="sidebar-overlay" id="sidebarOverlay"></div>
|
|
674
|
+
|
|
675
|
+
<main class="docs-main" id="mainContent">
|
|
676
|
+
|
|
677
|
+
<div class="docs-content">
|
|
678
|
+
<!-- Page Header -->
|
|
679
|
+
<div class="flex items-center gap-3 mb-4">
|
|
680
|
+
<svg class="doc-icon hero-icon" aria-hidden="true"><use href="#icon-mandala"/></svg>
|
|
681
|
+
<div>
|
|
682
|
+
<div class="flex items-center gap-3">
|
|
683
|
+
<h1 class="text-4xl font-bold">Mesh Network</h1>
|
|
684
|
+
<span class="theme-badge text-xs px-2 py-1 rounded-full font-mono">v1.5.0</span>
|
|
685
|
+
</div>
|
|
686
|
+
<p class="theme-accent">WebSocket-based peer-to-peer mesh infrastructure</p>
|
|
687
|
+
</div>
|
|
688
|
+
</div>
|
|
689
|
+
<p class="text-xl text-mountain-300 mb-8">
|
|
690
|
+
The YAKMESH mesh network provides the communication backbone for all peer-to-peer operations.
|
|
691
|
+
Built on WebSockets with quantum-resistant cryptography, gossip protocols, and onion routing.
|
|
692
|
+
</p>
|
|
693
|
+
|
|
694
|
+
<!-- Philosophy Callout -->
|
|
695
|
+
<div class="mesh-philosophy rounded-xl p-6 mb-8">
|
|
696
|
+
<p class="text-lg text-teal-200 mb-2">
|
|
697
|
+
<strong class="theme-accent">"Your packets travel like yak caravans through hidden mountain paths"</strong>
|
|
698
|
+
</p>
|
|
699
|
+
<p class="text-mountain-300">
|
|
700
|
+
The mesh network is designed for resilience, privacy, and decentralization.
|
|
701
|
+
No central servers, no single points of failure — just nodes cooperating through cryptographic trust.
|
|
702
|
+
</p>
|
|
703
|
+
</div>
|
|
704
|
+
|
|
705
|
+
<!-- Quick Start -->
|
|
706
|
+
<h2 class="text-2xl font-bold mb-4" id="quick-start">Quick Start</h2>
|
|
707
|
+
<p class="text-mountain-300 mb-4">
|
|
708
|
+
Create and start a mesh network node:
|
|
709
|
+
</p>
|
|
710
|
+
<pre class="language-javascript mb-8"><code>import { MeshNetwork, MessageTypes } from './mesh/network.js';
|
|
711
|
+
|
|
712
|
+
// Create mesh network with your node identity
|
|
713
|
+
const mesh = new MeshNetwork(identity, {
|
|
714
|
+
wsPort: 9001, // WebSocket port (auto-fallback if in use)
|
|
715
|
+
maxPeers: 10, // Maximum concurrent peer connections
|
|
716
|
+
pingInterval: 30000, // Keep-alive ping interval (ms)
|
|
717
|
+
portRetries: 10, // Try up to 10 sequential ports
|
|
718
|
+
networkId: 'yakmesh', // Network identifier
|
|
719
|
+
networkFingerprint: fingerprint, // Code proof verification
|
|
720
|
+
});
|
|
721
|
+
|
|
722
|
+
// Start listening for connections
|
|
723
|
+
await mesh.start();
|
|
724
|
+
|
|
725
|
+
// Connect to a peer
|
|
726
|
+
await mesh.connect('ws://peer-node:9001');
|
|
727
|
+
|
|
728
|
+
// Broadcast to all peers (gossip)
|
|
729
|
+
mesh.broadcast({ type: 'custom', data: 'hello mesh!' });
|
|
730
|
+
|
|
731
|
+
// Send to specific peer
|
|
732
|
+
mesh.sendTo(nodeId, { action: 'sync', payload: data });
|
|
733
|
+
|
|
734
|
+
// Listen for messages
|
|
735
|
+
mesh.on(MessageTypes.GOSSIP, (msg, ws, nodeId) => {
|
|
736
|
+
console.log(`Gossip from ${nodeId}:`, msg.payload);
|
|
737
|
+
});
|
|
738
|
+
|
|
739
|
+
// Get connected peers
|
|
740
|
+
const peers = mesh.getPeers();
|
|
741
|
+
console.log(`Connected to ${peers.length} peers`);
|
|
742
|
+
|
|
743
|
+
// Stop mesh server
|
|
744
|
+
await mesh.stop();</code></pre>
|
|
745
|
+
|
|
746
|
+
<!-- Message Types Table -->
|
|
747
|
+
<h2 class="text-2xl font-bold mb-4" id="message-types">Message Types</h2>
|
|
748
|
+
<p class="text-mountain-300 mb-6">
|
|
749
|
+
The mesh protocol uses these message types for peer communication:
|
|
750
|
+
</p>
|
|
751
|
+
|
|
752
|
+
<div class="overflow-x-auto mb-8">
|
|
753
|
+
<table class="mesh-table rounded-lg overflow-hidden">
|
|
754
|
+
<thead>
|
|
755
|
+
<tr>
|
|
756
|
+
<th>Type</th>
|
|
757
|
+
<th>Constant</th>
|
|
758
|
+
<th>Description</th>
|
|
759
|
+
</tr>
|
|
760
|
+
</thead>
|
|
761
|
+
<tbody>
|
|
762
|
+
<tr>
|
|
763
|
+
<td><code>hello</code></td>
|
|
764
|
+
<td><code>MessageTypes.HELLO</code></td>
|
|
765
|
+
<td>Initial connection handshake with identity and network fingerprint</td>
|
|
766
|
+
</tr>
|
|
767
|
+
<tr>
|
|
768
|
+
<td><code>welcome</code></td>
|
|
769
|
+
<td><code>MessageTypes.WELCOME</code></td>
|
|
770
|
+
<td>Response to hello with peer list</td>
|
|
771
|
+
</tr>
|
|
772
|
+
<tr>
|
|
773
|
+
<td><code>ping</code></td>
|
|
774
|
+
<td><code>MessageTypes.PING</code></td>
|
|
775
|
+
<td>Keep-alive ping</td>
|
|
776
|
+
</tr>
|
|
777
|
+
<tr>
|
|
778
|
+
<td><code>pong</code></td>
|
|
779
|
+
<td><code>MessageTypes.PONG</code></td>
|
|
780
|
+
<td>Keep-alive response</td>
|
|
781
|
+
</tr>
|
|
782
|
+
<tr>
|
|
783
|
+
<td><code>peers</code></td>
|
|
784
|
+
<td><code>MessageTypes.PEERS</code></td>
|
|
785
|
+
<td>Share known peer endpoints</td>
|
|
786
|
+
</tr>
|
|
787
|
+
<tr>
|
|
788
|
+
<td><code>sync_request</code></td>
|
|
789
|
+
<td><code>MessageTypes.SYNC_REQUEST</code></td>
|
|
790
|
+
<td>Request data synchronization</td>
|
|
791
|
+
</tr>
|
|
792
|
+
<tr>
|
|
793
|
+
<td><code>sync_response</code></td>
|
|
794
|
+
<td><code>MessageTypes.SYNC_RESPONSE</code></td>
|
|
795
|
+
<td>Data sync response</td>
|
|
796
|
+
</tr>
|
|
797
|
+
<tr>
|
|
798
|
+
<td><code>replicate</code></td>
|
|
799
|
+
<td><code>MessageTypes.REPLICATE</code></td>
|
|
800
|
+
<td>Push new data to peers</td>
|
|
801
|
+
</tr>
|
|
802
|
+
<tr>
|
|
803
|
+
<td><code>gossip</code></td>
|
|
804
|
+
<td><code>MessageTypes.GOSSIP</code></td>
|
|
805
|
+
<td>Broadcast message with deduplication</td>
|
|
806
|
+
</tr>
|
|
807
|
+
</tbody>
|
|
808
|
+
</table>
|
|
809
|
+
</div>
|
|
810
|
+
|
|
811
|
+
<!-- Mesh Files Section -->
|
|
812
|
+
<h2 class="text-2xl font-bold mb-4" id="modules">Mesh Modules</h2>
|
|
813
|
+
<p class="text-mountain-300 mb-6">
|
|
814
|
+
The mesh subsystem is composed of specialized modules, each handling a critical aspect of network communication.
|
|
815
|
+
</p>
|
|
816
|
+
|
|
817
|
+
<div class="space-y-4 mb-8">
|
|
818
|
+
<!-- Network Core -->
|
|
819
|
+
<div class="module-card-network rounded-xl p-5">
|
|
820
|
+
<div class="flex items-center gap-3 mb-3">
|
|
821
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-mandala"/></svg>
|
|
822
|
+
<div>
|
|
823
|
+
<h3 class="text-xl font-bold text-teal-300">MeshNetwork</h3>
|
|
824
|
+
<span class="text-sm text-teal-400">network.js</span>
|
|
825
|
+
</div>
|
|
826
|
+
</div>
|
|
827
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
828
|
+
Core mesh network manager handling peer connections, message routing, and WebSocket server.
|
|
829
|
+
Features automatic port fallback, code proof verification, and gossip with deduplication.
|
|
830
|
+
</p>
|
|
831
|
+
<pre class="language-javascript mb-3"><code>import { MeshNetwork, MessageTypes } from './mesh/network.js';
|
|
832
|
+
|
|
833
|
+
const mesh = new MeshNetwork(identity, { wsPort: 9001 });
|
|
834
|
+
await mesh.start();
|
|
835
|
+
mesh.broadcast({ type: 'announce', data: myData });</code></pre>
|
|
836
|
+
<div class="flex flex-wrap gap-2">
|
|
837
|
+
<span class="text-xs bg-teal-900/50 text-teal-300 px-2 py-1 rounded">WebSocket</span>
|
|
838
|
+
<span class="text-xs bg-teal-900/50 text-teal-300 px-2 py-1 rounded">Gossip Protocol</span>
|
|
839
|
+
<span class="text-xs bg-teal-900/50 text-teal-300 px-2 py-1 rounded">Port Fallback</span>
|
|
840
|
+
<span class="text-xs bg-teal-900/50 text-teal-300 px-2 py-1 rounded">Code Proof</span>
|
|
841
|
+
</div>
|
|
842
|
+
</div>
|
|
843
|
+
|
|
844
|
+
<!-- ANNEX -->
|
|
845
|
+
<div class="module-card-annex rounded-xl p-5">
|
|
846
|
+
<div class="flex items-center gap-3 mb-3">
|
|
847
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-lock"/></svg>
|
|
848
|
+
<div>
|
|
849
|
+
<h3 class="text-xl font-bold text-purple-300">ANNEX</h3>
|
|
850
|
+
<span class="text-sm text-purple-400">annex.js — Autonomous Network Negotiated Encrypted eXchange</span>
|
|
851
|
+
</div>
|
|
852
|
+
</div>
|
|
853
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
854
|
+
End-to-end encrypted point-to-point channels using ML-KEM768 (Kyber) for quantum-resistant key exchange
|
|
855
|
+
and AES-256-GCM for authenticated encryption. Perfect forward secrecy via ephemeral keys.
|
|
856
|
+
</p>
|
|
857
|
+
<pre class="language-javascript mb-3"><code>import { AnnexChannel } from './mesh/annex.js';
|
|
858
|
+
|
|
859
|
+
const channel = new AnnexChannel(myIdentity, peerId);
|
|
860
|
+
await channel.establish(meshNetwork);
|
|
861
|
+
await channel.send({ secret: 'data' }); // E2E encrypted</code></pre>
|
|
862
|
+
<div class="flex flex-wrap gap-2">
|
|
863
|
+
<span class="text-xs bg-purple-900/50 text-purple-300 px-2 py-1 rounded">ML-KEM768</span>
|
|
864
|
+
<span class="text-xs bg-purple-900/50 text-purple-300 px-2 py-1 rounded">AES-256-GCM</span>
|
|
865
|
+
<span class="text-xs bg-purple-900/50 text-purple-300 px-2 py-1 rounded">ML-DSA-65</span>
|
|
866
|
+
<span class="text-xs bg-purple-900/50 text-purple-300 px-2 py-1 rounded">PFS</span>
|
|
867
|
+
</div>
|
|
868
|
+
</div>
|
|
869
|
+
|
|
870
|
+
<!-- Beacon Broadcast -->
|
|
871
|
+
<div class="module-card-beacon rounded-xl p-5">
|
|
872
|
+
<div class="flex items-center gap-3 mb-3">
|
|
873
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-signal"/></svg>
|
|
874
|
+
<div>
|
|
875
|
+
<h3 class="text-xl font-bold text-yellow-300">Beacon Broadcast</h3>
|
|
876
|
+
<span class="text-sm text-yellow-400">beacon-broadcast.js — Broadcast Emergency Alert Channel Over Network</span>
|
|
877
|
+
</div>
|
|
878
|
+
</div>
|
|
879
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
880
|
+
Priority message propagation with guaranteed delivery. Flood-based protocol with intelligent
|
|
881
|
+
deduplication, proof-of-receipt, and emergency priority levels (ROUTINE → CRITICAL).
|
|
882
|
+
</p>
|
|
883
|
+
<pre class="language-javascript mb-3"><code>import { BeaconBroadcaster, Priority } from './mesh/beacon-broadcast.js';
|
|
884
|
+
|
|
885
|
+
const beacon = new BeaconBroadcaster(mesh);
|
|
886
|
+
await beacon.broadcast(payload, {
|
|
887
|
+
priority: Priority.IMMEDIATE,
|
|
888
|
+
ttl: 10, // hop count
|
|
889
|
+
});</code></pre>
|
|
890
|
+
<div class="flex flex-wrap gap-2">
|
|
891
|
+
<span class="text-xs bg-yellow-900/50 text-yellow-300 px-2 py-1 rounded">Priority Levels</span>
|
|
892
|
+
<span class="text-xs bg-yellow-900/50 text-yellow-300 px-2 py-1 rounded">Proof-of-Receipt</span>
|
|
893
|
+
<span class="text-xs bg-yellow-900/50 text-yellow-300 px-2 py-1 rounded">TTL Control</span>
|
|
894
|
+
</div>
|
|
895
|
+
</div>
|
|
896
|
+
|
|
897
|
+
<!-- SHERPA Discovery -->
|
|
898
|
+
<div class="module-card-sherpa rounded-xl p-5">
|
|
899
|
+
<div class="flex items-center gap-3 mb-3">
|
|
900
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-mountain"/></svg>
|
|
901
|
+
<div>
|
|
902
|
+
<h3 class="text-xl font-bold text-green-300">SHERPA Discovery</h3>
|
|
903
|
+
<span class="text-sm text-green-400">sherpa-discovery.js — Secure Hidden Endpoint Resolution Path Architecture</span>
|
|
904
|
+
</div>
|
|
905
|
+
</div>
|
|
906
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
907
|
+
Decentralized peer discovery using public web endpoints as a DHT. Nodes expose
|
|
908
|
+
<code class="bg-mountain-800 px-1 rounded">/.well-known/yakmesh/beacon</code> for self-organizing peer registry.
|
|
909
|
+
No central bootstrap nodes required.
|
|
910
|
+
</p>
|
|
911
|
+
<pre class="language-javascript mb-3"><code>import { SherpaDiscovery } from './mesh/sherpa-discovery.js';
|
|
912
|
+
|
|
913
|
+
const sherpa = new SherpaDiscovery(identity, {
|
|
914
|
+
maxCrawlDepth: 3,
|
|
915
|
+
crawlInterval: 300000, // 5 minutes
|
|
916
|
+
});
|
|
917
|
+
const peers = await sherpa.discover(seedEndpoints);</code></pre>
|
|
918
|
+
<div class="flex flex-wrap gap-2">
|
|
919
|
+
<span class="text-xs bg-green-900/50 text-green-300 px-2 py-1 rounded">Web DHT</span>
|
|
920
|
+
<span class="text-xs bg-green-900/50 text-green-300 px-2 py-1 rounded">Peer Scoring</span>
|
|
921
|
+
<span class="text-xs bg-green-900/50 text-green-300 px-2 py-1 rounded">Geo-Proof v2.5</span>
|
|
922
|
+
</div>
|
|
923
|
+
</div>
|
|
924
|
+
|
|
925
|
+
<!-- NAKPAK Routing -->
|
|
926
|
+
<div class="module-card-nakpak rounded-xl p-5">
|
|
927
|
+
<div class="flex items-center gap-3 mb-3">
|
|
928
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-nakpak"/></svg>
|
|
929
|
+
<div>
|
|
930
|
+
<h3 class="text-xl font-bold text-blue-300">NAKPAK Routing</h3>
|
|
931
|
+
<span class="text-sm text-blue-400">nakpak-routing.js — Nested Anonymous Kernel for Private Authenticated Komms</span>
|
|
932
|
+
</div>
|
|
933
|
+
</div>
|
|
934
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
935
|
+
Post-quantum secure onion routing with ML-DSA-65 signatures at every layer and ML-KEM key encapsulation.
|
|
936
|
+
Multi-layer encryption with timing attack resistance through temporal padding.
|
|
937
|
+
</p>
|
|
938
|
+
<pre class="language-javascript mb-3"><code>import { NakpakRouter } from './mesh/nakpak-routing.js';
|
|
939
|
+
|
|
940
|
+
const router = new NakpakRouter(identity, mesh);
|
|
941
|
+
const circuit = await router.buildCircuit(3); // 3 hops
|
|
942
|
+
await router.sendAnonymous(circuit, payload);</code></pre>
|
|
943
|
+
<div class="flex flex-wrap gap-2">
|
|
944
|
+
<span class="text-xs bg-blue-900/50 text-blue-300 px-2 py-1 rounded">Onion Routing</span>
|
|
945
|
+
<span class="text-xs bg-blue-900/50 text-blue-300 px-2 py-1 rounded">ML-KEM768</span>
|
|
946
|
+
<span class="text-xs bg-blue-900/50 text-blue-300 px-2 py-1 rounded">Decoy Traffic</span>
|
|
947
|
+
<span class="text-xs bg-blue-900/50 text-blue-300 px-2 py-1 rounded">Fixed-Size Packets</span>
|
|
948
|
+
</div>
|
|
949
|
+
</div>
|
|
950
|
+
|
|
951
|
+
<!-- Pulse Sync -->
|
|
952
|
+
<div class="module-card-pulse rounded-xl p-5">
|
|
953
|
+
<div class="flex items-center gap-3 mb-3">
|
|
954
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-heartbeat"/></svg>
|
|
955
|
+
<div>
|
|
956
|
+
<h3 class="text-xl font-bold text-pink-300">Pulse Sync</h3>
|
|
957
|
+
<span class="text-sm text-pink-400">pulse-sync.js — Precision Universal Latency Sync Engine</span>
|
|
958
|
+
</div>
|
|
959
|
+
</div>
|
|
960
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
961
|
+
The heartbeat of the mesh network. Distributed liveness detection with temporal proofs,
|
|
962
|
+
cryptographic heartbeat chains, and partition detection through gap analysis.
|
|
963
|
+
</p>
|
|
964
|
+
<pre class="language-javascript mb-3"><code>import { PulseSync } from './mesh/pulse-sync.js';
|
|
965
|
+
|
|
966
|
+
const pulse = new PulseSync(identity, mesh, {
|
|
967
|
+
heartbeatIntervalMs: 1000,
|
|
968
|
+
missedBeatsThreshold: 5,
|
|
969
|
+
});
|
|
970
|
+
pulse.on('partition', (nodes) => handlePartition(nodes));</code></pre>
|
|
971
|
+
<div class="flex flex-wrap gap-2">
|
|
972
|
+
<span class="text-xs bg-pink-900/50 text-pink-300 px-2 py-1 rounded">Heartbeat Chains</span>
|
|
973
|
+
<span class="text-xs bg-pink-900/50 text-pink-300 px-2 py-1 rounded">Partition Detection</span>
|
|
974
|
+
<span class="text-xs bg-pink-900/50 text-pink-300 px-2 py-1 rounded">Leader Election</span>
|
|
975
|
+
</div>
|
|
976
|
+
</div>
|
|
977
|
+
|
|
978
|
+
<!-- Echo Ranging -->
|
|
979
|
+
<div class="module-card-echo rounded-xl p-5">
|
|
980
|
+
<div class="flex items-center gap-3 mb-3">
|
|
981
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-pin"/></svg>
|
|
982
|
+
<div>
|
|
983
|
+
<h3 class="text-xl font-bold text-indigo-300">Echo Ranging</h3>
|
|
984
|
+
<span class="text-sm text-indigo-400">echo-ranging.js — Encrypted Coordinate Heuristic Oracle</span>
|
|
985
|
+
</div>
|
|
986
|
+
</div>
|
|
987
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
988
|
+
Privacy-preserving network cartography. Maps mesh topology using encrypted timing probes
|
|
989
|
+
without exposing node positions. Builds virtual coordinate space from RTT measurements.
|
|
990
|
+
</p>
|
|
991
|
+
<pre class="language-javascript mb-3"><code>import { EchoRanging } from './mesh/echo-ranging.js';
|
|
992
|
+
|
|
993
|
+
const echo = new EchoRanging(identity, mesh);
|
|
994
|
+
const rtt = await echo.measureLatency(peerId);
|
|
995
|
+
const coords = echo.getVirtualCoordinates();</code></pre>
|
|
996
|
+
<div class="flex flex-wrap gap-2">
|
|
997
|
+
<span class="text-xs bg-indigo-900/50 text-indigo-300 px-2 py-1 rounded">RTT Measurement</span>
|
|
998
|
+
<span class="text-xs bg-indigo-900/50 text-indigo-300 px-2 py-1 rounded">Virtual Coords</span>
|
|
999
|
+
<span class="text-xs bg-indigo-900/50 text-indigo-300 px-2 py-1 rounded">Encrypted Probes</span>
|
|
1000
|
+
</div>
|
|
1001
|
+
</div>
|
|
1002
|
+
|
|
1003
|
+
<!-- Temporal Encoder -->
|
|
1004
|
+
<div class="module-card-temporal rounded-xl p-5">
|
|
1005
|
+
<div class="flex items-center gap-3 mb-3">
|
|
1006
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-hourglass"/></svg>
|
|
1007
|
+
<div>
|
|
1008
|
+
<h3 class="text-xl font-bold text-amber-300">Temporal Encoder</h3>
|
|
1009
|
+
<span class="text-sm text-amber-400">temporal-encoder.js — Temporal Mesh Encoding</span>
|
|
1010
|
+
</div>
|
|
1011
|
+
</div>
|
|
1012
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
1013
|
+
Novel packet resilience through temporal encoding. Instead of erasure coding across space,
|
|
1014
|
+
TME encodes data across TIME using synchronized clocks as the redundancy dimension.
|
|
1015
|
+
</p>
|
|
1016
|
+
<pre class="language-javascript mb-3"><code>import { TemporalEncoder } from './mesh/temporal-encoder.js';
|
|
1017
|
+
|
|
1018
|
+
const encoder = new TemporalEncoder({
|
|
1019
|
+
sliceIntervalNs: 50_000_000, // 50ms slices
|
|
1020
|
+
minSlicesForReconstruction: 0.6,
|
|
1021
|
+
});
|
|
1022
|
+
const slices = encoder.encode(data);</code></pre>
|
|
1023
|
+
<div class="flex flex-wrap gap-2">
|
|
1024
|
+
<span class="text-xs bg-amber-900/50 text-amber-300 px-2 py-1 rounded">Temporal Slicing</span>
|
|
1025
|
+
<span class="text-xs bg-amber-900/50 text-amber-300 px-2 py-1 rounded">Hash Chains</span>
|
|
1026
|
+
<span class="text-xs bg-amber-900/50 text-amber-300 px-2 py-1 rounded">Path Diversity</span>
|
|
1027
|
+
</div>
|
|
1028
|
+
</div>
|
|
1029
|
+
</div>
|
|
1030
|
+
|
|
1031
|
+
<!-- Security Modules -->
|
|
1032
|
+
<h2 class="text-2xl font-bold mb-4" id="security">Security Modules</h2>
|
|
1033
|
+
<p class="text-mountain-300 mb-6">
|
|
1034
|
+
Defense-in-depth protection against network attacks:
|
|
1035
|
+
</p>
|
|
1036
|
+
|
|
1037
|
+
<div class="space-y-4 mb-8">
|
|
1038
|
+
<!-- Rate Limiter -->
|
|
1039
|
+
<div class="module-card-security rounded-xl p-5">
|
|
1040
|
+
<div class="flex items-center gap-3 mb-3">
|
|
1041
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-traffic"/></svg>
|
|
1042
|
+
<div>
|
|
1043
|
+
<h3 class="text-xl font-bold text-red-300">Rate Limiter</h3>
|
|
1044
|
+
<span class="text-sm text-red-400">rate-limiter.js</span>
|
|
1045
|
+
</div>
|
|
1046
|
+
</div>
|
|
1047
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
1048
|
+
Sliding window rate limiter protecting against connection floods, handshake spam, and gossip storms.
|
|
1049
|
+
Per-IP and per-node tracking with automatic banning.
|
|
1050
|
+
</p>
|
|
1051
|
+
<pre class="language-javascript mb-3"><code>import { ConnectionRateLimiter } from './mesh/rate-limiter.js';
|
|
1052
|
+
|
|
1053
|
+
const limiter = new ConnectionRateLimiter({
|
|
1054
|
+
maxConnectionsPerMinute: 10,
|
|
1055
|
+
maxMessagesPerSecond: 50,
|
|
1056
|
+
maxHandshakesPerMinute: 5,
|
|
1057
|
+
banThreshold: 5,
|
|
1058
|
+
banDuration: 300000, // 5 minutes
|
|
1059
|
+
});
|
|
1060
|
+
|
|
1061
|
+
if (!limiter.checkConnection(ip).allowed) {
|
|
1062
|
+
ws.close(1008, 'Rate limited');
|
|
1063
|
+
}</code></pre>
|
|
1064
|
+
<div class="flex flex-wrap gap-2">
|
|
1065
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Sliding Window</span>
|
|
1066
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Auto-Ban</span>
|
|
1067
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Per-IP Tracking</span>
|
|
1068
|
+
</div>
|
|
1069
|
+
</div>
|
|
1070
|
+
|
|
1071
|
+
<!-- Message Validator -->
|
|
1072
|
+
<div class="module-card-security rounded-xl p-5">
|
|
1073
|
+
<div class="flex items-center gap-3 mb-3">
|
|
1074
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-check"/></svg>
|
|
1075
|
+
<div>
|
|
1076
|
+
<h3 class="text-xl font-bold text-red-300">Message Validator</h3>
|
|
1077
|
+
<span class="text-sm text-red-400">message-validator.js</span>
|
|
1078
|
+
</div>
|
|
1079
|
+
</div>
|
|
1080
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
1081
|
+
Validates message size and structure to prevent amplification attacks.
|
|
1082
|
+
Enforces payload limits by type: gossip (64KB), handshake (8KB), listing (128KB), data (512KB).
|
|
1083
|
+
</p>
|
|
1084
|
+
<pre class="language-javascript mb-3"><code>import { MessageValidator, SafeJsonParser } from './mesh/message-validator.js';
|
|
1085
|
+
|
|
1086
|
+
const validator = new MessageValidator();
|
|
1087
|
+
const parser = new SafeJsonParser();
|
|
1088
|
+
|
|
1089
|
+
const sizeCheck = validator.validateRaw(rawMessage, 'gossip');
|
|
1090
|
+
if (!sizeCheck.valid) reject(sizeCheck.reason);
|
|
1091
|
+
|
|
1092
|
+
const parsed = parser.parse(rawMessage);
|
|
1093
|
+
if (!parsed.success) reject(parsed.error);
|
|
1094
|
+
|
|
1095
|
+
const structCheck = validator.validateStructure(parsed.data, 'gossip');
|
|
1096
|
+
if (!structCheck.valid) reject(structCheck.reason);</code></pre>
|
|
1097
|
+
<div class="flex flex-wrap gap-2">
|
|
1098
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Size Limits</span>
|
|
1099
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Depth Check</span>
|
|
1100
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Safe JSON</span>
|
|
1101
|
+
</div>
|
|
1102
|
+
</div>
|
|
1103
|
+
|
|
1104
|
+
<!-- Replay Defense -->
|
|
1105
|
+
<div class="module-card-security rounded-xl p-5">
|
|
1106
|
+
<div class="flex items-center gap-3 mb-3">
|
|
1107
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-sync"/></svg>
|
|
1108
|
+
<div>
|
|
1109
|
+
<h3 class="text-xl font-bold text-red-300">Replay Defense</h3>
|
|
1110
|
+
<span class="text-sm text-red-400">replay-defense.js</span>
|
|
1111
|
+
</div>
|
|
1112
|
+
</div>
|
|
1113
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
1114
|
+
Multi-layer replay attack protection with nonce registry, timestamp validation, and sequence tracking.
|
|
1115
|
+
Automatically detects and rejects duplicate or out-of-window messages.
|
|
1116
|
+
</p>
|
|
1117
|
+
<pre class="language-javascript mb-3"><code>import { NonceRegistry, TimestampValidator, SequenceTracker }
|
|
1118
|
+
from './mesh/replay-defense.js';
|
|
1119
|
+
|
|
1120
|
+
const nonces = new NonceRegistry({ maxAge: 3600000 });
|
|
1121
|
+
const timestamps = new TimestampValidator({ maxAge: 600000 });
|
|
1122
|
+
const sequences = new SequenceTracker();
|
|
1123
|
+
|
|
1124
|
+
// Generate nonce for outgoing message
|
|
1125
|
+
const nonce = nonces.generate();
|
|
1126
|
+
|
|
1127
|
+
// Validate incoming message
|
|
1128
|
+
const nonceOk = nonces.validate(msg.nonce);
|
|
1129
|
+
const timeOk = timestamps.validate(msg.timestamp);
|
|
1130
|
+
const seqOk = sequences.validate(msg.senderId, msg.sequence);</code></pre>
|
|
1131
|
+
<div class="flex flex-wrap gap-2">
|
|
1132
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Nonce Registry</span>
|
|
1133
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Timestamp</span>
|
|
1134
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Sequence Window</span>
|
|
1135
|
+
</div>
|
|
1136
|
+
</div>
|
|
1137
|
+
|
|
1138
|
+
<!-- Sybil Defense -->
|
|
1139
|
+
<div class="module-card-security rounded-xl p-5">
|
|
1140
|
+
<div class="flex items-center gap-3 mb-3">
|
|
1141
|
+
<svg class="doc-icon card-icon" aria-hidden="true"><use href="#icon-users"/></svg>
|
|
1142
|
+
<div>
|
|
1143
|
+
<h3 class="text-xl font-bold text-red-300">Sybil Defense</h3>
|
|
1144
|
+
<span class="text-sm text-red-400">sybil-defense.js</span>
|
|
1145
|
+
</div>
|
|
1146
|
+
</div>
|
|
1147
|
+
<p class="text-mountain-300 text-sm mb-3">
|
|
1148
|
+
Protection against Sybil attacks through NAVR (proof-of-work challenges),
|
|
1149
|
+
reputation tracking, and subnet diversity enforcement.
|
|
1150
|
+
</p>
|
|
1151
|
+
<pre class="language-javascript mb-3"><code>import { NAVR, ReputationTracker, SubnetDiversity }
|
|
1152
|
+
from './mesh/sybil-defense.js';
|
|
1153
|
+
|
|
1154
|
+
const navr = new NAVR({ difficulty: 16 });
|
|
1155
|
+
const reputation = new ReputationTracker();
|
|
1156
|
+
const subnets = new SubnetDiversity({ maxPerSubnet: 3 });
|
|
1157
|
+
|
|
1158
|
+
// Challenge new peer
|
|
1159
|
+
const challenge = navr.createChallenge(peerId);
|
|
1160
|
+
// Peer solves and returns solution
|
|
1161
|
+
const verified = navr.verify(challenge, solution);
|
|
1162
|
+
|
|
1163
|
+
// Track reputation
|
|
1164
|
+
reputation.registerNode(peerId, solution);
|
|
1165
|
+
reputation.reportGoodBehavior(peerId);
|
|
1166
|
+
const trust = reputation.getTrustLevel(peerId); // 'trusted'|'normal'|'suspicious'|'banned'
|
|
1167
|
+
|
|
1168
|
+
// Check subnet diversity
|
|
1169
|
+
if (!subnets.allowConnection(peerIp).allowed) {
|
|
1170
|
+
reject('Too many connections from this subnet');
|
|
1171
|
+
}</code></pre>
|
|
1172
|
+
<div class="flex flex-wrap gap-2">
|
|
1173
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">NAVR PoW</span>
|
|
1174
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Reputation</span>
|
|
1175
|
+
<span class="text-xs bg-red-900/50 text-red-300 px-2 py-1 rounded">Subnet Diversity</span>
|
|
1176
|
+
</div>
|
|
1177
|
+
</div>
|
|
1178
|
+
</div>
|
|
1179
|
+
|
|
1180
|
+
<!-- Network Features -->
|
|
1181
|
+
<h2 class="text-2xl font-bold mb-4" id="features">Key Features</h2>
|
|
1182
|
+
|
|
1183
|
+
<div class="grid md:grid-cols-2 gap-4 mb-8">
|
|
1184
|
+
<div class="bg-mountain-800 rounded-xl p-5">
|
|
1185
|
+
<p class="font-semibold text-teal-400 mb-2"><svg class="doc-icon inline-icon" width="24" height="24" aria-hidden="true"><use href="#icon-sync"/></svg> Automatic Port Fallback</p>
|
|
1186
|
+
<p class="text-mountain-300 text-sm">
|
|
1187
|
+
If the configured WebSocket port is in use, automatically tries sequential ports
|
|
1188
|
+
up to <code class="bg-mountain-700 px-1 rounded">portRetries</code> times.
|
|
1189
|
+
</p>
|
|
1190
|
+
</div>
|
|
1191
|
+
<div class="bg-mountain-800 rounded-xl p-5">
|
|
1192
|
+
<p class="font-semibold text-teal-400 mb-2"><svg class="doc-icon inline-icon" width="24" height="24" aria-hidden="true"><use href="#icon-lock"/></svg> Code Proof Verification</p>
|
|
1193
|
+
<p class="text-mountain-300 text-sm">
|
|
1194
|
+
Network fingerprint exchanged during handshake. Nodes running different codebases
|
|
1195
|
+
are automatically rejected.
|
|
1196
|
+
</p>
|
|
1197
|
+
</div>
|
|
1198
|
+
<div class="bg-mountain-800 rounded-xl p-5">
|
|
1199
|
+
<p class="font-semibold text-teal-400 mb-2"><svg class="doc-icon inline-icon" width="24" height="24" aria-hidden="true"><use href="#icon-megaphone"/></svg> Gossip Deduplication</p>
|
|
1200
|
+
<p class="text-mountain-300 text-sm">
|
|
1201
|
+
Messages include unique IDs tracked in <code class="bg-mountain-700 px-1 rounded">seenMessages</code>
|
|
1202
|
+
set. Prevents infinite broadcast loops.
|
|
1203
|
+
</p>
|
|
1204
|
+
</div>
|
|
1205
|
+
<div class="bg-mountain-800 rounded-xl p-5">
|
|
1206
|
+
<p class="font-semibold text-teal-400 mb-2"><svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-pen"/></svg> Signed Messages</p>
|
|
1207
|
+
<p class="text-mountain-300 text-sm">
|
|
1208
|
+
All outgoing messages are signed with the node's identity using ML-DSA-65.
|
|
1209
|
+
Receivers verify authenticity.
|
|
1210
|
+
</p>
|
|
1211
|
+
</div>
|
|
1212
|
+
</div>
|
|
1213
|
+
|
|
1214
|
+
<!-- Configuration Options -->
|
|
1215
|
+
<h2 class="text-2xl font-bold mb-4" id="configuration">Configuration</h2>
|
|
1216
|
+
<p class="text-mountain-300 mb-4">
|
|
1217
|
+
MeshNetwork constructor options:
|
|
1218
|
+
</p>
|
|
1219
|
+
<div class="overflow-x-auto mb-8">
|
|
1220
|
+
<table class="mesh-table rounded-lg overflow-hidden">
|
|
1221
|
+
<thead>
|
|
1222
|
+
<tr>
|
|
1223
|
+
<th>Option</th>
|
|
1224
|
+
<th>Default</th>
|
|
1225
|
+
<th>Description</th>
|
|
1226
|
+
</tr>
|
|
1227
|
+
</thead>
|
|
1228
|
+
<tbody>
|
|
1229
|
+
<tr>
|
|
1230
|
+
<td><code>wsPort</code></td>
|
|
1231
|
+
<td><code>9001</code></td>
|
|
1232
|
+
<td>WebSocket server port</td>
|
|
1233
|
+
</tr>
|
|
1234
|
+
<tr>
|
|
1235
|
+
<td><code>maxPeers</code></td>
|
|
1236
|
+
<td><code>10</code></td>
|
|
1237
|
+
<td>Maximum concurrent peer connections</td>
|
|
1238
|
+
</tr>
|
|
1239
|
+
<tr>
|
|
1240
|
+
<td><code>pingInterval</code></td>
|
|
1241
|
+
<td><code>30000</code></td>
|
|
1242
|
+
<td>Keep-alive ping interval (ms)</td>
|
|
1243
|
+
</tr>
|
|
1244
|
+
<tr>
|
|
1245
|
+
<td><code>portRetries</code></td>
|
|
1246
|
+
<td><code>10</code></td>
|
|
1247
|
+
<td>Number of sequential ports to try if base port is in use</td>
|
|
1248
|
+
</tr>
|
|
1249
|
+
<tr>
|
|
1250
|
+
<td><code>networkId</code></td>
|
|
1251
|
+
<td><code>null</code></td>
|
|
1252
|
+
<td>Network identifier for code proof</td>
|
|
1253
|
+
</tr>
|
|
1254
|
+
<tr>
|
|
1255
|
+
<td><code>networkFingerprint</code></td>
|
|
1256
|
+
<td><code>null</code></td>
|
|
1257
|
+
<td>Codebase hash for peer verification</td>
|
|
1258
|
+
</tr>
|
|
1259
|
+
<tr>
|
|
1260
|
+
<td><code>publicHost</code></td>
|
|
1261
|
+
<td><code>null</code></td>
|
|
1262
|
+
<td>Public hostname for endpoint advertisement</td>
|
|
1263
|
+
</tr>
|
|
1264
|
+
<tr>
|
|
1265
|
+
<td><code>rateLimiter</code></td>
|
|
1266
|
+
<td><code>{}</code></td>
|
|
1267
|
+
<td>Rate limiter configuration object</td>
|
|
1268
|
+
</tr>
|
|
1269
|
+
</tbody>
|
|
1270
|
+
</table>
|
|
1271
|
+
</div>
|
|
1272
|
+
|
|
1273
|
+
<!-- MeshNetwork API -->
|
|
1274
|
+
<h2 class="text-2xl font-bold mb-4" id="api">MeshNetwork API</h2>
|
|
1275
|
+
<div class="overflow-x-auto mb-8">
|
|
1276
|
+
<table class="mesh-table rounded-lg overflow-hidden">
|
|
1277
|
+
<thead>
|
|
1278
|
+
<tr>
|
|
1279
|
+
<th>Method</th>
|
|
1280
|
+
<th>Description</th>
|
|
1281
|
+
</tr>
|
|
1282
|
+
</thead>
|
|
1283
|
+
<tbody>
|
|
1284
|
+
<tr>
|
|
1285
|
+
<td><code>start()</code></td>
|
|
1286
|
+
<td>Start WebSocket server with automatic port fallback</td>
|
|
1287
|
+
</tr>
|
|
1288
|
+
<tr>
|
|
1289
|
+
<td><code>connect(endpoint)</code></td>
|
|
1290
|
+
<td>Connect to a peer node, returns identity on WELCOME</td>
|
|
1291
|
+
</tr>
|
|
1292
|
+
<tr>
|
|
1293
|
+
<td><code>broadcast(message)</code></td>
|
|
1294
|
+
<td>Send gossip message to all connected peers</td>
|
|
1295
|
+
</tr>
|
|
1296
|
+
<tr>
|
|
1297
|
+
<td><code>sendTo(nodeId, message)</code></td>
|
|
1298
|
+
<td>Send direct message to specific peer</td>
|
|
1299
|
+
</tr>
|
|
1300
|
+
<tr>
|
|
1301
|
+
<td><code>on(type, handler)</code></td>
|
|
1302
|
+
<td>Register message handler for type</td>
|
|
1303
|
+
</tr>
|
|
1304
|
+
<tr>
|
|
1305
|
+
<td><code>off(type, handler)</code></td>
|
|
1306
|
+
<td>Remove message handler</td>
|
|
1307
|
+
</tr>
|
|
1308
|
+
<tr>
|
|
1309
|
+
<td><code>emit(type, ...args)</code></td>
|
|
1310
|
+
<td>Emit event to registered handlers</td>
|
|
1311
|
+
</tr>
|
|
1312
|
+
<tr>
|
|
1313
|
+
<td><code>isConnectedTo(nodeId)</code></td>
|
|
1314
|
+
<td>Check if connected to a specific node</td>
|
|
1315
|
+
</tr>
|
|
1316
|
+
<tr>
|
|
1317
|
+
<td><code>getPeers()</code></td>
|
|
1318
|
+
<td>Get list of connected peers with metadata</td>
|
|
1319
|
+
</tr>
|
|
1320
|
+
<tr>
|
|
1321
|
+
<td><code>getPublicEndpoint()</code></td>
|
|
1322
|
+
<td>Get this node's public WebSocket endpoint</td>
|
|
1323
|
+
</tr>
|
|
1324
|
+
<tr>
|
|
1325
|
+
<td><code>stop()</code></td>
|
|
1326
|
+
<td>Stop server and close all connections</td>
|
|
1327
|
+
</tr>
|
|
1328
|
+
</tbody>
|
|
1329
|
+
</table>
|
|
1330
|
+
</div>
|
|
1331
|
+
|
|
1332
|
+
<!-- Related Documentation -->
|
|
1333
|
+
<div class="bg-mountain-800 border theme-border rounded-xl p-6 mt-8">
|
|
1334
|
+
<h3 class="text-lg font-semibold mb-4">Related Documentation</h3>
|
|
1335
|
+
<ul class="space-y-3 text-mountain-300">
|
|
1336
|
+
<li class="flex items-center gap-2">
|
|
1337
|
+
<svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-sherpa"/></svg>
|
|
1338
|
+
<a href="sherpa.html" class="theme-accent theme-accent-hover">SHERPA</a>
|
|
1339
|
+
<span class="text-mountain-400 text-sm">— Detailed peer discovery documentation</span>
|
|
1340
|
+
</li>
|
|
1341
|
+
<li class="flex items-center gap-2">
|
|
1342
|
+
<svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-nakpak"/></svg>
|
|
1343
|
+
<a href="nakpak.html" class="theme-accent theme-accent-hover">NAKPAK</a>
|
|
1344
|
+
<span class="text-mountain-400 text-sm">— Onion routing deep dive</span>
|
|
1345
|
+
</li>
|
|
1346
|
+
<li class="flex items-center gap-2">
|
|
1347
|
+
<svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-annex"/></svg>
|
|
1348
|
+
<a href="annex.html" class="theme-accent theme-accent-hover">ANNEX</a>
|
|
1349
|
+
<span class="text-mountain-400 text-sm">— Encrypted P2P channels</span>
|
|
1350
|
+
</li>
|
|
1351
|
+
<li class="flex items-center gap-2">
|
|
1352
|
+
<svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-tattva"/></svg>
|
|
1353
|
+
<a href="tattva.html" class="theme-accent theme-accent-hover">TATTVA</a>
|
|
1354
|
+
<span class="text-mountain-400 text-sm">— Code proof and validation</span>
|
|
1355
|
+
</li>
|
|
1356
|
+
<li class="flex items-center gap-2">
|
|
1357
|
+
<svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-suraksha"/></svg>
|
|
1358
|
+
<a href="trust-security.html" class="theme-accent theme-accent-hover">SURAKSHA</a>
|
|
1359
|
+
<span class="text-mountain-400 text-sm">— Trust scoring and verification</span>
|
|
1360
|
+
</li>
|
|
1361
|
+
<li class="flex items-center gap-2">
|
|
1362
|
+
<svg class="doc-icon inline-icon" aria-hidden="true"><use href="#icon-gear"/></svg>
|
|
1363
|
+
<a href="configuration.html" class="theme-accent theme-accent-hover">Configuration</a>
|
|
1364
|
+
<span class="text-mountain-400 text-sm">— Full configuration reference</span>
|
|
1365
|
+
</li>
|
|
1366
|
+
</ul>
|
|
1367
|
+
</div>
|
|
1368
|
+
|
|
1369
|
+
<!-- Journey Navigation -->
|
|
1370
|
+
<div class="border-t border-mountain-700 mt-12 pt-8">
|
|
1371
|
+
<h2 class="text-xl font-bold mb-6">Continue the Journey</h2>
|
|
1372
|
+
<div class="flex flex-col sm:flex-row gap-4">
|
|
1373
|
+
<a href="configuration.html" class="flex-1 block bg-mountain-800 border border-mountain-700 rounded-xl p-4 hover:border-theme-accent transition group">
|
|
1374
|
+
<div class="text-xs text-mountain-400 mb-1">← Previous</div>
|
|
1375
|
+
<div class="flex items-center gap-2">
|
|
1376
|
+
<svg class="doc-icon journey-icon" aria-hidden="true"><use href="#icon-gear"/></svg>
|
|
1377
|
+
<span class="font-semibold group-hover:text-theme-accent">Configuration</span>
|
|
1378
|
+
</div>
|
|
1379
|
+
<p class="text-mountain-400 text-sm mt-1">Node configuration reference</p>
|
|
1380
|
+
</a>
|
|
1381
|
+
<a href="time-sources.html" class="flex-1 block bg-mountain-800 border border-theme-primary rounded-xl p-4 hover:border-theme-accent transition group">
|
|
1382
|
+
<div class="text-xs text-mountain-400 mb-1">Next →</div>
|
|
1383
|
+
<div class="flex items-center gap-2">
|
|
1384
|
+
<svg class="doc-icon journey-icon" aria-hidden="true"><use href="#icon-mani"/></svg>
|
|
1385
|
+
<span class="font-semibold group-hover:text-theme-accent">Time Sources</span>
|
|
1386
|
+
</div>
|
|
1387
|
+
<p class="text-mountain-400 text-sm mt-1">Precision time synchronization</p>
|
|
1388
|
+
</a>
|
|
1389
|
+
</div>
|
|
1390
|
+
</div>
|
|
1391
|
+
</main>
|
|
1392
|
+
|
|
1393
|
+
<footer class="docs-footer">
|
|
1394
|
+
<p>© 2026 YAKMESH™</p>
|
|
1395
|
+
</footer><!-- Scripts -->
|
|
1396
|
+
<script src="prism.min.js" defer></script>
|
|
1397
|
+
<script src="prism-javascript.min.js" defer></script>
|
|
1398
|
+
<script src="prism-bash.min.js" defer></script>
|
|
1399
|
+
<script src="prism-json.min.js" defer></script>
|
|
1400
|
+
<script src="docs.js" defer></script>
|
|
1401
|
+
|
|
1402
|
+
|
|
1403
|
+
</body>
|
|
1404
|
+
</html>
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|