pathchain 1.0.45 → 1.0.46
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/README.md +26 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,7 +7,9 @@ Pathchain is a tool to build path-shaped data structures that are chained one to
|
|
|
7
7
|
---
|
|
8
8
|
# Pathchain documentation
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
# Makers
|
|
11
13
|
Maker functions recieve new data to encode into the chain.
|
|
12
14
|
|
|
13
15
|
| Function | Parameters |
|
|
@@ -23,8 +25,8 @@ Maker functions recieve new data to encode into the chain.
|
|
|
23
25
|
| [`makeTree()`](#Tree) | xauthor, text, head, ancestor, format |
|
|
24
26
|
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
---
|
|
29
|
+
# Getters
|
|
28
30
|
Getter functions retrieve objects given a hashname and author information
|
|
29
31
|
|
|
30
32
|
| Function | Parameters |
|
|
@@ -42,8 +44,6 @@ Getter functions retrieve objects given a hashname and author information
|
|
|
42
44
|
|
|
43
45
|
|
|
44
46
|
---
|
|
45
|
-
|
|
46
|
-
|
|
47
47
|
## Moment
|
|
48
48
|
|
|
49
49
|
A moment is the mimimum representation of the pathchain data structures. Moments are the trunk of every path . They're represented by default with a `MM DD YYYY HH:mm:SSS [GMT]Z` datetime format for `time` and a planet earth representation (0, 0, 0) in general as `space`.
|
|
@@ -103,6 +103,7 @@ Parameter rules:
|
|
|
103
103
|
|{string} format |(optional)|
|
|
104
104
|
|
|
105
105
|
|
|
106
|
+
---
|
|
106
107
|
Summoning `makeMoment(datetime, lat, lon, x, y, z, format)`:
|
|
107
108
|
```javascript
|
|
108
109
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -125,6 +126,7 @@ Parameter rules:
|
|
|
125
126
|
|{string} xmoment |(required)|
|
|
126
127
|
|
|
127
128
|
|
|
129
|
+
---
|
|
128
130
|
Summoning `getMomentObj(xauthor, xmoment)`
|
|
129
131
|
```
|
|
130
132
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -182,7 +184,7 @@ Parameter rules:
|
|
|
182
184
|
|{string} author |(required)|
|
|
183
185
|
|{string} format |(optional)|
|
|
184
186
|
|
|
185
|
-
|
|
187
|
+
---
|
|
186
188
|
Summoning `makeMoment(author, format)`:
|
|
187
189
|
```javascript
|
|
188
190
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -204,6 +206,7 @@ Parameter rules:
|
|
|
204
206
|
|{string} xsecret |(required)|
|
|
205
207
|
|
|
206
208
|
|
|
209
|
+
---
|
|
207
210
|
Summoning `useSecret(xsecret)` & `isSecretUsed(xsecret)`:
|
|
208
211
|
```javascript
|
|
209
212
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -245,6 +248,7 @@ Parameter rules:
|
|
|
245
248
|
|{string} xsecret |(required)|
|
|
246
249
|
|
|
247
250
|
|
|
251
|
+
---
|
|
248
252
|
Summoning `getSecretObj(xsecret)`:
|
|
249
253
|
```javascript
|
|
250
254
|
|
|
@@ -283,6 +287,7 @@ Parameter rules:
|
|
|
283
287
|
| |(nothing) |
|
|
284
288
|
|
|
285
289
|
|
|
290
|
+
---
|
|
286
291
|
Summoning `makePioneer()`:
|
|
287
292
|
```javascript
|
|
288
293
|
|
|
@@ -308,6 +313,7 @@ Parameter rules:
|
|
|
308
313
|
| |(nothing) |
|
|
309
314
|
|
|
310
315
|
|
|
316
|
+
---
|
|
311
317
|
Summoning `getPioneerObj()`:
|
|
312
318
|
```javascript
|
|
313
319
|
|
|
@@ -362,6 +368,7 @@ Parameter rules:
|
|
|
362
368
|
|{string} format |(optional)|
|
|
363
369
|
|
|
364
370
|
|
|
371
|
+
---
|
|
365
372
|
Summoning `makeEntity(secret, format)`:
|
|
366
373
|
```javascript
|
|
367
374
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -386,6 +393,7 @@ Parameter rules:
|
|
|
386
393
|
|{string} xentity |(required)|
|
|
387
394
|
|
|
388
395
|
|
|
396
|
+
---
|
|
389
397
|
Summoning `getEntityObj(xentity)`:
|
|
390
398
|
```javascript
|
|
391
399
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -444,6 +452,7 @@ Parameter rules:
|
|
|
444
452
|
|{string} format |(optional)|
|
|
445
453
|
|
|
446
454
|
|
|
455
|
+
---
|
|
447
456
|
Summoning `makeNode(secret, text, format)`:
|
|
448
457
|
```javascript
|
|
449
458
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -469,6 +478,7 @@ Parameter rules:
|
|
|
469
478
|
|{string} xauthor |(optional)|
|
|
470
479
|
|
|
471
480
|
|
|
481
|
+
---
|
|
472
482
|
Summoning `getNodeObj(xnode)`:
|
|
473
483
|
```javascript
|
|
474
484
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -530,6 +540,7 @@ Parameter rules:
|
|
|
530
540
|
|{string} format |(optional)|
|
|
531
541
|
|
|
532
542
|
|
|
543
|
+
---
|
|
533
544
|
Summoning `makeNodelink(first, second, author, ancestor, format)`:
|
|
534
545
|
```javascript
|
|
535
546
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -555,6 +566,7 @@ Parameter rules:
|
|
|
555
566
|
|{string} xauthor |(optional)|
|
|
556
567
|
|
|
557
568
|
|
|
569
|
+
---
|
|
558
570
|
Summoning `getNodlinkeObj(xnodelink)`:
|
|
559
571
|
```javascript
|
|
560
572
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -591,7 +603,6 @@ Paths are the skeleton of the data trees built on pathchain. They are a linear w
|
|
|
591
603
|
|
|
592
604
|
#### Protocol Buffer file:
|
|
593
605
|
|
|
594
|
-
[path.proto](proto/path.proto)
|
|
595
606
|
``` proto
|
|
596
607
|
syntax = "proto3";
|
|
597
608
|
|
|
@@ -618,6 +629,7 @@ Parameter rules:
|
|
|
618
629
|
|{string} format |(optional)|
|
|
619
630
|
|
|
620
631
|
|
|
632
|
+
---
|
|
621
633
|
Summoning `makePath(secret, text, format)`:
|
|
622
634
|
```javascript
|
|
623
635
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -643,6 +655,7 @@ Parameter rules:
|
|
|
643
655
|
|{string} xauthor |(optional)|
|
|
644
656
|
|
|
645
657
|
|
|
658
|
+
---
|
|
646
659
|
Summoning `getPathObj(xpath)`:
|
|
647
660
|
```javascript
|
|
648
661
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -684,6 +697,7 @@ Parameter rules:
|
|
|
684
697
|
|{string} format |(optional)|
|
|
685
698
|
|
|
686
699
|
|
|
700
|
+
---
|
|
687
701
|
Summoning `makePathlink(first, second, author, ancestor, format)`:
|
|
688
702
|
```javascript
|
|
689
703
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -709,6 +723,7 @@ Parameter rules:
|
|
|
709
723
|
|{string} xauthor |(optional)|
|
|
710
724
|
|
|
711
725
|
|
|
726
|
+
---
|
|
712
727
|
Summoning `getNodlinkeObj(xpathlink)`:
|
|
713
728
|
```javascript
|
|
714
729
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -772,6 +787,7 @@ Parameter rules:
|
|
|
772
787
|
|{string} format |(optional)|
|
|
773
788
|
|
|
774
789
|
|
|
790
|
+
---
|
|
775
791
|
Summoning `makeTree(secret, text, format)`:
|
|
776
792
|
```javascript
|
|
777
793
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -798,6 +814,7 @@ Parameter rules:
|
|
|
798
814
|
|{string} xauthor |(optional)|
|
|
799
815
|
|
|
800
816
|
|
|
817
|
+
---
|
|
801
818
|
Summoning `getTreeObj(xtree)`:
|
|
802
819
|
```javascript
|
|
803
820
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -839,6 +856,7 @@ Parameter rules:
|
|
|
839
856
|
|{string} format |(optional)|
|
|
840
857
|
|
|
841
858
|
|
|
859
|
+
---
|
|
842
860
|
Summoning `makeTreelink(first, second, author, ancestor, format)`:
|
|
843
861
|
```javascript
|
|
844
862
|
const pathchain = require("pathchain"); // Summoning pathchain
|
|
@@ -864,6 +882,7 @@ Parameter rules:
|
|
|
864
882
|
|{string} xauthor |(optional)|
|
|
865
883
|
|
|
866
884
|
|
|
885
|
+
---
|
|
867
886
|
Summoning `getNodlinkeObj(xtreelink)`:
|
|
868
887
|
```javascript
|
|
869
888
|
const pathchain = require("pathchain"); // Summoning pathchain
|