@xyo-network/module-wrapper 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 +1884 -10
  2. package/package.json +21 -21
package/README.md CHANGED
@@ -1,23 +1,1897 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/module-wrapper
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__module-wrapper)
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
+ ### module
50
+
51
+ ### packages
52
+
53
+ ### wrapper
54
+
55
+ ### .temp-typedoc
56
+
57
+ ### classes
58
+
59
+ ### <a id="ModuleWrapper"></a>ModuleWrapper
60
+
61
+ [**@xyo-network/module-wrapper**](#../README)
62
+
63
+ ***
64
+
65
+ ## Extends
66
+
67
+ - `Base`\<`Exclude`\<`Omit`\<`TWrappedModule`\[`"params"`\], `"config"`\> & `object`, `undefined`\>\>
68
+
69
+ ## Type Parameters
70
+
71
+ ### TWrappedModule
72
+
73
+ `TWrappedModule` *extends* `QueryableModule` = `QueryableModule`
74
+
75
+ ## Implements
76
+
77
+ - `AttachableModuleInstance`\<`TWrappedModule`\[`"params"`\], `TWrappedModule`\[`"eventData"`\]\>
78
+
79
+ ## Constructors
80
+
81
+ ### Constructor
82
+
83
+ ```ts
84
+ new ModuleWrapper<TWrappedModule>(params): ModuleWrapper<TWrappedModule>;
85
+ ```
86
+
87
+ ### Parameters
88
+
89
+ #### params
90
+
91
+ [`ModuleWrapperParams`](#../type-aliases/ModuleWrapperParams)\<`TWrappedModule`\>
92
+
93
+ ### Returns
94
+
95
+ `ModuleWrapper`\<`TWrappedModule`\>
96
+
97
+ ### Overrides
98
+
99
+ ```ts
100
+ Base<Exclude<Omit<TWrappedModule['params'], 'config'> & { config: Exclude<TWrappedModule['params']['config'], undefined> }, undefined>>.constructor
101
+ ```
102
+
103
+ ## Properties
104
+
105
+ ### instanceIdentityCheck
106
+
107
+ ```ts
108
+ readonly static instanceIdentityCheck: InstanceTypeCheck = isModuleInstance;
109
+ ```
110
+
111
+ ***
112
+
113
+ ### moduleIdentityCheck
114
+
115
+ ```ts
116
+ readonly static moduleIdentityCheck: QueryableModuleTypeCheck = isQueryableModule;
117
+ ```
118
+
119
+ ***
120
+
121
+ ### requiredQueries
122
+
123
+ ```ts
124
+ readonly static requiredQueries: string[];
125
+ ```
126
+
127
+ ***
128
+
129
+ ### eventData
130
+
131
+ ```ts
132
+ eventData: TWrappedModule["eventData"];
133
+ ```
134
+
135
+ The event data type associated with this instance.
136
+
137
+ ### Implementation of
138
+
139
+ ```ts
140
+ AttachableModuleInstance.eventData
141
+ ```
142
+
143
+ ***
144
+
145
+ ### cachedCalls
146
+
147
+ ```ts
148
+ protected readonly cachedCalls: LRUCache<string, Payload[], unknown>;
149
+ ```
150
+
151
+ ***
152
+
153
+ ### wrapperParams
154
+
155
+ ```ts
156
+ protected readonly wrapperParams: ModuleWrapperParams<TWrappedModule>;
157
+ ```
158
+
159
+ ## Accessors
160
+
161
+ ### account
162
+
163
+ ### Get Signature
164
+
165
+ ```ts
166
+ get account(): AccountInstance;
167
+ ```
168
+
169
+ #### Returns
170
+
171
+ `AccountInstance`
172
+
173
+ ### Implementation of
174
+
175
+ ```ts
176
+ AttachableModuleInstance.account
177
+ ```
178
+
179
+ ***
180
+
181
+ ### additionalSigners
182
+
183
+ ### Get Signature
184
+
185
+ ```ts
186
+ get additionalSigners(): AccountInstance[];
187
+ ```
188
+
189
+ #### Returns
190
+
191
+ `AccountInstance`[]
192
+
193
+ ***
194
+
195
+ ### address
196
+
197
+ ### Get Signature
198
+
199
+ ```ts
200
+ get address(): BrandedAddress;
201
+ ```
202
+
203
+ #### Returns
204
+
205
+ `BrandedAddress`
206
+
207
+ ### Implementation of
208
+
209
+ ```ts
210
+ AttachableModuleInstance.address
211
+ ```
212
+
213
+ ***
214
+
215
+ ### config
216
+
217
+ ### Get Signature
218
+
219
+ ```ts
220
+ get config(): Exclude<TWrappedModule["params"]["config"], undefined>;
221
+ ```
222
+
223
+ #### Returns
224
+
225
+ `Exclude`\<`TWrappedModule`\[`"params"`\]\[`"config"`\], `undefined`\>
226
+
227
+ ### Implementation of
228
+
229
+ ```ts
230
+ AttachableModuleInstance.config
231
+ ```
232
+
233
+ ***
234
+
235
+ ### downResolver
236
+
237
+ ### Get Signature
238
+
239
+ ```ts
240
+ get downResolver(): ModuleResolverInstance;
241
+ ```
242
+
243
+ #### Returns
244
+
245
+ `ModuleResolverInstance`
246
+
247
+ ### Implementation of
248
+
249
+ ```ts
250
+ AttachableModuleInstance.downResolver
251
+ ```
252
+
253
+ ***
254
+
255
+ ### id
256
+
257
+ ### Get Signature
258
+
259
+ ```ts
260
+ get id(): string;
261
+ ```
262
+
263
+ The name (if specified) or address of the module
264
+
265
+ #### Returns
266
+
267
+ `string`
268
+
269
+ ### Implementation of
270
+
271
+ ```ts
272
+ AttachableModuleInstance.id
273
+ ```
274
+
275
+ ***
276
+
277
+ ### mod
278
+
279
+ ### Get Signature
280
+
281
+ ```ts
282
+ get mod(): TWrappedModule;
283
+ ```
284
+
285
+ #### Returns
286
+
287
+ `TWrappedModule`
288
+
289
+ ***
290
+
291
+ ### modName
292
+
293
+ ### Get Signature
294
+
295
+ ```ts
296
+ get modName(): string | undefined;
297
+ ```
298
+
299
+ #### Returns
300
+
301
+ `string` \| `undefined`
302
+
303
+ ### Implementation of
304
+
305
+ ```ts
306
+ AttachableModuleInstance.modName
307
+ ```
308
+
309
+ ***
310
+
311
+ ### name
312
+
313
+ ### Get Signature
314
+
315
+ ```ts
316
+ get name(): CreatableName;
317
+ ```
318
+
319
+ The name identifier for this instance.
320
+
321
+ #### Returns
322
+
323
+ `CreatableName`
324
+
325
+ ### Implementation of
326
+
327
+ ```ts
328
+ AttachableModuleInstance.name
329
+ ```
330
+
331
+ ***
332
+
333
+ ### priority
334
+
335
+ ### Get Signature
336
+
337
+ ```ts
338
+ get priority(): 1;
339
+ ```
340
+
341
+ #### Returns
342
+
343
+ `1`
344
+
345
+ ### Implementation of
346
+
347
+ ```ts
348
+ AttachableModuleInstance.priority
349
+ ```
350
+
351
+ ***
352
+
353
+ ### privateResolver
354
+
355
+ ### Get Signature
356
+
357
+ ```ts
358
+ get privateResolver(): ModuleResolverInstance;
359
+ ```
360
+
361
+ #### Returns
362
+
363
+ `ModuleResolverInstance`
364
+
365
+ ### Implementation of
366
+
367
+ ```ts
368
+ AttachableModuleInstance.privateResolver
369
+ ```
370
+
371
+ ***
372
+
373
+ ### queries
374
+
375
+ ### Get Signature
376
+
377
+ ```ts
378
+ get queries(): string[];
379
+ ```
380
+
381
+ #### Returns
382
+
383
+ `string`[]
384
+
385
+ ### Implementation of
386
+
387
+ ```ts
388
+ AttachableModuleInstance.queries
389
+ ```
390
+
391
+ ***
392
+
393
+ ### status
394
+
395
+ ### Get Signature
396
+
397
+ ```ts
398
+ get status(): ModuleStatus;
399
+ ```
400
+
401
+ #### Returns
402
+
403
+ `ModuleStatus`
404
+
405
+ ### Set Signature
406
+
407
+ ```ts
408
+ set status(value): void;
409
+ ```
410
+
411
+ #### Parameters
412
+
413
+ ##### value
414
+
415
+ `ModuleStatus`
416
+
417
+ #### Returns
418
+
419
+ `void`
420
+
421
+ ### Implementation of
422
+
423
+ ```ts
424
+ AttachableModuleInstance.status
425
+ ```
426
+
427
+ ***
428
+
429
+ ### upResolver
430
+
431
+ ### Get Signature
432
+
433
+ ```ts
434
+ get upResolver(): ModuleResolverInstance;
435
+ ```
436
+
437
+ #### Returns
438
+
439
+ `ModuleResolverInstance`
440
+
441
+ ### Implementation of
442
+
443
+ ```ts
444
+ AttachableModuleInstance.upResolver
445
+ ```
446
+
447
+ ## Methods
448
+
449
+ ### canWrap()
450
+
451
+ ```ts
452
+ static canWrap(mod?): mod is QueryableModule<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>;
453
+ ```
454
+
455
+ ### Parameters
456
+
457
+ #### mod?
458
+
459
+ `QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
460
+
461
+ ### Returns
462
+
463
+ `mod is QueryableModule<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>`
464
+
465
+ ***
466
+
467
+ ### hasRequiredQueries()
468
+
469
+ ```ts
470
+ static hasRequiredQueries(mod): boolean;
471
+ ```
472
+
473
+ ### Parameters
474
+
475
+ #### mod
476
+
477
+ `QueryableModule`
478
+
479
+ ### Returns
480
+
481
+ `boolean`
482
+
483
+ ***
484
+
485
+ ### is()
486
+
487
+ ```ts
488
+ static is<TModuleWrapper>(this, wrapper): wrapper is TModuleWrapper;
489
+ ```
490
+
491
+ ### Type Parameters
492
+
493
+ #### TModuleWrapper
494
+
495
+ `TModuleWrapper` *extends* `ModuleWrapper`\<`QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>\>
496
+
497
+ ### Parameters
498
+
499
+ #### this
500
+
501
+ [`ConstructableModuleWrapper`](#../type-aliases/ConstructableModuleWrapper)\<`TModuleWrapper`\>
502
+
503
+ #### wrapper
504
+
505
+ `any`
506
+
507
+ ### Returns
508
+
509
+ `wrapper is TModuleWrapper`
510
+
511
+ ***
512
+
513
+ ### missingRequiredQueries()
514
+
515
+ ```ts
516
+ static missingRequiredQueries(mod): string[];
517
+ ```
518
+
519
+ ### Parameters
520
+
521
+ #### mod
522
+
523
+ `QueryableModule`
524
+
525
+ ### Returns
526
+
527
+ `string`[]
528
+
529
+ ***
530
+
531
+ ### tryWrap()
532
+
533
+ ```ts
534
+ static tryWrap<TModuleWrapper>(
535
+ this,
536
+ mod,
537
+ account,
538
+ checkIdentity?): TModuleWrapper | undefined;
539
+ ```
540
+
541
+ ### Type Parameters
542
+
543
+ #### TModuleWrapper
544
+
545
+ `TModuleWrapper` *extends* `ModuleWrapper`\<`QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>\>
546
+
547
+ ### Parameters
548
+
549
+ #### this
550
+
551
+ [`ConstructableModuleWrapper`](#../type-aliases/ConstructableModuleWrapper)\<`TModuleWrapper`\>
552
+
553
+ #### mod
554
+
555
+ \| `QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
556
+ \| `undefined`
557
+
558
+ #### account
559
+
560
+ `AccountInstance`
561
+
562
+ #### checkIdentity?
563
+
564
+ `boolean` = `true`
565
+
566
+ ### Returns
567
+
568
+ `TModuleWrapper` \| `undefined`
569
+
570
+ ***
571
+
572
+ ### with()
573
+
574
+ ```ts
575
+ static with<TModuleWrapper, R>(
576
+ this,
577
+ mod,
578
+ closure): R | undefined;
579
+ ```
580
+
581
+ ### Type Parameters
582
+
583
+ #### TModuleWrapper
584
+
585
+ `TModuleWrapper` *extends* `ModuleWrapper`\<`QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>\>
586
+
587
+ #### R
588
+
589
+ `R` *extends* `Promisable`\<`void`\> = `void`
590
+
591
+ ### Parameters
592
+
593
+ #### this
594
+
595
+ [`ConstructableModuleWrapper`](#../type-aliases/ConstructableModuleWrapper)\<`TModuleWrapper`\>
596
+
597
+ #### mod
598
+
599
+ `any`
600
+
601
+ #### closure
602
+
603
+ (`mod`) => `R`
604
+
605
+ ### Returns
606
+
607
+ `R` \| `undefined`
608
+
609
+ ***
610
+
611
+ ### wrap()
612
+
613
+ ```ts
614
+ static wrap<TModuleWrapper>(
615
+ this,
616
+ mod,
617
+ account,
618
+ checkIdentity?): TModuleWrapper;
619
+ ```
620
+
621
+ ### Type Parameters
622
+
623
+ #### TModuleWrapper
624
+
625
+ `TModuleWrapper` *extends* `ModuleWrapper`\<`QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>\>
626
+
627
+ ### Parameters
628
+
629
+ #### this
630
+
631
+ [`ConstructableModuleWrapper`](#../type-aliases/ConstructableModuleWrapper)\<`TModuleWrapper`\>
632
+
633
+ #### mod
634
+
635
+ \| `QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
636
+ \| `undefined`
637
+
638
+ #### account
639
+
640
+ `AccountInstance`
641
+
642
+ #### checkIdentity?
643
+
644
+ `boolean` = `true`
645
+
646
+ ### Returns
647
+
648
+ `TModuleWrapper`
649
+
650
+ ***
651
+
652
+ ### addParent()
653
+
654
+ ```ts
655
+ addParent(mod): void;
656
+ ```
657
+
658
+ ### Parameters
659
+
660
+ #### mod
661
+
662
+ `ModuleInstance`
663
+
664
+ ### Returns
665
+
666
+ `void`
667
+
668
+ ### Implementation of
669
+
670
+ ```ts
671
+ AttachableModuleInstance.addParent
672
+ ```
673
+
674
+ ***
675
+
676
+ ### addressPreviousHash()
677
+
678
+ ```ts
679
+ addressPreviousHash(): Promise<AddressPreviousHashPayload>;
680
+ ```
681
+
682
+ ### Returns
683
+
684
+ `Promise`\<`AddressPreviousHashPayload`\>
685
+
686
+ ***
687
+
688
+ ### clearListeners()
689
+
690
+ ```ts
691
+ clearListeners(eventNames): void;
692
+ ```
693
+
694
+ Removes all listeners for the specified event name(s).
695
+
696
+ ### Parameters
697
+
698
+ #### eventNames
699
+
700
+ `Parameters`\<`TWrappedModule`\[`"clearListeners"`\]\>\[`0`\]
701
+
702
+ ### Returns
703
+
704
+ `void`
705
+
706
+ ### Implementation of
707
+
708
+ ```ts
709
+ AttachableModuleInstance.clearListeners
710
+ ```
711
+
712
+ ***
713
+
714
+ ### emit()
715
+
716
+ ```ts
717
+ emit(eventName, eventArgs): Promise<void>;
718
+ ```
719
+
720
+ Emits an event, invoking all registered listeners concurrently.
721
+
722
+ ### Parameters
723
+
724
+ #### eventName
725
+
726
+ `Parameters`\<`TWrappedModule`\[`"emit"`\]\>\[`0`\]
727
+
728
+ #### eventArgs
729
+
730
+ `Parameters`\<`TWrappedModule`\[`"emit"`\]\>\[`1`\]
731
+
732
+ ### Returns
733
+
734
+ `Promise`\<`void`\>
735
+
736
+ ### Implementation of
737
+
738
+ ```ts
739
+ AttachableModuleInstance.emit
740
+ ```
741
+
742
+ ***
743
+
744
+ ### emitSerial()
745
+
746
+ ```ts
747
+ emitSerial(eventName, eventArgs): Promise<void>;
748
+ ```
749
+
750
+ Emits an event, invoking all registered listeners sequentially in order.
751
+
752
+ ### Parameters
753
+
754
+ #### eventName
755
+
756
+ `Parameters`\<`TWrappedModule`\[`"emitSerial"`\]\>\[`0`\]
757
+
758
+ #### eventArgs
759
+
760
+ `Parameters`\<`TWrappedModule`\[`"emitSerial"`\]\>\[`1`\]
761
+
762
+ ### Returns
763
+
764
+ `Promise`\<`void`\>
765
+
766
+ ### Implementation of
767
+
768
+ ```ts
769
+ AttachableModuleInstance.emitSerial
770
+ ```
771
+
772
+ ***
773
+
774
+ ### listenerCount()
775
+
776
+ ```ts
777
+ listenerCount(eventNames): number;
778
+ ```
779
+
780
+ Returns the total number of listeners registered for the specified event name(s).
781
+
782
+ ### Parameters
783
+
784
+ #### eventNames
785
+
786
+ `Parameters`\<`TWrappedModule`\[`"listenerCount"`\]\>\[`0`\]
787
+
788
+ ### Returns
789
+
790
+ `number`
791
+
792
+ ### Implementation of
793
+
794
+ ```ts
795
+ AttachableModuleInstance.listenerCount
796
+ ```
797
+
798
+ ***
799
+
800
+ ### manifest()
801
+
802
+ ```ts
803
+ manifest(maxDepth?): Promise<ModuleManifestPayload>;
804
+ ```
805
+
806
+ ### Parameters
807
+
808
+ #### maxDepth?
809
+
810
+ `number`
811
+
812
+ ### Returns
813
+
814
+ `Promise`\<`ModuleManifestPayload`\>
815
+
816
+ ### Implementation of
817
+
818
+ ```ts
819
+ AttachableModuleInstance.manifest
820
+ ```
821
+
822
+ ***
823
+
824
+ ### manifestQuery()
825
+
826
+ ```ts
827
+ manifestQuery(account, maxDepth?): Promise<ModuleQueryResult<ModuleManifestPayload>>;
828
+ ```
829
+
830
+ ### Parameters
831
+
832
+ #### account
833
+
834
+ `AccountInstance`
835
+
836
+ #### maxDepth?
837
+
838
+ `number`
839
+
840
+ ### Returns
841
+
842
+ `Promise`\<`ModuleQueryResult`\<`ModuleManifestPayload`\>\>
843
+
844
+ ### Implementation of
845
+
846
+ ```ts
847
+ AttachableModuleInstance.manifestQuery
848
+ ```
849
+
850
+ ***
851
+
852
+ ### moduleAddress()
853
+
854
+ ```ts
855
+ moduleAddress(): Promise<AddressPreviousHashPayload[]>;
856
+ ```
857
+
858
+ ### Returns
859
+
860
+ `Promise`\<`AddressPreviousHashPayload`[]\>
861
+
862
+ ### Implementation of
863
+
864
+ ```ts
865
+ AttachableModuleInstance.moduleAddress
866
+ ```
867
+
868
+ ***
869
+
870
+ ### off()
871
+
872
+ ```ts
873
+ off<TEventName>(eventNames, listener): void;
874
+ ```
875
+
876
+ Removes a specific listener from the specified event name(s).
877
+
878
+ ### Type Parameters
879
+
880
+ #### TEventName
881
+
882
+ `TEventName` *extends* `string` \| `number` \| `symbol`
883
+
884
+ ### Parameters
885
+
886
+ #### eventNames
887
+
888
+ `TEventName`
889
+
890
+ #### listener
891
+
892
+ `EventListener`\<`TWrappedModule`\[`"eventData"`\]\[`TEventName`\]\>
893
+
894
+ ### Returns
895
+
896
+ `void`
897
+
898
+ ### Implementation of
899
+
900
+ ```ts
901
+ AttachableModuleInstance.off
902
+ ```
903
+
904
+ ***
905
+
906
+ ### offAny()
907
+
908
+ ```ts
909
+ offAny(listener): void;
910
+ ```
911
+
912
+ Removes a wildcard listener that was receiving all events.
913
+
914
+ ### Parameters
915
+
916
+ #### listener
917
+
918
+ `EventAnyListener`
919
+
920
+ ### Returns
921
+
922
+ `void`
923
+
924
+ ### Implementation of
925
+
926
+ ```ts
927
+ AttachableModuleInstance.offAny
928
+ ```
929
+
930
+ ***
931
+
932
+ ### on()
933
+
934
+ ```ts
935
+ on<TEventName>(eventNames, listener): EventUnsubscribeFunction;
936
+ ```
937
+
938
+ Subscribes a listener to the specified event name(s) and returns an unsubscribe function.
939
+
940
+ ### Type Parameters
941
+
942
+ #### TEventName
943
+
944
+ `TEventName` *extends* `string` \| `number` \| `symbol`
945
+
946
+ ### Parameters
947
+
948
+ #### eventNames
949
+
950
+ `TEventName`
951
+
952
+ #### listener
953
+
954
+ `EventListener`\<`TWrappedModule`\[`"eventData"`\]\[`TEventName`\]\>
955
+
956
+ ### Returns
957
+
958
+ `EventUnsubscribeFunction`
959
+
960
+ ### Implementation of
961
+
962
+ ```ts
963
+ AttachableModuleInstance.on
964
+ ```
965
+
966
+ ***
967
+
968
+ ### onAny()
969
+
970
+ ```ts
971
+ onAny(listener): EventUnsubscribeFunction;
972
+ ```
973
+
974
+ Subscribes a wildcard listener that receives all events and returns an unsubscribe function.
975
+
976
+ ### Parameters
977
+
978
+ #### listener
979
+
980
+ `EventAnyListener`
981
+
982
+ ### Returns
983
+
984
+ `EventUnsubscribeFunction`
985
+
986
+ ### Implementation of
987
+
988
+ ```ts
989
+ AttachableModuleInstance.onAny
990
+ ```
991
+
992
+ ***
993
+
994
+ ### once()
995
+
996
+ ```ts
997
+ once<TEventName>(eventName, listener): EventUnsubscribeFunction;
998
+ ```
999
+
1000
+ Subscribes a listener that will be invoked only once for the specified event, then automatically removed.
1001
+
1002
+ ### Type Parameters
1003
+
1004
+ #### TEventName
1005
+
1006
+ `TEventName` *extends* `string` \| `number` \| `symbol`
1007
+
1008
+ ### Parameters
1009
+
1010
+ #### eventName
1011
+
1012
+ `TEventName`
1013
+
1014
+ #### listener
1015
+
1016
+ `EventListener`\<`TWrappedModule`\[`"eventData"`\]\[`TEventName`\]\>
1017
+
1018
+ ### Returns
1019
+
1020
+ `EventUnsubscribeFunction`
1021
+
1022
+ ### Implementation of
1023
+
1024
+ ```ts
1025
+ AttachableModuleInstance.once
1026
+ ```
1027
+
1028
+ ***
1029
+
1030
+ ### parents()
1031
+
1032
+ ```ts
1033
+ parents(): Promisable<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;
1034
+ ```
1035
+
1036
+ ### Returns
1037
+
1038
+ `Promisable`\<`ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>[]\>
1039
+
1040
+ ### Implementation of
1041
+
1042
+ ```ts
1043
+ AttachableModuleInstance.parents
1044
+ ```
1045
+
1046
+ ***
1047
+
1048
+ ### previousHash()
1049
+
1050
+ ```ts
1051
+ previousHash(): Promise<string | undefined>;
1052
+ ```
1053
+
1054
+ ### Returns
1055
+
1056
+ `Promise`\<`string` \| `undefined`\>
1057
+
1058
+ ### Implementation of
1059
+
1060
+ ```ts
1061
+ AttachableModuleInstance.previousHash
1062
+ ```
1063
+
1064
+ ***
1065
+
1066
+ ### previousHashQuery()
1067
+
1068
+ ```ts
1069
+ previousHashQuery(account?): Promise<ModuleQueryResult<AddressPreviousHashPayload>>;
1070
+ ```
1071
+
1072
+ ### Parameters
1073
+
1074
+ #### account?
1075
+
1076
+ `AccountInstance`
1077
+
1078
+ ### Returns
1079
+
1080
+ `Promise`\<`ModuleQueryResult`\<`AddressPreviousHashPayload`\>\>
1081
+
1082
+ ***
1083
+
1084
+ ### privateChildren()
1085
+
1086
+ ```ts
1087
+ privateChildren(): Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;
1088
+ ```
1089
+
1090
+ ### Returns
1091
+
1092
+ `Promise`\<`ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>[]\>
1093
+
1094
+ ### Implementation of
1095
+
1096
+ ```ts
1097
+ AttachableModuleInstance.privateChildren
1098
+ ```
1099
+
1100
+ ***
1101
+
1102
+ ### publicChildren()
1103
+
1104
+ ```ts
1105
+ publicChildren(): Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;
1106
+ ```
1107
+
1108
+ ### Returns
1109
+
1110
+ `Promise`\<`ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>[]\>
1111
+
1112
+ ### Implementation of
1113
+
1114
+ ```ts
1115
+ AttachableModuleInstance.publicChildren
1116
+ ```
1117
+
1118
+ ***
1119
+
1120
+ ### query()
1121
+
1122
+ ```ts
1123
+ query<T>(query, payloads?): Promise<ModuleQueryResult>;
1124
+ ```
1125
+
1126
+ ### Type Parameters
1127
+
1128
+ #### T
1129
+
1130
+ `T` *extends* `UnsignedQueryBoundWitness` = `UnsignedQueryBoundWitness`
1131
+
1132
+ ### Parameters
1133
+
1134
+ #### query
1135
+
1136
+ `T`
1137
+
1138
+ #### payloads?
1139
+
1140
+ `Payload`[]
1141
+
1142
+ ### Returns
1143
+
1144
+ `Promise`\<`ModuleQueryResult`\>
1145
+
1146
+ ### Implementation of
1147
+
1148
+ ```ts
1149
+ AttachableModuleInstance.query
1150
+ ```
1151
+
1152
+ ***
1153
+
1154
+ ### queryable()
1155
+
1156
+ ```ts
1157
+ queryable<T>(query, payloads?): Promisable<boolean>;
1158
+ ```
1159
+
1160
+ ### Type Parameters
1161
+
1162
+ #### T
1163
+
1164
+ `T` *extends* `UnsignedQueryBoundWitness` = `UnsignedQueryBoundWitness`
1165
+
1166
+ ### Parameters
1167
+
1168
+ #### query
1169
+
1170
+ `T`
1171
+
1172
+ #### payloads?
1173
+
1174
+ `Payload`[]
1175
+
1176
+ ### Returns
1177
+
1178
+ `Promisable`\<`boolean`\>
1179
+
1180
+ ### Implementation of
1181
+
1182
+ ```ts
1183
+ AttachableModuleInstance.queryable
1184
+ ```
1185
+
1186
+ ***
1187
+
1188
+ ### removeParent()
1189
+
1190
+ ```ts
1191
+ removeParent(address): void;
1192
+ ```
1193
+
1194
+ ### Parameters
1195
+
1196
+ #### address
1197
+
1198
+ `BrandedAddress`
1199
+
1200
+ ### Returns
1201
+
1202
+ `void`
1203
+
1204
+ ### Implementation of
1205
+
1206
+ ```ts
1207
+ AttachableModuleInstance.removeParent
1208
+ ```
1209
+
1210
+ ***
1211
+
1212
+ ### ~~resolve()~~
1213
+
1214
+ ### Call Signature
1215
+
1216
+ ```ts
1217
+ resolve<T>(): Promise<T[]>;
1218
+ ```
1219
+
1220
+ #### Type Parameters
1221
+
1222
+ ##### T
1223
+
1224
+ `T` *extends* `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\> = `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1225
+
1226
+ #### Returns
1227
+
1228
+ `Promise`\<`T`[]\>
1229
+
1230
+ #### Deprecated
1231
+
1232
+ do not pass undefined. If trying to get all, pass '*'
1233
+
1234
+ #### Implementation of
1235
+
1236
+ ```ts
1237
+ AttachableModuleInstance.resolve
1238
+ ```
1239
+
1240
+ ### Call Signature
1241
+
1242
+ ```ts
1243
+ resolve<T>(all, options?): Promise<T[]>;
1244
+ ```
1245
+
1246
+ #### Type Parameters
1247
+
1248
+ ##### T
1249
+
1250
+ `T` *extends* `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\> = `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1251
+
1252
+ #### Parameters
1253
+
1254
+ ##### all
1255
+
1256
+ `"*"`
1257
+
1258
+ ##### options?
1259
+
1260
+ `ModuleFilterOptions`\<`T`\>
1261
+
1262
+ #### Returns
1263
+
1264
+ `Promise`\<`T`[]\>
1265
+
1266
+ #### Deprecated
1267
+
1268
+ do not pass undefined. If trying to get all, pass '*'
1269
+
1270
+ #### Implementation of
1271
+
1272
+ ```ts
1273
+ AttachableModuleInstance.resolve
1274
+ ```
1275
+
1276
+ ### Call Signature
1277
+
1278
+ ```ts
1279
+ resolve<T>(id, options?): Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>>;
1280
+ ```
1281
+
1282
+ #### Type Parameters
1283
+
1284
+ ##### T
1285
+
1286
+ `T` *extends* `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\> = `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1287
+
1288
+ #### Parameters
1289
+
1290
+ ##### id
1291
+
1292
+ `ModuleIdentifier`
1293
+
1294
+ ##### options?
1295
+
1296
+ `ModuleFilterOptions`\<`T`\>
1297
+
1298
+ #### Returns
1299
+
1300
+ `Promise`\<`ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>\>
1301
+
1302
+ #### Deprecated
1303
+
1304
+ do not pass undefined. If trying to get all, pass '*'
1305
+
1306
+ #### Implementation of
1307
+
1308
+ ```ts
1309
+ AttachableModuleInstance.resolve
1310
+ ```
1311
+
1312
+ ***
1313
+
1314
+ ### resolvePrivate()
1315
+
1316
+ ### Call Signature
1317
+
1318
+ ```ts
1319
+ resolvePrivate<T>(all, options?): Promise<T[]>;
1320
+ ```
1321
+
1322
+ #### Type Parameters
1323
+
1324
+ ##### T
1325
+
1326
+ `T` *extends* `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\> = `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1327
+
1328
+ #### Parameters
1329
+
1330
+ ##### all
1331
+
1332
+ `"*"`
1333
+
1334
+ ##### options?
1335
+
1336
+ `ModuleFilterOptions`\<`T`\>
1337
+
1338
+ #### Returns
1339
+
1340
+ `Promise`\<`T`[]\>
1341
+
1342
+ #### Implementation of
1343
+
1344
+ ```ts
1345
+ AttachableModuleInstance.resolvePrivate
1346
+ ```
1347
+
1348
+ ### Call Signature
1349
+
1350
+ ```ts
1351
+ resolvePrivate<T>(id, options?): Promise<T | undefined>;
1352
+ ```
1353
+
1354
+ #### Type Parameters
1355
+
1356
+ ##### T
1357
+
1358
+ `T` *extends* `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\> = `ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1359
+
1360
+ #### Parameters
1361
+
1362
+ ##### id
1363
+
1364
+ `ModuleIdentifier`
1365
+
1366
+ ##### options?
1367
+
1368
+ `ModuleFilterOptions`\<`T`\>
1369
+
1370
+ #### Returns
1371
+
1372
+ `Promise`\<`T` \| `undefined`\>
1373
+
1374
+ #### Implementation of
1375
+
1376
+ ```ts
1377
+ AttachableModuleInstance.resolvePrivate
1378
+ ```
1379
+
1380
+ ***
1381
+
1382
+ ### siblings()
1383
+
1384
+ ```ts
1385
+ siblings(): Promise<ModuleInstance<QueryableModuleParams<AnyConfigSchema<ModuleConfig>>, ModuleEventData<object>>[]>;
1386
+ ```
1387
+
1388
+ ### Returns
1389
+
1390
+ `Promise`\<`ModuleInstance`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>[]\>
1391
+
1392
+ ### Implementation of
1393
+
1394
+ ```ts
1395
+ AttachableModuleInstance.siblings
1396
+ ```
1397
+
1398
+ ***
1399
+
1400
+ ### start()
1401
+
1402
+ ```ts
1403
+ start(): Promise<boolean>;
1404
+ ```
1405
+
1406
+ Starts the instance. Resolves to true if started successfully.
1407
+
1408
+ ### Returns
1409
+
1410
+ `Promise`\<`boolean`\>
1411
+
1412
+ ### Implementation of
1413
+
1414
+ ```ts
1415
+ AttachableModuleInstance.start
1416
+ ```
1417
+
1418
+ ***
1419
+
1420
+ ### state()
1421
+
1422
+ ```ts
1423
+ state(): Promise<Payload[]>;
1424
+ ```
1425
+
1426
+ ### Returns
1427
+
1428
+ `Promise`\<`Payload`[]\>
1429
+
1430
+ ### Implementation of
1431
+
1432
+ ```ts
1433
+ AttachableModuleInstance.state
1434
+ ```
1435
+
1436
+ ***
1437
+
1438
+ ### stateQuery()
1439
+
1440
+ ```ts
1441
+ stateQuery(_account): Promise<ModuleQueryResult>;
1442
+ ```
1443
+
1444
+ ### Parameters
1445
+
1446
+ #### \_account
1447
+
1448
+ `AccountInstance`
1449
+
1450
+ ### Returns
1451
+
1452
+ `Promise`\<`ModuleQueryResult`\>
1453
+
1454
+ ### Implementation of
1455
+
1456
+ ```ts
1457
+ AttachableModuleInstance.stateQuery
1458
+ ```
1459
+
1460
+ ***
1461
+
1462
+ ### stop()
1463
+
1464
+ ```ts
1465
+ stop(): Promise<boolean>;
1466
+ ```
1467
+
1468
+ Stops the instance. Resolves to true if stopped successfully.
1469
+
1470
+ ### Returns
1471
+
1472
+ `Promise`\<`boolean`\>
1473
+
1474
+ ### Implementation of
1475
+
1476
+ ```ts
1477
+ AttachableModuleInstance.stop
1478
+ ```
1479
+
1480
+ ***
1481
+
1482
+ ### bindQuery()
1483
+
1484
+ ```ts
1485
+ protected bindQuery<T>(
1486
+ query,
1487
+ payloads?,
1488
+ account?,
1489
+ additionalSigners?): PromiseEx<[UnsignedQueryBoundWitness, Payload[], ModuleError[]], AccountInstance>;
1490
+ ```
1491
+
1492
+ ### Type Parameters
1493
+
1494
+ #### T
1495
+
1496
+ `T` *extends* `Query`
1497
+
1498
+ ### Parameters
1499
+
1500
+ #### query
1501
+
1502
+ `T`
1503
+
1504
+ #### payloads?
1505
+
1506
+ `Payload`[]
1507
+
1508
+ #### account?
1509
+
1510
+ `AccountInstance` = `...`
1511
+
1512
+ #### additionalSigners?
1513
+
1514
+ `AccountInstance`[] = `...`
1515
+
1516
+ ### Returns
1517
+
1518
+ `PromiseEx`\<\[`UnsignedQueryBoundWitness`, `Payload`[], `ModuleError`[]\], `AccountInstance`\>
1519
+
1520
+ ***
1521
+
1522
+ ### bindQueryInternal()
1523
+
1524
+ ```ts
1525
+ protected bindQueryInternal<T>(
1526
+ query,
1527
+ payloads?,
1528
+ account?,
1529
+ additionalSigners?): Promise<[UnsignedQueryBoundWitness, Payload[], ModuleError[]]>;
1530
+ ```
1531
+
1532
+ ### Type Parameters
1533
+
1534
+ #### T
1535
+
1536
+ `T` *extends* `Query`
1537
+
1538
+ ### Parameters
1539
+
1540
+ #### query
1541
+
1542
+ `T`
1543
+
1544
+ #### payloads?
1545
+
1546
+ `Payload`[]
1547
+
1548
+ #### account?
1549
+
1550
+ `AccountInstance` = `...`
1551
+
1552
+ #### additionalSigners?
1553
+
1554
+ `AccountInstance`[] = `...`
1555
+
1556
+ ### Returns
1557
+
1558
+ `Promise`\<\[`UnsignedQueryBoundWitness`, `Payload`[], `ModuleError`[]\]\>
1559
+
1560
+ ***
1561
+
1562
+ ### filterErrors()
1563
+
1564
+ ```ts
1565
+ protected filterErrors(__namedParameters): ModuleError[];
1566
+ ```
1567
+
1568
+ ### Parameters
1569
+
1570
+ #### \_\_namedParameters
1571
+
1572
+ `ModuleQueryResult`
1573
+
1574
+ ### Returns
1575
+
1576
+ `ModuleError`[]
1577
+
1578
+ ***
1579
+
1580
+ ### sendQuery()
1581
+
1582
+ ```ts
1583
+ protected sendQuery<T, P, R>(queryPayload, payloads?): Promise<R[]>;
1584
+ ```
1585
+
1586
+ ### Type Parameters
1587
+
1588
+ #### T
1589
+
1590
+ `T` *extends* `Query`
1591
+
1592
+ #### P
1593
+
1594
+ `P` *extends* `Payload` = `Payload`
1595
+
1596
+ #### R
1597
+
1598
+ `R` *extends* `Payload` = `Payload`
1599
+
1600
+ ### Parameters
1601
+
1602
+ #### queryPayload
1603
+
1604
+ `T`
1605
+
1606
+ #### payloads?
1607
+
1608
+ `P`[]
1609
+
1610
+ ### Returns
1611
+
1612
+ `Promise`\<`R`[]\>
1613
+
1614
+ ***
1615
+
1616
+ ### sendQueryRaw()
1617
+
1618
+ ```ts
1619
+ protected sendQueryRaw<T, P, R>(
1620
+ queryPayload,
1621
+ payloads?,
1622
+ account?): Promise<ModuleQueryResult<R>>;
1623
+ ```
1624
+
1625
+ ### Type Parameters
1626
+
1627
+ #### T
1628
+
1629
+ `T` *extends* `Query`
1630
+
1631
+ #### P
1632
+
1633
+ `P` *extends* `Payload` = `Payload`
1634
+
1635
+ #### R
1636
+
1637
+ `R` *extends* `Payload` = `Payload`
1638
+
1639
+ ### Parameters
1640
+
1641
+ #### queryPayload
1642
+
1643
+ `T`
1644
+
1645
+ #### payloads?
1646
+
1647
+ `P`[]
1648
+
1649
+ #### account?
1650
+
1651
+ `AccountInstance`
1652
+
1653
+ ### Returns
1654
+
1655
+ `Promise`\<`ModuleQueryResult`\<`R`\>\>
1656
+
1657
+ ### functions
1658
+
1659
+ ### <a id="constructableModuleWrapper"></a>constructableModuleWrapper
1660
+
1661
+ [**@xyo-network/module-wrapper**](#../README)
1662
+
1663
+ ***
1664
+
1665
+ ```ts
1666
+ function constructableModuleWrapper<TWrapper>(): <U>(constructor) => void;
1667
+ ```
1668
+
1669
+ ## Type Parameters
1670
+
1671
+ ### TWrapper
1672
+
1673
+ `TWrapper` *extends* [`ModuleWrapper`](#../classes/ModuleWrapper)\<`QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>\>
1674
+
1675
+ ## Returns
1676
+
1677
+ \<`U`\>(`constructor`) => `void`
1678
+
1679
+ ### type-aliases
1680
+
1681
+ ### <a id="ConstructableModuleWrapper"></a>ConstructableModuleWrapper
1682
+
1683
+ [**@xyo-network/module-wrapper**](#../README)
1684
+
1685
+ ***
1686
+
1687
+ ```ts
1688
+ type ConstructableModuleWrapper<TWrapper> = TWrapper;
1689
+ ```
1690
+
1691
+ ## Type Parameters
1692
+
1693
+ ### TWrapper
1694
+
1695
+ `TWrapper` *extends* [`ModuleWrapper`](#../classes/ModuleWrapper)
1696
+
1697
+ ```ts
1698
+ type new ConstructableModuleWrapper(params): TWrapper;
1699
+ ```
1700
+
1701
+ ## Parameters
1702
+
1703
+ ### params
1704
+
1705
+ [`ModuleWrapperParams`](#ModuleWrapperParams)\<`TWrapper`\[`"mod"`\]\>
1706
+
1707
+ ## Returns
1708
+
1709
+ `TWrapper`
1710
+
1711
+ ## Properties
1712
+
1713
+ ### defaultLogger?
1714
+
1715
+ ```ts
1716
+ optional defaultLogger?: Logger;
1717
+ ```
1718
+
1719
+ ***
1720
+
1721
+ ### instanceIdentityCheck
1722
+
1723
+ ```ts
1724
+ instanceIdentityCheck: InstanceTypeCheck;
1725
+ ```
1726
+
1727
+ ***
1728
+
1729
+ ### moduleIdentityCheck
1730
+
1731
+ ```ts
1732
+ moduleIdentityCheck: QueryableModuleTypeCheck;
1733
+ ```
1734
+
1735
+ ***
1736
+
1737
+ ### requiredQueries
1738
+
1739
+ ```ts
1740
+ requiredQueries: string[];
1741
+ ```
1742
+
1743
+ ## Methods
1744
+
1745
+ ### canWrap()
1746
+
1747
+ ```ts
1748
+ canWrap(mod): boolean;
1749
+ ```
1750
+
1751
+ ### Parameters
1752
+
1753
+ #### mod
1754
+
1755
+ \| `QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1756
+ \| `undefined`
1757
+
1758
+ ### Returns
1759
+
1760
+ `boolean`
1761
+
1762
+ ***
1763
+
1764
+ ### is()
1765
+
1766
+ ```ts
1767
+ is<TModuleWrapper>(this, wrapper?): wrapper is TModuleWrapper;
1768
+ ```
1769
+
1770
+ ### Type Parameters
1771
+
1772
+ #### TModuleWrapper
1773
+
1774
+ `TModuleWrapper` *extends* [`ModuleWrapper`](#../classes/ModuleWrapper)\<`QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>\>
1775
+
1776
+ ### Parameters
1777
+
1778
+ #### this
1779
+
1780
+ `ConstructableModuleWrapper`\<`TModuleWrapper`\>
1781
+
1782
+ #### wrapper?
1783
+
1784
+ `any`
1785
+
1786
+ ### Returns
1787
+
1788
+ `wrapper is TModuleWrapper`
1789
+
1790
+ ***
1791
+
1792
+ ### tryWrap()
1793
+
1794
+ ```ts
1795
+ tryWrap<TModuleWrapper>(
1796
+ this,
1797
+ mod,
1798
+ account,
1799
+ checkIdentity?): TModuleWrapper | undefined;
1800
+ ```
1801
+
1802
+ ### Type Parameters
1803
+
1804
+ #### TModuleWrapper
1805
+
1806
+ `TModuleWrapper` *extends* [`ModuleWrapper`](#../classes/ModuleWrapper)\<`QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>\>
1807
+
1808
+ ### Parameters
1809
+
1810
+ #### this
1811
+
1812
+ `ConstructableModuleWrapper`\<`TModuleWrapper`\>
1813
+
1814
+ #### mod
1815
+
1816
+ \| `QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1817
+ \| `undefined`
1818
+
1819
+ #### account
1820
+
1821
+ `AccountInstance`
1822
+
1823
+ #### checkIdentity?
1824
+
1825
+ `boolean`
1826
+
1827
+ ### Returns
1828
+
1829
+ `TModuleWrapper` \| `undefined`
1830
+
1831
+ ***
1832
+
1833
+ ### wrap()
1834
+
1835
+ ```ts
1836
+ wrap<TModuleWrapper>(
1837
+ this,
1838
+ mod,
1839
+ account,
1840
+ checkIdentity?): TModuleWrapper;
1841
+ ```
1842
+
1843
+ ### Type Parameters
1844
+
1845
+ #### TModuleWrapper
1846
+
1847
+ `TModuleWrapper` *extends* [`ModuleWrapper`](#../classes/ModuleWrapper)\<`QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>\>
1848
+
1849
+ ### Parameters
1850
+
1851
+ #### this
1852
+
1853
+ `ConstructableModuleWrapper`\<`TModuleWrapper`\>
1854
+
1855
+ #### mod
1856
+
1857
+ \| `QueryableModule`\<`QueryableModuleParams`\<`AnyConfigSchema`\<`ModuleConfig`\>\>, `ModuleEventData`\<`object`\>\>
1858
+ \| `undefined`
1859
+
1860
+ #### account
1861
+
1862
+ `AccountInstance`
1863
+
1864
+ #### checkIdentity?
1865
+
1866
+ `boolean`
1867
+
1868
+ ### Returns
1869
+
1870
+ `TModuleWrapper`
1871
+
1872
+ ### <a id="ModuleWrapperParams"></a>ModuleWrapperParams
1873
+
1874
+ [**@xyo-network/module-wrapper**](#../README)
1875
+
1876
+ ***
1877
+
1878
+ ```ts
1879
+ type ModuleWrapperParams<TWrappedModule> = BaseParams<{
1880
+ account: AccountInstance;
1881
+ additionalSigners?: AccountInstance[];
1882
+ mod: TWrappedModule;
1883
+ }>;
1884
+ ```
1885
+
1886
+ ## Type Parameters
1887
+
1888
+ ### TWrappedModule
18
1889
 
19
- ## Credits
1890
+ `TWrappedModule` *extends* `QueryableModule` = `QueryableModule`
20
1891
 
21
- [Made with 🔥 and ❄️ by XYO](https://xyo.network)
22
1892
 
23
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
1893
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
1894
+ [npm-badge]: https://img.shields.io/npm/v/@xyo-network/module-wrapper.svg
1895
+ [npm-link]: https://www.npmjs.com/package/@xyo-network/module-wrapper
1896
+ [license-badge]: https://img.shields.io/npm/l/@xyo-network/module-wrapper.svg
1897
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE