impermax-sdk 2.1.565 → 2.1.566

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.
@@ -1,8 +1,6 @@
1
1
  import { NetworkVaultTypeIndex, NetworkFactoryIndex, NetworkExtensionIndex } from "./types";
2
2
  /** Single endpoint for all factory subgraph token prices */
3
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
4
  /**
7
5
  * Private API Endpoints which we might need to use in future for non-core
8
6
  * things (ie. charts, leaderboards, etc.). The app must function well
@@ -11,3 +9,5 @@ export declare const POSITIONS_AGGREGATOR_API_URL = "https://positions-aggregato
11
9
  export declare const IMPERMAX_POOLS_API: NetworkFactoryIndex<string>;
12
10
  export declare const IMPERMAX_VAULT_API: NetworkVaultTypeIndex<string>;
13
11
  export declare const NFTLP_API: NetworkExtensionIndex<string>;
12
+ /** Single endpoint to get NFTLP collateral TVL across all networks */
13
+ export declare const POSITIONS_AGGREGATOR_API_URL: NetworkExtensionIndex<string>;
@@ -1,12 +1,10 @@
1
1
  "use strict";
2
2
  // TODO: Just one nftlp position api
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
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
+ exports.POSITIONS_AGGREGATOR_API_URL = exports.NFTLP_API = exports.IMPERMAX_VAULT_API = exports.IMPERMAX_POOLS_API = exports.PRICE_AGGREGATOR_API_URL = void 0;
5
5
  const types_1 = require("./types");
6
6
  /** Single endpoint for all factory subgraph token prices */
7
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/";
10
8
  /**
11
9
  * Private API Endpoints which we might need to use in future for non-core
12
10
  * things (ie. charts, leaderboards, etc.). The app must function well
@@ -120,40 +118,42 @@ exports.NFTLP_API = {
120
118
  [types_1.Extension.HyperswapV3]: "https://hyperevm-nftlp-hyperswapv3.up.railway.app/"
121
119
  }
122
120
  };
123
- // NOTE: Commented out in favour of single `POSITIONS_AGGREGATOR_API_URL`,
121
+ // NOTE: Temporary use
122
+ /** Single endpoint to get NFTLP collateral TVL across all networks */
123
+ //export const POSITIONS_AGGREGATOR_API_URL = "https://positions-aggregator-production.up.railway.app/api/";
124
124
  // API: Positions/NFTLP TVL
125
- // export const NFTLP_POSITIONS_API: NetworkExtensionIndex<string> = {
126
- // [Networks.Ropsten]: {},
127
- // [Networks.Mainnet]: {},
128
- // [Networks.Polygon]: {},
129
- // [Networks.Arbitrum]: {
130
- // [Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
131
- // },
132
- // [Networks.Avalanche]: {},
133
- // [Networks.Mantle]: {},
134
- // [Networks.Moonriver]: {},
135
- // [Networks.Aurora]: {},
136
- // [Networks.Cronos]: {},
137
- // [Networks.Fantom]: {},
138
- // [Networks.Canto]: {},
139
- // [Networks.ZksyncEra]: {},
140
- // [Networks.Harmony]: {},
141
- // [Networks.Moonbeam]: {},
142
- // [Networks.Sxnetwork]: {},
143
- // [Networks.Blast]: {},
144
- // [Networks.Base]: {
145
- // [Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/",
146
- // [Extension.AeroCL]: "https://positions-aggregator-production.up.railway.app/api/"
147
- // },
148
- // [Networks.Scroll]: {},
149
- // [Networks.Optimism]: {},
150
- // [Networks.Real]: {},
151
- // [Networks.Sonic]: {},
152
- // [Networks.Linea]: {},
153
- // [Networks.Unichain]: {
154
- // [Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
155
- // },
156
- // [Networks.HyperEVM]: {
157
- // [Extension.HyperswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
158
- // }
159
- // };
125
+ exports.POSITIONS_AGGREGATOR_API_URL = {
126
+ [types_1.Networks.Ropsten]: {},
127
+ [types_1.Networks.Mainnet]: {},
128
+ [types_1.Networks.Polygon]: {},
129
+ [types_1.Networks.Arbitrum]: {
130
+ [types_1.Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
131
+ },
132
+ [types_1.Networks.Avalanche]: {},
133
+ [types_1.Networks.Mantle]: {},
134
+ [types_1.Networks.Moonriver]: {},
135
+ [types_1.Networks.Aurora]: {},
136
+ [types_1.Networks.Cronos]: {},
137
+ [types_1.Networks.Fantom]: {},
138
+ [types_1.Networks.Canto]: {},
139
+ [types_1.Networks.ZksyncEra]: {},
140
+ [types_1.Networks.Harmony]: {},
141
+ [types_1.Networks.Moonbeam]: {},
142
+ [types_1.Networks.Sxnetwork]: {},
143
+ [types_1.Networks.Blast]: {},
144
+ [types_1.Networks.Base]: {
145
+ [types_1.Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/",
146
+ [types_1.Extension.AeroCL]: "https://positions-aggregator-production.up.railway.app/api/"
147
+ },
148
+ [types_1.Networks.Scroll]: {},
149
+ [types_1.Networks.Optimism]: {},
150
+ [types_1.Networks.Real]: {},
151
+ [types_1.Networks.Sonic]: {},
152
+ [types_1.Networks.Linea]: {},
153
+ [types_1.Networks.Unichain]: {
154
+ [types_1.Extension.UniswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
155
+ },
156
+ [types_1.Networks.HyperEVM]: {
157
+ [types_1.Extension.HyperswapV3]: "https://positions-aggregator-production.up.railway.app/api/"
158
+ }
159
+ };
@@ -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 = 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
- // }
10
+ const api = private_api_1.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(private_api_1.POSITIONS_AGGREGATOR_API_URL.concat(`${this.chainId}/nftlps`));
16
+ const response = await this.offchainMultichain.getEndpointManager().fetchAPI(api.concat(`${this.chainId}/nftlps`));
17
17
  return response;
18
18
  }
19
19
  catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impermax-sdk",
3
- "version": "2.1.565",
3
+ "version": "2.1.566",
4
4
  "description": "",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",