@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 +16 -22
- package/dist/data/abis/Assessments.json +5 -0
- package/dist/data/abis/Claims.json +5 -0
- package/dist/data/abis/Cover.json +440 -108
- package/dist/data/abis/CoverBroker.json +5 -0
- package/dist/data/abis/Governor.json +5 -19
- package/dist/data/abis/Pool.json +5 -0
- package/dist/data/abis/Ramm.json +5 -0
- package/dist/data/abis/SafeTracker.json +5 -0
- package/dist/data/abis/StakingViewer.json +5 -0
- package/dist/data/abis/SwapOperator.json +5 -0
- package/dist/data/abis/TokenController.json +5 -0
- package/dist/data/addresses.json +6 -6
- package/dist/data/product-types.json +10 -3
- package/dist/data/products.json +420 -96
- package/dist/data/version.json +1 -1
- package/dist/index.d.mts +1332 -533
- package/dist/index.d.ts +1332 -533
- package/dist/index.js +19321 -18965
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19320 -18965
- package/dist/index.mjs.map +1 -1
- package/dist/logos/aster.svg +1 -0
- package/dist/logos/avantis.png +0 -0
- package/dist/logos/cap-pendle-market.svg +1 -0
- package/dist/logos/cap.svg +1 -0
- package/dist/logos/dialectic.svg +1 -0
- package/dist/logos/lagoon-ETH.svg +1 -0
- package/dist/logos/lagoon-USDC.svg +1 -0
- package/dist/logos/lighter.jpg +0 -0
- package/dist/logos/makina.jpg +0 -0
- package/dist/logos/projectx.svg +1 -0
- package/dist/logos/rsETH.jpg +0 -0
- package/dist/logos/usdai.svg +1 -0
- package/dist/logos/weETH.svg +1 -0
- package/dist/logos/wstETH.png +0 -0
- package/package.json +4 -3
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
|
|
226
|
-
|
|
227
|
-
| ethSlashing
|
|
228
|
-
| liquidCollectiveEthStaking | coverValidators
|
|
229
|
-
| stakewiseEthStaking
|
|
230
|
-
| sherlockQuotaShare
|
|
231
|
-
| unoReQuotaShare
|
|
232
|
-
| deFiPass
|
|
233
|
-
| nexusMutual
|
|
234
|
-
| nexusMutual
|
|
235
|
-
| followOn
|
|
236
|
-
| fundPortfolio
|
|
237
|
-
| generalisedFundPortfolio
|
|
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
|