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