@nexusmutual/sdk 1.12.0-rc.0 → 1.12.0-rc.2
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 +22 -16
- package/dist/data/product-types.json +26 -26
- package/dist/data/products.json +85 -120
- package/dist/data/version.json +1 -1
- package/dist/index.d.mts +198 -154
- package/dist/index.d.ts +198 -154
- package/dist/index.js +8886 -8867
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8886 -8867
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -3
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
|
|
222
|
-
|
|
223
|
-
| ethSlashing
|
|
224
|
-
| liquidCollectiveEthStaking | coverValidators
|
|
225
|
-
| stakewiseEthStaking
|
|
226
|
-
| sherlockQuotaShare
|
|
227
|
-
| unoReQuotaShare
|
|
228
|
-
| deFiPass
|
|
229
|
-
| nexusMutual
|
|
230
|
-
| nexusMutual
|
|
231
|
-
| followOn
|
|
232
|
-
| fundPortfolio
|
|
233
|
-
| generalisedFundPortfolio
|
|
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 |
|
|
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
|
|
@@ -1,168 +1,168 @@
|
|
|
1
1
|
[
|
|
2
2
|
{
|
|
3
3
|
"id": 0,
|
|
4
|
-
"coverWordingURL": "https://api.nexusmutual.io/ipfs/
|
|
4
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
11
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
18
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
25
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
32
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
39
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
46
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
53
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
60
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
67
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
74
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
81
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
88
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
95
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
102
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
109
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
110
110
|
"name": "Sherlock Bug Bounty",
|
|
111
111
|
"gracePeriod": 3024000,
|
|
112
112
|
"claimMethod": 0
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"id": 16,
|
|
116
|
-
"coverWordingURL": "https://api.nexusmutual.io/ipfs/
|
|
116
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
123
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
130
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
137
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
145
|
-
"name": "
|
|
146
|
-
"gracePeriod":
|
|
144
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
145
|
+
"name": "Generalised Fund Portfolio Cover",
|
|
146
|
+
"gracePeriod": 3024000,
|
|
147
147
|
"claimMethod": 0
|
|
148
148
|
},
|
|
149
149
|
{
|
|
150
150
|
"id": 21,
|
|
151
|
-
"coverWordingURL": "https://api.nexusmutual.io/ipfs/
|
|
151
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
158
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
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/
|
|
165
|
+
"coverWordingURL": "https://api.nexusmutual.io/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG",
|
|
166
166
|
"name": "Spearbit Cantina Cover",
|
|
167
167
|
"gracePeriod": 3024000,
|
|
168
168
|
"claimMethod": 0
|