@nexusmutual/sdk 1.12.0-rc.5 → 1.12.0-rc.6

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 CHANGED
@@ -57,6 +57,8 @@ Use the `uploadIPFSContent` method in `Ipfs` class to upload the content to IPFS
57
57
 
58
58
  The function returns the IPFS hash of the uploaded content.
59
59
 
60
+ For claims submission and assessment IPFS data, use the `get32BytesIPFSHash` method in `Ipfs` class to convert the IPFS hash you get from `uploadIPFSContent` to 32 bytes format. Use the `getIPFSHashFromBytes32` method to convert back to standard IPFS hash.
61
+
60
62
  ### Example
61
63
 
62
64
  ```typescript
@@ -82,15 +84,17 @@ interface NexusSDKConfig {
82
84
  apiUrl?: string;
83
85
  }
84
86
  ```
87
+
85
88
  ```typescript
86
89
  const nexusSDK = new NexusSDK(config: NexusSDKConfig = {}, ipfs?: Ipfs)
87
- ````
90
+ ```
88
91
 
89
92
  ```typescript
90
93
  const quote = new Quote(config: NexusSDKConfig = {}, ipfs?: Ipfs)
91
- ````
94
+ ```
92
95
 
93
96
  ### Params
97
+
94
98
  ```typescript
95
99
  export interface GetQuoteAndBuyCoverInputsParams {
96
100
  /**
@@ -218,21 +222,22 @@ The `ipfsCidOrContent` param must be a valid IPFS Cid or a valid `IPFSContentTyp
218
222
 
219
223
  The following table shows the mapping between product types and their required IPFS content types:
220
224
 
221
- | Product Type | Content Type | Content Structure | Description |
222
- |-------------|--------------|-------------------|-------------|
223
- | ethSlashing | coverValidators | <pre>{ version: '1.0', validators: string[] }</pre> | Array of validator addresses |
224
- | liquidCollectiveEthStaking | coverValidators | <pre>{ version: '1.0', validators: string[] }</pre> | Array of validator addresses |
225
- | stakewiseEthStaking | coverValidators | <pre>{ version: '1.0', validators: string[] }</pre> | Array of validator addresses |
226
- | sherlockQuotaShare | coverQuotaShare | <pre>{ version: '1.0', quotaShare: number }</pre> | Percentage value, 0 to 100 |
227
- | unoReQuotaShare | coverQuotaShare | <pre>{ version: '1.0', quotaShare: number }</pre> | Percentage value, 0 to 100 |
228
- | deFiPass | coverWalletAddress | <pre>{ version: '1.0', walletAddress: string }</pre> | Single wallet address |
229
- | nexusMutual | coverWalletAddresses | <pre>{ version: '1.0', walletAddresses: string }</pre> | Single wallet address |
230
- | nexusMutual | coverWalletAddresses | <pre>{ version: '2.0', walletAddresses: string[] }</pre> | Array of wallet addresses |
231
- | followOn | coverFreeText | <pre>{ version: '1.0', freeText: string }</pre> | Free text description |
232
- | fundPortfolio | coverAumCoverAmountPercentage | <pre>{ version: '1.0', aumCoverAmountPercentage: number }</pre> | Percentage value, 0 to 100 |
233
- | generalisedFundPortfolio | coverAumCoverAmountPercentage | <pre>{ version: '1.0', aumCoverAmountPercentage: number }</pre> | Percentage value, 0 to 100 |
225
+ | Product Type | Content Type | Content Structure | Description |
226
+ | -------------------------- | ----------------------------- | --------------------------------------------------------------- | ---------------------------- |
227
+ | ethSlashing | coverValidators | <pre>{ version: '1.0', validators: string[] }</pre> | Array of validator addresses |
228
+ | liquidCollectiveEthStaking | coverValidators | <pre>{ version: '1.0', validators: string[] }</pre> | Array of validator addresses |
229
+ | stakewiseEthStaking | coverValidators | <pre>{ version: '1.0', validators: string[] }</pre> | Array of validator addresses |
230
+ | sherlockQuotaShare | coverQuotaShare | <pre>{ version: '1.0', quotaShare: number }</pre> | Percentage value, 0 to 100 |
231
+ | unoReQuotaShare | coverQuotaShare | <pre>{ version: '1.0', quotaShare: number }</pre> | Percentage value, 0 to 100 |
232
+ | deFiPass | coverWalletAddress | <pre>{ version: '1.0', walletAddress: string }</pre> | Single wallet address |
233
+ | nexusMutual | coverWalletAddresses | <pre>{ version: '1.0', walletAddresses: string }</pre> | Single wallet address |
234
+ | nexusMutual | coverWalletAddresses | <pre>{ version: '2.0', walletAddresses: string[] }</pre> | Array of wallet addresses |
235
+ | followOn | coverFreeText | <pre>{ version: '1.0', freeText: string }</pre> | Free text description |
236
+ | fundPortfolio | coverAumCoverAmountPercentage | <pre>{ version: '1.0', aumCoverAmountPercentage: number }</pre> | Percentage value, 0 to 100 |
237
+ | generalizedFundPortfolio | coverAumCoverAmountPercentage | <pre>{ version: '1.0', aumCoverAmountPercentage: number }</pre> | Percentage value, 0 to 100 |
234
238
 
