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