@ethereansos/interfaces-core 0.4.89 → 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 +89 -34
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +86 -35
- package/dist/index.esm.js.map +1 -1
- package/package.json +10 -10
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
|
|
@@ -44773,6 +44761,7 @@ var POOL_INIT_CODE_HASH = '0xe34f199b19b2b4f47f68442619d555527d244f78a3297ea8932
|
|
44773
44761
|
exports.FeeAmount = void 0;
|
44774
44762
|
|
44775
44763
|
(function (FeeAmount) {
|
44764
|
+
FeeAmount[FeeAmount["LOWEST"] = 100] = "LOWEST";
|
44776
44765
|
FeeAmount[FeeAmount["LOW"] = 500] = "LOW";
|
44777
44766
|
FeeAmount[FeeAmount["MEDIUM"] = 3000] = "MEDIUM";
|
44778
44767
|
FeeAmount[FeeAmount["HIGH"] = 10000] = "HIGH";
|
@@ -44782,7 +44771,7 @@ exports.FeeAmount = void 0;
|
|
44782
44771
|
*/
|
44783
44772
|
|
44784
44773
|
|
44785
|
-
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);
|
44786
44775
|
|
44787
44776
|
var NEGATIVE_ONE = /*#__PURE__*/JSBI.BigInt(-1);
|
44788
44777
|
var ZERO = /*#__PURE__*/JSBI.BigInt(0);
|
@@ -45313,7 +45302,7 @@ var TickList = /*#__PURE__*/function () {
|
|
45313
45302
|
} else {
|
45314
45303
|
var _wordPos = compressed + 1 >> 8;
|
45315
45304
|
|
45316
|
-
var maximum = (_wordPos + 1 << 8) * tickSpacing
|
45305
|
+
var maximum = ((_wordPos + 1 << 8) - 1) * tickSpacing;
|
45317
45306
|
|
45318
45307
|
if (this.isAtOrAboveLargest(ticks, tick)) {
|
45319
45308
|
return [maximum, false];
|
@@ -45508,6 +45497,23 @@ function nearestUsableTick(tick, tickSpacing) {
|
|
45508
45497
|
if (rounded < TickMath.MIN_TICK) return rounded + tickSpacing;else if (rounded > TickMath.MAX_TICK) return rounded - tickSpacing;else return rounded;
|
45509
45498
|
}
|
45510
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
|
+
|
45511
45517
|
/**
|
45512
45518
|
* Returns a price object corresponding to the input tick and the base/quote token
|
45513
45519
|
* Inputs must be tokens because the address order is used to interpret the price represented by the tick
|
@@ -45546,6 +45552,51 @@ function priceToClosestTick(price) {
|
|
45546
45552
|
return tick;
|
45547
45553
|
}
|
45548
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
|
+
|
45549
45600
|
var Tick = function Tick(_ref) {
|
45550
45601
|
var index = _ref.index,
|
45551
45602
|
liquidityGross = _ref.liquidityGross,
|
@@ -49158,15 +49209,18 @@ exports.Percent = Percent;
|
|
49158
49209
|
exports.PluginsContextProvider = PluginsContextProvider;
|
49159
49210
|
exports.Pool = Pool;
|
49160
49211
|
exports.Position = Position;
|
49212
|
+
exports.PositionLibrary = PositionLibrary;
|
49161
49213
|
exports.Price = Price;
|
49162
49214
|
exports.Route = Route;
|
49163
49215
|
exports.SelfPermit = SelfPermit;
|
49164
49216
|
exports.SqrtPriceMath = SqrtPriceMath;
|
49165
49217
|
exports.Staker = Staker;
|
49218
|
+
exports.SwapMath = SwapMath;
|
49166
49219
|
exports.SwapQuoter = SwapQuoter;
|
49167
49220
|
exports.SwapRouter = SwapRouter;
|
49168
49221
|
exports.TICK_SPACINGS = TICK_SPACINGS;
|
49169
49222
|
exports.Tick = Tick;
|
49223
|
+
exports.TickLibrary = TickLibrary;
|
49170
49224
|
exports.TickList = TickList;
|
49171
49225
|
exports.TickListDataProvider = TickListDataProvider;
|
49172
49226
|
exports.TickMath = TickMath;
|
@@ -49244,6 +49298,7 @@ exports.split = split;
|
|
49244
49298
|
exports.sqrt = sqrt;
|
49245
49299
|
exports.stringToLines = toLines;
|
49246
49300
|
exports.sub = sub;
|
49301
|
+
exports.subIn256 = subIn256;
|
49247
49302
|
exports.swap = swap;
|
49248
49303
|
exports.tickToPrice = tickToPrice;
|
49249
49304
|
exports.toDecimals = toDecimals;
|