impermax-sdk 2.1.348 → 2.1.349
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,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NetworkVaultTypeIndex, NetworkFactoryIndex, NetworkExtensionIndex } from "./types";
|
|
2
2
|
/**
|
|
3
3
|
* Private API Endpoints which we might need to use in future for non-core
|
|
4
4
|
* things (ie. charts, leaderboards, etc.). The app must function well
|
|
@@ -7,5 +7,5 @@ import { Address, NetworkVaultTypeIndex, NetworkFactoryIndex, NetworkIndex } fro
|
|
|
7
7
|
*/
|
|
8
8
|
export declare const IMPERMAX_POOLS_API: NetworkFactoryIndex<string>;
|
|
9
9
|
export declare const IMPERMAX_VAULT_API: NetworkVaultTypeIndex<string>;
|
|
10
|
-
export declare const
|
|
10
|
+
export declare const NFTLP_API: NetworkExtensionIndex<string>;
|
|
11
11
|
export declare const PRICE_AGGREGATOR_API_URL = "https://price-aggregator-production.up.railway.app/api/tokens";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PRICE_AGGREGATOR_API_URL = exports.
|
|
3
|
+
exports.PRICE_AGGREGATOR_API_URL = exports.NFTLP_API = exports.IMPERMAX_VAULT_API = exports.IMPERMAX_POOLS_API = void 0;
|
|
4
4
|
const types_1 = require("./types");
|
|
5
5
|
/**
|
|
6
6
|
* Private API Endpoints which we might need to use in future for non-core
|
|
@@ -70,29 +70,33 @@ exports.IMPERMAX_VAULT_API = {
|
|
|
70
70
|
},
|
|
71
71
|
[types_1.Networks.Linea]: {},
|
|
72
72
|
};
|
|
73
|
-
exports.
|
|
74
|
-
[types_1.Networks.Ropsten]:
|
|
75
|
-
[types_1.Networks.Mainnet]:
|
|
76
|
-
[types_1.Networks.Polygon]:
|
|
77
|
-
[types_1.Networks.Arbitrum]:
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
[types_1.Networks.
|
|
81
|
-
[types_1.Networks.
|
|
82
|
-
[types_1.Networks.
|
|
83
|
-
[types_1.Networks.
|
|
84
|
-
[types_1.Networks.
|
|
85
|
-
[types_1.Networks.
|
|
86
|
-
[types_1.Networks.Canto]:
|
|
87
|
-
[types_1.Networks.ZksyncEra]:
|
|
88
|
-
[types_1.Networks.
|
|
89
|
-
[types_1.Networks.
|
|
90
|
-
[types_1.Networks.
|
|
91
|
-
[types_1.Networks.
|
|
92
|
-
[types_1.Networks.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
[types_1.Networks.
|
|
73
|
+
exports.NFTLP_API = {
|
|
74
|
+
[types_1.Networks.Ropsten]: {},
|
|
75
|
+
[types_1.Networks.Mainnet]: {},
|
|
76
|
+
[types_1.Networks.Polygon]: {},
|
|
77
|
+
[types_1.Networks.Arbitrum]: {
|
|
78
|
+
[types_1.Extension.UniswapV3]: "https://arbitrum-nftlp-uniswapv3.up.railway.app/"
|
|
79
|
+
},
|
|
80
|
+
[types_1.Networks.Avalanche]: {},
|
|
81
|
+
[types_1.Networks.Mantle]: {},
|
|
82
|
+
[types_1.Networks.Moonriver]: {},
|
|
83
|
+
[types_1.Networks.Aurora]: {},
|
|
84
|
+
[types_1.Networks.Cronos]: {},
|
|
85
|
+
[types_1.Networks.Fantom]: {},
|
|
86
|
+
[types_1.Networks.Canto]: {},
|
|
87
|
+
[types_1.Networks.ZksyncEra]: {},
|
|
88
|
+
[types_1.Networks.Harmony]: {},
|
|
89
|
+
[types_1.Networks.Moonbeam]: {},
|
|
90
|
+
[types_1.Networks.Sxnetwork]: {},
|
|
91
|
+
[types_1.Networks.Blast]: {},
|
|
92
|
+
[types_1.Networks.Base]: {
|
|
93
|
+
[types_1.Extension.UniswapV3]: "https://base-nftlp-uniswapv3.up.railway.app/"
|
|
94
|
+
},
|
|
95
|
+
[types_1.Networks.Scroll]: {},
|
|
96
|
+
[types_1.Networks.Optimism]: {},
|
|
97
|
+
[types_1.Networks.Real]: {},
|
|
98
|
+
[types_1.Networks.Sonic]: {},
|
|
99
|
+
[types_1.Networks.Linea]: {},
|
|
96
100
|
};
|
|
97
101
|
// Single endpoint for all factory subgraph token prices
|
|
98
102
|
exports.PRICE_AGGREGATOR_API_URL = "https://price-aggregator-production.up.railway.app/api/tokens";
|
package/lib/offchain/initializer/privateApi/lendingPoolsApi/nftlp/uniswapV3/uniswapV3Charts.js
CHANGED
|
@@ -9,7 +9,7 @@ const private_api_1 = require("../../../../../../config/private-api");
|
|
|
9
9
|
*--------------------------------------------------------------------------*/
|
|
10
10
|
// Fetches all charts of all lending pools for an NFTLP factory (ie. Dex)
|
|
11
11
|
async function fetchUniswapV3Charts() {
|
|
12
|
-
const api = private_api_1.
|
|
12
|
+
const api = private_api_1.NFTLP_API[this.network][types_1.Extension.UniswapV3];
|
|
13
13
|
if (!api) {
|
|
14
14
|
console.log(`Missing NFTLP uniswapV3 subgraph on ${this.network}?`);
|
|
15
15
|
return {};
|
|
@@ -10,7 +10,7 @@ const private_api_1 = require("../../../../../config/private-api");
|
|
|
10
10
|
// TODO: Make this better by using getnftlppositions
|
|
11
11
|
// const nftlpPositions = await this.offchainMultichain.getMultichainAccount(account).getNftlpPositions();
|
|
12
12
|
async function fetchUniswapV3NewlyEarnedFees(account) {
|
|
13
|
-
const api = private_api_1.
|
|
13
|
+
const api = private_api_1.NFTLP_API[this.network][types_1.Extension.UniswapV3];
|
|
14
14
|
if (!api) {
|
|
15
15
|
console.log(`Missing NFTLP uniswapV3 fees api on ${this.network}?`);
|
|
16
16
|
return {};
|