-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocs.html
More file actions
1254 lines (1119 loc) · 45.4 KB
/
docs.html
File metadata and controls
1254 lines (1119 loc) · 45.4 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>
<!--
File: docs.html
Version: 4.1.11
Created: 2026-01-29T08:15:00Z
Modified: 2026-03-23T00:00:00Z
Author: Marvin Percival
Email: marvinp@dunin7.com
GitHub: DUNIN7/foray-kaspathon
FORAY Protocol Documentation Page
Change Log:
v4.1.11 (2026-03-23): Expanded AI Agent section with enterprise accountability, MCP roadmap reference, fixed broken OpenClaw link
v4.1.10 (2026-02-06): Added Industry Guides link (sidebar + callout box)
v4.1.9 (2026-02-05): Changed sidebar height to min-height to extend with page
v4.1.8 (2026-02-05): Fixed sidebar height and content width on desktop
Reverted to desktop-first grid with mobile override
v4.1.7 (2026-02-05): Mobile-first responsive layout refactor
Sidebar hidden by default, shown at 1025px+
Content padding responsive (mobile -> tablet -> desktop)
Added shrink-to-fit=no to viewport meta
v4.1.6 (2026-02-05): Added table wrappers for mobile horizontal scroll
Added word-wrap to h1 headings
v4.1.5 (2026-02-05): Fixed mobile viewport overflow on initial load
Removed Examples link from navigation
Added AI Agents/OpenClaw integration section
v4.1.4 (2026-02-02): Added infographic link (sidebar + Visual Overview box)
Added Attestations Extension section (sidebar + full content)
Added Google Chrome requirement to Demo Mode box
Fixed multiplication sign mojibake
v4.1.3 (2026-01-31): Content review - "immutable" to "tamper-evident"
Content review - removed "complete" overclaim
Updated privacy architecture from 8-layer to 3-layer + ZK-ready
Fixed Kaspa BPS (32 -> 10+)
Fixed character encoding (× symbols, copyright, middot)
Removed dead sidebar links (Hashing, Salesforce)
Added scroll-margin-top to fix anchor links under fixed nav
Removed v4.1 Breaking Change box from Accruals
v4.1.2 (2026-01-30): Unified navigation with responsive hamburger menu
Added favicon link
Fixed character encoding issues
v4.1.1 (2026-01-29): Corrected Accruals definition from "economic recognition"
to "formulas applied against asset flows" per FORAY spec.
-->
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
<title>Documentation - FORAY Protocol</title>
<link rel="icon" href="favicon.svg" type="image/svg+xml">
<meta name="description" content="Technical documentation for FORAY Protocol v4.1 - specification, integration guides, and API reference.">
<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=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap" rel="stylesheet">
<style>
:root {
--primary-teal: #0D7377;
--secondary-navy: #1B365D;
--accent-cyan: #14B8B8;
--highlight-mint: #7DD3D6;
--action-amber: #E6A817;
--text-dark: #1A1D21;
--text-light: #F7F9FA;
--bg-dark: #1A1D21;
--gray-600: #636E72;
--gray-400: #94A3A8;
--gray-200: #E5E9EB;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
font-family: 'IBM Plex Sans', -apple-system, sans-serif;
background: var(--bg-dark);
color: var(--text-light);
line-height: 1.7;
overflow-x: hidden;
}
.font-mono { font-family: 'IBM Plex Mono', monospace; }
/* Navigation */
/* === BULLETPROOF NAV CSS v4.0 - FULLY SELF-CONTAINED === */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; background: rgba(26, 29, 33, 0.95); backdrop-filter: blur(20px); border-bottom: 1px solid rgba(125, 211, 214, 0.1); font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; line-height: 1.5; box-sizing: border-box; }
.nav * { box-sizing: border-box; }
.nav-logo { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; font-family: inherit; font-size: inherit; line-height: inherit; }
.nav-logo-text { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1; display: flex; align-items: center; }
.nav-logo-foray { color: #0D7377; }
.nav-logo-protocol { color: #F7F9FA; font-weight: 400; }
.nav-badge { font-size: 0.65rem; padding: 0.2rem 0.5rem; background: #E6A817; color: #1A1D21; border-radius: 4px; font-weight: 600; line-height: 1; display: inline-block; vertical-align: middle; font-family: inherit; }
.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-link { color: #94A3A8; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: color 0.2s; font-family: inherit; line-height: 1; }
.nav-link:hover, .nav-link.active { color: #14B8B8; }
.nav-hamburger { display: none; flex-direction: column; justify-content: center; align-items: center; width: 40px; height: 40px; background: transparent; border: none; cursor: pointer; z-index: 1001; padding: 8px; }
.nav-hamburger span { display: block; width: 24px; height: 2px; background: #F7F9FA; margin: 3px 0; transition: all 0.3s ease; border-radius: 2px; }
.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }
.nav-mobile-menu { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(26, 29, 33, 0.98); backdrop-filter: blur(20px); z-index: 999; flex-direction: column; justify-content: center; align-items: center; gap: 2rem; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif; }
.nav-mobile-menu.active { opacity: 1; visibility: visible; }
.nav-mobile-menu .nav-link { font-size: 1.5rem; font-weight: 500; color: #F7F9FA; line-height: 1; }
.nav-mobile-menu .nav-link:hover { color: #14B8B8; }
@media (max-width: 768px) { .nav-links { display: none; } .nav-hamburger { display: flex; } .nav-mobile-menu { display: flex; } }
/* === END BULLETPROOF NAV CSS === */
/* Layout */
.docs-layout {
display: grid;
grid-template-columns: 280px 1fr;
min-height: 100vh;
padding-top: 73px;
max-width: 100vw;
overflow-x: hidden;
}
@media (max-width: 1024px) {
.docs-layout {
display: block;
grid-template-columns: 1fr;
}
}
/* Sidebar */
.sidebar {
position: sticky;
top: 73px;
min-height: calc(100vh - 73px);
overflow-y: auto;
padding: 2rem;
border-right: 1px solid rgba(125, 211, 214, 0.1);
background: rgba(27, 54, 93, 0.05);
}
@media (max-width: 1024px) {
.sidebar {
display: none;
}
}
.sidebar-section {
margin-bottom: 2rem;
}
.sidebar-title {
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.15em;
text-transform: uppercase;
color: var(--gray-400);
margin-bottom: 0.75rem;
}
.sidebar-link {
display: block;
padding: 0.5rem 0;
color: var(--text-light);
text-decoration: none;
font-size: 0.9rem;
transition: all 0.2s;
border-left: 2px solid transparent;
padding-left: 0.75rem;
margin-left: -0.75rem;
}
.sidebar-link:hover {
color: var(--accent-cyan);
border-left-color: var(--accent-cyan);
}
.sidebar-link.active {
color: var(--accent-cyan);
border-left-color: var(--accent-cyan);
background: rgba(20, 184, 184, 0.05);
}
/* Content */
.docs-content {
padding: 1.5rem 1rem;
width: 100%;
box-sizing: border-box;
}
@media (min-width: 768px) {
.docs-content {
padding: 2rem;
}
}
@media (min-width: 1025px) {
.docs-content {
padding: 3rem 4rem;
}
}
.docs-content h1 {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 1rem;
letter-spacing: -0.02em;
scroll-margin-top: 100px;
word-wrap: break-word;
overflow-wrap: break-word;
}
.docs-content h2 {
font-size: 1.75rem;
font-weight: 600;
margin-top: 3rem;
margin-bottom: 1rem;
padding-top: 1.5rem;
border-top: 1px solid rgba(125, 211, 214, 0.1);
color: var(--accent-cyan);
scroll-margin-top: 100px;
}
.docs-content h3 {
font-size: 1.25rem;
font-weight: 600;
margin-top: 2rem;
margin-bottom: 0.75rem;
color: var(--text-light);
scroll-margin-top: 100px;
}
.docs-content p {
color: var(--gray-400);
margin-bottom: 1rem;
}
.docs-content a {
color: var(--accent-cyan);
text-decoration: none;
}
.docs-content a:hover {
text-decoration: underline;
}
.docs-content ul, .docs-content ol {
margin-bottom: 1rem;
padding-left: 1.5rem;
color: var(--gray-400);
}
.docs-content li {
margin-bottom: 0.5rem;
}
/* Code blocks */
.code-block {
background: rgba(26, 29, 33, 0.8);
border: 1px solid rgba(125, 211, 214, 0.1);
border-radius: 8px;
padding: 1.25rem;
margin-bottom: 1.5rem;
overflow-x: auto;
}
.code-block code {
font-family: 'IBM Plex Mono', monospace;
font-size: 0.85rem;
color: var(--text-light);
line-height: 1.6;
}
code {
font-family: 'IBM Plex Mono', monospace;
background: rgba(20, 184, 184, 0.1);
padding: 0.15rem 0.4rem;
border-radius: 4px;
font-size: 0.85em;
color: var(--accent-cyan);
}
/* Tables */
.table-wrapper {
width: 100%;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 1.5rem;
min-width: 400px;
}
th, td {
padding: 0.75rem 1rem;
text-align: left;
border-bottom: 1px solid rgba(125, 211, 214, 0.1);
}
th {
background: rgba(27, 54, 93, 0.2);
font-weight: 600;
font-size: 0.85rem;
text-transform: uppercase;
letter-spacing: 0.05em;
color: var(--gray-400);
}
td {
color: var(--text-light);
font-size: 0.9rem;
}
/* Info boxes */
.info-box {
padding: 1.25rem;
border-radius: 8px;
margin-bottom: 1.5rem;
}
.info-box.note {
background: rgba(20, 184, 184, 0.1);
border-left: 4px solid var(--accent-cyan);
}
.info-box.warning {
background: rgba(230, 168, 23, 0.1);
border-left: 4px solid var(--action-amber);
}
.info-box.important {
background: rgba(239, 68, 68, 0.1);
border-left: 4px solid #EF4444;
}
.info-box-title {
font-weight: 600;
margin-bottom: 0.5rem;
display: flex;
align-items: center;
gap: 0.5rem;
}
.info-box.note .info-box-title { color: var(--accent-cyan); }
.info-box.warning .info-box-title { color: var(--action-amber); }
.info-box.important .info-box-title { color: #EF4444; }
.info-box p {
margin-bottom: 0;
color: var(--text-light);
font-size: 0.9rem;
}
/* Component badges */
.component-badge {
display: inline-block;
padding: 0.2rem 0.6rem;
border-radius: 4px;
font-size: 0.8rem;
font-weight: 600;
margin-right: 0.5rem;
}
.component-badge.arrangement { background: rgba(13, 115, 119, 0.2); color: #0D7377; }
.component-badge.accrual { background: rgba(230, 168, 23, 0.2); color: #E6A817; }
.component-badge.anticipation { background: rgba(139, 92, 246, 0.2); color: #8B5CF6; }
.component-badge.action { background: rgba(16, 185, 129, 0.2); color: #10B981; }
/* Hamburger Menu Button */
/* Mobile Menu Overlay */
@media (max-width: 768px) {
.docs-content {
padding: 1rem;
}
.docs-content h1 {
font-size: 1.75rem;
}
.docs-content h2 {
font-size: 1.4rem;
}
.table-wrapper {
margin-left: -1rem;
margin-right: -1rem;
padding-left: 1rem;
padding-right: 1rem;
}
table {
min-width: 300px;
}
th, td {
padding: 0.5rem;
font-size: 0.8rem;
}
.code-block {
margin-left: -1rem;
margin-right: -1rem;
border-radius: 0;
}
.info-box {
padding: 1rem;
}
}
</style>
</head>
<body>
<nav class="nav">
<a href="index.html" class="nav-logo">
<span class="nav-logo-text">
<span class="nav-logo-foray">FORAY</span> <span class="nav-logo-protocol">Protocol</span>
</span>
<span class="nav-badge">v4.1</span>
</a>
<div class="nav-links">
<a href="demo.html" class="nav-link">Demo</a>
<a href="docs.html" class="nav-link active">Documentation</a>
<a href="about.html" class="nav-link">About</a>
<a href="https://github.com/DUNIN7/foray-kaspathon" class="nav-link" target="_blank">GitHub</a>
</div>
<button class="nav-hamburger" onclick="toggleMobileMenu()" aria-label="Toggle menu">
<span></span>
<span></span>
<span></span>
</button>
</nav>
<!-- Mobile Menu -->
<div class="nav-mobile-menu" id="mobileMenu">
<a href="demo.html" class="nav-link" onclick="closeMobileMenu()">Demo</a>
<a href="docs.html" class="nav-link" onclick="closeMobileMenu()">Documentation</a>
<a href="about.html" class="nav-link" onclick="closeMobileMenu()">About</a>
<a href="https://github.com/DUNIN7/foray-kaspathon" class="nav-link" target="_blank" onclick="closeMobileMenu()">GitHub</a>
</div>
<div class="docs-layout">
<aside class="sidebar">
<div class="sidebar-section">
<div class="sidebar-title">Getting Started</div>
<a href="#overview" class="sidebar-link active">Overview</a>
<a href="#quick-start" class="sidebar-link">Quick Start</a>
<a href="#design-principles" class="sidebar-link">Design Principles</a>
<a href="foray-infographic-v41.html" class="sidebar-link">Infographic</a>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Core Concepts</div>
<a href="#4-component-model" class="sidebar-link">4-Component Model</a>
<a href="#arrangements" class="sidebar-link">Arrangements</a>
<a href="#accruals" class="sidebar-link">Accruals</a>
<a href="#anticipations" class="sidebar-link">Anticipations</a>
<a href="#actions" class="sidebar-link">Actions</a>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Technical</div>
<a href="#schema" class="sidebar-link">JSON Schema</a>
<a href="#kaspa" class="sidebar-link">Kaspa Integration</a>
<a href="#privacy" class="sidebar-link">Privacy Architecture</a>
<a href="#attestations" class="sidebar-link">Attestations</a>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Integration</div>
<a href="#integration" class="sidebar-link">Overview</a>
<a href="#quickbooks" class="sidebar-link">QuickBooks</a>
<a href="#erp" class="sidebar-link">ERP Systems</a>
<a href="#ai-agents" class="sidebar-link">AI Agents</a>
</div>
<div class="sidebar-section">
<div class="sidebar-title">Resources</div>
<a href="guides.html" class="sidebar-link">Industry Guides</a>
</div>
</aside>
<main class="docs-content">
<h1 id="overview">FORAY Protocol Documentation</h1>
<p>
FORAY Protocol is a privacy-preserving blockchain audit infrastructure designed to create
tamper-evident transaction records for enterprise systems. This documentation covers the v4.1
specification, integration patterns, and best practices.
</p>
<div class="info-box note">
<div class="info-box-title">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/><line x1="12" y1="16" x2="12" y2="12"/><line x1="12" y1="8" x2="12.01" y2="8"/>
</svg>
About the Name
</div>
<p>FORAY is derived from "4A" — the four components: Arrangements, Accruals, Anticipations, and Actions.</p>
</div>
<div class="info-box note" style="border-left-color: var(--action-amber); background: rgba(230, 168, 23, 0.08);">
<div class="info-box-title" style="color: var(--action-amber);">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2"/><line x1="3" y1="9" x2="21" y2="9"/><line x1="9" y1="21" x2="9" y2="9"/>
</svg>
Visual Overview
</div>
<p>For a visual map of the 4A model, privacy layers, and attestation framework, see the <a href="foray-infographic-v41.html"><strong>FORAY Protocol Infographic</strong></a>.</p>
</div>
<div class="info-box note" style="border-left-color: var(--primary-teal); background: rgba(13, 115, 119, 0.08);">
<div class="info-box-title" style="color: var(--accent-cyan);">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/>
</svg>
Industry Guides
</div>
<p>Explore how FORAY applies to your sector: Defense, Energy, Financial Services, Manufacturing, Supply Chain, and Audit. See the <a href="guides.html"><strong>Industry Guides</strong></a>.</p>
</div>
<h2 id="quick-start">Quick Start</h2>
<p>Get started with FORAY in three steps:</p>
<ol>
<li><strong>Model your transaction</strong> — Decompose it into the 4 components</li>
<li><strong>Generate JSON</strong> — Create a valid FORAY Protocol JSON document</li>
<li><strong>Anchor to Kaspa</strong> — Submit the merkle root to Kaspa blockchain</li>
</ol>
<p>Try the <a href="demo.html">interactive demo</a> to see how it works.</p>
<h2 id="design-principles">Design Principles</h2>
<p>FORAY is built on these core principles:</p>
<ol>
<li><strong>Source System Trust</strong> — FORAY trusts validated ERP data</li>
<li><strong>4-Component Model</strong> — Arrangements → Accruals → Anticipations → Actions</li>
<li><strong>Tamper-Evident Anchoring</strong> — Blockchain provides tamper-evident timestamps</li>
<li><strong>Privacy Preservation</strong> — Hash-based verification without data exposure</li>
<li><strong>Separation of Concerns</strong> — Core protocol separate from audit metadata</li>
<li><strong>Layered Storage</strong> — Right data in right place at right cost</li>
</ol>
<h3>New in v4.1</h3>
<ul>
<li><strong>Transaction Fidelity</strong> — Model what actually happened, not artificial structures</li>
<li><strong>Relationship Accuracy</strong> — Support real-world many-to-many flows</li>
<li><strong>Flexible Entry Points</strong> — Any component type can serve as transaction entry point</li>
</ul>
<h2 id="4-component-model">4-Component Model</h2>
<p>
Every business transaction in FORAY is decomposed into four auditable components. This structure
provides a structured trail from agreement to settlement.
</p>
<div class="table-wrapper"><table>
<thead>
<tr>
<th>Component</th>
<th>Purpose</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="component-badge arrangement">Arrangement</span></td>
<td>Contractual foundation</td>
<td>Master Service Agreement, Purchase Order</td>
</tr>
<tr>
<td><span class="component-badge accrual">Accrual</span></td>
<td>Formulas applied to asset flows</td>
<td>Interest calculation, Depreciation expense, Overhead allocation</td>
</tr>
<tr>
<td><span class="component-badge anticipation">Anticipation</span></td>
<td>Expected future flows</td>
<td>Scheduled payment, Expected delivery</td>
</tr>
<tr>
<td><span class="component-badge action">Action</span></td>
<td>Actual asset transfers</td>
<td>Wire transfer, Inventory receipt</td>
</tr>
</tbody>
</table></div>
<h2 id="arrangements">Arrangements</h2>
<p>
Arrangements represent the contractual foundation of a transaction — the "what we agreed to."
They define parties, terms, and obligations.
</p>
<h3>Structure</h3>
<div class="code-block">
<code><pre>{
"id": "ARR_MSA_VENDOR_2024",
"foray_core": {
"type": "master_service_agreement",
"effective_date": "2024-01-01",
"parties": [
{ "role": "customer", "name": "Acme Corp", "party_id_hash": "sha256:..." },
{ "role": "vendor", "name": "Supplier Inc", "party_id_hash": "sha256:..." }
],
"description": "Master agreement for office supplies",
"total_value": 50000.00,
"currency": "USD",
"terms": {
"payment_terms": "Net 30",
"contract_duration": "24 months"
}
}
}</pre></code>
</div>
<h2 id="accruals">Accruals</h2>
<p>
Accruals represent formulas applied against asset flows — the "how amounts are computed." They
capture calculations such as interest (P × r × t), depreciation, overhead allocation, and
valuations. Accruals link back to Arrangements and define the computational logic that
transforms contractual terms into quantified amounts.
</p>
<h3>Structure</h3>
<div class="code-block">
<code><pre>{
"id": "ACC_INV_2026_001",
"foray_core": {
"arrangement_refs": ["ARR_MSA_VENDOR_2024"],
"type": "invoice_payable",
"description": "January office supplies",
"computation_method": "FixedAmount",
"output": 3500.00,
"currency": "USD",
"accounting_entry": {
"debit": { "account": "5100", "amount": 3500.00 },
"credit": { "account": "2100", "amount": 3500.00 }
}
}
}</pre></code>
</div>
<h2 id="anticipations">Anticipations</h2>
<p>
Anticipations represent expected future cash flows or deliverables — the "what we expect to happen."
They can reference both Accruals and Arrangements directly.
</p>
<h3>Structure</h3>
<div class="code-block">
<code><pre>{
"id": "ANT_PAY_BATCH_001",
"foray_core": {
"accrual_refs": ["ACC_INV_2026_001", "ACC_INV_2026_002"],
"arrangement_refs": ["ARR_MSA_VENDOR_2024"],
"type": "scheduled_payment",
"description": "Q1 batch payment",
"expected_amount": 7700.00,
"currency": "USD",
"expected_date": "2026-01-15",
"probability_factor": 0.95
}
}</pre></code>
</div>
<h2 id="actions">Actions</h2>
<p>
Actions represent actual asset transfers — the "what actually moved." They record
settlements, payments, deliveries, and other concrete movements.
</p>
<h3>Structure</h3>
<div class="code-block">
<code><pre>{
"id": "ACT_WIRE_2026_001",
"foray_core": {
"anticipation_refs": ["ANT_PAY_BATCH_001"],
"type": "wire_transfer",
"description": "Wire transfer for Q1 batch payment",
"amount": 7700.00,
"currency": "USD",
"executed_at": "2026-01-15T10:30:00Z",
"payment_method": "wire",
"allocations": [
{ "ref": "ACC_INV_2026_001", "ref_type": "accrual", "amount": 3500.00, "currency": "USD" },
{ "ref": "ACC_INV_2026_002", "ref_type": "accrual", "amount": 4200.00, "currency": "USD" }
]
}
}</pre></code>
</div>
<h2 id="schema">JSON Schema</h2>
<p>The top-level FORAY transaction schema:</p>
<div class="code-block">
<code><pre>{
"transaction_id": "DOMAIN_YYYY_QN_DESCRIPTOR",
"schema_version": "4.1",
"timestamp": "ISO-8601",
"foray_core": {
"entity": "entity_name",
"entity_hash": "sha256:...",
"transaction_type": "type_code",
"total_value": 0.00,
"currency": "USD",
"status": "active|completed|reversed",
"compliance_flags": ["SOX_404", "DCAA"]
},
"component_hashes": {
"arrangements": "sha256:...",
"accruals": "sha256:...",
"anticipations": "sha256:...",
"actions": "sha256:..."
},
"arrangements": [...],
"accruals": [...],
"anticipations": [...],
"actions": [...],
"merkle_root": "sha256:...",
"blockchain_anchor": {
"kaspa_tx_id": "kaspa:qr...",
"block_height": 0,
"confirmation_time_ms": 0,
"anchored_at": "ISO-8601"
}
}</pre></code>
</div>
<h2 id="kaspa">Kaspa Integration</h2>
<p>
FORAY uses Kaspa blockchain for anchoring transaction proofs. Kaspa's unique properties
make it ideal for enterprise audit use cases:
</p>
<div class="table-wrapper"><table>
<thead>
<tr>
<th>Property</th>
<th>Value</th>
<th>Benefit</th>
</tr>
</thead>
<tbody>
<tr>
<td>Block Time</td>
<td>~1 second</td>
<td>Real-time anchoring possible</td>
</tr>
<tr>
<td>Transaction Cost</td>
<td>~$0.0001</td>
<td>Economical for high-volume enterprises</td>
</tr>
<tr>
<td>Consensus</td>
<td>GHOSTDAG (PoW)</td>
<td>High throughput, fair distribution</td>
</tr>
<tr>
<td>Throughput</td>
<td>10+ blocks/second</td>
<td>Handles enterprise-scale volume</td>
</tr>
</tbody>
</table></div>
<div class="info-box important">
<div class="info-box-title">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/>
</svg>
Demo Mode
</div>
<p>The demo connects to <strong>Kaspa Testnet-10 only</strong> and <strong>requires Google Chrome</strong> — the KasWare wallet extension is only available for Chrome-based browsers. Ensure your KasWare wallet is configured for Testnet before anchoring.</p>
</div>
<h2 id="privacy">Privacy Architecture</h2>
<p>
FORAY implements a 3-layer privacy architecture (with a 4th layer reserved for future
zero-knowledge capabilities) to protect sensitive business data while enabling
cryptographic verification:
</p>
<div class="table-wrapper"><table>
<thead>
<tr>
<th>Layer</th>
<th>Mechanism</th>
<th>Purpose</th>
</tr>
</thead>
<tbody>
<tr>
<td>1. Identifier Hashing</td>
<td>Salted SHA-256</td>
<td>Cross-entity unlinkability</td>
</tr>
<tr>
<td>2. Formula Commitments</td>
<td>Hash-based registry</td>
<td>Prove correctness without revealing logic</td>
</tr>
<tr>
<td>3. Instance Pooling</td>
<td>Multiple representations</td>
<td>Statistical confusion</td>
</tr>
<tr>
<td>4. Zero-Knowledge <em>(Future)</em></td>
<td>ZK-SNARKs/STARKs</td>
<td>When Kaspa supports on-chain ZK</td>
</tr>
</tbody>
</table></div>
<p>
Privacy metadata scales proportionally to data sensitivity. High-sensitivity transactions
may use 7-15 obfuscated formulas and 5-10 instance pools, while low-sensitivity
transactions require minimal protection.
</p>
<h2 id="attestations">Attestations Extension</h2>
<p>
The core 4A model captures <em>what organizations claim happened</em>. The optional
Attestations extension records <em>who verified those claims</em> — providing
accountability infrastructure for use cases requiring third-party validation.
</p>
<div class="info-box warning">
<div class="info-box-title">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v2m0 4h.01M5.07 19h13.86c1.54 0 2.5-1.67 1.73-3L13.73 4c-.77-1.33-2.69-1.33-3.46 0L3.34 16c-.77 1.33.19 3 1.73 3z"/>
</svg>
Claims vs. Truth
</div>
<p>FORAY proves that a party made a specific claim at a specific time. It does <strong>not</strong> independently verify that the claim is true. Attestations make claimants <em>accountable</em>, not claims <em>accurate</em>.</p>
</div>
<h3>What FORAY Proves</h3>
<div class="table-wrapper"><table>
<thead>
<tr>
<th>Capability</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Temporal proof</td>
<td>A specific claim was recorded at a specific point in time</td>
</tr>
<tr>
<td>Integrity proof</td>
<td>The recorded data has not been altered since anchoring</td>
</tr>
<tr>
<td>Consistency proof</td>
<td>Multiple parties can verify they hold identical records</td>
</tr>
<tr>
<td>Sequence proof</td>
<td>Events occurred in a verifiable order</td>
</tr>
</tbody>
</table></div>
<h3>What FORAY Does NOT Prove</h3>
<div class="table-wrapper"><table>
<thead>
<tr>
<th>Limitation</th>
<th>Explanation</th>
</tr>
</thead>
<tbody>
<tr>
<td>Truth of claims</td>
<td>FORAY anchors assertions, not facts</td>
</tr>
<tr>
<td>Physical reality</td>
<td>Digital records cannot independently verify physical world states</td>
</tr>
<tr>
<td>Attestor competence</td>
<td>A certification is only as reliable as the certifying party</td>
</tr>
<tr>
<td>Data accuracy at source</td>
<td>FORAY trusts validated source system data</td>
</tr>
</tbody>
</table></div>
<h3>Attestation Types</h3>
<div class="table-wrapper"><table>
<thead>
<tr>
<th>Type</th>
<th>Use Case</th>
<th>Example</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>certification</code></td>
<td>Formal certification by authorized body</td>
<td>UMF certification, ISO compliance</td>
</tr>
<tr>
<td><code>inspection</code></td>
<td>Physical examination by qualified inspector</td>
<td>Customs inspection, quality check</td>
</tr>
<tr>
<td><code>analysis</code></td>
<td>Laboratory or technical analysis</td>
<td>Spectroscopic fingerprint, MGO analysis</td>
</tr>
<tr>
<td><code>audit_opinion</code></td>
<td>Professional auditor's assessment</td>
<td>Financial audit, compliance review</td>
</tr>
<tr>
<td><code>verification</code></td>
<td>Confirmation of facts or events</td>
<td>Delivery confirmation, payment verification</td>
</tr>
<tr>
<td><code>oracle</code></td>
<td>Automated/sensor-based attestation</td>
<td>IoT readings, GPS coordinates, timestamps</td>
</tr>
</tbody>
</table></div>
<h3>Structure</h3>
<div class="code-block">
<code><pre>{
"id": "ATT_INSPECTION_001",
"foray_core": {
"attestor": "Quality Inspectors Ltd",
"attestor_hash": "sha256:...",
"attestor_type": "inspection_body",
"attestor_credentials": ["ISO_17020", "UKAS_Accredited"],
"subject_refs": ["ACT_DELIVERY_001", "ACC_INV_2026_001"],
"attestation_type": "inspection",
"attestation_date": "2026-01-15T14:30:00Z",
"outcome": "certified",
"evidence_hash": "sha256:...",
"evidence_location": "off-chain"
}
}</pre></code>
</div>
<p>
For the complete attestation trust model, validation rules, and attestation chain patterns,
see the <a href="https://github.com/DUNIN7/foray-kaspathon/blob/main/guides/FORAY_Attestation_Trust_Model.md">Attestation Trust Model</a> document.
</p>
<h2 id="integration">Integration Overview</h2>
<h3>Zero Additional Data Entry</h3>
<p>
If your ERP system already processes your business transactions, you already have everything FORAY needs.
</p>
<p>
FORAY does not require new data - it works with what you already capture. When you record a sale,
process payroll, or log a purchase order, your ERP system already stores the parties, amounts,
dates, and terms that define that transaction.
</p>
<h4>FORAY adapters simply translate what exists</h4>
<div class="table-wrapper"><table>
<thead>
<tr>
<th>Your ERP Already Has</th>
<th>FORAY Organizes It As</th>
</tr>
</thead>
<tbody>
<tr>
<td>Customer/Vendor records</td>
<td>Arrangements (who agreed to what)</td>