impermax-sdk 2.1.524 → 2.1.526
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/lib/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ import OnchainAccountLendingPoolV2 from './onchain/account/lendingPool/onchainAc
|
|
|
46
46
|
import OnchainAccountNftlpHyperswapV3 from './onchain/account/lendingPool/nftlp';
|
|
47
47
|
import { decimalToBalance } from './utils/ether-utils';
|
|
48
48
|
import OffchainAccountLendingPoolV3 from "./offchain/account/lendingPool/offchainAccountLendingPoolV3";
|
|
49
|
-
import { MAX_TICK, MIN_TICK, formatPriceSqrtX96, clTickToPrice, tickSpacingPercentageRanges } from "./utils/nftlpMath/CLGeneral";
|
|
49
|
+
import { MAX_TICK, MIN_TICK, formatPriceSqrtX96, clTickToPrice, clNearestUsableTickPrice, clPriceToTick, tickSpacingPercentageRanges, clPrevTickPrice, clNextTickPrice } from "./utils/nftlpMath/CLGeneral";
|
|
50
50
|
import GenericCLPosition from './utils/position/cl';
|
|
51
51
|
import UniswapV2Position from './utils/position/uniswapV2';
|
|
52
52
|
import Position from './utils/position/interface';
|
|
@@ -79,4 +79,4 @@ import OnchainInteractionsStakingModule from './onchain/interactions/onchainInte
|
|
|
79
79
|
import OnchainAccountStakingModule from './onchain/account/onchainAccountStakingModule';
|
|
80
80
|
import { OffchainAccountNftlpAeroCL, OffchainAccountNftlpGenericCL, OffchainAccountNftlpUniswapV3, OffchainAccountNftlpHyperswapV3 } from './offchain/account/lendingPool/nftlp';
|
|
81
81
|
import { uniV3FeeToTickSpacing, uniV3TickSpacingToFee } from "./utils/nftlpMath/uniswapV3General";
|
|
82
|
-
export { offchain, OffchainMultichain, Offchain, OffchainPoolToken, OffchainLendingPool, OffchainCollateral, OffchainBorrowable, OffchainLendingPoolV2, OffchainCollateralV2, OffchainBorrowableV2, OffchainLendingPoolV3, OffchainCollateralV3, OffchainBorrowableV3, OffchainNftlp, OffchainNftlpGenericCL, OffchainNftlpUniswapV3, OffchainNftlpHyperswapV3, OffchainNftlpAeroCL, OffchainVault, OffchainLeveragedVault, OffchainLendingVault, OffchainHedgedVault, OffchainConfigManager, OffchainPairConfig, OffchainProposal, OffchainMultichainAccount, OffchainAccount, OffchainAccountPoolToken, OffchainAccountLendingPool, OffchainAccountCollateral, OffchainAccountBorrowable, OffchainAccountLendingPoolV2, OffchainAccountCollateralV2, OffchainAccountBorrowableV2, OffchainAccountLendingPoolV3, OffchainAccountCollateralV3, OffchainAccountBorrowableV3, OffchainAccountNftlp, OffchainAccountNftlpGenericCL, OffchainAccountNftlpUniswapV3, OffchainAccountNftlpAeroCL, OffchainAccountNftlpHyperswapV3, OffchainLeveragedPosition, OffchainAccountVault, OffchainPriceHelper, OffchainSolidexHelper, PoolTokenData, BorrowableData, CollateralData, BorrowablePastData, TokenData, RewardData, PairData, FarmingPoolData, LendingPoolPastData, LendingPoolData, CollateralPosition, SupplyPosition, BorrowPosition, UserData, TvlData, XIbexData, LendingVaultData, VaultPosition, PairConfigData, ProposalData, ProposalMetadata, VaultRisk, VaultType, onchain, Onchain, OnchainImpermaxFactory, OnchainImpermaxFactoryV2, OnchainImpermaxFactoryV3, OnchainPoolToken, OnchainLendingPool, OnchainBorrowable, OnchainCollateral, OnchainLendingPoolV2, OnchainBorrowableV2, OnchainCollateralV2, OnchainLendingPoolV3, OnchainBorrowableV3, OnchainCollateralV3, OnchainNftlp, OnchainNftlpGenericCL, OnchainNftlpUniswapV3, OnchainNftlpAeroCL, OnchainNftlpHyperswapV3, OnchainLendingVault, OnchainConfigManager, OnchainProposal, OnchainPairConfig, OnchainAccount, OnchainAccountPoolToken, OnchainAccountLendingPool, OnchainAccountBorrowable, OnchainAccountCollateral, OnchainAccountLendingPoolV2, OnchainAccountBorrowableV2, OnchainAccountCollateralV2, OnchainAccountLendingPoolV3, OnchainAccountBorrowableV3, OnchainAccountCollateralV3, OnchainAccountNftlp, OnchainAccountNftlpGenericCL, OnchainAccountNftlpUniswapV3, OnchainAccountNftlpHyperswapV3, OnchainAccountNftlpAeroCL, OnchainAccountLendingVault, OnchainContractsHelper, OnchainInteractions, OnchainInteractionsPoolToken, OnchainInteractionsLendingPool, OnchainInteractionsCollateral, OnchainInteractionsBorrowable, OnchainInteractionsLendingPoolV2, OnchainInteractionsCollateralV2, OnchainInteractionsBorrowableV2, OnchainInteractionsLendingPoolV3, OnchainInteractionsCollateralV3, OnchainInteractionsBorrowableV3, OnchainInteractionsNftlp, OnchainInteractionsNftlpGenericCL, OnchainInteractionsNftlpUniswapV3, OnchainInteractionsNftlpAeroCL, OnchainInteractionsLendingVault, OnchainInteractionsConfigManager, Contract, ApprovalType, OnchainConfig, Changes, NO_CHANGES, Values, AirdropData, PendingRewardUI, CollateralConfig, BorrowableV2Config, BorrowableV3Config, PairConfig, CLAIM_AGGREGATOR, IMPERMAX_CHEF, IMX, IMPERMAX_FACTORY, getNetworkFactories, getFactoryByAddress, LENDING_VAULT_WATCHER, MERKLE_DISTRIBUTOR_IBEX, MERKLE_DISTRIBUTOR_IBEX_2, MERKLE_DISTRIBUTOR_ETH, ROUTER, SIMPLE_UNISWAP_ORACLE, WETH, MERKLE_URL_ETH, MERKLE_URL_IBEX, MERKLE_URL_IBEX_2, hrAmms, AMM_FACTORY, getAmmByFactory, AMM_SUBGRAPH_URLS, ADD_LIQUIDITY_URLS, AMM_LP_FEE, DEBANK_IDS, ETH_SYMBOL, ETH_NAME, SOLIDEX_FACTORIES, BORROW_FEE_FACTORIES, OLD_KINK_MULTIPLIER_FACTORIES, LIQUIDATION_FEE_FACTORIES, V2_FACTORIES, GENERIC_CL_EXTENSIONS, Farms, hrFarms, FarmIndex, STAKED_LP_FACTORY, getFarmByStakedLPFactory, NOT_SYNCED, DEADLINE, ZERO, APPROVE_AMOUNT, IMPERMAX_SUBGRAPH_URL, IMPERMAX_CHEF_SUBGRAPH_URL, BLOCKS_SUBGRAPH_URL, XIBEX_SUBGRAPH_URL, Networks, Factory, Extension, PoolTokenType, Amms, Address, NetworkIndex, FactoryIndex, AddressIndex, NetworkFactoryIndex, LendingPoolIndex, AmmIndex, DistributorDetails, ProposalState, WhitelistState, VaultListOrderBy, VaultListParams, LendingPoolListOrderBy, LendingPoolListParams, SortDirection, LendingPoolVersion, PositionType, AccountPosition, PermitType, Permits, Permit, Borrowable, decimalToBalance, MAX_TICK, MIN_TICK, formatPriceSqrtX96, clTickToPrice, tickSpacingPercentageRanges, isV3Factory, uniV3TickSpacingToFee, uniV3FeeToTickSpacing, GenericCLPosition, UniswapV2Position, Position, BorrowableEntity, BorrowablePosition, LendingVaultEntity, PairState, SupplyPositionsParams, BorrowPositionsParams, TopPositionsParams, VaultPositionsParams, AccountEarningsParams, AccountMarketData, OffchainStakingModule, IBEX, XIBEX, OffchainAccountStakingModule, OnchainStakingModule, OnchainInteractionsStakingModule, OnchainAccountStakingModule };
|
|
82
|
+
export { offchain, OffchainMultichain, Offchain, OffchainPoolToken, OffchainLendingPool, OffchainCollateral, OffchainBorrowable, OffchainLendingPoolV2, OffchainCollateralV2, OffchainBorrowableV2, OffchainLendingPoolV3, OffchainCollateralV3, OffchainBorrowableV3, OffchainNftlp, OffchainNftlpGenericCL, OffchainNftlpUniswapV3, OffchainNftlpHyperswapV3, OffchainNftlpAeroCL, OffchainVault, OffchainLeveragedVault, OffchainLendingVault, OffchainHedgedVault, OffchainConfigManager, OffchainPairConfig, OffchainProposal, OffchainMultichainAccount, OffchainAccount, OffchainAccountPoolToken, OffchainAccountLendingPool, OffchainAccountCollateral, OffchainAccountBorrowable, OffchainAccountLendingPoolV2, OffchainAccountCollateralV2, OffchainAccountBorrowableV2, OffchainAccountLendingPoolV3, OffchainAccountCollateralV3, OffchainAccountBorrowableV3, OffchainAccountNftlp, OffchainAccountNftlpGenericCL, OffchainAccountNftlpUniswapV3, OffchainAccountNftlpAeroCL, OffchainAccountNftlpHyperswapV3, OffchainLeveragedPosition, OffchainAccountVault, OffchainPriceHelper, OffchainSolidexHelper, PoolTokenData, BorrowableData, CollateralData, BorrowablePastData, TokenData, RewardData, PairData, FarmingPoolData, LendingPoolPastData, LendingPoolData, CollateralPosition, SupplyPosition, BorrowPosition, UserData, TvlData, XIbexData, LendingVaultData, VaultPosition, PairConfigData, ProposalData, ProposalMetadata, VaultRisk, VaultType, onchain, Onchain, OnchainImpermaxFactory, OnchainImpermaxFactoryV2, OnchainImpermaxFactoryV3, OnchainPoolToken, OnchainLendingPool, OnchainBorrowable, OnchainCollateral, OnchainLendingPoolV2, OnchainBorrowableV2, OnchainCollateralV2, OnchainLendingPoolV3, OnchainBorrowableV3, OnchainCollateralV3, OnchainNftlp, OnchainNftlpGenericCL, OnchainNftlpUniswapV3, OnchainNftlpAeroCL, OnchainNftlpHyperswapV3, OnchainLendingVault, OnchainConfigManager, OnchainProposal, OnchainPairConfig, OnchainAccount, OnchainAccountPoolToken, OnchainAccountLendingPool, OnchainAccountBorrowable, OnchainAccountCollateral, OnchainAccountLendingPoolV2, OnchainAccountBorrowableV2, OnchainAccountCollateralV2, OnchainAccountLendingPoolV3, OnchainAccountBorrowableV3, OnchainAccountCollateralV3, OnchainAccountNftlp, OnchainAccountNftlpGenericCL, OnchainAccountNftlpUniswapV3, OnchainAccountNftlpHyperswapV3, OnchainAccountNftlpAeroCL, OnchainAccountLendingVault, OnchainContractsHelper, OnchainInteractions, OnchainInteractionsPoolToken, OnchainInteractionsLendingPool, OnchainInteractionsCollateral, OnchainInteractionsBorrowable, OnchainInteractionsLendingPoolV2, OnchainInteractionsCollateralV2, OnchainInteractionsBorrowableV2, OnchainInteractionsLendingPoolV3, OnchainInteractionsCollateralV3, OnchainInteractionsBorrowableV3, OnchainInteractionsNftlp, OnchainInteractionsNftlpGenericCL, OnchainInteractionsNftlpUniswapV3, OnchainInteractionsNftlpAeroCL, OnchainInteractionsLendingVault, OnchainInteractionsConfigManager, Contract, ApprovalType, OnchainConfig, Changes, NO_CHANGES, Values, AirdropData, PendingRewardUI, CollateralConfig, BorrowableV2Config, BorrowableV3Config, PairConfig, CLAIM_AGGREGATOR, IMPERMAX_CHEF, IMX, IMPERMAX_FACTORY, getNetworkFactories, getFactoryByAddress, LENDING_VAULT_WATCHER, MERKLE_DISTRIBUTOR_IBEX, MERKLE_DISTRIBUTOR_IBEX_2, MERKLE_DISTRIBUTOR_ETH, ROUTER, SIMPLE_UNISWAP_ORACLE, WETH, MERKLE_URL_ETH, MERKLE_URL_IBEX, MERKLE_URL_IBEX_2, hrAmms, AMM_FACTORY, getAmmByFactory, AMM_SUBGRAPH_URLS, ADD_LIQUIDITY_URLS, AMM_LP_FEE, DEBANK_IDS, ETH_SYMBOL, ETH_NAME, SOLIDEX_FACTORIES, BORROW_FEE_FACTORIES, OLD_KINK_MULTIPLIER_FACTORIES, LIQUIDATION_FEE_FACTORIES, V2_FACTORIES, GENERIC_CL_EXTENSIONS, Farms, hrFarms, FarmIndex, STAKED_LP_FACTORY, getFarmByStakedLPFactory, NOT_SYNCED, DEADLINE, ZERO, APPROVE_AMOUNT, IMPERMAX_SUBGRAPH_URL, IMPERMAX_CHEF_SUBGRAPH_URL, BLOCKS_SUBGRAPH_URL, XIBEX_SUBGRAPH_URL, Networks, Factory, Extension, PoolTokenType, Amms, Address, NetworkIndex, FactoryIndex, AddressIndex, NetworkFactoryIndex, LendingPoolIndex, AmmIndex, DistributorDetails, ProposalState, WhitelistState, VaultListOrderBy, VaultListParams, LendingPoolListOrderBy, LendingPoolListParams, SortDirection, LendingPoolVersion, PositionType, AccountPosition, PermitType, Permits, Permit, Borrowable, decimalToBalance, MAX_TICK, MIN_TICK, formatPriceSqrtX96, clTickToPrice, clPriceToTick, clNearestUsableTickPrice, clPrevTickPrice, clNextTickPrice, tickSpacingPercentageRanges, isV3Factory, uniV3TickSpacingToFee, uniV3FeeToTickSpacing, GenericCLPosition, UniswapV2Position, Position, BorrowableEntity, BorrowablePosition, LendingVaultEntity, PairState, SupplyPositionsParams, BorrowPositionsParams, TopPositionsParams, VaultPositionsParams, AccountEarningsParams, AccountMarketData, OffchainStakingModule, IBEX, XIBEX, OffchainAccountStakingModule, OnchainStakingModule, OnchainInteractionsStakingModule, OnchainAccountStakingModule };
|
package/lib/index.js
CHANGED
|
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.Onchain = exports.onchain = exports.VaultType = exports.VaultRisk = exports.OffchainSolidexHelper = exports.OffchainPriceHelper = exports.OffchainAccountVault = exports.OffchainLeveragedPosition = exports.OffchainAccountNftlpHyperswapV3 = exports.OffchainAccountNftlpAeroCL = exports.OffchainAccountNftlpUniswapV3 = exports.OffchainAccountNftlpGenericCL = exports.OffchainAccountNftlp = exports.OffchainAccountBorrowableV3 = exports.OffchainAccountCollateralV3 = exports.OffchainAccountLendingPoolV3 = exports.OffchainAccountBorrowableV2 = exports.OffchainAccountCollateralV2 = exports.OffchainAccountLendingPoolV2 = exports.OffchainAccountBorrowable = exports.OffchainAccountCollateral = exports.OffchainAccountLendingPool = exports.OffchainAccountPoolToken = exports.OffchainAccount = exports.OffchainMultichainAccount = exports.OffchainProposal = exports.OffchainPairConfig = exports.OffchainConfigManager = exports.OffchainHedgedVault = exports.OffchainLendingVault = exports.OffchainLeveragedVault = exports.OffchainVault = exports.OffchainNftlpAeroCL = exports.OffchainNftlpHyperswapV3 = exports.OffchainNftlpUniswapV3 = exports.OffchainNftlpGenericCL = exports.OffchainNftlp = exports.OffchainBorrowableV3 = exports.OffchainCollateralV3 = exports.OffchainLendingPoolV3 = exports.OffchainBorrowableV2 = exports.OffchainCollateralV2 = exports.OffchainLendingPoolV2 = exports.OffchainBorrowable = exports.OffchainCollateral = exports.OffchainLendingPool = exports.OffchainPoolToken = exports.Offchain = exports.OffchainMultichain = exports.offchain = void 0;
|
|
30
30
|
exports.OnchainInteractionsCollateralV3 = exports.OnchainInteractionsLendingPoolV3 = exports.OnchainInteractionsBorrowableV2 = exports.OnchainInteractionsCollateralV2 = exports.OnchainInteractionsLendingPoolV2 = exports.OnchainInteractionsBorrowable = exports.OnchainInteractionsCollateral = exports.OnchainInteractionsLendingPool = exports.OnchainInteractionsPoolToken = exports.OnchainInteractions = exports.OnchainContractsHelper = exports.OnchainAccountLendingVault = exports.OnchainAccountNftlpAeroCL = exports.OnchainAccountNftlpHyperswapV3 = exports.OnchainAccountNftlpUniswapV3 = exports.OnchainAccountNftlpGenericCL = exports.OnchainAccountNftlp = exports.OnchainAccountCollateralV3 = exports.OnchainAccountBorrowableV3 = exports.OnchainAccountLendingPoolV3 = exports.OnchainAccountCollateralV2 = exports.OnchainAccountBorrowableV2 = exports.OnchainAccountLendingPoolV2 = exports.OnchainAccountCollateral = exports.OnchainAccountBorrowable = exports.OnchainAccountLendingPool = exports.OnchainAccountPoolToken = exports.OnchainAccount = exports.OnchainPairConfig = exports.OnchainProposal = exports.OnchainConfigManager = exports.OnchainLendingVault = exports.OnchainNftlpHyperswapV3 = exports.OnchainNftlpAeroCL = exports.OnchainNftlpUniswapV3 = exports.OnchainNftlpGenericCL = exports.OnchainNftlp = exports.OnchainCollateralV3 = exports.OnchainBorrowableV3 = exports.OnchainLendingPoolV3 = exports.OnchainCollateralV2 = exports.OnchainBorrowableV2 = exports.OnchainLendingPoolV2 = exports.OnchainCollateral = exports.OnchainBorrowable = exports.OnchainLendingPool = exports.OnchainPoolToken = exports.OnchainImpermaxFactoryV3 = exports.OnchainImpermaxFactoryV2 = exports.OnchainImpermaxFactory = void 0;
|
|
31
31
|
exports.IMPERMAX_CHEF_SUBGRAPH_URL = exports.IMPERMAX_SUBGRAPH_URL = exports.APPROVE_AMOUNT = exports.ZERO = exports.DEADLINE = exports.NOT_SYNCED = exports.getFarmByStakedLPFactory = exports.STAKED_LP_FACTORY = exports.hrFarms = exports.Farms = exports.GENERIC_CL_EXTENSIONS = exports.V2_FACTORIES = exports.LIQUIDATION_FEE_FACTORIES = exports.OLD_KINK_MULTIPLIER_FACTORIES = exports.BORROW_FEE_FACTORIES = exports.SOLIDEX_FACTORIES = exports.ETH_NAME = exports.ETH_SYMBOL = exports.DEBANK_IDS = exports.AMM_LP_FEE = exports.ADD_LIQUIDITY_URLS = exports.AMM_SUBGRAPH_URLS = exports.getAmmByFactory = exports.AMM_FACTORY = exports.hrAmms = exports.MERKLE_URL_IBEX_2 = exports.MERKLE_URL_IBEX = exports.MERKLE_URL_ETH = exports.WETH = exports.SIMPLE_UNISWAP_ORACLE = exports.ROUTER = exports.MERKLE_DISTRIBUTOR_ETH = exports.MERKLE_DISTRIBUTOR_IBEX_2 = exports.MERKLE_DISTRIBUTOR_IBEX = exports.LENDING_VAULT_WATCHER = exports.getFactoryByAddress = exports.getNetworkFactories = exports.IMPERMAX_FACTORY = exports.IMX = exports.IMPERMAX_CHEF = exports.CLAIM_AGGREGATOR = exports.NO_CHANGES = exports.ApprovalType = exports.OnchainInteractionsConfigManager = exports.OnchainInteractionsLendingVault = exports.OnchainInteractionsNftlpAeroCL = exports.OnchainInteractionsNftlpUniswapV3 = exports.OnchainInteractionsNftlpGenericCL = exports.OnchainInteractionsNftlp = exports.OnchainInteractionsBorrowableV3 = void 0;
|
|
32
|
-
exports.OnchainAccountStakingModule = exports.OnchainInteractionsStakingModule = exports.OnchainStakingModule = exports.OffchainAccountStakingModule = exports.XIBEX = exports.IBEX = exports.OffchainStakingModule = exports.LendingVaultEntity = exports.BorrowablePosition = exports.BorrowableEntity = exports.UniswapV2Position = exports.GenericCLPosition = exports.uniV3FeeToTickSpacing = exports.uniV3TickSpacingToFee = exports.isV3Factory = exports.tickSpacingPercentageRanges = exports.clTickToPrice = exports.formatPriceSqrtX96 = exports.MIN_TICK = exports.MAX_TICK = exports.decimalToBalance = exports.Borrowable = exports.PermitType = exports.PositionType = exports.LendingPoolVersion = exports.SortDirection = exports.LendingPoolListOrderBy = exports.VaultListOrderBy = exports.WhitelistState = exports.ProposalState = exports.Amms = exports.PoolTokenType = exports.Extension = exports.Factory = exports.Networks = exports.XIBEX_SUBGRAPH_URL = exports.BLOCKS_SUBGRAPH_URL = void 0;
|
|
32
|
+
exports.OnchainAccountStakingModule = exports.OnchainInteractionsStakingModule = exports.OnchainStakingModule = exports.OffchainAccountStakingModule = exports.XIBEX = exports.IBEX = exports.OffchainStakingModule = exports.LendingVaultEntity = exports.BorrowablePosition = exports.BorrowableEntity = exports.UniswapV2Position = exports.GenericCLPosition = exports.uniV3FeeToTickSpacing = exports.uniV3TickSpacingToFee = exports.isV3Factory = exports.tickSpacingPercentageRanges = exports.clNextTickPrice = exports.clPrevTickPrice = exports.clNearestUsableTickPrice = exports.clPriceToTick = exports.clTickToPrice = exports.formatPriceSqrtX96 = exports.MIN_TICK = exports.MAX_TICK = exports.decimalToBalance = exports.Borrowable = exports.PermitType = exports.PositionType = exports.LendingPoolVersion = exports.SortDirection = exports.LendingPoolListOrderBy = exports.VaultListOrderBy = exports.WhitelistState = exports.ProposalState = exports.Amms = exports.PoolTokenType = exports.Extension = exports.Factory = exports.Networks = exports.XIBEX_SUBGRAPH_URL = exports.BLOCKS_SUBGRAPH_URL = void 0;
|
|
33
33
|
const offchain_1 = __importStar(require("./offchain"));
|
|
34
34
|
exports.Offchain = offchain_1.default;
|
|
35
35
|
Object.defineProperty(exports, "OffchainAccount", { enumerable: true, get: function () { return offchain_1.OffchainAccount; } });
|
|
@@ -226,7 +226,11 @@ Object.defineProperty(exports, "MAX_TICK", { enumerable: true, get: function ()
|
|
|
226
226
|
Object.defineProperty(exports, "MIN_TICK", { enumerable: true, get: function () { return CLGeneral_1.MIN_TICK; } });
|
|
227
227
|
Object.defineProperty(exports, "formatPriceSqrtX96", { enumerable: true, get: function () { return CLGeneral_1.formatPriceSqrtX96; } });
|
|
228
228
|
Object.defineProperty(exports, "clTickToPrice", { enumerable: true, get: function () { return CLGeneral_1.clTickToPrice; } });
|
|
229
|
+
Object.defineProperty(exports, "clNearestUsableTickPrice", { enumerable: true, get: function () { return CLGeneral_1.clNearestUsableTickPrice; } });
|
|
230
|
+
Object.defineProperty(exports, "clPriceToTick", { enumerable: true, get: function () { return CLGeneral_1.clPriceToTick; } });
|
|
229
231
|
Object.defineProperty(exports, "tickSpacingPercentageRanges", { enumerable: true, get: function () { return CLGeneral_1.tickSpacingPercentageRanges; } });
|
|
232
|
+
Object.defineProperty(exports, "clPrevTickPrice", { enumerable: true, get: function () { return CLGeneral_1.clPrevTickPrice; } });
|
|
233
|
+
Object.defineProperty(exports, "clNextTickPrice", { enumerable: true, get: function () { return CLGeneral_1.clNextTickPrice; } });
|
|
230
234
|
const cl_1 = __importDefault(require("./utils/position/cl"));
|
|
231
235
|
exports.GenericCLPosition = cl_1.default;
|
|
232
236
|
const uniswapV2_1 = __importDefault(require("./utils/position/uniswapV2"));
|
|
@@ -27,6 +27,7 @@ class SolidlyStablePosition extends genericPosition_1.default {
|
|
|
27
27
|
this.liquidity = Math.max(liquidity, 0);
|
|
28
28
|
}
|
|
29
29
|
getRealXRealYGivenLiquidityAndPrice(liquidity, price) {
|
|
30
|
+
console.log("getRealXRealYGivenLiquidityAndPrice", liquidity, price);
|
|
30
31
|
if (!this.liquidityCache[liquidity])
|
|
31
32
|
this.liquidityCache[liquidity] = {};
|
|
32
33
|
const cached = this.liquidityCache[liquidity][price];
|
|
@@ -80,6 +81,7 @@ class SolidlyStablePosition extends genericPosition_1.default {
|
|
|
80
81
|
getOptimalLiquidity(amountX, amountY) {
|
|
81
82
|
const sampleX = this.getRealXGivenLiquidity(1);
|
|
82
83
|
const sampleY = this.getRealYGivenLiquidity(1);
|
|
84
|
+
console.log("getOptimalLiquidity", amountX, amountY, sampleX, sampleY);
|
|
83
85
|
if (Math.abs(amountX) / sampleX > Math.abs(amountY) / sampleY)
|
|
84
86
|
amountX = amountY / sampleY * sampleX;
|
|
85
87
|
else
|