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

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,8 +57,6 @@ 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
-
62
60
  ### Example
63
61
 
64
62
  ```typescript
@@ -84,17 +82,15 @@ interface NexusSDKConfig {
84
82
  apiUrl?: string;
85
83
  }
86
84
  ```
87
-
88
85
  ```typescript
89
86
  const nexusSDK = new NexusSDK(config: NexusSDKConfig = {}, ipfs?: Ipfs)
90
- ```
87
+ ````
91
88
 
92
89
  ```typescript
93
90
  const quote = new Quote(config: NexusSDKConfig = {}, ipfs?: Ipfs)
94
- ```
91
+ ````
95
92
 
96
93
  ### Params
97
-
98
94
  ```typescript
99
95
  export interface GetQuoteAndBuyCoverInputsParams {
100
96
  /**
@@ -222,22 +218,21 @@ The `ipfsCidOrContent` param must be a valid IPFS Cid or a valid `IPFSContentTyp
222
218
 
223
219
  The following table shows the mapping between product types and their required IPFS content types:
224
220
 
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
- | generalisedFundPortfolio | coverAumCoverAmountPercentage | <pre>{ version: '1.0', aumCoverAmountPercentage: number }</pre> | Percentage value, 0 to 100 |
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 |
238
234
 
239
235
  Note: The following product types do not require IPFS content:
240
-
241
236
  - singleProtocol
242
237
  - custody
243
238
  - yieldToken
@@ -257,7 +252,6 @@ For a complete list of products and product types, see [products.json](https://s
257
252
  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.
258
253
 
259
254
  Example error response:
260
-
261
255
  ```json
262
256
  {
263
257
  "result": undefined,
@@ -267,8 +261,8 @@ Example error response:
267
261
  }
268
262
  ```
269
263
 
270
- Each Zod error object in the array includes:
271
264
 
265
+ Each Zod error object in the array includes:
272
266
  - `code`: The type of validation error
273
267
  - `message`: A human-readable error message
274
268
  - `path`: The path to the invalid field
@@ -61,6 +61,11 @@
61
61
  "name": "NotEverybodyVoted",
62
62
  "type": "error"
63
63
  },
64
+ {
65
+ "inputs": [],
66
+ "name": "OnlyAdvisoryBoard",
67
+ "type": "error"
68
+ },
64
69
  {
65
70
  "inputs": [],
66
71
  "name": "OnlyMember",
@@ -85,6 +85,11 @@
85
85
  "name": "NotCoverOwner",
86
86
  "type": "error"
87
87
  },
88
+ {
89
+ "inputs": [],
90
+ "name": "OnlyAdvisoryBoard",
91
+ "type": "error"
92
+ },
88
93
  {
89
94
  "inputs": [],
90
95
  "name": "OnlyMember",