@nexusmutual/sdk 0.1.10 → 0.2.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/dist/data/abis/LegacyGateway.json +5 -0
- package/dist/data/abis/LegacyPooledStaking.json +5 -0
- package/dist/data/abis/MCR.json +63 -56
- package/dist/data/abis/Pool.json +27 -257
- package/dist/data/abis/Ramm.json +1291 -0
- package/dist/data/abis/TokenController.json +0 -7
- package/dist/data/abis/wNXM.json +501 -0
- package/dist/data/addresses.json +6 -3
- package/dist/index.d.mts +28 -3
- package/dist/index.d.ts +28 -3
- package/dist/index.js +79 -18
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +72 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -4
|
@@ -0,0 +1,501 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"inputs": [
|
|
4
|
+
{
|
|
5
|
+
"internalType": "contract INXMToken",
|
|
6
|
+
"name": "_nxm",
|
|
7
|
+
"type": "address"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"stateMutability": "nonpayable",
|
|
11
|
+
"type": "constructor"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"anonymous": false,
|
|
15
|
+
"inputs": [
|
|
16
|
+
{
|
|
17
|
+
"indexed": true,
|
|
18
|
+
"internalType": "address",
|
|
19
|
+
"name": "owner",
|
|
20
|
+
"type": "address"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"indexed": true,
|
|
24
|
+
"internalType": "address",
|
|
25
|
+
"name": "spender",
|
|
26
|
+
"type": "address"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"indexed": false,
|
|
30
|
+
"internalType": "uint256",
|
|
31
|
+
"name": "value",
|
|
32
|
+
"type": "uint256"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"name": "Approval",
|
|
36
|
+
"type": "event"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"anonymous": false,
|
|
40
|
+
"inputs": [
|
|
41
|
+
{
|
|
42
|
+
"indexed": true,
|
|
43
|
+
"internalType": "address",
|
|
44
|
+
"name": "from",
|
|
45
|
+
"type": "address"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"indexed": true,
|
|
49
|
+
"internalType": "address",
|
|
50
|
+
"name": "to",
|
|
51
|
+
"type": "address"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"indexed": false,
|
|
55
|
+
"internalType": "uint256",
|
|
56
|
+
"name": "value",
|
|
57
|
+
"type": "uint256"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"name": "Transfer",
|
|
61
|
+
"type": "event"
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"inputs": [],
|
|
65
|
+
"name": "DOMAIN_SEPARATOR",
|
|
66
|
+
"outputs": [
|
|
67
|
+
{
|
|
68
|
+
"internalType": "bytes32",
|
|
69
|
+
"name": "",
|
|
70
|
+
"type": "bytes32"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"stateMutability": "view",
|
|
74
|
+
"type": "function"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"inputs": [],
|
|
78
|
+
"name": "NXM",
|
|
79
|
+
"outputs": [
|
|
80
|
+
{
|
|
81
|
+
"internalType": "contract INXMToken",
|
|
82
|
+
"name": "",
|
|
83
|
+
"type": "address"
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"stateMutability": "view",
|
|
87
|
+
"type": "function"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"inputs": [
|
|
91
|
+
{
|
|
92
|
+
"internalType": "address",
|
|
93
|
+
"name": "owner",
|
|
94
|
+
"type": "address"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"internalType": "address",
|
|
98
|
+
"name": "spender",
|
|
99
|
+
"type": "address"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"name": "allowance",
|
|
103
|
+
"outputs": [
|
|
104
|
+
{
|
|
105
|
+
"internalType": "uint256",
|
|
106
|
+
"name": "",
|
|
107
|
+
"type": "uint256"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"stateMutability": "view",
|
|
111
|
+
"type": "function"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"inputs": [
|
|
115
|
+
{
|
|
116
|
+
"internalType": "address",
|
|
117
|
+
"name": "spender",
|
|
118
|
+
"type": "address"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
"internalType": "uint256",
|
|
122
|
+
"name": "amount",
|
|
123
|
+
"type": "uint256"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"name": "approve",
|
|
127
|
+
"outputs": [
|
|
128
|
+
{
|
|
129
|
+
"internalType": "bool",
|
|
130
|
+
"name": "",
|
|
131
|
+
"type": "bool"
|
|
132
|
+
}
|
|
133
|
+
],
|
|
134
|
+
"stateMutability": "nonpayable",
|
|
135
|
+
"type": "function"
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
"inputs": [
|
|
139
|
+
{
|
|
140
|
+
"internalType": "address",
|
|
141
|
+
"name": "account",
|
|
142
|
+
"type": "address"
|
|
143
|
+
}
|
|
144
|
+
],
|
|
145
|
+
"name": "balanceOf",
|
|
146
|
+
"outputs": [
|
|
147
|
+
{
|
|
148
|
+
"internalType": "uint256",
|
|
149
|
+
"name": "",
|
|
150
|
+
"type": "uint256"
|
|
151
|
+
}
|
|
152
|
+
],
|
|
153
|
+
"stateMutability": "view",
|
|
154
|
+
"type": "function"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"inputs": [
|
|
158
|
+
{
|
|
159
|
+
"internalType": "address",
|
|
160
|
+
"name": "_owner",
|
|
161
|
+
"type": "address"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"internalType": "address",
|
|
165
|
+
"name": "_recipient",
|
|
166
|
+
"type": "address"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"internalType": "uint256",
|
|
170
|
+
"name": "_amount",
|
|
171
|
+
"type": "uint256"
|
|
172
|
+
}
|
|
173
|
+
],
|
|
174
|
+
"name": "canUnwrap",
|
|
175
|
+
"outputs": [
|
|
176
|
+
{
|
|
177
|
+
"internalType": "bool",
|
|
178
|
+
"name": "success",
|
|
179
|
+
"type": "bool"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"internalType": "string",
|
|
183
|
+
"name": "reason",
|
|
184
|
+
"type": "string"
|
|
185
|
+
}
|
|
186
|
+
],
|
|
187
|
+
"stateMutability": "view",
|
|
188
|
+
"type": "function"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"inputs": [
|
|
192
|
+
{
|
|
193
|
+
"internalType": "address",
|
|
194
|
+
"name": "_owner",
|
|
195
|
+
"type": "address"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"internalType": "uint256",
|
|
199
|
+
"name": "_amount",
|
|
200
|
+
"type": "uint256"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"name": "canWrap",
|
|
204
|
+
"outputs": [
|
|
205
|
+
{
|
|
206
|
+
"internalType": "bool",
|
|
207
|
+
"name": "success",
|
|
208
|
+
"type": "bool"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"internalType": "string",
|
|
212
|
+
"name": "reason",
|
|
213
|
+
"type": "string"
|
|
214
|
+
}
|
|
215
|
+
],
|
|
216
|
+
"stateMutability": "view",
|
|
217
|
+
"type": "function"
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"inputs": [
|
|
221
|
+
{
|
|
222
|
+
"internalType": "contract ERC20",
|
|
223
|
+
"name": "_token",
|
|
224
|
+
"type": "address"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"internalType": "address payable",
|
|
228
|
+
"name": "_to",
|
|
229
|
+
"type": "address"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"internalType": "uint256",
|
|
233
|
+
"name": "_balance",
|
|
234
|
+
"type": "uint256"
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"name": "claimTokens",
|
|
238
|
+
"outputs": [],
|
|
239
|
+
"stateMutability": "nonpayable",
|
|
240
|
+
"type": "function"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"inputs": [],
|
|
244
|
+
"name": "decimals",
|
|
245
|
+
"outputs": [
|
|
246
|
+
{
|
|
247
|
+
"internalType": "uint8",
|
|
248
|
+
"name": "",
|
|
249
|
+
"type": "uint8"
|
|
250
|
+
}
|
|
251
|
+
],
|
|
252
|
+
"stateMutability": "view",
|
|
253
|
+
"type": "function"
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"inputs": [
|
|
257
|
+
{
|
|
258
|
+
"internalType": "address",
|
|
259
|
+
"name": "spender",
|
|
260
|
+
"type": "address"
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"internalType": "uint256",
|
|
264
|
+
"name": "subtractedValue",
|
|
265
|
+
"type": "uint256"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
"name": "decreaseAllowance",
|
|
269
|
+
"outputs": [
|
|
270
|
+
{
|
|
271
|
+
"internalType": "bool",
|
|
272
|
+
"name": "",
|
|
273
|
+
"type": "bool"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"stateMutability": "nonpayable",
|
|
277
|
+
"type": "function"
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"inputs": [
|
|
281
|
+
{
|
|
282
|
+
"internalType": "address",
|
|
283
|
+
"name": "spender",
|
|
284
|
+
"type": "address"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"internalType": "uint256",
|
|
288
|
+
"name": "addedValue",
|
|
289
|
+
"type": "uint256"
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
"name": "increaseAllowance",
|
|
293
|
+
"outputs": [
|
|
294
|
+
{
|
|
295
|
+
"internalType": "bool",
|
|
296
|
+
"name": "",
|
|
297
|
+
"type": "bool"
|
|
298
|
+
}
|
|
299
|
+
],
|
|
300
|
+
"stateMutability": "nonpayable",
|
|
301
|
+
"type": "function"
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"inputs": [],
|
|
305
|
+
"name": "name",
|
|
306
|
+
"outputs": [
|
|
307
|
+
{
|
|
308
|
+
"internalType": "string",
|
|
309
|
+
"name": "",
|
|
310
|
+
"type": "string"
|
|
311
|
+
}
|
|
312
|
+
],
|
|
313
|
+
"stateMutability": "view",
|
|
314
|
+
"type": "function"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"inputs": [
|
|
318
|
+
{
|
|
319
|
+
"internalType": "address",
|
|
320
|
+
"name": "owner",
|
|
321
|
+
"type": "address"
|
|
322
|
+
}
|
|
323
|
+
],
|
|
324
|
+
"name": "nonces",
|
|
325
|
+
"outputs": [
|
|
326
|
+
{
|
|
327
|
+
"internalType": "uint256",
|
|
328
|
+
"name": "",
|
|
329
|
+
"type": "uint256"
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"stateMutability": "view",
|
|
333
|
+
"type": "function"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"inputs": [
|
|
337
|
+
{
|
|
338
|
+
"internalType": "address",
|
|
339
|
+
"name": "owner",
|
|
340
|
+
"type": "address"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"internalType": "address",
|
|
344
|
+
"name": "spender",
|
|
345
|
+
"type": "address"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"internalType": "uint256",
|
|
349
|
+
"name": "value",
|
|
350
|
+
"type": "uint256"
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
"internalType": "uint256",
|
|
354
|
+
"name": "deadline",
|
|
355
|
+
"type": "uint256"
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"internalType": "uint8",
|
|
359
|
+
"name": "v",
|
|
360
|
+
"type": "uint8"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"internalType": "bytes32",
|
|
364
|
+
"name": "r",
|
|
365
|
+
"type": "bytes32"
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"internalType": "bytes32",
|
|
369
|
+
"name": "s",
|
|
370
|
+
"type": "bytes32"
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
"name": "permit",
|
|
374
|
+
"outputs": [],
|
|
375
|
+
"stateMutability": "nonpayable",
|
|
376
|
+
"type": "function"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"inputs": [],
|
|
380
|
+
"name": "symbol",
|
|
381
|
+
"outputs": [
|
|
382
|
+
{
|
|
383
|
+
"internalType": "string",
|
|
384
|
+
"name": "",
|
|
385
|
+
"type": "string"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
"stateMutability": "view",
|
|
389
|
+
"type": "function"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"inputs": [],
|
|
393
|
+
"name": "totalSupply",
|
|
394
|
+
"outputs": [
|
|
395
|
+
{
|
|
396
|
+
"internalType": "uint256",
|
|
397
|
+
"name": "",
|
|
398
|
+
"type": "uint256"
|
|
399
|
+
}
|
|
400
|
+
],
|
|
401
|
+
"stateMutability": "view",
|
|
402
|
+
"type": "function"
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
"inputs": [
|
|
406
|
+
{
|
|
407
|
+
"internalType": "address",
|
|
408
|
+
"name": "to",
|
|
409
|
+
"type": "address"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"internalType": "uint256",
|
|
413
|
+
"name": "amount",
|
|
414
|
+
"type": "uint256"
|
|
415
|
+
}
|
|
416
|
+
],
|
|
417
|
+
"name": "transfer",
|
|
418
|
+
"outputs": [
|
|
419
|
+
{
|
|
420
|
+
"internalType": "bool",
|
|
421
|
+
"name": "",
|
|
422
|
+
"type": "bool"
|
|
423
|
+
}
|
|
424
|
+
],
|
|
425
|
+
"stateMutability": "nonpayable",
|
|
426
|
+
"type": "function"
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"inputs": [
|
|
430
|
+
{
|
|
431
|
+
"internalType": "address",
|
|
432
|
+
"name": "from",
|
|
433
|
+
"type": "address"
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"internalType": "address",
|
|
437
|
+
"name": "to",
|
|
438
|
+
"type": "address"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"internalType": "uint256",
|
|
442
|
+
"name": "amount",
|
|
443
|
+
"type": "uint256"
|
|
444
|
+
}
|
|
445
|
+
],
|
|
446
|
+
"name": "transferFrom",
|
|
447
|
+
"outputs": [
|
|
448
|
+
{
|
|
449
|
+
"internalType": "bool",
|
|
450
|
+
"name": "",
|
|
451
|
+
"type": "bool"
|
|
452
|
+
}
|
|
453
|
+
],
|
|
454
|
+
"stateMutability": "nonpayable",
|
|
455
|
+
"type": "function"
|
|
456
|
+
},
|
|
457
|
+
{
|
|
458
|
+
"inputs": [
|
|
459
|
+
{
|
|
460
|
+
"internalType": "uint256",
|
|
461
|
+
"name": "_amount",
|
|
462
|
+
"type": "uint256"
|
|
463
|
+
}
|
|
464
|
+
],
|
|
465
|
+
"name": "unwrap",
|
|
466
|
+
"outputs": [],
|
|
467
|
+
"stateMutability": "nonpayable",
|
|
468
|
+
"type": "function"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"inputs": [
|
|
472
|
+
{
|
|
473
|
+
"internalType": "address",
|
|
474
|
+
"name": "_to",
|
|
475
|
+
"type": "address"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
"internalType": "uint256",
|
|
479
|
+
"name": "_amount",
|
|
480
|
+
"type": "uint256"
|
|
481
|
+
}
|
|
482
|
+
],
|
|
483
|
+
"name": "unwrapTo",
|
|
484
|
+
"outputs": [],
|
|
485
|
+
"stateMutability": "nonpayable",
|
|
486
|
+
"type": "function"
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"inputs": [
|
|
490
|
+
{
|
|
491
|
+
"internalType": "uint256",
|
|
492
|
+
"name": "_amount",
|
|
493
|
+
"type": "uint256"
|
|
494
|
+
}
|
|
495
|
+
],
|
|
496
|
+
"name": "wrap",
|
|
497
|
+
"outputs": [],
|
|
498
|
+
"stateMutability": "nonpayable",
|
|
499
|
+
"type": "function"
|
|
500
|
+
}
|
|
501
|
+
]
|
package/dist/data/addresses.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"Chainlink-DAI-ETH": "0x773616E4d11A78F511299002da57A0a94577F1f4",
|
|
4
4
|
"Chainlink-ENZYME-VAULT": "0xCc72039A141c6e34a779eF93AEF5eB4C82A893c7",
|
|
5
5
|
"Chainlink-ETH-USD": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
|
|
6
|
+
"Chainlink-RETH-ETH": "0x536218f9E9Eb48863970252233c8F271f554C2d0",
|
|
6
7
|
"Chainlink-STETH-ETH": "0x86392dC19c0b719886221c78AB11eb8Cf5c52812",
|
|
7
8
|
"Cover": "0xcafeac0fF5dA0A2777d915531bfA6B29d282Ee62",
|
|
8
9
|
"CoverMigrator": "0xcafeac41b010299A9bec5308CCe6aFC2c4DF8D39",
|
|
@@ -17,19 +18,21 @@
|
|
|
17
18
|
"LegacyGateway": "0x089Ab1536D032F54DFbC194Ba47529a4351af1B5",
|
|
18
19
|
"LegacyPooledStaking": "0x84EdfFA16bb0b9Ab1163abb0a13Ff0744c11272f",
|
|
19
20
|
"LegacyQuotationData": "0x1776651F58a17a50098d31ba3C3cD259C1903f7A",
|
|
20
|
-
"MCR": "
|
|
21
|
+
"MCR": "0xcafea92739e411a4D95bbc2275CA61dE6993C9a7",
|
|
21
22
|
"MemberRoles": "0x055CC48f7968FD8640EF140610dd4038e1b03926",
|
|
22
23
|
"NXMToken": "0xd7c49CEE7E9188cCa6AD8FF264C1DA2e69D4Cf3B",
|
|
23
24
|
"NXMaster": "0x01BFd82675DBCc7762C84019cA518e701C0cD07e",
|
|
24
|
-
"Pool": "
|
|
25
|
-
"PriceFeedOracle": "
|
|
25
|
+
"Pool": "0xcafeaBED7e0653aFe9674A3ad862b78DB3F36e60",
|
|
26
|
+
"PriceFeedOracle": "0xcafeaf6f31b54931795DA9055910DA7C83D23495",
|
|
26
27
|
"ProductsV1": "0xcafeab02966FdC69Ce5aFDD532DD51466892E32B",
|
|
27
28
|
"ProposalCategory": "0x888eA6Ab349c854936b98586CE6a17E98BF254b2",
|
|
29
|
+
"Ramm": "0xcafea54f03E1Cc036653444e581A10a43B2487CD",
|
|
28
30
|
"StakingNFT": "0xcafea508a477D94c502c253A58239fb8F948e97f",
|
|
29
31
|
"StakingPoolFactory": "0xcafeafb97BF8831D95C0FC659b8eB3946B101CB3",
|
|
30
32
|
"StakingProducts": "0xcafea573fBd815B5f59e8049E71E554bde3477E4",
|
|
31
33
|
"StakingViewer": "0xcafea970135C07B07a3eCA76C6c00AAC849767b3",
|
|
32
34
|
"SwapOperator": "0xcafea5C050E74a21C11Af78C927e17853153097D",
|
|
33
35
|
"TokenController": "0x5407381b6c251cFd498ccD4A1d877739CB7960B8",
|
|
36
|
+
"wNXM": "0x0d438F3b5175Bebc262bF23753C1E53d03432bDE",
|
|
34
37
|
"YieldTokenIncidents": "0xcafeac831dC5ca0D7ef467953b7822D2f44C8f83"
|
|
35
38
|
}
|
package/dist/index.d.mts
CHANGED
|
@@ -1811,8 +1811,33 @@ type Reserves = {
|
|
|
1811
1811
|
budget: bigint;
|
|
1812
1812
|
};
|
|
1813
1813
|
|
|
1814
|
-
|
|
1814
|
+
/**
|
|
1815
|
+
* Calculates the amount of nxm flowing out of the pool for the given amount of eth flowing in
|
|
1816
|
+
*/
|
|
1817
|
+
declare const calculateExactNxmForEth: (ethIn: bigint, reserves: Reserves) => bigint;
|
|
1815
1818
|
|
|
1816
|
-
|
|
1819
|
+
/**
|
|
1820
|
+
* Calculates the amount of eth flowing out of the pool for the given amount of nxm flowing in
|
|
1821
|
+
*/
|
|
1822
|
+
declare const calculateExactEthForNxm: (nxmIn: bigint, reserves: Reserves) => bigint;
|
|
1817
1823
|
|
|
1818
|
-
|
|
1824
|
+
/**
|
|
1825
|
+
* Calculates the amount of nxm needed to flow into the pool to get the exact amount of eth out
|
|
1826
|
+
*/
|
|
1827
|
+
declare const calculateNxmForExactEth: (ethOut: bigint, reserves: Reserves) => bigint;
|
|
1828
|
+
|
|
1829
|
+
/**
|
|
1830
|
+
* Calculates the amount of eth needed to flow into the pool to get the exact amount of nxm out
|
|
1831
|
+
*/
|
|
1832
|
+
declare const calculateEthForExactNxm: (nxmOut: bigint, reserves: Reserves) => bigint;
|
|
1833
|
+
|
|
1834
|
+
declare const calculatePriceImpactA: (ethIn: bigint, reserves: Reserves) => bigint;
|
|
1835
|
+
|
|
1836
|
+
declare const calculatePriceImpactB: (nxmIn: bigint, reserves: Reserves) => bigint;
|
|
1837
|
+
|
|
1838
|
+
declare const calculateSpotPrice: (reserves: Reserves) => {
|
|
1839
|
+
spotPriceA: bigint;
|
|
1840
|
+
spotPriceB: bigint;
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1843
|
+
export { LogoFileName, Reserves, allLogoFileNames, calculateEthForExactNxm, calculateExactEthForNxm, calculateExactNxmForEth, calculateNxmForExactEth, calculatePriceImpactA, calculatePriceImpactB, calculateSpotPrice, productTypes, products };
|
package/dist/index.d.ts
CHANGED
|
@@ -1811,8 +1811,33 @@ type Reserves = {
|
|
|
1811
1811
|
budget: bigint;
|
|
1812
1812
|
};
|
|
1813
1813
|
|
|
1814
|
-
|
|
1814
|
+
/**
|
|
1815
|
+
* Calculates the amount of nxm flowing out of the pool for the given amount of eth flowing in
|
|
1816
|
+
*/
|
|
1817
|
+
declare const calculateExactNxmForEth: (ethIn: bigint, reserves: Reserves) => bigint;
|
|
1815
1818
|
|
|
1816
|
-
|
|
1819
|
+
/**
|
|
1820
|
+
* Calculates the amount of eth flowing out of the pool for the given amount of nxm flowing in
|
|
1821
|
+
*/
|
|
1822
|
+
declare const calculateExactEthForNxm: (nxmIn: bigint, reserves: Reserves) => bigint;
|
|
1817
1823
|
|
|
1818
|
-
|
|
1824
|
+
/**
|
|
1825
|
+
* Calculates the amount of nxm needed to flow into the pool to get the exact amount of eth out
|
|
1826
|
+
*/
|
|
1827
|
+
declare const calculateNxmForExactEth: (ethOut: bigint, reserves: Reserves) => bigint;
|
|
1828
|
+
|
|
1829
|
+
/**
|
|
1830
|
+
* Calculates the amount of eth needed to flow into the pool to get the exact amount of nxm out
|
|
1831
|
+
*/
|
|
1832
|
+
declare const calculateEthForExactNxm: (nxmOut: bigint, reserves: Reserves) => bigint;
|
|
1833
|
+
|
|
1834
|
+
declare const calculatePriceImpactA: (ethIn: bigint, reserves: Reserves) => bigint;
|
|
1835
|
+
|
|
1836
|
+
declare const calculatePriceImpactB: (nxmIn: bigint, reserves: Reserves) => bigint;
|
|
1837
|
+
|
|
1838
|
+
declare const calculateSpotPrice: (reserves: Reserves) => {
|
|
1839
|
+
spotPriceA: bigint;
|
|
1840
|
+
spotPriceB: bigint;
|
|
1841
|
+
};
|
|
1842
|
+
|
|
1843
|
+
export { LogoFileName, Reserves, allLogoFileNames, calculateEthForExactNxm, calculateExactEthForNxm, calculateExactNxmForEth, calculateNxmForExactEth, calculatePriceImpactA, calculatePriceImpactB, calculateSpotPrice, productTypes, products };
|