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