@xyo-network/xl1-validation 1.26.14 → 1.26.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 (2) hide show
  1. package/README.md +9 -346
  2. package/package.json +62 -22
package/README.md CHANGED
@@ -1,361 +1,24 @@
1
1
  # @xyo-network/xl1-validation
2
2
 
3
- [![logo][]](https://xyo.network)
3
+ [![npm][npm-badge]][npm-link]
4
+ [![license][license-badge]][license-link]
4
5
 
5
- [![npm-badge][]][npm-link]
6
- [![npm-downloads-badge][]][npm-link]
7
- [![jsdelivr-badge][]][jsdelivr-link]
8
- [![npm-license-badge][]](LICENSE)
9
- [![socket-badge][]][socket-link]
6
+ > XYO Layer One SDK Validation
10
7
 
11
- XYO Layer One SDK Validation
8
+ ## Install
12
9
 
13
-
14
-
15
- ## Reference
16
-
17
- **@xyo-network/xl1-validation**
18
-
19
- ***
20
-
21
- ## Type Aliases
22
-
23
- - [ValidateTransactionContext](#type-aliases/ValidateTransactionContext)
24
- - [SignerValidator](#type-aliases/SignerValidator)
25
- - [SignerMapping](#type-aliases/SignerMapping)
26
-
27
- ## Variables
28
-
29
- - [BoundWitnessSignaturesValidator](#variables/BoundWitnessSignaturesValidator)
30
- - [TransactionDurationValidator](#variables/TransactionDurationValidator)
31
- - [TransactionElevationValidator](#variables/TransactionElevationValidator)
32
- - [TransactionFromValidator](#variables/TransactionFromValidator)
33
- - [TransactionGasValidator](#variables/TransactionGasValidator)
34
- - [TransactionJsonSchemaValidator](#variables/TransactionJsonSchemaValidator)
35
- - [TransactionProtocolValidator](#variables/TransactionProtocolValidator)
36
- - [SelfSignerValidator](#variables/SelfSignerValidator)
37
-
38
- ## Functions
39
-
40
- - [BoundWitnessReferencesValidator](#functions/BoundWitnessReferencesValidator)
41
- - [validateTransaction](#functions/validateTransaction)
42
- - [CompletedStepRewardAddressValidatorFactory](#functions/CompletedStepRewardAddressValidatorFactory)
43
- - [DerivedReceiveAddressValidatorFactory](#functions/DerivedReceiveAddressValidatorFactory)
44
- - [TransactionTransfersValidatorFactory](#functions/TransactionTransfersValidatorFactory)
45
-
46
- ### functions
47
-
48
- ### <a id="BoundWitnessReferencesValidator"></a>BoundWitnessReferencesValidator
49
-
50
- [**@xyo-network/xl1-validation**](#../README)
51
-
52
- ***
53
-
54
- ```ts
55
- function BoundWitnessReferencesValidator<T>(allowedSchemas?): HydratedBoundWitnessValidationFunction<T>;
56
- ```
57
-
58
- ## Type Parameters
59
-
60
- ### T
61
-
62
- `T` *extends* `BoundWitness` = `BoundWitness`
63
-
64
- ## Parameters
65
-
66
- ### allowedSchemas?
67
-
68
- `string`[]
69
-
70
- ## Returns
71
-
72
- `HydratedBoundWitnessValidationFunction`\<`T`\>
73
-
74
- ### <a id="CompletedStepRewardAddressValidatorFactory"></a>CompletedStepRewardAddressValidatorFactory
75
-
76
- [**@xyo-network/xl1-validation**](#../README)
77
-
78
- ***
79
-
80
- ```ts
81
- function CompletedStepRewardAddressValidatorFactory(allowedSigners): SignerValidator;
82
- ```
83
-
84
- ## Parameters
85
-
86
- ### allowedSigners
87
-
88
- `Address`[]
89
-
90
- ## Returns
91
-
92
- [`SignerValidator`](#../type-aliases/SignerValidator)
93
-
94
- ### <a id="DerivedReceiveAddressValidatorFactory"></a>DerivedReceiveAddressValidatorFactory
95
-
96
- [**@xyo-network/xl1-validation**](#../README)
97
-
98
- ***
99
-
100
- ```ts
101
- function DerivedReceiveAddressValidatorFactory(allowedSigners, allowedScope): SignerValidator;
102
- ```
103
-
104
- ## Parameters
105
-
106
- ### allowedSigners
107
-
108
- `Address`[]
109
-
110
- ### allowedScope
111
-
112
- `string`
113
-
114
- ## Returns
115
-
116
- [`SignerValidator`](#../type-aliases/SignerValidator)
117
-
118
- ### <a id="TransactionTransfersValidatorFactory"></a>TransactionTransfersValidatorFactory
119
-
120
- [**@xyo-network/xl1-validation**](#../README)
121
-
122
- ***
123
-
124
- ```ts
125
- function TransactionTransfersValidatorFactory(signerValidators): HydratedTransactionValidationFunction<TransactionBoundWitness, {
126
- step?: {
127
- };
128
- }>;
129
- ```
130
-
131
- ## Parameters
132
-
133
- ### signerValidators
134
-
135
- [`SignerValidator`](#../type-aliases/SignerValidator)[] = `...`
136
-
137
- ## Returns
138
-
139
- `HydratedTransactionValidationFunction`\<`TransactionBoundWitness`, \{
140
- `step?`: \{
141
- \};
142
- \}\>
143
-
144
- ### <a id="validateTransaction"></a>validateTransaction
145
-
146
- [**@xyo-network/xl1-validation**](#../README)
147
-
148
- ***
149
-
150
- ```ts
151
- function validateTransaction(
152
- tx,
153
- context?,
154
- additionalValidators?): Promise<Error[]>;
155
- ```
156
-
157
- ## Parameters
158
-
159
- ### tx
160
-
161
- `SignedHydratedTransactionWithStorageMeta`
162
-
163
- ### context?
164
-
165
- [`ValidateTransactionContext`](#../type-aliases/ValidateTransactionContext)
166
-
167
- ### additionalValidators?
168
-
169
- `HydratedTransactionValidationFunction`[] = `[]`
170
-
171
- ## Returns
172
-
173
- `Promise`\<`Error`[]\>
174
-
175
- ### type-aliases
176
-
177
- ### <a id="SignerMapping"></a>SignerMapping
178
-
179
- [**@xyo-network/xl1-validation**](#../README)
180
-
181
- ***
182
-
183
- ```ts
184
- type SignerMapping = Map<Address, Address[]>;
185
- ```
186
-
187
- ### <a id="SignerValidator"></a>SignerValidator
188
-
189
- [**@xyo-network/xl1-validation**](#../README)
190
-
191
- ***
192
-
193
- ```ts
194
- type SignerValidator = (signer, signee, context?) => boolean;
10
+ ```sh
11
+ {{pm}} add {{name}}
195
12
  ```
196
13
 
197
- ## Parameters
198
-
199
- ### signer
200
-
201
- `Address`
202
-
203
- ### signee
204
-
205
- `Address`
206
-
207
- ### context?
208
-
209
- ### address?
210
-
211
- `Address`
212
-
213
- ### scope?
214
-
215
- `string`
216
-
217
- ### step?
218
-
219
- `StepIdentity`
220
-
221
- ## Returns
222
-
223
- `boolean`
224
-
225
- ### <a id="ValidateTransactionContext"></a>ValidateTransactionContext
226
-
227
- [**@xyo-network/xl1-validation**](#../README)
228
-
229
- ***
230
-
231
- ```ts
232
- type ValidateTransactionContext = object;
233
- ```
234
-
235
- ## Properties
236
-
237
- ### chainId?
238
-
239
- ```ts
240
- optional chainId: ChainId;
241
- ```
242
-
243
- ***
244
-
245
- ### step?
246
-
247
- ```ts
248
- optional step: StepIdentity;
249
- ```
250
-
251
- ### variables
252
-
253
- ### <a id="BoundWitnessSignaturesValidator"></a>BoundWitnessSignaturesValidator
254
-
255
- [**@xyo-network/xl1-validation**](#../README)
256
-
257
- ***
258
-
259
- ```ts
260
- const BoundWitnessSignaturesValidator: BoundWitnessValidationFunction;
261
- ```
262
-
263
- ### <a id="SelfSignerValidator"></a>SelfSignerValidator
264
-
265
- [**@xyo-network/xl1-validation**](#../README)
266
-
267
- ***
268
-
269
- ```ts
270
- const SelfSignerValidator: SignerValidator;
271
- ```
272
-
273
- ### <a id="TransactionDurationValidator"></a>TransactionDurationValidator
274
-
275
- [**@xyo-network/xl1-validation**](#../README)
276
-
277
- ***
278
-
279
- ```ts
280
- const TransactionDurationValidator: HydratedTransactionValidationFunction<TransactionBoundWitness>;
281
- ```
282
-
283
- ### <a id="TransactionElevationValidator"></a>TransactionElevationValidator
284
-
285
- [**@xyo-network/xl1-validation**](#../README)
286
-
287
- ***
288
-
289
- ```ts
290
- const TransactionElevationValidator: HydratedTransactionValidationFunction<TransactionBoundWitness>;
291
- ```
292
-
293
- ### <a id="TransactionFromValidator"></a>TransactionFromValidator
294
-
295
- [**@xyo-network/xl1-validation**](#../README)
296
-
297
- ***
298
-
299
- ```ts
300
- const TransactionFromValidator: HydratedTransactionValidationFunction<TransactionBoundWitness>;
301
- ```
302
-
303
- ### <a id="TransactionGasValidator"></a>TransactionGasValidator
304
-
305
- [**@xyo-network/xl1-validation**](#../README)
306
-
307
- ***
308
-
309
- ```ts
310
- const TransactionGasValidator: HydratedTransactionValidationFunction<TransactionBoundWitness>;
311
- ```
312
-
313
- ### <a id="TransactionJsonSchemaValidator"></a>TransactionJsonSchemaValidator
314
-
315
- [**@xyo-network/xl1-validation**](#../README)
316
-
317
- ***
318
-
319
- ```ts
320
- const TransactionJsonSchemaValidator: HydratedTransactionValidationFunction<TransactionBoundWitness>;
321
- ```
322
-
323
- ### <a id="TransactionProtocolValidator"></a>TransactionProtocolValidator
324
-
325
- [**@xyo-network/xl1-validation**](#../README)
326
-
327
- ***
328
-
329
- ```ts
330
- const TransactionProtocolValidator: HydratedTransactionValidationFunction<TransactionBoundWitness>;
331
- ```
332
-
333
-
334
- ## Maintainers
335
-
336
- - [Arie Trouw](https://github.com/arietrouw) ([arietrouw.com](https://arietrouw.com))
337
- - [Matt Jones](https://github.com/jonesmac)
338
- - [Joel Carter](https://github.com/JoelBCarter)
339
- - [Jordan Trouw](https://github.com/jordantrouw)
340
14
 
341
15
  ## License
342
16
 
343
- > See the [LICENSE](LICENSE) file for license details
17
+ See the [LICENSE](LICENSE) file for license rights and limitations (LGPL-3.0-only).
344
18
 
345
- ## Credits
346
19
 
347
- [Made with 🔥 and ❄️ by XYO](https://xyo.network)
348
-
349
- [logo]: https://cdn.xy.company/img/brand/XYO_full_colored.png
350
20
 
351
21
  [npm-badge]: https://img.shields.io/npm/v/@xyo-network/xl1-validation.svg
352
22
  [npm-link]: https://www.npmjs.com/package/@xyo-network/xl1-validation
353
-
354
- [npm-downloads-badge]: https://img.shields.io/npm/dw/@xyo-network/xl1-validation
355
- [npm-license-badge]: https://img.shields.io/npm/l/@xyo-network/xl1-validation
356
-
357
- [jsdelivr-badge]: https://data.jsdelivr.com/v1/package/npm/@xyo-network/xl1-validation/badge
358
- [jsdelivr-link]: https://www.jsdelivr.com/package/npm/@xyo-network/xl1-validation
359
-
360
- [socket-badge]: https://socket.dev/api/badge/npm/package/@xyo-network/xl1-validation
361
- [socket-link]: https://socket.dev/npm/package/@xyo-network/xl1-validation
23
+ [license-badge]: https://img.shields.io/npm/l/@xyo-network/xl1-validation.svg
24
+ [license-link]: https://github.com/xylabs/sdk-js/blob/main/LICENSE
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/xl1-validation",
3
- "version": "1.26.14",
3
+ "version": "1.26.15",
4
4
  "description": "XYO Layer One SDK Validation",
5
5
  "homepage": "https://xylabs.com",
6
6
  "bugs": {
@@ -22,11 +22,11 @@
22
22
  "exports": {
23
23
  ".": {
24
24
  "types": "./dist/neutral/index.d.ts",
25
+ "import": "./dist/neutral/index.mjs",
25
26
  "default": "./dist/neutral/index.mjs"
26
27
  },
27
28
  "./package.json": "./package.json"
28
29
  },
29
- "module": "./dist/neutral/index.mjs",
30
30
  "source": "./src/index.ts",
31
31
  "types": "./dist/neutral/index.d.ts",
32
32
  "files": [
@@ -37,34 +37,75 @@
37
37
  "README.md"
38
38
  ],
39
39
  "dependencies": {
40
- "@xyo-network/xl1-protocol-lib": "~1.26.14",
41
- "@xyo-network/xl1-protocol-sdk": "~1.26.14",
42
- "@xyo-network/xl1-schema": "~1.26.14"
40
+ "@xyo-network/xl1-schema": "~1.26.15",
41
+ "@xyo-network/xl1-protocol-lib": "~1.26.15",
42
+ "@xyo-network/xl1-protocol-sdk": "~1.26.15"
43
43
  },
44
44
  "devDependencies": {
45
- "@metamask/providers": "^22.1.1",
46
45
  "@opentelemetry/api": "^1.9.1",
47
- "@types/node": "^25.5.0",
48
- "@xylabs/geo": "^5.0.93",
49
- "@xylabs/sdk-js": "^5.0.93",
50
- "@xylabs/ts-scripts-common": "~7.6.18",
51
- "@xylabs/ts-scripts-pnpm": "~7.6.18",
52
- "@xylabs/tsconfig": "~7.6.18",
53
- "@xyo-network/sdk-js": "^5.3.25",
54
- "acorn": "^8.16.0",
46
+ "@types/node": "^25.5.2",
47
+ "@xylabs/sdk-js": "^5.0.95",
48
+ "@xylabs/ts-scripts-common": "~7.8.7",
49
+ "@xylabs/ts-scripts-pnpm": "~7.8.7",
50
+ "@xylabs/tsconfig": "~7.8.7",
51
+ "@xyo-network/account": "~5.3.30",
52
+ "@xyo-network/account-model": "~5.3.30",
53
+ "@xyo-network/api-models": "~5.3.30",
54
+ "@xyo-network/archivist-abstract": "~5.3.30",
55
+ "@xyo-network/archivist-generic": "~5.3.30",
56
+ "@xyo-network/archivist-memory": "~5.3.30",
57
+ "@xyo-network/archivist-model": "~5.3.30",
58
+ "@xyo-network/archivist-view": "~5.3.30",
59
+ "@xyo-network/archivist-wrapper": "~5.3",
60
+ "@xyo-network/boundwitness-builder": "~5.3.30",
61
+ "@xyo-network/boundwitness-validator": "~5.3.30",
62
+ "@xyo-network/bridge-abstract": "~5.3.30",
63
+ "@xyo-network/bridge-model": "~5.3.30",
64
+ "@xyo-network/config-payload-plugin": "~5.3.30",
65
+ "@xyo-network/data": "~5.3.30",
66
+ "@xyo-network/diviner-abstract": "~5.3",
67
+ "@xyo-network/diviner-boundwitness-memory": "~5.3.30",
68
+ "@xyo-network/diviner-identity": "~5.3.30",
69
+ "@xyo-network/diviner-model": "~5.3.30",
70
+ "@xyo-network/diviner-payload-generic": "~5.3.30",
71
+ "@xyo-network/diviner-payload-model": "~5.3.30",
72
+ "@xyo-network/diviner-wrapper": "~5.3",
73
+ "@xyo-network/dns": "~5.3.30",
74
+ "@xyo-network/domain-payload-plugin": "~5.3.30",
75
+ "@xyo-network/elliptic": "~5.3.30",
76
+ "@xyo-network/hash": "~5.3.30",
77
+ "@xyo-network/huri": "~5.3.30",
78
+ "@xyo-network/manifest-model": "~5.3.30",
79
+ "@xyo-network/module-abstract": "~5.3.30",
80
+ "@xyo-network/module-model": "~5.3.30",
81
+ "@xyo-network/module-resolver": "~5.3.30",
82
+ "@xyo-network/module-wrapper": "~5.3",
83
+ "@xyo-network/network": "~5.3.30",
84
+ "@xyo-network/node-abstract": "~5.3.30",
85
+ "@xyo-network/node-memory": "~5.3.30",
86
+ "@xyo-network/node-model": "~5.3.30",
87
+ "@xyo-network/node-view": "~5.3.30",
88
+ "@xyo-network/node-wrapper": "~5.3",
89
+ "@xyo-network/payload-builder": "~5.3.30",
90
+ "@xyo-network/payload-model": "~5.3.30",
91
+ "@xyo-network/payload-validator": "~5.3.30",
92
+ "@xyo-network/previous-hash-store-model": "~5.3.30",
93
+ "@xyo-network/sdk-js": "^5.3.30",
94
+ "@xyo-network/sentinel-abstract": "~5.3.30",
95
+ "@xyo-network/sentinel-memory": "~5.3.30",
96
+ "@xyo-network/sentinel-model": "~5.3.30",
97
+ "@xyo-network/wallet-model": "~5.3.30",
98
+ "@xyo-network/wasm": "~5.3.30",
99
+ "@xyo-network/witness-adhoc": "~5.3.30",
100
+ "@xyo-network/witness-model": "~5.3.30",
55
101
  "ajv": "^8.18.0",
56
102
  "axios": "^1.14.0",
57
103
  "esbuild": "^0.28.0",
58
104
  "ethers": "^6.16.0",
59
- "firebase": "^12.11.0",
60
- "lru-cache": "^11.2.7",
61
- "mapbox-gl": "^3.21.0",
62
- "mongodb": "^7.1.1",
63
- "tslib": "^2.8.1",
105
+ "pako": "~2.1.0",
64
106
  "typescript": "~5.9.3",
65
- "vite": "^8.0.3",
107
+ "vite": "^8.0.5",
66
108
  "vitest": "~4.1.2",
67
- "webextension-polyfill": "^0.12.0",
68
109
  "zod": "~4.3.6"
69
110
  },
70
111
  "peerDependencies": {
@@ -74,7 +115,6 @@
74
115
  "ajv": "^8",
75
116
  "axios": "^1",
76
117
  "ethers": "^6",
77
- "mongodb": "^6 || ^7",
78
118
  "zod": "^4"
79
119
  },
80
120
  "engines": {