@xyo-network/xl1-schema 1.12.0 → 1.12.2
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/dist/neutral/JsonSchema.d.ts +1 -1
- package/dist/neutral/JsonSchema.d.ts.map +1 -1
- package/dist/neutral/StorageMeta.d.ts.map +1 -1
- package/dist/neutral/boundwitness/TransactionBoundWitness.d.ts.map +1 -1
- package/dist/neutral/boundwitness/TransactionBoundWitnessWithStorageMeta.d.ts.map +1 -1
- package/dist/neutral/index.mjs +239 -63
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/payload/ChainStakeIntent.d.ts.map +1 -1
- package/dist/neutral/payload/HashPayload.d.ts.map +1 -1
- package/dist/neutral/payload/TransferPayload.d.ts.map +1 -1
- package/package.json +13 -12
- package/src/JsonSchema.ts +1 -1
- package/src/StorageMeta.ts +4 -4
- package/src/boundwitness/BlockBoundWitness.ts +4 -4
- package/src/boundwitness/TransactionBoundWitness.ts +8 -7
- package/src/boundwitness/TransactionBoundWitnessWithStorageMeta.ts +4 -3
- package/src/payload/ChainStakeIntent.ts +3 -2
- package/src/payload/HashPayload.ts +3 -2
- package/src/payload/TransferPayload.ts +5 -6
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as z from 'zod';
|
|
2
2
|
declare const JsonValueZod: z.ZodType<unknown>;
|
|
3
3
|
export declare const JsonObjectZod: z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
4
4
|
export type JsonValue = z.infer<typeof JsonValueZod>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonSchema.d.ts","sourceRoot":"","sources":["../../src/JsonSchema.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"JsonSchema.d.ts","sourceRoot":"","sources":["../../src/JsonSchema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAA;AAGxB,QAAA,MAAM,YAAY,EAAE,CAAC,CAAC,OAAO,CAAC,OAAO,CAQhC,CAAA;AAGL,eAAO,MAAM,aAAa,mGAAqC,CAAA;AAG/D,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAA;AACpD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StorageMeta.d.ts","sourceRoot":"","sources":["../../src/StorageMeta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"StorageMeta.d.ts","sourceRoot":"","sources":["../../src/StorageMeta.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAEzC,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,WAAW,CASpD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/boundwitness/TransactionBoundWitness.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransactionBoundWitness.d.ts","sourceRoot":"","sources":["../../../src/boundwitness/TransactionBoundWitness.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAIzC,eAAO,MAAM,iCAAiC,EAAE,cAAc,CAAC,uBAAuB,CA0B5E,CAAA;AAEV,eAAO,MAAM,oCAAoC,eACmB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransactionBoundWitnessWithStorageMeta.d.ts","sourceRoot":"","sources":["../../../src/boundwitness/TransactionBoundWitnessWithStorageMeta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransactionBoundWitnessWithStorageMeta.d.ts","sourceRoot":"","sources":["../../../src/boundwitness/TransactionBoundWitnessWithStorageMeta.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEvE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAIzC,eAAO,MAAM,gDAAgD,EAAE,cAAc,CAAC,uBAAuB,CAe3F,CAAA;AAEV,eAAO,MAAM,mDAAmD,eACmB,CAAA"}
|
package/dist/neutral/index.mjs
CHANGED
|
@@ -1,32 +1,56 @@
|
|
|
1
1
|
// src/boundwitness/BlockBoundWitness.ts
|
|
2
|
+
import { AddressRegEx, HashRegEx } from "@xylabs/hex";
|
|
2
3
|
import { BoundWitnessSchema } from "@xyo-network/boundwitness-model";
|
|
3
4
|
import { boundWitnessJsonSchema, boundWitnessProperties } from "@xyo-network/boundwitness-wrapper";
|
|
4
5
|
import { PayloadBuilder } from "@xyo-network/payload-builder";
|
|
5
|
-
import { AddressRegEx, HashRegEx } from "@xyo-network/payload-wrapper";
|
|
6
6
|
import { SchemaSchema } from "@xyo-network/schema-payload-plugin";
|
|
7
7
|
var BlockBoundWitnessJsonSchema = {
|
|
8
8
|
...boundWitnessJsonSchema,
|
|
9
9
|
$id: "https://schemas.xyo.network/2.0/block",
|
|
10
10
|
properties: {
|
|
11
11
|
...boundWitnessProperties,
|
|
12
|
-
block: {
|
|
13
|
-
|
|
12
|
+
block: {
|
|
13
|
+
type: "integer"
|
|
14
|
+
},
|
|
15
|
+
chain: {
|
|
16
|
+
type: "string",
|
|
17
|
+
pattern: AddressRegEx.source
|
|
18
|
+
},
|
|
14
19
|
previous: {
|
|
15
20
|
type: "string",
|
|
16
|
-
pattern: HashRegEx,
|
|
21
|
+
pattern: HashRegEx.source,
|
|
17
22
|
nullable: true
|
|
18
23
|
},
|
|
19
24
|
step_hashes: {
|
|
20
|
-
items: {
|
|
25
|
+
items: {
|
|
26
|
+
type: "string",
|
|
27
|
+
pattern: HashRegEx.source
|
|
28
|
+
},
|
|
21
29
|
type: "array"
|
|
22
30
|
},
|
|
23
|
-
$epoch: {
|
|
24
|
-
|
|
31
|
+
$epoch: {
|
|
32
|
+
type: "integer"
|
|
33
|
+
},
|
|
34
|
+
schema: {
|
|
35
|
+
type: "string",
|
|
36
|
+
pattern: BoundWitnessSchema
|
|
37
|
+
}
|
|
25
38
|
},
|
|
26
|
-
required: [
|
|
39
|
+
required: [
|
|
40
|
+
...boundWitnessJsonSchema.required,
|
|
41
|
+
"block",
|
|
42
|
+
"chain",
|
|
43
|
+
"step_hashes",
|
|
44
|
+
"previous",
|
|
45
|
+
"$epoch"
|
|
46
|
+
],
|
|
27
47
|
type: "object"
|
|
28
48
|
};
|
|
29
|
-
var BlockBoundWitnessSchemaPayload = new PayloadBuilder({
|
|
49
|
+
var BlockBoundWitnessSchemaPayload = new PayloadBuilder({
|
|
50
|
+
schema: SchemaSchema
|
|
51
|
+
}).fields({
|
|
52
|
+
definition: BlockBoundWitnessJsonSchema
|
|
53
|
+
}).build();
|
|
30
54
|
|
|
31
55
|
// src/boundwitness/BlockBoundWitnessWithStorageMeta.ts
|
|
32
56
|
import { BoundWitnessSchema as BoundWitnessSchema2 } from "@xyo-network/boundwitness-model";
|
|
@@ -35,15 +59,28 @@ import { PayloadBuilder as PayloadBuilder2 } from "@xyo-network/payload-builder"
|
|
|
35
59
|
import { SchemaSchema as SchemaSchema2 } from "@xyo-network/schema-payload-plugin";
|
|
36
60
|
|
|
37
61
|
// src/StorageMeta.ts
|
|
38
|
-
import { HashRegEx as HashRegEx2, HexRegEx } from "@
|
|
62
|
+
import { HashRegEx as HashRegEx2, HexRegEx } from "@xylabs/hex";
|
|
39
63
|
var StorageMetaJsonSchema = {
|
|
40
64
|
$id: "https://schemas.xyo.network/2.0/storage-meta",
|
|
41
65
|
properties: {
|
|
42
|
-
_sequence: {
|
|
43
|
-
|
|
44
|
-
|
|
66
|
+
_sequence: {
|
|
67
|
+
type: "string",
|
|
68
|
+
pattern: HexRegEx.source
|
|
69
|
+
},
|
|
70
|
+
_hash: {
|
|
71
|
+
type: "string",
|
|
72
|
+
pattern: HashRegEx2.source
|
|
73
|
+
},
|
|
74
|
+
_dataHash: {
|
|
75
|
+
type: "string",
|
|
76
|
+
pattern: HashRegEx2.source
|
|
77
|
+
}
|
|
45
78
|
},
|
|
46
|
-
required: [
|
|
79
|
+
required: [
|
|
80
|
+
"_sequence",
|
|
81
|
+
"_hash",
|
|
82
|
+
"_dataHash"
|
|
83
|
+
],
|
|
47
84
|
type: "object"
|
|
48
85
|
};
|
|
49
86
|
|
|
@@ -54,26 +91,50 @@ var BlockBoundWitnessWithStorageMetaJsonSchema = {
|
|
|
54
91
|
...boundWitnessProperties2,
|
|
55
92
|
...BlockBoundWitnessJsonSchema.properties,
|
|
56
93
|
...StorageMetaJsonSchema.properties,
|
|
57
|
-
schema: {
|
|
94
|
+
schema: {
|
|
95
|
+
type: "string",
|
|
96
|
+
pattern: BoundWitnessSchema2
|
|
97
|
+
}
|
|
58
98
|
},
|
|
59
|
-
required: [
|
|
99
|
+
required: [
|
|
100
|
+
.../* @__PURE__ */ new Set([
|
|
101
|
+
...boundWitnessJsonSchema2.required,
|
|
102
|
+
...BlockBoundWitnessJsonSchema.required,
|
|
103
|
+
...StorageMetaJsonSchema.required
|
|
104
|
+
])
|
|
105
|
+
],
|
|
60
106
|
type: "object"
|
|
61
107
|
};
|
|
62
|
-
var BlockBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder2({
|
|
108
|
+
var BlockBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder2({
|
|
109
|
+
schema: SchemaSchema2
|
|
110
|
+
}).fields({
|
|
111
|
+
definition: BlockBoundWitnessWithStorageMetaJsonSchema
|
|
112
|
+
}).build();
|
|
63
113
|
|
|
64
114
|
// src/boundwitness/TransactionBoundWitness.ts
|
|
115
|
+
import { AddressRegEx as AddressRegEx2 } from "@xylabs/hex";
|
|
65
116
|
import { BoundWitnessSchema as BoundWitnessSchema3 } from "@xyo-network/boundwitness-model";
|
|
66
117
|
import { boundWitnessJsonSchema as boundWitnessJsonSchema3 } from "@xyo-network/boundwitness-wrapper";
|
|
67
118
|
import { PayloadBuilder as PayloadBuilder3 } from "@xyo-network/payload-builder";
|
|
68
|
-
import {
|
|
119
|
+
import { Uint256RegEx } from "@xyo-network/payload-wrapper";
|
|
69
120
|
import { SchemaSchema as SchemaSchema3 } from "@xyo-network/schema-payload-plugin";
|
|
70
121
|
|
|
71
122
|
// src/Executable.ts
|
|
72
123
|
var ExecutableJsonSchema = {
|
|
73
124
|
$id: "https://schemas.xyo.network/2.0/executable",
|
|
74
125
|
additionalProperties: true,
|
|
75
|
-
properties: {
|
|
76
|
-
|
|
126
|
+
properties: {
|
|
127
|
+
script: {
|
|
128
|
+
items: {
|
|
129
|
+
type: "string",
|
|
130
|
+
pattern: String.raw`^elevate\|`
|
|
131
|
+
},
|
|
132
|
+
type: "array"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
required: [
|
|
136
|
+
"script"
|
|
137
|
+
],
|
|
77
138
|
type: "object"
|
|
78
139
|
};
|
|
79
140
|
|
|
@@ -85,33 +146,71 @@ var TransactionBoundWitnessJsonSchema = {
|
|
|
85
146
|
properties: {
|
|
86
147
|
...boundWitnessJsonSchema3.properties,
|
|
87
148
|
...ExecutableJsonSchema.properties,
|
|
88
|
-
chain: {
|
|
149
|
+
chain: {
|
|
150
|
+
type: "string",
|
|
151
|
+
pattern: AddressRegEx2.source
|
|
152
|
+
},
|
|
89
153
|
fees: {
|
|
90
154
|
type: "object",
|
|
91
155
|
properties: {
|
|
92
|
-
base: {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
156
|
+
base: {
|
|
157
|
+
type: "string",
|
|
158
|
+
pattern: Uint256RegEx.source
|
|
159
|
+
},
|
|
160
|
+
gasLimit: {
|
|
161
|
+
type: "string",
|
|
162
|
+
pattern: Uint256RegEx.source
|
|
163
|
+
},
|
|
164
|
+
gasPrice: {
|
|
165
|
+
type: "string",
|
|
166
|
+
pattern: Uint256RegEx.source
|
|
167
|
+
},
|
|
168
|
+
priority: {
|
|
169
|
+
type: "string",
|
|
170
|
+
pattern: Uint256RegEx.source
|
|
171
|
+
}
|
|
96
172
|
},
|
|
97
|
-
required: [
|
|
173
|
+
required: [
|
|
174
|
+
"base"
|
|
175
|
+
],
|
|
98
176
|
additionalProperties: false
|
|
99
177
|
},
|
|
100
|
-
from: {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
178
|
+
from: {
|
|
179
|
+
type: "string",
|
|
180
|
+
pattern: AddressRegEx2.source
|
|
181
|
+
},
|
|
182
|
+
nbf: {
|
|
183
|
+
type: "integer"
|
|
184
|
+
},
|
|
185
|
+
exp: {
|
|
186
|
+
type: "integer"
|
|
187
|
+
},
|
|
188
|
+
schema: {
|
|
189
|
+
type: "string",
|
|
190
|
+
pattern: BoundWitnessSchema3
|
|
191
|
+
}
|
|
104
192
|
},
|
|
105
|
-
required: [
|
|
193
|
+
required: [
|
|
194
|
+
...boundWitnessJsonSchema3.required,
|
|
195
|
+
"chain",
|
|
196
|
+
"fees",
|
|
197
|
+
"nbf",
|
|
198
|
+
"exp"
|
|
199
|
+
],
|
|
106
200
|
type: "object"
|
|
107
201
|
};
|
|
108
|
-
var TransactionBoundWitnessSchemaPayload = new PayloadBuilder3({
|
|
202
|
+
var TransactionBoundWitnessSchemaPayload = new PayloadBuilder3({
|
|
203
|
+
schema: SchemaSchema3
|
|
204
|
+
}).fields({
|
|
205
|
+
definition: TransactionBoundWitnessJsonSchema
|
|
206
|
+
}).build();
|
|
109
207
|
|
|
110
208
|
// src/boundwitness/TransactionBoundWitnessWithStorageMeta.ts
|
|
209
|
+
import { AddressRegEx as AddressRegEx3 } from "@xylabs/hex";
|
|
111
210
|
import { BoundWitnessSchema as BoundWitnessSchema4 } from "@xyo-network/boundwitness-model";
|
|
112
211
|
import { boundWitnessJsonSchema as boundWitnessJsonSchema4 } from "@xyo-network/boundwitness-wrapper";
|
|
113
212
|
import { PayloadBuilder as PayloadBuilder4 } from "@xyo-network/payload-builder";
|
|
114
|
-
import {
|
|
213
|
+
import { Uint256RegEx as Uint256RegEx2 } from "@xyo-network/payload-wrapper";
|
|
115
214
|
import { SchemaSchema as SchemaSchema4 } from "@xyo-network/schema-payload-plugin";
|
|
116
215
|
var TransactionBoundWitnessWithStorageMetaJsonSchema = {
|
|
117
216
|
...boundWitnessJsonSchema4,
|
|
@@ -120,20 +219,45 @@ var TransactionBoundWitnessWithStorageMetaJsonSchema = {
|
|
|
120
219
|
properties: {
|
|
121
220
|
...boundWitnessJsonSchema4.properties,
|
|
122
221
|
...StorageMetaJsonSchema.properties,
|
|
123
|
-
chain: {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
222
|
+
chain: {
|
|
223
|
+
type: "string",
|
|
224
|
+
pattern: AddressRegEx3.source
|
|
225
|
+
},
|
|
226
|
+
gas: {
|
|
227
|
+
type: "string",
|
|
228
|
+
pattern: Uint256RegEx2.source
|
|
229
|
+
},
|
|
230
|
+
nbf: {
|
|
231
|
+
type: "integer"
|
|
232
|
+
},
|
|
233
|
+
exp: {
|
|
234
|
+
type: "integer"
|
|
235
|
+
},
|
|
236
|
+
schema: {
|
|
237
|
+
type: "string",
|
|
238
|
+
pattern: BoundWitnessSchema4
|
|
239
|
+
}
|
|
128
240
|
},
|
|
129
|
-
required: [
|
|
241
|
+
required: [
|
|
242
|
+
...boundWitnessJsonSchema4.required,
|
|
243
|
+
...StorageMetaJsonSchema.required,
|
|
244
|
+
"chain",
|
|
245
|
+
"gas",
|
|
246
|
+
"nbf",
|
|
247
|
+
"exp"
|
|
248
|
+
],
|
|
130
249
|
type: "object"
|
|
131
250
|
};
|
|
132
|
-
var TransactionBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder4({
|
|
251
|
+
var TransactionBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder4({
|
|
252
|
+
schema: SchemaSchema4
|
|
253
|
+
}).fields({
|
|
254
|
+
definition: TransactionBoundWitnessWithStorageMetaJsonSchema
|
|
255
|
+
}).build();
|
|
133
256
|
|
|
134
257
|
// src/payload/ChainStakeIntent.ts
|
|
258
|
+
import { AddressRegEx as AddressRegEx4 } from "@xylabs/hex";
|
|
135
259
|
import { PayloadBuilder as PayloadBuilder5 } from "@xyo-network/payload-builder";
|
|
136
|
-
import {
|
|
260
|
+
import { payloadJsonSchema } from "@xyo-network/payload-wrapper";
|
|
137
261
|
import { SchemaSchema as SchemaSchema5 } from "@xyo-network/schema-payload-plugin";
|
|
138
262
|
import { ChainStakeIntentSchema } from "@xyo-network/xl1-protocol";
|
|
139
263
|
var ChainStakeIntentPayloadJsonSchema = {
|
|
@@ -142,18 +266,37 @@ var ChainStakeIntentPayloadJsonSchema = {
|
|
|
142
266
|
additionalProperties: false,
|
|
143
267
|
properties: {
|
|
144
268
|
...payloadJsonSchema.properties,
|
|
145
|
-
from: {
|
|
146
|
-
|
|
147
|
-
|
|
269
|
+
from: {
|
|
270
|
+
type: "string",
|
|
271
|
+
pattern: AddressRegEx4.source
|
|
272
|
+
},
|
|
273
|
+
intent: {
|
|
274
|
+
type: "string",
|
|
275
|
+
enum: [
|
|
276
|
+
"producer"
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
schema: {
|
|
280
|
+
type: "string",
|
|
281
|
+
pattern: ChainStakeIntentSchema
|
|
282
|
+
}
|
|
148
283
|
},
|
|
149
|
-
required: [
|
|
284
|
+
required: [
|
|
285
|
+
...payloadJsonSchema.required,
|
|
286
|
+
"intent"
|
|
287
|
+
],
|
|
150
288
|
type: "object"
|
|
151
289
|
};
|
|
152
|
-
var ChainStakeIntentPayloadJsonSchemaPayload = new PayloadBuilder5({
|
|
290
|
+
var ChainStakeIntentPayloadJsonSchemaPayload = new PayloadBuilder5({
|
|
291
|
+
schema: SchemaSchema5
|
|
292
|
+
}).fields({
|
|
293
|
+
definition: ChainStakeIntentPayloadJsonSchema
|
|
294
|
+
}).build();
|
|
153
295
|
|
|
154
296
|
// src/payload/HashPayload.ts
|
|
297
|
+
import { HashRegEx as HashRegEx3 } from "@xylabs/hex";
|
|
155
298
|
import { PayloadBuilder as PayloadBuilder6 } from "@xyo-network/payload-builder";
|
|
156
|
-
import {
|
|
299
|
+
import { payloadJsonSchema as payloadJsonSchema2 } from "@xyo-network/payload-wrapper";
|
|
157
300
|
import { SchemaSchema as SchemaSchema6 } from "@xyo-network/schema-payload-plugin";
|
|
158
301
|
import { HashSchema } from "@xyo-network/xl1-protocol";
|
|
159
302
|
var HashPayloadJsonSchema = {
|
|
@@ -162,21 +305,31 @@ var HashPayloadJsonSchema = {
|
|
|
162
305
|
additionalProperties: false,
|
|
163
306
|
properties: {
|
|
164
307
|
...payloadJsonSchema2.properties,
|
|
165
|
-
hash: {
|
|
166
|
-
|
|
308
|
+
hash: {
|
|
309
|
+
type: "string",
|
|
310
|
+
pattern: HashRegEx3.source
|
|
311
|
+
},
|
|
312
|
+
schema: {
|
|
313
|
+
type: "string",
|
|
314
|
+
pattern: HashSchema
|
|
315
|
+
}
|
|
167
316
|
},
|
|
168
|
-
required: [
|
|
317
|
+
required: [
|
|
318
|
+
...payloadJsonSchema2.required,
|
|
319
|
+
"hash"
|
|
320
|
+
],
|
|
169
321
|
type: "object"
|
|
170
322
|
};
|
|
171
|
-
var HashPayloadJsonSchemaPayload = new PayloadBuilder6({
|
|
323
|
+
var HashPayloadJsonSchemaPayload = new PayloadBuilder6({
|
|
324
|
+
schema: SchemaSchema6
|
|
325
|
+
}).fields({
|
|
326
|
+
definition: HashPayloadJsonSchema
|
|
327
|
+
}).build();
|
|
172
328
|
|
|
173
329
|
// src/payload/TransferPayload.ts
|
|
330
|
+
import { AddressRegEx as AddressRegEx5 } from "@xylabs/hex";
|
|
174
331
|
import { PayloadBuilder as PayloadBuilder7 } from "@xyo-network/payload-builder";
|
|
175
|
-
import {
|
|
176
|
-
AddressRegEx as AddressRegEx5,
|
|
177
|
-
payloadJsonSchema as payloadJsonSchema3,
|
|
178
|
-
Uint256RegEx as Uint256RegEx3
|
|
179
|
-
} from "@xyo-network/payload-wrapper";
|
|
332
|
+
import { payloadJsonSchema as payloadJsonSchema3, Uint256RegEx as Uint256RegEx3 } from "@xyo-network/payload-wrapper";
|
|
180
333
|
import { SchemaSchema as SchemaSchema7 } from "@xyo-network/schema-payload-plugin";
|
|
181
334
|
import { TransferSchema } from "@xyo-network/xl1-protocol";
|
|
182
335
|
var TransferPayloadJsonSchema = {
|
|
@@ -185,19 +338,42 @@ var TransferPayloadJsonSchema = {
|
|
|
185
338
|
additionalProperties: false,
|
|
186
339
|
properties: {
|
|
187
340
|
...payloadJsonSchema3.properties,
|
|
188
|
-
from: {
|
|
189
|
-
|
|
341
|
+
from: {
|
|
342
|
+
type: "string",
|
|
343
|
+
pattern: AddressRegEx5.source
|
|
344
|
+
},
|
|
345
|
+
epoch: {
|
|
346
|
+
type: "number"
|
|
347
|
+
},
|
|
190
348
|
transfers: {
|
|
191
349
|
type: "object",
|
|
192
|
-
propertyNames: {
|
|
193
|
-
|
|
350
|
+
propertyNames: {
|
|
351
|
+
pattern: AddressRegEx5.source
|
|
352
|
+
},
|
|
353
|
+
patternProperties: {
|
|
354
|
+
[AddressRegEx5.source]: {
|
|
355
|
+
type: "string",
|
|
356
|
+
pattern: Uint256RegEx3.source
|
|
357
|
+
}
|
|
358
|
+
}
|
|
194
359
|
},
|
|
195
|
-
schema: {
|
|
360
|
+
schema: {
|
|
361
|
+
type: "string",
|
|
362
|
+
pattern: TransferSchema
|
|
363
|
+
}
|
|
196
364
|
},
|
|
197
|
-
required: [
|
|
365
|
+
required: [
|
|
366
|
+
...payloadJsonSchema3.required,
|
|
367
|
+
"transfers",
|
|
368
|
+
"epoch"
|
|
369
|
+
],
|
|
198
370
|
type: "object"
|
|
199
371
|
};
|
|
200
|
-
var TransferPayloadJsonSchemaPayload = new PayloadBuilder7({
|
|
372
|
+
var TransferPayloadJsonSchemaPayload = new PayloadBuilder7({
|
|
373
|
+
schema: SchemaSchema7
|
|
374
|
+
}).fields({
|
|
375
|
+
definition: TransferPayloadJsonSchema
|
|
376
|
+
}).build();
|
|
201
377
|
export {
|
|
202
378
|
BlockBoundWitnessJsonSchema,
|
|
203
379
|
BlockBoundWitnessSchemaPayload,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/boundwitness/BlockBoundWitness.ts","../../src/boundwitness/BlockBoundWitnessWithStorageMeta.ts","../../src/StorageMeta.ts","../../src/boundwitness/TransactionBoundWitness.ts","../../src/Executable.ts","../../src/boundwitness/TransactionBoundWitnessWithStorageMeta.ts","../../src/payload/ChainStakeIntent.ts","../../src/payload/HashPayload.ts","../../src/payload/TransferPayload.ts"],"sourcesContent":["import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport { boundWitnessJsonSchema, boundWitnessProperties } from '@xyo-network/boundwitness-wrapper'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { AddressRegEx, HashRegEx } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { BlockBoundWitness } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const BlockBoundWitnessJsonSchema: JSONSchemaType<BlockBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/block',\n properties: {\n ...boundWitnessProperties,\n block: { type: 'integer' },\n chain: { type: 'string', pattern: AddressRegEx },\n previous: {\n type: 'string', pattern: HashRegEx, nullable: true,\n },\n step_hashes: {\n items: { type: 'string', pattern: HashRegEx },\n type: 'array',\n },\n $epoch: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n required: [...boundWitnessJsonSchema.required, 'block', 'chain', 'step_hashes', 'previous', '$epoch'],\n type: 'object',\n} as const\n\nexport const BlockBoundWitnessSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: BlockBoundWitnessJsonSchema }).build()\n","import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport { boundWitnessJsonSchema, boundWitnessProperties } from '@xyo-network/boundwitness-wrapper'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { BlockBoundWitness } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nimport { StorageMetaJsonSchema } from '../StorageMeta.ts'\nimport { BlockBoundWitnessJsonSchema } from './BlockBoundWitness.ts'\n\nexport const BlockBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<WithStorageMeta<BlockBoundWitness>> = {\n $id: 'https://schemas.xyo.network/2.0/block-with-storage-meta',\n properties: {\n ...boundWitnessProperties,\n ...BlockBoundWitnessJsonSchema.properties,\n ...StorageMetaJsonSchema.properties,\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n required: [...new Set([...boundWitnessJsonSchema.required, ...BlockBoundWitnessJsonSchema.required, ...StorageMetaJsonSchema.required])],\n type: 'object',\n} as const\n\nexport const BlockBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: BlockBoundWitnessWithStorageMetaJsonSchema }).build()\n","import type { StorageMeta } from '@xyo-network/payload-model'\nimport { HashRegEx, HexRegEx } from '@xyo-network/payload-wrapper'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const StorageMetaJsonSchema: JSONSchemaType<StorageMeta> = {\n $id: 'https://schemas.xyo.network/2.0/storage-meta',\n properties: {\n _sequence: { type: 'string', pattern: HexRegEx },\n _hash: { type: 'string', pattern: HashRegEx },\n _dataHash: { type: 'string', pattern: HashRegEx },\n },\n required: ['_sequence', '_hash', '_dataHash'],\n type: 'object',\n} as const\n","import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport { boundWitnessJsonSchema } from '@xyo-network/boundwitness-wrapper'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { AddressRegEx, Uint256RegEx } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { TransactionBoundWitness } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nimport { ExecutableJsonSchema } from '../Executable.ts'\n\nexport const TransactionBoundWitnessJsonSchema: JSONSchemaType<TransactionBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/transaction',\n additionalProperties: false,\n properties: {\n ...boundWitnessJsonSchema.properties,\n ...ExecutableJsonSchema.properties,\n chain: { type: 'string', pattern: AddressRegEx },\n fees: {\n type: 'object',\n properties: {\n base: { type: 'string', pattern: Uint256RegEx },\n gasLimit: { type: 'string', pattern: Uint256RegEx },\n gasPrice: { type: 'string', pattern: Uint256RegEx },\n priority: { type: 'string', pattern: Uint256RegEx },\n },\n required: ['base'],\n additionalProperties: false,\n },\n from: { type: 'string', pattern: AddressRegEx },\n nbf: { type: 'integer' },\n exp: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n required: [...boundWitnessJsonSchema.required, 'chain', 'fees', 'nbf', 'exp'],\n type: 'object',\n} as const\n\nexport const TransactionBoundWitnessSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: TransactionBoundWitnessJsonSchema }).build()\n","import type { Executable } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const ExecutableJsonSchema: JSONSchemaType<Executable> = {\n $id: 'https://schemas.xyo.network/2.0/executable',\n additionalProperties: true,\n properties: { script: { items: { type: 'string', pattern: String.raw`^elevate\\|` }, type: 'array' } },\n required: ['script'],\n type: 'object',\n} as const\n","import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport { boundWitnessJsonSchema } from '@xyo-network/boundwitness-wrapper'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { AddressRegEx, Uint256RegEx } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { TransactionBoundWitness } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nimport { StorageMetaJsonSchema } from '../StorageMeta.ts'\n\nexport const TransactionBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<TransactionBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/transaction-with-storage-meta',\n additionalProperties: false,\n properties: {\n ...boundWitnessJsonSchema.properties,\n ...StorageMetaJsonSchema.properties,\n chain: { type: 'string', pattern: AddressRegEx },\n gas: { type: 'string', pattern: Uint256RegEx },\n nbf: { type: 'integer' },\n exp: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n required: [...boundWitnessJsonSchema.required, ...StorageMetaJsonSchema.required, 'chain', 'gas', 'nbf', 'exp'],\n type: 'object',\n} as const\n\nexport const TransactionBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: TransactionBoundWitnessWithStorageMetaJsonSchema }).build()\n","import { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { AddressRegEx, payloadJsonSchema } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { ChainStakeIntent } from '@xyo-network/xl1-protocol'\nimport { ChainStakeIntentSchema } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const ChainStakeIntentPayloadJsonSchema: JSONSchemaType<ChainStakeIntent> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/chain-stake-intent',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n from: { type: 'string', pattern: AddressRegEx },\n intent: { type: 'string', enum: ['producer'] },\n schema: { type: 'string', pattern: ChainStakeIntentSchema },\n },\n required: [...payloadJsonSchema.required, 'intent'],\n type: 'object',\n}\n\nexport const ChainStakeIntentPayloadJsonSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: ChainStakeIntentPayloadJsonSchema }).build()\n","import { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { HashRegEx, payloadJsonSchema } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { HashPayload } from '@xyo-network/xl1-protocol'\nimport { HashSchema } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const HashPayloadJsonSchema: JSONSchemaType<HashPayload> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/hash',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n hash: { type: 'string', pattern: HashRegEx },\n schema: { type: 'string', pattern: HashSchema },\n },\n required: [...payloadJsonSchema.required, 'hash'],\n type: 'object',\n}\n\nexport const HashPayloadJsonSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: HashPayloadJsonSchema }).build()\n","import { PayloadBuilder } from '@xyo-network/payload-builder'\nimport {\n AddressRegEx, payloadJsonSchema, Uint256RegEx,\n} from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { Transfer } from '@xyo-network/xl1-protocol'\nimport { TransferSchema } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const TransferPayloadJsonSchema: JSONSchemaType<Transfer> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/transfer',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n from: { type: 'string', pattern: AddressRegEx },\n epoch: { type: 'number' },\n transfers: {\n type: 'object',\n propertyNames: { pattern: AddressRegEx },\n patternProperties: { [AddressRegEx]: { type: 'string', pattern: Uint256RegEx } },\n },\n schema: { type: 'string', pattern: TransferSchema },\n },\n required: [...payloadJsonSchema.required, 'transfers', 'epoch'],\n type: 'object',\n}\n\nexport const TransferPayloadJsonSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: TransferPayloadJsonSchema }).build()\n"],"mappings":";AAAA,SAAS,0BAA0B;AACnC,SAAS,wBAAwB,8BAA8B;AAC/D,SAAS,sBAAsB;AAC/B,SAAS,cAAc,iBAAiB;AAExC,SAAS,oBAAoB;AAItB,IAAM,8BAAiE;AAAA,EAC5E,GAAG;AAAA,EACH,KAAK;AAAA,EACL,YAAY;AAAA,IACV,GAAG;AAAA,IACH,OAAO,EAAE,MAAM,UAAU;AAAA,IACzB,OAAO,EAAE,MAAM,UAAU,SAAS,aAAa;AAAA,IAC/C,UAAU;AAAA,MACR,MAAM;AAAA,MAAU,SAAS;AAAA,MAAW,UAAU;AAAA,IAChD;AAAA,IACA,aAAa;AAAA,MACX,OAAO,EAAE,MAAM,UAAU,SAAS,UAAU;AAAA,MAC5C,MAAM;AAAA,IACR;AAAA,IACA,QAAQ,EAAE,MAAM,UAAU;AAAA,IAC1B,QAAQ,EAAE,MAAM,UAAU,SAAS,mBAAmB;AAAA,EACxD;AAAA,E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,UAAU,CAAC,GAAGD,mBAAkB,UAAU,aAAa,OAAO;AAAA,EAC9D,MAAM;AACR;AAEO,IAAM,mCAAmC,IAAIF,gBAA8B,EAAE,QAAQI,cAAa,CAAC,EACvG,OAAO,EAAE,YAAY,0BAA0B,CAAC,EAAE,MAAM;","names":["BoundWitnessSchema","boundWitnessJsonSchema","boundWitnessProperties","PayloadBuilder","SchemaSchema","HashRegEx","boundWitnessProperties","BoundWitnessSchema","boundWitnessJsonSchema","PayloadBuilder","SchemaSchema","BoundWitnessSchema","boundWitnessJsonSchema","PayloadBuilder","AddressRegEx","SchemaSchema","boundWitnessJsonSchema","AddressRegEx","BoundWitnessSchema","PayloadBuilder","SchemaSchema","BoundWitnessSchema","boundWitnessJsonSchema","PayloadBuilder","AddressRegEx","Uint256RegEx","SchemaSchema","boundWitnessJsonSchema","AddressRegEx","Uint256RegEx","BoundWitnessSchema","PayloadBuilder","SchemaSchema","PayloadBuilder","AddressRegEx","SchemaSchema","PayloadBuilder","HashRegEx","payloadJsonSchema","SchemaSchema","PayloadBuilder","AddressRegEx","payloadJsonSchema","Uint256RegEx","SchemaSchema"]}
|
|
1
|
+
{"version":3,"sources":["../../src/boundwitness/BlockBoundWitness.ts","../../src/boundwitness/BlockBoundWitnessWithStorageMeta.ts","../../src/StorageMeta.ts","../../src/boundwitness/TransactionBoundWitness.ts","../../src/Executable.ts","../../src/boundwitness/TransactionBoundWitnessWithStorageMeta.ts","../../src/payload/ChainStakeIntent.ts","../../src/payload/HashPayload.ts","../../src/payload/TransferPayload.ts"],"sourcesContent":["import { AddressRegEx, HashRegEx } from '@xylabs/hex'\nimport { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport { boundWitnessJsonSchema, boundWitnessProperties } from '@xyo-network/boundwitness-wrapper'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { BlockBoundWitness } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const BlockBoundWitnessJsonSchema: JSONSchemaType<BlockBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/block',\n properties: {\n ...boundWitnessProperties,\n block: { type: 'integer' },\n chain: { type: 'string', pattern: AddressRegEx.source },\n previous: {\n type: 'string', pattern: HashRegEx.source, nullable: true,\n },\n step_hashes: {\n items: { type: 'string', pattern: HashRegEx.source },\n type: 'array',\n },\n $epoch: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n required: [...boundWitnessJsonSchema.required, 'block', 'chain', 'step_hashes', 'previous', '$epoch'],\n type: 'object',\n} as const\n\nexport const BlockBoundWitnessSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: BlockBoundWitnessJsonSchema }).build()\n","import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport { boundWitnessJsonSchema, boundWitnessProperties } from '@xyo-network/boundwitness-wrapper'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport type { WithStorageMeta } from '@xyo-network/payload-model'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { BlockBoundWitness } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nimport { StorageMetaJsonSchema } from '../StorageMeta.ts'\nimport { BlockBoundWitnessJsonSchema } from './BlockBoundWitness.ts'\n\nexport const BlockBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<WithStorageMeta<BlockBoundWitness>> = {\n $id: 'https://schemas.xyo.network/2.0/block-with-storage-meta',\n properties: {\n ...boundWitnessProperties,\n ...BlockBoundWitnessJsonSchema.properties,\n ...StorageMetaJsonSchema.properties,\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n required: [...new Set([...boundWitnessJsonSchema.required, ...BlockBoundWitnessJsonSchema.required, ...StorageMetaJsonSchema.required])],\n type: 'object',\n} as const\n\nexport const BlockBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: BlockBoundWitnessWithStorageMetaJsonSchema }).build()\n","import { HashRegEx, HexRegEx } from '@xylabs/hex'\nimport type { StorageMeta } from '@xyo-network/payload-model'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const StorageMetaJsonSchema: JSONSchemaType<StorageMeta> = {\n $id: 'https://schemas.xyo.network/2.0/storage-meta',\n properties: {\n _sequence: { type: 'string', pattern: HexRegEx.source },\n _hash: { type: 'string', pattern: HashRegEx.source },\n _dataHash: { type: 'string', pattern: HashRegEx.source },\n },\n required: ['_sequence', '_hash', '_dataHash'],\n type: 'object',\n} as const\n","import { AddressRegEx } from '@xylabs/hex'\nimport { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport { boundWitnessJsonSchema } from '@xyo-network/boundwitness-wrapper'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Uint256RegEx } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { TransactionBoundWitness } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nimport { ExecutableJsonSchema } from '../Executable.ts'\n\nexport const TransactionBoundWitnessJsonSchema: JSONSchemaType<TransactionBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/transaction',\n additionalProperties: false,\n properties: {\n ...boundWitnessJsonSchema.properties,\n ...ExecutableJsonSchema.properties,\n chain: { type: 'string', pattern: AddressRegEx.source },\n fees: {\n type: 'object',\n properties: {\n base: { type: 'string', pattern: Uint256RegEx.source },\n gasLimit: { type: 'string', pattern: Uint256RegEx.source },\n gasPrice: { type: 'string', pattern: Uint256RegEx.source },\n priority: { type: 'string', pattern: Uint256RegEx.source },\n },\n required: ['base'],\n additionalProperties: false,\n },\n from: { type: 'string', pattern: AddressRegEx.source },\n nbf: { type: 'integer' },\n exp: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n required: [...boundWitnessJsonSchema.required, 'chain', 'fees', 'nbf', 'exp'],\n type: 'object',\n} as const\n\nexport const TransactionBoundWitnessSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: TransactionBoundWitnessJsonSchema }).build()\n","import type { Executable } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const ExecutableJsonSchema: JSONSchemaType<Executable> = {\n $id: 'https://schemas.xyo.network/2.0/executable',\n additionalProperties: true,\n properties: { script: { items: { type: 'string', pattern: String.raw`^elevate\\|` }, type: 'array' } },\n required: ['script'],\n type: 'object',\n} as const\n","import { AddressRegEx } from '@xylabs/hex'\nimport { BoundWitnessSchema } from '@xyo-network/boundwitness-model'\nimport { boundWitnessJsonSchema } from '@xyo-network/boundwitness-wrapper'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { Uint256RegEx } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { TransactionBoundWitness } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nimport { StorageMetaJsonSchema } from '../StorageMeta.ts'\n\nexport const TransactionBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<TransactionBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/transaction-with-storage-meta',\n additionalProperties: false,\n properties: {\n ...boundWitnessJsonSchema.properties,\n ...StorageMetaJsonSchema.properties,\n chain: { type: 'string', pattern: AddressRegEx.source },\n gas: { type: 'string', pattern: Uint256RegEx.source },\n nbf: { type: 'integer' },\n exp: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n required: [...boundWitnessJsonSchema.required, ...StorageMetaJsonSchema.required, 'chain', 'gas', 'nbf', 'exp'],\n type: 'object',\n} as const\n\nexport const TransactionBoundWitnessWithStorageMetaSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: TransactionBoundWitnessWithStorageMetaJsonSchema }).build()\n","import { AddressRegEx } from '@xylabs/hex'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { payloadJsonSchema } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { ChainStakeIntent } from '@xyo-network/xl1-protocol'\nimport { ChainStakeIntentSchema } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const ChainStakeIntentPayloadJsonSchema: JSONSchemaType<ChainStakeIntent> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/chain-stake-intent',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n from: { type: 'string', pattern: AddressRegEx.source },\n intent: { type: 'string', enum: ['producer'] },\n schema: { type: 'string', pattern: ChainStakeIntentSchema },\n },\n required: [...payloadJsonSchema.required, 'intent'],\n type: 'object',\n}\n\nexport const ChainStakeIntentPayloadJsonSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: ChainStakeIntentPayloadJsonSchema }).build()\n","import { HashRegEx } from '@xylabs/hex'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { payloadJsonSchema } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { HashPayload } from '@xyo-network/xl1-protocol'\nimport { HashSchema } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const HashPayloadJsonSchema: JSONSchemaType<HashPayload> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/hash',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n hash: { type: 'string', pattern: HashRegEx.source },\n schema: { type: 'string', pattern: HashSchema },\n },\n required: [...payloadJsonSchema.required, 'hash'],\n type: 'object',\n}\n\nexport const HashPayloadJsonSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: HashPayloadJsonSchema }).build()\n","import { AddressRegEx } from '@xylabs/hex'\nimport { PayloadBuilder } from '@xyo-network/payload-builder'\nimport { payloadJsonSchema, Uint256RegEx } from '@xyo-network/payload-wrapper'\nimport type { SchemaPayload } from '@xyo-network/schema-payload-plugin'\nimport { SchemaSchema } from '@xyo-network/schema-payload-plugin'\nimport type { Transfer } from '@xyo-network/xl1-protocol'\nimport { TransferSchema } from '@xyo-network/xl1-protocol'\nimport type { JSONSchemaType } from 'ajv'\n\nexport const TransferPayloadJsonSchema: JSONSchemaType<Transfer> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/transfer',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n from: { type: 'string', pattern: AddressRegEx.source },\n epoch: { type: 'number' },\n transfers: {\n type: 'object',\n propertyNames: { pattern: AddressRegEx.source },\n patternProperties: { [AddressRegEx.source]: { type: 'string', pattern: Uint256RegEx.source } },\n },\n schema: { type: 'string', pattern: TransferSchema },\n },\n required: [...payloadJsonSchema.required, 'transfers', 'epoch'],\n type: 'object',\n}\n\nexport const TransferPayloadJsonSchemaPayload = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n .fields({ definition: TransferPayloadJsonSchema }).build()\n"],"mappings":";AAAA,SAASA,cAAcC,iBAAiB;AACxC,SAASC,0BAA0B;AACnC,SAASC,wBAAwBC,8BAA8B;AAC/D,SAASC,sBAAsB;AAE/B,SAASC,oBAAoB;AAItB,IAAMC,8BAAiE;EAC5E,GAAGJ;EACHK,KAAK;EACLC,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QAAO;MAAE;IAC/F;IACAK,QAAQ;MAAEP,MAAM;MAAUC,SAASP;IAAe;EACpD;EACAc,UAAU;OAAIjB,mBAAkBiB;IAAU;IAAa;;EACvDR,MAAM;AACR;AAEO,IAAMS,mCAAmC,IAAInB,gBAA8B;EAAEiB,QAAQd;AAAa,CAAA,EACtGiB,OAAO;EAAEC,YAAYhB;AAA0B,CAAA,EAAGiB,MAAK;","names":["AddressRegEx","HashRegEx","BoundWitnessSchema","boundWitnessJsonSchema","boundWitnessProperties","PayloadBuilder","SchemaSchema","BlockBoundWitnessJsonSchema","$id","properties","block","type","chain","pattern","source","previous","nullable","step_hashes","items","$epoch","schema","required","BlockBoundWitnessSchemaPayload","fields","definition","build","BoundWitnessSchema","boundWitnessJsonSchema","boundWitnessProperties","PayloadBuilder","SchemaSchema","HashRegEx","HexRegEx","StorageMetaJsonSchema","$id","properties","_sequence","type","pattern","source","_hash","_dataHash","required","BlockBoundWitnessWithStorageMetaJsonSchema","$id","properties","boundWitnessProperties","BlockBoundWitnessJsonSchema","StorageMetaJsonSchema","schema","type","pattern","BoundWitnessSchema","required","Set","boundWitnessJsonSchema","BlockBoundWitnessWithStorageMetaSchemaPayload","PayloadBuilder","SchemaSchema","fields","definition","build","AddressRegEx","BoundWitnessSchema","boundWitnessJsonSchema","PayloadBuilder","Uint256RegEx","SchemaSchema","ExecutableJsonSchema","$id","additionalProperties","properties","script","items","type","pattern","String","raw","required","TransactionBoundWitnessJsonSchema","boundWitnessJsonSchema","$id","additionalProperties","properties","ExecutableJsonSchema","chain","type","pattern","AddressRegEx","source","fees","base","Uint256RegEx","gasLimit","gasPrice","priority","required","from","nbf","exp","schema","BoundWitnessSchema","TransactionBoundWitnessSchemaPayload","PayloadBuilder","SchemaSchema","fields","definition","build","AddressRegEx","BoundWitnessSchema","boundWitnessJsonSchema","PayloadBuilder","Uint256RegEx","SchemaSchema","TransactionBoundWitnessWithStorageMetaJsonSchema","boundWitnessJsonSchema","$id","additionalProperties","properties","StorageMetaJsonSchema","chain","type","pattern","AddressRegEx","source","gas","Uint256RegEx","nbf","exp","schema","BoundWitnessSchema","required","TransactionBoundWitnessWithStorageMetaSchemaPayload","PayloadBuilder","SchemaSchema","fields","definition","build","AddressRegEx","PayloadBuilder","payloadJsonSchema","SchemaSchema","ChainStakeIntentSchema","ChainStakeIntentPayloadJsonSchema","$id","additionalProperties","properties","from","type","pattern","source","intent","enum","schema","required","ChainStakeIntentPayloadJsonSchemaPayload","fields","definition","build","HashRegEx","PayloadBuilder","payloadJsonSchema","SchemaSchema","HashSchema","HashPayloadJsonSchema","$id","additionalProperties","properties","hash","type","pattern","source","schema","required","HashPayloadJsonSchemaPayload","fields","definition","build","AddressRegEx","PayloadBuilder","payloadJsonSchema","Uint256RegEx","SchemaSchema","TransferSchema","TransferPayloadJsonSchema","$id","additionalProperties","properties","from","type","pattern","source","epoch","transfers","propertyNames","patternProperties","schema","required","TransferPayloadJsonSchemaPayload","fields","definition","build"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChainStakeIntent.d.ts","sourceRoot":"","sources":["../../../src/payload/ChainStakeIntent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChainStakeIntent.d.ts","sourceRoot":"","sources":["../../../src/payload/ChainStakeIntent.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAA;AAEjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAEzC,eAAO,MAAM,iCAAiC,EAAE,cAAc,CAAC,gBAAgB,CAY9E,CAAA;AAED,eAAO,MAAM,wCAAwC,eACe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HashPayload.d.ts","sourceRoot":"","sources":["../../../src/payload/HashPayload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"HashPayload.d.ts","sourceRoot":"","sources":["../../../src/payload/HashPayload.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAA;AAE5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAEzC,eAAO,MAAM,qBAAqB,EAAE,cAAc,CAAC,WAAW,CAW7D,CAAA;AAED,eAAO,MAAM,4BAA4B,eACe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TransferPayload.d.ts","sourceRoot":"","sources":["../../../src/payload/TransferPayload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TransferPayload.d.ts","sourceRoot":"","sources":["../../../src/payload/TransferPayload.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAEvE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAA;AAEzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,KAAK,CAAA;AAEzC,eAAO,MAAM,yBAAyB,EAAE,cAAc,CAAC,QAAQ,CAiB9D,CAAA;AAED,eAAO,MAAM,gCAAgC,eACe,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-schema",
|
|
4
|
-
"version": "1.12.
|
|
4
|
+
"version": "1.12.2",
|
|
5
5
|
"description": "XYO Layer One SDK Schema",
|
|
6
6
|
"homepage": "https://xylabs.com",
|
|
7
7
|
"bugs": {
|
|
@@ -36,20 +36,21 @@
|
|
|
36
36
|
"src"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@
|
|
40
|
-
"@xyo-network/boundwitness-
|
|
41
|
-
"@xyo-network/
|
|
42
|
-
"@xyo-network/payload-
|
|
43
|
-
"@xyo-network/payload-
|
|
44
|
-
"@xyo-network/
|
|
45
|
-
"@xyo-network/
|
|
39
|
+
"@xylabs/hex": "~5.0.10",
|
|
40
|
+
"@xyo-network/boundwitness-model": "~5.0.7",
|
|
41
|
+
"@xyo-network/boundwitness-wrapper": "~5.0.7",
|
|
42
|
+
"@xyo-network/payload-builder": "~5.0.7",
|
|
43
|
+
"@xyo-network/payload-model": "~5.0.7",
|
|
44
|
+
"@xyo-network/payload-wrapper": "~5.0.7",
|
|
45
|
+
"@xyo-network/schema-payload-plugin": "~5.0.7",
|
|
46
|
+
"@xyo-network/xl1-protocol": "~1.10.15",
|
|
46
47
|
"zod": "~4.0.17"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@types/node": "~24.
|
|
50
|
-
"@xylabs/ts-scripts-yarn3": "~7.1.
|
|
51
|
-
"@xylabs/tsconfig": "~7.1.
|
|
52
|
-
"@xyo-network/account": "~5.0.
|
|
50
|
+
"@types/node": "~24.3.0",
|
|
51
|
+
"@xylabs/ts-scripts-yarn3": "~7.1.3",
|
|
52
|
+
"@xylabs/tsconfig": "~7.1.3",
|
|
53
|
+
"@xyo-network/account": "~5.0.7",
|
|
53
54
|
"ajv": "~8.17.1",
|
|
54
55
|
"typescript": "~5.9.2",
|
|
55
56
|
"vitest": "~3.2.4"
|
package/src/JsonSchema.ts
CHANGED
package/src/StorageMeta.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
+
import { HashRegEx, HexRegEx } from '@xylabs/hex'
|
|
1
2
|
import type { StorageMeta } from '@xyo-network/payload-model'
|
|
2
|
-
import { HashRegEx, HexRegEx } from '@xyo-network/payload-wrapper'
|
|
3
3
|
import type { JSONSchemaType } from 'ajv'
|
|
4
4
|
|
|
5
5
|
export const StorageMetaJsonSchema: JSONSchemaType<StorageMeta> = {
|
|
6
6
|
$id: 'https://schemas.xyo.network/2.0/storage-meta',
|
|
7
7
|
properties: {
|
|
8
|
-
_sequence: { type: 'string', pattern: HexRegEx },
|
|
9
|
-
_hash: { type: 'string', pattern: HashRegEx },
|
|
10
|
-
_dataHash: { type: 'string', pattern: HashRegEx },
|
|
8
|
+
_sequence: { type: 'string', pattern: HexRegEx.source },
|
|
9
|
+
_hash: { type: 'string', pattern: HashRegEx.source },
|
|
10
|
+
_dataHash: { type: 'string', pattern: HashRegEx.source },
|
|
11
11
|
},
|
|
12
12
|
required: ['_sequence', '_hash', '_dataHash'],
|
|
13
13
|
type: 'object',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
import { AddressRegEx, HashRegEx } from '@xylabs/hex'
|
|
1
2
|
import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'
|
|
2
3
|
import { boundWitnessJsonSchema, boundWitnessProperties } from '@xyo-network/boundwitness-wrapper'
|
|
3
4
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
4
|
-
import { AddressRegEx, HashRegEx } from '@xyo-network/payload-wrapper'
|
|
5
5
|
import type { SchemaPayload } from '@xyo-network/schema-payload-plugin'
|
|
6
6
|
import { SchemaSchema } from '@xyo-network/schema-payload-plugin'
|
|
7
7
|
import type { BlockBoundWitness } from '@xyo-network/xl1-protocol'
|
|
@@ -13,12 +13,12 @@ export const BlockBoundWitnessJsonSchema: JSONSchemaType<BlockBoundWitness> = {
|
|
|
13
13
|
properties: {
|
|
14
14
|
...boundWitnessProperties,
|
|
15
15
|
block: { type: 'integer' },
|
|
16
|
-
chain: { type: 'string', pattern: AddressRegEx },
|
|
16
|
+
chain: { type: 'string', pattern: AddressRegEx.source },
|
|
17
17
|
previous: {
|
|
18
|
-
type: 'string', pattern: HashRegEx, nullable: true,
|
|
18
|
+
type: 'string', pattern: HashRegEx.source, nullable: true,
|
|
19
19
|
},
|
|
20
20
|
step_hashes: {
|
|
21
|
-
items: { type: 'string', pattern: HashRegEx },
|
|
21
|
+
items: { type: 'string', pattern: HashRegEx.source },
|
|
22
22
|
type: 'array',
|
|
23
23
|
},
|
|
24
24
|
$epoch: { type: 'integer' },
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { AddressRegEx } from '@xylabs/hex'
|
|
1
2
|
import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'
|
|
2
3
|
import { boundWitnessJsonSchema } from '@xyo-network/boundwitness-wrapper'
|
|
3
4
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
4
|
-
import {
|
|
5
|
+
import { Uint256RegEx } from '@xyo-network/payload-wrapper'
|
|
5
6
|
import type { SchemaPayload } from '@xyo-network/schema-payload-plugin'
|
|
6
7
|
import { SchemaSchema } from '@xyo-network/schema-payload-plugin'
|
|
7
8
|
import type { TransactionBoundWitness } from '@xyo-network/xl1-protocol'
|
|
@@ -16,19 +17,19 @@ export const TransactionBoundWitnessJsonSchema: JSONSchemaType<TransactionBoundW
|
|
|
16
17
|
properties: {
|
|
17
18
|
...boundWitnessJsonSchema.properties,
|
|
18
19
|
...ExecutableJsonSchema.properties,
|
|
19
|
-
chain: { type: 'string', pattern: AddressRegEx },
|
|
20
|
+
chain: { type: 'string', pattern: AddressRegEx.source },
|
|
20
21
|
fees: {
|
|
21
22
|
type: 'object',
|
|
22
23
|
properties: {
|
|
23
|
-
base: { type: 'string', pattern: Uint256RegEx },
|
|
24
|
-
gasLimit: { type: 'string', pattern: Uint256RegEx },
|
|
25
|
-
gasPrice: { type: 'string', pattern: Uint256RegEx },
|
|
26
|
-
priority: { type: 'string', pattern: Uint256RegEx },
|
|
24
|
+
base: { type: 'string', pattern: Uint256RegEx.source },
|
|
25
|
+
gasLimit: { type: 'string', pattern: Uint256RegEx.source },
|
|
26
|
+
gasPrice: { type: 'string', pattern: Uint256RegEx.source },
|
|
27
|
+
priority: { type: 'string', pattern: Uint256RegEx.source },
|
|
27
28
|
},
|
|
28
29
|
required: ['base'],
|
|
29
30
|
additionalProperties: false,
|
|
30
31
|
},
|
|
31
|
-
from: { type: 'string', pattern: AddressRegEx },
|
|
32
|
+
from: { type: 'string', pattern: AddressRegEx.source },
|
|
32
33
|
nbf: { type: 'integer' },
|
|
33
34
|
exp: { type: 'integer' },
|
|
34
35
|
schema: { type: 'string', pattern: BoundWitnessSchema },
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { AddressRegEx } from '@xylabs/hex'
|
|
1
2
|
import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'
|
|
2
3
|
import { boundWitnessJsonSchema } from '@xyo-network/boundwitness-wrapper'
|
|
3
4
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
4
|
-
import {
|
|
5
|
+
import { Uint256RegEx } from '@xyo-network/payload-wrapper'
|
|
5
6
|
import type { SchemaPayload } from '@xyo-network/schema-payload-plugin'
|
|
6
7
|
import { SchemaSchema } from '@xyo-network/schema-payload-plugin'
|
|
7
8
|
import type { TransactionBoundWitness } from '@xyo-network/xl1-protocol'
|
|
@@ -16,8 +17,8 @@ export const TransactionBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<Tr
|
|
|
16
17
|
properties: {
|
|
17
18
|
...boundWitnessJsonSchema.properties,
|
|
18
19
|
...StorageMetaJsonSchema.properties,
|
|
19
|
-
chain: { type: 'string', pattern: AddressRegEx },
|
|
20
|
-
gas: { type: 'string', pattern: Uint256RegEx },
|
|
20
|
+
chain: { type: 'string', pattern: AddressRegEx.source },
|
|
21
|
+
gas: { type: 'string', pattern: Uint256RegEx.source },
|
|
21
22
|
nbf: { type: 'integer' },
|
|
22
23
|
exp: { type: 'integer' },
|
|
23
24
|
schema: { type: 'string', pattern: BoundWitnessSchema },
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { AddressRegEx } from '@xylabs/hex'
|
|
1
2
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
2
|
-
import {
|
|
3
|
+
import { payloadJsonSchema } from '@xyo-network/payload-wrapper'
|
|
3
4
|
import type { SchemaPayload } from '@xyo-network/schema-payload-plugin'
|
|
4
5
|
import { SchemaSchema } from '@xyo-network/schema-payload-plugin'
|
|
5
6
|
import type { ChainStakeIntent } from '@xyo-network/xl1-protocol'
|
|
@@ -12,7 +13,7 @@ export const ChainStakeIntentPayloadJsonSchema: JSONSchemaType<ChainStakeIntent>
|
|
|
12
13
|
additionalProperties: false,
|
|
13
14
|
properties: {
|
|
14
15
|
...payloadJsonSchema.properties,
|
|
15
|
-
from: { type: 'string', pattern: AddressRegEx },
|
|
16
|
+
from: { type: 'string', pattern: AddressRegEx.source },
|
|
16
17
|
intent: { type: 'string', enum: ['producer'] },
|
|
17
18
|
schema: { type: 'string', pattern: ChainStakeIntentSchema },
|
|
18
19
|
},
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { HashRegEx } from '@xylabs/hex'
|
|
1
2
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
2
|
-
import {
|
|
3
|
+
import { payloadJsonSchema } from '@xyo-network/payload-wrapper'
|
|
3
4
|
import type { SchemaPayload } from '@xyo-network/schema-payload-plugin'
|
|
4
5
|
import { SchemaSchema } from '@xyo-network/schema-payload-plugin'
|
|
5
6
|
import type { HashPayload } from '@xyo-network/xl1-protocol'
|
|
@@ -12,7 +13,7 @@ export const HashPayloadJsonSchema: JSONSchemaType<HashPayload> = {
|
|
|
12
13
|
additionalProperties: false,
|
|
13
14
|
properties: {
|
|
14
15
|
...payloadJsonSchema.properties,
|
|
15
|
-
hash: { type: 'string', pattern: HashRegEx },
|
|
16
|
+
hash: { type: 'string', pattern: HashRegEx.source },
|
|
16
17
|
schema: { type: 'string', pattern: HashSchema },
|
|
17
18
|
},
|
|
18
19
|
required: [...payloadJsonSchema.required, 'hash'],
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { AddressRegEx } from '@xylabs/hex'
|
|
1
2
|
import { PayloadBuilder } from '@xyo-network/payload-builder'
|
|
2
|
-
import {
|
|
3
|
-
AddressRegEx, payloadJsonSchema, Uint256RegEx,
|
|
4
|
-
} from '@xyo-network/payload-wrapper'
|
|
3
|
+
import { payloadJsonSchema, Uint256RegEx } from '@xyo-network/payload-wrapper'
|
|
5
4
|
import type { SchemaPayload } from '@xyo-network/schema-payload-plugin'
|
|
6
5
|
import { SchemaSchema } from '@xyo-network/schema-payload-plugin'
|
|
7
6
|
import type { Transfer } from '@xyo-network/xl1-protocol'
|
|
@@ -14,12 +13,12 @@ export const TransferPayloadJsonSchema: JSONSchemaType<Transfer> = {
|
|
|
14
13
|
additionalProperties: false,
|
|
15
14
|
properties: {
|
|
16
15
|
...payloadJsonSchema.properties,
|
|
17
|
-
from: { type: 'string', pattern: AddressRegEx },
|
|
16
|
+
from: { type: 'string', pattern: AddressRegEx.source },
|
|
18
17
|
epoch: { type: 'number' },
|
|
19
18
|
transfers: {
|
|
20
19
|
type: 'object',
|
|
21
|
-
propertyNames: { pattern: AddressRegEx },
|
|
22
|
-
patternProperties: { [AddressRegEx]: { type: 'string', pattern: Uint256RegEx } },
|
|
20
|
+
propertyNames: { pattern: AddressRegEx.source },
|
|
21
|
+
patternProperties: { [AddressRegEx.source]: { type: 'string', pattern: Uint256RegEx.source } },
|
|
23
22
|
},
|
|
24
23
|
schema: { type: 'string', pattern: TransferSchema },
|
|
25
24
|
},
|