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