@nexusmutual/sdk 1.19.0-rc.0 → 1.20.0-rc.0

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 (34) hide show
  1. package/README.md +22 -16
  2. package/dist/data/abis/{Assessment.json → Assessments.json} +370 -416
  3. package/dist/data/abis/{IndividualClaims.json → Claims.json} +325 -264
  4. package/dist/data/abis/Cover.json +447 -110
  5. package/dist/data/abis/CoverBroker.json +79 -34
  6. package/dist/data/abis/CoverProducts.json +55 -0
  7. package/dist/data/abis/Governor.json +803 -0
  8. package/dist/data/abis/LimitOrders.json +0 -7
  9. package/dist/data/abis/NXMaster.json +37 -223
  10. package/dist/data/abis/Pool.json +415 -229
  11. package/dist/data/abis/Ramm.json +97 -67
  12. package/dist/data/abis/{MemberRoles.json → Registry.json} +553 -249
  13. package/dist/data/abis/SafeTracker.json +94 -58
  14. package/dist/data/abis/StakingProducts.json +1 -14
  15. package/dist/data/abis/StakingViewer.json +87 -24
  16. package/dist/data/abis/SwapOperator.json +365 -209
  17. package/dist/data/abis/TokenController.json +77 -303
  18. package/dist/data/abis/VotePower.json +170 -0
  19. package/dist/data/addresses.json +9 -12
  20. package/dist/data/product-types.json +76 -26
  21. package/dist/data/products.json +27 -27
  22. package/dist/data/version.json +1 -1
  23. package/dist/index.d.mts +13851 -13459
  24. package/dist/index.d.ts +13851 -13459
  25. package/dist/index.js +9436 -9167
  26. package/dist/index.js.map +1 -1
  27. package/dist/index.mjs +9435 -9166
  28. package/dist/index.mjs.map +1 -1
  29. package/package.json +4 -3
  30. package/dist/data/abis/AssessmentViewer.json +0 -106
  31. package/dist/data/abis/MCR.json +0 -321
  32. package/dist/data/abis/NexusViewer.json +0 -199
  33. package/dist/data/abis/PriceFeedOracle.json +0 -312
  34. package/dist/data/abis/ProposalCategory.json +0 -653
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 `getIPFSCidFromHexBytes` 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