impermax-sdk 2.1.521 → 2.1.523

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.
Files changed (40) hide show
  1. package/lib/config/contracts/routers.js +2 -2
  2. package/lib/config/extensions.js +1 -1
  3. package/lib/config/nftlp.js +3 -2
  4. package/lib/config/private-api.d.ts +3 -4
  5. package/lib/config/private-api.js +44 -38
  6. package/lib/config/subgraphs.js +2 -2
  7. package/lib/config/types.d.ts +1 -1
  8. package/lib/config/types.js +1 -1
  9. package/lib/config/whitelist.js +1 -1
  10. package/lib/index.d.ts +5 -4
  11. package/lib/index.js +28 -23
  12. package/lib/offchain/account/lendingPool/nftlp/index.d.ts +2 -1
  13. package/lib/offchain/account/lendingPool/nftlp/index.js +3 -1
  14. package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlpHyperswapV3.d.ts +5 -0
  15. package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlpHyperswapV3.js +12 -0
  16. package/lib/offchain/account/lendingPool/nftlp/offchainAccountNftlpUniswapV3.js +1 -1
  17. package/lib/offchain/initializer/privateApi/nftlpsApi/positions/nftlpTvl.js +6 -6
  18. package/lib/offchain/initializer/privateApi/nftlpsApi/user/uniswapv3/fees.d.ts +3 -3
  19. package/lib/offchain/initializer/privateApi/nftlpsApi/user/uniswapv3/fees.js +7 -8
  20. package/lib/offchain/lendingPool/nftlp/index.d.ts +2 -1
  21. package/lib/offchain/lendingPool/nftlp/index.js +3 -1
  22. package/lib/offchain/lendingPool/nftlp/offchainNftlpHyperswapV3.d.ts +8 -0
  23. package/lib/offchain/lendingPool/nftlp/offchainNftlpHyperswapV3.js +17 -0
  24. package/lib/offchain/lendingPool/offchainCollateralV3.js +3 -3
  25. package/lib/offchain/offchain.js +1 -0
  26. package/lib/offchain/queries/apis/ponder/index.js +2 -2
  27. package/lib/offchain/queries/apis/thegraph/index.js +2 -2
  28. package/lib/onchain/account/lendingPool/nftlp/index.d.ts +2 -1
  29. package/lib/onchain/account/lendingPool/nftlp/index.js +3 -1
  30. package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlpGenericCL.js +6 -0
  31. package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlpHyperswapV3.d.ts +3 -0
  32. package/lib/onchain/account/lendingPool/nftlp/onchainAccountNftlpHyperswapV3.js +10 -0
  33. package/lib/onchain/impermaxFactory/lendingPool/nftlp/index.d.ts +2 -1
  34. package/lib/onchain/impermaxFactory/lendingPool/nftlp/index.js +3 -1
  35. package/lib/onchain/impermaxFactory/lendingPool/nftlp/onchainNftlpHyperswapV3.d.ts +8 -0
  36. package/lib/onchain/impermaxFactory/lendingPool/nftlp/onchainNftlpHyperswapV3.js +18 -0
  37. package/lib/onchain/impermaxFactory/lendingPool/onchainCollateralV3.js +2 -0
  38. package/lib/onchain/impermaxFactory/onchainImpermaxFactoryV3.js +1 -0
  39. package/lib/utils/position/solidlyStable/index.js +3 -0
  40. package/package.json +1 -1
@@ -131,7 +131,7 @@ exports.ACTIONS_GETTER = {
131
131
  [types_1.Networks.Sonic]: '0x58Fe056eff8729a1d42f99d8ce83a9fE81920907',
132
132
  [types_1.Networks.Linea]: '0x121f8cEf8010151C2cbF613848118bd105f15D80',
133
133
  [types_1.Networks.Unichain]: '0x732113815f1ecf7be18360c25b3d84328cfc0448',
134
- [types_1.Networks.HyperEVM]: '0x6c21983b79d97d7789872cdc08dc90e0153b776a'
134
+ [types_1.Networks.HyperEVM]: '0xafebbb512ff4093e757d836eb408df6edf089453'
135
135
  };
136
136
  exports.ROUTER_V3 = {
137
137
  [types_1.Networks.Ropsten]: {},
@@ -166,7 +166,7 @@ exports.ROUTER_V3 = {
166
166
  [types_1.Extension.UniswapV3]: '0x58c5Ca4Ba713A9BBD2A95aCcbC9f545718C822C5'
167
167
  },
168
168
  [types_1.Networks.HyperEVM]: {
169
- [types_1.Extension.UniswapV3]: '0x7d5b92380a1727f909cfe1b267379abfd87437c5'
169
+ [types_1.Extension.HyperswapV3]: '0x0fd27dc61e2dc85ef63298e39cb2879432f2daf6',
170
170
  }
171
171
  };
172
172
  exports.STAKING_ROUTER = {
@@ -5,5 +5,5 @@ const types_1 = require("./types");
5
5
  exports.GENERIC_CL_EXTENSIONS = [
6
6
  types_1.Extension.UniswapV3,
7
7
  types_1.Extension.AeroCL,
8
- types_1.Extension.Hyperswap
8
+ types_1.Extension.HyperswapV3
9
9
  ];
@@ -47,7 +47,8 @@ exports.NFTLP_SUBGRAPH_URL = {
47
47
  ]
48
48
  },
49
49
  [types_1.Networks.HyperEVM]: {
50
- [types_1.Extension.Hyperswap]: [
50
+ [types_1.Extension.HyperswapV3]: [
51
+ "https://hyperevm-nftlp-hyperswapv3.up.railway.app/",
51
52
  "https://api.goldsky.com/api/public/project_cm2d5q4l4w31601vz4swb3vmi/subgraphs/impermax-v3-nftlp-hyperswap-hyperevm/1.0.0/gn",
52
53
  ]
53
54
  }
@@ -85,7 +86,7 @@ exports.NFTLP_FACTORY = {
85
86
  [types_1.Extension.UniswapV3]: "0x62b45128b3c2783d5b1f86e6db92c9aa43eed6af"
86
87
  },
87
88
  [types_1.Networks.HyperEVM]: {
88
- [types_1.Extension.Hyperswap]: "0x6b031e1c622140374ed1908b689e7ea9ddb1f884"
89
+ [types_1.Extension.HyperswapV3]: "0x6b031e1c622140374ed1908b689e7ea9ddb1f884"
89
90
  }
90
91
  };
91
92
  // Helper to get subgraph endpoints
@@ -1,8 +1,8 @@
1
1
  import { NetworkVaultTypeIndex, NetworkFactoryIndex, NetworkExtensionIndex } from "./types";
2
- /**
3
- * Single endpoint for all factory subgraph token prices
4
- */
2
+ /** Single endpoint for all factory subgraph token prices */
5
3
  export declare const PRICE_AGGREGATOR_API_URL = "https://price-aggregator-production.up.railway.app/api/tokens";
