@xyo-network/diviner-payload-indexeddb 5.3.24 → 5.3.26

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.
Files changed (2) hide show
  1. package/README.md +2769 -10
  2. package/package.json +25 -25
package/README.md CHANGED
@@ -1,23 +1,2782 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/diviner-payload-indexeddb
2
4
 
3
- [![logo][]](https://xyo.network)
5
+ [![npm][npm-badge]][npm-link]
6
+ [![license][license-badge]][license-link]
7
+
8
+ > Primary SDK for using XYO Protocol 2.0
9
+
10
+ ## Install
11
+
12
+ Using npm:
13
+
14
+ ```sh
15
+ npm install {{name}}
16
+ ```
17
+
18
+ Using yarn:
4
19
 
5
- Version: 5.0.2
20
+ ```sh
21
+ yarn add {{name}}
22
+ ```
6
23
 
7
- Primary SDK for using XYO Protocol 2.0
24
+ Using pnpm:
8
25
 
9
- ## Documentation
26
+ ```sh
27
+ pnpm add {{name}}
28
+ ```
10
29
 
11
- [TypeDoc Generated Documentation](https://gitbook.xyo.network/xyo-data-lab/xyo-reference/package-documentation/xyo-network__diviner-payload-indexeddb)
30
+ Using bun:
31
+
32
+ ```sh
33
+ bun add {{name}}
34
+ ```
12
35
 
13
- Part of [sdk-xyo-client-js](https://www.npmjs.com/package/@xyo-network/sdk-xyo-client-js)
14
36
 
15
37
  ## License
16
38
 
17
- > See the [LICENSE](LICENSE) file for license details
39
+ See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
40
+
41
+ ## Reference
42
+
43
+ ### packages
44
+
45
+ ### modules
46
+
47
+ ### packages
48
+
49
+ ### diviner
50
+
51
+ ### packages
52
+
53
+ ### indexeddb
54
+
55
+ ### packages
56
+
57
+ ### payload
58
+
59
+ ### .temp-typedoc
60
+
61
+ ### classes
62
+
63
+ ### <a id="IndexedDbPayloadDiviner"></a>IndexedDbPayloadDiviner
64
+
65
+ [**@xyo-network/diviner-payload-indexeddb**](#../README)
66
+
67
+ ***
68
+
69
+ ## Extends
70
+
71
+ - `PayloadDiviner`\<`TParams`, `TIn`, `TOut`, `TEventData`\>
72
+
73
+ ## Type Parameters
74
+
75
+ ### TParams
76
+
77
+ `TParams` *extends* [`IndexedDbPayloadDivinerParams`](#../type-aliases/IndexedDbPayloadDivinerParams) = [`IndexedDbPayloadDivinerParams`](#../type-aliases/IndexedDbPayloadDivinerParams)
78
+
79
+ ### TIn
80
+
81
+ `TIn` *extends* `PayloadDivinerQueryPayload` = `PayloadDivinerQueryPayload`
82
+
83
+ ### TOut
84
+
85
+ `TOut` *extends* `Payload` = `Payload`
86
+
87
+ ### TEventData
88
+
89
+ `TEventData` *extends* `DivinerModuleEventData`\<`DivinerInstance`\<`TParams`, `TIn`, `TOut`\>, `TIn`, `TOut`\> = `DivinerModuleEventData`\<`DivinerInstance`\<`TParams`, `TIn`, `TOut`\>, `TIn`, `TOut`\>
90
+
91
+ ## Constructors
92
+
93
+ ### Constructor
94
+
95
+ ```ts
96
+ new IndexedDbPayloadDiviner<TParams, TIn, TOut, TEventData>(key, params): IndexedDbPayloadDiviner<TParams, TIn, TOut, TEventData>;
97
+ ```
98
+
99
+ ### Parameters
100
+
101
+ #### key
102
+
103
+ `unknown`
104
+
105
+ #### params
106
+
107
+ `Partial`\<`TParams` & `RequiredCreatableParams`\>
108
+
109
+ ### Returns
110
+
111
+ `IndexedDbPayloadDiviner`\<`TParams`, `TIn`, `TOut`, `TEventData`\>
112
+
113
+ ### Inherited from
114
+
115
+ ```ts
116
+ PayloadDiviner<TParams, TIn, TOut, TEventData>.constructor
117
+ ```
118
+
119
+ ## Properties
120
+
121
+ ### targetSchema
122
+
123
+ ```ts
124
+ readonly static targetSchema: Schema;
125
+ ```
126
+
127
+ ### Inherited from
128
+
129
+ ```ts
130
+ PayloadDiviner.targetSchema
131
+ ```
132
+
133
+ ***
134
+
135
+ ### uniqueName
136
+
137
+ ```ts
138
+ readonly static uniqueName: string;
139
+ ```
140
+
141
+ ### Inherited from
142
+
143
+ ```ts
144
+ PayloadDiviner.uniqueName
145
+ ```
146
+
147
+ ***
148
+
149
+ ### configSchemas
150
+
151
+ ```ts
152
+ readonly static configSchemas: Schema[];
153
+ ```
154
+
155
+ ### Overrides
156
+
157
+ ```ts
158
+ PayloadDiviner.configSchemas
159
+ ```
160
+
161
+ ***
162
+
163
+ ### defaultConfigSchema
164
+
165
+ ```ts
166
+ readonly static defaultConfigSchema: Schema = IndexedDbPayloadDivinerConfigSchema;
167
+ ```
168
+
169
+ ### Overrides
170
+
171
+ ```ts
172
+ PayloadDiviner.defaultConfigSchema
173
+ ```
174
+
175
+ ***
176
+
177
+ ### allowRandomAccount
178
+
179
+ ```ts
180
+ readonly static allowRandomAccount: boolean;
181
+ ```
182
+
183
+ ### Inherited from
184
+
185
+ ```ts
186
+ PayloadDiviner.allowRandomAccount
187
+ ```
188
+
189
+ ***
190
+
191
+ ### defaultLogger
192
+
193
+ ```ts
194
+ static defaultLogger: Logger;
195
+ ```
196
+
197
+ ### Inherited from
198
+
199
+ ```ts
200
+ PayloadDiviner.defaultLogger
201
+ ```
202
+
203
+ ***
204
+
205
+ ### enableLazyLoad
206
+
207
+ ```ts
208
+ static enableLazyLoad: boolean;
209
+ ```
210
+
211
+ ### Inherited from
212
+
213
+ ```ts
214
+ PayloadDiviner.enableLazyLoad
215
+ ```
216
+
217
+ ***
218
+
219
+ ### labels
220
+
221
+ ```ts
222
+ readonly static labels: Labels;
223
+ ```
224
+
225
+ ### Inherited from
226
+
227
+ ```ts
228
+ PayloadDiviner.labels
229
+ ```
230
+
231
+ ***
232
+
233
+ ### privateConstructorKey
234
+
235
+ ```ts
236
+ protected static privateConstructorKey: string;
237
+ ```
238
+
239
+ ### Inherited from
240
+
241
+ ```ts
242
+ PayloadDiviner.privateConstructorKey
243
+ ```
244
+
245
+ ***
246
+
247
+ ### \_account
248
+
249
+ ```ts
250
+ protected _account: AccountInstance | undefined;
251
+ ```
252
+
253
+ ### Inherited from
254
+
255
+ ```ts
256
+ PayloadDiviner._account
257
+ ```
258
+
259
+ ***
260
+
261
+ ### \_cachedManifests
262
+
263
+ ```ts
264
+ protected _cachedManifests: LRUCache<number, ModuleManifestPayload, unknown>;
265
+ ```
266
+
267
+ ### Inherited from
268
+
269
+ ```ts
270
+ PayloadDiviner._cachedManifests
271
+ ```
272
+
273
+ ***
274
+
275
+ ### \_globalReentrancyMutex
276
+
277
+ ```ts
278
+ protected _globalReentrancyMutex: Mutex | undefined;
279
+ ```
280
+
281
+ ### Inherited from
282
+
283
+ ```ts
284
+ PayloadDiviner._globalReentrancyMutex
285
+ ```
286
+
287
+ ***
288
+
289
+ ### \_lastError?
290
+
291
+ ```ts
292
+ protected optional _lastError?: ModuleDetailsError;
293
+ ```
294
+
295
+ ### Inherited from
296
+
297
+ ```ts
298
+ PayloadDiviner._lastError
299
+ ```
300
+
301
+ ***
302
+
303
+ ### \_moduleConfigQueryValidator
304
+
305
+ ```ts
306
+ protected _moduleConfigQueryValidator: Queryable | undefined;
307
+ ```
308
+
309
+ ### Inherited from
310
+
311
+ ```ts
312
+ PayloadDiviner._moduleConfigQueryValidator
313
+ ```
314
+
315
+ ***
316
+
317
+ ### \_supportedQueryValidator
318
+
319
+ ```ts
320
+ protected _supportedQueryValidator: Queryable | undefined;
321
+ ```
322
+
323
+ ### Inherited from
324
+
325
+ ```ts
326
+ PayloadDiviner._supportedQueryValidator
327
+ ```
328
+
329
+ ***
330
+
331
+ ### useNewResolver
332
+
333
+ ```ts
334
+ readonly static useNewResolver: false = false;
335
+ ```
336
+
337
+ ### Inherited from
338
+
339
+ ```ts
340
+ PayloadDiviner.useNewResolver
341
+ ```
342
+
343
+ ## Accessors
344
+
345
+ ### queries
346
+
347
+ ### Get Signature
348
+
349
+ ```ts
350
+ get queries(): Schema[];
351
+ ```
352
+
353
+ #### Returns
354
+
355
+ `Schema`[]
356
+
357
+ ### Inherited from
358
+
359
+ ```ts
360
+ PayloadDiviner.queries
361
+ ```
362
+
363
+ ***
364
+
365
+ ### dbName
366
+
367
+ ### Get Signature
368
+
369
+ ```ts
370
+ get dbName(): string;
371
+ ```
372
+
373
+ The database name. If not supplied via config, it defaults
374
+ to the archivist's name and if archivist's name is not supplied,
375
+ it defaults to `archivist`. This behavior
376
+ biases towards a single, isolated DB per archivist which seems to
377
+ make the most sense for 99% of use cases.
378
+
379
+ #### Returns
380
+
381
+ `string`
382
+
383
+ ***
384
+
385
+ ### dbVersion
386
+
387
+ ### Get Signature
388
+
389
+ ```ts
390
+ get dbVersion(): number;
391
+ ```
392
+
393
+ The database version. If not supplied via config, it defaults to the archivist default version.
394
+
395
+ #### Returns
396
+
397
+ `number`
398
+
399
+ ***
400
+
401
+ ### storeName
402
+
403
+ ### Get Signature
404
+
405
+ ```ts
406
+ get storeName(): string;
407
+ ```
408
+
409
+ The name of the object store. If not supplied via config, it defaults
410
+ to `payloads`.
411
+
412
+ #### Returns
413
+
414
+ `string`
415
+
416
+ ***
417
+
418
+ ### account
419
+
420
+ ### Get Signature
421
+
422
+ ```ts
423
+ get account(): AccountInstance;
424
+ ```
425
+
426
+ #### Returns
427
+
428
+ `AccountInstance`
429
+
430
+ ### Inherited from
431
+
432
+ ```ts
433
+ PayloadDiviner.account
434
+ ```
435
+
436
+ ***
437
+
438
+ ### additionalSigners
439
+
440
+ ### Get Signature
441
+
442
+ ```ts
443
+ get additionalSigners(): AccountInstance[];
444
+ ```
445
+
446
+ #### Returns
447
+
448
+ `AccountInstance`[]
449
+
450
+ ### Inherited from
451
+
452
+ ```ts
453
+ PayloadDiviner.additionalSigners
454
+ ```
455
+
456
+ ***
457
+
458
+ ### address
459
+
460
+ ### Get Signature
461
+
462
+ ```ts
463
+ get address(): Lowercase<string> & object & object;
464
+ ```
465
+
466
+ #### Returns
467
+
468
+ `Lowercase`\<`string`\> & `object` & `object`
469
+
470
+ ### Inherited from
471
+
472
+ ```ts
473
+ PayloadDiviner.address
474
+ ```
475
+
476
+ ***
477
+
478
+ ### allowAnonymous
479
+
480
+ ### Get Signature
481
+
482
+ ```ts
483
+ get allowAnonymous(): boolean;
484
+ ```
485
+
486
+ #### Returns
487
+
488
+ `boolean`
489
+
490
+ ### Inherited from
491
+
492
+ ```ts
493
+ PayloadDiviner.allowAnonymous
494
+ ```
495
+
496
+ ***
497
+
498
+ ### allowNameResolution
499
+
500
+ ### Get Signature
501
+
502
+ ```ts
503
+ get allowNameResolution(): boolean;
504
+ ```
505
+
506
+ #### Returns
507
+
508
+ `boolean`
509
+
510
+ ### Inherited from
511
+
512
+ ```ts
513
+ PayloadDiviner.allowNameResolution
514
+ ```
515
+
516
+ ***
517
+
518
+ ### archiving
519
+
520
+ ### Get Signature
521
+
522
+ ```ts
523
+ get archiving():
524
+ | {
525
+ archivists?: ModuleIdentifier[];
526
+ queries?: Schema[];
527
+ }
528
+ | undefined;
529
+ ```
530
+
531
+ #### Returns
532
+
533
+ \| \{
534
+ `archivists?`: `ModuleIdentifier`[];
535
+ `queries?`: `Schema`[];
536
+ \}
537
+ \| `undefined`
538
+
539
+ ### Inherited from
540
+
541
+ ```ts
542
+ PayloadDiviner.archiving
543
+ ```
544
+
545
+ ***
546
+
547
+ ### archivist
548
+
549
+ ### Get Signature
550
+
551
+ ```ts
552
+ get archivist(): ModuleIdentifier | undefined;
553
+ ```
554
+
555
+ #### Returns
556
+
557
+ `ModuleIdentifier` \| `undefined`
558
+
559
+ ### Inherited from
560
+
561
+ ```ts
562
+ PayloadDiviner.archivist
563
+ ```
564
+
565
+ ***
566
+
567
+ ### config
568
+
569
+ ### Get Signature
570
+
571
+ ```ts
572
+ get config(): TParams["config"] & object;
573
+ ```
574
+
575
+ #### Returns
576
+
577
+ `TParams`\[`"config"`\] & `object`
578
+
579
+ ### Inherited from
580
+
581
+ ```ts
582
+ PayloadDiviner.config
583
+ ```
584
+
585
+ ***
586
+
587
+ ### dead
588
+
589
+ ### Get Signature
590
+
591
+ ```ts
592
+ get dead(): boolean;
593
+ ```
594
+
595
+ #### Returns
596
+
597
+ `boolean`
598
+
599
+ ### Inherited from
600
+
601
+ ```ts
602
+ PayloadDiviner.dead
603
+ ```
604
+
605
+ ***
606
+
607
+ ### ephemeralQueryAccountEnabled
608
+
609
+ ### Get Signature
610
+
611
+ ```ts
612
+ get ephemeralQueryAccountEnabled(): boolean;
613
+ ```
614
+
615
+ #### Returns
616
+
617
+ `boolean`
618
+
619
+ ### Inherited from
620
+
621
+ ```ts
622
+ PayloadDiviner.ephemeralQueryAccountEnabled
623
+ ```
624
+
625
+ ***
626
+
627
+ ### globalReentrancyMutex
628
+
629
+ ### Get Signature
630
+
631
+ ```ts
632
+ get globalReentrancyMutex(): Mutex | undefined;
633
+ ```
634
+
635
+ #### Returns
636
+
637
+ `Mutex` \| `undefined`
638
+
639
+ ### Inherited from
640
+
641
+ ```ts
642
+ PayloadDiviner.globalReentrancyMutex
643
+ ```
644
+
645
+ ***
646
+
647
+ ### id
648
+
649
+ ### Get Signature
650
+
651
+ ```ts
652
+ get id(): string;
653
+ ```
654
+
655
+ The name (if specified) or address of the module
656
+
657
+ #### Returns
658
+
659
+ `string`
660
+
661
+ ### Inherited from
662
+
663
+ ```ts
664
+ PayloadDiviner.id
665
+ ```
666
+
667
+ ***
668
+
669
+ ### logger
670
+
671
+ ### Get Signature
672
+
673
+ ```ts
674
+ get logger(): Logger | undefined;
675
+ ```
676
+
677
+ #### Returns
678
+
679
+ `Logger` \| `undefined`
680
+
681
+ ### Inherited from
682
+
683
+ ```ts
684
+ PayloadDiviner.logger
685
+ ```
686
+
687
+ ***
688
+
689
+ ### priority
690
+
691
+ ### Get Signature
692
+
693
+ ```ts
694
+ get priority(): 2;
695
+ ```
696
+
697
+ #### Returns
698
+
699
+ `2`
700
+
701
+ ### Inherited from
702
+
703
+ ```ts
704
+ PayloadDiviner.priority
705
+ ```
706
+
707
+ ***
708
+
709
+ ### reentrancy
710
+
711
+ ### Get Signature
712
+
713
+ ```ts
714
+ get reentrancy():
715
+ | {
716
+ action: "skip" | "wait";
717
+ scope: "global";
718
+ }
719
+ | undefined;
720
+ ```
721
+
722
+ #### Returns
723
+
724
+ \| \{
725
+ `action`: `"skip"` \| `"wait"`;
726
+ `scope`: `"global"`;
727
+ \}
728
+ \| `undefined`
729
+
730
+ ### Inherited from
731
+
732
+ ```ts
733
+ PayloadDiviner.reentrancy
734
+ ```
735
+
736
+ ***
737
+
738
+ ### statusReporter
739
+
740
+ ### Get Signature
741
+
742
+ ```ts
743
+ get statusReporter():
744
+ | ModuleStatusReporter & CreatableStatusReporter<void>
745
+ | undefined;
746
+ ```
747
+
748
+ The status reporter used to broadcast lifecycle changes.
749
+
750
+ #### Returns
751
+
752
+ \| `ModuleStatusReporter` & `CreatableStatusReporter`\<`void`\>
753
+ \| `undefined`
754
+
755
+ ### Inherited from
756
+
757
+ ```ts
758
+ PayloadDiviner.statusReporter
759
+ ```
760
+
761
+ ***
762
+
763
+ ### timestamp
764
+
765
+ ### Get Signature
766
+
767
+ ```ts
768
+ get timestamp(): boolean;
769
+ ```
770
+
771
+ #### Returns
772
+
773
+ `boolean`
774
+
775
+ ### Inherited from
776
+
777
+ ```ts
778
+ PayloadDiviner.timestamp
779
+ ```
780
+
781
+ ***
782
+
783
+ ### moduleConfigQueryValidator
784
+
785
+ ### Get Signature
786
+
787
+ ```ts
788
+ get protected moduleConfigQueryValidator(): Queryable;
789
+ ```
790
+
791
+ #### Returns
792
+
793
+ `Queryable`
794
+
795
+ ### Inherited from
796
+
797
+ ```ts
798
+ PayloadDiviner.moduleConfigQueryValidator
799
+ ```
800
+
801
+ ***
802
+
803
+ ### supportedQueryValidator
804
+
805
+ ### Get Signature
806
+
807
+ ```ts
808
+ get protected supportedQueryValidator(): Queryable;
809
+ ```
810
+
811
+ #### Returns
812
+
813
+ `Queryable`
814
+
815
+ ### Inherited from
816
+
817
+ ```ts
818
+ PayloadDiviner.supportedQueryValidator
819
+ ```
820
+
821
+ ***
822
+
823
+ ### downResolver
824
+
825
+ ### Get Signature
826
+
827
+ ```ts
828
+ get downResolver(): CompositeModuleResolver<CompositeModuleResolverParams>;
829
+ ```
830
+
831
+ #### Returns
832
+
833
+ `CompositeModuleResolver`\<`CompositeModuleResolverParams`\>
834
+
835
+ ### Inherited from
836
+
837
+ ```ts
838
+ PayloadDiviner.downResolver
839
+ ```
840
+
841
+ ***
842
+
843
+ ### modName
844
+
845
+ ### Get Signature
846
+
847
+ ```ts
848
+ get modName(): string | undefined;
849
+ ```
850
+
851
+ #### Returns
852
+
853
+ `string` \| `undefined`
854
+
855
+ ### Inherited from
856
+
857
+ ```ts
858
+ PayloadDiviner.modName
859
+ ```
860
+
861
+ ***
862
+
863
+ ### moduleIdentifierTransformers
864
+
865
+ ### Get Signature
866
+
867
+ ```ts
868
+ get moduleIdentifierTransformers(): ModuleIdentifierTransformer[];
869
+ ```
870
+
871
+ #### Returns
872
+
873
+ `ModuleIdentifierTransformer`[]
874
+
875
+ ### Inherited from
876
+
877
+ ```ts
878
+ PayloadDiviner.moduleIdentifierTransformers
879
+ ```
880
+
881
+ ***
882
+
883
+ ### privateResolver
884
+
885
+ ### Get Signature
886
+
887
+ ```ts
888
+ get privateResolver(): CompositeModuleResolver<CompositeModuleResolverParams>;
889
+ ```
890
+
891
+ #### Returns
892
+
893
+ `CompositeModuleResolver`\<`CompositeModuleResolverParams`\>
894
+
895
+ ### Inherited from
896
+
897
+ ```ts
898
+ PayloadDiviner.privateResolver
899
+ ```
900
+
901
+ ***
902
+
903
+ ### root
904
+
905
+ ### Get Signature
906
+
907
+ ```ts
908
+ get root(): this;
909
+ ```
910
+
911
+ #### Returns
912
+
913
+ `this`
914
+
915
+ ### Inherited from
916
+
917
+ ```ts
918
+ PayloadDiviner.root
919
+ ```
920
+
921
+ ***
922
+
923
+ ### timeBudget
924
+
925
+ ### Get Signature
926
+
927
+ ```ts
928
+ get timeBudget(): number | undefined;
929
+ ```
930
+
931
+ #### Returns
932
+
933
+ `number` \| `undefined`
934
+
935
+ ### Inherited from
936
+
937
+ ```ts
938
+ PayloadDiviner.timeBudget
939
+ ```
940
+
941
+ ***
942
+
943
+ ### upResolver
944
+
945
+ ### Get Signature
946
+
947
+ ```ts
948
+ get upResolver(): CompositeModuleResolver<CompositeModuleResolverParams>;
949
+ ```
950
+
951
+ #### Returns
952
+
953
+ `CompositeModuleResolver`\<`CompositeModuleResolverParams`\>
954
+
955
+ ### Inherited from
956
+
957
+ ```ts
958
+ PayloadDiviner.upResolver
959
+ ```
960
+
961
+ ## Methods
962
+
963
+ ### divine()
964
+
965
+ ```ts
966
+ divine(payloads?, retryConfigIn?): Promise<DivinerDivineResult<TOut>[]>;
967
+ ```
968
+
969
+ **`Function`**
970
+
971
+ divine The main entry point for a diviner. Do not override this function. Implement/override divineHandler for custom functionality
972
+
973
+ ### Parameters
974
+
975
+ #### payloads?
976
+
977
+ `TIn`[]
978
+
979
+ #### retryConfigIn?
980
+
981
+ `RetryConfigWithComplete`\<`unknown`\>
982
+
983
+ ### Returns
984
+
985
+ `Promise`\<`DivinerDivineResult`\<`TOut`\>[]\>
986
+
987
+ ### Inherited from
988
+
989
+ ```ts
990
+ PayloadDiviner.divine
991
+ ```
992
+
993
+ ***
994
+
995
+ ### divineQuery()
996
+
997
+ ```ts
998
+ divineQuery(
999
+ payloads?,
1000
+ account?,
1001
+ _retry?): Promise<ModuleQueryResult<TOut>>;
1002
+ ```
1003
+
1004
+ ### Parameters
1005
+
1006
+ #### payloads?
1007
+
1008
+ `TIn`[]
1009
+
1010
+ #### account?
1011
+
1012
+ `AccountInstance`
1013
+
1014
+ #### \_retry?
1015
+
1016
+ `RetryConfig`
1017
+
1018
+ ### Returns
1019
+
1020
+ `Promise`\<`ModuleQueryResult`\<`TOut`\>\>
1021
+
1022
+ ### Inherited from
1023
+
1024
+ ```ts
1025
+ PayloadDiviner.divineQuery
1026
+ ```
1027
+
1028
+ ***
1029
+
1030
+ ### queryHandler()
1031
+
1032
+ ```ts
1033
+ protected queryHandler<T, TConfig>(
1034
+ query,
1035
+ payloads?,
1036
+ queryConfig?): Promise<ModuleQueryHandlerResult>;
1037
+ ```
1038
+
1039
+ **`Function`**
1040
+
1041
+ queryHandler Calls divine for a divine query. Override to support additional queries.
1042
+
1043
+ ### Type Parameters
1044
+
1045
+ #### T
1046
+
1047
+ `T` *extends* `UnsignedQueryBoundWitness` = `UnsignedQueryBoundWitness`
1048
+
1049
+ #### TConfig
1050
+
1051
+ `TConfig` *extends* `ModuleConfig` = `ModuleConfig`
1052
+
1053
+ ### Parameters
1054
+
1055
+ #### query
1056
+
1057
+ `T`
1058
+
1059
+ #### payloads?
1060
+
1061
+ `Payload`[]
1062
+
1063
+ #### queryConfig?
1064
+
1065
+ `TConfig`
1066
+
1067
+ ### Returns
1068
+
1069
+ `Promise`\<`ModuleQueryHandlerResult`\>
1070
+
1071
+ ### Inherited from
1072
+
1073
+ ```ts
1074
+ PayloadDiviner.queryHandler
1075
+ ```
1076
+
1077
+ ***
1078
+
1079
+ ### startHandler()
1080
+
1081
+ ```ts
1082
+ protected startHandler(): Promise<void>;
1083
+ ```
1084
+
1085
+ ### Returns
1086
+
1087
+ `Promise`\<`void`\>
1088
+
1089
+ ### Inherited from
1090
+
1091
+ ```ts
1092
+ PayloadDiviner.startHandler
1093
+ ```
1094
+
1095
+ ***
1096
+
1097
+ ### stopHandler()
1098
+
1099
+ ```ts
1100
+ protected stopHandler(): Promise<void>;
1101
+ ```
1102
+
1103
+ ### Returns
1104
+
1105
+ `Promise`\<`void`\>
1106
+
1107
+ ### Inherited from
1108
+
1109
+ ```ts
1110
+ PayloadDiviner.stopHandler
1111
+ ```
1112
+
1113
+ ***
1114
+
1115
+ ### divineHandler()
1116
+
1117
+ ```ts
1118
+ protected divineHandler(payloads?): Promise<TOut[]>;
1119
+ ```
1120
+
1121
+ **`Function`**
1122
+
1123
+ divineHandler Implement or override to add custom functionality to a diviner
1124
+
1125
+ ### Parameters
1126
+
1127
+ #### payloads?
1128
+
1129
+ `TIn`[]
1130
+
1131
+ ### Returns
1132
+
1133
+ `Promise`\<`TOut`[]\>
1134
+
1135
+ ### Overrides
1136
+
1137
+ ```ts
1138
+ PayloadDiviner.divineHandler
1139
+ ```
1140
+
1141
+ ***
1142
+
1143
+ ### \_getRootFunction()
1144
+
1145
+ ```ts
1146
+ static _getRootFunction(funcName): any;
1147
+ ```
1148
+
1149
+ ### Parameters
1150
+
1151
+ #### funcName
1152
+
1153
+ `string`
1154
+
1155
+ ### Returns
1156
+
1157
+ `any`
1158
+
1159
+ ### Inherited from
1160
+
1161
+ ```ts
1162
+ PayloadDiviner._getRootFunction
1163
+ ```
1164
+
1165
+ ***
1166
+
1167
+ ### \_noOverride()
1168
+
1169
+ ```ts
1170
+ static _noOverride(functionName): void;
1171
+ ```
1172
+
1173
+ ### Parameters
1174
+
1175
+ #### functionName
1176
+
1177
+ `string`
1178
+
1179
+ ### Returns
1180
+
1181
+ `void`
1182
+
1183
+ ### Inherited from
1184
+
1185
+ ```ts
1186
+ PayloadDiviner._noOverride
1187
+ ```
1188
+
1189
+ ***
1190
+
1191
+ ### createHandler()
1192
+
1193
+ ```ts
1194
+ static createHandler<T>(inInstance): Promise<T & AbstractModule<any, any>>;
1195
+ ```
1196
+
1197
+ Static hook called during creation to perform additional initialization.
1198
+ Override in subclasses to customize post-construction setup.
1199
+
1200
+ ### Type Parameters
1201
+
1202
+ #### T
1203
+
1204
+ `T` *extends* `CreatableInstance`\<`CreatableParams`, `EventData`\>
1205
+
1206
+ ### Parameters
1207
+
1208
+ #### inInstance
1209
+
1210
+ `T`
1211
+
1212
+ ### Returns
1213
+
1214
+ `Promise`\<`T` & `AbstractModule`\<`any`, `any`\>\>
1215
+
1216
+ The instance, potentially modified
1217
+
1218
+ ### Inherited from
1219
+
1220
+ ```ts
1221
+ PayloadDiviner.createHandler
1222
+ ```
1223
+
1224
+ ***
1225
+
1226
+ ### determineAccount()
1227
+
1228
+ ```ts
1229
+ static determineAccount(params): Promise<AccountInstance>;
1230
+ ```
1231
+
1232
+ ### Parameters
1233
+
1234
+ #### params
1235
+
1236
+ ##### account?
1237
+
1238
+ `AccountInstance` \| `"random"`
1239
+
1240
+ ##### accountPath?
1241
+
1242
+ `string`
1243
+
1244
+ ##### wallet?
1245
+
1246
+ `WalletInstance`
1247
+
1248
+ ### Returns
1249
+
1250
+ `Promise`\<`AccountInstance`\>
1251
+
1252
+ ### Inherited from
1253
+
1254
+ ```ts
1255
+ PayloadDiviner.determineAccount
1256
+ ```
1257
+
1258
+ ***
1259
+
1260
+ ### factory()
1261
+
1262
+ ```ts
1263
+ static factory<TModule>(this, params?): CreatableModuleFactory<TModule>;
1264
+ ```
1265
+
1266
+ ### Type Parameters
1267
+
1268
+ #### TModule
1269
+
1270
+ `TModule` *extends* `CreatableModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1271
+
1272
+ ### Parameters
1273
+
1274
+ #### this
1275
+
1276
+ `CreatableModule`\<`TModule`\>
1277
+
1278
+ #### params?
1279
+
1280
+ `Partial`\<`TModule`\[`"params"`\]\>
1281
+
1282
+ ### Returns
1283
+
1284
+ `CreatableModuleFactory`\<`TModule`\>
1285
+
1286
+ ### Inherited from
1287
+
1288
+ ```ts
1289
+ PayloadDiviner.factory
1290
+ ```
1291
+
1292
+ ***
1293
+
1294
+ ### isAllowedSchema()
1295
+
1296
+ ```ts
1297
+ static isAllowedSchema(schema): boolean;
1298
+ ```
1299
+
1300
+ ### Parameters
1301
+
1302
+ #### schema
1303
+
1304
+ `Schema`
1305
+
1306
+ ### Returns
1307
+
1308
+ `boolean`
1309
+
1310
+ ### Inherited from
1311
+
1312
+ ```ts
1313
+ PayloadDiviner.isAllowedSchema
1314
+ ```
1315
+
1316
+ ***
1317
+
1318
+ ### paramsHandler()
1319
+
1320
+ ```ts
1321
+ static paramsHandler<T>(inParams?): Promise<T["params"]>;
1322
+ ```
1323
+
1324
+ Static hook called during creation to validate and transform params.
1325
+ Override in subclasses to add default values or validation.
1326
+
1327
+ ### Type Parameters
1328
+
1329
+ #### T
1330
+
1331
+ `T` *extends* `AttachableModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1332
+
1333
+ ### Parameters
1334
+
1335
+ #### inParams?
1336
+
1337
+ `Partial`\<`T`\[`"params"`\]\>
1338
+
1339
+ ### Returns
1340
+
1341
+ `Promise`\<`T`\[`"params"`\]\>
1342
+
1343
+ The processed params ready for construction
1344
+
1345
+ ### Inherited from
1346
+
1347
+ ```ts
1348
+ PayloadDiviner.paramsHandler
1349
+ ```
1350
+
1351
+ ***
1352
+
1353
+ ### \_getRootFunction()
1354
+
1355
+ ```ts
1356
+ _getRootFunction(funcName): any;
1357
+ ```
1358
+
1359
+ ### Parameters
1360
+
1361
+ #### funcName
1362
+
1363
+ `string`
1364
+
1365
+ ### Returns
1366
+
1367
+ `any`
1368
+
1369
+ ### Inherited from
1370
+
1371
+ ```ts
1372
+ PayloadDiviner._getRootFunction
1373
+ ```
1374
+
1375
+ ***
1376
+
1377
+ ### busy()
1378
+
1379
+ ```ts
1380
+ busy<R>(closure): Promise<R>;
1381
+ ```
1382
+
1383
+ ### Type Parameters
1384
+
1385
+ #### R
1386
+
1387
+ `R`
1388
+
1389
+ ### Parameters
1390
+
1391
+ #### closure
1392
+
1393
+ () => `Promise`\<`R`\>
1394
+
1395
+ ### Returns
1396
+
1397
+ `Promise`\<`R`\>
1398
+
1399
+ ### Inherited from
1400
+
1401
+ ```ts
1402
+ PayloadDiviner.busy
1403
+ ```
1404
+
1405
+ ***
1406
+
1407
+ ### emit()
1408
+
1409
+ ```ts
1410
+ emit<TEventName, TEventArgs>(eventName, eventArgs): Promise<void>;
1411
+ ```
1412
+
1413
+ Emits an event, invoking all registered listeners concurrently.
1414
+
1415
+ ### Type Parameters
1416
+
1417
+ #### TEventName
1418
+
1419
+ `TEventName` *extends* `string` \| `number` \| `symbol` = keyof `TEventData`
1420
+
1421
+ #### TEventArgs
1422
+
1423
+ `TEventArgs` *extends* `EventArgs` = `TEventData`\[`TEventName`\]
1424
+
1425
+ ### Parameters
1426
+
1427
+ #### eventName
1428
+
1429
+ `TEventName`
1430
+
1431
+ The event to emit.
1432
+
1433
+ #### eventArgs
1434
+
1435
+ `TEventArgs`
1436
+
1437
+ The data to pass to listeners.
1438
+
1439
+ ### Returns
1440
+
1441
+ `Promise`\<`void`\>
1442
+
1443
+ ### Inherited from
1444
+
1445
+ ```ts
1446
+ PayloadDiviner.emit
1447
+ ```
1448
+
1449
+ ***
1450
+
1451
+ ### isSupportedQuery()
1452
+
1453
+ ```ts
1454
+ isSupportedQuery(query, assert?): boolean;
1455
+ ```
1456
+
1457
+ ### Parameters
1458
+
1459
+ #### query
1460
+
1461
+ `Schema`
1462
+
1463
+ #### assert?
1464
+
1465
+ `string` \| `boolean`
1466
+
1467
+ ### Returns
1468
+
1469
+ `boolean`
1470
+
1471
+ ### Inherited from
1472
+
1473
+ ```ts
1474
+ PayloadDiviner.isSupportedQuery
1475
+ ```
1476
+
1477
+ ***
1478
+
1479
+ ### previousHash()
1480
+
1481
+ ```ts
1482
+ previousHash(): Promisable<string | undefined>;
1483
+ ```
1484
+
1485
+ ### Returns
1486
+
1487
+ `Promisable`\<`string` \| `undefined`\>
1488
+
1489
+ ### Inherited from
1490
+
1491
+ ```ts
1492
+ PayloadDiviner.previousHash
1493
+ ```
1494
+
1495
+ ***
1496
+
1497
+ ### query()
1498
+
1499
+ ```ts
1500
+ query<T, TConfig>(
1501
+ query,
1502
+ payloads?,
1503
+ queryConfig?): Promise<ModuleQueryResult>;
1504
+ ```
1505
+
1506
+ ### Type Parameters
1507
+
1508
+ #### T
1509
+
1510
+ `T` *extends* `UnsignedQueryBoundWitness` = `UnsignedQueryBoundWitness`
1511
+
1512
+ #### TConfig
1513
+
1514
+ `TConfig` *extends* `ModuleConfig` = `ModuleConfig`
1515
+
1516
+ ### Parameters
1517
+
1518
+ #### query
1519
+
1520
+ `T`
1521
+
1522
+ #### payloads?
1523
+
1524
+ `Payload`[]
1525
+
1526
+ #### queryConfig?
1527
+
1528
+ `TConfig`
1529
+
1530
+ ### Returns
1531
+
1532
+ `Promise`\<`ModuleQueryResult`\>
1533
+
1534
+ ### Inherited from
1535
+
1536
+ ```ts
1537
+ PayloadDiviner.query
1538
+ ```
1539
+
1540
+ ***
1541
+
1542
+ ### queryable()
1543
+
1544
+ ```ts
1545
+ queryable<T, TConfig>(
1546
+ query,
1547
+ payloads?,
1548
+ queryConfig?): Promise<boolean>;
1549
+ ```
1550
+
1551
+ ### Type Parameters
1552
+
1553
+ #### T
1554
+
1555
+ `T` *extends* `UnsignedQueryBoundWitness` = `UnsignedQueryBoundWitness`
1556
+
1557
+ #### TConfig
1558
+
1559
+ `TConfig` *extends* `ModuleConfig` = `ModuleConfig`
1560
+
1561
+ ### Parameters
1562
+
1563
+ #### query
1564
+
1565
+ `T`
1566
+
1567
+ #### payloads?
1568
+
1569
+ `Payload`[]
1570
+
1571
+ #### queryConfig?
1572
+
1573
+ `TConfig`
1574
+
1575
+ ### Returns
1576
+
1577
+ `Promise`\<`boolean`\>
1578
+
1579
+ ### Inherited from
1580
+
1581
+ ```ts
1582
+ PayloadDiviner.queryable
1583
+ ```
1584
+
1585
+ ***
1586
+
1587
+ ### \_checkDead()
1588
+
1589
+ ```ts
1590
+ protected _checkDead(): void;
1591
+ ```
1592
+
1593
+ ### Returns
1594
+
1595
+ `void`
1596
+
1597
+ ### Inherited from
1598
+
1599
+ ```ts
1600
+ PayloadDiviner._checkDead
1601
+ ```
1602
+
1603
+ ***
1604
+
1605
+ ### archivistInstance()
1606
+
1607
+ ### Call Signature
1608
+
1609
+ ```ts
1610
+ protected archivistInstance(): Promise<
1611
+ | ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>
1612
+ | undefined>;
1613
+ ```
1614
+
1615
+ #### Returns
1616
+
1617
+ `Promise`\<
1618
+ \| `ArchivistInstance`\<`ArchivistParams`\<`AnyConfigSchema`\<`ArchivistConfig`\>\>, `ArchivistModuleEventData`, `Payload`\>
1619
+ \| `undefined`\>
1620
+
1621
+ #### Inherited from
1622
+
1623
+ ```ts
1624
+ PayloadDiviner.archivistInstance
1625
+ ```
1626
+
1627
+ ### Call Signature
1628
+
1629
+ ```ts
1630
+ protected archivistInstance(required): Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>>;
1631
+ ```
1632
+
1633
+ #### Parameters
1634
+
1635
+ ##### required
1636
+
1637
+ `true`
1638
+
1639
+ #### Returns
1640
+
1641
+ `Promise`\<`ArchivistInstance`\<`ArchivistParams`\<`AnyConfigSchema`\<`ArchivistConfig`\>\>, `ArchivistModuleEventData`, `Payload`\>\>
1642
+
1643
+ #### Inherited from
1644
+
1645
+ ```ts
1646
+ PayloadDiviner.archivistInstance
1647
+ ```
1648
+
1649
+ ***
1650
+
1651
+ ### bindHashes()
1652
+
1653
+ ```ts
1654
+ protected bindHashes(
1655
+ hashes,
1656
+ schema,
1657
+ account?): PromiseEx<unknown, AccountInstance>;
1658
+ ```
1659
+
1660
+ ### Parameters
1661
+
1662
+ #### hashes
1663
+
1664
+ `BrandedHash`[]
1665
+
1666
+ #### schema
1667
+
1668
+ `Schema`[]
1669
+
1670
+ #### account?
1671
+
1672
+ `AccountInstance`
1673
+
1674
+ ### Returns
1675
+
1676
+ `PromiseEx`\<`unknown`, `AccountInstance`\>
1677
+
1678
+ ### Inherited from
1679
+
1680
+ ```ts
1681
+ PayloadDiviner.bindHashes
1682
+ ```
1683
+
1684
+ ***
1685
+
1686
+ ### bindHashesInternal()
1687
+
1688
+ ```ts
1689
+ protected bindHashesInternal(
1690
+ hashes,
1691
+ schema,
1692
+ account?): Promise<{
1693
+ schema: "network.xyo.boundwitness" & object;
1694
+ addresses: Lowercase<string> & object & object[];
1695
+ payload_hashes: BrandedHash[];
1696
+ payload_schemas: BrandedSchema<string>[];
1697
+ previous_hashes: (BrandedHash | null)[];
1698
+ $destination?: Lowercase<string> & object & object;
1699
+ $sourceQuery?: BrandedHash;
1700
+ $signatures: (BrandedHex | null)[];
1701
+ }>;
1702
+ ```
1703
+
1704
+ ### Parameters
1705
+
1706
+ #### hashes
1707
+
1708
+ `BrandedHash`[]
1709
+
1710
+ #### schema
1711
+
1712
+ `Schema`[]
1713
+
1714
+ #### account?
1715
+
1716
+ `AccountInstance`
1717
+
1718
+ ### Returns
1719
+
1720
+ `Promise`\<\{
1721
+ `schema`: `"network.xyo.boundwitness"` & `object`;
1722
+ `addresses`: `Lowercase`\<`string`\> & `object` & `object`[];
1723
+ `payload_hashes`: `BrandedHash`[];
1724
+ `payload_schemas`: `BrandedSchema`\<`string`\>[];
1725
+ `previous_hashes`: (`BrandedHash` \| `null`)[];
1726
+ `$destination?`: `Lowercase`\<`string`\> & `object` & `object`;
1727
+ `$sourceQuery?`: `BrandedHash`;
1728
+ `$signatures`: (`BrandedHex` \| `null`)[];
1729
+ \}\>
1730
+
1731
+ ### Inherited from
1732
+
1733
+ ```ts
1734
+ PayloadDiviner.bindHashesInternal
1735
+ ```
1736
+
1737
+ ***
1738
+
1739
+ ### bindQuery()
1740
+
1741
+ ```ts
1742
+ protected bindQuery<T>(
1743
+ query,
1744
+ payloads?,
1745
+ account?,
1746
+ additionalSigners?): PromiseEx<[UnsignedQueryBoundWitness, Payload[], Payload[]], AccountInstance>;
1747
+ ```
1748
+
1749
+ ### Type Parameters
1750
+
1751
+ #### T
1752
+
1753
+ `T` *extends* `Query`
1754
+
1755
+ ### Parameters
1756
+
1757
+ #### query
1758
+
1759
+ `T`
1760
+
1761
+ #### payloads?
1762
+
1763
+ `Payload`[]
1764
+
1765
+ #### account?
1766
+
1767
+ `AccountInstance`
1768
+
1769
+ #### additionalSigners?
1770
+
1771
+ `AccountInstance`[]
1772
+
1773
+ ### Returns
1774
+
1775
+ `PromiseEx`\<\[`UnsignedQueryBoundWitness`, `Payload`[], `Payload`[]\], `AccountInstance`\>
1776
+
1777
+ ### Inherited from
1778
+
1779
+ ```ts
1780
+ PayloadDiviner.bindQuery
1781
+ ```
1782
+
1783
+ ***
1784
+
1785
+ ### bindQueryInternal()
1786
+
1787
+ ```ts
1788
+ protected bindQueryInternal<T>(
1789
+ query,
1790
+ payloads?,
1791
+ account?,
1792
+ additionalSigners?): Promise<[UnsignedQueryBoundWitness, Payload[], Payload[]]>;
1793
+ ```
1794
+
1795
+ ### Type Parameters
1796
+
1797
+ #### T
1798
+
1799
+ `T` *extends* `Query`
1800
+
1801
+ ### Parameters
1802
+
1803
+ #### query
1804
+
1805
+ `T`
1806
+
1807
+ #### payloads?
1808
+
1809
+ `Payload`[]
1810
+
1811
+ #### account?
1812
+
1813
+ `AccountInstance`
1814
+
1815
+ #### additionalSigners?
1816
+
1817
+ `AccountInstance`[]
1818
+
1819
+ ### Returns
1820
+
1821
+ `Promise`\<\[`UnsignedQueryBoundWitness`, `Payload`[], `Payload`[]\]\>
1822
+
1823
+ ### Inherited from
1824
+
1825
+ ```ts
1826
+ PayloadDiviner.bindQueryInternal
1827
+ ```
1828
+
1829
+ ***
1830
+
1831
+ ### bindQueryResult()
1832
+
1833
+ ```ts
1834
+ protected bindQueryResult<T>(
1835
+ query,
1836
+ payloads,
1837
+ additionalWitnesses?,
1838
+ errors?): Promise<ModuleQueryResult>;
1839
+ ```
1840
+
1841
+ ### Type Parameters
1842
+
1843
+ #### T
1844
+
1845
+ `T` *extends* `Query`
1846
+
1847
+ ### Parameters
1848
+
1849
+ #### query
1850
+
1851
+ `T`
1852
+
1853
+ #### payloads
1854
+
1855
+ `Payload`[]
1856
+
1857
+ #### additionalWitnesses?
1858
+
1859
+ `AccountInstance`[]
1860
+
1861
+ #### errors?
1862
+
1863
+ `ModuleError`[]
1864
+
1865
+ ### Returns
1866
+
1867
+ `Promise`\<`ModuleQueryResult`\>
1868
+
1869
+ ### Inherited from
1870
+
1871
+ ```ts
1872
+ PayloadDiviner.bindQueryResult
1873
+ ```
1874
+
1875
+ ***
1876
+
1877
+ ### generateConfigAndAddress()
1878
+
1879
+ ```ts
1880
+ protected generateConfigAndAddress(_maxDepth?): Promisable<Payload[]>;
1881
+ ```
1882
+
1883
+ ### Parameters
1884
+
1885
+ #### \_maxDepth?
1886
+
1887
+ `number`
1888
+
1889
+ ### Returns
1890
+
1891
+ `Promisable`\<`Payload`[]\>
1892
+
1893
+ ### Inherited from
1894
+
1895
+ ```ts
1896
+ PayloadDiviner.generateConfigAndAddress
1897
+ ```
1898
+
1899
+ ***
1900
+
1901
+ ### generateDescribe()
1902
+
1903
+ ```ts
1904
+ protected generateDescribe(): Promise<ModuleDescriptionPayload>;
1905
+ ```
1906
+
1907
+ ### Returns
1908
+
1909
+ `Promise`\<`ModuleDescriptionPayload`\>
1910
+
1911
+ ### Inherited from
1912
+
1913
+ ```ts
1914
+ PayloadDiviner.generateDescribe
1915
+ ```
1916
+
1917
+ ***
1918
+
1919
+ ### ~~getArchivist()~~
1920
+
1921
+ ```ts
1922
+ protected getArchivist(): Promise<
1923
+ | ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>
1924
+ | undefined>;
1925
+ ```
1926
+
1927
+ ### Returns
1928
+
1929
+ `Promise`\<
1930
+ \| `ArchivistInstance`\<`ArchivistParams`\<`AnyConfigSchema`\<`ArchivistConfig`\>\>, `ArchivistModuleEventData`, `Payload`\>
1931
+ \| `undefined`\>
1932
+
1933
+ ### Deprecated
1934
+
1935
+ use archivistInstance() instead
1936
+
1937
+ ### Inherited from
1938
+
1939
+ ```ts
1940
+ PayloadDiviner.getArchivist
1941
+ ```
1942
+
1943
+ ***
1944
+
1945
+ ### isAllowedArchivingQuery()
1946
+
1947
+ ```ts
1948
+ protected isAllowedArchivingQuery(schema): boolean;
1949
+ ```
1950
+
1951
+ ### Parameters
1952
+
1953
+ #### schema
1954
+
1955
+ `Schema`
1956
+
1957
+ ### Returns
1958
+
1959
+ `boolean`
1960
+
1961
+ ### Inherited from
1962
+
1963
+ ```ts
1964
+ PayloadDiviner.isAllowedArchivingQuery
1965
+ ```
1966
+
1967
+ ***
1968
+
1969
+ ### moduleAddressHandler()
1970
+
1971
+ ```ts
1972
+ protected moduleAddressHandler(): Promisable<(AddressPayload | AddressPreviousHashPayload)[]>;
1973
+ ```
1974
+
1975
+ ### Returns
1976
+
1977
+ `Promisable`\<(`AddressPayload` \| `AddressPreviousHashPayload`)[]\>
1978
+
1979
+ ### Inherited from
1980
+
1981
+ ```ts
1982
+ PayloadDiviner.moduleAddressHandler
1983
+ ```
1984
+
1985
+ ***
1986
+
1987
+ ### stateHandler()
1988
+
1989
+ ```ts
1990
+ protected stateHandler(): Promise<Payload[]>;
1991
+ ```
1992
+
1993
+ ### Returns
1994
+
1995
+ `Promise`\<`Payload`[]\>
1996
+
1997
+ ### Inherited from
1998
+
1999
+ ```ts
2000
+ PayloadDiviner.stateHandler
2001
+ ```
2002
+
2003
+ ***
2004
+
2005
+ ### subscribeHandler()
2006
+
2007
+ ```ts
2008
+ protected subscribeHandler(): void;
2009
+ ```
2010
+
2011
+ ### Returns
2012
+
2013
+ `void`
2014
+
2015
+ ### Inherited from
2016
+
2017
+ ```ts
2018
+ PayloadDiviner.subscribeHandler
2019
+ ```
2020
+
2021
+ ***
2022
+
2023
+ ### validateConfig()
2024
+
2025
+ ```ts
2026
+ protected validateConfig(config?, parents?): boolean;
2027
+ ```
2028
+
2029
+ ### Parameters
2030
+
2031
+ #### config?
2032
+
2033
+ `unknown`
2034
+
2035
+ #### parents?
2036
+
2037
+ `string`[]
2038
+
2039
+ ### Returns
2040
+
2041
+ `boolean`
2042
+
2043
+ ### Inherited from
2044
+
2045
+ ```ts
2046
+ PayloadDiviner.validateConfig
2047
+ ```
2048
+
2049
+ ***
2050
+
2051
+ ### addParent()
2052
+
2053
+ ```ts
2054
+ addParent(mod): void;
2055
+ ```
2056
+
2057
+ ### Parameters
2058
+
2059
+ #### mod
2060
+
2061
+ `ModuleInstance`
2062
+
2063
+ ### Returns
2064
+
2065
+ `void`
2066
+
2067
+ ### Inherited from
2068
+
2069
+ ```ts
2070
+ PayloadDiviner.addParent
2071
+ ```
2072
+
2073
+ ***
2074
+
2075
+ ### certifyParents()
2076
+
2077
+ ```ts
2078
+ certifyParents(): Promise<Payload[]>;
2079
+ ```
2080
+
2081
+ ### Returns
2082
+
2083
+ `Promise`\<`Payload`[]\>
2084
+
2085
+ ### Inherited from
2086
+
2087
+ ```ts
2088
+ PayloadDiviner.certifyParents
2089
+ ```
2090
+
2091
+ ***
2092
+
2093
+ ### createHandler()
2094
+
2095
+ ```ts
2096
+ createHandler(): Promise<void>;
2097
+ ```
2098
+
2099
+ ### Returns
2100
+
2101
+ `Promise`\<`void`\>
2102
+
2103
+ ### Inherited from
2104
+
2105
+ ```ts
2106
+ PayloadDiviner.createHandler
2107
+ ```
2108
+
2109
+ ***
2110
+
2111
+ ### manifest()
2112
+
2113
+ ```ts
2114
+ manifest(maxDepth?): Promise<ModuleManifestPayload>;
2115
+ ```
2116
+
2117
+ ### Parameters
2118
+
2119
+ #### maxDepth?
2120
+
2121
+ `number`
2122
+
2123
+ ### Returns
2124
+
2125
+ `Promise`\<`ModuleManifestPayload`\>
2126
+
2127
+ ### Inherited from
2128
+
2129
+ ```ts
2130
+ PayloadDiviner.manifest
2131
+ ```
2132
+
2133
+ ***
2134
+
2135
+ ### manifestQuery()
2136
+
2137
+ ```ts
2138
+ manifestQuery(account, maxDepth?): Promise<ModuleQueryResult<ModuleManifestPayload>>;
2139
+ ```
2140
+
2141
+ ### Parameters
2142
+
2143
+ #### account
2144
+
2145
+ `AccountInstance`
2146
+
2147
+ #### maxDepth?
2148
+
2149
+ `number`
2150
+
2151
+ ### Returns
2152
+
2153
+ `Promise`\<`ModuleQueryResult`\<`ModuleManifestPayload`\>\>
2154
+
2155
+ ### Inherited from
2156
+
2157
+ ```ts
2158
+ PayloadDiviner.manifestQuery
2159
+ ```
2160
+
2161
+ ***
2162
+
2163
+ ### moduleAddress()
2164
+
2165
+ ```ts
2166
+ moduleAddress(): Promise<(AddressPayload | AddressPreviousHashPayload)[]>;
2167
+ ```
2168
+
2169
+ ### Returns
2170
+
2171
+ `Promise`\<(`AddressPayload` \| `AddressPreviousHashPayload`)[]\>
2172
+
2173
+ ### Inherited from
2174
+
2175
+ ```ts
2176
+ PayloadDiviner.moduleAddress
2177
+ ```
2178
+
2179
+ ***
2180
+
2181
+ ### parents()
2182
+
2183
+ ```ts
2184
+ parents(): Promisable<NodeInstance<NodeParams<AnyConfigSchema<NodeConfig>>, NodeModuleEventData>[]>;
2185
+ ```
2186
+
2187
+ ### Returns
2188
+
2189
+ `Promisable`\<`NodeInstance`\<`NodeParams`\<`AnyConfigSchema`\<`NodeConfig`\>\>, `NodeModuleEventData`\>[]\>
2190
+
2191
+ ### Inherited from
2192
+
2193
+ ```ts
2194
+ PayloadDiviner.parents
2195
+ ```
2196
+
2197
+ ***
2198
+
2199
+ ### privateChildren()
2200
+
2201
+ ```ts
2202
+ privateChildren(): Promisable<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;
2203
+ ```
2204
+
2205
+ ### Returns
2206
+
2207
+ `Promisable`\<`ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>[]\>
2208
+
2209
+ ### Inherited from
2210
+
2211
+ ```ts
2212
+ PayloadDiviner.privateChildren
2213
+ ```
2214
+
2215
+ ***
2216
+
2217
+ ### publicChildren()
2218
+
2219
+ ```ts
2220
+ publicChildren(): Promisable<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;
2221
+ ```
2222
+
2223
+ ### Returns
2224
+
2225
+ `Promisable`\<`ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>[]\>
2226
+
2227
+ ### Inherited from
2228
+
2229
+ ```ts
2230
+ PayloadDiviner.publicChildren
2231
+ ```
2232
+
2233
+ ***
2234
+
2235
+ ### removeParent()
2236
+
2237
+ ```ts
2238
+ removeParent(address): void;
2239
+ ```
2240
+
2241
+ ### Parameters
2242
+
2243
+ #### address
2244
+
2245
+ `BrandedAddress`
2246
+
2247
+ ### Returns
2248
+
2249
+ `void`
2250
+
2251
+ ### Inherited from
2252
+
2253
+ ```ts
2254
+ PayloadDiviner.removeParent
2255
+ ```
2256
+
2257
+ ***
2258
+
2259
+ ### resolve()
2260
+
2261
+ ### Call Signature
2262
+
2263
+ ```ts
2264
+ resolve(): Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;
2265
+ ```
2266
+
2267
+ #### Returns
2268
+
2269
+ `Promise`\<`ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>[]\>
2270
+
2271
+ #### Inherited from
2272
+
2273
+ ```ts
2274
+ PayloadDiviner.resolve
2275
+ ```
2276
+
2277
+ ### Call Signature
2278
+
2279
+ ```ts
2280
+ resolve<T>(all, options?): Promise<T[]>;
2281
+ ```
2282
+
2283
+ #### Type Parameters
2284
+
2285
+ ##### T
2286
+
2287
+ `T` *extends* `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\> = `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
2288
+
2289
+ #### Parameters
2290
+
2291
+ ##### all
2292
+
2293
+ `"*"`
2294
+
2295
+ ##### options?
2296
+
2297
+ `ModuleFilterOptions`\<`T`\>
2298
+
2299
+ #### Returns
2300
+
2301
+ `Promise`\<`T`[]\>
2302
+
2303
+ #### Inherited from
2304
+
2305
+ ```ts
2306
+ PayloadDiviner.resolve
2307
+ ```
2308
+
2309
+ ### Call Signature
2310
+
2311
+ ```ts
2312
+ resolve<T>(id, options?): Promise<T | undefined>;
2313
+ ```
2314
+
2315
+ #### Type Parameters
2316
+
2317
+ ##### T
2318
+
2319
+ `T` *extends* `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\> = `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
2320
+
2321
+ #### Parameters
2322
+
2323
+ ##### id
2324
+
2325
+ `ModuleIdentifier`
2326
+
2327
+ ##### options?
2328
+
2329
+ `ModuleFilterOptions`\<`T`\>
2330
+
2331
+ #### Returns
2332
+
2333
+ `Promise`\<`T` \| `undefined`\>
2334
+
2335
+ #### Inherited from
2336
+
2337
+ ```ts
2338
+ PayloadDiviner.resolve
2339
+ ```
2340
+
2341
+ ***
2342
+
2343
+ ### resolveIdentifier()
2344
+
2345
+ ```ts
2346
+ resolveIdentifier(id, options?): Promise<BrandedAddress | undefined>;
2347
+ ```
2348
+
2349
+ ### Parameters
2350
+
2351
+ #### id
2352
+
2353
+ `ModuleIdentifier`
2354
+
2355
+ #### options?
2356
+
2357
+ `ObjectFilterOptions`\<`AnyObject`\>
2358
+
2359
+ ### Returns
2360
+
2361
+ `Promise`\<`BrandedAddress` \| `undefined`\>
2362
+
2363
+ ### Inherited from
2364
+
2365
+ ```ts
2366
+ PayloadDiviner.resolveIdentifier
2367
+ ```
2368
+
2369
+ ***
2370
+
2371
+ ### resolvePrivate()
2372
+
2373
+ ### Call Signature
2374
+
2375
+ ```ts
2376
+ resolvePrivate<T>(all, options?): Promise<T[]>;
2377
+ ```
2378
+
2379
+ #### Type Parameters
2380
+
2381
+ ##### T
2382
+
2383
+ `T` *extends* `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\> = `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
2384
+
2385
+ #### Parameters
2386
+
2387
+ ##### all
2388
+
2389
+ `"*"`
2390
+
2391
+ ##### options?
2392
+
2393
+ `ModuleFilterOptions`\<`T`\>
2394
+
2395
+ #### Returns
2396
+
2397
+ `Promise`\<`T`[]\>
2398
+
2399
+ #### Inherited from
2400
+
2401
+ ```ts
2402
+ PayloadDiviner.resolvePrivate
2403
+ ```
2404
+
2405
+ ### Call Signature
2406
+
2407
+ ```ts
2408
+ resolvePrivate<T>(id, options?): Promise<T | undefined>;
2409
+ ```
2410
+
2411
+ #### Type Parameters
2412
+
2413
+ ##### T
2414
+
2415
+ `T` *extends* `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\> = `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
2416
+
2417
+ #### Parameters
2418
+
2419
+ ##### id
2420
+
2421
+ `ModuleIdentifier`
2422
+
2423
+ ##### options?
2424
+
2425
+ `ModuleFilterOptions`\<`T`\>
2426
+
2427
+ #### Returns
2428
+
2429
+ `Promise`\<`T` \| `undefined`\>
2430
+
2431
+ #### Inherited from
2432
+
2433
+ ```ts
2434
+ PayloadDiviner.resolvePrivate
2435
+ ```
2436
+
2437
+ ***
2438
+
2439
+ ### siblings()
2440
+
2441
+ ```ts
2442
+ siblings(): Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;
2443
+ ```
2444
+
2445
+ ### Returns
2446
+
2447
+ `Promise`\<`ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>[]\>
2448
+
2449
+ ### Inherited from
2450
+
2451
+ ```ts
2452
+ PayloadDiviner.siblings
2453
+ ```
2454
+
2455
+ ***
2456
+
2457
+ ### state()
2458
+
2459
+ ```ts
2460
+ state(): Promise<Payload[]>;
2461
+ ```
2462
+
2463
+ ### Returns
2464
+
2465
+ `Promise`\<`Payload`[]\>
2466
+
2467
+ ### Inherited from
2468
+
2469
+ ```ts
2470
+ PayloadDiviner.state
2471
+ ```
2472
+
2473
+ ***
2474
+
2475
+ ### stateQuery()
2476
+
2477
+ ```ts
2478
+ stateQuery(account): Promise<ModuleQueryResult>;
2479
+ ```
2480
+
2481
+ ### Parameters
2482
+
2483
+ #### account
2484
+
2485
+ `AccountInstance`
2486
+
2487
+ ### Returns
2488
+
2489
+ `Promise`\<`ModuleQueryResult`\>
2490
+
2491
+ ### Inherited from
2492
+
2493
+ ```ts
2494
+ PayloadDiviner.stateQuery
2495
+ ```
2496
+
2497
+ ***
2498
+
2499
+ ### subscribe()
2500
+
2501
+ ```ts
2502
+ subscribe(_queryAccount?): void;
2503
+ ```
2504
+
2505
+ ### Parameters
2506
+
2507
+ #### \_queryAccount?
2508
+
2509
+ `AccountInstance`
2510
+
2511
+ ### Returns
2512
+
2513
+ `void`
2514
+
2515
+ ### Inherited from
2516
+
2517
+ ```ts
2518
+ PayloadDiviner.subscribe
2519
+ ```
2520
+
2521
+ ***
2522
+
2523
+ ### manifestHandler()
2524
+
2525
+ ```ts
2526
+ protected manifestHandler(maxDepth?, _ignoreAddresses?): Promise<ModuleManifestPayload>;
2527
+ ```
2528
+
2529
+ ### Parameters
2530
+
2531
+ #### maxDepth?
2532
+
2533
+ `number`
2534
+
2535
+ #### \_ignoreAddresses?
2536
+
2537
+ `BrandedAddress`[]
2538
+
2539
+ ### Returns
2540
+
2541
+ `Promise`\<`ModuleManifestPayload`\>
2542
+
2543
+ ### Inherited from
2544
+
2545
+ ```ts
2546
+ PayloadDiviner.manifestHandler
2547
+ ```
2548
+
2549
+ ***
2550
+
2551
+ ### resolveArchivingArchivists()
2552
+
2553
+ ```ts
2554
+ protected resolveArchivingArchivists(): Promise<ArchivistInstance<ArchivistParams<AnyConfigSchema<ArchivistConfig>>, ArchivistModuleEventData, Payload>[]>;
2555
+ ```
2556
+
2557
+ ### Returns
2558
+
2559
+ `Promise`\<`ArchivistInstance`\<`ArchivistParams`\<`AnyConfigSchema`\<`ArchivistConfig`\>\>, `ArchivistModuleEventData`, `Payload`\>[]\>
2560
+
2561
+ ### Inherited from
2562
+
2563
+ ```ts
2564
+ PayloadDiviner.resolveArchivingArchivists
2565
+ ```
2566
+
2567
+ ***
2568
+
2569
+ ### sendQuery()
2570
+
2571
+ ```ts
2572
+ protected sendQuery<T, P, R>(
2573
+ queryPayload,
2574
+ payloads?,
2575
+ account?): Promise<R[]>;
2576
+ ```
2577
+
2578
+ ### Type Parameters
2579
+
2580
+ #### T
2581
+
2582
+ `T` *extends* `Query`
2583
+
2584
+ #### P
2585
+
2586
+ `P` *extends* `Payload` = `Payload`
2587
+
2588
+ #### R
2589
+
2590
+ `R` *extends* `Payload` = `Payload`
2591
+
2592
+ ### Parameters
2593
+
2594
+ #### queryPayload
2595
+
2596
+ `T`
2597
+
2598
+ #### payloads?
2599
+
2600
+ `P`[]
2601
+
2602
+ #### account?
2603
+
2604
+ `AccountInstance`
2605
+
2606
+ ### Returns
2607
+
2608
+ `Promise`\<`R`[]\>
2609
+
2610
+ ### Inherited from
2611
+
2612
+ ```ts
2613
+ PayloadDiviner.sendQuery
2614
+ ```
2615
+
2616
+ ***
2617
+
2618
+ ### sendQueryRaw()
2619
+
2620
+ ```ts
2621
+ protected sendQueryRaw<T, P, R>(
2622
+ queryPayload,
2623
+ payloads?,
2624
+ account?): Promise<ModuleQueryResult<R>>;
2625
+ ```
2626
+
2627
+ ### Type Parameters
2628
+
2629
+ #### T
2630
+
2631
+ `T` *extends* `Query`
2632
+
2633
+ #### P
2634
+
2635
+ `P` *extends* `Payload` = `Payload`
2636
+
2637
+ #### R
2638
+
2639
+ `R` *extends* `Payload` = `Payload`
2640
+
2641
+ ### Parameters
2642
+
2643
+ #### queryPayload
2644
+
2645
+ `T`
2646
+
2647
+ #### payloads?
2648
+
2649
+ `P`[]
2650
+
2651
+ #### account?
2652
+
2653
+ `AccountInstance`
2654
+
2655
+ ### Returns
2656
+
2657
+ `Promise`\<`ModuleQueryResult`\<`R`\>\>
2658
+
2659
+ ### Inherited from
2660
+
2661
+ ```ts
2662
+ PayloadDiviner.sendQueryRaw
2663
+ ```
2664
+
2665
+ ***
2666
+
2667
+ ### storeToArchivists()
2668
+
2669
+ ```ts
2670
+ protected storeToArchivists(payloads): Promise<Payload[]>;
2671
+ ```
2672
+
2673
+ ### Parameters
2674
+
2675
+ #### payloads
2676
+
2677
+ `Payload`[]
2678
+
2679
+ ### Returns
2680
+
2681
+ `Promise`\<`Payload`[]\>
2682
+
2683
+ ### Inherited from
2684
+
2685
+ ```ts
2686
+ PayloadDiviner.storeToArchivists
2687
+ ```
2688
+
2689
+ ### type-aliases
2690
+
2691
+ ### <a id="IndexedDbPayloadDivinerConfig"></a>IndexedDbPayloadDivinerConfig
2692
+
2693
+ [**@xyo-network/diviner-payload-indexeddb**](#../README)
2694
+
2695
+ ***
2696
+
2697
+ ```ts
2698
+ type IndexedDbPayloadDivinerConfig = DivinerConfig<{
2699
+ dbName?: string;
2700
+ dbVersion?: number;
2701
+ schema: IndexedDbPayloadDivinerConfigSchema;
2702
+ storage?: {
2703
+ indexes?: IndexDescription[];
2704
+ };
2705
+ storeName?: string;
2706
+ }>;
2707
+ ```
2708
+
2709
+ ### <a id="IndexedDbPayloadDivinerConfigSchema"></a>IndexedDbPayloadDivinerConfigSchema
2710
+
2711
+ [**@xyo-network/diviner-payload-indexeddb**](#../README)
2712
+
2713
+ ***
2714
+
2715
+ ```ts
2716
+ type IndexedDbPayloadDivinerConfigSchema = typeof IndexedDbPayloadDivinerConfigSchema;
2717
+ ```
2718
+
2719
+ ### <a id="IndexedDbPayloadDivinerParams"></a>IndexedDbPayloadDivinerParams
2720
+
2721
+ [**@xyo-network/diviner-payload-indexeddb**](#../README)
2722
+
2723
+ ***
2724
+
2725
+ ```ts
2726
+ type IndexedDbPayloadDivinerParams = DivinerParams<AnyConfigSchema<IndexedDbPayloadDivinerConfig>>;
2727
+ ```
2728
+
2729
+ ### <a id="IndexedDbPayloadDivinerSchema"></a>IndexedDbPayloadDivinerSchema
2730
+
2731
+ [**@xyo-network/diviner-payload-indexeddb**](#../README)
2732
+
2733
+ ***
2734
+
2735
+ ```ts
2736
+ type IndexedDbPayloadDivinerSchema = typeof IndexedDbPayloadDivinerSchema;
2737
+ ```
2738
+
2739
+ ### variables
2740
+
2741
+ ### <a id="IndexedDbPayloadDivinerConfigSchema"></a>IndexedDbPayloadDivinerConfigSchema
2742
+
2743
+ [**@xyo-network/diviner-payload-indexeddb**](#../README)
2744
+
2745
+ ***
2746
+
2747
+ ```ts
2748
+ const IndexedDbPayloadDivinerConfigSchema: string & object;
2749
+ ```
2750
+
2751
+ ## Type Declaration
2752
+
2753
+ ### \_\_schema
2754
+
2755
+ ```ts
2756
+ readonly __schema: true;
2757
+ ```
2758
+
2759
+ ### <a id="IndexedDbPayloadDivinerSchema"></a>IndexedDbPayloadDivinerSchema
2760
+
2761
+ [**@xyo-network/diviner-payload-indexeddb**](#../README)
2762
+
2763
+ ***
2764
+
2765
+ ```ts
2766
+ const IndexedDbPayloadDivinerSchema: string & object;
2767
+ ```
2768
+
2769
+ ## Type Declaration
2770
+
2771
+ ### \_\_schema
18
2772
 
19
- ## Credits
2773
+ ```ts
2774
+ readonly __schema: true;
2775
+ ```
20
2776
 
21
- [Made with 🔥 and ❄️ by XYO](https://xyo.network)
22
2777
 
23
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
2778
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
2779
+ [npm-badge]: https://img.shields.io/npm/v/@xyo-network/diviner-payload-indexeddb.svg
2780
+ [npm-link]: https://www.npmjs.com/package/@xyo-network/diviner-payload-indexeddb
2781
+ [license-badge]: https://img.shields.io/npm/l/@xyo-network/diviner-payload-indexeddb.svg
2782
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE