@xyo-network/core-payload-plugins 5.3.24 → 5.3.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +1486 -10
  2. package/package.json +33 -33
package/README.md CHANGED
@@ -1,23 +1,1499 @@
1
+ [![logo][]](https://xyo.network)
2
+
1
3
  # @xyo-network/core-payload-plugins
2
4
 
3
- [![logo][]](https://xyo.network)
5
+ [![npm][npm-badge]][npm-link]
6
+ [![license][license-badge]][license-link]
7
+
8
+ > Typescript/Javascript Plugins for XYO Platform
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
- Typescript/Javascript Plugins for XYO Platform
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__core-payload-plugins)
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
+ ### core-payload-plugins
46
+
47
+ ### .temp-typedoc
48
+
49
+ ### classes
50
+
51
+ ### <a id="DomainPayloadWrapper"></a>DomainPayloadWrapper
52
+
53
+ [**@xyo-network/core-payload-plugins**](#../README)
54
+
55
+ ***
56
+
57
+ ## Extends
58
+
59
+ - `PayloadWrapper`\<`T`\>
60
+
61
+ ## Type Parameters
62
+
63
+ ### T
64
+
65
+ `T` *extends* [`DomainPayload`](#../type-aliases/DomainPayload) = [`DomainPayload`](#../type-aliases/DomainPayload)
66
+
67
+ ## Constructors
68
+
69
+ ### Constructor
70
+
71
+ ```ts
72
+ protected new DomainPayloadWrapper<T>(payload): DomainPayloadWrapper<T>;
73
+ ```
74
+
75
+ ### Parameters
76
+
77
+ #### payload
78
+
79
+ `T`
80
+
81
+ ### Returns
82
+
83
+ `DomainPayloadWrapper`\<`T`\>
84
+
85
+ ### Inherited from
86
+
87
+ ```ts
88
+ PayloadWrapper<T>.constructor
89
+ ```
90
+
91
+ ## Properties
92
+
93
+ ### aliases?
94
+
95
+ ```ts
96
+ optional aliases?: FetchedAlias[] | null;
97
+ ```
98
+
99
+ ***
100
+
101
+ ### loaderFactory
102
+
103
+ ```ts
104
+ protected static loaderFactory: PayloadLoaderFactory | null;
105
+ ```
106
+
107
+ ### Inherited from
108
+
109
+ ```ts
110
+ PayloadWrapper.loaderFactory
111
+ ```
112
+
113
+ ***
114
+
115
+ ### payload
116
+
117
+ ```ts
118
+ payload: T;
119
+ ```
120
+
121
+ ### Inherited from
122
+
123
+ ```ts
124
+ PayloadWrapper.payload
125
+ ```
126
+
127
+ ## Methods
128
+
129
+ ### discover()
130
+
131
+ ```ts
132
+ static discover(reverseDomainName, proxy?): Promise<
133
+ | DomainPayloadWrapper<DomainPayload>
134
+ | undefined>;
135
+ ```
136
+
137
+ ### Parameters
138
+
139
+ #### reverseDomainName
140
+
141
+ `string`
142
+
143
+ #### proxy?
144
+
145
+ `string`
146
+
147
+ ### Returns
148
+
149
+ `Promise`\<
150
+ \| `DomainPayloadWrapper`\<[`DomainPayload`](#../type-aliases/DomainPayload)\>
151
+ \| `undefined`\>
152
+
153
+ ***
154
+
155
+ ### discoverDNSEntry()
156
+
157
+ ```ts
158
+ static discoverDNSEntry(domain): Promise<
159
+ | DomainPayloadWrapper<DomainPayload>
160
+ | undefined>;
161
+ ```
162
+
163
+ ### Parameters
164
+
165
+ #### domain
166
+
167
+ `string`
168
+
169
+ ### Returns
170
+
171
+ `Promise`\<
172
+ \| `DomainPayloadWrapper`\<[`DomainPayload`](#../type-aliases/DomainPayload)\>
173
+ \| `undefined`\>
174
+
175
+ ***
176
+
177
+ ### discoverRootFile()
178
+
179
+ ```ts
180
+ static discoverRootFile(domain, proxy?): Promise<
181
+ | DomainPayloadWrapper<DomainPayload>
182
+ | undefined>;
183
+ ```
184
+
185
+ ### Parameters
186
+
187
+ #### domain
188
+
189
+ `string`
190
+
191
+ #### proxy?
192
+
193
+ `string`
194
+
195
+ ### Returns
196
+
197
+ `Promise`\<
198
+ \| `DomainPayloadWrapper`\<[`DomainPayload`](#../type-aliases/DomainPayload)\>
199
+ \| `undefined`\>
200
+
201
+ ***
202
+
203
+ ### discoverRootFileDirect()
204
+
205
+ ```ts
206
+ static discoverRootFileDirect(domain): Promise<
207
+ | DomainPayloadWrapper<DomainPayload>
208
+ | undefined>;
209
+ ```
210
+
211
+ ### Parameters
212
+
213
+ #### domain
214
+
215
+ `string`
216
+
217
+ ### Returns
218
+
219
+ `Promise`\<
220
+ \| `DomainPayloadWrapper`\<[`DomainPayload`](#../type-aliases/DomainPayload)\>
221
+ \| `undefined`\>
222
+
223
+ ***
224
+
225
+ ### discoverRootFileWithProxy()
226
+
227
+ ```ts
228
+ static discoverRootFileWithProxy(domain, proxy?): Promise<
229
+ | DomainPayloadWrapper<DomainPayload>
230
+ | undefined>;
231
+ ```
232
+
233
+ ### Parameters
234
+
235
+ #### domain
236
+
237
+ `string`
238
+
239
+ #### proxy?
240
+
241
+ `string`
242
+
243
+ ### Returns
244
+
245
+ `Promise`\<
246
+ \| `DomainPayloadWrapper`\<[`DomainPayload`](#../type-aliases/DomainPayload)\>
247
+ \| `undefined`\>
248
+
249
+ ***
250
+
251
+ ### fetch()
252
+
253
+ ```ts
254
+ fetch(networkSlug?): Promise<void>;
255
+ ```
256
+
257
+ ### Parameters
258
+
259
+ #### networkSlug?
260
+
261
+ `BrandedHash`
262
+
263
+ ### Returns
264
+
265
+ `Promise`\<`void`\>
266
+
267
+ ***
268
+
269
+ ### fetchAliases()
270
+
271
+ ```ts
272
+ fetchAliases(networkSlug?): Promise<void>;
273
+ ```
274
+
275
+ ### Parameters
276
+
277
+ #### networkSlug?
278
+
279
+ `BrandedHash`
280
+
281
+ ### Returns
282
+
283
+ `Promise`\<`void`\>
284
+
285
+ ***
286
+
287
+ ### as()
288
+
289
+ ```ts
290
+ static as<T>(value): PayloadDataWrapper<T> | null;
291
+ ```
292
+
293
+ ### Type Parameters
294
+
295
+ #### T
296
+
297
+ `T` *extends* `Payload` = `Payload`
298
+
299
+ ### Parameters
300
+
301
+ #### value
302
+
303
+ `unknown`
304
+
305
+ ### Returns
306
+
307
+ `PayloadDataWrapper`\<`T`\> \| `null`
308
+
309
+ ### Inherited from
310
+
311
+ ```ts
312
+ PayloadWrapper.as
313
+ ```
314
+
315
+ ***
316
+
317
+ ### load()
318
+
319
+ ```ts
320
+ static load(address): Promise<PayloadDataWrapper<Payload> | null>;
321
+ ```
322
+
323
+ ### Parameters
324
+
325
+ #### address
326
+
327
+ `BrandedAddress`
328
+
329
+ ### Returns
330
+
331
+ `Promise`\<`PayloadDataWrapper`\<`Payload`\> \| `null`\>
332
+
333
+ ### Inherited from
334
+
335
+ ```ts
336
+ PayloadWrapper.load
337
+ ```
338
+
339
+ ***
340
+
341
+ ### parse()
342
+
343
+ ```ts
344
+ static parse<T>(payload?): PayloadDataWrapper<T> | undefined;
345
+ ```
346
+
347
+ ### Type Parameters
348
+
349
+ #### T
350
+
351
+ `T` *extends* `Payload`
352
+
353
+ ### Parameters
354
+
355
+ #### payload?
356
+
357
+ `unknown`
358
+
359
+ ### Returns
360
+
361
+ `PayloadDataWrapper`\<`T`\> \| `undefined`
362
+
363
+ ### Inherited from
364
+
365
+ ```ts
366
+ PayloadWrapper.parse
367
+ ```
368
+
369
+ ***
370
+
371
+ ### setLoaderFactory()
372
+
373
+ ```ts
374
+ static setLoaderFactory(factory): void;
375
+ ```
376
+
377
+ ### Parameters
378
+
379
+ #### factory
380
+
381
+ `PayloadLoaderFactory` \| `null`
382
+
383
+ ### Returns
384
+
385
+ `void`
386
+
387
+ ### Inherited from
388
+
389
+ ```ts
390
+ PayloadWrapper.setLoaderFactory
391
+ ```
392
+
393
+ ***
394
+
395
+ ### tryParse()
396
+
397
+ ```ts
398
+ static tryParse<T>(obj): PayloadDataWrapper<T> | undefined;
399
+ ```
400
+
401
+ ### Type Parameters
402
+
403
+ #### T
404
+
405
+ `T` *extends* `Payload`
406
+
407
+ ### Parameters
408
+
409
+ #### obj
410
+
411
+ `unknown`
412
+
413
+ ### Returns
414
+
415
+ `PayloadDataWrapper`\<`T`\> \| `undefined`
416
+
417
+ ### Inherited from
418
+
419
+ ```ts
420
+ PayloadWrapper.tryParse
421
+ ```
422
+
423
+ ***
424
+
425
+ ### wrap()
426
+
427
+ ```ts
428
+ static wrap<T>(payload?): PayloadDataWrapper<T>;
429
+ ```
430
+
431
+ ### Type Parameters
432
+
433
+ #### T
434
+
435
+ `T` *extends* `Payload`
436
+
437
+ ### Parameters
438
+
439
+ #### payload?
440
+
441
+ `T` \| `PayloadDataWrapper`\<`T`\>
442
+
443
+ ### Returns
444
+
445
+ `PayloadDataWrapper`\<`T`\>
446
+
447
+ ### Inherited from
448
+
449
+ ```ts
450
+ PayloadWrapper.wrap
451
+ ```
452
+
453
+ ***
454
+
455
+ ### wrappedMap()
456
+
457
+ ```ts
458
+ static wrappedMap<T>(payloads): Promise<Record<string, PayloadDataWrapper<T>>>;
459
+ ```
460
+
461
+ ### Type Parameters
462
+
463
+ #### T
464
+
465
+ `T` *extends* `Payload`
466
+
467
+ ### Parameters
468
+
469
+ #### payloads
470
+
471
+ (`T` \| `PayloadDataWrapper`\<`T`\>)[]
472
+
473
+ ### Returns
474
+
475
+ `Promise`\<`Record`\<`string`, `PayloadDataWrapper`\<`T`\>\>\>
476
+
477
+ ### Inherited from
478
+
479
+ ```ts
480
+ PayloadWrapper.wrappedMap
481
+ ```
482
+
483
+ ***
484
+
485
+ ### validate()
486
+
487
+ ```ts
488
+ validate(): Promise<Error[]>;
489
+ ```
490
+
491
+ ### Returns
492
+
493
+ `Promise`\<`Error`[]\>
494
+
495
+ ### Inherited from
496
+
497
+ ```ts
498
+ PayloadWrapper.validate
499
+ ```
500
+
501
+ ***
502
+
503
+ ### unwrap()
504
+
505
+ ### Call Signature
506
+
507
+ ```ts
508
+ static unwrap<TPayload>(payload?): TPayload | undefined;
509
+ ```
510
+
511
+ #### Type Parameters
512
+
513
+ ##### TPayload
514
+
515
+ `TPayload` *extends* `Payload` = `Payload`
516
+
517
+ #### Parameters
518
+
519
+ ##### payload?
520
+
521
+ `TPayload`
522
+
523
+ #### Returns
524
+
525
+ `TPayload` \| `undefined`
526
+
527
+ #### Inherited from
528
+
529
+ ```ts
530
+ PayloadWrapper.unwrap
531
+ ```
532
+
533
+ ### Call Signature
534
+
535
+ ```ts
536
+ static unwrap<TPayload, TWrapper>(payload): TPayload;
537
+ ```
538
+
539
+ #### Type Parameters
540
+
541
+ ##### TPayload
542
+
543
+ `TPayload` *extends* `Payload` = `Payload`
544
+
545
+ ##### TWrapper
546
+
547
+ `TWrapper` *extends* `PayloadWrapperBase`\<`TPayload`\> = `PayloadWrapperBase`\<`TPayload`\>
548
+
549
+ #### Parameters
550
+
551
+ ##### payload
552
+
553
+ `TPayload` \| `TWrapper`
554
+
555
+ #### Returns
556
+
557
+ `TPayload`
558
+
559
+ #### Inherited from
560
+
561
+ ```ts
562
+ PayloadWrapper.unwrap
563
+ ```
564
+
565
+ ### Call Signature
566
+
567
+ ```ts
568
+ static unwrap<TPayload, TWrapper>(payload): TPayload[];
569
+ ```
570
+
571
+ #### Type Parameters
572
+
573
+ ##### TPayload
574
+
575
+ `TPayload` *extends* `Payload` = `Payload`
576
+
577
+ ##### TWrapper
578
+
579
+ `TWrapper` *extends* `PayloadWrapperBase`\<`TPayload`\> = `PayloadWrapperBase`\<`TPayload`\>
580
+
581
+ #### Parameters
582
+
583
+ ##### payload
584
+
585
+ (`TPayload` \| `TWrapper`)[]
586
+
587
+ #### Returns
588
+
589
+ `TPayload`[]
590
+
591
+ #### Inherited from
592
+
593
+ ```ts
594
+ PayloadWrapper.unwrap
595
+ ```
596
+
597
+ ***
598
+
599
+ ### unwrapSinglePayload()
600
+
601
+ ### Call Signature
602
+
603
+ ```ts
604
+ static unwrapSinglePayload<TPayload>(payload?): TPayload | undefined;
605
+ ```
606
+
607
+ #### Type Parameters
608
+
609
+ ##### TPayload
610
+
611
+ `TPayload` *extends* `Payload` = `Payload`
612
+
613
+ #### Parameters
614
+
615
+ ##### payload?
616
+
617
+ `TPayload`
618
+
619
+ #### Returns
620
+
621
+ `TPayload` \| `undefined`
622
+
623
+ #### Inherited from
624
+
625
+ ```ts
626
+ PayloadWrapper.unwrapSinglePayload
627
+ ```
628
+
629
+ ### Call Signature
630
+
631
+ ```ts
632
+ static unwrapSinglePayload<TPayload, TWrapper>(payload): TPayload;
633
+ ```
634
+
635
+ #### Type Parameters
636
+
637
+ ##### TPayload
638
+
639
+ `TPayload` *extends* `Payload` = `Payload`
640
+
641
+ ##### TWrapper
642
+
643
+ `TWrapper` *extends* `PayloadWrapperBase`\<`TPayload`\> = `PayloadWrapperBase`\<`TPayload`\>
644
+
645
+ #### Parameters
646
+
647
+ ##### payload
648
+
649
+ `TPayload` \| `TWrapper`
650
+
651
+ #### Returns
652
+
653
+ `TPayload`
654
+
655
+ #### Inherited from
656
+
657
+ ```ts
658
+ PayloadWrapper.unwrapSinglePayload
659
+ ```
660
+
661
+ ***
662
+
663
+ ### dataHash()
664
+
665
+ ```ts
666
+ dataHash(): Promise<BrandedHash>;
667
+ ```
668
+
669
+ ### Returns
670
+
671
+ `Promise`\<`BrandedHash`\>
672
+
673
+ ### Inherited from
674
+
675
+ ```ts
676
+ PayloadWrapper.dataHash
677
+ ```
678
+
679
+ ***
680
+
681
+ ### getErrors()
682
+
683
+ ```ts
684
+ getErrors(): Promise<Error[]>;
685
+ ```
686
+
687
+ ### Returns
688
+
689
+ `Promise`\<`Error`[]\>
690
+
691
+ ### Inherited from
692
+
693
+ ```ts
694
+ PayloadWrapper.getErrors
695
+ ```
696
+
697
+ ***
698
+
699
+ ### getValid()
700
+
701
+ ```ts
702
+ getValid(): Promise<boolean>;
703
+ ```
704
+
705
+ ### Returns
706
+
707
+ `Promise`\<`boolean`\>
708
+
709
+ ### Inherited from
710
+
711
+ ```ts
712
+ PayloadWrapper.getValid
713
+ ```
714
+
715
+ ***
716
+
717
+ ### hash()
718
+
719
+ ```ts
720
+ hash(): Promise<BrandedHash>;
721
+ ```
722
+
723
+ ### Returns
724
+
725
+ `Promise`\<`BrandedHash`\>
726
+
727
+ ### Inherited from
728
+
729
+ ```ts
730
+ PayloadWrapper.hash
731
+ ```
732
+
733
+ ***
734
+
735
+ ### schema()
736
+
737
+ ```ts
738
+ schema(): string;
739
+ ```
740
+
741
+ ### Returns
742
+
743
+ `string`
744
+
745
+ ### Inherited from
746
+
747
+ ```ts
748
+ PayloadWrapper.schema
749
+ ```
750
+
751
+ ### interfaces
752
+
753
+ ### <a id="Alias"></a>Alias
754
+
755
+ [**@xyo-network/core-payload-plugins**](#../README)
756
+
757
+ ***
758
+
759
+ ## Properties
760
+
761
+ ### huri
762
+
763
+ ```ts
764
+ huri: string;
765
+ ```
766
+
767
+ ### Field
768
+
769
+ huri to the aliased payload
770
+
771
+ ***
772
+
773
+ ### name?
774
+
775
+ ```ts
776
+ optional name?: string;
777
+ ```
778
+
779
+ ### Field
780
+
781
+ canonical name (ex. network.xyo.example)
782
+
783
+ ### <a id="FetchedAlias"></a>FetchedAlias
784
+
785
+ [**@xyo-network/core-payload-plugins**](#../README)
786
+
787
+ ***
788
+
789
+ ## Extends
790
+
791
+ - `FetchedPayload`
792
+
793
+ ## Properties
794
+
795
+ ### alias
796
+
797
+ ```ts
798
+ alias: Alias;
799
+ ```
800
+
801
+ ***
802
+
803
+ ### huri?
804
+
805
+ ```ts
806
+ optional huri?: Huri<Payload>;
807
+ ```
808
+
809
+ ### Inherited from
810
+
811
+ ```ts
812
+ FetchedPayload.huri
813
+ ```
814
+
815
+ ***
816
+
817
+ ### payload
818
+
819
+ ```ts
820
+ payload: Payload;
821
+ ```
822
+
823
+ ### Inherited from
824
+
825
+ ```ts
826
+ FetchedPayload.payload
827
+ ```
828
+
829
+ ### type-aliases
830
+
831
+ ### <a id="ConfigPayload"></a>ConfigPayload
832
+
833
+ [**@xyo-network/core-payload-plugins**](#../README)
834
+
835
+ ***
836
+
837
+ ```ts
838
+ type ConfigPayload<T> = WithAdditional<Payload<{
839
+ config: string;
840
+ schema: ConfigSchema;
841
+ }>, T>;
842
+ ```
843
+
844
+ ## Type Parameters
845
+
846
+ ### T
847
+
848
+ `T` *extends* `AnyObject` \| `undefined` = `undefined`
849
+
850
+ ### <a id="ConfigSchema"></a>ConfigSchema
851
+
852
+ [**@xyo-network/core-payload-plugins**](#../README)
853
+
854
+ ***
855
+
856
+ ```ts
857
+ type ConfigSchema = typeof ConfigSchema;
858
+ ```
859
+
860
+ ### <a id="DomainPayload"></a>DomainPayload
861
+
862
+ [**@xyo-network/core-payload-plugins**](#../README)
863
+
864
+ ***
865
+
866
+ ```ts
867
+ type DomainPayload = Payload<{
868
+ additional?: string[];
869
+ aliases?: Record<string, Alias>;
870
+ networks?: NetworkPayload[];
871
+ }, DomainSchema>;
872
+ ```
873
+
874
+ ### <a id="DomainSchema"></a>DomainSchema
875
+
876
+ [**@xyo-network/core-payload-plugins**](#../README)
877
+
878
+ ***
879
+
880
+ ```ts
881
+ type DomainSchema = typeof DomainSchema;
882
+ ```
883
+
884
+ ### <a id="Id"></a>Id
885
+
886
+ [**@xyo-network/core-payload-plugins**](#../README)
887
+
888
+ ***
889
+
890
+ ```ts
891
+ type Id = Payload<IdFields, IdSchema>;
892
+ ```
893
+
894
+ The ID Payload
895
+
896
+ ### <a id="IdFields"></a>IdFields
897
+
898
+ [**@xyo-network/core-payload-plugins**](#../README)
899
+
900
+ ***
901
+
902
+ ```ts
903
+ type IdFields = object;
904
+ ```
905
+
906
+ The fields of an ID Payload
907
+
908
+ ## Properties
909
+
910
+ ### salt
911
+
912
+ ```ts
913
+ salt: string;
914
+ ```
915
+
916
+ ### <a id="IdPayload"></a>IdPayload
917
+
918
+ [**@xyo-network/core-payload-plugins**](#../README)
919
+
920
+ ***
921
+
922
+ ```ts
923
+ type IdPayload = Id;
924
+ ```
925
+
926
+ ## Deprecated
927
+
928
+ Use `Id` instead
929
+
930
+ ### <a id="IdSchema"></a>IdSchema
931
+
932
+ [**@xyo-network/core-payload-plugins**](#../README)
933
+
934
+ ***
935
+
936
+ ```ts
937
+ type IdSchema = typeof IdSchema;
938
+ ```
939
+
940
+ ### <a id="QueryPayload"></a>QueryPayload
941
+
942
+ [**@xyo-network/core-payload-plugins**](#../README)
943
+
944
+ ***
945
+
946
+ ```ts
947
+ type QueryPayload = Payload<{
948
+ query: Schema;
949
+ schema: QuerySchema;
950
+ }>;
951
+ ```
952
+
953
+ ### <a id="QuerySchema"></a>QuerySchema
954
+
955
+ [**@xyo-network/core-payload-plugins**](#../README)
956
+
957
+ ***
958
+
959
+ ```ts
960
+ type QuerySchema = typeof QuerySchema;
961
+ ```
962
+
963
+ ### <a id="SchemaPayload"></a>SchemaPayload
964
+
965
+ [**@xyo-network/core-payload-plugins**](#../README)
966
+
967
+ ***
968
+
969
+ ```ts
970
+ type SchemaPayload = Payload<{
971
+ definition: {
972
+ [key: string]: unknown;
973
+ $id?: string;
974
+ };
975
+ extends?: string;
976
+ name?: string;
977
+ version?: number;
978
+ }, SchemaSchema>;
979
+ ```
980
+
981
+ ### <a id="SchemaSchema"></a>SchemaSchema
982
+
983
+ [**@xyo-network/core-payload-plugins**](#../README)
984
+
985
+ ***
986
+
987
+ ```ts
988
+ type SchemaSchema = typeof SchemaSchema;
989
+ ```
990
+
991
+ ### <a id="Value"></a>Value
992
+
993
+ [**@xyo-network/core-payload-plugins**](#../README)
994
+
995
+ ***
996
+
997
+ ```ts
998
+ type Value<T> = Payload<{
999
+ schema: ValueSchema;
1000
+ value: T;
1001
+ }>;
1002
+ ```
1003
+
1004
+ ## Type Parameters
1005
+
1006
+ ### T
1007
+
1008
+ `T` *extends* `JsonValue` = `JsonValue`
1009
+
1010
+ ### <a id="ValueSchema"></a>ValueSchema
1011
+
1012
+ [**@xyo-network/core-payload-plugins**](#../README)
1013
+
1014
+ ***
1015
+
1016
+ ```ts
1017
+ type ValueSchema = typeof ValueSchema;
1018
+ ```
1019
+
1020
+ ### variables
1021
+
1022
+ ### <a id="AddressPayloadPlugin"></a>AddressPayloadPlugin
1023
+
1024
+ [**@xyo-network/core-payload-plugins**](#../README)
1025
+
1026
+ ***
1027
+
1028
+ ```ts
1029
+ const AddressPayloadPlugin: () => PayloadPlugin;
1030
+ ```
1031
+
1032
+ ## Returns
1033
+
1034
+ `PayloadPlugin`
1035
+
1036
+ ### <a id="ConfigPayloadPlugin"></a>ConfigPayloadPlugin
1037
+
1038
+ [**@xyo-network/core-payload-plugins**](#../README)
1039
+
1040
+ ***
1041
+
1042
+ ```ts
1043
+ const ConfigPayloadPlugin: () => PayloadPlugin;
1044
+ ```
1045
+
1046
+ ## Returns
1047
+
1048
+ `PayloadPlugin`
1049
+
1050
+ ### <a id="ConfigSchema"></a>ConfigSchema
1051
+
1052
+ [**@xyo-network/core-payload-plugins**](#../README)
1053
+
1054
+ ***
1055
+
1056
+ ```ts
1057
+ const ConfigSchema: "network.xyo.config" & object;
1058
+ ```
1059
+
1060
+ ## Type Declaration
1061
+
1062
+ ### \_\_schema
1063
+
1064
+ ```ts
1065
+ readonly __schema: true;
1066
+ ```
1067
+
1068
+ ### <a id="DomainPayloadPlugin"></a>DomainPayloadPlugin
1069
+
1070
+ [**@xyo-network/core-payload-plugins**](#../README)
1071
+
1072
+ ***
1073
+
1074
+ ```ts
1075
+ const DomainPayloadPlugin: () => PayloadPlugin;
1076
+ ```
1077
+
1078
+ ## Returns
1079
+
1080
+ `PayloadPlugin`
1081
+
1082
+ ### <a id="DomainSchema"></a>DomainSchema
1083
+
1084
+ [**@xyo-network/core-payload-plugins**](#../README)
1085
+
1086
+ ***
1087
+
1088
+ ```ts
1089
+ const DomainSchema: "network.xyo.domain" & object;
1090
+ ```
1091
+
1092
+ ## Type Declaration
1093
+
1094
+ ### \_\_schema
1095
+
1096
+ ```ts
1097
+ readonly __schema: true;
1098
+ ```
1099
+
1100
+ ### <a id="IdPayloadPlugin"></a>IdPayloadPlugin
1101
+
1102
+ [**@xyo-network/core-payload-plugins**](#../README)
1103
+
1104
+ ***
1105
+
1106
+ ```ts
1107
+ const IdPayloadPlugin: () => PayloadPlugin;
1108
+ ```
1109
+
1110
+ ## Returns
1111
+
1112
+ `PayloadPlugin`
1113
+
1114
+ ### <a id="IdSchema"></a>IdSchema
1115
+
1116
+ [**@xyo-network/core-payload-plugins**](#../README)
1117
+
1118
+ ***
1119
+
1120
+ ```ts
1121
+ const IdSchema: "network.xyo.id" & object;
1122
+ ```
1123
+
1124
+ ## Type Declaration
1125
+
1126
+ ### \_\_schema
1127
+
1128
+ ```ts
1129
+ readonly __schema: true;
1130
+ ```
1131
+
1132
+ ### <a id="PayloadPlugins"></a>PayloadPlugins
1133
+
1134
+ [**@xyo-network/core-payload-plugins**](#../README)
1135
+
1136
+ ***
1137
+
1138
+ ```ts
1139
+ const PayloadPlugins: PayloadPluginFunc<Payload>[];
1140
+ ```
1141
+
1142
+ ### <a id="QueryPayloadPlugin"></a>QueryPayloadPlugin
1143
+
1144
+ [**@xyo-network/core-payload-plugins**](#../README)
1145
+
1146
+ ***
1147
+
1148
+ ```ts
1149
+ const QueryPayloadPlugin: () => PayloadPlugin;
1150
+ ```
1151
+
1152
+ ## Returns
1153
+
1154
+ `PayloadPlugin`
1155
+
1156
+ ### <a id="QuerySchema"></a>QuerySchema
1157
+
1158
+ [**@xyo-network/core-payload-plugins**](#../README)
1159
+
1160
+ ***
1161
+
1162
+ ```ts
1163
+ const QuerySchema: "network.xyo.query" & object;
1164
+ ```
1165
+
1166
+ ## Type Declaration
1167
+
1168
+ ### \_\_schema
1169
+
1170
+ ```ts
1171
+ readonly __schema: true;
1172
+ ```
1173
+
1174
+ ### <a id="SchemaPayloadPlugin"></a>SchemaPayloadPlugin
1175
+
1176
+ [**@xyo-network/core-payload-plugins**](#../README)
1177
+
1178
+ ***
1179
+
1180
+ ```ts
1181
+ const SchemaPayloadPlugin: () => PayloadPlugin;
1182
+ ```
1183
+
1184
+ ## Returns
1185
+
1186
+ `PayloadPlugin`
1187
+
1188
+ ### <a id="SchemaSchema"></a>SchemaSchema
1189
+
1190
+ [**@xyo-network/core-payload-plugins**](#../README)
1191
+
1192
+ ***
1193
+
1194
+ ```ts
1195
+ const SchemaSchema: "network.xyo.schema" & object;
1196
+ ```
1197
+
1198
+ ## Type Declaration
1199
+
1200
+ ### \_\_schema
1201
+
1202
+ ```ts
1203
+ readonly __schema: true;
1204
+ ```
1205
+
1206
+ ### <a id="ValuePayloadPlugin"></a>ValuePayloadPlugin
1207
+
1208
+ [**@xyo-network/core-payload-plugins**](#../README)
1209
+
1210
+ ***
1211
+
1212
+ ```ts
1213
+ const ValuePayloadPlugin: () => PayloadPlugin;
1214
+ ```
1215
+
1216
+ ## Returns
1217
+
1218
+ `PayloadPlugin`
1219
+
1220
+ ### <a id="ValueSchema"></a>ValueSchema
1221
+
1222
+ [**@xyo-network/core-payload-plugins**](#../README)
1223
+
1224
+ ***
1225
+
1226
+ ```ts
1227
+ const ValueSchema: "network.xyo.value" & object;
1228
+ ```
1229
+
1230
+ ## Type Declaration
1231
+
1232
+ ### \_\_schema
1233
+
1234
+ ```ts
1235
+ readonly __schema: true;
1236
+ ```
1237
+
1238
+ ### <a id="addressPayloadTemplate"></a>addressPayloadTemplate
1239
+
1240
+ [**@xyo-network/core-payload-plugins**](#../README)
1241
+
1242
+ ***
1243
+
1244
+ ```ts
1245
+ const addressPayloadTemplate: () => AddressPayload;
1246
+ ```
1247
+
1248
+ ## Returns
1249
+
1250
+ `AddressPayload`
1251
+
1252
+ ### <a id="asId"></a>asId
1253
+
1254
+ [**@xyo-network/core-payload-plugins**](#../README)
1255
+
1256
+ ***
1257
+
1258
+ ```ts
1259
+ const asId: AsTypeFunction;
1260
+ ```
1261
+
1262
+ ### <a id="asOptionalId"></a>asOptionalId
1263
+
1264
+ [**@xyo-network/core-payload-plugins**](#../README)
1265
+
1266
+ ***
1267
+
1268
+ ```ts
1269
+ const asOptionalId: (value) => Id | undefined;
1270
+ ```
1271
+
1272
+ ## Parameters
1273
+
1274
+ ### value
1275
+
1276
+ `AnyNonPromise`
1277
+
1278
+ ## Returns
1279
+
1280
+ [`Id`](#../type-aliases/Id) \| `undefined`
1281
+
1282
+ ### <a id="configPayloadTemplate"></a>configPayloadTemplate
1283
+
1284
+ [**@xyo-network/core-payload-plugins**](#../README)
1285
+
1286
+ ***
1287
+
1288
+ ```ts
1289
+ const configPayloadTemplate: () => ConfigPayload;
1290
+ ```
1291
+
1292
+ ## Returns
1293
+
1294
+ [`ConfigPayload`](#../type-aliases/ConfigPayload)
1295
+
1296
+ ### <a id="domainConfigTemplate"></a>domainConfigTemplate
1297
+
1298
+ [**@xyo-network/core-payload-plugins**](#../README)
1299
+
1300
+ ***
1301
+
1302
+ ```ts
1303
+ const domainConfigTemplate: () => DomainPayload;
1304
+ ```
1305
+
1306
+ ## Returns
1307
+
1308
+ [`DomainPayload`](#../type-aliases/DomainPayload)
1309
+
1310
+ ### <a id="idPayloadTemplate"></a>idPayloadTemplate
1311
+
1312
+ [**@xyo-network/core-payload-plugins**](#../README)
1313
+
1314
+ ***
1315
+
1316
+ ```ts
1317
+ const idPayloadTemplate: () => Id;
1318
+ ```
1319
+
1320
+ ## Returns
1321
+
1322
+ [`Id`](#../type-aliases/Id)
1323
+
1324
+ ### <a id="isDomainPayload"></a>isDomainPayload
1325
+
1326
+ [**@xyo-network/core-payload-plugins**](#../README)
1327
+
1328
+ ***
1329
+
1330
+ ```ts
1331
+ const isDomainPayload: (x?) => x is DomainPayload;
1332
+ ```
1333
+
1334
+ ## Parameters
1335
+
1336
+ ### x?
1337
+
1338
+ `unknown` \| `null`
1339
+
1340
+ ## Returns
1341
+
1342
+ `x is DomainPayload`
1343
+
1344
+ ### <a id="isId"></a>isId
1345
+
1346
+ [**@xyo-network/core-payload-plugins**](#../README)
1347
+
1348
+ ***
1349
+
1350
+ ```ts
1351
+ const isId: (x?) => x is Id;
1352
+ ```
1353
+
1354
+ Identity helper for ID Payload
1355
+
1356
+ ## Parameters
1357
+
1358
+ ### x?
1359
+
1360
+ `unknown` \| `null`
1361
+
1362
+ ## Returns
1363
+
1364
+ `x is Id`
1365
+
1366
+ ### <a id="isIdWithSources"></a>isIdWithSources
1367
+
1368
+ [**@xyo-network/core-payload-plugins**](#../README)
1369
+
1370
+ ***
1371
+
1372
+ ```ts
1373
+ const isIdWithSources: (x?) => x is WithSources<WithSources<Id>>;
1374
+ ```
1375
+
1376
+ Identity helper for ID Payload with sources
1377
+
1378
+ ## Parameters
1379
+
1380
+ ### x?
1381
+
1382
+ `unknown` \| `null`
1383
+
1384
+ ## Returns
1385
+
1386
+ `x is WithSources<WithSources<Id>>`
1387
+
1388
+ ### <a id="isSchemaPayload"></a>isSchemaPayload
1389
+
1390
+ [**@xyo-network/core-payload-plugins**](#../README)
1391
+
1392
+ ***
1393
+
1394
+ ```ts
1395
+ const isSchemaPayload: (x?) => x is SchemaPayload;
1396
+ ```
1397
+
1398
+ Identity function for determining if an object is an Schema
1399
+
1400
+ ## Parameters
1401
+
1402
+ ### x?
1403
+
1404
+ `unknown` \| `null`
1405
+
1406
+ ## Returns
1407
+
1408
+ `x is SchemaPayload`
1409
+
1410
+ ### <a id="isSchemaPayloadWithSources"></a>isSchemaPayloadWithSources
1411
+
1412
+ [**@xyo-network/core-payload-plugins**](#../README)
1413
+
1414
+ ***
1415
+
1416
+ ```ts
1417
+ const isSchemaPayloadWithSources: (x?) => x is WithSources;
1418
+ ```
1419
+
1420
+ Identity function for determining if an object is an Schema with sources
1421
+
1422
+ ## Parameters
1423
+
1424
+ ### x?
1425
+
1426
+ `unknown` \| `null`
1427
+
1428
+ ## Returns
1429
+
1430
+ `x is WithSources`
1431
+
1432
+ ### <a id="isValuePayload"></a>isValuePayload
1433
+
1434
+ [**@xyo-network/core-payload-plugins**](#../README)
1435
+
1436
+ ***
1437
+
1438
+ ```ts
1439
+ const isValuePayload: (x?) => x is Value<unknown>;
1440
+ ```
1441
+
1442
+ ## Parameters
1443
+
1444
+ ### x?
1445
+
1446
+ `unknown` \| `null`
1447
+
1448
+ ## Returns
1449
+
1450
+ `x is Value<unknown>`
1451
+
1452
+ ### <a id="queryPayloadTemplate"></a>queryPayloadTemplate
1453
+
1454
+ [**@xyo-network/core-payload-plugins**](#../README)
1455
+
1456
+ ***
1457
+
1458
+ ```ts
1459
+ const queryPayloadTemplate: () => QueryPayload;
1460
+ ```
1461
+
1462
+ ## Returns
1463
+
1464
+ [`QueryPayload`](#../type-aliases/QueryPayload)
1465
+
1466
+ ### <a id="schemaPayloadTemplate"></a>schemaPayloadTemplate
1467
+
1468
+ [**@xyo-network/core-payload-plugins**](#../README)
1469
+
1470
+ ***
1471
+
1472
+ ```ts
1473
+ const schemaPayloadTemplate: () => SchemaPayload;
1474
+ ```
1475
+
1476
+ ## Returns
1477
+
1478
+ [`SchemaPayload`](#../type-aliases/SchemaPayload)
1479
+
1480
+ ### <a id="valuePayloadTemplate"></a>valuePayloadTemplate
1481
+
1482
+ [**@xyo-network/core-payload-plugins**](#../README)
1483
+
1484
+ ***
1485
+
1486
+ ```ts
1487
+ const valuePayloadTemplate: () => Value;
1488
+ ```
1489
+
1490
+ ## Returns
18
1491
 
19
- ## Credits
1492
+ [`Value`](#../type-aliases/Value)
20
1493
 
21
- [Made with 🔥 and ❄️ by XYO](https://xyo.network)
22
1494
 
23
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
1495
+ [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
1496
+ [npm-badge]: https://img.shields.io/npm/v/@xyo-network/core-payload-plugins.svg
1497
+ [npm-link]: https://www.npmjs.com/package/@xyo-network/core-payload-plugins
1498
+ [license-badge]: https://img.shields.io/npm/l/@xyo-network/core-payload-plugins.svg
1499
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE