@xyo-network/xl1-protocol 1.14.13 → 1.14.15

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 (66) hide show
  1. package/dist/neutral/block/AllowedBlockPayload.d.ts +3 -3
  2. package/dist/neutral/block/AllowedBlockPayload.d.ts.map +1 -1
  3. package/dist/neutral/index.mjs +269 -181
  4. package/dist/neutral/index.mjs.map +1 -1
  5. package/dist/neutral/model/BlockNumber/BlockNumber.d.ts +15 -5
  6. package/dist/neutral/model/BlockNumber/BlockNumber.d.ts.map +1 -1
  7. package/dist/neutral/model/BlockNumber/EthBlockNumber.d.ts +25 -5
  8. package/dist/neutral/model/BlockNumber/EthBlockNumber.d.ts.map +1 -1
  9. package/dist/neutral/model/BlockNumber/XL1BlockNumber.d.ts +25 -5
  10. package/dist/neutral/model/BlockNumber/XL1BlockNumber.d.ts.map +1 -1
  11. package/dist/neutral/model/BlockRange/BlockRange.d.ts +4 -4
  12. package/dist/neutral/model/BlockRange/EthBlockRange.d.ts +4 -4
  13. package/dist/neutral/model/BlockRange/Range.d.ts +5 -5
  14. package/dist/neutral/model/BlockRange/Range.d.ts.map +1 -1
  15. package/dist/neutral/model/BlockRange/XL1BlockRange.d.ts +4 -4
  16. package/dist/neutral/payload/elevatable/Time.d.ts.map +1 -1
  17. package/dist/neutral/payload/elevatable/TransferPayload.d.ts +0 -3
  18. package/dist/neutral/payload/elevatable/TransferPayload.d.ts.map +1 -1
  19. package/dist/neutral/zod/HydratedBlock.d.ts +213 -42
  20. package/dist/neutral/zod/HydratedBlock.d.ts.map +1 -1
  21. package/dist/neutral/zod/HydratedTransaction.d.ts +63 -63
  22. package/dist/neutral/zod/TransactionBoundWitness.d.ts +63 -63
  23. package/dist/neutral/zod/TransactionFees.d.ts +14 -14
  24. package/dist/neutral/zod/block/BlockBoundWitness.d.ts +345 -0
  25. package/dist/neutral/zod/block/BlockBoundWitness.d.ts.map +1 -0
  26. package/dist/neutral/zod/block/index.d.ts +4 -0
  27. package/dist/neutral/zod/block/index.d.ts.map +1 -0
  28. package/dist/neutral/zod/block/signed/SignedBlockBoundWitness.d.ts +103 -0
  29. package/dist/neutral/zod/block/signed/SignedBlockBoundWitness.d.ts.map +1 -0
  30. package/dist/neutral/zod/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts +179 -0
  31. package/dist/neutral/zod/block/signed/SignedBlockBoundWitnessWithHashMeta.d.ts.map +1 -0
  32. package/dist/neutral/zod/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts +216 -0
  33. package/dist/neutral/zod/block/signed/SignedBlockBoundWitnessWithStorageMeta.d.ts.map +1 -0
  34. package/dist/neutral/zod/block/signed/index.d.ts +4 -0
  35. package/dist/neutral/zod/block/signed/index.d.ts.map +1 -0
  36. package/dist/neutral/zod/block/unsigned/UnsignedBlockBoundWitness.d.ts +103 -0
  37. package/dist/neutral/zod/block/unsigned/UnsignedBlockBoundWitness.d.ts.map +1 -0
  38. package/dist/neutral/zod/block/unsigned/index.d.ts +2 -0
  39. package/dist/neutral/zod/block/unsigned/index.d.ts.map +1 -0
  40. package/dist/neutral/zod/index.d.ts +2 -1
  41. package/dist/neutral/zod/index.d.ts.map +1 -1
  42. package/dist/neutral/zod/payload/WithHashMetaish.d.ts +27 -0
  43. package/dist/neutral/zod/payload/WithHashMetaish.d.ts.map +1 -0
  44. package/dist/neutral/zod/payload/WithStorageMetaish.d.ts +30 -0
  45. package/dist/neutral/zod/payload/WithStorageMetaish.d.ts.map +1 -0
  46. package/dist/neutral/zod/payload/index.d.ts +3 -0
  47. package/dist/neutral/zod/payload/index.d.ts.map +1 -0
  48. package/package.json +22 -21
  49. package/src/payload/elevatable/Time.ts +1 -3
  50. package/src/payload/elevatable/TransferPayload.ts +1 -3
  51. package/src/zod/HydratedBlock.ts +17 -1
  52. package/src/zod/block/BlockBoundWitness.ts +48 -0
  53. package/src/zod/block/index.ts +3 -0
  54. package/src/zod/block/signed/SignedBlockBoundWitness.ts +17 -0
  55. package/src/zod/block/signed/SignedBlockBoundWitnessWithHashMeta.ts +29 -0
  56. package/src/zod/block/signed/SignedBlockBoundWitnessWithStorageMeta.ts +35 -0
  57. package/src/zod/block/signed/index.ts +3 -0
  58. package/src/zod/block/unsigned/UnsignedBlockBoundWitness.ts +17 -0
  59. package/src/zod/block/unsigned/index.ts +1 -0
  60. package/src/zod/index.ts +2 -1
  61. package/src/zod/payload/WithHashMetaish.ts +23 -0
  62. package/src/zod/payload/WithStorageMetaish.ts +23 -0
  63. package/src/zod/payload/index.ts +2 -0
  64. package/dist/neutral/zod/BlockBoundWitness.d.ts +0 -1011
  65. package/dist/neutral/zod/BlockBoundWitness.d.ts.map +0 -1
  66. package/src/zod/BlockBoundWitness.ts +0 -114
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignedBlockBoundWitnessWithHashMeta.d.ts","sourceRoot":"","sources":["../../../../../src/zod/block/signed/SignedBlockBoundWitnessWithHashMeta.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAA;AAI7B,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;iBAA2D,CAAA;AAE9G,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sCAAsC,CAAC,CAAA;AAExG,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;CAAuD,CAAA;AACzG,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgG,CAAA;AAElJ,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQpD,CAAA;AAEF,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAA;AAE9G,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAgG,CAAA"}
@@ -0,0 +1,216 @@
1
+ import type * as z from 'zod';
2
+ export declare const SignedBlockBoundWitnessWithStorageMetaZod: z.ZodObject<{
3
+ schema: z.ZodLiteral<"network.xyo.boundwitness">;
4
+ addresses: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Address, string>>>;
5
+ payload_hashes: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
6
+ payload_schemas: z.ZodArray<z.ZodString>;
7
+ previous_hashes: z.ZodArray<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>>;
8
+ $destination: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Address, string>>>;
9
+ $sourceQuery: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
10
+ $signatures: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>>;
11
+ block: z.ZodPipe<z.ZodNumber, z.ZodTransform<import("../../../index.ts").XL1BlockNumber, number>>;
12
+ chain: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
13
+ previous: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
14
+ protocol: z.ZodOptional<z.ZodNumber>;
15
+ step_hashes: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>>;
16
+ $epoch: z.ZodNumber;
17
+ _hash: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>;
18
+ _dataHash: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>;
19
+ _sequence: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<import("@xyo-network/payload-model").LocalSequence, string>>, z.ZodPipe<z.ZodString, z.ZodTransform<import("@xyo-network/payload-model").QualifiedSequence, string>>]>;
20
+ }, z.core.$strip>;
21
+ export type SignedBlockBoundWitnessWithStorageMeta = z.infer<typeof SignedBlockBoundWitnessWithStorageMetaZod>;
22
+ export declare const isSignedBlockBoundWitnessWithStorageMeta: <T>(value: T) => value is T & {
23
+ schema: "network.xyo.boundwitness";
24
+ addresses: import("@xylabs/hex").Address[];
25
+ payload_hashes: import("@xylabs/hex").Hash[];
26
+ payload_schemas: string[];
27
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
28
+ $signatures: import("@xylabs/hex").Hex[];
29
+ block: import("../../../index.ts").XL1BlockNumber;
30
+ chain: import("@xylabs/hex").Hex;
31
+ previous: import("@xylabs/hex").Hash | null;
32
+ $epoch: number;
33
+ _hash: import("@xylabs/hex").Hash;
34
+ _dataHash: import("@xylabs/hex").Hash;
35
+ _sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
36
+ $destination?: import("@xylabs/hex").Address | undefined;
37
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
38
+ protocol?: number | undefined;
39
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
40
+ };
41
+ export declare const asSignedBlockBoundWitnessWithStorageMeta: {
42
+ <T>(value: T): (T & {
43
+ schema: "network.xyo.boundwitness";
44
+ addresses: import("@xylabs/hex").Address[];
45
+ payload_hashes: import("@xylabs/hex").Hash[];
46
+ payload_schemas: string[];
47
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
48
+ $signatures: import("@xylabs/hex").Hex[];
49
+ block: import("../../../index.ts").XL1BlockNumber;
50
+ chain: import("@xylabs/hex").Hex;
51
+ previous: import("@xylabs/hex").Hash | null;
52
+ $epoch: number;
53
+ _hash: import("@xylabs/hex").Hash;
54
+ _dataHash: import("@xylabs/hex").Hash;
55
+ _sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
56
+ $destination?: import("@xylabs/hex").Address | undefined;
57
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
58
+ protocol?: number | undefined;
59
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
60
+ }) | undefined;
61
+ <T>(value: T, assert: import("@xylabs/zod").ZodFactoryConfig): T & {
62
+ schema: "network.xyo.boundwitness";
63
+ addresses: import("@xylabs/hex").Address[];
64
+ payload_hashes: import("@xylabs/hex").Hash[];
65
+ payload_schemas: string[];
66
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
67
+ $signatures: import("@xylabs/hex").Hex[];
68
+ block: import("../../../index.ts").XL1BlockNumber;
69
+ chain: import("@xylabs/hex").Hex;
70
+ previous: import("@xylabs/hex").Hash | null;
71
+ $epoch: number;
72
+ _hash: import("@xylabs/hex").Hash;
73
+ _dataHash: import("@xylabs/hex").Hash;
74
+ _sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
75
+ $destination?: import("@xylabs/hex").Address | undefined;
76
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
77
+ protocol?: number | undefined;
78
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
79
+ };
80
+ };
81
+ export declare const SignedBlockBoundWitnessWithStorageMetaishZod: z.ZodPipe<z.ZodObject<{
82
+ schema: z.ZodLiteral<"network.xyo.boundwitness">;
83
+ addresses: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Address, string>>>;
84
+ payload_hashes: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
85
+ payload_schemas: z.ZodArray<z.ZodString>;
86
+ previous_hashes: z.ZodArray<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>>;
87
+ $destination: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Address, string>>>;
88
+ $sourceQuery: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
89
+ $signatures: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>>;
90
+ block: z.ZodPipe<z.ZodNumber, z.ZodTransform<import("../../../index.ts").XL1BlockNumber, number>>;
91
+ chain: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
92
+ previous: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
93
+ protocol: z.ZodOptional<z.ZodNumber>;
94
+ step_hashes: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>>;
95
+ $epoch: z.ZodNumber;
96
+ }, z.core.$strip>, z.ZodTransform<{
97
+ schema: "network.xyo.boundwitness";
98
+ addresses: import("@xylabs/hex").Address[];
99
+ payload_hashes: import("@xylabs/hex").Hash[];
100
+ payload_schemas: string[];
101
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
102
+ $signatures: import("@xylabs/hex").Hex[];
103
+ block: import("../../../index.ts").XL1BlockNumber;
104
+ chain: import("@xylabs/hex").Hex;
105
+ previous: import("@xylabs/hex").Hash | null;
106
+ $epoch: number;
107
+ $destination?: import("@xylabs/hex").Address | undefined;
108
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
109
+ protocol?: number | undefined;
110
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
111
+ } & {
112
+ schema: "network.xyo.boundwitness";
113
+ addresses: import("@xylabs/hex").Address[];
114
+ payload_hashes: import("@xylabs/hex").Hash[];
115
+ payload_schemas: string[];
116
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
117
+ $signatures: import("@xylabs/hex").Hex[];
118
+ block: import("../../../index.ts").XL1BlockNumber;
119
+ chain: import("@xylabs/hex").Hex;
120
+ previous: import("@xylabs/hex").Hash | null;
121
+ $epoch: number;
122
+ _hash: import("@xylabs/hex").Hash;
123
+ _dataHash: import("@xylabs/hex").Hash;
124
+ _sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
125
+ $destination?: import("@xylabs/hex").Address | undefined;
126
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
127
+ protocol?: number | undefined;
128
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
129
+ }, {
130
+ schema: "network.xyo.boundwitness";
131
+ addresses: import("@xylabs/hex").Address[];
132
+ payload_hashes: import("@xylabs/hex").Hash[];
133
+ payload_schemas: string[];
134
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
135
+ $signatures: import("@xylabs/hex").Hex[];
136
+ block: import("../../../index.ts").XL1BlockNumber;
137
+ chain: import("@xylabs/hex").Hex;
138
+ previous: import("@xylabs/hex").Hash | null;
139
+ $epoch: number;
140
+ $destination?: import("@xylabs/hex").Address | undefined;
141
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
142
+ protocol?: number | undefined;
143
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
144
+ }>>;
145
+ export type SignedBlockBoundWitnessWithStorageMetaish = z.input<typeof SignedBlockBoundWitnessWithStorageMetaishZod>;
146
+ export declare const toSignedBlockBoundWitnessWithStorageMeta: {
147
+ <T>(value: T): (T & {
148
+ schema: "network.xyo.boundwitness";
149
+ addresses: import("@xylabs/hex").Address[];
150
+ payload_hashes: import("@xylabs/hex").Hash[];
151
+ payload_schemas: string[];
152
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
153
+ $signatures: import("@xylabs/hex").Hex[];
154
+ block: import("../../../index.ts").XL1BlockNumber;
155
+ chain: import("@xylabs/hex").Hex;
156
+ previous: import("@xylabs/hex").Hash | null;
157
+ $epoch: number;
158
+ $destination?: import("@xylabs/hex").Address | undefined;
159
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
160
+ protocol?: number | undefined;
161
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
162
+ } & {
163
+ schema: "network.xyo.boundwitness";
164
+ addresses: import("@xylabs/hex").Address[];
165
+ payload_hashes: import("@xylabs/hex").Hash[];
166
+ payload_schemas: string[];
167
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
168
+ $signatures: import("@xylabs/hex").Hex[];
169
+ block: import("../../../index.ts").XL1BlockNumber;
170
+ chain: import("@xylabs/hex").Hex;
171
+ previous: import("@xylabs/hex").Hash | null;
172
+ $epoch: number;
173
+ _hash: import("@xylabs/hex").Hash;
174
+ _dataHash: import("@xylabs/hex").Hash;
175
+ _sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
176
+ $destination?: import("@xylabs/hex").Address | undefined;
177
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
178
+ protocol?: number | undefined;
179
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
180
+ }) | undefined;
181
+ <T>(value: T, assert: import("@xylabs/zod").ZodFactoryConfig): T & {
182
+ schema: "network.xyo.boundwitness";
183
+ addresses: import("@xylabs/hex").Address[];
184
+ payload_hashes: import("@xylabs/hex").Hash[];
185
+ payload_schemas: string[];
186
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
187
+ $signatures: import("@xylabs/hex").Hex[];
188
+ block: import("../../../index.ts").XL1BlockNumber;
189
+ chain: import("@xylabs/hex").Hex;
190
+ previous: import("@xylabs/hex").Hash | null;
191
+ $epoch: number;
192
+ $destination?: import("@xylabs/hex").Address | undefined;
193
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
194
+ protocol?: number | undefined;
195
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
196
+ } & {
197
+ schema: "network.xyo.boundwitness";
198
+ addresses: import("@xylabs/hex").Address[];
199
+ payload_hashes: import("@xylabs/hex").Hash[];
200
+ payload_schemas: string[];
201
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
202
+ $signatures: import("@xylabs/hex").Hex[];
203
+ block: import("../../../index.ts").XL1BlockNumber;
204
+ chain: import("@xylabs/hex").Hex;
205
+ previous: import("@xylabs/hex").Hash | null;
206
+ $epoch: number;
207
+ _hash: import("@xylabs/hex").Hash;
208
+ _dataHash: import("@xylabs/hex").Hash;
209
+ _sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
210
+ $destination?: import("@xylabs/hex").Address | undefined;
211
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
212
+ protocol?: number | undefined;
213
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
214
+ };
215
+ };
216
+ //# sourceMappingURL=SignedBlockBoundWitnessWithStorageMeta.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SignedBlockBoundWitnessWithStorageMeta.d.ts","sourceRoot":"","sources":["../../../../../src/zod/block/signed/SignedBlockBoundWitnessWithStorageMeta.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAA;AAI7B,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;;iBAA8D,CAAA;AAEpH,MAAM,MAAM,sCAAsC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAA;AAE9G,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;CAA0D,CAAA;AAC/G,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpD,CAAA;AAED,eAAO,MAAM,4CAA4C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAQvD,CAAA;AAEF,MAAM,MAAM,yCAAyC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4CAA4C,CAAC,CAAA;AAEpH,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGpD,CAAA"}
@@ -0,0 +1,4 @@
1
+ export * from './SignedBlockBoundWitness.ts';
2
+ export * from './SignedBlockBoundWitnessWithHashMeta.ts';
3
+ export * from './SignedBlockBoundWitnessWithStorageMeta.ts';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/zod/block/signed/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA;AAC5C,cAAc,0CAA0C,CAAA;AACxD,cAAc,6CAA6C,CAAA"}
@@ -0,0 +1,103 @@
1
+ import type * as z from 'zod';
2
+ export declare const UnsignedBlockBoundWitnessZod: z.ZodObject<{
3
+ schema: z.ZodLiteral<"network.xyo.boundwitness">;
4
+ addresses: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Address, string>>>;
5
+ payload_hashes: z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
6
+ payload_schemas: z.ZodArray<z.ZodString>;
7
+ previous_hashes: z.ZodArray<z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>>;
8
+ $destination: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Address, string>>>;
9
+ $sourceQuery: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
10
+ $signatures: z.ZodArray<z.ZodNull>;
11
+ block: z.ZodPipe<z.ZodNumber, z.ZodTransform<import("../../../index.ts").XL1BlockNumber, number>>;
12
+ chain: z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hex, string>>;
13
+ previous: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>;
14
+ protocol: z.ZodOptional<z.ZodNumber>;
15
+ step_hashes: z.ZodOptional<z.ZodArray<z.ZodPipe<z.ZodString, z.ZodTransform<import("@xylabs/hex").Hash, string>>>>;
16
+ $epoch: z.ZodNumber;
17
+ }, z.core.$strip>;
18
+ export type UnsignedBlockBoundWitness = z.infer<typeof UnsignedBlockBoundWitnessZod>;
19
+ export declare const isUnsignedBlockBoundWitness: <T>(value: T) => value is T & {
20
+ schema: "network.xyo.boundwitness";
21
+ addresses: import("@xylabs/hex").Address[];
22
+ payload_hashes: import("@xylabs/hex").Hash[];
23
+ payload_schemas: string[];
24
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
25
+ $signatures: null[];
26
+ block: import("../../../index.ts").XL1BlockNumber;
27
+ chain: import("@xylabs/hex").Hex;
28
+ previous: import("@xylabs/hex").Hash | null;
29
+ $epoch: number;
30
+ $destination?: import("@xylabs/hex").Address | undefined;
31
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
32
+ protocol?: number | undefined;
33
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
34
+ };
35
+ export declare const asUnsignedBlockBoundWitness: {
36
+ <T>(value: T): (T & {
37
+ schema: "network.xyo.boundwitness";
38
+ addresses: import("@xylabs/hex").Address[];
39
+ payload_hashes: import("@xylabs/hex").Hash[];
40
+ payload_schemas: string[];
41
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
42
+ $signatures: null[];
43
+ block: import("../../../index.ts").XL1BlockNumber;
44
+ chain: import("@xylabs/hex").Hex;
45
+ previous: import("@xylabs/hex").Hash | null;
46
+ $epoch: number;
47
+ $destination?: import("@xylabs/hex").Address | undefined;
48
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
49
+ protocol?: number | undefined;
50
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
51
+ }) | undefined;
52
+ <T>(value: T, assert: import("@xylabs/zod").ZodFactoryConfig): T & {
53
+ schema: "network.xyo.boundwitness";
54
+ addresses: import("@xylabs/hex").Address[];
55
+ payload_hashes: import("@xylabs/hex").Hash[];
56
+ payload_schemas: string[];
57
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
58
+ $signatures: null[];
59
+ block: import("../../../index.ts").XL1BlockNumber;
60
+ chain: import("@xylabs/hex").Hex;
61
+ previous: import("@xylabs/hex").Hash | null;
62
+ $epoch: number;
63
+ $destination?: import("@xylabs/hex").Address | undefined;
64
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
65
+ protocol?: number | undefined;
66
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
67
+ };
68
+ };
69
+ export declare const toUnsignedBlockBoundWitness: {
70
+ <T>(value: T): (T & {
71
+ schema: "network.xyo.boundwitness";
72
+ addresses: import("@xylabs/hex").Address[];
73
+ payload_hashes: import("@xylabs/hex").Hash[];
74
+ payload_schemas: string[];
75
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
76
+ $signatures: null[];
77
+ block: import("../../../index.ts").XL1BlockNumber;
78
+ chain: import("@xylabs/hex").Hex;
79
+ previous: import("@xylabs/hex").Hash | null;
80
+ $epoch: number;
81
+ $destination?: import("@xylabs/hex").Address | undefined;
82
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
83
+ protocol?: number | undefined;
84
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
85
+ }) | undefined;
86
+ <T>(value: T, assert: import("@xylabs/zod").ZodFactoryConfig): T & {
87
+ schema: "network.xyo.boundwitness";
88
+ addresses: import("@xylabs/hex").Address[];
89
+ payload_hashes: import("@xylabs/hex").Hash[];
90
+ payload_schemas: string[];
91
+ previous_hashes: (import("@xylabs/hex").Hash | null)[];
92
+ $signatures: null[];
93
+ block: import("../../../index.ts").XL1BlockNumber;
94
+ chain: import("@xylabs/hex").Hex;
95
+ previous: import("@xylabs/hex").Hash | null;
96
+ $epoch: number;
97
+ $destination?: import("@xylabs/hex").Address | undefined;
98
+ $sourceQuery?: import("@xylabs/hex").Hash | undefined;
99
+ protocol?: number | undefined;
100
+ step_hashes?: import("@xylabs/hex").Hash[] | undefined;
101
+ };
102
+ };
103
+ //# sourceMappingURL=UnsignedBlockBoundWitness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnsignedBlockBoundWitness.d.ts","sourceRoot":"","sources":["../../../../../src/zod/block/unsigned/UnsignedBlockBoundWitness.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,CAAC,MAAM,KAAK,CAAA;AAI7B,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;iBAEI,CAAA;AAE7C,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAA;AAEpF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;CAA6C,CAAA;AACrF,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA4E,CAAA;AACpH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAA4E,CAAA"}
@@ -0,0 +1,2 @@
1
+ export * from './UnsignedBlockBoundWitness.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/zod/block/unsigned/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAA"}
@@ -1,8 +1,9 @@
1
1
  export * from './ArrayBuffer.ts';
2
- export * from './BlockBoundWitness.ts';
2
+ export * from './block/index.ts';
3
3
  export * from './Chain.ts';
4
4
  export * from './HydratedBlock.ts';
5
5
  export * from './HydratedTransaction.ts';
6
+ export * from './payload/index.ts';
6
7
  export * from './Permission.ts';
7
8
  export * from './RewardsRangeOptions.ts';
8
9
  export * from './Sequence.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/zod/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,wBAAwB,CAAA;AACtC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/zod/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAChC,cAAc,YAAY,CAAA;AAC1B,cAAc,oBAAoB,CAAA;AAClC,cAAc,0BAA0B,CAAA;AACxC,cAAc,oBAAoB,CAAA;AAClC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,8BAA8B,CAAA;AAC5C,cAAc,sBAAsB,CAAA;AACpC,cAAc,mBAAmB,CAAA"}
@@ -0,0 +1,27 @@
1
+ import type z from 'zod';
2
+ export declare const WithHashMetaishZod: z.ZodPipe<z.ZodObject<{
3
+ schema: z.ZodString;
4
+ }, z.z.core.$strict>, z.ZodTransform<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
5
+ schema: string;
6
+ } & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & {
7
+ _hash: import("@xylabs/hex").Hash;
8
+ _dataHash: import("@xylabs/hex").Hash;
9
+ }, {
10
+ schema: string;
11
+ }>>;
12
+ export type WithHashMetaish = z.input<typeof WithHashMetaishZod>;
13
+ export declare const toWithHashMeta: {
14
+ <T>(value: T): Promise<(T & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
15
+ schema: string;
16
+ } & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & {
17
+ _hash: import("@xylabs/hex").Hash;
18
+ _dataHash: import("@xylabs/hex").Hash;
19
+ }) | undefined>;
20
+ <T>(value: T, assert: import("@xylabs/zod").ZodFactoryConfig): Promise<T & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
21
+ schema: string;
22
+ } & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & {
23
+ _hash: import("@xylabs/hex").Hash;
24
+ _dataHash: import("@xylabs/hex").Hash;
25
+ }>;
26
+ };
27
+ //# sourceMappingURL=WithHashMetaish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithHashMetaish.d.ts","sourceRoot":"","sources":["../../../../src/zod/payload/WithHashMetaish.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,eAAO,MAAM,kBAAkB;;;;;;;;;GAQ7B,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAEhE,eAAO,MAAM,cAAc;;;;;;;;;;;;;CAG1B,CAAA"}
@@ -0,0 +1,30 @@
1
+ import type z from 'zod';
2
+ export declare const WithStorageMetaishZod: z.ZodPipe<z.ZodObject<{
3
+ schema: z.ZodString;
4
+ }, z.z.core.$strict>, z.ZodTransform<import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
5
+ schema: string;
6
+ } & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & {
7
+ _hash: import("@xylabs/hex").Hash;
8
+ _dataHash: import("@xylabs/hex").Hash;
9
+ _sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
10
+ }, {
11
+ schema: string;
12
+ }>>;
13
+ export type WithStorageMetaish = z.input<typeof WithStorageMetaishZod>;
14
+ export declare const toWithStorageMeta: {
15
+ <T>(value: T): Promise<(T & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
16
+ schema: string;
17
+ } & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & {
18
+ _hash: import("@xylabs/hex").Hash;
19
+ _dataHash: import("@xylabs/hex").Hash;
20
+ _sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
21
+ }) | undefined>;
22
+ <T>(value: T, assert: import("@xylabs/zod").ZodFactoryConfig): Promise<T & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & {
23
+ schema: string;
24
+ } & Partial<import("@xyo-network/payload-model").PayloadMetaFields> & {
25
+ _hash: import("@xylabs/hex").Hash;
26
+ _dataHash: import("@xylabs/hex").Hash;
27
+ _sequence: import("@xyo-network/payload-model").LocalSequence | import("@xyo-network/payload-model").QualifiedSequence;
28
+ }>;
29
+ };
30
+ //# sourceMappingURL=WithStorageMetaish.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WithStorageMetaish.d.ts","sourceRoot":"","sources":["../../../../src/zod/payload/WithStorageMetaish.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAExB,eAAO,MAAM,qBAAqB;;;;;;;;;;GAQhC,CAAA;AAEF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEtE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;CAG7B,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './WithHashMetaish.ts';
2
+ export * from './WithStorageMetaish.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/zod/payload/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "http://json.schemastore.org/package.json",
3
3
  "name": "@xyo-network/xl1-protocol",
4
- "version": "1.14.13",
4
+ "version": "1.14.15",
5
5
  "description": "XYO Layer One Protocol",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -40,39 +40,40 @@
40
40
  ],
41
41
  "dependencies": {
42
42
  "@opentelemetry/api": "~1.9.0",
43
- "@xylabs/assert": "~5.0.41",
44
- "@xylabs/error": "~5.0.41",
45
- "@xylabs/hex": "~5.0.41",
46
- "@xylabs/logger": "~5.0.41",
47
- "@xylabs/object": "~5.0.41",
48
- "@xylabs/promise": "~5.0.41",
49
- "@xylabs/sdk-js": "~5.0.41",
50
- "@xylabs/typeof": "~5.0.41",
51
- "@xylabs/zod": "~5.0.41",
52
- "@xyo-network/archivist-model": "~5.2.6",
53
- "@xyo-network/boundwitness-model": "~5.2.6",
54
- "@xyo-network/payload-model": "~5.2.6",
55
- "@xyo-network/schema-payload-plugin": "~5.2.6",
56
- "zod": "~4.1.12"
43
+ "@xylabs/assert": "~5.0.46",
44
+ "@xylabs/error": "~5.0.46",
45
+ "@xylabs/hex": "~5.0.46",
46
+ "@xylabs/logger": "~5.0.46",
47
+ "@xylabs/object": "~5.0.46",
48
+ "@xylabs/promise": "~5.0.46",
49
+ "@xylabs/sdk-js": "~5.0.46",
50
+ "@xylabs/typeof": "~5.0.46",
51
+ "@xylabs/zod": "~5.0.46",
52
+ "@xyo-network/archivist-model": "~5.2.10",
53
+ "@xyo-network/boundwitness-model": "~5.2.10",
54
+ "@xyo-network/payload-builder": "~5.2.10",
55
+ "@xyo-network/payload-model": "~5.2.10",
56
+ "@xyo-network/schema-payload-plugin": "~5.2.10",
57
+ "zod": "~4.1.13"
57
58
  },
58
59
  "devDependencies": {
59
60
  "@types/node": "~24.10.1",
60
- "@typescript-eslint/types": "~8.47.0",
61
- "@xylabs/creatable": "~5.0.41",
61
+ "@typescript-eslint/types": "~8.48.0",
62
+ "@xylabs/creatable": "~5.0.46",
62
63
  "@xylabs/eslint-config-flat": "~7.2.8",
63
64
  "@xylabs/ts-scripts-yarn3": "~7.2.8",
64
65
  "@xylabs/tsconfig": "~7.2.8",
65
- "@xyo-network/account-model": "~5.2.6",
66
- "@xyo-network/payload-builder": "~5.2.6",
66
+ "@xyo-network/account-model": "~5.2.10",
67
+ "@xyo-network/payload-builder": "~5.2.10",
67
68
  "dependency-cruiser": "~17.3.1",
68
69
  "dotenv": "~17.2.3",
69
70
  "eslint": "~9.39.1",
70
71
  "eslint-import-resolver-typescript": "~4.4.4",
71
- "knip": "~5.70.1",
72
+ "knip": "~5.70.2",
72
73
  "typescript": "~5.9.3",
73
74
  "vite": "~7.2.4",
74
75
  "vite-tsconfig-paths": "~5.1.4",
75
- "vitest": "~4.0.12"
76
+ "vitest": "~4.0.13"
76
77
  },
77
78
  "packageManager": "yarn@4.10.3",
78
79
  "engines": {
@@ -1,10 +1,8 @@
1
1
  import { HashZod } from '@xylabs/hex'
2
2
  import { AsObjectFactory } from '@xylabs/object'
3
- import { isPayloadOfSchemaType } from '@xyo-network/payload-model'
3
+ import { isPayloadOfSchemaType, PayloadZodOfSchema } from '@xyo-network/payload-model'
4
4
  import z from 'zod'
5
5
 
6
- import { PayloadZodOfSchema } from './TransferPayload.ts'
7
-
8
6
  // xl1 = xl1 block number, epoch = epoch number, ethereum = ethereum block number
9
7
  export type TimeDomain = 'xl1' | 'epoch' | 'ethereum'
10
8
 
@@ -3,7 +3,7 @@ import {
3
3
  HexZod,
4
4
  } from '@xylabs/hex'
5
5
  import { AsObjectFactory, JsonObjectZod } from '@xylabs/object'
6
- import { isPayloadOfSchemaType, PayloadZod } from '@xyo-network/payload-model'
6
+ import { isPayloadOfSchemaType, PayloadZodOfSchema } from '@xyo-network/payload-model'
7
7
  import z from 'zod'
8
8
 
9
9
  export const TransferSchema = 'network.xyo.transfer' as const
@@ -17,8 +17,6 @@ export const TransferFieldsZod = z.object({
17
17
  transfers: z.record(AddressZod, HexZod),
18
18
  })
19
19
 
20
- export const PayloadZodOfSchema = <S extends string>(schema: S) => PayloadZod.extend({ schema: z.literal(schema) })
21
-
22
20
  export const TransferZod = PayloadZodOfSchema(TransferSchema).extend(TransferFieldsZod.shape)
23
21
 
24
22
  export type Transfer = z.infer<typeof TransferZod>
@@ -9,7 +9,7 @@ import * as z from 'zod'
9
9
  import {
10
10
  BlockBoundWitnessZod,
11
11
  SignedBlockBoundWitnessZod,
12
- } from './BlockBoundWitness.ts'
12
+ } from './block/index.ts'
13
13
 
14
14
  export const HydratedBlockZod = z.tuple([
15
15
  BlockBoundWitnessZod,
@@ -73,11 +73,27 @@ export const SignedHydratedBlockWithHashMetaZod = z.tuple([
73
73
 
74
74
  export type SignedHydratedBlockWithHashMeta = z.infer<typeof SignedHydratedBlockWithHashMetaZod>
75
75
 
76
+ export const SignedHydratedBlockWithHashMetaishZod = z.tuple([
77
+ z.union([WithHashMetaZod(SignedBlockBoundWitnessZod)]),
78
+ z.array(WithHashMetaZod(PayloadZodLoose)),
79
+ ])
80
+
76
81
  export const isSignedHydratedBlockWithHashMeta = zodIsFactory(SignedHydratedBlockWithHashMetaZod)
77
82
  export const asSignedHydratedBlockWithHashMeta = zodAsFactory(SignedHydratedBlockWithHashMetaZod, 'asSignedHydratedBlockWithHashMeta')
83
+
78
84
  export const toSignedHydratedBlockWithHashMeta = zodToFactory(SignedHydratedBlockWithHashMetaZod, 'toSignedHydratedBlockWithHashMeta')
79
85
 
80
86
  export const SignedHydratedBlockWithStorageMetaZod = z.tuple([
81
87
  WithStorageMetaZod(SignedBlockBoundWitnessZod),
82
88
  z.array(WithStorageMetaZod(PayloadZodLoose)),
83
89
  ])
90
+ export type SignedHydratedBlockWithStorageMeta = z.infer<typeof SignedHydratedBlockWithStorageMetaZod>
91
+
92
+ export const isSignedHydratedBlockWithStorageMeta = zodIsFactory(SignedHydratedBlockWithStorageMetaZod)
93
+ export const asSignedHydratedBlockWithStorageMeta = zodAsFactory(SignedHydratedBlockWithStorageMetaZod, 'asSignedHydratedBlockWithStorageMeta')
94
+ export const toSignedHydratedBlockWithStorageMeta = zodToFactory(SignedHydratedBlockWithStorageMetaZod, 'toSignedHydratedBlockWithStorageMeta')
95
+
96
+ export const SignedHydratedBlockWithStorageMetaishZod = z.tuple([
97
+ z.union([WithStorageMetaZod(SignedBlockBoundWitnessZod)]),
98
+ z.array(WithStorageMetaZod(PayloadZodLoose)),
99
+ ])
@@ -0,0 +1,48 @@
1
+ import { HashZod } from '@xylabs/sdk-js'
2
+ import {
3
+ zodAsFactory, zodIsFactory, zodToFactory,
4
+ } from '@xylabs/zod'
5
+ import { BoundWitnessZod } from '@xyo-network/boundwitness-model'
6
+ import { HashMetaZod, StorageMetaZod } from '@xyo-network/payload-model'
7
+ import * as z from 'zod'
8
+
9
+ import { XL1BlockNumberZod } from '../../model/index.ts'
10
+ import { ChainZod } from '../Chain.ts'
11
+
12
+ export const BlockBoundWitnessFieldsZod = z.object({
13
+ block: XL1BlockNumberZod,
14
+ chain: ChainZod,
15
+ previous: HashZod.nullable(),
16
+ protocol: z.number().optional(),
17
+ step_hashes: z.array(HashZod).optional(),
18
+ })
19
+
20
+ export const BlockBoundWitnessMetaZod = z.object({ $epoch: z.number() })
21
+
22
+ export const BlockBoundWitnessZod = BoundWitnessZod
23
+ .safeExtend(BlockBoundWitnessFieldsZod.shape)
24
+ .safeExtend(BlockBoundWitnessMetaZod.shape)
25
+
26
+ export type BlockBoundWitness = z.infer<typeof BlockBoundWitnessZod>
27
+
28
+ export const isBlockBoundWitness = zodIsFactory(BlockBoundWitnessZod)
29
+ export const asBlockBoundWitness = zodAsFactory(BlockBoundWitnessZod, 'asBlockBoundWitness')
30
+ export const toBlockBoundWitness = zodToFactory(BlockBoundWitnessZod, 'toBlockBoundWitness')
31
+
32
+ export const BlockBoundWitnessWithHashMetaZod = BlockBoundWitnessZod
33
+ .safeExtend(HashMetaZod.shape)
34
+
35
+ export type BlockBoundWitnessWithHashMeta = z.infer<typeof BlockBoundWitnessWithHashMetaZod>
36
+
37
+ export const isBlockBoundWitnessWithHashMeta = zodIsFactory(BlockBoundWitnessWithHashMetaZod)
38
+ export const asBlockBoundWitnessWithHashMeta = zodAsFactory(BlockBoundWitnessWithHashMetaZod, 'asBlockBoundWitnessWithHashMeta')
39
+ export const toBlockBoundWitnessWithHashMeta = zodToFactory(BlockBoundWitnessWithHashMetaZod, 'toBlockBoundWitnessWithHashMeta')
40
+
41
+ export const BlockBoundWitnessWithStorageMetaZod = BlockBoundWitnessZod
42
+ .safeExtend(StorageMetaZod.shape)
43
+
44
+ export type BlockBoundWitnessWithStorageMeta = z.infer<typeof BlockBoundWitnessWithStorageMetaZod>
45
+
46
+ export const isBlockBoundWitnessWithStorageMeta = zodIsFactory(BlockBoundWitnessWithStorageMetaZod)
47
+ export const asBlockBoundWitnessWithStorageMeta = zodAsFactory(BlockBoundWitnessWithStorageMetaZod, 'asBlockBoundWitnessWithStorageMeta')
48
+ export const toBlockBoundWitnessWithStorageMeta = zodToFactory(BlockBoundWitnessWithStorageMetaZod, 'toBlockBoundWitnessWithStorageMeta')