235
239
  Note: The following product types do not require IPFS content:
240
+
236
241
  - singleProtocol
237
242
  - custody
238
243
  - yieldToken
@@ -252,6 +257,7 @@ For a complete list of products and product types, see [products.json](https://s
252
257
  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.
253
258
 
254
259
  Example error response:
260
+
255
261
  ```json
256
262
  {
257
263
  "result": undefined,
@@ -261,8 +267,8 @@ Example error response:
261
267
  }
262
268
  ```
263
269
 
264
-
265
270
  Each Zod error object in the array includes:
271
+
266
272
  - `code`: The type of validation error
267
273
  - `message`: A human-readable error message
268
274
  - `path`: The path to the invalid field
@@ -859,7 +859,7 @@
859
859
  "cbBTC"
860
860
  ],
861
861
  "isPrivate": false,
862
- "timestamp": 1738243583,
862
+ "timestamp": 1726758407,
863
863
  "minPrice": 60
864
864
  },
865
865
  {
@@ -2429,7 +2429,7 @@
2429
2429
  "cbBTC"
2430
2430
  ],
2431
2431
  "isPrivate": false,
2432
- "timestamp": 1753877075,
2432
+ "timestamp": 1742481059,
2433
2433
  "minPrice": 100
2434
2434
  },
2435
2435
  {
@@ -2792,7 +2792,7 @@
2792
2792
  "ETH"
2793
2793
  ],
2794
2794
  "isPrivate": false,
2795
- "timestamp": 1731583079,
2795
+ "timestamp": 1758283931,
2796
2796
  "minPrice": 100
2797
2797
  },
2798
2798
  {
@@ -3042,7 +3042,7 @@
3042
3042
  "cbBTC"
3043
3043
  ],
3044
3044
  "isPrivate": true,
3045
- "timestamp": 1752834371,
3045
+ "timestamp": 1736430671,
3046
3046
  "minPrice": 100
3047
3047
  },
3048
3048
  {
@@ -3337,7 +3337,7 @@
3337
3337
  "cbBTC"
3338
3338
  ],
3339
3339
  "isPrivate": false,
3340
- "timestamp": 1726227311,
3340
+ "timestamp": 1734557999,
3341
3341
  "minPrice": 100
3342
3342
  },
3343
3343
  {
@@ -3500,7 +3500,7 @@
3500
3500
  "cbBTC"
3501
3501
  ],
3502
3502
  "isPrivate": false,
3503
- "timestamp": 1758283931,
3503
+ "timestamp": 1749739367,
3504
3504
  "minPrice": 100
3505
3505
  },
3506
3506
  {
@@ -3519,7 +3519,7 @@
3519
3519
  "cbBTC"
3520
3520
  ],
3521
3521
  "isPrivate": false,
3522
- "timestamp": 1758283931,
3522
+ "timestamp": 1734557999,
3523
3523
  "minPrice": 100
3524
3524
  },
3525
3525
  {
@@ -3604,7 +3604,7 @@
3604
3604
  "ETH"
3605
3605
  ],
3606
3606
  "isPrivate": true,
3607
- "timestamp": 1758811223,
3607
+ "timestamp": 1753877075,
3608
3608
  "minPrice": 100
3609
3609
  },
3610
3610
  {
@@ -3656,7 +3656,7 @@
3656
3656
  "USDC"
3657
3657
  ],
3658
3658
  "isPrivate": false,
3659
- "timestamp": 1758283931,
3659
+ "timestamp": 1734557999,
3660
3660
  "minPrice": 100
3661
3661
  },
3662
3662
  {
@@ -3853,7 +3853,7 @@
3853
3853
  "ETH"
3854
3854
  ],
3855
3855
  "isPrivate": false,
3856
- "timestamp": 1734557999,
3856
+ "timestamp": 1758283931,
3857
3857
  "minPrice": 100
3858
3858
  },
3859
3859
  {
@@ -3892,7 +3892,7 @@
3892
3892
  "cbBTC"
3893
3893
  ],
3894
3894
  "isPrivate": false,
3895
- "timestamp": 1741267523,
3895
+ "timestamp": 1751550659,
3896
3896
  "minPrice": 100
3897
3897
  },
3898
3898
  {
@@ -4075,7 +4075,7 @@
4075
4075
  "cbBTC"
4076
4076
  ],
4077
4077
  "isPrivate": false,
4078
- "timestamp": 1758283931,
4078
+ "timestamp": 1734557999,
4079
4079
  "minPrice": 100
4080
4080
  },
4081
4081
  {
@@ -4095,7 +4095,7 @@
4095
4095
  "cbBTC"
4096
4096
  ],
4097
4097
  "isPrivate": false,
4098
- "timestamp": 1724341943,
4098
+ "timestamp": 1734557999,
4099
4099
  "minPrice": 100
4100
4100
  },
4101
4101
  {
@@ -4134,7 +4134,7 @@
4134
4134
  "cbBTC"
4135
4135
  ],
4136
4136
  "isPrivate": false,
4137
- "timestamp": 1758283931,
4137
+ "timestamp": 1734557999,
4138
4138
  "minPrice": 100
4139
4139
  },
4140
4140
  {
@@ -4191,7 +4191,7 @@
4191
4191
  "cbBTC"
4192
4192
  ],
4193
4193
  "isPrivate": true,
4194
- "timestamp": 1740672395,
4194
+ "timestamp": 1728564167,
4195
4195
  "minPrice": 275
4196
4196
  },
4197
4197
  {
@@ -4210,7 +4210,7 @@
4210
4210
  "cbBTC"
4211
4211
  ],
4212
4212
  "isPrivate": false,
4213
- "timestamp": 1736430671,
4213
+ "timestamp": 1741267523,
4214
4214
  "minPrice": 100
4215
4215
  },
4216
4216
  {
@@ -4229,7 +4229,7 @@
4229
4229
  "cbBTC"
4230
4230
  ],
4231
4231
  "isPrivate": false,
4232
- "timestamp": 1757486507,
4232
+ "timestamp": 1759930091,
4233
4233
  "minPrice": 100
4234
4234
  },
4235
4235
  {
@@ -4358,7 +4358,7 @@
4358
4358
  "USDC"
4359
4359
  ],
4360
4360
  "isPrivate": false,
4361
- "timestamp": 1726758407,
4361
+ "timestamp": 1734557999,
4362
4362
  "minPrice": 100
4363
4363
  },
4364
4364
  {
@@ -4375,7 +4375,7 @@
4375
4375
  "USDC"
4376
4376
  ],
4377
4377
  "isPrivate": false,
4378
- "timestamp": 1726758407,
4378
+ "timestamp": 1734557999,
4379
4379
  "minPrice": 100
4380
4380
  },
4381
4381
  {
@@ -4390,7 +4390,7 @@
4390
4390
  "USDC"
4391
4391
  ],
4392
4392
  "isPrivate": false,
4393
- "timestamp": 1726758407,
4393
+ "timestamp": 1738243583,
4394
4394
  "minPrice": 10
4395
4395
  },
4396
4396
  {
@@ -4439,7 +4439,7 @@
4439
4439
  "USDC"
4440
4440
  ],
4441
4441
  "isPrivate": false,
4442
- "timestamp": 1738243583,
4442
+ "timestamp": 1731583079,
4443
4443
  "minPrice": 25
4444
4444
  },
4445
4445
  {
@@ -4456,7 +4456,7 @@
4456
4456
  "cbBTC"
4457
4457
  ],
4458
4458
  "isPrivate": false,
