@nexusmutual/sdk 0.8.2 → 0.8.3-rc2
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/README.md +23 -0
- package/dist/data/products.json +17 -17
- package/dist/data/version.json +3 -0
- package/dist/index.d.mts +329 -76
- package/dist/index.d.ts +329 -76
- package/dist/index.js +147 -193
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +146 -193
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -5
package/README.md
CHANGED
|
@@ -168,3 +168,26 @@ Note: The following product types do not require IPFS content:
|
|
|
168
168
|
- immunefiBugBounty
|
|
169
169
|
|
|
170
170
|
For a complete list of products and product types, see [products.json](https://sdk.nexusmutual.io/data/products.json) and [product-types.json](https://sdk.nexusmutual.io/data/product-types.json).
|
|
171
|
+
|
|
172
|
+
### Validation Errors
|
|
173
|
+
|
|
174
|
+
IPFS content is validated using [Zod schemas](https://www.npmjs.com/package/zod), if validation fails, the error response will contain a stringified array of Zod validation errors in the `error.message` field. These errors provide detailed information about what went wrong during validation.
|
|
175
|
+
|
|
176
|
+
Example error response:
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"result": undefined,
|
|
180
|
+
"error": {
|
|
181
|
+
"message": "[{\"code\":\"too_small\",\"minimum\":1,\"type\":\"array\",\"inclusive\":true,\"exact\":false,\"message\":\"At least one transaction hash is required\",\"path\":[\"incidentTransactionHashes\"]}]"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
Each Zod error object in the array includes:
|
|
188
|
+
- `code`: The type of validation error
|
|
189
|
+
- `message`: A human-readable error message
|
|
190
|
+
- `path`: The path to the invalid field
|
|
191
|
+
- Additional context-specific fields
|
|
192
|
+
|
|
193
|
+
For more information about Zod error handling and validation, see the [Zod Error Handling documentation](https://zod.dev/?id=error-handling).
|
package/dist/data/products.json
CHANGED
|
@@ -2791,7 +2791,7 @@
|
|
|
2791
2791
|
"ETH"
|
|
2792
2792
|
],
|
|
2793
2793
|
"isPrivate": false,
|
|
2794
|
-
"timestamp":
|
|
2794
|
+
"timestamp": 1734557999,
|
|
2795
2795
|
"minPrice": 100
|
|
2796
2796
|
},
|
|
2797
2797
|
{
|
|
@@ -2915,7 +2915,7 @@
|
|
|
2915
2915
|
"cbBTC"
|
|
2916
2916
|
],
|
|
2917
2917
|
"isPrivate": false,
|
|
2918
|
-
"timestamp":
|
|
2918
|
+
"timestamp": 1733753135,
|
|
2919
2919
|
"minPrice": 100
|
|
2920
2920
|
},
|
|
2921
2921
|
{
|
|
@@ -3042,7 +3042,7 @@
|
|
|
3042
3042
|
"cbBTC"
|
|
3043
3043
|
],
|
|
3044
3044
|
"isPrivate": true,
|
|
3045
|
-
"timestamp":
|
|
3045
|
+
"timestamp": 1725537203,
|
|
3046
3046
|
"minPrice": 100
|
|
3047
3047
|
},
|
|
3048
3048
|
{
|
|
@@ -3059,7 +3059,7 @@
|
|
|
3059
3059
|
"USDC"
|
|
3060
3060
|
],
|
|
3061
3061
|
"isPrivate": false,
|
|
3062
|
-
"timestamp":
|
|
3062
|
+
"timestamp": 1734557999,
|
|
3063
3063
|
"minPrice": 100
|
|
3064
3064
|
},
|
|
3065
3065
|
{
|
|
@@ -3501,7 +3501,7 @@
|
|
|
3501
3501
|
"cbBTC"
|
|
3502
3502
|
],
|
|
3503
3503
|
"isPrivate": false,
|
|
3504
|
-
"timestamp":
|
|
3504
|
+
"timestamp": 1734557999,
|
|
3505
3505
|
"minPrice": 100
|
|
3506
3506
|
},
|
|
3507
3507
|
{
|
|
@@ -3855,7 +3855,7 @@
|
|
|
3855
3855
|
"ETH"
|
|
3856
3856
|
],
|
|
3857
3857
|
"isPrivate": false,
|
|
3858
|
-
"timestamp":
|
|
3858
|
+
"timestamp": 1734557999,
|
|
3859
3859
|
"minPrice": 100
|
|
3860
3860
|
},
|
|
3861
3861
|
{
|
|
@@ -4042,7 +4042,7 @@
|
|
|
4042
4042
|
"USDC"
|
|
4043
4043
|
],
|
|
4044
4044
|
"isPrivate": false,
|
|
4045
|
-
"timestamp":
|
|
4045
|
+
"timestamp": 1722950807,
|
|
4046
4046
|
"minPrice": 100
|
|
4047
4047
|
},
|
|
4048
4048
|
{
|
|
@@ -4077,7 +4077,7 @@
|
|
|
4077
4077
|
"cbBTC"
|
|
4078
4078
|
],
|
|
4079
4079
|
"isPrivate": false,
|
|
4080
|
-
"timestamp":
|
|
4080
|
+
"timestamp": 1731583079,
|
|
4081
4081
|
"minPrice": 100
|
|
4082
4082
|
},
|
|
4083
4083
|
{
|
|
@@ -4136,7 +4136,7 @@
|
|
|
4136
4136
|
"cbBTC"
|
|
4137
4137
|
],
|
|
4138
4138
|
"isPrivate": false,
|
|
4139
|
-
"timestamp":
|
|
4139
|
+
"timestamp": 1726227311,
|
|
4140
4140
|
"minPrice": 100
|
|
4141
4141
|
},
|
|
4142
4142
|
{
|
|
@@ -4194,7 +4194,7 @@
|
|
|
4194
4194
|
"cbBTC"
|
|
4195
4195
|
],
|
|
4196
4196
|
"isPrivate": true,
|
|
4197
|
-
"timestamp":
|
|
4197
|
+
"timestamp": 1728564167,
|
|
4198
4198
|
"minPrice": 100
|
|
4199
4199
|
},
|
|
4200
4200
|
{
|
|
@@ -4213,7 +4213,7 @@
|
|
|
4213
4213
|
"cbBTC"
|
|
4214
4214
|
],
|
|
4215
4215
|
"isPrivate": false,
|
|
4216
|
-
"timestamp":
|
|
4216
|
+
"timestamp": 1726758407,
|
|
4217
4217
|
"minPrice": 100
|
|
4218
4218
|
},
|
|
4219
4219
|
{
|
|
@@ -4232,7 +4232,7 @@
|
|
|
4232
4232
|
"cbBTC"
|
|
4233
4233
|
],
|
|
4234
4234
|
"isPrivate": false,
|
|
4235
|
-
"timestamp":
|
|
4235
|
+
"timestamp": 1736430671,
|
|
4236
4236
|
"minPrice": 100
|
|
4237
4237
|
},
|
|
4238
4238
|
{
|
|
@@ -4361,7 +4361,7 @@
|
|
|
4361
4361
|
"USDC"
|
|
4362
4362
|
],
|
|
4363
4363
|
"isPrivate": false,
|
|
4364
|
-
"timestamp":
|
|
4364
|
+
"timestamp": 1726758407,
|
|
4365
4365
|
"minPrice": 100
|
|
4366
4366
|
},
|
|
4367
4367
|
{
|
|
@@ -4378,7 +4378,7 @@
|
|
|
4378
4378
|
"USDC"
|
|
4379
4379
|
],
|
|
4380
4380
|
"isPrivate": false,
|
|
4381
|
-
"timestamp":
|
|
4381
|
+
"timestamp": 1734557999,
|
|
4382
4382
|
"minPrice": 100
|
|
4383
4383
|
},
|
|
4384
4384
|
{
|
|
@@ -4510,7 +4510,7 @@
|
|
|
4510
4510
|
"USDC"
|
|
4511
4511
|
],
|
|
4512
4512
|
"isPrivate": true,
|
|
4513
|
-
"timestamp":
|
|
4513
|
+
"timestamp": 1733753135,
|
|
4514
4514
|
"minPrice": 100
|
|
4515
4515
|
},
|
|
4516
4516
|
{
|
|
@@ -4544,7 +4544,7 @@
|
|
|
4544
4544
|
"USDC"
|
|
4545
4545
|
],
|
|
4546
4546
|
"isPrivate": true,
|
|
4547
|
-
"timestamp":
|
|
4547
|
+
"timestamp": 1733753135,
|
|
4548
4548
|
"minPrice": 100
|
|
4549
4549
|
},
|
|
4550
4550
|
{
|
|
@@ -4563,7 +4563,7 @@
|
|
|
4563
4563
|
"cbBTC"
|
|
4564
4564
|
],
|
|
4565
4565
|
"isPrivate": false,
|
|
4566
|
-
"timestamp":
|
|
4566
|
+
"timestamp": 1733326763,
|
|
4567
4567
|
"minPrice": 100
|
|
4568
4568
|
},
|
|
4569
4569
|
{
|