@xyo-network/xl1-validation 1.16.14 → 1.16.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 +169 -3
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -18,6 +18,12 @@ XYO Layer One SDK Validation
18
18
 
19
19
  ***
20
20
 
21
+ ## Type Aliases
22
+
23
+ - [ValidateTransactionContext](#type-aliases/ValidateTransactionContext)
24
+ - [SignerValidator](#type-aliases/SignerValidator)
25
+ - [SignerMapping](#type-aliases/SignerMapping)
26
+
21
27
  ## Variables
22
28
 
23
29
  - [BoundWitnessSignaturesValidator](#variables/BoundWitnessSignaturesValidator)
@@ -27,11 +33,15 @@ XYO Layer One SDK Validation
27
33
  - [TransactionGasValidator](#variables/TransactionGasValidator)
28
34
  - [TransactionJsonSchemaValidator](#variables/TransactionJsonSchemaValidator)
29
35
  - [TransactionProtocolValidator](#variables/TransactionProtocolValidator)
36
+ - [SelfSignerValidator](#variables/SelfSignerValidator)
30
37
 
31
38
  ## Functions
32
39
 
33
40
  - [BoundWitnessReferencesValidator](#functions/BoundWitnessReferencesValidator)
34
41
  - [validateTransaction](#functions/validateTransaction)
42
+ - [CompletedStepRewardAddressValidatorFactory](#functions/CompletedStepRewardAddressValidatorFactory)
43
+ - [DerivedReceiveAddressValidatorFactory](#functions/DerivedReceiveAddressValidatorFactory)
44
+ - [TransactionTransfersValidatorFactory](#functions/TransactionTransfersValidatorFactory)
35
45
 
36
46
  ### functions
37
47
 
@@ -61,6 +71,76 @@ function BoundWitnessReferencesValidator<T>(allowedSchemas?): HydratedBoundWitne
61
71
 
62
72
  `HydratedBoundWitnessValidationFunction`\<`T`\>
63
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
+
64
144
  ### <a id="validateTransaction"></a>validateTransaction
65
145
 
66
146
  [**@xyo-network/xl1-validation**](#../README)
@@ -70,7 +150,7 @@ function BoundWitnessReferencesValidator<T>(allowedSchemas?): HydratedBoundWitne
70
150
  ```ts
71
151
  function validateTransaction(
72
152
  tx,
73
- chainId?,
153
+ context?,
74
154
  additionalValidators?): Promise<Error[]>;
75
155
  ```
76
156
 
@@ -80,9 +160,9 @@ additionalValidators?): Promise<Error[]>;
80
160
 
81
161
  `SignedHydratedTransactionWithStorageMeta`
82
162
 
83
- ### chainId?
163
+ ### context?
84
164
 
85
- `Chain`
165
+ [`ValidateTransactionContext`](#../type-aliases/ValidateTransactionContext)
86
166
 
87
167
  ### additionalValidators?
88
168
 
@@ -92,6 +172,82 @@ additionalValidators?): Promise<Error[]>;
92
172
 
93
173
  `Promise`\<`Error`[]\>
94
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;
195
+ ```
196
+
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
+
95
251
  ### variables
96
252
 
97
253
  ### <a id="BoundWitnessSignaturesValidator"></a>BoundWitnessSignaturesValidator
@@ -102,6 +258,16 @@ additionalValidators?): Promise<Error[]>;
102
258
 
103
259
  ```ts
104
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;
105
271
  ```
106
272
 
107
273
  ### <a id="TransactionDurationValidator"></a>TransactionDurationValidator
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-validation",
4
- "version": "1.16.14",
4
+ "version": "1.16.15",
5
5
  "description": "XYO Layer One SDK Validation",
6
6
  "homepage": "https://xylabs.com",
7
7
  "bugs": {
@@ -43,8 +43,8 @@
43
43
  "@xyo-network/payload-builder": "~5.1.23",
44
44
  "@xyo-network/payload-model": "~5.1.23",
45
45
  "@xyo-network/xl1-protocol": "~1.13.11",
46
- "@xyo-network/xl1-protocol-sdk": "~1.16.14",
47
- "@xyo-network/xl1-schema": "~1.16.14",
46
+ "@xyo-network/xl1-protocol-sdk": "~1.16.15",
47
+ "@xyo-network/xl1-schema": "~1.16.15",
48
48
  "ajv": "~8.17.1"
49
49
  },
50
50
  "devDependencies": {
@@ -56,7 +56,7 @@
56
56
  "@xyo-network/account-model": "~5.1.23",
57
57
  "@xyo-network/archivist-memory": "~5.1.23",
58
58
  "@xyo-network/archivist-model": "~5.1.23",
59
- "@xyo-network/chain-protocol": "~1.16.14",
59
+ "@xyo-network/chain-protocol": "~1.16.15",
60
60
  "@xyo-network/wallet": "~5.1.23",
61
61
  "eslint": "^9.39.1",
62
62
  "typescript": "~5.9.3",