@xyo-network/sentinel-memory 5.3.30 → 5.5.0

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