@xyo-network/previous-hash-store-storage 2.73.0 → 2.73.1

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/dist/docs.json ADDED
@@ -0,0 +1,864 @@
1
+ {
2
+ "id": 0,
3
+ "name": "@xyo-network/previous-hash-store-storage",
4
+ "variant": "project",
5
+ "kind": 1,
6
+ "flags": {},
7
+ "children": [
8
+ {
9
+ "id": 6,
10
+ "name": "StoragePreviousHashStore",
11
+ "variant": "declaration",
12
+ "kind": 128,
13
+ "flags": {},
14
+ "children": [
15
+ {
16
+ "id": 9,
17
+ "name": "constructor",
18
+ "variant": "declaration",
19
+ "kind": 512,
20
+ "flags": {},
21
+ "sources": [
22
+ {
23
+ "fileName": "StoragePreviousHashStore.ts",
24
+ "line": 18,
25
+ "character": 2,
26
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L18"
27
+ }
28
+ ],
29
+ "signatures": [
30
+ {
31
+ "id": 10,
32
+ "name": "new StoragePreviousHashStore",
33
+ "variant": "signature",
34
+ "kind": 16384,
35
+ "flags": {},
36
+ "sources": [
37
+ {
38
+ "fileName": "StoragePreviousHashStore.ts",
39
+ "line": 18,
40
+ "character": 2,
41
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L18"
42
+ }
43
+ ],
44
+ "parameters": [
45
+ {
46
+ "id": 11,
47
+ "name": "opts",
48
+ "variant": "param",
49
+ "kind": 32768,
50
+ "flags": {
51
+ "isOptional": true
52
+ },
53
+ "type": {
54
+ "type": "reference",
55
+ "target": 2,
56
+ "name": "StoragePreviousHashOpts",
57
+ "package": "@xyo-network/previous-hash-store-storage"
58
+ }
59
+ }
60
+ ],
61
+ "type": {
62
+ "type": "reference",
63
+ "target": 6,
64
+ "name": "StoragePreviousHashStore",
65
+ "package": "@xyo-network/previous-hash-store-storage"
66
+ }
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "id": 12,
72
+ "name": "_namespace",
73
+ "variant": "declaration",
74
+ "kind": 1024,
75
+ "flags": {
76
+ "isPrivate": true
77
+ },
78
+ "sources": [
79
+ {
80
+ "fileName": "StoragePreviousHashStore.ts",
81
+ "line": 14,
82
+ "character": 10,
83
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L14"
84
+ }
85
+ ],
86
+ "type": {
87
+ "type": "intrinsic",
88
+ "name": "string"
89
+ },
90
+ "defaultValue": "StoragePreviousHashStore.DefaultNamespace"
91
+ },
92
+ {
93
+ "id": 13,
94
+ "name": "_storage",
95
+ "variant": "declaration",
96
+ "kind": 1024,
97
+ "flags": {
98
+ "isPrivate": true
99
+ },
100
+ "sources": [
101
+ {
102
+ "fileName": "StoragePreviousHashStore.ts",
103
+ "line": 15,
104
+ "character": 10,
105
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L15"
106
+ }
107
+ ],
108
+ "type": {
109
+ "type": "union",
110
+ "types": [
111
+ {
112
+ "type": "intrinsic",
113
+ "name": "undefined"
114
+ },
115
+ {
116
+ "type": "reference",
117
+ "target": {
118
+ "sourceFileName": "../../../../../../../../node_modules/store2/index.d.ts",
119
+ "qualifiedName": "StoreBase"
120
+ },
121
+ "name": "StoreBase",
122
+ "package": "store2"
123
+ }
124
+ ]
125
+ }
126
+ },
127
+ {
128
+ "id": 14,
129
+ "name": "_type",
130
+ "variant": "declaration",
131
+ "kind": 1024,
132
+ "flags": {
133
+ "isPrivate": true
134
+ },
135
+ "sources": [
136
+ {
137
+ "fileName": "StoragePreviousHashStore.ts",
138
+ "line": 16,
139
+ "character": 10,
140
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L16"
141
+ }
142
+ ],
143
+ "type": {
144
+ "type": "reference",
145
+ "target": 1,
146
+ "name": "Storage",
147
+ "package": "@xyo-network/previous-hash-store-storage"
148
+ },
149
+ "defaultValue": "StoragePreviousHashStore.DefaultStorageType"
150
+ },
151
+ {
152
+ "id": 7,
153
+ "name": "DefaultNamespace",
154
+ "variant": "declaration",
155
+ "kind": 1024,
156
+ "flags": {
157
+ "isStatic": true,
158
+ "isReadonly": true
159
+ },
160
+ "sources": [
161
+ {
162
+ "fileName": "StoragePreviousHashStore.ts",
163
+ "line": 12,
164
+ "character": 18,
165
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L12"
166
+ }
167
+ ],
168
+ "type": {
169
+ "type": "literal",
170
+ "value": "xyo-previous-hash-store"
171
+ },
172
+ "defaultValue": "'xyo-previous-hash-store'"
173
+ },
174
+ {
175
+ "id": 8,
176
+ "name": "DefaultStorageType",
177
+ "variant": "declaration",
178
+ "kind": 1024,
179
+ "flags": {
180
+ "isStatic": true,
181
+ "isReadonly": true
182
+ },
183
+ "sources": [
184
+ {
185
+ "fileName": "StoragePreviousHashStore.ts",
186
+ "line": 13,
187
+ "character": 18,
188
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L13"
189
+ }
190
+ ],
191
+ "type": {
192
+ "type": "reference",
193
+ "target": 1,
194
+ "name": "Storage",
195
+ "package": "@xyo-network/previous-hash-store-storage"
196
+ },
197
+ "defaultValue": "'local'"
198
+ },
199
+ {
200
+ "id": 15,
201
+ "name": "namespace",
202
+ "variant": "declaration",
203
+ "kind": 262144,
204
+ "flags": {},
205
+ "sources": [
206
+ {
207
+ "fileName": "StoragePreviousHashStore.ts",
208
+ "line": 24,
209
+ "character": 6,
210
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L24"
211
+ }
212
+ ],
213
+ "getSignature": {
214
+ "id": 16,
215
+ "name": "namespace",
216
+ "variant": "signature",
217
+ "kind": 524288,
218
+ "flags": {},
219
+ "sources": [
220
+ {
221
+ "fileName": "StoragePreviousHashStore.ts",
222
+ "line": 24,
223
+ "character": 2,
224
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L24"
225
+ }
226
+ ],
227
+ "type": {
228
+ "type": "intrinsic",
229
+ "name": "string"
230
+ }
231
+ }
232
+ },
233
+ {
234
+ "id": 19,
235
+ "name": "storage",
236
+ "variant": "declaration",
237
+ "kind": 262144,
238
+ "flags": {
239
+ "isPrivate": true
240
+ },
241
+ "sources": [
242
+ {
243
+ "fileName": "StoragePreviousHashStore.ts",
244
+ "line": 32,
245
+ "character": 14,
246
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L32"
247
+ }
248
+ ],
249
+ "getSignature": {
250
+ "id": 20,
251
+ "name": "storage",
252
+ "variant": "signature",
253
+ "kind": 524288,
254
+ "flags": {},
255
+ "sources": [
256
+ {
257
+ "fileName": "StoragePreviousHashStore.ts",
258
+ "line": 32,
259
+ "character": 2,
260
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L32"
261
+ }
262
+ ],
263
+ "type": {
264
+ "type": "reference",
265
+ "target": {
266
+ "sourceFileName": "../../../../../../../../node_modules/store2/index.d.ts",
267
+ "qualifiedName": "StoreBase"
268
+ },
269
+ "name": "StoreBase",
270
+ "package": "store2"
271
+ }
272
+ }
273
+ },
274
+ {
275
+ "id": 17,
276
+ "name": "type",
277
+ "variant": "declaration",
278
+ "kind": 262144,
279
+ "flags": {},
280
+ "sources": [
281
+ {
282
+ "fileName": "StoragePreviousHashStore.ts",
283
+ "line": 28,
284
+ "character": 6,
285
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L28"
286
+ }
287
+ ],
288
+ "getSignature": {
289
+ "id": 18,
290
+ "name": "type",
291
+ "variant": "signature",
292
+ "kind": 524288,
293
+ "flags": {},
294
+ "sources": [
295
+ {
296
+ "fileName": "StoragePreviousHashStore.ts",
297
+ "line": 28,
298
+ "character": 2,
299
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L28"
300
+ }
301
+ ],
302
+ "type": {
303
+ "type": "reference",
304
+ "target": 1,
305
+ "name": "Storage",
306
+ "package": "@xyo-network/previous-hash-store-storage"
307
+ }
308
+ }
309
+ },
310
+ {
311
+ "id": 21,
312
+ "name": "getItem",
313
+ "variant": "declaration",
314
+ "kind": 2048,
315
+ "flags": {},
316
+ "sources": [
317
+ {
318
+ "fileName": "StoragePreviousHashStore.ts",
319
+ "line": 37,
320
+ "character": 8,
321
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L37"
322
+ }
323
+ ],
324
+ "signatures": [
325
+ {
326
+ "id": 22,
327
+ "name": "getItem",
328
+ "variant": "signature",
329
+ "kind": 4096,
330
+ "flags": {},
331
+ "sources": [
332
+ {
333
+ "fileName": "StoragePreviousHashStore.ts",
334
+ "line": 37,
335
+ "character": 2,
336
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L37"
337
+ }
338
+ ],
339
+ "parameters": [
340
+ {
341
+ "id": 23,
342
+ "name": "address",
343
+ "variant": "param",
344
+ "kind": 32768,
345
+ "flags": {},
346
+ "type": {
347
+ "type": "intrinsic",
348
+ "name": "string"
349
+ }
350
+ }
351
+ ],
352
+ "type": {
353
+ "type": "reference",
354
+ "target": {
355
+ "sourceFileName": "../../../../../../../../node_modules/typescript/lib/lib.es5.d.ts",
356
+ "qualifiedName": "Promise"
357
+ },
358
+ "typeArguments": [
359
+ {
360
+ "type": "union",
361
+ "types": [
362
+ {
363
+ "type": "literal",
364
+ "value": null
365
+ },
366
+ {
367
+ "type": "intrinsic",
368
+ "name": "string"
369
+ }
370
+ ]
371
+ }
372
+ ],
373
+ "name": "Promise",
374
+ "package": "typescript"
375
+ },
376
+ "implementationOf": {
377
+ "type": "reference",
378
+ "target": -1,
379
+ "name": "PreviousHashStore.getItem"
380
+ }
381
+ }
382
+ ],
383
+ "implementationOf": {
384
+ "type": "reference",
385
+ "target": -1,
386
+ "name": "PreviousHashStore.getItem"
387
+ }
388
+ },
389
+ {
390
+ "id": 24,
391
+ "name": "removeItem",
392
+ "variant": "declaration",
393
+ "kind": 2048,
394
+ "flags": {},
395
+ "sources": [
396
+ {
397
+ "fileName": "StoragePreviousHashStore.ts",
398
+ "line": 41,
399
+ "character": 8,
400
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L41"
401
+ }
402
+ ],
403
+ "signatures": [
404
+ {
405
+ "id": 25,
406
+ "name": "removeItem",
407
+ "variant": "signature",
408
+ "kind": 4096,
409
+ "flags": {},
410
+ "sources": [
411
+ {
412
+ "fileName": "StoragePreviousHashStore.ts",
413
+ "line": 41,
414
+ "character": 2,
415
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L41"
416
+ }
417
+ ],
418
+ "parameters": [
419
+ {
420
+ "id": 26,
421
+ "name": "address",
422
+ "variant": "param",
423
+ "kind": 32768,
424
+ "flags": {},
425
+ "type": {
426
+ "type": "intrinsic",
427
+ "name": "string"
428
+ }
429
+ }
430
+ ],
431
+ "type": {
432
+ "type": "reference",
433
+ "target": {
434
+ "sourceFileName": "../../../../../../../../node_modules/typescript/lib/lib.es5.d.ts",
435
+ "qualifiedName": "Promise"
436
+ },
437
+ "typeArguments": [
438
+ {
439
+ "type": "intrinsic",
440
+ "name": "void"
441
+ }
442
+ ],
443
+ "name": "Promise",
444
+ "package": "typescript"
445
+ },
446
+ "implementationOf": {
447
+ "type": "reference",
448
+ "target": -1,
449
+ "name": "PreviousHashStore.removeItem"
450
+ }
451
+ }
452
+ ],
453
+ "implementationOf": {
454
+ "type": "reference",
455
+ "target": -1,
456
+ "name": "PreviousHashStore.removeItem"
457
+ }
458
+ },
459
+ {
460
+ "id": 27,
461
+ "name": "setItem",
462
+ "variant": "declaration",
463
+ "kind": 2048,
464
+ "flags": {},
465
+ "sources": [
466
+ {
467
+ "fileName": "StoragePreviousHashStore.ts",
468
+ "line": 44,
469
+ "character": 8,
470
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L44"
471
+ }
472
+ ],
473
+ "signatures": [
474
+ {
475
+ "id": 28,
476
+ "name": "setItem",
477
+ "variant": "signature",
478
+ "kind": 4096,
479
+ "flags": {},
480
+ "sources": [
481
+ {
482
+ "fileName": "StoragePreviousHashStore.ts",
483
+ "line": 44,
484
+ "character": 2,
485
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L44"
486
+ }
487
+ ],
488
+ "parameters": [
489
+ {
490
+ "id": 29,
491
+ "name": "address",
492
+ "variant": "param",
493
+ "kind": 32768,
494
+ "flags": {},
495
+ "type": {
496
+ "type": "intrinsic",
497
+ "name": "string"
498
+ }
499
+ },
500
+ {
501
+ "id": 30,
502
+ "name": "previousHash",
503
+ "variant": "param",
504
+ "kind": 32768,
505
+ "flags": {},
506
+ "type": {
507
+ "type": "intrinsic",
508
+ "name": "string"
509
+ }
510
+ }
511
+ ],
512
+ "type": {
513
+ "type": "reference",
514
+ "target": {
515
+ "sourceFileName": "../../../../../../../../node_modules/typescript/lib/lib.es5.d.ts",
516
+ "qualifiedName": "Promise"
517
+ },
518
+ "typeArguments": [
519
+ {
520
+ "type": "intrinsic",
521
+ "name": "void"
522
+ }
523
+ ],
524
+ "name": "Promise",
525
+ "package": "typescript"
526
+ },
527
+ "implementationOf": {
528
+ "type": "reference",
529
+ "target": -1,
530
+ "name": "PreviousHashStore.setItem"
531
+ }
532
+ }
533
+ ],
534
+ "implementationOf": {
535
+ "type": "reference",
536
+ "target": -1,
537
+ "name": "PreviousHashStore.setItem"
538
+ }
539
+ }
540
+ ],
541
+ "groups": [
542
+ {
543
+ "title": "Constructors",
544
+ "children": [
545
+ 9
546
+ ]
547
+ },
548
+ {
549
+ "title": "Properties",
550
+ "children": [
551
+ 12,
552
+ 13,
553
+ 14,
554
+ 7,
555
+ 8
556
+ ]
557
+ },
558
+ {
559
+ "title": "Accessors",
560
+ "children": [
561
+ 15,
562
+ 19,
563
+ 17
564
+ ]
565
+ },
566
+ {
567
+ "title": "Methods",
568
+ "children": [
569
+ 21,
570
+ 24,
571
+ 27
572
+ ]
573
+ }
574
+ ],
575
+ "sources": [
576
+ {
577
+ "fileName": "StoragePreviousHashStore.ts",
578
+ "line": 11,
579
+ "character": 13,
580
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L11"
581
+ }
582
+ ],
583
+ "implementedTypes": [
584
+ {
585
+ "type": "reference",
586
+ "target": {
587
+ "sourceFileName": "../model/dist/index.d.ts",
588
+ "qualifiedName": "PreviousHashStore"
589
+ },
590
+ "name": "PreviousHashStore",
591
+ "package": "@xyo-network/previous-hash-store-model"
592
+ }
593
+ ]
594
+ },
595
+ {
596
+ "id": 1,
597
+ "name": "Storage",
598
+ "variant": "declaration",
599
+ "kind": 4194304,
600
+ "flags": {},
601
+ "sources": [
602
+ {
603
+ "fileName": "StoragePreviousHashStore.ts",
604
+ "line": 4,
605
+ "character": 12,
606
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L4"
607
+ }
608
+ ],
609
+ "type": {
610
+ "type": "union",
611
+ "types": [
612
+ {
613
+ "type": "literal",
614
+ "value": "local"
615
+ },
616
+ {
617
+ "type": "literal",
618
+ "value": "session"
619
+ },
620
+ {
621
+ "type": "literal",
622
+ "value": "page"
623
+ }
624
+ ]
625
+ }
626
+ },
627
+ {
628
+ "id": 2,
629
+ "name": "StoragePreviousHashOpts",
630
+ "variant": "declaration",
631
+ "kind": 4194304,
632
+ "flags": {},
633
+ "sources": [
634
+ {
635
+ "fileName": "StoragePreviousHashStore.ts",
636
+ "line": 6,
637
+ "character": 12,
638
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L6"
639
+ }
640
+ ],
641
+ "type": {
642
+ "type": "reflection",
643
+ "declaration": {
644
+ "id": 3,
645
+ "name": "__type",
646
+ "variant": "declaration",
647
+ "kind": 65536,
648
+ "flags": {},
649
+ "children": [
650
+ {
651
+ "id": 4,
652
+ "name": "namespace",
653
+ "variant": "declaration",
654
+ "kind": 1024,
655
+ "flags": {
656
+ "isOptional": true
657
+ },
658
+ "sources": [
659
+ {
660
+ "fileName": "StoragePreviousHashStore.ts",
661
+ "line": 7,
662
+ "character": 2,
663
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L7"
664
+ }
665
+ ],
666
+ "type": {
667
+ "type": "intrinsic",
668
+ "name": "string"
669
+ }
670
+ },
671
+ {
672
+ "id": 5,
673
+ "name": "type",
674
+ "variant": "declaration",
675
+ "kind": 1024,
676
+ "flags": {
677
+ "isOptional": true
678
+ },
679
+ "sources": [
680
+ {
681
+ "fileName": "StoragePreviousHashStore.ts",
682
+ "line": 8,
683
+ "character": 2,
684
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L8"
685
+ }
686
+ ],
687
+ "type": {
688
+ "type": "reference",
689
+ "target": 1,
690
+ "name": "Storage",
691
+ "package": "@xyo-network/previous-hash-store-storage"
692
+ }
693
+ }
694
+ ],
695
+ "groups": [
696
+ {
697
+ "title": "Properties",
698
+ "children": [
699
+ 4,
700
+ 5
701
+ ]
702
+ }
703
+ ],
704
+ "sources": [
705
+ {
706
+ "fileName": "StoragePreviousHashStore.ts",
707
+ "line": 6,
708
+ "character": 38,
709
+ "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js/blob/ca169d4420ae1/packages/protocol/packages/account/packages/previous-hash-store/packages/storage/src/StoragePreviousHashStore.ts#L6"
710
+ }
711
+ ]
712
+ }
713
+ }
714
+ }
715
+ ],
716
+ "groups": [
717
+ {
718
+ "title": "Classes",
719
+ "children": [
720
+ 6
721
+ ]
722
+ },
723
+ {
724
+ "title": "Type Aliases",
725
+ "children": [
726
+ 1,
727
+ 2
728
+ ]
729
+ }
730
+ ],
731
+ "packageName": "@xyo-network/previous-hash-store-storage",
732
+ "readme": [
733
+ {
734
+ "kind": "text",
735
+ "text": "[![logo][]](https://xyo.network)\n\nPart of [sdk-xyo-clint-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js)\n\n## License\n\n> See the [LICENSE](LICENSE) file for license details\n\n## Credits\n\n[Made with 🔥 and ❄️ by XYO](https://xyo.network)\n\n[logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png"
736
+ }
737
+ ],
738
+ "symbolIdMap": {
739
+ "0": {
740
+ "sourceFileName": "src/index.ts",
741
+ "qualifiedName": ""
742
+ },
743
+ "1": {
744
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
745
+ "qualifiedName": "Storage"
746
+ },
747
+ "2": {
748
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
749
+ "qualifiedName": "StoragePreviousHashOpts"
750
+ },
751
+ "3": {
752
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
753
+ "qualifiedName": "__type"
754
+ },
755
+ "4": {
756
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
757
+ "qualifiedName": "__type.namespace"
758
+ },
759
+ "5": {
760
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
761
+ "qualifiedName": "__type.type"
762
+ },
763
+ "6": {
764
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
765
+ "qualifiedName": "StoragePreviousHashStore"
766
+ },
767
+ "7": {
768
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
769
+ "qualifiedName": "StoragePreviousHashStore.DefaultNamespace"
770
+ },
771
+ "8": {
772
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
773
+ "qualifiedName": "StoragePreviousHashStore.DefaultStorageType"
774
+ },
775
+ "9": {
776
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
777
+ "qualifiedName": "StoragePreviousHashStore.__constructor"
778
+ },
779
+ "10": {
780
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
781
+ "qualifiedName": "StoragePreviousHashStore"
782
+ },
783
+ "11": {
784
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
785
+ "qualifiedName": "opts"
786
+ },
787
+ "12": {
788
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
789
+ "qualifiedName": "StoragePreviousHashStore._namespace"
790
+ },
791
+ "13": {
792
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
793
+ "qualifiedName": "StoragePreviousHashStore._storage"
794
+ },
795
+ "14": {
796
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
797
+ "qualifiedName": "StoragePreviousHashStore._type"
798
+ },
799
+ "15": {
800
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
801
+ "qualifiedName": "StoragePreviousHashStore.namespace"
802
+ },
803
+ "16": {
804
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
805
+ "qualifiedName": "StoragePreviousHashStore.namespace"
806
+ },
807
+ "17": {
808
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
809
+ "qualifiedName": "StoragePreviousHashStore.type"
810
+ },
811
+ "18": {
812
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
813
+ "qualifiedName": "StoragePreviousHashStore.type"
814
+ },
815
+ "19": {
816
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
817
+ "qualifiedName": "StoragePreviousHashStore.storage"
818
+ },
819
+ "20": {
820
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
821
+ "qualifiedName": "StoragePreviousHashStore.storage"
822
+ },
823
+ "21": {
824
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
825
+ "qualifiedName": "StoragePreviousHashStore.getItem"
826
+ },
827
+ "22": {
828
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
829
+ "qualifiedName": "StoragePreviousHashStore.getItem"
830
+ },
831
+ "23": {
832
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
833
+ "qualifiedName": "address"
834
+ },
835
+ "24": {
836
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
837
+ "qualifiedName": "StoragePreviousHashStore.removeItem"
838
+ },
839
+ "25": {
840
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
841
+ "qualifiedName": "StoragePreviousHashStore.removeItem"
842
+ },
843
+ "26": {
844
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
845
+ "qualifiedName": "address"
846
+ },
847
+ "27": {
848
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
849
+ "qualifiedName": "StoragePreviousHashStore.setItem"
850
+ },
851
+ "28": {
852
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
853
+ "qualifiedName": "StoragePreviousHashStore.setItem"
854
+ },
855
+ "29": {
856
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
857
+ "qualifiedName": "address"
858
+ },
859
+ "30": {
860
+ "sourceFileName": "src/StoragePreviousHashStore.ts",
861
+ "qualifiedName": "previousHash"
862
+ }
863
+ }
864
+ }
@@ -1,10 +1,11 @@
1
1
  import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
2
- export type Storage = 'local' | 'session' | 'page';
3
- export type StoragePreviousHashOpts = {
2
+
3
+ type Storage = 'local' | 'session' | 'page';
4
+ type StoragePreviousHashOpts = {
4
5
  namespace?: string;
5
6
  type?: Storage;
6
7
  };
7
- export declare class StoragePreviousHashStore implements PreviousHashStore {
8
+ declare class StoragePreviousHashStore implements PreviousHashStore {
8
9
  static readonly DefaultNamespace = "xyo-previous-hash-store";
9
10
  static readonly DefaultStorageType: Storage;
10
11
  private _namespace;
@@ -18,4 +19,5 @@ export declare class StoragePreviousHashStore implements PreviousHashStore {
18
19
  removeItem(address: string): Promise<void>;
19
20
  setItem(address: string, previousHash: string): Promise<void>;
20
21
  }
21
- //# sourceMappingURL=StoragePreviousHashStore.d.ts.map
22
+
23
+ export { Storage, StoragePreviousHashOpts, StoragePreviousHashStore };
@@ -1,10 +1,11 @@
1
1
  import { PreviousHashStore } from '@xyo-network/previous-hash-store-model';
2
- export type Storage = 'local' | 'session' | 'page';
3
- export type StoragePreviousHashOpts = {
2
+
3
+ type Storage = 'local' | 'session' | 'page';
4
+ type StoragePreviousHashOpts = {
4
5
  namespace?: string;
5
6
  type?: Storage;
6
7
  };
7
- export declare class StoragePreviousHashStore implements PreviousHashStore {
8
+ declare class StoragePreviousHashStore implements PreviousHashStore {
8
9
  static readonly DefaultNamespace = "xyo-previous-hash-store";
9
10
  static readonly DefaultStorageType: Storage;
10
11
  private _namespace;
@@ -18,4 +19,5 @@ export declare class StoragePreviousHashStore implements PreviousHashStore {
18
19
  removeItem(address: string): Promise<void>;
19
20
  setItem(address: string, previousHash: string): Promise<void>;
20
21
  }
21
- //# sourceMappingURL=StoragePreviousHashStore.d.ts.map
22
+
23
+ export { Storage, StoragePreviousHashOpts, StoragePreviousHashStore };
package/dist/index.js ADDED
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/index.ts
31
+ var src_exports = {};
32
+ __export(src_exports, {
33
+ StoragePreviousHashStore: () => StoragePreviousHashStore
34
+ });
35
+ module.exports = __toCommonJS(src_exports);
36
+
37
+ // src/StoragePreviousHashStore.ts
38
+ var import_store2 = __toESM(require("store2"));
39
+ var StoragePreviousHashStore = class _StoragePreviousHashStore {
40
+ static DefaultNamespace = "xyo-previous-hash-store";
41
+ static DefaultStorageType = "local";
42
+ _namespace = _StoragePreviousHashStore.DefaultNamespace;
43
+ _storage;
44
+ _type = _StoragePreviousHashStore.DefaultStorageType;
45
+ constructor(opts) {
46
+ if (opts?.namespace)
47
+ this._namespace = opts.namespace;
48
+ if (opts?.type)
49
+ this._type = opts.type;
50
+ this._storage = import_store2.default[this.type].namespace(this.namespace);
51
+ }
52
+ get namespace() {
53
+ return this._namespace;
54
+ }
55
+ get type() {
56
+ return this._type;
57
+ }
58
+ get storage() {
59
+ if (!this?._storage)
60
+ this._storage = import_store2.default[this.type].namespace(this.namespace);
61
+ return this._storage;
62
+ }
63
+ async getItem(address) {
64
+ const value = await this.storage.get(address);
65
+ return value ?? null;
66
+ }
67
+ async removeItem(address) {
68
+ await this.storage.remove(address);
69
+ }
70
+ async setItem(address, previousHash) {
71
+ await this.storage.set(address, previousHash);
72
+ }
73
+ };
74
+ // Annotate the CommonJS export names for ESM import in node:
75
+ 0 && (module.exports = {
76
+ StoragePreviousHashStore
77
+ });
78
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts","../src/StoragePreviousHashStore.ts"],"sourcesContent":["export * from './StoragePreviousHashStore'\n","import { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport store, { StoreBase } from 'store2'\n\nexport type Storage = 'local' | 'session' | 'page'\n\nexport type StoragePreviousHashOpts = {\n namespace?: string\n type?: Storage\n}\n\nexport class StoragePreviousHashStore implements PreviousHashStore {\n static readonly DefaultNamespace = 'xyo-previous-hash-store'\n static readonly DefaultStorageType: Storage = 'local'\n private _namespace = StoragePreviousHashStore.DefaultNamespace\n private _storage: StoreBase | undefined\n private _type: Storage = StoragePreviousHashStore.DefaultStorageType\n\n constructor(opts?: StoragePreviousHashOpts) {\n if (opts?.namespace) this._namespace = opts.namespace\n if (opts?.type) this._type = opts.type\n this._storage = store[this.type].namespace(this.namespace)\n }\n\n get namespace() {\n return this._namespace\n }\n\n get type(): Storage {\n return this._type\n }\n\n private get storage(): StoreBase {\n if (!this?._storage) this._storage = store[this.type].namespace(this.namespace)\n return this._storage\n }\n\n async getItem(address: string): Promise<string | null> {\n const value = await this.storage.get(address)\n return value ?? null\n }\n async removeItem(address: string): Promise<void> {\n await this.storage.remove(address)\n }\n async setItem(address: string, previousHash: string): Promise<void> {\n await this.storage.set(address, previousHash)\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,oBAAiC;AAS1B,IAAM,2BAAN,MAAM,0BAAsD;AAAA,EACjE,OAAgB,mBAAmB;AAAA,EACnC,OAAgB,qBAA8B;AAAA,EACtC,aAAa,0BAAyB;AAAA,EACtC;AAAA,EACA,QAAiB,0BAAyB;AAAA,EAElD,YAAY,MAAgC;AAC1C,QAAI,MAAM;AAAW,WAAK,aAAa,KAAK;AAC5C,QAAI,MAAM;AAAM,WAAK,QAAQ,KAAK;AAClC,SAAK,WAAW,cAAAA,QAAM,KAAK,IAAI,EAAE,UAAU,KAAK,SAAS;AAAA,EAC3D;AAAA,EAEA,IAAI,YAAY;AACd,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,OAAgB;AAClB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAY,UAAqB;AAC/B,QAAI,CAAC,MAAM;AAAU,WAAK,WAAW,cAAAA,QAAM,KAAK,IAAI,EAAE,UAAU,KAAK,SAAS;AAC9E,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAM,QAAQ,SAAyC;AACrD,UAAM,QAAQ,MAAM,KAAK,QAAQ,IAAI,OAAO;AAC5C,WAAO,SAAS;AAAA,EAClB;AAAA,EACA,MAAM,WAAW,SAAgC;AAC/C,UAAM,KAAK,QAAQ,OAAO,OAAO;AAAA,EACnC;AAAA,EACA,MAAM,QAAQ,SAAiB,cAAqC;AAClE,UAAM,KAAK,QAAQ,IAAI,SAAS,YAAY;AAAA,EAC9C;AACF;","names":["store"]}
package/dist/index.mjs ADDED
@@ -0,0 +1,41 @@
1
+ // src/StoragePreviousHashStore.ts
2
+ import store from "store2";
3
+ var StoragePreviousHashStore = class _StoragePreviousHashStore {
4
+ static DefaultNamespace = "xyo-previous-hash-store";
5
+ static DefaultStorageType = "local";
6
+ _namespace = _StoragePreviousHashStore.DefaultNamespace;
7
+ _storage;
8
+ _type = _StoragePreviousHashStore.DefaultStorageType;
9
+ constructor(opts) {
10
+ if (opts?.namespace)
11
+ this._namespace = opts.namespace;
12
+ if (opts?.type)
13
+ this._type = opts.type;
14
+ this._storage = store[this.type].namespace(this.namespace);
15
+ }
16
+ get namespace() {
17
+ return this._namespace;
18
+ }
19
+ get type() {
20
+ return this._type;
21
+ }
22
+ get storage() {
23
+ if (!this?._storage)
24
+ this._storage = store[this.type].namespace(this.namespace);
25
+ return this._storage;
26
+ }
27
+ async getItem(address) {
28
+ const value = await this.storage.get(address);
29
+ return value ?? null;
30
+ }
31
+ async removeItem(address) {
32
+ await this.storage.remove(address);
33
+ }
34
+ async setItem(address, previousHash) {
35
+ await this.storage.set(address, previousHash);
36
+ }
37
+ };
38
+ export {
39
+ StoragePreviousHashStore
40
+ };
41
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/StoragePreviousHashStore.ts"],"sourcesContent":["import { PreviousHashStore } from '@xyo-network/previous-hash-store-model'\nimport store, { StoreBase } from 'store2'\n\nexport type Storage = 'local' | 'session' | 'page'\n\nexport type StoragePreviousHashOpts = {\n namespace?: string\n type?: Storage\n}\n\nexport class StoragePreviousHashStore implements PreviousHashStore {\n static readonly DefaultNamespace = 'xyo-previous-hash-store'\n static readonly DefaultStorageType: Storage = 'local'\n private _namespace = StoragePreviousHashStore.DefaultNamespace\n private _storage: StoreBase | undefined\n private _type: Storage = StoragePreviousHashStore.DefaultStorageType\n\n constructor(opts?: StoragePreviousHashOpts) {\n if (opts?.namespace) this._namespace = opts.namespace\n if (opts?.type) this._type = opts.type\n this._storage = store[this.type].namespace(this.namespace)\n }\n\n get namespace() {\n return this._namespace\n }\n\n get type(): Storage {\n return this._type\n }\n\n private get storage(): StoreBase {\n if (!this?._storage) this._storage = store[this.type].namespace(this.namespace)\n return this._storage\n }\n\n async getItem(address: string): Promise<string | null> {\n const value = await this.storage.get(address)\n return value ?? null\n }\n async removeItem(address: string): Promise<void> {\n await this.storage.remove(address)\n }\n async setItem(address: string, previousHash: string): Promise<void> {\n await this.storage.set(address, previousHash)\n }\n}\n"],"mappings":";AACA,OAAO,WAA0B;AAS1B,IAAM,2BAAN,MAAM,0BAAsD;AAAA,EACjE,OAAgB,mBAAmB;AAAA,EACnC,OAAgB,qBAA8B;AAAA,EACtC,aAAa,0BAAyB;AAAA,EACtC;AAAA,EACA,QAAiB,0BAAyB;AAAA,EAElD,YAAY,MAAgC;AAC1C,QAAI,MAAM;AAAW,WAAK,aAAa,KAAK;AAC5C,QAAI,MAAM;AAAM,WAAK,QAAQ,KAAK;AAClC,SAAK,WAAW,MAAM,KAAK,IAAI,EAAE,UAAU,KAAK,SAAS;AAAA,EAC3D;AAAA,EAEA,IAAI,YAAY;AACd,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAI,OAAgB;AAClB,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,IAAY,UAAqB;AAC/B,QAAI,CAAC,MAAM;AAAU,WAAK,WAAW,MAAM,KAAK,IAAI,EAAE,UAAU,KAAK,SAAS;AAC9E,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAM,QAAQ,SAAyC;AACrD,UAAM,QAAQ,MAAM,KAAK,QAAQ,IAAI,OAAO;AAC5C,WAAO,SAAS;AAAA,EAClB;AAAA,EACA,MAAM,WAAW,SAAgC;AAC/C,UAAM,KAAK,QAAQ,OAAO,OAAO;AAAA,EACnC;AAAA,EACA,MAAM,QAAQ,SAAiB,cAAqC;AAClE,UAAM,KAAK,QAAQ,IAAI,SAAS,YAAY;AAAA,EAC9C;AACF;","names":[]}
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "description": "Primary SDK for using XYO Protocol 2.0",
13
13
  "dependencies": {
14
- "@xyo-network/previous-hash-store-model": "~2.73.0",
14
+ "@xyo-network/previous-hash-store-model": "~2.73.1",
15
15
  "store2": "^2.14.2"
16
16
  },
17
17
  "devDependencies": {
@@ -58,7 +58,11 @@
58
58
  "type": "git",
59
59
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
60
60
  },
61
+ "scripts": {
62
+ "package-compile": "tsup && publint",
63
+ "package-recompile": "tsup && publint"
64
+ },
61
65
  "sideEffects": false,
62
66
  "types": "dist/index.d.ts",
63
- "version": "2.73.0"
67
+ "version": "2.73.1"
64
68
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"StoragePreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/StoragePreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAG1E,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,MAAM,CAAC,QAAQ,CAAC,gBAAgB,6BAA4B;IAC5D,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAU;IACrD,OAAO,CAAC,UAAU,CAA4C;IAC9D,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,KAAK,CAAuD;gBAExD,IAAI,CAAC,EAAE,uBAAuB;IAM1C,IAAI,SAAS,WAEZ;IAED,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,OAAO,KAAK,OAAO,GAGlB;IAEK,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIhD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAG1C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGpE"}
@@ -1,47 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StoragePreviousHashStore = void 0;
4
- const tslib_1 = require("tslib");
5
- const store2_1 = tslib_1.__importDefault(require("store2"));
6
- class StoragePreviousHashStore {
7
- constructor(opts) {
8
- this._namespace = StoragePreviousHashStore.DefaultNamespace;
9
- this._type = StoragePreviousHashStore.DefaultStorageType;
10
- if (opts === null || opts === void 0 ? void 0 : opts.namespace)
11
- this._namespace = opts.namespace;
12
- if (opts === null || opts === void 0 ? void 0 : opts.type)
13
- this._type = opts.type;
14
- this._storage = store2_1.default[this.type].namespace(this.namespace);
15
- }
16
- get namespace() {
17
- return this._namespace;
18
- }
19
- get type() {
20
- return this._type;
21
- }
22
- get storage() {
23
- if (!(this === null || this === void 0 ? void 0 : this._storage))
24
- this._storage = store2_1.default[this.type].namespace(this.namespace);
25
- return this._storage;
26
- }
27
- getItem(address) {
28
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
29
- const value = yield this.storage.get(address);
30
- return value !== null && value !== void 0 ? value : null;
31
- });
32
- }
33
- removeItem(address) {
34
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
35
- yield this.storage.remove(address);
36
- });
37
- }
38
- setItem(address, previousHash) {
39
- return tslib_1.__awaiter(this, void 0, void 0, function* () {
40
- yield this.storage.set(address, previousHash);
41
- });
42
- }
43
- }
44
- exports.StoragePreviousHashStore = StoragePreviousHashStore;
45
- StoragePreviousHashStore.DefaultNamespace = 'xyo-previous-hash-store';
46
- StoragePreviousHashStore.DefaultStorageType = 'local';
47
- //# sourceMappingURL=StoragePreviousHashStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StoragePreviousHashStore.js","sourceRoot":"","sources":["../../src/StoragePreviousHashStore.ts"],"names":[],"mappings":";;;;AACA,4DAAyC;AASzC,MAAa,wBAAwB;IAOnC,YAAY,IAA8B;QAJlC,eAAU,GAAG,wBAAwB,CAAC,gBAAgB,CAAA;QAEtD,UAAK,GAAY,wBAAwB,CAAC,kBAAkB,CAAA;QAGlE,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,SAAS;YAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAA;QACrD,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAA;QACtC,IAAI,CAAC,QAAQ,GAAG,gBAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAC5D,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IAED,IAAY,OAAO;QACjB,IAAI,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,CAAA;YAAE,IAAI,CAAC,QAAQ,GAAG,gBAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC/E,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IAEK,OAAO,CAAC,OAAe;;YAC3B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;YAC7C,OAAO,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAA;QACtB,CAAC;KAAA;IACK,UAAU,CAAC,OAAe;;YAC9B,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;QACpC,CAAC;KAAA;IACK,OAAO,CAAC,OAAe,EAAE,YAAoB;;YACjD,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;QAC/C,CAAC;KAAA;;AAnCH,4DAoCC;AAnCiB,yCAAgB,GAAG,yBAAyB,AAA5B,CAA4B;AAC5C,2CAAkB,GAAY,OAAO,AAAnB,CAAmB"}
@@ -1,2 +0,0 @@
1
- export * from './StoragePreviousHashStore';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA"}
package/dist/cjs/index.js DELETED
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./StoragePreviousHashStore"), exports);
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;AAAA,qEAA0C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"StoragePreviousHashStore.d.ts","sourceRoot":"","sources":["../../src/StoragePreviousHashStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAA;AAG1E,MAAM,MAAM,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAA;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;CACf,CAAA;AAED,qBAAa,wBAAyB,YAAW,iBAAiB;IAChE,MAAM,CAAC,QAAQ,CAAC,gBAAgB,6BAA4B;IAC5D,MAAM,CAAC,QAAQ,CAAC,kBAAkB,EAAE,OAAO,CAAU;IACrD,OAAO,CAAC,UAAU,CAA4C;IAC9D,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,KAAK,CAAuD;gBAExD,IAAI,CAAC,EAAE,uBAAuB;IAM1C,IAAI,SAAS,WAEZ;IAED,IAAI,IAAI,IAAI,OAAO,CAElB;IAED,OAAO,KAAK,OAAO,GAGlB;IAEK,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAIhD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAG1C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGpE"}
@@ -1,37 +0,0 @@
1
- import store from 'store2';
2
- export class StoragePreviousHashStore {
3
- static DefaultNamespace = 'xyo-previous-hash-store';
4
- static DefaultStorageType = 'local';
5
- _namespace = StoragePreviousHashStore.DefaultNamespace;
6
- _storage;
7
- _type = StoragePreviousHashStore.DefaultStorageType;
8
- constructor(opts) {
9
- if (opts?.namespace)
10
- this._namespace = opts.namespace;
11
- if (opts?.type)
12
- this._type = opts.type;
13
- this._storage = store[this.type].namespace(this.namespace);
14
- }
15
- get namespace() {
16
- return this._namespace;
17
- }
18
- get type() {
19
- return this._type;
20
- }
21
- get storage() {
22
- if (!this?._storage)
23
- this._storage = store[this.type].namespace(this.namespace);
24
- return this._storage;
25
- }
26
- async getItem(address) {
27
- const value = await this.storage.get(address);
28
- return value ?? null;
29
- }
30
- async removeItem(address) {
31
- await this.storage.remove(address);
32
- }
33
- async setItem(address, previousHash) {
34
- await this.storage.set(address, previousHash);
35
- }
36
- }
37
- //# sourceMappingURL=StoragePreviousHashStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StoragePreviousHashStore.js","sourceRoot":"","sources":["../../src/StoragePreviousHashStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,QAAQ,CAAA;AASzC,MAAM,OAAO,wBAAwB;IACnC,MAAM,CAAU,gBAAgB,GAAG,yBAAyB,CAAA;IAC5D,MAAM,CAAU,kBAAkB,GAAY,OAAO,CAAA;IAC7C,UAAU,GAAG,wBAAwB,CAAC,gBAAgB,CAAA;IACtD,QAAQ,CAAuB;IAC/B,KAAK,GAAY,wBAAwB,CAAC,kBAAkB,CAAA;IAEpE,YAAY,IAA8B;QACxC,IAAI,IAAI,EAAE,SAAS;YAAE,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,SAAS,CAAA;QACrD,IAAI,IAAI,EAAE,IAAI;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAA;QACtC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;IAC5D,CAAC;IAED,IAAI,SAAS;QACX,OAAO,IAAI,CAAC,UAAU,CAAA;IACxB,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,KAAK,CAAA;IACnB,CAAC;IAED,IAAY,OAAO;QACjB,IAAI,CAAC,IAAI,EAAE,QAAQ;YAAE,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QAC/E,OAAO,IAAI,CAAC,QAAQ,CAAA;IACtB,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,OAAe;QAC3B,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAA;QAC7C,OAAO,KAAK,IAAI,IAAI,CAAA;IACtB,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,OAAe;QAC9B,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACpC,CAAC;IACD,KAAK,CAAC,OAAO,CAAC,OAAe,EAAE,YAAoB;QACjD,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,YAAY,CAAC,CAAA;IAC/C,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from './StoragePreviousHashStore';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA"}
package/dist/esm/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from './StoragePreviousHashStore';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA"}