4459
- "timestamp": 1758283931,
4459
+ "timestamp": 1734557999,
4460
4460
  "minPrice": 100
4461
4461
  },
4462
4462
  {
@@ -4509,7 +4509,7 @@
4509
4509
  "cbBTC"
4510
4510
  ],
4511
4511
  "isPrivate": false,
4512
- "timestamp": 1740672395,
4512
+ "timestamp": 1739537399,
4513
4513
  "minPrice": 49
4514
4514
  },
4515
4515
  {
@@ -4528,7 +4528,7 @@
4528
4528
  "cbBTC"
4529
4529
  ],
4530
4530
  "isPrivate": false,
4531
- "timestamp": 1740672395,
4531
+ "timestamp": 1739537399,
4532
4532
  "minPrice": 225
4533
4533
  },
4534
4534
  {
@@ -4547,7 +4547,7 @@
4547
4547
  "cbBTC"
4548
4548
  ],
4549
4549
  "isPrivate": false,
4550
- "timestamp": 1740672395,
4550
+ "timestamp": 1733326763,
4551
4551
  "minPrice": 300
4552
4552
  },
4553
4553
  {
@@ -4566,7 +4566,7 @@
4566
4566
  "cbBTC"
4567
4567
  ],
4568
4568
  "isPrivate": false,
4569
- "timestamp": 1734557999,
4569
+ "timestamp": 1758283931,
4570
4570
  "minPrice": 100
4571
4571
  },
4572
4572
  {
@@ -4602,7 +4602,7 @@
4602
4602
  "cbBTC"
4603
4603
  ],
4604
4604
  "isPrivate": true,
4605
- "timestamp": 1747837547,
4605
+ "timestamp": 1758283931,
4606
4606
  "minPrice": 100
4607
4607
  },
4608
4608
  {
@@ -4621,7 +4621,7 @@
4621
4621
  "cbBTC"
4622
4622
  ],
4623
4623
  "isPrivate": false,
4624
- "timestamp": 1736430671,
4624
+ "timestamp": 1758283931,
4625
4625
  "minPrice": 100
4626
4626
  },
4627
4627
  {
@@ -4780,7 +4780,7 @@
4780
4780
  "cbBTC"
4781
4781
  ],
4782
4782
  "isPrivate": true,
4783
- "timestamp": 1739969915,
4783
+ "timestamp": 1740672395,
4784
4784
  "minPrice": 505
4785
4785
  },
4786
4786
  {
@@ -4797,7 +4797,7 @@
4797
4797
  "USDC"
4798
4798
  ],
4799
4799
  "isPrivate": false,
4800
- "timestamp": 1744902863,
4800
+ "timestamp": 1757074607,
4801
4801
  "minPrice": 50
4802
4802
  },
4803
4803
  {
@@ -4882,7 +4882,7 @@
4882
4882
  "ETH"
4883
4883
  ],
4884
4884
  "isPrivate": false,
4885
- "timestamp": 1757074607,
4885
+ "timestamp": 1747055891,
4886
4886
  "minPrice": 100
4887
4887
  },
4888
4888
  {
@@ -4916,7 +4916,7 @@
4916
4916
  "cbBTC"
4917
4917
  ],
4918
4918
  "isPrivate": false,
4919
- "timestamp": 1747055891,
4919
+ "timestamp": 1739447471,
4920
4920
  "minPrice": 75
4921
4921
  },
4922
4922
  {
@@ -4935,7 +4935,7 @@
4935
4935
  "cbBTC"
4936
4936
  ],
4937
4937
  "isPrivate": false,
4938
- "timestamp": 1758283931,
4938
+ "timestamp": 1739447471,
4939
4939
  "minPrice": 100
4940
4940
  },
4941
4941
  {
@@ -4954,7 +4954,7 @@
4954
4954
  "cbBTC"
4955
4955
  ],
4956
4956
  "isPrivate": false,
4957
- "timestamp": 1739537399,
4957
+ "timestamp": 1739447471,
4958
4958
  "minPrice": 50
4959
4959
  },
4960
4960
  {
@@ -5011,7 +5011,7 @@
5011
5011
  "cbBTC"
5012
5012
  ],
5013
5013
  "isPrivate": true,
5014
- "timestamp": 1745946671,
5014
+ "timestamp": 1739969915,
5015
5015
  "minPrice": 225
5016
5016
  },
