@xyo-network/witness-evm-abstract 5.3.24 → 5.3.26

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