@nexusmutual/sdk 1.12.0-rc.2 → 1.13.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.
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
@@ -1,170 +1,177 @@
1
1
  [
2
2
  {
3
3
  "id": 0,
4
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
4
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmQz38DSo6DyrHkRj8uvtGFyx842izVvnx8a3qqF99dctG",
5
5
  "name": "Single Protocol Cover",
6
6
  "gracePeriod": 3024000,
7
7
  "claimMethod": 0
8
8
  },
9
9
  {
10
10
  "id": 1,
11
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
11
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYhCNjfrNTMq8eyg8i7LbBpTkMCHfix9Sv1jrPb7dYZKd",
12
12
  "name": "Custody",
13
13
  "gracePeriod": 10368000,
14
14
  "claimMethod": 0
15
15
  },
16
16
  {
17
17
  "id": 2,
18
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
18
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmcPdiLNZmBM8pjQcCzLhH8tjPuhphCVKZeP5P4SBiLx3h",
19
19
  "name": "Yield Token",
20
20
  "gracePeriod": 0,
21
21
  "claimMethod": 1
22
22
  },
23
23
  {
24
24
  "id": 3,
25
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
25
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmUTUfdfuZUjtPAiMZ4YRu77SaiyCov7jrSXTgeGeK8qt3",
26
26
  "name": "Sherlock Excess",
27
27
  "gracePeriod": 3024000,
28
28
  "claimMethod": 0
29
29
  },
30
30
  {
31
31
  "id": 4,
32
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
32
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmPmwtwbyKnXBae1dmYD6jmgnewCeZGPMFGepkWMLWaiwC",
33
33
  "name": "Stakewise ETH Staking",
34
34
  "gracePeriod": 3024000,
35
35
  "claimMethod": 0
36
36
  },
37
37
  {
38
38
  "id": 5,
39
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
39
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmUKhLi5ZahnzSxsMC9YQZbwwAKGhkHcoYqHUVgE31cXLe",
40
40
  "name": "Liquid Collective ETH Staking",
41
41
  "gracePeriod": 3024000,
42
42
  "claimMethod": 0
43
43
  },
44
44
  {
45
45
  "id": 6,
46
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
46
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmWepFbtMYSzJt22ddF1CK9PwbrYgiLk9qJjryDrgpGuus",
47
47
  "name": "ETH Slashing",
48
48
  "gracePeriod": 3024000,
49
49
  "claimMethod": 0
50
50
  },
51
51
  {
52
52
  "id": 7,
53
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
53
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmQfYgbBhyC3gJMvan9gbzUaZtd4Xy4gubEYfgTFKycBDZ",
54
54
  "name": "Sherlock Quota Share",
55
55
  "gracePeriod": 3024000,
56
56
  "claimMethod": 0
57
57
  },
58
58
  {
59
59
  "id": 8,
60
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
60
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmQz38DSo6DyrHkRj8uvtGFyx842izVvnx8a3qqF99dctG",
61
61
  "name": "Native Protocol Cover",
62
62
  "gracePeriod": 3024000,
63
63
  "claimMethod": 0
64
64
  },
65
65
  {
66
66
  "id": 9,
67
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
67
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYvjtM4FoK8woRySpmmcp8zP7Bmc5ucDgQEc4boLzqie8",
68
68
  "name": "The Retail Mutual",
69
69
  "gracePeriod": 36720000,
70
70
  "claimMethod": 0
71
71
  },
72
72
  {
73
73
  "id": 10,
74
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
74
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmWXYjBYjdKoRw6kyUvp5gYKjj2ojPPVxNYKr1gDjMLssY",
75
75
  "name": "UnoRe Quota Share",
76
76
  "gracePeriod": 3024000,
77
77
  "claimMethod": 0
78
78
  },
79
79
  {
80
80
  "id": 11,
81
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
81
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmQz38DSo6DyrHkRj8uvtGFyx842izVvnx8a3qqF99dctG",
82
82
  "name": "Multi Protocol Cover",
83
83
  "gracePeriod": 3024000,
84
84
  "claimMethod": 0
85
85
  },
86
86
  {
87
87
  "id": 12,
88
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
88
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmQx2H9A51SARNc4W8Ta2D2woXv2ebkUGZMC5HZoQW8TUX",
89
89
  "name": "ETH Slashing Umbrella",
90
90
  "gracePeriod": 3024000,
91
91
  "claimMethod": 0
92
92
  },
93
93
  {
94
94
  "id": 13,
95
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
95
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmWRir4JSeSv3oKbHyDRz1xFKXh1d8wgew5Rr4koCMeYYu",
96
96
  "name": "OpenCover Transaction",
97
97
  "gracePeriod": 3024000,
98
98
  "claimMethod": 0
99
99
  },
100
100
  {
101
101
  "id": 14,
102
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
102
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmevgAXtzi7773NaBrzGyW95aKSrt3MBtpQU1SQCPyCbSF",
103
103
  "name": "Fund Portfolio Cover",
104
104
  "gracePeriod": 3024000,
105
105
  "claimMethod": 0
106
106
  },
107
107
  {
108
108
  "id": 15,
109
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
110
- "name": "Sherlock Bug Bounty",
109
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmUtdg2CmNDh1ZkDKE2zwgbc7RF8yWDCCLEwqQ2zt8J7eT",
110
+ "name": "Sherlock Bug Bounty Cover",
111
111
  "gracePeriod": 3024000,
112
112
  "claimMethod": 0
113
113
  },
114
114
  {
115
115
  "id": 16,
116
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
116
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmQLh2wNDD2b2RGg9rNFbyrQwxqTthrTNaTsHenZnRg6u6",
117
117
  "name": "DeFi Pass",
118
118
  "gracePeriod": 3024000,
119
119
  "claimMethod": 0
120
120
  },
121
121
  {
122
122
  "id": 17,
123
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
123
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYgZNrGSAQZCGKEGdgvR132KWkLKtSDXmZVGfoGSKfYMG",
124
124
  "name": "Follow On Cover",
125
125
  "gracePeriod": 8640000,
126
126
  "claimMethod": 0
127
127
  },
128
128
  {
129
129
  "id": 18,
130
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
130
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmRzT2MF4aWQs2UJZBTHU8gFnPsEGQWRQ75zwQP4dh514Y",
131
131
  "name": "Immunefi Bug Bounty Cover",
132
132
  "gracePeriod": 3024000,
133
133
  "claimMethod": 0
134
134
  },
135
135
  {
136
136
  "id": 19,
137
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
137
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYdBBwtdn9Z6j9nX3SkzPjWmvHxjMUbu44sibnQ9QrCHX",
138
138
  "name": "Nexus Mutual Cover",
139
139
  "gracePeriod": 3024000,
140
140
  "claimMethod": 0
141
141
  },
142
142
  {
143
143
  "id": 20,
144
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
145
- "name": "Generalised Fund Portfolio Cover",
146
- "gracePeriod": 3024000,
144
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmWWsaMfuumQw9JEF5YPbgwv7TP5bKYdgjrhYyMo66pXwa",
145
+ "name": "Generalized Fund Portfolio Cover",
146
+ "gracePeriod": 10368000,
147
147
  "claimMethod": 0
148
148
  },
149
149
  {
150
150
  "id": 21,
151
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
151
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmaR79gHuSzU371e7V6EEk1V14ohDm2Hk25FFuRgk9vrfx",
152
152
  "name": "Crypto Cover",
153
153
  "gracePeriod": 10368000,
154
154
  "claimMethod": 0
155
155
  },
156
156
  {
157
157
  "id": 22,
158
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
158
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmUzkWmZhEr9i8eMxPpoz59aZRxZ4uVSbjkD8EnAxrX3VP",
159
159
  "name": "Native Syndicate Cover",
160
160
  "gracePeriod": 3024000,
161
161
  "claimMethod": 0
162
162
  },
163
163
  {
164
164
  "id": 23,
165
- "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
165
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmR8jRGHA3fsLnBK5dtj27evTDQ3Vyic3zJnCh7dVas3pL",
166
166
  "name": "Spearbit Cantina Cover",
167
167
  "gracePeriod": 3024000,
168
168
  "claimMethod": 0
169
+ },
170
+ {
171
+ "id": 24,
172
+ "coverWordingURL": "https://api.nexusmutual.io/ipfs/QmdwP8CfiEdr2CqeZf7GhzbPAT2SECbKr8FZmx1KwvfHS4",
173
+ "name": "Leveraged Liquidation Cover",
174
+ "gracePeriod": 3024000,
175
+ "claimMethod": 0
169
176
  }
170
177
  ]