4
+ /** Single endpoint to get NFTLP collateral TVL across all networks */
5
+ export declare const POSITIONS_AGGREGATOR_API_URL = "https://positions-aggregator-production.up.railway.app/api/";
6
6
  /**
7
7
  * Private API Endpoints which we might need to use in future for non-core
8
8
  * things (ie. charts, leaderboards, etc.). The app must function well
@@ -11,4 +11,3 @@ export declare const PRICE_AGGREGATOR_API_URL = "https://price-aggregator-produc
11
11
  export declare const IMPERMAX_POOLS_API: NetworkFactoryIndex<string>;
12
12
  export declare const IMPERMAX_VAULT_API: NetworkVaultTypeIndex<string>;
13
13
  export declare const NFTLP_API: NetworkExtensionIndex<string>;
14
- export declare const NFTLP_POSITIONS_API: NetworkExtensionIndex<string>;
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
+ // TODO: Just one nftlp position api
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.NFTLP_POSITIONS_API = exports.NFTLP_API = exports.IMPERMAX_VAULT_API = exports.IMPERMAX_POOLS_API = exports.PRICE_AGGREGATOR_API_URL = void 0;
4
+ exports.NFTLP_API = exports.IMPERMAX_VAULT_API = exports.IMPERMAX_POOLS_API = exports.POSITIONS_AGGREGATOR_API_URL = exports.PRICE_AGGREGATOR_API_URL = void 0;
4
5
  const types_1 = require("./types");
5
- /**
6
- * Single endpoint for all factory subgraph token prices
7
- */
6
+ /** Single endpoint for all factory subgraph token prices */
8
7
  exports.PRICE_AGGREGATOR_API_URL = "https://price-aggregator-production.up.railway.app/api/tokens";
