@xyo-network/diviner-stateful 5.3.30 → 5.5.0

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