-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocs.html
More file actions
3437 lines (2972 loc) · 172 KB
/
Copy pathdocs.html
File metadata and controls
3437 lines (2972 loc) · 172 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Space Data Network Documentation - Guides for running full nodes, edge relays, using the JavaScript SDK, and API reference.">
<meta name="theme-color" content="#000000">
<title>Documentation - Space Data Network</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><circle cx='50' cy='50' r='45' fill='none' stroke='%23fff' stroke-width='4'/><ellipse cx='50' cy='50' rx='45' ry='18' fill='none' stroke='%23fff' stroke-width='2'/><ellipse cx='50' cy='50' rx='45' ry='18' fill='none' stroke='%23fff' stroke-width='2' transform='rotate(60 50 50)'/><ellipse cx='50' cy='50' rx='45' ry='18' fill='none' stroke='%23fff' stroke-width='2' transform='rotate(120 50 50)'/><circle cx='50' cy='50' r='8' fill='%23fff'/></svg>">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="network-ecosystem-demo.css">
<style>
*, *::before, *::after {
box-sizing: border-box;
margin: 0;
padding: 0;
}
:root {
--bg: #000000;
--text-primary: #F5F5F7;
--text-secondary: rgba(255, 255, 255, 0.8);
--text-muted: rgba(134, 134, 139, 1.0);
--ui-bg: rgba(42, 42, 45, 0.72);
--ui-hover: rgba(66, 66, 69, 0.72);
--ui-border: rgba(134, 134, 139, 0.3);
--nav-bg: rgba(22, 22, 23, 0.95);
--code-bg: rgba(30, 30, 35, 0.9);
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
--font-mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
--radius: 12px;
--sidebar-width: 260px;
}
html {
scroll-behavior: smooth;
overflow-x: hidden;
}
body {
font-family: var(--font-sans);
background: var(--bg);
color: var(--text-primary);
line-height: 1.7;
-webkit-font-smoothing: antialiased;
overflow-x: hidden;
}
/* Dark Theme Scrollbars */
::-webkit-scrollbar {
width: 12px;
height: 12px;
}
::-webkit-scrollbar-track {
background: rgba(30, 30, 35, 0.5);
border-radius: 10px;
margin: 4px;
}
::-webkit-scrollbar-thumb {
background: rgba(96, 165, 250, 0.3);
border-radius: 10px;
border: 2px solid rgba(30, 30, 35, 0.5);
}
::-webkit-scrollbar-thumb:hover {
background: rgba(96, 165, 250, 0.5);
}
::-webkit-scrollbar-corner {
background: rgba(30, 30, 35, 0.5);
}
/* Firefox scrollbar styling */
* {
scrollbar-width: thin;
scrollbar-color: rgba(96, 165, 250, 0.3) rgba(30, 30, 35, 0.5);
}
a {
color: #60a5fa;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
/* Navigation */
nav {
position: fixed;
top: 0;
left: 0;
right: 0;
height: 52px;
z-index: 100;
background: var(--nav-bg);
backdrop-filter: blur(20px);
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.nav-content {
max-width: 1400px;
margin: 0 auto;
height: 100%;
padding: 0 24px;
display: flex;
align-items: center;
justify-content: space-between;
}
.logo {
display: flex;
align-items: center;
gap: 10px;
font-weight: 600;
font-size: 15px;
color: var(--text-primary);
}
.logo svg {
width: 24px;
height: 24px;
}
.nav-links {
display: flex;
gap: 24px;
}
.nav-links a {
color: var(--text-secondary);
font-size: 14px;
font-weight: 500;
}
.nav-links a:hover {
color: var(--text-primary);
text-decoration: none;
}
/* Layout */
.layout {
display: flex;
margin-top: 52px;
width: 100%;
overflow-x: hidden;
}
/* Sidebar */
.sidebar {
position: fixed;
top: 52px;
left: 0;
width: var(--sidebar-width);
height: calc(100vh - 52px);
overflow-y: auto;
padding: 24px;
background: rgba(15, 15, 18, 0.95);
border-right: 1px solid rgba(255, 255, 255, 0.1);
}
.sidebar-section {
margin-bottom: 24px;
}
.sidebar-title {
font-size: 11px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
color: var(--text-muted);
margin-bottom: 12px;
}
.sidebar-links {
list-style: none;
}
.sidebar-links li {
margin-bottom: 4px;
}
.sidebar-links a {
display: block;
padding: 8px 12px;
font-size: 14px;
color: var(--text-secondary);
border-radius: 6px;
transition: all 0.15s;
}
.sidebar-links a:hover {
background: var(--ui-bg);
color: var(--text-primary);
text-decoration: none;
}
.sidebar-links a.active {
background: rgba(96, 165, 250, 0.15);
color: #60a5fa;
}
/* Main Content */
.main {
margin-left: var(--sidebar-width);
flex: 1;
padding: 48px;
max-width: calc(100vw - var(--sidebar-width));
width: 100%;
box-sizing: border-box;
overflow-x: hidden;
}
/* Typography */
h1 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 16px;
letter-spacing: -0.02em;
}
h2 {
font-size: 1.75rem;
font-weight: 600;
margin-top: 48px;
margin-bottom: 16px;
padding-top: 24px;
border-top: 1px solid rgba(255, 255, 255, 0.1);
letter-spacing: -0.01em;
}
h2:first-of-type {
margin-top: 32px;
border-top: none;
padding-top: 0;
}
h3 {
font-size: 1.25rem;
font-weight: 600;
margin-top: 32px;
margin-bottom: 12px;
}
h4 {
font-size: 1rem;
font-weight: 600;
margin-top: 24px;
margin-bottom: 8px;
}
p {
margin-bottom: 16px;
color: var(--text-secondary);
}
.lead {
font-size: 1.2rem;
color: var(--text-muted);
margin-bottom: 32px;
}
/* Code blocks */
pre {
background: var(--code-bg);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: var(--radius);
padding: 16px 20px;
overflow-x: auto;
margin-bottom: 24px;
font-family: var(--font-mono);
font-size: 13px;
line-height: 1.6;
max-width: 100%;
}
code {
font-family: var(--font-mono);
font-size: 0.9em;
background: rgba(255, 255, 255, 0.08);
padding: 2px 6px;
border-radius: 4px;
word-break: break-word;
}
pre code {
background: none;
padding: 0;
font-size: inherit;
}
/* Tables */
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 24px;
font-size: 14px;
table-layout: auto;
overflow-x: auto;
display: block;
max-width: 100%;
}
table tbody {
display: table;
width: 100%;
}
table thead {
display: table;
width: 100%;
}
th, td {
text-align: left;
padding: 12px 16px;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
th {
font-weight: 600;
color: var(--text-primary);
background: rgba(255, 255, 255, 0.03);
}
td {
color: var(--text-secondary);
}
/* Lists */
ul, ol {
margin-bottom: 16px;
padding-left: 24px;
color: var(--text-secondary);
}
li {
margin-bottom: 8px;
}
/* Callouts */
.callout {
padding: 16px 20px;
border-radius: var(--radius);
margin-bottom: 24px;
border: 1px solid;
}
.callout-info {
background: rgba(96, 165, 250, 0.1);
border-color: rgba(96, 165, 250, 0.3);
}
.callout-warning {
background: rgba(251, 191, 36, 0.1);
border-color: rgba(251, 191, 36, 0.3);
}
.callout-title {
font-weight: 600;
font-size: 14px;
margin-bottom: 8px;
color: var(--text-primary);
}
.callout p {
margin: 0;
font-size: 14px;
}
/* Section anchors */
.doc-section {
scroll-margin-top: 80px;
}
#network-ecosystem {
scroll-margin-top: 80px;
}
/* Responsive */
@media (max-width: 1024px) {
.sidebar {
display: none;
}
.main {
margin-left: 0;
padding: 24px;
max-width: 100vw;
overflow-x: hidden;
}
}
/* Mobile nav toggle */
.mobile-menu-btn {
display: none;
background: none;
border: none;
color: var(--text-primary);
cursor: pointer;
padding: 8px;
}
.mobile-menu-btn svg {
width: 24px;
height: 24px;
}
@media (max-width: 1024px) {
.mobile-menu-btn {
display: block;
}
.nav-links {
display: none;
}
.sidebar.open {
display: block;
z-index: 99;
}
.sidebar-overlay {
display: none;
position: fixed;
top: 52px;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 98;
}
.sidebar-overlay.open {
display: block;
}
h1 {
font-size: 1.75rem;
}
h2 {
font-size: 1.35rem;
}
pre {
font-size: 12px;
padding: 12px;
}
table {
font-size: 12px;
}
th, td {
padding: 8px 10px;
}
p, li {
overflow-wrap: break-word;
word-wrap: break-word;
}
}
@media (max-width: 480px) {
.main {
padding: 12px;
}
h1 {
font-size: 1.5rem;
}
h2 {
font-size: 1.2rem;
}
pre {
font-size: 11px;
padding: 10px;
border-radius: 8px;
}
.qs-tabs {
flex-wrap: wrap;
}
.qs-tab {
padding: 8px 14px;
font-size: 13px;
}
.nav-content {
padding: 0 12px;
}
.logo span {
font-size: 13px;
}
}
/* Quick Start Tabs */
.qs-tabs {
display: flex;
gap: 0;
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
margin-bottom: 24px;
}
.qs-tab {
padding: 10px 20px;
background: none;
border: none;
border-bottom: 2px solid transparent;
color: var(--text-muted);
font-family: var(--font-sans);
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.15s;
}
.qs-tab:hover {
color: var(--text-secondary);
}
.qs-tab.active {
color: #60a5fa;
border-bottom-color: #60a5fa;
}
.qs-panel {
display: none;
}
.qs-panel.active {
display: block;
}
</style>
</head>
<body>
<nav>
<div class="nav-content">
<a href="index.html" class="logo">
<svg viewBox="0 0 100 100" fill="none" stroke="currentColor" stroke-width="4">
<circle cx="50" cy="50" r="45"/>
<ellipse cx="50" cy="50" rx="45" ry="18" stroke-width="2"/>
<ellipse cx="50" cy="50" rx="45" ry="18" stroke-width="2" transform="rotate(60 50 50)"/>
<ellipse cx="50" cy="50" rx="45" ry="18" stroke-width="2" transform="rotate(120 50 50)"/>
<circle cx="50" cy="50" r="8" fill="currentColor" stroke="none"/>
</svg>
<span>Space Data Network</span>
</a>
<div class="nav-links">
<a href="index.html">Home</a>
<a href="index.html#technology">Technology</a>
<a href="index.html#architecture">Architecture</a>
<a href="https://github.com/DigitalArsenal/space-data-network">GitHub</a>
</div>
<button class="mobile-menu-btn" onclick="toggleSidebar()" aria-label="Toggle menu">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><line x1="3" y1="6" x2="21" y2="6"/><line x1="3" y1="12" x2="21" y2="12"/><line x1="3" y1="18" x2="21" y2="18"/></svg>
</button>
</div>
</nav>
<div class="sidebar-overlay" id="sidebarOverlay" onclick="toggleSidebar()"></div>
<div class="layout">
<aside class="sidebar" id="sidebar">
<div class="sidebar-section">
<div class="sidebar-title">Getting Started</div>
<ul class="sidebar-links">
<li><a href="onboarding.html">Onboarding</a></li>
<li><a href="#overview">Overview</a></li>
<li><a href="#network-ecosystem">Network Ecosystem</a></li>
<li><a href="#quick-start">Quick Start</a></li>
<li><a href="#installation">Installation</a></li>
</ul>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Node Setup</div>
<ul class="sidebar-links">
<li><a href="#full-node">Full Node</a></li>
<li><a href="#edge-relay">Edge Relay</a></li>
<li><a href="#docker">Docker Deployment</a></li>
<li><a href="#cli-commands">CLI Commands</a></li>
</ul>
</div>
<div class="sidebar-section">
<div class="sidebar-title">JavaScript SDK</div>
<ul class="sidebar-links">
<li><a href="#sdk-install">Installation</a></li>
<li><a href="#sdk-usage">Usage</a></li>
<li><a href="#sdk-storefront-delivery">Storefront & Module Delivery</a></li>
<li><a href="#sdk-identity">Identity</a></li>
<li><a href="#sdk-astrodynamics">Astrodynamics</a></li>
</ul>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Identity & Cryptography</div>
<ul class="sidebar-links">
<li><a href="#identity-overview">Key Derivation</a></li>
<li><a href="#identity-secp256k1">Secp256k1 Identity</a></li>
<li><a href="#identity-signing">Signing & Auth</a></li>
<li><a href="#identity-epm-vcard">Signed EPM/vCards</a></li>
<li><a href="#identity-encryption">Encryption</a></li>
<li><a href="#key-security">Key Security</a></li>
<li><a href="#identity-pinning">IPFS Pinning</a></li>
</ul>
</div>
<div class="sidebar-section">
<div class="sidebar-title">API Reference</div>
<ul class="sidebar-links">
<li><a href="#api-rest">REST API</a></li>
<li><a href="#api-auth">Wallet Authentication</a></li>
<li><a href="#api-channels">Channels</a></li>
<li><a href="#api-module-delivery">Module Delivery</a></li>
<li><a href="#api-websocket">WebSocket</a></li>
<li><a href="#api-errors">Errors</a></li>
</ul>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Schemas</div>
<ul class="sidebar-links">
<li><a href="#schemas-overview">Overview</a></li>
<li><a href="#schemas-orbit">Orbit Schemas</a></li>
<li><a href="#schemas-conjunction">Conjunction Schemas</a></li>
<li><a href="#schemas-entity">Entity Schemas</a></li>
</ul>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Go Server SDK</div>
<ul class="sidebar-links">
<li><a href="#go-builders">FlatBuffer Builders</a></li>
<li><a href="#go-vcard">vCard/QR Conversion</a></li>
<li><a href="#go-tipqueue">PNM Tip/Queue</a></li>
</ul>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Data Flow</div>
<ul class="sidebar-links">
<li><a href="#dataflow-overview">Architecture Overview</a></li>
<li><a href="#dataflow-discovery">Peer Discovery (DHT)</a></li>
<li><a href="#dataflow-flatbuffers">FlatBuffers Format</a></li>
<li><a href="#dataflow-flatsql">FlatSQL Storage</a></li>
<li><a href="#dataflow-pnm">PNM Notifications</a></li>
<li><a href="#dataflow-dpm">DPM Manifests</a></li>
<li><a href="#dataflow-streaming">Streaming & Channels</a></li>
<li><a href="#dataflow-encryption">Encrypted Messages</a></li>
<li><a href="#dataflow-identity">Wallet Identity</a></li>
<li><a href="#dataflow-browser">Browser Nodes</a></li>
<li><a href="#dataflow-plugins">Plugin System</a></li>
</ul>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Testing</div>
<ul class="sidebar-links">
<li><a href="#testing-throughput">Throughput Benchmarks</a></li>
<li><a href="#testing-roundtrip">Roundtrip Tests</a></li>
<li><a href="#testing-epm-qr">EPM/QR Conversion</a></li>
</ul>
</div>
</aside>
<main class="main">
<h1>Documentation</h1>
<p class="lead">Complete guides for running SDN nodes, using the JavaScript SDK, and integrating with the API.</p>
<!-- Getting Started -->
<section id="overview" class="doc-section">
<h2>Overview</h2>
<p>Space Data Network (SDN) is a decentralized peer-to-peer network for exchanging standardized space situational awareness data. Built on <a href="https://libp2p.io" target="_blank" style="color: inherit; text-decoration: underline;">libp2p</a> with FlatBuffers serialization, SDN enables real-time sharing of orbital data, conjunction warnings, and tracking information.</p>
<h3 id="network-ecosystem">Network Ecosystem</h3>
<p>The interactive sandbox below shows providers publishing signed SDS data, PNMs announcing current artifacts, DPMs describing authoritative product sets, PLG module listings and delivery, peer subscriptions, signature verification, encryption grants, and pinning, archive, and consumer nodes moving artifacts by CID.</p>
<div class="network-ecosystem-intro">
<p>Use the sandbox to walk through the same network mechanics used by production SDN: providers publish signed SDS data, PNMs announce current artifacts, DPMs describe authoritative products, PLGs describe modules, and peers subscribe, verify, decrypt, and pin by CID.</p>
<ul class="network-ecosystem-summary" aria-label="Network ecosystem demo modes and shapes">
<li><strong>Sandbox mode</strong> runs deterministic browser-only mechanics for local exploration.</li>
<li><strong>Live mode</strong> shows the production connection path when live providers are available.</li>
<li><strong>Circle</strong> nodes, <strong>Triangle</strong> data, <strong>Square</strong> modules, and <strong>Diamond</strong> verification artifacts share the same visual language as the interactive graph.</li>
</ul>
</div>
<div
id="network-ecosystem-demo"
class="network-ecosystem-demo-shell"
data-sdn-network-ecosystem-demo
aria-label="Interactive SDN network ecosystem demo">
<p>Loading interactive network ecosystem sandbox...</p>
</div>
<noscript>
<p>The interactive network ecosystem demo requires JavaScript. The rest of this documentation remains available without it.</p>
</noscript>
<h3>Network Components</h3>
<table>
<thead>
<tr><th>Component</th><th>Description</th><th>Use Case</th></tr>
</thead>
<tbody>
<tr><td><strong>Full Node</strong></td><td>Server-side Go application</td><td>Infrastructure providers, relay operators</td></tr>
<tr><td><strong>Edge Relay</strong></td><td>WebSocket bridge for browsers</td><td>Connecting browser clients to the network</td></tr>
<tr><td><strong>JavaScript SDK</strong></td><td>Browser/Node.js client library</td><td>Web applications, desktop apps</td></tr>
</tbody>
</table>
</section>
<section id="quick-start" class="doc-section">
<h2>Quick Start</h2>
<div class="qs-tabs">
<button class="qs-tab active" onclick="switchQsTab('desktop')">Desktop</button>
<button class="qs-tab" onclick="switchQsTab('server')">Server</button>
<button class="qs-tab" onclick="switchQsTab('browser')">Browser</button>
</div>
<div id="qs-desktop" class="qs-panel active">
<h3>Desktop Application</h3>
<p>Download the SDN Desktop app for macOS, Windows, or Linux. It includes a bundled IPFS node and the full SDN Web UI.</p>
<pre><code># Clone and build from source
git clone https://github.com/DigitalArsenal/space-data-network.git
cd space-data-network
npm run install:all
npm run desktop</code></pre>
<p>The desktop app provides a graphical interface for managing peers, browsing schemas, monitoring network stats, and configuring subscriptions.</p>
</div>
<div id="qs-server" class="qs-panel">
<h3>Server (Go)</h3>
<p>Run a headless SDN node for production deployments, data providers, and always-on infrastructure.</p>
<pre><code># Initialize configuration
./spacedatanetwork init
# Start the node
./spacedatanetwork daemon</code></pre>
<p>See <a href="#full-node">Full Node Setup</a> and <a href="#edge-relay">Edge Relay Deployment</a> for detailed configuration.</p>
</div>
<div id="qs-browser" class="qs-panel">
<h3>Browser (JavaScript)</h3>
<p>Integrate SDN directly into web applications using the JavaScript SDK.</p>
<pre><code>import { SDNNode } from './sdn-js/dist/esm/index.js';
const node = new SDNNode();
await node.start();
// Subscribe to Orbital Mean-Elements Messages
node.subscribe('OMM', (data, peerId) => {
console.log(`Received OMM from ${peerId}:`, data);
});
// Publish data
await node.publish('OMM', {
OBJECT_NAME: 'ISS (ZARYA)',
OBJECT_ID: '1998-067A',
EPOCH: '2025-01-24T12:00:00.000Z',
MEAN_MOTION: 15.5,
ECCENTRICITY: 0.0001,
INCLINATION: 51.6,
RA_OF_ASC_NODE: 200.0,
ARG_OF_PERICENTER: 100.0,
MEAN_ANOMALY: 50.0
});</code></pre>
</div>
</section>
<section id="installation" class="doc-section">
<h2>Installation</h2>
<h3>JavaScript SDK</h3>
<pre><code>cd sdn-js
npm install</code></pre>
<h3>Native Releases</h3>
<p>Use the one-line installers for the self-contained CLI. They install under the current user's <code>~/.spacedatanetwork</code> directory by default, initialize the local identity, and do not require administrator privileges.</p>
<pre><code># macOS/Linux
curl -fsSL https://spacedatanetwork.org/install.sh | bash
# Windows PowerShell
irm https://spacedatanetwork.org/install.ps1 | iex</code></pre>
<h3>CLI Operations</h3>
<p>The first-version CLI and Desktop use the same identity, lifecycle, search, and signed update contracts. The CLI can manage the persistent user-scoped service, remove the active installed bundle while preserving data by default, search the same provider/data indexes as the UI, export public identity records in every supported format, and update through the SDN-owned provider feed.</p>
<pre><code># Persistent service lifecycle
spacedatanetwork start
spacedatanetwork stop
spacedatanetwork restart
spacedatanetwork service status
spacedatanetwork service install
spacedatanetwork service uninstall
# Remove the active install; data purge is explicit
spacedatanetwork remove --dry-run
spacedatanetwork remove --purge-data
# Provider, standard, and data search
spacedatanetwork search providers celestrak --schema OMM
spacedatanetwork search standards OMM --format json
spacedatanetwork search data --schema CAT --provider-id space-data-network-02 --format csv
# EPM/vCard identity setup and export
spacedatanetwork identity wizard
spacedatanetwork identity export --format flatbuffer --output epm.fbs
spacedatanetwork identity export --format qrcode
# SDN-owned signed updates
spacedatanetwork update check
spacedatanetwork update stage
spacedatanetwork update apply</code></pre>
<p>Identity export supports text, JSON, CSV, FlatBuffer, and QR code output. The signed update provider is rooted at <code>updates.spacedatanetwork.org</code>; running-daemon updates are staged, applied in place, health checked, and rolled back on failure.</p>
<p>Native artifacts are attached to versioned SDN release tags, not SDK-only tags such as <code>sdn-js-v...</code>. Release <code>v1.0.3-beta.1</code> currently publishes self-contained CLI archives, Desktop installers, Linux amd64 full-node packages, a Docker image tarball, a Linux VM bundle, and a macOS ARM64 full-node bundle.</p>
<h3>Versioned Release</h3>
<p>Pick the newest numbered release from <a href="https://github.com/DigitalArsenal/space-data-network/releases/tag/v1.0.3-beta.1" target="_blank">Space Data Network v1.0.3-beta.1 release</a>, then use that release number for package and SDK downloads.</p>
<pre><code>SDN_VERSION=v1.0.3-beta.1
SDN_NATIVE_PACKAGE_VERSION=1.0.3.beta.1
# Full node package
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/spacedatanetwork-full_${SDN_NATIVE_PACKAGE_VERSION}_amd64.deb"
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/spacedatanetwork-full-${SDN_NATIVE_PACKAGE_VERSION}-1.x86_64.rpm"
# Linux VM bundle
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/spacedatanetwork-linux-vm-${SDN_NATIVE_PACKAGE_VERSION}.tar.gz"
# Docker image tarball
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/spacedatanetwork-container-${SDN_NATIVE_PACKAGE_VERSION}-linux-amd64.tar.gz"
docker load --input "spacedatanetwork-container-${SDN_NATIVE_PACKAGE_VERSION}-linux-amd64.tar.gz"
docker pull dockerdigitalarsenal/space-data-network:${SDN_VERSION}
# macOS ARM64 full-node bundle
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/spacedatanetwork-darwin-arm64.tar.gz"
# Windows AMD64 self-contained CLI archive
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/spacedatanetwork-1.0.3-beta.1-windows-amd64.zip"
# Desktop app installers
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/space-data-network-desktop-0.47.0-mac.dmg"
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/space-data-network-desktop-setup-0.47.0-windows-x64.exe"
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/space-data-network-desktop-0.47.0-linux-x86_64.AppImage"
# Browser and Node JavaScript SDK tarball
curl -LO "https://github.com/DigitalArsenal/space-data-network/releases/download/${SDN_VERSION}/spacedatanetwork-sdn-js-<sdk-version>.tgz"</code></pre>
</section>
<!-- Full Node -->
<section id="full-node" class="doc-section">
<h2>Full Node Setup</h2>
<p>Run a full SDN node to contribute to the network's routing, relay traffic for firewalled peers, and store pinned content.</p>
<h3>Requirements</h3>
<ul>
<li><strong>Public IP address</strong> - Required for other peers to connect directly</li>
<li><strong>Open ports:</strong> 4001/tcp (<a href="https://libp2p.io" target="_blank" style="color: inherit; text-decoration: underline;">libp2p</a>), 4001/udp (QUIC), 8080/tcp (HTTP API)</li>
<li><strong>Storage:</strong> Minimum 1GB recommended</li>
<li><strong>Memory:</strong> 512MB minimum, 2GB+ for busy nodes</li>
</ul>
<h3>Configuration</h3>
<pre><code># Initialize default config
./spacedatanetwork init</code></pre>
<p>This creates <code>~/.spacedatanetwork/</code> with:</p>
<ul>
<li><code>config.yaml</code> — Node configuration (YAML format)</li>
<li><code>keys/mnemonic</code> — BIP-39 mnemonic, <strong>encrypted at rest</strong> with XChaCha20-Poly1305 (see <a href="#key-security">Key Security</a>)</li>
<li><code>keys/node.key</code> — Serialized libp2p private key (backward compatibility)</li>
<li><code>data/</code> — FlatSQL record streams (append-only FlatBuffer bytes, plus SQL metadata/index tables) and, if a local Kubo node is configured, its pinned content</li>
</ul>
<h3>Configuration File</h3>
<p>The server uses YAML configuration at <code>~/.spacedatanetwork/config.yaml</code> (override with <code>--config</code> flag).</p>
<pre><code>mode: full
network:
listen:
- /ip4/0.0.0.0/tcp/4001
- /ip4/0.0.0.0/tcp/8080/ws
- /ip4/0.0.0.0/udp/4001/quic-v1
bootstrap:
- /dnsaddr/bootstrap.spacedatanetwork.org/p2p/16Uiu2HAm1LbvwjEHW2GDP2ZQZvwHLZrz2jbYoRLQmJEQ3wZ5Fm45
- /dnsaddr/bootstrap.spacedatanetwork.org/p2p/16Uiu2HAm9oK2jAeVC2RMESFcYfq7BKGp2K2CCDxzoKhB5s9vpbj3
- /ip4/159.203.150.8/tcp/4001/p2p/16Uiu2HAm1LbvwjEHW2GDP2ZQZvwHLZrz2jbYoRLQmJEQ3wZ5Fm45
- /ip4/167.172.219.213/tcp/4001/p2p/16Uiu2HAm9oK2jAeVC2RMESFcYfq7BKGp2K2CCDxzoKhB5s9vpbj3
enable_relay: true
max_connections: 1000
storage:
path: /home/sdn/.spacedatanetwork/data
max_size: 10GB
gc_interval: 1h
security:
# key_password: "" # Optional: explicit mnemonic password
# Default: machine-derived via Argon2
# Override: SDN_KEY_PASSWORD env var
admin:
enabled: true
listen_addr: "0.0.0.0:443"
require_auth: true
session_expiry: 24h
tls_enabled: true
tls_cert_file: /etc/ssl/certs/your-cert.pem
tls_key_file: /etc/ssl/private/your-key.pem
ipfs_api_url: "http://127.0.0.1:5002"
# HD wallet users (xpub-based authentication)
users:
- xpub: "xpub6..."
trust_level: admin
name: Operator</code></pre>
<h3>Running as a Service</h3>
<p>Create <code>/etc/systemd/system/spacedatanetwork.service</code>:</p>
<pre><code>[Unit]
Description=Space Data Network Node
After=network.target
[Service]
Type=simple
User=sdn
ExecStart=/usr/local/bin/spacedatanetwork daemon
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target</code></pre>
<pre><code>sudo systemctl enable spacedatanetwork
sudo systemctl start spacedatanetwork</code></pre>
</section>
<!-- CLI Commands -->
<section id="cli-commands" class="doc-section">
<h2>CLI Commands</h2>
<p>The <code>spacedatanetwork</code> binary provides several subcommands for node management and identity inspection.</p>
<h3>daemon</h3>
<p>Start the SDN server node (default command).</p>
<pre><code>spacedatanetwork daemon --config /path/to/config.yaml</code></pre>
<table>
<thead>
<tr><th>Flag</th><th>Default</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td><code>--config</code></td><td><code>~/.spacedatanetwork/config.yaml</code></td><td>Path to configuration file</td></tr>
<tr><td><code>--wasm</code></td><td><code>~/.spacedatanetwork/wasm/hd-wallet.wasm</code></td><td>Path to hd-wallet WASM binary</td></tr>
</tbody>
</table>
<h3>show-identity</h3>
<p>Display the node’s cryptographic identity derived from its BIP-39 mnemonic. Prints PeerID to <code>stdout</code> (for scripting) and full details to <code>stderr</code>.</p>
<pre><code>spacedatanetwork show-identity \
--config /path/to/config.yaml \
--wasm /path/to/hd-wallet.wasm</code></pre>
<table>
<thead>
<tr><th>Flag</th><th>Default</th><th>Description</th></tr>
</thead>
<tbody>
<tr><td><code>--config</code></td><td><code>~/.spacedatanetwork/config.yaml</code></td><td>Path to configuration file</td></tr>
<tr><td><code>--wasm</code></td><td><code>~/.spacedatanetwork/wasm/hd-wallet.wasm</code></td><td>Path to hd-wallet WASM binary</td></tr>
<tr><td><code>--show-mnemonic</code></td><td><code>false</code></td><td>Also display the decrypted mnemonic (use with caution)</td></tr>
</tbody>
</table>
<p>Example output:</p>
<pre><code>$ spacedatanetwork show-identity --wasm /opt/sdn/wasm/hd-wallet.wasm
=== SDN Node Identity ===
XPub: xpub6DKCyLbCHZLFR...FZ3Wa
PeerID: 16Uiu2HAm1LbvwjEH...Fm45
Signing Key: 0d80e1fd5f...42fc8c (Ed25519)
Encryption Key: 08ea56d043...191741 (X25519)
Derivation Paths:
Identity: m/44'/0'/0' (secp256k1 → PeerID + XPub)
Signing: m/44'/0'/0'/0'/0' (Ed25519, SLIP-10)
Encryption: m/44'/0'/0'/1'/0' (X25519, SLIP-10)
# Get just the PeerID for scripting:
PEER_ID=$(spacedatanetwork show-identity --wasm /opt/sdn/wasm/hd-wallet.wasm 2>/dev/null)</code></pre>
<h3>derive-xpub</h3>
<p>Derive an xpub from a BIP-39 mnemonic for use in the <code>users</code> config section. The xpub is the node’s public identity — safe to share and used for authentication.</p>
<pre><code>spacedatanetwork derive-xpub --wasm /path/to/hd-wallet.wasm</code></pre>
<p>You will be prompted to enter a mnemonic. The derived xpub is printed to <code>stdout</code>.</p>
<div class="callout callout-info">
<div class="callout-title">Scripting Tip</div>
<p>Both <code>show-identity</code> and <code>derive-xpub</code> print their primary output (PeerID or xpub) to <code>stdout</code> and diagnostics to <code>stderr</code>, making them easy to use in scripts with standard redirects.</p>
</div>
<h3>init</h3>