@ethereansos/interfaces-core 0.4.86 → 0.4.90
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/index.cjs.js +104 -47
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +101 -48
- package/dist/index.esm.js.map +1 -1
- package/package.json +11 -11
package/dist/index.cjs.js
CHANGED
@@ -7525,14 +7525,9 @@ function ownKeys(object, enumerableOnly) {
|
|
7525
7525
|
|
7526
7526
|
if (Object.getOwnPropertySymbols) {
|
7527
7527
|
var symbols = Object.getOwnPropertySymbols(object);
|
7528
|
-
|
7529
|
-
|
7530
|
-
|
7531
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
7532
|
-
});
|
7533
|
-
}
|
7534
|
-
|
7535
|
-
keys.push.apply(keys, symbols);
|
7528
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
7529
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
7530
|
+
})), keys.push.apply(keys, symbols);
|
7536
7531
|
}
|
7537
7532
|
|
7538
7533
|
return keys;
|
@@ -7540,19 +7535,12 @@ function ownKeys(object, enumerableOnly) {
|
|
7540
7535
|
|
7541
7536
|
function _objectSpread2(target) {
|
7542
7537
|
for (var i = 1; i < arguments.length; i++) {
|
7543
|
-
var source = arguments[i]
|
7544
|
-
|
7545
|
-
|
7546
|
-
|
7547
|
-
|
7548
|
-
|
7549
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
7550
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
7551
|
-
} else {
|
7552
|
-
ownKeys(Object(source)).forEach(function (key) {
|
7553
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
7554
|
-
});
|
7555
|
-
}
|
7538
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
7539
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
7540
|
+
_defineProperty(target, key, source[key]);
|
7541
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
7542
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
7543
|
+
});
|
7556
7544
|
}
|
7557
7545
|
|
7558
7546
|
return target;
|
@@ -7561,17 +7549,11 @@ function _objectSpread2(target) {
|
|
7561
7549
|
function _typeof(obj) {
|
7562
7550
|
"@babel/helpers - typeof";
|
7563
7551
|
|
7564
|
-
|
7565
|
-
|
7566
|
-
|
7567
|
-
|
7568
|
-
}
|
7569
|
-
_typeof = function (obj) {
|
7570
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
7571
|
-
};
|
7572
|
-
}
|
7573
|
-
|
7574
|
-
return _typeof(obj);
|
7552
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
7553
|
+
return typeof obj;
|
7554
|
+
} : function (obj) {
|
7555
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
7556
|
+
}, _typeof(obj);
|
7575
7557
|
}
|
7576
7558
|
|
7577
7559
|
function asyncGeneratorStep$1(gen, resolve, reject, _next, _throw, key, arg) {
|
@@ -7629,6 +7611,9 @@ function _defineProperties$2(target, props) {
|
|
7629
7611
|
function _createClass$2(Constructor, protoProps, staticProps) {
|
7630
7612
|
if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);
|
7631
7613
|
if (staticProps) _defineProperties$2(Constructor, staticProps);
|
7614
|
+
Object.defineProperty(Constructor, "prototype", {
|
7615
|
+
writable: false
|
7616
|
+
});
|
7632
7617
|
return Constructor;
|
7633
7618
|
}
|
7634
7619
|
|
@@ -7659,6 +7644,9 @@ function _inherits(subClass, superClass) {
|
|
7659
7644
|
configurable: true
|
7660
7645
|
}
|
7661
7646
|
});
|
7647
|
+
Object.defineProperty(subClass, "prototype", {
|
7648
|
+
writable: false
|
7649
|
+
});
|
7662
7650
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
7663
7651
|
}
|
7664
7652
|
|
@@ -32274,18 +32262,20 @@ function sendBlockchainTransaction(provider, fromOrPlainPrivateKey, to, data, va
|
|
32274
32262
|
return sendAsync(provider, 'eth_estimateGas', tx);
|
32275
32263
|
|
32276
32264
|
case 65:
|
32265
|
+
tx.gas = tx.gasLimit;
|
32266
|
+
|
32277
32267
|
if (!privateKey) {
|
32278
|
-
_context2.next =
|
32268
|
+
_context2.next = 81;
|
32279
32269
|
break;
|
32280
32270
|
}
|
32281
32271
|
|
32282
32272
|
_context2.t23 = global.EthereumJSTransaction.Transaction;
|
32283
32273
|
_context2.t24 = tx;
|
32284
32274
|
_context2.t25 = parseInt;
|
32285
|
-
_context2.next =
|
32275
|
+
_context2.next = 72;
|
32286
32276
|
return sendAsync(provider, 'eth_chainId');
|
32287
32277
|
|
32288
|
-
case
|
32278
|
+
case 72:
|
32289
32279
|
_context2.t26 = _context2.sent;
|
32290
32280
|
_context2.t27 = (0, _context2.t25)(_context2.t26);
|
32291
32281
|
_context2.t28 = {
|
@@ -32295,17 +32285,17 @@ function sendBlockchainTransaction(provider, fromOrPlainPrivateKey, to, data, va
|
|
32295
32285
|
transaction.sign(privateKey);
|
32296
32286
|
serializedTx = '0x' + transaction.serialize().toString('hex');
|
32297
32287
|
sendTransaction = sendAsync(provider, 'eth_sendRawTransaction', serializedTx);
|
32298
|
-
_context2.next =
|
32288
|
+
_context2.next = 82;
|
32299
32289
|
break;
|
32300
32290
|
|
32301
|
-
case
|
32291
|
+
case 81:
|
32302
32292
|
sendTransaction = sendAsync(provider, 'eth_sendTransaction', tx);
|
32303
32293
|
|
32304
|
-
case
|
32305
|
-
_context2.next =
|
32294
|
+
case 82:
|
32295
|
+
_context2.next = 84;
|
32306
32296
|
return sendTransaction;
|
32307
32297
|
|
32308
|
-
case
|
32298
|
+
case 84:
|
32309
32299
|
transactionHash = _context2.sent;
|
32310
32300
|
console.log(new Date().toUTCString(), 'Transaction!', getEtherscanAddress('tx/' + transactionHash, tx.chainId));
|
32311
32301
|
|
@@ -32363,20 +32353,20 @@ function sendBlockchainTransaction(provider, fromOrPlainPrivateKey, to, data, va
|
|
32363
32353
|
}();
|
32364
32354
|
|
32365
32355
|
setTimeout(timeout);
|
32366
|
-
_context2.next =
|
32356
|
+
_context2.next = 93;
|
32367
32357
|
break;
|
32368
32358
|
|
32369
|
-
case
|
32370
|
-
_context2.prev =
|
32359
|
+
case 90:
|
32360
|
+
_context2.prev = 90;
|
32371
32361
|
_context2.t29 = _context2["catch"](0);
|
32372
32362
|
return _context2.abrupt("return", ko(_context2.t29));
|
32373
32363
|
|
32374
|
-
case
|
32364
|
+
case 93:
|
32375
32365
|
case "end":
|
32376
32366
|
return _context2.stop();
|
32377
32367
|
}
|
32378
32368
|
}
|
32379
|
-
}, _callee2, null, [[0,
|
32369
|
+
}, _callee2, null, [[0, 90], [25, 32]]);
|
32380
32370
|
}));
|
32381
32371
|
|
32382
32372
|
return function (_x, _x2) {
|
@@ -44771,6 +44761,7 @@ var POOL_INIT_CODE_HASH = '0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea8932
|
|
44771
44761
|
exports.FeeAmount = void 0;
|
44772
44762
|
|
44773
44763
|
(function (FeeAmount) {
|
44764
|
+
FeeAmount[FeeAmount["LOWEST"] = 100] = "LOWEST";
|
44774
44765
|
FeeAmount[FeeAmount["LOW"] = 500] = "LOW";
|
44775
44766
|
FeeAmount[FeeAmount["MEDIUM"] = 3000] = "MEDIUM";
|
44776
44767
|
FeeAmount[FeeAmount["HIGH"] = 10000] = "HIGH";
|
@@ -44780,7 +44771,7 @@ exports.FeeAmount = void 0;
|
|
44780
44771
|
*/
|
44781
44772
|
|
44782
44773
|
|
44783
|
-
var TICK_SPACINGS = (_TICK_SPACINGS = {}, _TICK_SPACINGS[exports.FeeAmount.LOW] = 10, _TICK_SPACINGS[exports.FeeAmount.MEDIUM] = 60, _TICK_SPACINGS[exports.FeeAmount.HIGH] = 200, _TICK_SPACINGS);
|
44774
|
+
var TICK_SPACINGS = (_TICK_SPACINGS = {}, _TICK_SPACINGS[exports.FeeAmount.LOWEST] = 1, _TICK_SPACINGS[exports.FeeAmount.LOW] = 10, _TICK_SPACINGS[exports.FeeAmount.MEDIUM] = 60, _TICK_SPACINGS[exports.FeeAmount.HIGH] = 200, _TICK_SPACINGS);
|
44784
44775
|
|
44785
44776
|
var NEGATIVE_ONE = /*#__PURE__*/JSBI.BigInt(-1);
|
44786
44777
|
var ZERO = /*#__PURE__*/JSBI.BigInt(0);
|
@@ -45311,7 +45302,7 @@ var TickList = /*#__PURE__*/function () {
|
|
45311
45302
|
} else {
|
45312
45303
|
var _wordPos = compressed + 1 >> 8;
|
45313
45304
|
|
45314
|
-
var maximum = (_wordPos + 1 << 8) * tickSpacing
|
45305
|
+
var maximum = ((_wordPos + 1 << 8) - 1) * tickSpacing;
|
45315
45306
|
|
45316
45307
|
if (this.isAtOrAboveLargest(ticks, tick)) {
|
45317
45308
|
return [maximum, false];
|
@@ -45506,6 +45497,23 @@ function nearestUsableTick(tick, tickSpacing) {
|
|
45506
45497
|
if (rounded < TickMath.MIN_TICK) return rounded + tickSpacing;else if (rounded > TickMath.MAX_TICK) return rounded - tickSpacing;else return rounded;
|
45507
45498
|
}
|
45508
45499
|
|
45500
|
+
var Q128 = /*#__PURE__*/JSBI.exponentiate( /*#__PURE__*/JSBI.BigInt(2), /*#__PURE__*/JSBI.BigInt(128));
|
45501
|
+
var PositionLibrary = /*#__PURE__*/function () {
|
45502
|
+
/**
|
45503
|
+
* Cannot be constructed.
|
45504
|
+
*/
|
45505
|
+
function PositionLibrary() {} // replicates the portions of Position#update required to compute unaccounted fees
|
45506
|
+
|
45507
|
+
|
45508
|
+
PositionLibrary.getTokensOwed = function getTokensOwed(feeGrowthInside0LastX128, feeGrowthInside1LastX128, liquidity, feeGrowthInside0X128, feeGrowthInside1X128) {
|
45509
|
+
var tokensOwed0 = JSBI.divide(JSBI.multiply(subIn256(feeGrowthInside0X128, feeGrowthInside0LastX128), liquidity), Q128);
|
45510
|
+
var tokensOwed1 = JSBI.divide(JSBI.multiply(subIn256(feeGrowthInside1X128, feeGrowthInside1LastX128), liquidity), Q128);
|
45511
|
+
return [tokensOwed0, tokensOwed1];
|
45512
|
+
};
|
45513
|
+
|
45514
|
+
return PositionLibrary;
|
45515
|
+
}();
|
45516
|
+
|
45509
45517
|
/**
|
45510
45518
|
* Returns a price object corresponding to the input tick and the base/quote token
|
45511
45519
|
* Inputs must be tokens because the address order is used to interpret the price represented by the tick
|
@@ -45544,6 +45552,51 @@ function priceToClosestTick(price) {
|
|
45544
45552
|
return tick;
|
45545
45553
|
}
|
45546
45554
|
|
45555
|
+
var Q256 = /*#__PURE__*/JSBI.exponentiate( /*#__PURE__*/JSBI.BigInt(2), /*#__PURE__*/JSBI.BigInt(256));
|
45556
|
+
function subIn256(x, y) {
|
45557
|
+
var difference = JSBI.subtract(x, y);
|
45558
|
+
|
45559
|
+
if (JSBI.lessThan(difference, ZERO)) {
|
45560
|
+
return JSBI.add(Q256, difference);
|
45561
|
+
} else {
|
45562
|
+
return difference;
|
45563
|
+
}
|
45564
|
+
}
|
45565
|
+
var TickLibrary = /*#__PURE__*/function () {
|
45566
|
+
/**
|
45567
|
+
* Cannot be constructed.
|
45568
|
+
*/
|
45569
|
+
function TickLibrary() {}
|
45570
|
+
|
45571
|
+
TickLibrary.getFeeGrowthInside = function getFeeGrowthInside(feeGrowthOutsideLower, feeGrowthOutsideUpper, tickLower, tickUpper, tickCurrent, feeGrowthGlobal0X128, feeGrowthGlobal1X128) {
|
45572
|
+
var feeGrowthBelow0X128;
|
45573
|
+
var feeGrowthBelow1X128;
|
45574
|
+
|
45575
|
+
if (tickCurrent >= tickLower) {
|
45576
|
+
feeGrowthBelow0X128 = feeGrowthOutsideLower.feeGrowthOutside0X128;
|
45577
|
+
feeGrowthBelow1X128 = feeGrowthOutsideLower.feeGrowthOutside1X128;
|
45578
|
+
} else {
|
45579
|
+
feeGrowthBelow0X128 = subIn256(feeGrowthGlobal0X128, feeGrowthOutsideLower.feeGrowthOutside0X128);
|
45580
|
+
feeGrowthBelow1X128 = subIn256(feeGrowthGlobal1X128, feeGrowthOutsideLower.feeGrowthOutside1X128);
|
45581
|
+
}
|
45582
|
+
|
45583
|
+
var feeGrowthAbove0X128;
|
45584
|
+
var feeGrowthAbove1X128;
|
45585
|
+
|
45586
|
+
if (tickCurrent < tickUpper) {
|
45587
|
+
feeGrowthAbove0X128 = feeGrowthOutsideUpper.feeGrowthOutside0X128;
|
45588
|
+
feeGrowthAbove1X128 = feeGrowthOutsideUpper.feeGrowthOutside1X128;
|
45589
|
+
} else {
|
45590
|
+
feeGrowthAbove0X128 = subIn256(feeGrowthGlobal0X128, feeGrowthOutsideUpper.feeGrowthOutside0X128);
|
45591
|
+
feeGrowthAbove1X128 = subIn256(feeGrowthGlobal1X128, feeGrowthOutsideUpper.feeGrowthOutside1X128);
|
45592
|
+
}
|
45593
|
+
|
45594
|
+
return [subIn256(subIn256(feeGrowthGlobal0X128, feeGrowthBelow0X128), feeGrowthAbove0X128), subIn256(subIn256(feeGrowthGlobal1X128, feeGrowthBelow1X128), feeGrowthAbove1X128)];
|
45595
|
+
};
|
45596
|
+
|
45597
|
+
return TickLibrary;
|
45598
|
+
}();
|
45599
|
+
|
45547
45600
|
var Tick = function Tick(_ref) {
|
45548
45601
|
var index = _ref.index,
|
45549
45602
|
liquidityGross = _ref.liquidityGross,
|
@@ -49156,15 +49209,18 @@ exports.Percent = Percent;
|
|
49156
49209
|
exports.PluginsContextProvider = PluginsContextProvider;
|
49157
49210
|
exports.Pool = Pool;
|
49158
49211
|
exports.Position = Position;
|
49212
|
+
exports.PositionLibrary = PositionLibrary;
|
49159
49213
|
exports.Price = Price;
|
49160
49214
|
exports.Route = Route;
|
49161
49215
|
exports.SelfPermit = SelfPermit;
|
49162
49216
|
exports.SqrtPriceMath = SqrtPriceMath;
|
49163
49217
|
exports.Staker = Staker;
|
49218
|
+
exports.SwapMath = SwapMath;
|
49164
49219
|
exports.SwapQuoter = SwapQuoter;
|
49165
49220
|
exports.SwapRouter = SwapRouter;
|
49166
49221
|
exports.TICK_SPACINGS = TICK_SPACINGS;
|
49167
49222
|
exports.Tick = Tick;
|
49223
|
+
exports.TickLibrary = TickLibrary;
|
49168
49224
|
exports.TickList = TickList;
|
49169
49225
|
exports.TickListDataProvider = TickListDataProvider;
|
49170
49226
|
exports.TickMath = TickMath;
|
@@ -49242,6 +49298,7 @@ exports.split = split;
|
|
49242
49298
|
exports.sqrt = sqrt;
|
49243
49299
|
exports.stringToLines = toLines;
|
49244
49300
|
exports.sub = sub;
|
49301
|
+
exports.subIn256 = subIn256;
|
49245
49302
|
exports.swap = swap;
|
49246
49303
|
exports.tickToPrice = tickToPrice;
|
49247
49304
|
exports.toDecimals = toDecimals;
|