8
+ /** Single endpoint to get NFTLP collateral TVL across all networks */
9
+ exports.POSITIONS_AGGREGATOR_API_URL = "https://positions-aggregator-production.up.railway.app/api/";
9
10
  /**
10
11
  * Private API Endpoints which we might need to use in future for non-core
11
12
  * things (ie. charts, leaderboards, etc.). The app must function well
@@ -113,39 +114,44 @@ exports.NFTLP_API = {
113
114
  [types_1.Networks.Unichain]: {
114
115
  [types_1.Extension.UniswapV3]: "https://unichain-nftlp-uniswapv3.up.railway.app/"
115
116
  },
116
- [types_1.Networks.HyperEVM]: {}
117
+ [types_1.Networks.HyperEVM]: {
118
+ [types_1.Extension.HyperswapV3]: "https://hyperevm-nftlp-hyperswapv3.up.railway.app/"
119
+ }
117
120
  };
121
+ // NOTE: Commented out in favour of single `POSITIONS_AGGREGATOR_API_URL`,
118
122
  // API: Positions/NFTLP TVL
119
- exports.NFTLP_POSITIONS_API = {
120
- [types_1.Networks.Ropsten]: {},
121
- [types_1.Networks.Mainnet]: {},
122
- [types_1.Networks.Polygon]: {},
123
- [types_1.Networks.Arbitrum]: {
124
- [types_1.Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
125
- },
126
- [types_1.Networks.Avalanche]: {},
127
- [types_1.Networks.Mantle]: {},
128
- [types_1.Networks.Moonriver]: {},
129
- [types_1.Networks.Aurora]: {},
130
- [types_1.Networks.Cronos]: {},
131
- [types_1.Networks.Fantom]: {},
132
- [types_1.Networks.Canto]: {},
133
- [types_1.Networks.ZksyncEra]: {},
134
- [types_1.Networks.Harmony]: {},
135
- [types_1.Networks.Moonbeam]: {},
136
- [types_1.Networks.Sxnetwork]: {},
137
- [types_1.Networks.Blast]: {},
138
- [types_1.Networks.Base]: {
139
- [types_1.Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/",
140
- [types_1.Extension.AeroCL]: "https://positions-aggregator-production.up.railway.app/api/"
141
- },
142
- [types_1.Networks.Scroll]: {},
143
- [types_1.Networks.Optimism]: {},
144
- [types_1.Networks.Real]: {},
145
- [types_1.Networks.Sonic]: {},
146
- [types_1.Networks.Linea]: {},
147
- [types_1.Networks.Unichain]: {
148
- [types_1.Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
149
- },
150
- [types_1.Networks.HyperEVM]: {}
151
- };
123
+ // export const NFTLP_POSITIONS_API: NetworkExtensionIndex<string> = {
124
+ // [Networks.Ropsten]: {},
125
+ // [Networks.Mainnet]: {},
126
+ // [Networks.Polygon]: {},
127
+ // [Networks.Arbitrum]: {
128
+ // [Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
129
+ // },
130
+ // [Networks.Avalanche]: {},
131
+ // [Networks.Mantle]: {},
132
+ // [Networks.Moonriver]: {},
133
+ // [Networks.Aurora]: {},
134
+ // [Networks.Cronos]: {},
135
+ // [Networks.Fantom]: {},
136
+ // [Networks.Canto]: {},
137
+ // [Networks.ZksyncEra]: {},
138
+ // [Networks.Harmony]: {},
139
+ // [Networks.Moonbeam]: {},
140
+ // [Networks.Sxnetwork]: {},
141
+ // [Networks.Blast]: {},
142
+ // [Networks.Base]: {
143
+ // [Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/",
144
+ // [Extension.AeroCL]: "https://positions-aggregator-production.up.railway.app/api/"
145
+ // },
146
+ // [Networks.Scroll]: {},
147
+ // [Networks.Optimism]: {},
148
+ // [Networks.Real]: {},
149
+ // [Networks.Sonic]: {},
150
+ // [Networks.Linea]: {},
151
+ // [Networks.Unichain]: {
152
+ // [Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
153
+ // },
154
+ // [Networks.HyperEVM]: {
155
+ // [Extension.HyperswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
156
+ // }
157
+ // };
@@ -37,7 +37,6 @@ exports.IMPERMAX_SUBGRAPH_URL = {
37
37
  [types_1.Factory.SOLV2]: [
38
38
  "https://gateway.thegraph.com/api/e9bbf185bbf657f7ea313387cdf0e5ce/deployments/id/QmXXP4NqyDAf2jDQ7m3W1Y6oKaMo4scjNxCV6nGVNZByx1",
39
39
  ],
40
- [types_1.Factory.V3]: [],
41
40
  },
42
41
  [types_1.Networks.Avalanche]: {
43
42
  [types_1.Factory.V2V1_2]: [
@@ -167,7 +166,8 @@ exports.IMPERMAX_SUBGRAPH_URL = {
167
166
  },
168
167
  [types_1.Networks.HyperEVM]: {
169
168
  [types_1.Factory.V3]: [
170
- 'https://api.goldsky.com/api/public/project_cm2d5q4l4w31601vz4swb3vmi/subgraphs/impermax-v3-hyperevm/1.0.0/gn'
169
+ 'https://hyperevm-factoryv3-production.up.railway.app/',
170
+ 'https://api.goldsky.com/api/public/project_cm2d5q4l4w31601vz4swb3vmi/subgraphs/impermax-v3-hyperevm/1.0.0/gn',
171
171
  ]
172
172
  }
173
173
  };
@@ -40,7 +40,7 @@ export declare enum Extension {
40
40
  UniswapV3 = "2",
41
41
  AerodromeV2 = "3",
42
42
  AeroCL = "4",
43
- Hyperswap = "5"
43
+ HyperswapV3 = "5"
44
44
  }
45
45
  export declare enum PoolTokenType {
46
46
  Collateral = "collateral",
@@ -46,7 +46,7 @@ var Extension;
46
46
  Extension["UniswapV3"] = "2";
47
47
  Extension["AerodromeV2"] = "3";
48
48
  Extension["AeroCL"] = "4";
49
- Extension["Hyperswap"] = "5";
49
+ Extension["HyperswapV3"] = "5";
50
50
  //UniswapV4,
51
51
  //Algebra,
52
52
  })(Extension = exports.Extension || (exports.Extension = {}));
@@ -283,7 +283,7 @@ exports.WHITELISTED_PAIRS = {
283
283
  [types_1.Networks.HyperEVM]: {
284
284
  [types_1.Factory.V3]: [
285
285
  "0x54bdbd183e8623288c205f37ae957ff33d077de8",
286
- "0x62Eb5c0f829e7fAE4da4B1bDE3b1540F581Fc187" // HYPE/USDT0
286
+ "0x62eb5c0f829e7fae4da4b1bde3b1540f581fc187" // HYPE/USDT0
287
287
  ]
288
288
  }
289
289
  };
package/lib/index.d.ts CHANGED
@@ -43,6 +43,7 @@ import OnchainInteractionsNftlp, { OnchainInteractionsNftlpAeroCL, OnchainIntera
43
43
  import OnchainAccountNftlpUniswapV3 from './onchain/account/lendingPool/nftlp/onchainAccountNftlpUniswapV3';
44
44
  import OnchainAccountLendingPoolV3 from './onchain/account/lendingPool/onchainAccountLendingPoolV3';
45
45
  import OnchainAccountLendingPoolV2 from './onchain/account/lendingPool/onchainAccountLendingPoolV2';
46
+ import OnchainAccountNftlpHyperswapV3 from './onchain/account/lendingPool/nftlp';
46
47
  import { decimalToBalance } from './utils/ether-utils';
47
48
  import OffchainAccountLendingPoolV3 from "./offchain/account/lendingPool/offchainAccountLendingPoolV3";
48
49
  import { MAX_TICK, MIN_TICK, formatPriceSqrtX96, clTickToPrice } from "./utils/nftlpMath/CLGeneral";
@@ -57,7 +58,7 @@ import OffchainBorrowableV2 from './offchain/lendingPool/offchainBorrowableV2';
57
58
  import OffchainCollateralV2 from './offchain/lendingPool/offchainCollateralV2';
58
59
  import OffchainBorrowableV3 from './offchain/lendingPool/offchainBorrowableV3';
59
60
  import OffchainLendingPoolV3 from './offchain/lendingPool/offchainLendingPoolV3';
60
- import OffchainNftlp, { OffchainNftlpUniswapV3, OffchainNftlpAeroCL, OffchainNftlpGenericCL } from './offchain/lendingPool/nftlp';
61
+ import OffchainNftlp, { OffchainNftlpUniswapV3, OffchainNftlpAeroCL, OffchainNftlpGenericCL, OffchainNftlpHyperswapV3 } from './offchain/lendingPool/nftlp';
61
62
  import OffchainCollateralV3 from './offchain/lendingPool/offchainCollateralV3';
62
63
  import OffchainAccountLendingPoolV2 from './offchain/account/lendingPool/offchainAccountLendingPoolV2';
63
64
  import OffchainAccountBorrowableV2 from './offchain/account/lendingPool/offchainAccountBorrowableV2';
@@ -65,7 +66,7 @@ import OffchainAccountCollateralV3 from './offchain/account/lendingPool/offchain
65
66
  import OffchainAccountNftlp from './offchain/account/lendingPool/nftlp/offchainAccountNftlp';
66
67
  import { OnchainImpermaxFactoryV3 } from './onchain/impermaxFactory';
67
68
  import { OnchainImpermaxFactoryV2 } from './onchain/impermaxFactory';
68
- import { OnchainNftlpAeroCL, OnchainNftlpGenericCL, OnchainNftlpUniswapV3 } from './onchain/impermaxFactory/lendingPool/nftlp';
69
+ import { OnchainNftlpAeroCL, OnchainNftlpGenericCL, OnchainNftlpUniswapV3, OnchainNftlpHyperswapV3 } from './onchain/impermaxFactory/lendingPool/nftlp';
69
70
  import OnchainNftlp from './onchain/impermaxFactory/lendingPool/nftlp';
70
71
  import OnchainAccountNftlp, { OnchainAccountNftlpAeroCL, OnchainAccountNftlpGenericCL } from './onchain/account/lendingPool/nftlp';
71
72
  import OffchainAccountBorrowableV3 from './offchain/account/lendingPool/offchainAccountBorrowableV3';
@@ -76,6 +77,6 @@ import OffchainAccountStakingModule from './offchain/account/staking';
76
77
  import OnchainStakingModule from './onchain';
77
78
  import OnchainInteractionsStakingModule from './onchain/interactions/onchainInteractionsStakingModule';
78
79
  import OnchainAccountStakingModule from './onchain/account/onchainAccountStakingModule';
79
- import { OffchainAccountNftlpAeroCL, OffchainAccountNftlpGenericCL, OffchainAccountNftlpUniswapV3 } from './offchain/account/lendingPool/nftlp';
80
+ import { OffchainAccountNftlpAeroCL, OffchainAccountNftlpGenericCL, OffchainAccountNftlpUniswapV3, OffchainAccountNftlpHyperswapV3 } from './offchain/account/lendingPool/nftlp';
80
81
  import { uniV3FeeToTickSpacing, uniV3TickSpacingToFee } from "./utils/nftlpMath/uniswapV3General";
81
- export { offchain, OffchainMultichain, Offchain, OffchainPoolToken, OffchainLendingPool, OffchainCollateral, OffchainBorrowable, OffchainLendingPoolV2, OffchainCollateralV2, OffchainBorrowableV2, OffchainLendingPoolV3, OffchainCollateralV3, OffchainBorrowableV3, OffchainNftlp, OffchainNftlpGenericCL, OffchainNftlpUniswapV3, OffchainNftlpAeroCL, OffchainVault, OffchainLeveragedVault, OffchainLendingVault, OffchainHedgedVault, OffchainConfigManager, OffchainPairConfig, OffchainProposal, OffchainMultichainAccount, OffchainAccount, OffchainAccountPoolToken, OffchainAccountLendingPool, OffchainAccountCollateral, OffchainAccountBorrowable, OffchainAccountLendingPoolV2, OffchainAccountCollateralV2, OffchainAccountBorrowableV2, OffchainAccountLendingPoolV3, OffchainAccountCollateralV3, OffchainAccountBorrowableV3, OffchainAccountNftlp, OffchainAccountNftlpGenericCL, OffchainAccountNftlpUniswapV3, OffchainAccountNftlpAeroCL, 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, OnchainLendingVault, OnchainConfigManager, OnchainProposal, OnchainPairConfig, OnchainAccount, OnchainAccountPoolToken, OnchainAccountLendingPool, OnchainAccountBorrowable, OnchainAccountCollateral, OnchainAccountLendingPoolV2, OnchainAccountBorrowableV2, OnchainAccountCollateralV2, OnchainAccountLendingPoolV3, OnchainAccountBorrowableV3, OnchainAccountCollateralV3, OnchainAccountNftlp, OnchainAccountNftlpGenericCL, OnchainAccountNftlpUniswapV3, 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, 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
@@ -26,10 +26,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.OnchainImpermaxFactoryV2 = exports.OnchainImpermaxFactory = exports.Onchain = exports.onchain = exports.VaultType = exports.VaultRisk = exports.OffchainSolidexHelper = exports.OffchainPriceHelper = exports.OffchainAccountVault = exports.OffchainLeveragedPosition = 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.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
- exports.OnchainInteractionsNftlpUniswapV3 = exports.OnchainInteractionsNftlpGenericCL = exports.OnchainInteractionsNftlp = exports.OnchainInteractionsBorrowableV3 = 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.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.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 = void 0;
31
- exports.Factory = exports.Networks = exports.XIBEX_SUBGRAPH_URL = exports.BLOCKS_SUBGRAPH_URL = 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 = 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 = void 0;
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
+ 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
+ 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;
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; } });
@@ -214,6 +214,8 @@ const onchainAccountLendingPoolV3_1 = __importDefault(require("./onchain/account
214
214
  exports.OnchainAccountLendingPoolV3 = onchainAccountLendingPoolV3_1.default;
215
215
  const onchainAccountLendingPoolV2_1 = __importDefault(require("./onchain/account/lendingPool/onchainAccountLendingPoolV2"));
216
216
  exports.OnchainAccountLendingPoolV2 = onchainAccountLendingPoolV2_1.default;
217
+ const nftlp_2 = __importDefault(require("./onchain/account/lendingPool/nftlp"));
218
+ exports.OnchainAccountNftlpHyperswapV3 = nftlp_2.default;
217
219
  // Utils
218
220
  const ether_utils_1 = require("./utils/ether-utils");
219
221
  Object.defineProperty(exports, "decimalToBalance", { enumerable: true, get: function () { return ether_utils_1.decimalToBalance; } });
@@ -244,11 +246,12 @@ const offchainBorrowableV3_1 = __importDefault(require("./offchain/lendingPool/o
244
246
  exports.OffchainBorrowableV3 = offchainBorrowableV3_1.default;
245
247
  const offchainLendingPoolV3_1 = __importDefault(require("./offchain/lendingPool/offchainLendingPoolV3"));
246
248
  exports.OffchainLendingPoolV3 = offchainLendingPoolV3_1.default;
247
- const nftlp_2 = __importStar(require("./offchain/lendingPool/nftlp"));
248
- exports.OffchainNftlp = nftlp_2.default;
249
- Object.defineProperty(exports, "OffchainNftlpUniswapV3", { enumerable: true, get: function () { return nftlp_2.OffchainNftlpUniswapV3; } });
250
- Object.defineProperty(exports, "OffchainNftlpAeroCL", { enumerable: true, get: function () { return nftlp_2.OffchainNftlpAeroCL; } });
251
- Object.defineProperty(exports, "OffchainNftlpGenericCL", { enumerable: true, get: function () { return nftlp_2.OffchainNftlpGenericCL; } });
249
+ const nftlp_3 = __importStar(require("./offchain/lendingPool/nftlp"));
250
+ exports.OffchainNftlp = nftlp_3.default;
251
+ Object.defineProperty(exports, "OffchainNftlpUniswapV3", { enumerable: true, get: function () { return nftlp_3.OffchainNftlpUniswapV3; } });
252
+ Object.defineProperty(exports, "OffchainNftlpAeroCL", { enumerable: true, get: function () { return nftlp_3.OffchainNftlpAeroCL; } });
253
+ Object.defineProperty(exports, "OffchainNftlpGenericCL", { enumerable: true, get: function () { return nftlp_3.OffchainNftlpGenericCL; } });
254
+ Object.defineProperty(exports, "OffchainNftlpHyperswapV3", { enumerable: true, get: function () { return nftlp_3.OffchainNftlpHyperswapV3; } });
252
255
  const offchainCollateralV3_1 = __importDefault(require("./offchain/lendingPool/offchainCollateralV3"));
253
256
  exports.OffchainCollateralV3 = offchainCollateralV3_1.default;
254
257
  const offchainAccountLendingPoolV2_1 = __importDefault(require("./offchain/account/lendingPool/offchainAccountLendingPoolV2"));
@@ -263,16 +266,17 @@ const impermaxFactory_1 = require("./onchain/impermaxFactory");
263
266
  Object.defineProperty(exports, "OnchainImpermaxFactoryV3", { enumerable: true, get: function () { return impermaxFactory_1.OnchainImpermaxFactoryV3; } });
264
267
  const impermaxFactory_2 = require("./onchain/impermaxFactory");
265
268
  Object.defineProperty(exports, "OnchainImpermaxFactoryV2", { enumerable: true, get: function () { return impermaxFactory_2.OnchainImpermaxFactoryV2; } });
266
- const nftlp_3 = require("./onchain/impermaxFactory/lendingPool/nftlp");
267
- Object.defineProperty(exports, "OnchainNftlpAeroCL", { enumerable: true, get: function () { return nftlp_3.OnchainNftlpAeroCL; } });
268
- Object.defineProperty(exports, "OnchainNftlpGenericCL", { enumerable: true, get: function () { return nftlp_3.OnchainNftlpGenericCL; } });
269
- Object.defineProperty(exports, "OnchainNftlpUniswapV3", { enumerable: true, get: function () { return nftlp_3.OnchainNftlpUniswapV3; } });
270
- const nftlp_4 = __importDefault(require("./onchain/impermaxFactory/lendingPool/nftlp"));
271
- exports.OnchainNftlp = nftlp_4.default;
272
- const nftlp_5 = __importStar(require("./onchain/account/lendingPool/nftlp"));
273
- exports.OnchainAccountNftlp = nftlp_5.default;
274
- Object.defineProperty(exports, "OnchainAccountNftlpAeroCL", { enumerable: true, get: function () { return nftlp_5.OnchainAccountNftlpAeroCL; } });
275
- Object.defineProperty(exports, "OnchainAccountNftlpGenericCL", { enumerable: true, get: function () { return nftlp_5.OnchainAccountNftlpGenericCL; } });
269
+ const nftlp_4 = require("./onchain/impermaxFactory/lendingPool/nftlp");
270
+ Object.defineProperty(exports, "OnchainNftlpAeroCL", { enumerable: true, get: function () { return nftlp_4.OnchainNftlpAeroCL; } });
271
+ Object.defineProperty(exports, "OnchainNftlpGenericCL", { enumerable: true, get: function () { return nftlp_4.OnchainNftlpGenericCL; } });
272
+ Object.defineProperty(exports, "OnchainNftlpUniswapV3", { enumerable: true, get: function () { return nftlp_4.OnchainNftlpUniswapV3; } });
273
+ Object.defineProperty(exports, "OnchainNftlpHyperswapV3", { enumerable: true, get: function () { return nftlp_4.OnchainNftlpHyperswapV3; } });
274
+ const nftlp_5 = __importDefault(require("./onchain/impermaxFactory/lendingPool/nftlp"));
275
+ exports.OnchainNftlp = nftlp_5.default;
276
+ const nftlp_6 = __importStar(require("./onchain/account/lendingPool/nftlp"));
277
+ exports.OnchainAccountNftlp = nftlp_6.default;
278
+ Object.defineProperty(exports, "OnchainAccountNftlpAeroCL", { enumerable: true, get: function () { return nftlp_6.OnchainAccountNftlpAeroCL; } });
279
+ Object.defineProperty(exports, "OnchainAccountNftlpGenericCL", { enumerable: true, get: function () { return nftlp_6.OnchainAccountNftlpGenericCL; } });
276
280
  const offchainAccountBorrowableV3_1 = __importDefault(require("./offchain/account/lendingPool/offchainAccountBorrowableV3"));
277
281
  exports.OffchainAccountBorrowableV3 = offchainAccountBorrowableV3_1.default;
278
282
  const offchainStakingModule_1 = __importDefault(require("./offchain/staking/offchainStakingModule"));
@@ -285,10 +289,11 @@ const onchainInteractionsStakingModule_1 = __importDefault(require("./onchain/in
285
289
  exports.OnchainInteractionsStakingModule = onchainInteractionsStakingModule_1.default;
286
290
  const onchainAccountStakingModule_1 = __importDefault(require("./onchain/account/onchainAccountStakingModule"));
287
291
  exports.OnchainAccountStakingModule = onchainAccountStakingModule_1.default;
288
- const nftlp_6 = require("./offchain/account/lendingPool/nftlp");
289
- Object.defineProperty(exports, "OffchainAccountNftlpAeroCL", { enumerable: true, get: function () { return nftlp_6.OffchainAccountNftlpAeroCL; } });
290
- Object.defineProperty(exports, "OffchainAccountNftlpGenericCL", { enumerable: true, get: function () { return nftlp_6.OffchainAccountNftlpGenericCL; } });
291
- Object.defineProperty(exports, "OffchainAccountNftlpUniswapV3", { enumerable: true, get: function () { return nftlp_6.OffchainAccountNftlpUniswapV3; } });
292
+ const nftlp_7 = require("./offchain/account/lendingPool/nftlp");
293
+ Object.defineProperty(exports, "OffchainAccountNftlpAeroCL", { enumerable: true, get: function () { return nftlp_7.OffchainAccountNftlpAeroCL; } });
294
+ Object.defineProperty(exports, "OffchainAccountNftlpGenericCL", { enumerable: true, get: function () { return nftlp_7.OffchainAccountNftlpGenericCL; } });
295
+ Object.defineProperty(exports, "OffchainAccountNftlpUniswapV3", { enumerable: true, get: function () { return nftlp_7.OffchainAccountNftlpUniswapV3; } });
296
+ Object.defineProperty(exports, "OffchainAccountNftlpHyperswapV3", { enumerable: true, get: function () { return nftlp_7.OffchainAccountNftlpHyperswapV3; } });
292
297
  const uniswapV3General_1 = require("./utils/nftlpMath/uniswapV3General");
293
298
  Object.defineProperty(exports, "uniV3FeeToTickSpacing", { enumerable: true, get: function () { return uniswapV3General_1.uniV3FeeToTickSpacing; } });
294
299
  Object.defineProperty(exports, "uniV3TickSpacingToFee", { enumerable: true, get: function () { return uniswapV3General_1.uniV3TickSpacingToFee; } });
@@ -2,5 +2,6 @@ import OffchainAccountNftlp from './offchainAccountNftlp';
2
2
  import OffchainAccountNftlpGenericCL from './offchainAccountNftlpGenericCL';
3
3
  import OffchainAccountNftlpUniswapV3 from './offchainAccountNftlpUniswapV3';
4
4
  import OffchainAccountNftlpAeroCL from './offchainAccountNftlpAeroCL';
5
- export { OffchainAccountNftlp, OffchainAccountNftlpGenericCL, OffchainAccountNftlpUniswapV3, OffchainAccountNftlpAeroCL, };
5
+ import OffchainAccountNftlpHyperswapV3 from './offchainAccountNftlpHyperswapV3';
6
+ export { OffchainAccountNftlp, OffchainAccountNftlpGenericCL, OffchainAccountNftlpUniswapV3, OffchainAccountNftlpAeroCL, OffchainAccountNftlpHyperswapV3 };
6
7
  export default OffchainAccountNftlp;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.OffchainAccountNftlpAeroCL = exports.OffchainAccountNftlpUniswapV3 = exports.OffchainAccountNftlpGenericCL = exports.OffchainAccountNftlp = void 0;
6
+ exports.OffchainAccountNftlpHyperswapV3 = exports.OffchainAccountNftlpAeroCL = exports.OffchainAccountNftlpUniswapV3 = exports.OffchainAccountNftlpGenericCL = exports.OffchainAccountNftlp = void 0;
7
7
  const offchainAccountNftlp_1 = __importDefault(require("./offchainAccountNftlp"));
8
8
  exports.OffchainAccountNftlp = offchainAccountNftlp_1.default;
9
9
  const offchainAccountNftlpGenericCL_1 = __importDefault(require("./offchainAccountNftlpGenericCL"));
@@ -12,4 +12,6 @@ const offchainAccountNftlpUniswapV3_1 = __importDefault(require("./offchainAccou
12
12
  exports.OffchainAccountNftlpUniswapV3 = offchainAccountNftlpUniswapV3_1.default;
13
13
  const offchainAccountNftlpAeroCL_1 = __importDefault(require("./offchainAccountNftlpAeroCL"));
14
14
  exports.OffchainAccountNftlpAeroCL = offchainAccountNftlpAeroCL_1.default;
15
+ const offchainAccountNftlpHyperswapV3_1 = __importDefault(require("./offchainAccountNftlpHyperswapV3"));
16
+ exports.OffchainAccountNftlpHyperswapV3 = offchainAccountNftlpHyperswapV3_1.default;
15
17
  exports.default = offchainAccountNftlp_1.default;
@@ -0,0 +1,5 @@
1
+ import { OffchainNftlpHyperswapV3 } from "../../../lendingPool/nftlp";
2
+ import OffchainAccountNftlpUniswapV3 from "./offchainAccountNftlpUniswapV3";
3
+ export default class OffchainAccountNftlpHyperswapV3 extends OffchainAccountNftlpUniswapV3 {
4
+ getNftlp(): OffchainNftlpHyperswapV3;
5
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const offchainAccountNftlpUniswapV3_1 = __importDefault(require("./offchainAccountNftlpUniswapV3"));
7
+ class OffchainAccountNftlpHyperswapV3 extends offchainAccountNftlpUniswapV3_1.default {
8
+ getNftlp() {
9
+ return super.getNftlp();
10
+ }
11
+ }
12
+ exports.default = OffchainAccountNftlpHyperswapV3;
@@ -26,7 +26,7 @@ class OffchainAccountNftlpUniswapV3 extends offchainAccountNftlpGenericCL_1.defa
26
26
  const positionId = `${lendingPoolId}-${tokenId}`;
27
27
  try {
28
28
  const account = this.getLendingPool().getAccount().getAccountAddress();
29
- const positionFees = await this.getLendingPool().getLendingPool().getOffchain().getUniswapV3NewlyEarnedFees(account, positionId);
29
+ const positionFees = await this.getLendingPool().getLendingPool().getOffchain().getUniswapV3NewlyEarnedFees(account, this.getNftlp().getExtension(), positionId);
30
30
  this.cache.newlyEarnedFees[tokenId] = { amountX: Number(positionFees?.newlyEarnedFees0), amountY: Number(positionFees?.newlyEarnedFees1) };
31
31
  return this.cache.newlyEarnedFees[tokenId];
32
32
  }
@@ -7,13 +7,13 @@ const private_api_1 = require("../../../../../config/private-api");
7
7
  *--------------------------------------------------------------------------*/
