@defillama/sdk 2.3.36 → 2.3.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/computeTVL/index.d.ts +2 -0
- package/build/computeTVL/index.js +2 -10
- package/build/general.d.ts +1 -1
- package/build/general.js +7 -2
- package/package.json +1 -1
|
@@ -43,6 +43,8 @@ export declare const chainToCoingeckoId: {
|
|
|
43
43
|
cronos: string;
|
|
44
44
|
aurora: string;
|
|
45
45
|
boba: string;
|
|
46
|
+
metis: string;
|
|
47
|
+
telos: string;
|
|
46
48
|
};
|
|
47
49
|
export default function (rawBalances: Balances, timestamp: number | "now", verbose?: boolean, knownTokenPrices?: TokenPrices, getCoingeckoLock?: GetCoingeckoLog, coingeckoMaxRetries?: number): Promise<{
|
|
48
50
|
usdTvl: number;
|
|
@@ -105,17 +105,9 @@ exports.chainToCoingeckoId = {
|
|
|
105
105
|
cronos: "cronos",
|
|
106
106
|
aurora: "aurora",
|
|
107
107
|
boba: "boba",
|
|
108
|
+
metis: "metis-andromeda",
|
|
109
|
+
telos: "telos",
|
|
108
110
|
};
|
|
109
|
-
function currentCoingeckoUrls(chain) {
|
|
110
|
-
if (chain === 'coingecko') {
|
|
111
|
-
return "v3/simple/price?ids";
|
|
112
|
-
}
|
|
113
|
-
var platformId = exports.chainToCoingeckoId[chain];
|
|
114
|
-
if (platformId !== undefined) {
|
|
115
|
-
return "v3/simple/token_price/" + platformId + "?contract_addresses";
|
|
116
|
-
}
|
|
117
|
-
throw new Error("Chain not supported");
|
|
118
|
-
}
|
|
119
111
|
var chains = Object.keys(exports.chainToCoingeckoId);
|
|
120
112
|
function getHistoricalChainPrices(ids, timestamp, knownTokenPrices, getCoingeckoLock, coingeckoMaxRetries) {
|
|
121
113
|
return __awaiter(this, void 0, void 0, function () {
|
package/build/general.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ethers, BigNumber } from "ethers";
|
|
|
2
2
|
export declare const providers: {
|
|
3
3
|
[chain: string]: ethers.providers.BaseProvider;
|
|
4
4
|
};
|
|
5
|
-
export declare type Chain = "ethereum" | "bsc" | "polygon" | "heco" | "fantom" | "rsk" | "tomochain" | "xdai" | "avax" | "wan" | "iotex" | "harmony" | "thundercore" | "okexchain" | "optimism" | "arbitrum" | "energyweb" | "songbird" | "hpb" | "gochain" | "ethclassic" | "xdaiarb" | "kardia" | "fuse" | "smartbch" | "elastos" | "hoo" | "fusion" | "aurora" | "ronin" | "boba" | "cronos" | "polis" | "zyx" | "telos" | "metis" | "ubiq" | "velas" | "callisto" | "csc";
|
|
5
|
+
export declare type Chain = "ethereum" | "bsc" | "polygon" | "heco" | "fantom" | "rsk" | "tomochain" | "xdai" | "avax" | "wan" | "iotex" | "harmony" | "thundercore" | "okexchain" | "optimism" | "arbitrum" | "energyweb" | "songbird" | "hpb" | "gochain" | "ethclassic" | "xdaiarb" | "kardia" | "fuse" | "smartbch" | "elastos" | "hoo" | "fusion" | "aurora" | "ronin" | "boba" | "cronos" | "polis" | "zyx" | "telos" | "metis" | "ubiq" | "velas" | "callisto" | "csc" | "nahmii" | "liquidchain" | "meter" | "theta" | "oasis" | "syscoin" | "moonbeam";
|
|
6
6
|
export declare function getProvider(chain?: Chain): ethers.providers.BaseProvider;
|
|
7
7
|
export declare const TEN: ethers.BigNumber;
|
|
8
8
|
export declare function handleDecimals(num: BigNumber, decimals?: number): string;
|
package/build/general.js
CHANGED
|
@@ -35,7 +35,7 @@ exports.providers = {
|
|
|
35
35
|
xdai: createProvider("xdai", "https://rpc.xdaichain.com/,https://xdai.poanetwork.dev,https://dai.poa.network,https://xdai-archive.blockscout.com", 100),
|
|
36
36
|
avax: createProvider("avax", "https://api.avax.network/ext/bc/C/rpc", 43114),
|
|
37
37
|
wan: createProvider("wan", "https://gwan-ssl.wandevs.org:56891", 888),
|
|
38
|
-
harmony: createProvider("harmony", "https://api.harmony.one,https://api.s0.t.hmny.io", 1666600000),
|
|
38
|
+
harmony: createProvider("harmony", "https://harmony-0-rpc.gateway.pokt.network,https://api.harmony.one,https://api.s0.t.hmny.io", 1666600000),
|
|
39
39
|
thundercore: createProvider("thundercore", "https://mainnet-rpc.thundercore.com", 108),
|
|
40
40
|
okexchain: createProvider("okexchain", "https://exchainrpc.okex.org", 66),
|
|
41
41
|
optimism: createProvider("optimism", "https://mainnet.optimism.io/", 10),
|
|
@@ -64,7 +64,7 @@ exports.providers = {
|
|
|
64
64
|
cronos: createProvider("cronos", "https://evm-cronos.crypto.org/", 25),
|
|
65
65
|
polis: createProvider("polis", "https://rpc.polis.tech", 333999),
|
|
66
66
|
zyx: createProvider("zyx", "https://rpc-1.zyx.network/,https://rpc-2.zyx.network/,https://rpc-3.zyx.network/,https://rpc-5.zyx.network/", 55),
|
|
67
|
-
telos: createProvider("telos", "https://mainnet.telos.net/evm
|
|
67
|
+
telos: createProvider("telos", "https://mainnet.telos.net/evm,https://rpc1.eu.telos.net/evm,https://rpc1.us.telos.net/evm", 40),
|
|
68
68
|
metis: createProvider("metis", "https://andromeda.metis.io/?owner=1088", 1088),
|
|
69
69
|
ubiq: createProvider("ubiq", "https://rpc.octano.dev", 8),
|
|
70
70
|
velas: createProvider("velas", "https://evmexplorer.velas.com/rpc", 106),
|
|
@@ -73,6 +73,11 @@ exports.providers = {
|
|
|
73
73
|
csc: createProvider("csc", "https://rpc.coinex.net/,https://rpc1.coinex.net/,https://rpc2.coinex.net/,https://rpc3.coinex.net/,https://rpc4.coinex.net/", 52),
|
|
74
74
|
nahmii: createProvider("nahmii", "https://l2.nahmii.io/", 5551),
|
|
75
75
|
liquidchain: createProvider("xlc", "https://rpc.liquidchain.net/,https://rpc.xlcscan.com/", 5050),
|
|
76
|
+
meter: createProvider("meter", 'https://rpc.meter.io', 82),
|
|
77
|
+
theta: createProvider("theta", 'https://eth-rpc-api.thetatoken.org/rpc', 361),
|
|
78
|
+
oasis: createProvider("oasis", 'https://emerald.oasis.dev/', 42262),
|
|
79
|
+
syscoin: createProvider("syscoin", 'https://rpc.syscoin.org', 57),
|
|
80
|
+
moonbeam: createProvider("moonbeam", 'https://rpc.api.moonbeam.network', 1284)
|
|
76
81
|
};
|
|
77
82
|
function getProvider(chain) {
|
|
78
83
|
if (chain === void 0) { chain = "ethereum"; }
|