5017
5017
  {
@@ -5248,7 +5248,7 @@
5248
5248
  "USDC"
5249
5249
  ],
5250
5250
  "isPrivate": false,
5251
- "timestamp": 1742481059,
5251
+ "timestamp": 1747055891,
5252
5252
  "minPrice": 75
5253
5253
  },
5254
5254
  {
@@ -5282,7 +5282,7 @@
5282
5282
  "USDC"
5283
5283
  ],
5284
5284
  "isPrivate": false,
5285
- "timestamp": 1758283931,
5285
+ "timestamp": 1747055891,
5286
5286
  "minPrice": 100
5287
5287
  },
5288
5288
  {
@@ -5301,7 +5301,7 @@
5301
5301
  "cbBTC"
5302
5302
  ],
5303
5303
  "isPrivate": false,
5304
- "timestamp": 1749739367,
5304
+ "timestamp": 1747055891,
5305
5305
  "minPrice": 100
5306
5306
  },
5307
5307
  {
@@ -5356,7 +5356,7 @@
5356
5356
  "USDC"
5357
5357
  ],
5358
5358
  "isPrivate": true,
5359
- "timestamp": 1743670835,
5359
+ "timestamp": 1743603467,
5360
5360
  "minPrice": 1586
5361
5361
  },
5362
5362
  {
@@ -5463,7 +5463,7 @@
5463
5463
  "cbBTC"
5464
5464
  ],
5465
5465
  "isPrivate": false,
5466
- "timestamp": 1753877075,
5466
+ "timestamp": 1747055891,
5467
5467
  "minPrice": 300
5468
5468
  },
5469
5469
  {
@@ -5584,7 +5584,7 @@
5584
5584
  "cbBTC"
5585
5585
  ],
5586
5586
  "isPrivate": false,
5587
- "timestamp": 1751550659,
5587
+ "timestamp": 1748970347,
5588
5588
  "minPrice": 100
5589
5589
  },
5590
5590
  {
@@ -5620,7 +5620,7 @@
5620
5620
  "cbBTC"
5621
5621
  ],
5622
5622
  "isPrivate": false,
5623
- "timestamp": 1750162583,
5623
+ "timestamp": 1751550659,
5624
5624
  "minPrice": 100
5625
5625
  },
5626
5626
  {
@@ -5673,7 +5673,7 @@
5673
5673
  "USDC"
5674
5674
  ],
5675
5675
  "isPrivate": false,
5676
- "timestamp": 1757074607,
5676
+ "timestamp": 1752150803,
5677
5677
  "minPrice": 50
5678
5678
  },
5679
5679
  {
@@ -5690,7 +5690,7 @@
5690
5690
  "USDC"
5691
5691
  ],
5692
5692
  "isPrivate": false,
5693
- "timestamp": 1757074607,
5693
+ "timestamp": 1754552351,
5694
5694
  "minPrice": 50
5695
5695
  },
5696
5696
  {
@@ -5760,7 +5760,7 @@
5760
5760
  "cbBTC"
5761
5761
  ],
5762
5762
  "isPrivate": false,
5763
- "timestamp": 1752834371,
5763
+ "timestamp": 1758283931,
5764
5764
  "minPrice": 100
5765
5765
  },
5766
5766
  {
@@ -5811,7 +5811,7 @@
5811
5811
  "USDC"
5812
5812
  ],
5813
5813
  "isPrivate": false,
5814
- "timestamp": 1753877075,
5814
+ "timestamp": 1757074607,
5815
5815
  "minPrice": 50
5816
5816
  },
5817
5817
  {
@@ -5862,7 +5862,7 @@
5862
5862
  "USDC"
5863
5863
  ],
5864
5864
  "isPrivate": false,
5865
- "timestamp": 1753877075,
5865
+ "timestamp": 1758283931,
5866
5866
  "minPrice": 100
5867
5867
  },
5868
5868
  {
@@ -6099,7 +6099,7 @@
6099
6099
  "cbBTC"
6100
6100
  ],
6101
6101
  "isPrivate": true,
6102
- "timestamp": 1757486507,
6102
+ "timestamp": 1759764875,
6103
6103
  "minPrice": 100
6104
6104
  },
6105
6105
  {
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "1.12.0-rc.5"
2
+ "version": "1.12.0-rc.6"
3
3
  }