impermax-sdk 2.1.523 → 2.1.524

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.
@@ -102,7 +102,7 @@ exports.ROUTER = {
102
102
  },
103
103
  [types_1.Networks.Linea]: {
104
104
  [types_1.Factory.SOLV2]: '0x6E658aC2f3C061719C52FB1E56b064cE165CAF31',
105
- [types_1.Factory.SOL_STABLE]: '',
105
+ [types_1.Factory.SOL_STABLE]: '0xe7e49F0A4E650C8257f35BAa7D7B0c3938ecf544',
106
106
  },
107
107
  [types_1.Networks.Unichain]: {},
108
108
  [types_1.Networks.HyperEVM]: {},
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 } from "./utils/nftlpMath/CLGeneral";
49
+ import { MAX_TICK, MIN_TICK, formatPriceSqrtX96, clTickToPrice, tickSpacingPercentageRanges } 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, 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, 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.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.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,6 +226,7 @@ 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, "tickSpacingPercentageRanges", { enumerable: true, get: function () { return CLGeneral_1.tickSpacingPercentageRanges; } });
229
230
  const cl_1 = __importDefault(require("./utils/position/cl"));
230
231
  exports.GenericCLPosition = cl_1.default;
231
232
  const uniswapV2_1 = __importDefault(require("./utils/position/uniswapV2"));
@@ -6,4 +6,8 @@ export default class OffchainNftlpUniswapV3 extends OffchainNftlpGenericCL {
6
6
  getExtension(): Extension;
7
7
  getNewAccountNftlpObject(accountCollateral: OffchainAccountCollateralV3): OffchainAccountNftlpUniswapV3;
8
8
  initializeFullRangeRateAccurate(tickSpacing: number): Promise<number>;
9
+ getFeesDataList(): Promise<{
10
+ value: number;
11
+ tvl: number;
12
+ }[]>;
9
13
  }
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const offchainAccountNftlpUniswapV3_1 = __importDefault(require("../../account/lendingPool/nftlp/offchainAccountNftlpUniswapV3"));
7
7
  const types_1 = require("../../../config/types");
8
8
  const offchainNftlpGenericCL_1 = __importDefault(require("./offchainNftlpGenericCL"));
9
+ const uniswapV3General_1 = require("../../../utils/nftlpMath/uniswapV3General");
9
10
  const Q128 = 2 ** 128;
10
11
  const Q256 = BigInt(2) ** BigInt(256);
11
12
  class OffchainNftlpUniswapV3 extends offchainNftlpGenericCL_1.default {
@@ -108,5 +109,14 @@ class OffchainNftlpUniswapV3 extends offchainNftlpGenericCL_1.default {
108
109
  // which essentially is the full range rewardRate
109
110
  return Math.sqrt(rewardRate0 * rewardRate1);
110
111
  }
112
+ async getFeesDataList() {
113
+ const tickSpacings = [1, 10, 60, 200]; // univ3 fixed tick spacings
114
+ const fees = await Promise.all(tickSpacings.map(i => this.getGlobalTvl(i)));
115
+ const result = fees.map((tvl, idx) => {
116
+ const fee = (0, uniswapV3General_1.uniV3TickSpacingToFee)(tickSpacings[idx]);
117
+ return { value: fee / 1000000, tvl: tvl };
118
+ });
119
+ return result.sort((a, b) => a.value - b.value);
120
+ }
111
121
  }
112
122
  exports.default = OffchainNftlpUniswapV3;
@@ -11,3 +11,4 @@ export declare function clPrevTickPrice(price: number, priceAdjustment: number,
11
11
  export declare function formatPriceSqrtX96(priceSqrtX96: number, priceAdjustment: number): number;
12
12
  export declare function formatCLLiquidity(liquidityMantissa: number, decimalsA: number, decimalsB: number): number;
13
13
  export declare function clConcentrationFactor(priceA: number, priceB: number): number;
14
+ export declare const tickSpacingPercentageRanges: (tickSpacing: number) => number[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.clConcentrationFactor = exports.formatCLLiquidity = exports.formatPriceSqrtX96 = exports.clPrevTickPrice = exports.clNextTickPrice = exports.clNearestUsableTickPrice = exports.clPriceToTick = exports.clTickToPrice = exports.clPriceAdjustment = exports.MAX_PRICE = exports.MIN_PRICE = exports.MAX_TICK = exports.MIN_TICK = void 0;
3
+ exports.tickSpacingPercentageRanges = exports.clConcentrationFactor = exports.formatCLLiquidity = exports.formatPriceSqrtX96 = exports.clPrevTickPrice = exports.clNextTickPrice = exports.clNearestUsableTickPrice = exports.clPriceToTick = exports.clTickToPrice = exports.clPriceAdjustment = exports.MAX_PRICE = exports.MIN_PRICE = exports.MAX_TICK = exports.MIN_TICK = void 0;
4
4
  exports.MIN_TICK = -887272;
5
5
  exports.MAX_TICK = -exports.MIN_TICK;
6
6
  exports.MIN_PRICE = Math.pow(1.0001, exports.MIN_TICK);
@@ -67,3 +67,16 @@ function clConcentrationFactor(priceA, priceB) {
67
67
  return 1 / (1 - 1 / Math.sqrt(deviationFromAvg));
68
68
  }
69
69
  exports.clConcentrationFactor = clConcentrationFactor;
70
+ // Given a pool's tick spacing calculate price range presets as 1x/3x/5x/7x multiples of the minimum tick increment %
71
+ // ie. tick spacing of 1 : 0.01% | 0.03% | 0.05% | 0.07%
72
+ // tick spacing of 10: 0.10% | 0.30% | 0.50% | 0.70%
73
+ // tick spacing of 50: 0.50% | 1.50% | 2.50% | 3.50%
74
+ // tick spacing of 60: 0.60% | 1.80% | 3.00% | 4.20%
75
+ // etc.
76
+ const tickSpacingPercentageRanges = (tickSpacing) => {
77
+ // Need at least tickSpacing * 0.01%
78
+ const minPercentage = tickSpacing * 0.0001;
79
+ const multipliers = [1, 3, 5, 7];
80
+ return multipliers.map((multiplier) => minPercentage * multiplier);
81
+ };
82
+ exports.tickSpacingPercentageRanges = tickSpacingPercentageRanges;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "2.1.523",
3
+ "version": "2.1.524",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",