8
8
  // Fetches all charts of all lending pools for an NFTLP factory (ie. Dex)
9
9
  async function fetchNftlpTvls(extension) {
10
- const api = private_api_1.NFTLP_POSITIONS_API[this.network][extension];
11
- if (!api) {
12
- //console.log(`No NFTLP Positions API in ${this.network} for extension ${extension}`)
13
- return {};
14
- }
10
+ // const api = POSITIONS_AGGREGATOR_API_URL[this.network][extension];
11
+ // if (!api) {
12
+ // //console.log(`No NFTLP Positions API in ${this.network} for extension ${extension}`)
13
+ // return {}
14
+ // }
15
15
  try {
16
- const response = await this.offchainMultichain.getEndpointManager().fetchAPI(api.concat(`${this.chainId}/nftlps`));
16
+ const response = await this.offchainMultichain.getEndpointManager().fetchAPI(private_api_1.POSITIONS_AGGREGATOR_API_URL.concat(`${this.chainId}/nftlps`));
17
17
  return response;
18
18
  }
19
19
  catch (err) {
@@ -1,5 +1,5 @@
1
- import { AddressIndex, Address } from "../../../../../../config/types";
1
+ import { AddressIndex, Extension, Address } from "../../../../../../config/types";
2
2
  import Offchain from "../../../../../offchain";
3
3
  import { NewlyEarnedFees } from "../../../../../offchainTypes";
4
- export declare function fetchUniswapV3NewlyEarnedFees(this: Offchain, account: Address): Promise<AddressIndex<NewlyEarnedFees>>;
5
- export declare function getUniswapV3NewlyEarnedFees(this: Offchain, account: Address, positionId: string): Promise<NewlyEarnedFees | undefined>;
4
+ export declare function fetchUniswapV3NewlyEarnedFees(this: Offchain, account: Address, extension: Extension): Promise<AddressIndex<NewlyEarnedFees>>;
5
+ export declare function getUniswapV3NewlyEarnedFees(this: Offchain, account: Address, extension: Extension, positionId: string): Promise<NewlyEarnedFees | undefined>;
@@ -2,13 +2,12 @@
2
2
  // private-api: uniswapv3 fees
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.getUniswapV3NewlyEarnedFees = exports.fetchUniswapV3NewlyEarnedFees = void 0;
5
- const types_1 = require("../../../../../../config/types");
6
5
  const private_api_1 = require("../../../../../../config/private-api");
7
6
  /*--------------------------------------------------------------------------*
8
7
  * Fetchers *
9
8
  *--------------------------------------------------------------------------*/
10
- async function fetchUniswapV3NewlyEarnedFees(account) {
11
- const api = private_api_1.NFTLP_API[this.network][types_1.Extension.UniswapV3];
9
+ async function fetchUniswapV3NewlyEarnedFees(account, extension) {
10
+ const api = private_api_1.NFTLP_API[this.network][extension];
12
11
  if (!api) {
13
12
  console.log(`Missing NFTLP uniswapV3 fees api on ${this.network}?`);
14
13
  return {};
@@ -17,7 +16,7 @@ async function fetchUniswapV3NewlyEarnedFees(account) {
17
16
  if (!v3Positions?.positions)
18
17
  return {};
19
18
  // Get only cl positions
20
- const uniswapV3Positions = Object.entries(v3Positions.positions).flatMap(([_, position]) => position.filter(i => i.dex === types_1.Extension.UniswapV3));
19
+ const uniswapV3Positions = Object.entries(v3Positions.positions).flatMap(([_, position]) => position.filter(i => i.dex === extension));
21
20
  // Get the unqiue position ID ie. lendingPoolId-tokenId
22
21
  const positionIds = uniswapV3Positions.map(i => i.id);
23
22
  try {
@@ -33,13 +32,13 @@ exports.fetchUniswapV3NewlyEarnedFees = fetchUniswapV3NewlyEarnedFees;
33
32
  /*--------------------------------------------------------------------------*
34
33
  * Getters *
35
34
  *--------------------------------------------------------------------------*/
36
- async function getUniswapV3NewlyEarnedFees(account, positionId) {
35
+ async function getUniswapV3NewlyEarnedFees(account, extension, positionId) {
37
36
  if (!this.userNewlyEarnedFeesData[account])
38
37
  this.userNewlyEarnedFeesData[account] = {};
39
- if (!this.userNewlyEarnedFeesData[account][types_1.Extension.UniswapV3]) {
40
- this.userNewlyEarnedFeesData[account][types_1.Extension.UniswapV3] = this.fetchUniswapV3NewlyEarnedFees(account);
38
+ if (!this.userNewlyEarnedFeesData[account][extension]) {
39
+ this.userNewlyEarnedFeesData[account][extension] = this.fetchUniswapV3NewlyEarnedFees(account, extension);
41
40
  }
42
- const feesData = await this.userNewlyEarnedFeesData[account][types_1.Extension.UniswapV3];
41
+ const feesData = await this.userNewlyEarnedFeesData[account][extension];
43
42
  return feesData?.[positionId];
44
43
  }
45
44
  exports.getUniswapV3NewlyEarnedFees = getUniswapV3NewlyEarnedFees;
@@ -2,5 +2,6 @@ import OffchainNftlp from './offchainNftlp';
2
2
  import OffchainNftlpGenericCL from './offchainNftlpGenericCL';
3
3
  import OffchainNftlpUniswapV3 from './offchainNftlpUniswapV3';
4
4
  import OffchainNftlpAeroCL from './offchainNftlpAeroCL';
5
- export { OffchainNftlp, OffchainNftlpGenericCL, OffchainNftlpUniswapV3, OffchainNftlpAeroCL };
5
+ import OffchainNftlpHyperswapV3 from './offchainNftlpHyperswapV3';
6
+ export { OffchainNftlp, OffchainNftlpGenericCL, OffchainNftlpUniswapV3, OffchainNftlpAeroCL, OffchainNftlpHyperswapV3 };
6
7
  export default OffchainNftlp;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.OffchainNftlpAeroCL = exports.OffchainNftlpUniswapV3 = exports.OffchainNftlpGenericCL = exports.OffchainNftlp = void 0;
6
+ exports.OffchainNftlpHyperswapV3 = exports.OffchainNftlpAeroCL = exports.OffchainNftlpUniswapV3 = exports.OffchainNftlpGenericCL = exports.OffchainNftlp = void 0;
7
7
  const offchainNftlp_1 = __importDefault(require("./offchainNftlp"));
8
8
  exports.OffchainNftlp = offchainNftlp_1.default;
9
9
  const offchainNftlpGenericCL_1 = __importDefault(require("./offchainNftlpGenericCL"));
@@ -12,4 +12,6 @@ const offchainNftlpUniswapV3_1 = __importDefault(require("./offchainNftlpUniswap
12
12
  exports.OffchainNftlpUniswapV3 = offchainNftlpUniswapV3_1.default;
13
13
  const offchainNftlpAeroCL_1 = __importDefault(require("./offchainNftlpAeroCL"));
14
14
  exports.OffchainNftlpAeroCL = offchainNftlpAeroCL_1.default;
15
+ const offchainNftlpHyperswapV3_1 = __importDefault(require("./offchainNftlpHyperswapV3"));
16
+ exports.OffchainNftlpHyperswapV3 = offchainNftlpHyperswapV3_1.default;
15
17
  exports.default = offchainNftlp_1.default;
@@ -0,0 +1,8 @@
1
+ import OffchainAccountCollateralV3 from "../../account/lendingPool/offchainAccountCollateralV3";
2
+ import { OffchainAccountNftlpHyperswapV3 } from "../../account/lendingPool/nftlp";
3
+ import { Extension } from "../../../config/types";
4
+ import OffchainNftlpUniswapV3 from "./offchainNftlpUniswapV3";
5
+ export default class OffchainNftlpHyperswapV3 extends OffchainNftlpUniswapV3 {
6
+ getExtension(): Extension;
7
+ getNewAccountNftlpObject(accountCollateral: OffchainAccountCollateralV3): OffchainAccountNftlpHyperswapV3;
8
+ }
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const nftlp_1 = require("../../account/lendingPool/nftlp");
7
+ const types_1 = require("../../../config/types");
8
+ const offchainNftlpUniswapV3_1 = __importDefault(require("./offchainNftlpUniswapV3"));
9
+ class OffchainNftlpHyperswapV3 extends offchainNftlpUniswapV3_1.default {
10
+ getExtension() {
11
+ return types_1.Extension.HyperswapV3;
12
+ }
13
+ getNewAccountNftlpObject(accountCollateral) {
14
+ return new nftlp_1.OffchainAccountNftlpHyperswapV3(accountCollateral);
15
+ }
16
+ }
17
+ exports.default = OffchainNftlpHyperswapV3;
@@ -4,7 +4,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const offchainCollateral_1 = __importDefault(require("./offchainCollateral"));
7
- const offchainNftlpUniswapV3_1 = __importDefault(require("./nftlp/offchainNftlpUniswapV3"));
8
7
  const types_1 = require("../../config/types");
9
8
  const nftlp_1 = require("./nftlp");
10
9
  class OffchainCollateralV3 extends offchainCollateral_1.default {
@@ -12,10 +11,11 @@ class OffchainCollateralV3 extends offchainCollateral_1.default {
12
11
  getNewNftlpObject(extension) {
13
12
  switch (extension) {
14
13
  case types_1.Extension.UniswapV3:
15
- case types_1.Extension.Hyperswap:
16
- return new offchainNftlpUniswapV3_1.default(this);
14
+ return new nftlp_1.OffchainNftlpUniswapV3(this);
17
15
  case types_1.Extension.AeroCL:
18
16
  return new nftlp_1.OffchainNftlpAeroCL(this);
17
+ case types_1.Extension.HyperswapV3:
18
+ return new nftlp_1.OffchainNftlpHyperswapV3(this);
19
19
  case types_1.Extension.UniswapV2:
20
20
  throw new Error(`NFTLP UniswapV2 not yet implemented`);
21
21
  case types_1.Extension.AerodromeV2:
@@ -138,6 +138,7 @@ class Offchain {
138
138
  // this.stakingModule = new OffchainStakingModule(this);
139
139
  this.extensionStatsData[types_1.Extension.UniswapV3] = this.fetchNftlpTvls(types_1.Extension.UniswapV3);
140
140
  this.extensionStatsData[types_1.Extension.AeroCL] = this.fetchNftlpTvls(types_1.Extension.AeroCL);
141
+ this.extensionStatsData[types_1.Extension.HyperswapV3] = this.fetchNftlpTvls(types_1.Extension.HyperswapV3);
141
142
  }
142
143
  async cleanCache() {
143
144
  this.lendingPoolsData = null;
@@ -416,7 +416,7 @@ class PonderQueryBuilder {
416
416
  * NFTLP
417
417
  *-----------------------------*/
418
418
  nftlpsQuery(extension, network) {
419
- if (extension === types_1.Extension.UniswapV3 || extension === types_1.Extension.AeroCL) {
419
+ if (extension === types_1.Extension.UniswapV3 || extension === types_1.Extension.AeroCL || extension === types_1.Extension.HyperswapV3) {
420
420
  return (0, graphql_tag_1.default) `{
421
421
  nftlps(limit: 1000) {
422
422
  items {
@@ -449,7 +449,7 @@ class PonderQueryBuilder {
449
449
  return (0, graphql_tag_1.default) `{}`;
450
450
  }
451
451
  nftlpPositionQuery(extension, positionIds) {
452
- if (extension === types_1.Extension.UniswapV3)
452
+ if (extension === types_1.Extension.UniswapV3 || extension === types_1.Extension.HyperswapV3)
453
453
  return this.nftlpUniswapV3PositionsQuery(positionIds);
454
454
  if (extension === types_1.Extension.AeroCL)
455
455
  return this.nftlpAeroCLPositionsQuery(positionIds);
@@ -296,7 +296,7 @@ class TheGraphQueryBuilder {
296
296
  * Nftlps
297
297
  *-----------------------------*/
298
298
  nftlpsQuery(extension, network) {
299
- if (extension === types_1.Extension.UniswapV3 || extension === types_1.Extension.AeroCL || extension === types_1.Extension.Hyperswap) {
299
+ if (extension === types_1.Extension.UniswapV3 || extension === types_1.Extension.AeroCL || extension === types_1.Extension.HyperswapV3) {
300
300
  return (0, graphql_tag_1.default) `{
301
301
  nftlps(first: 1000) {
302
302
  id
@@ -328,7 +328,7 @@ class TheGraphQueryBuilder {
328
328
  return (0, graphql_tag_1.default) `{}`;
329
329
  }
330
330
  nftlpPositionQuery(extension, positionIds) {
331
- if (extension === types_1.Extension.UniswapV3 || extension === types_1.Extension.Hyperswap)
331
+ if (extension === types_1.Extension.UniswapV3 || extension === types_1.Extension.HyperswapV3)
332
332
  return this.nftlpUniswapV3PositionsQuery(positionIds);
333
333
  if (extension === types_1.Extension.AeroCL)
334
334
  return this.nftlpAeroCLPositionsQuery(positionIds);
@@ -2,5 +2,6 @@ import OnchainAccountNftlp from './onchainAccountNftlp';
2
2
  import OnchainAccountNftlpGenericCL from './onchainAccountNftlpGenericCL';
3
3
  import OnchainAccountNftlpUniswapV3 from './onchainAccountNftlpUniswapV3';
4
4
  import OnchainAccountNftlpAeroCL from './onchainAccountNftlpAeroCL';
5
- export { OnchainAccountNftlp, OnchainAccountNftlpGenericCL, OnchainAccountNftlpUniswapV3, OnchainAccountNftlpAeroCL, };
5
+ import OnchainAccountNftlpHyperswapV3 from './onchainAccountNftlpHyperswapV3';
6
+ export { OnchainAccountNftlp, OnchainAccountNftlpGenericCL, OnchainAccountNftlpUniswapV3, OnchainAccountNftlpAeroCL, OnchainAccountNftlpHyperswapV3 };
6
7
  export default OnchainAccountNftlp;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.OnchainAccountNftlpAeroCL = exports.OnchainAccountNftlpUniswapV3 = exports.OnchainAccountNftlpGenericCL = exports.OnchainAccountNftlp = void 0;
6
+ exports.OnchainAccountNftlpHyperswapV3 = exports.OnchainAccountNftlpAeroCL = exports.OnchainAccountNftlpUniswapV3 = exports.OnchainAccountNftlpGenericCL = exports.OnchainAccountNftlp = void 0;
7
7
  const onchainAccountNftlp_1 = __importDefault(require("./onchainAccountNftlp"));
8
8
  exports.OnchainAccountNftlp = onchainAccountNftlp_1.default;
9
9
  const onchainAccountNftlpGenericCL_1 = __importDefault(require("./onchainAccountNftlpGenericCL"));
@@ -12,4 +12,6 @@ const onchainAccountNftlpUniswapV3_1 = __importDefault(require("./onchainAccount
12
12
  exports.OnchainAccountNftlpUniswapV3 = onchainAccountNftlpUniswapV3_1.default;
13
13
  const onchainAccountNftlpAeroCL_1 = __importDefault(require("./onchainAccountNftlpAeroCL"));
14
14
  exports.OnchainAccountNftlpAeroCL = onchainAccountNftlpAeroCL_1.default;
15
+ const onchainAccountNftlpHyperswapV3_1 = __importDefault(require("./onchainAccountNftlpHyperswapV3"));
16
+ exports.OnchainAccountNftlpHyperswapV3 = onchainAccountNftlpHyperswapV3_1.default;
15
17
  exports.default = onchainAccountNftlp_1.default;
@@ -47,6 +47,8 @@ class OnchainAccountNftlpGenericCL extends onchainAccountNftlp_1.default {
47
47
  }
48
48
  async createPositionObject(tokenId, lockStateChange = true) {
49
49
  const { unclaimedFees0, unclaimedFees1 } = await this.getCurrentUnclaimedFees(tokenId);
50
+ const offchainAccountCollateral = await this.collateral.getOffchainAccountCollateral();
51
+ const offchainAccountNftlp = offchainAccountCollateral.getNftlp();
50
52
  return new cl_1.default({
51
53
  liquidity: await this.getLiquidity(tokenId),
52
54
  unclaimedFeesX: unclaimedFees0,
@@ -62,6 +64,10 @@ class OnchainAccountNftlpGenericCL extends onchainAccountNftlp_1.default {
62
64
  borrowableX: await this.getNftlp().getLendingPool().getBorrowableA().createBorrowableObject(lockStateChange),
63
65
  borrowableY: await this.getNftlp().getLendingPool().getBorrowableB().createBorrowableObject(lockStateChange),
64
66
  fullRangeRate: await (await this.getNftlp().getOffchainNftlp()).getFullRangeRate(await this.getTickSpacing(tokenId)),
67
+ cumulativeDepositX: await offchainAccountNftlp.getCumulativeDeposit0(tokenId),
68
+ cumulativeDepositY: await offchainAccountNftlp.getCumulativeDeposit1(tokenId),
69
+ cumulativeBorrowX: await offchainAccountNftlp.getLendingPool().getBorrowableA().getCumulativeBorrows(tokenId),
70
+ cumulativeBorrowY: await offchainAccountNftlp.getLendingPool().getBorrowableB().getCumulativeBorrows(tokenId),
65
71
  lockStateChange,
66
72
  });
67
73
  }
@@ -0,0 +1,3 @@
1
+ import OnchainAccountNftlpUniswapV3 from "./onchainAccountNftlpUniswapV3";
2
+ export default class OnchainAccountNftlpHyperswapV3 extends OnchainAccountNftlpUniswapV3 {
3
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const onchainAccountNftlpUniswapV3_1 = __importDefault(require("./onchainAccountNftlpUniswapV3"));
7
+ // Useless but to be consistent with offchain
8
+ class OnchainAccountNftlpHyperswapV3 extends onchainAccountNftlpUniswapV3_1.default {
9
+ }
10
+ exports.default = OnchainAccountNftlpHyperswapV3;
@@ -2,5 +2,6 @@ import OnchainNftlp from './onchainNftlp';
2
2
  import OnchainNftlpGenericCL from './onchainNftlpGenericCL';
3
3
  import OnchainNftlpUniswapV3 from './onchainNftlpUniswapV3';
4
4
  import OnchainNftlpAeroCL from './onchainNftlpAeroCL';
5
- export { OnchainNftlp, OnchainNftlpGenericCL, OnchainNftlpUniswapV3, OnchainNftlpAeroCL, };
5
+ import OnchainNftlpHyperswapV3 from './onchainNftlpHyperswapV3';
6
+ export { OnchainNftlp, OnchainNftlpGenericCL, OnchainNftlpUniswapV3, OnchainNftlpAeroCL, OnchainNftlpHyperswapV3 };
6
7
  export default OnchainNftlp;
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.OnchainNftlpAeroCL = exports.OnchainNftlpUniswapV3 = exports.OnchainNftlpGenericCL = exports.OnchainNftlp = void 0;
6
+ exports.OnchainNftlpHyperswapV3 = exports.OnchainNftlpAeroCL = exports.OnchainNftlpUniswapV3 = exports.OnchainNftlpGenericCL = exports.OnchainNftlp = void 0;
7
7
  const onchainNftlp_1 = __importDefault(require("./onchainNftlp"));
8
8
  exports.OnchainNftlp = onchainNftlp_1.default;
9
9
  const onchainNftlpGenericCL_1 = __importDefault(require("./onchainNftlpGenericCL"));
@@ -12,4 +12,6 @@ const onchainNftlpUniswapV3_1 = __importDefault(require("./onchainNftlpUniswapV3
12
12
  exports.OnchainNftlpUniswapV3 = onchainNftlpUniswapV3_1.default;
13
13
  const onchainNftlpAeroCL_1 = __importDefault(require("./onchainNftlpAeroCL"));
14
14
  exports.OnchainNftlpAeroCL = onchainNftlpAeroCL_1.default;
15
+ const onchainNftlpHyperswapV3_1 = __importDefault(require("./onchainNftlpHyperswapV3"));
16
+ exports.OnchainNftlpHyperswapV3 = onchainNftlpHyperswapV3_1.default;
15
17
  exports.default = onchainNftlp_1.default;
@@ -0,0 +1,8 @@
1
+ import { OnchainAccountCollateralV3 } from "../../../account/lendingPool";
2
+ import { OnchainAccountNftlpHyperswapV3 } from "../../../account/lendingPool/nftlp";
3
+ import { Extension } from "../../../../config/types";
4
+ import OnchainNftlpUniswapV3 from "./onchainNftlpUniswapV3";
5
+ export default class OnchainNftlpHyperswapV3 extends OnchainNftlpUniswapV3 {
6
+ getExtension(): Extension;
7
+ getNewAccountNftlpObject(accountCollateral: OnchainAccountCollateralV3): OnchainAccountNftlpHyperswapV3;
8
+ }
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // TODO: Remove duplicated code
3
+ var __importDefault = (this && this.__importDefault) || function (mod) {
4
+ return (mod && mod.__esModule) ? mod : { "default": mod };
5
+ };
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ const nftlp_1 = require("../../../account/lendingPool/nftlp");
8
+ const types_1 = require("../../../../config/types");
9
+ const onchainNftlpUniswapV3_1 = __importDefault(require("./onchainNftlpUniswapV3"));
10
+ class OnchainNftlpHyperswapV3 extends onchainNftlpUniswapV3_1.default {
11
+ getExtension() {
12
+ return types_1.Extension.HyperswapV3;
13
+ }
14
+ getNewAccountNftlpObject(accountCollateral) {
15
+ return new nftlp_1.OnchainAccountNftlpHyperswapV3(accountCollateral, this);
16
+ }
17
+ }
18
+ exports.default = OnchainNftlpHyperswapV3;
@@ -24,6 +24,8 @@ class OnchainCollateralV3 extends onchainCollateral_1.default {
24
24
  switch (offchainCollateral.getNftlp().getExtension()) {
25
25
  case types_1.Extension.UniswapV3:
26
26
  return new nftlp_1.OnchainNftlpUniswapV3(this);
27
+ case types_1.Extension.HyperswapV3:
28
+ return new nftlp_1.OnchainNftlpHyperswapV3(this);
27
29
  case types_1.Extension.AeroCL:
28
30
  return new onchainNftlpAeroCL_1.default(this);
29
31
  default:
@@ -47,6 +47,7 @@ class OnchainImpermaxFactoryV3 extends onchainImpermaxFactory_1.default {
47
47
  router = this.onchain.getContractHelper().newRouterUniV2(address);
48
48
  break;
49
49
  case types_1.Extension.UniswapV3:
50
+ case types_1.Extension.HyperswapV3:
50
51
  router = this.onchain.getContractHelper().newRouterUniV3(address);
51
52
  break;
52
53
  case types_1.Extension.AeroCL:
@@ -10,6 +10,7 @@ class SolidlyStablePosition extends genericPosition_1.default {
10
10
  constructor(params) {
11
11
  super(params);
12
12
  this.baseRate = params.baseRate;
13
+ this.liquidityCache = {};
13
14
  }
14
15
  checkLock() {
15
16
  if (this.lockStateChange)
@@ -26,6 +27,8 @@ class SolidlyStablePosition extends genericPosition_1.default {
26
27
  this.liquidity = Math.max(liquidity, 0);
27
28
  }
28
29
  getRealXRealYGivenLiquidityAndPrice(liquidity, price) {
30
+ if (!this.liquidityCache[liquidity])
31
+ this.liquidityCache[liquidity] = {};
29
32
  const cached = this.liquidityCache[liquidity][price];
30
33
  if (cached)
31
34
  return cached;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "2.1.521",
3
+ "version": "2.1.523",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",