@nexusmutual/sdk 0.2.32 → 0.3.1
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/dist/data/abis/Cover.json +13 -0
- package/dist/data/abis/CoverBroker.json +338 -0
- package/dist/data/abis/ERC20.json +58 -19
- package/dist/data/abis/MemberRoles.json +19 -0
- package/dist/data/abis/SwapOperator.json +228 -13
- package/dist/data/addresses.json +2 -1
- package/dist/data/products.json +5 -5
- package/dist/index.d.mts +36183 -41
- package/dist/index.d.ts +36183 -41
- package/dist/index.js +391 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +403 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -2
|
@@ -1442,5 +1442,18 @@
|
|
|
1442
1442
|
],
|
|
1443
1443
|
"stateMutability": "view",
|
|
1444
1444
|
"type": "function"
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
"inputs": [
|
|
1448
|
+
{
|
|
1449
|
+
"internalType": "uint256",
|
|
1450
|
+
"name": "coverAsset",
|
|
1451
|
+
"type": "uint256"
|
|
1452
|
+
}
|
|
1453
|
+
],
|
|
1454
|
+
"name": "updateTotalActiveCoverAmount",
|
|
1455
|
+
"outputs": [],
|
|
1456
|
+
"stateMutability": "nonpayable",
|
|
1457
|
+
"type": "function"
|
|
1445
1458
|
}
|
|
1446
1459
|
]
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"internalType": "address",
|
|
6
|
+
"name": "_cover",
|
|
7
|
+
"type": "address"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"internalType": "address",
|
|
11
|
+
"name": "_memberRoles",
|
|
12
|
+
"type": "address"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"internalType": "address",
|
|
16
|
+
"name": "_nxmToken",
|
|
17
|
+
"type": "address"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"internalType": "address",
|
|
21
|
+
"name": "_master",
|
|
22
|
+
"type": "address"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"internalType": "address",
|
|
26
|
+
"name": "_owner",
|
|
27
|
+
"type": "address"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"stateMutability": "nonpayable",
|
|
31
|
+
"type": "constructor"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"inputs": [],
|
|
35
|
+
"name": "InvalidOwnerAddress",
|
|
36
|
+
"type": "error"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"inputs": [],
|
|
40
|
+
"name": "InvalidPayment",
|
|
41
|
+
"type": "error"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"inputs": [],
|
|
45
|
+
"name": "InvalidPaymentAsset",
|
|
46
|
+
"type": "error"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"inputs": [
|
|
50
|
+
{
|
|
51
|
+
"internalType": "address",
|
|
52
|
+
"name": "to",
|
|
53
|
+
"type": "address"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"internalType": "uint256",
|
|
57
|
+
"name": "value",
|
|
58
|
+
"type": "uint256"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"internalType": "address",
|
|
62
|
+
"name": "token",
|
|
63
|
+
"type": "address"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"name": "TransferFailed",
|
|
67
|
+
"type": "error"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"inputs": [
|
|
71
|
+
{
|
|
72
|
+
"internalType": "address",
|
|
73
|
+
"name": "token",
|
|
74
|
+
"type": "address"
|
|
75
|
+
}
|
|
76
|
+
],
|
|
77
|
+
"name": "ZeroBalance",
|
|
78
|
+
"type": "error"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"anonymous": false,
|
|
82
|
+
"inputs": [
|
|
83
|
+
{
|
|
84
|
+
"indexed": true,
|
|
85
|
+
"internalType": "address",
|
|
86
|
+
"name": "previousOwner",
|
|
87
|
+
"type": "address"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"indexed": true,
|
|
91
|
+
"internalType": "address",
|
|
92
|
+
"name": "newOwner",
|
|
93
|
+
"type": "address"
|
|
94
|
+
}
|
|
95
|
+
],
|
|
96
|
+
"name": "OwnershipTransferred",
|
|
97
|
+
"type": "event"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"inputs": [],
|
|
101
|
+
"name": "ETH",
|
|
102
|
+
"outputs": [
|
|
103
|
+
{
|
|
104
|
+
"internalType": "address",
|
|
105
|
+
"name": "",
|
|
106
|
+
"type": "address"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"stateMutability": "view",
|
|
110
|
+
"type": "function"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"inputs": [
|
|
114
|
+
{
|
|
115
|
+
"components": [
|
|
116
|
+
{
|
|
117
|
+
"internalType": "uint256",
|
|
118
|
+
"name": "coverId",
|
|
119
|
+
"type": "uint256"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"internalType": "address",
|
|
123
|
+
"name": "owner",
|
|
124
|
+
"type": "address"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"internalType": "uint24",
|
|
128
|
+
"name": "productId",
|
|
129
|
+
"type": "uint24"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"internalType": "uint8",
|
|
133
|
+
"name": "coverAsset",
|
|
134
|
+
"type": "uint8"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"internalType": "uint96",
|
|
138
|
+
"name": "amount",
|
|
139
|
+
"type": "uint96"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"internalType": "uint32",
|
|
143
|
+
"name": "period",
|
|
144
|
+
"type": "uint32"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"internalType": "uint256",
|
|
148
|
+
"name": "maxPremiumInAsset",
|
|
149
|
+
"type": "uint256"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"internalType": "uint8",
|
|
153
|
+
"name": "paymentAsset",
|
|
154
|
+
"type": "uint8"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"internalType": "uint16",
|
|
158
|
+
"name": "commissionRatio",
|
|
159
|
+
"type": "uint16"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"internalType": "address",
|
|
163
|
+
"name": "commissionDestination",
|
|
164
|
+
"type": "address"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"internalType": "string",
|
|
168
|
+
"name": "ipfsData",
|
|
169
|
+
"type": "string"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"internalType": "struct BuyCoverParams",
|
|
173
|
+
"name": "params",
|
|
174
|
+
"type": "tuple"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"components": [
|
|
178
|
+
{
|
|
179
|
+
"internalType": "uint40",
|
|
180
|
+
"name": "poolId",
|
|
181
|
+
"type": "uint40"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"internalType": "bool",
|
|
185
|
+
"name": "skip",
|
|
186
|
+
"type": "bool"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"internalType": "uint256",
|
|
190
|
+
"name": "coverAmountInAsset",
|
|
191
|
+
"type": "uint256"
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"internalType": "struct PoolAllocationRequest[]",
|
|
195
|
+
"name": "poolAllocationRequests",
|
|
196
|
+
"type": "tuple[]"
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"name": "buyCover",
|
|
200
|
+
"outputs": [
|
|
201
|
+
{
|
|
202
|
+
"internalType": "uint256",
|
|
203
|
+
"name": "coverId",
|
|
204
|
+
"type": "uint256"
|
|
205
|
+
}
|
|
206
|
+
],
|
|
207
|
+
"stateMutability": "payable",
|
|
208
|
+
"type": "function"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"inputs": [],
|
|
212
|
+
"name": "cover",
|
|
213
|
+
"outputs": [
|
|
214
|
+
{
|
|
215
|
+
"internalType": "contract ICover",
|
|
216
|
+
"name": "",
|
|
217
|
+
"type": "address"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
"stateMutability": "view",
|
|
221
|
+
"type": "function"
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
"inputs": [],
|
|
225
|
+
"name": "master",
|
|
226
|
+
"outputs": [
|
|
227
|
+
{
|
|
228
|
+
"internalType": "contract INXMMaster",
|
|
229
|
+
"name": "",
|
|
230
|
+
"type": "address"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"stateMutability": "view",
|
|
234
|
+
"type": "function"
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
"inputs": [
|
|
238
|
+
{
|
|
239
|
+
"internalType": "contract IERC20",
|
|
240
|
+
"name": "erc20",
|
|
241
|
+
"type": "address"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"name": "maxApproveCoverContract",
|
|
245
|
+
"outputs": [],
|
|
246
|
+
"stateMutability": "nonpayable",
|
|
247
|
+
"type": "function"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"inputs": [],
|
|
251
|
+
"name": "memberRoles",
|
|
252
|
+
"outputs": [
|
|
253
|
+
{
|
|
254
|
+
"internalType": "contract IMemberRoles",
|
|
255
|
+
"name": "",
|
|
256
|
+
"type": "address"
|
|
257
|
+
}
|
|
258
|
+
],
|
|
259
|
+
"stateMutability": "view",
|
|
260
|
+
"type": "function"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"inputs": [],
|
|
264
|
+
"name": "nxmToken",
|
|
265
|
+
"outputs": [
|
|
266
|
+
{
|
|
267
|
+
"internalType": "contract INXMToken",
|
|
268
|
+
"name": "",
|
|
269
|
+
"type": "address"
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
"stateMutability": "view",
|
|
273
|
+
"type": "function"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"inputs": [],
|
|
277
|
+
"name": "owner",
|
|
278
|
+
"outputs": [
|
|
279
|
+
{
|
|
280
|
+
"internalType": "address",
|
|
281
|
+
"name": "",
|
|
282
|
+
"type": "address"
|
|
283
|
+
}
|
|
284
|
+
],
|
|
285
|
+
"stateMutability": "view",
|
|
286
|
+
"type": "function"
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"inputs": [],
|
|
290
|
+
"name": "renounceOwnership",
|
|
291
|
+
"outputs": [],
|
|
292
|
+
"stateMutability": "nonpayable",
|
|
293
|
+
"type": "function"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"inputs": [
|
|
297
|
+
{
|
|
298
|
+
"internalType": "address",
|
|
299
|
+
"name": "assetAddress",
|
|
300
|
+
"type": "address"
|
|
301
|
+
}
|
|
302
|
+
],
|
|
303
|
+
"name": "rescueFunds",
|
|
304
|
+
"outputs": [],
|
|
305
|
+
"stateMutability": "nonpayable",
|
|
306
|
+
"type": "function"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
"inputs": [
|
|
310
|
+
{
|
|
311
|
+
"internalType": "address",
|
|
312
|
+
"name": "newAddress",
|
|
313
|
+
"type": "address"
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
"name": "switchMembership",
|
|
317
|
+
"outputs": [],
|
|
318
|
+
"stateMutability": "nonpayable",
|
|
319
|
+
"type": "function"
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"inputs": [
|
|
323
|
+
{
|
|
324
|
+
"internalType": "address",
|
|
325
|
+
"name": "newOwner",
|
|
326
|
+
"type": "address"
|
|
327
|
+
}
|
|
328
|
+
],
|
|
329
|
+
"name": "transferOwnership",
|
|
330
|
+
"outputs": [],
|
|
331
|
+
"stateMutability": "nonpayable",
|
|
332
|
+
"type": "function"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"stateMutability": "payable",
|
|
336
|
+
"type": "receive"
|
|
337
|
+
}
|
|
338
|
+
]
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"internalType": "string",
|
|
6
|
+
"name": "name_",
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"internalType": "string",
|
|
11
|
+
"name": "symbol_",
|
|
12
|
+
"type": "string"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
"stateMutability": "nonpayable",
|
|
16
|
+
"type": "constructor"
|
|
17
|
+
},
|
|
2
18
|
{
|
|
3
19
|
"anonymous": false,
|
|
4
20
|
"inputs": [
|
|
@@ -50,7 +66,6 @@
|
|
|
50
66
|
"type": "event"
|
|
51
67
|
},
|
|
52
68
|
{
|
|
53
|
-
"constant": true,
|
|
54
69
|
"inputs": [
|
|
55
70
|
{
|
|
56
71
|
"internalType": "address",
|
|
@@ -71,12 +86,10 @@
|
|
|
71
86
|
"type": "uint256"
|
|
72
87
|
}
|
|
73
88
|
],
|
|
74
|
-
"payable": false,
|
|
75
89
|
"stateMutability": "view",
|
|
76
90
|
"type": "function"
|
|
77
91
|
},
|
|
78
92
|
{
|
|
79
|
-
"constant": false,
|
|
80
93
|
"inputs": [
|
|
81
94
|
{
|
|
82
95
|
"internalType": "address",
|
|
@@ -97,12 +110,10 @@
|
|
|
97
110
|
"type": "bool"
|
|
98
111
|
}
|
|
99
112
|
],
|
|
100
|
-
"payable": false,
|
|
101
113
|
"stateMutability": "nonpayable",
|
|
102
114
|
"type": "function"
|
|
103
115
|
},
|
|
104
116
|
{
|
|
105
|
-
"constant": true,
|
|
106
117
|
"inputs": [
|
|
107
118
|
{
|
|
108
119
|
"internalType": "address",
|
|
@@ -118,12 +129,23 @@
|
|
|
118
129
|
"type": "uint256"
|
|
119
130
|
}
|
|
120
131
|
],
|
|
121
|
-
"payable": false,
|
|
122
132
|
"stateMutability": "view",
|
|
123
133
|
"type": "function"
|
|
124
134
|
},
|
|
125
135
|
{
|
|
126
|
-
"
|
|
136
|
+
"inputs": [],
|
|
137
|
+
"name": "decimals",
|
|
138
|
+
"outputs": [
|
|
139
|
+
{
|
|
140
|
+
"internalType": "uint8",
|
|
141
|
+
"name": "",
|
|
142
|
+
"type": "uint8"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"stateMutability": "view",
|
|
146
|
+
"type": "function"
|
|
147
|
+
},
|
|
148
|
+
{
|
|
127
149
|
"inputs": [
|
|
128
150
|
{
|
|
129
151
|
"internalType": "address",
|
|
@@ -144,12 +166,10 @@
|
|
|
144
166
|
"type": "bool"
|
|
145
167
|
}
|
|
146
168
|
],
|
|
147
|
-
"payable": false,
|
|
148
169
|
"stateMutability": "nonpayable",
|
|
149
170
|
"type": "function"
|
|
150
171
|
},
|
|
151
172
|
{
|
|
152
|
-
"constant": false,
|
|
153
173
|
"inputs": [
|
|
154
174
|
{
|
|
155
175
|
"internalType": "address",
|
|
@@ -170,12 +190,36 @@
|
|
|
170
190
|
"type": "bool"
|
|
171
191
|
}
|
|
172
192
|
],
|
|
173
|
-
"payable": false,
|
|
174
193
|
"stateMutability": "nonpayable",
|
|
175
194
|
"type": "function"
|
|
176
195
|
},
|
|
177
196
|
{
|
|
178
|
-
"
|
|
197
|
+
"inputs": [],
|
|
198
|
+
"name": "name",
|
|
199
|
+
"outputs": [
|
|
200
|
+
{
|
|
201
|
+
"internalType": "string",
|
|
202
|
+
"name": "",
|
|
203
|
+
"type": "string"
|
|
204
|
+
}
|
|
205
|
+
],
|
|
206
|
+
"stateMutability": "view",
|
|
207
|
+
"type": "function"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"inputs": [],
|
|
211
|
+
"name": "symbol",
|
|
212
|
+
"outputs": [
|
|
213
|
+
{
|
|
214
|
+
"internalType": "string",
|
|
215
|
+
"name": "",
|
|
216
|
+
"type": "string"
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"stateMutability": "view",
|
|
220
|
+
"type": "function"
|
|
221
|
+
},
|
|
222
|
+
{
|
|
179
223
|
"inputs": [],
|
|
180
224
|
"name": "totalSupply",
|
|
181
225
|
"outputs": [
|
|
@@ -185,16 +229,14 @@
|
|
|
185
229
|
"type": "uint256"
|
|
186
230
|
}
|
|
187
231
|
],
|
|
188
|
-
"payable": false,
|
|
189
232
|
"stateMutability": "view",
|
|
190
233
|
"type": "function"
|
|
191
234
|
},
|
|
192
235
|
{
|
|
193
|
-
"constant": false,
|
|
194
236
|
"inputs": [
|
|
195
237
|
{
|
|
196
238
|
"internalType": "address",
|
|
197
|
-
"name": "
|
|
239
|
+
"name": "to",
|
|
198
240
|
"type": "address"
|
|
199
241
|
},
|
|
200
242
|
{
|
|
@@ -211,21 +253,19 @@
|
|
|
211
253
|
"type": "bool"
|
|
212
254
|
}
|
|
213
255
|
],
|
|
214
|
-
"payable": false,
|
|
215
256
|
"stateMutability": "nonpayable",
|
|
216
257
|
"type": "function"
|
|
217
258
|
},
|
|
218
259
|
{
|
|
219
|
-
"constant": false,
|
|
220
260
|
"inputs": [
|
|
221
261
|
{
|
|
222
262
|
"internalType": "address",
|
|
223
|
-
"name": "
|
|
263
|
+
"name": "from",
|
|
224
264
|
"type": "address"
|
|
225
265
|
},
|
|
226
266
|
{
|
|
227
267
|
"internalType": "address",
|
|
228
|
-
"name": "
|
|
268
|
+
"name": "to",
|
|
229
269
|
"type": "address"
|
|
230
270
|
},
|
|
231
271
|
{
|
|
@@ -242,7 +282,6 @@
|
|
|
242
282
|
"type": "bool"
|
|
243
283
|
}
|
|
244
284
|
],
|
|
245
|
-
"payable": false,
|
|
246
285
|
"stateMutability": "nonpayable",
|
|
247
286
|
"type": "function"
|
|
248
287
|
}
|
|
@@ -54,6 +54,25 @@
|
|
|
54
54
|
"name": "MemberRole",
|
|
55
55
|
"type": "event"
|
|
56
56
|
},
|
|
57
|
+
{
|
|
58
|
+
"anonymous": false,
|
|
59
|
+
"inputs": [
|
|
60
|
+
{
|
|
61
|
+
"indexed": true,
|
|
62
|
+
"internalType": "address",
|
|
63
|
+
"name": "member",
|
|
64
|
+
"type": "address"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"indexed": false,
|
|
68
|
+
"internalType": "uint256",
|
|
69
|
+
"name": "timestamp",
|
|
70
|
+
"type": "uint256"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"name": "MembershipWithdrawn",
|
|
74
|
+
"type": "event"
|
|
75
|
+
},
|
|
57
76
|
{
|
|
58
77
|
"anonymous": false,
|
|
59
78
|
"inputs": [
|