@defillama/sdk 5.0.143 → 5.0.145
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/blocks.d.ts +1 -1
- package/build/computeTVL/blocks.js +3 -1
- package/build/generalUtil.d.ts +1 -0
- package/build/generalUtil.js +5 -1
- package/build/index.d.ts +3 -0
- package/build/index.js +4 -1
- package/build/providers.json +1 -1
- package/build/util/LlamaProvider.js +8 -5
- package/build/util/blocks.js +22 -11
- package/build/util/cache.d.ts +7 -2
- package/build/util/cache.js +24 -12
- package/build/util/elastic.js +2 -1
- package/build/util/transactions.d.ts +1 -1
- package/build/util/updateProviderList.js +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getChainBlocks, getBlocks, getBlock, getCurrentBlocks, chainsForBlocks, getBlockNumber, } from "../util/blocks";
|
|
1
|
+
export { getChainBlocks, getBlocks, getBlock, getCurrentBlocks, chainsForBlocks, getBlockNumber, getLatestBlock, lookupBlock, } from "../util/blocks";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBlockNumber = exports.chainsForBlocks = exports.getCurrentBlocks = exports.getBlock = exports.getBlocks = exports.getChainBlocks = void 0;
|
|
3
|
+
exports.lookupBlock = exports.getLatestBlock = exports.getBlockNumber = exports.chainsForBlocks = exports.getCurrentBlocks = exports.getBlock = exports.getBlocks = exports.getChainBlocks = void 0;
|
|
4
4
|
var blocks_1 = require("../util/blocks");
|
|
5
5
|
Object.defineProperty(exports, "getChainBlocks", { enumerable: true, get: function () { return blocks_1.getChainBlocks; } });
|
|
6
6
|
Object.defineProperty(exports, "getBlocks", { enumerable: true, get: function () { return blocks_1.getBlocks; } });
|
|
@@ -8,3 +8,5 @@ Object.defineProperty(exports, "getBlock", { enumerable: true, get: function ()
|
|
|
8
8
|
Object.defineProperty(exports, "getCurrentBlocks", { enumerable: true, get: function () { return blocks_1.getCurrentBlocks; } });
|
|
9
9
|
Object.defineProperty(exports, "chainsForBlocks", { enumerable: true, get: function () { return blocks_1.chainsForBlocks; } });
|
|
10
10
|
Object.defineProperty(exports, "getBlockNumber", { enumerable: true, get: function () { return blocks_1.getBlockNumber; } });
|
|
11
|
+
Object.defineProperty(exports, "getLatestBlock", { enumerable: true, get: function () { return blocks_1.getLatestBlock; } });
|
|
12
|
+
Object.defineProperty(exports, "lookupBlock", { enumerable: true, get: function () { return blocks_1.lookupBlock; } });
|
package/build/generalUtil.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as blocks from "./computeTVL/blocks";
|
|
2
2
|
import * as humanizeNumber from "./computeTVL/humanizeNumber";
|
|
3
3
|
import type { Balances, StringNumber, Address } from "./types";
|
|
4
|
+
export { sliceIntoChunks, normalizeAddress, getTimestamp, } from "./util";
|
|
4
5
|
export declare function convertToBigInt(value: any): bigint;
|
|
5
6
|
export declare function sumMultiBalanceOf(balances: Balances, results: {
|
|
6
7
|
ethCallCount?: number;
|
package/build/generalUtil.js
CHANGED
|
@@ -23,12 +23,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.formError = exports.formErrorString = exports.getProviderUrl = exports.getUniqueAddresses = exports.humanizeNumber = exports.blocks = exports.sumChainTvls = exports.removeTokenBalance = exports.mergeBalances = exports.sumSingleBalance = exports.sumMultiBalanceOf = exports.convertToBigInt = void 0;
|
|
26
|
+
exports.formError = exports.formErrorString = exports.getProviderUrl = exports.getUniqueAddresses = exports.humanizeNumber = exports.blocks = exports.sumChainTvls = exports.removeTokenBalance = exports.mergeBalances = exports.sumSingleBalance = exports.sumMultiBalanceOf = exports.convertToBigInt = exports.getTimestamp = exports.normalizeAddress = exports.sliceIntoChunks = void 0;
|
|
27
27
|
const blocks = __importStar(require("./computeTVL/blocks"));
|
|
28
28
|
exports.blocks = blocks;
|
|
29
29
|
const humanizeNumber = __importStar(require("./computeTVL/humanizeNumber"));
|
|
30
30
|
exports.humanizeNumber = humanizeNumber;
|
|
31
31
|
const ethers = __importStar(require("ethers"));
|
|
32
|
+
var util_1 = require("./util");
|
|
33
|
+
Object.defineProperty(exports, "sliceIntoChunks", { enumerable: true, get: function () { return util_1.sliceIntoChunks; } });
|
|
34
|
+
Object.defineProperty(exports, "normalizeAddress", { enumerable: true, get: function () { return util_1.normalizeAddress; } });
|
|
35
|
+
Object.defineProperty(exports, "getTimestamp", { enumerable: true, get: function () { return util_1.getTimestamp; } });
|
|
32
36
|
// We ignore `sum` as it's never used (only in some SDK wrapper code)
|
|
33
37
|
function convertToBigInt(value) {
|
|
34
38
|
const balance = value;
|
package/build/index.d.ts
CHANGED
|
@@ -13,6 +13,9 @@ export * as blocks from "./computeTVL/blocks";
|
|
|
13
13
|
import * as humanN from "./computeTVL/humanizeNumber";
|
|
14
14
|
export * as graph from "./util/graph";
|
|
15
15
|
export * as indexer from "./util/indexer";
|
|
16
|
+
export * as types from "./types";
|
|
17
|
+
export * as tron from "./abi/tron";
|
|
18
|
+
export * as erc20 from "./erc20";
|
|
16
19
|
export declare const log: typeof debugLog;
|
|
17
20
|
export declare const logTable: typeof debugTable;
|
|
18
21
|
export declare const humanizeNumber: typeof humanN.humanizeNumber;
|
package/build/index.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.humanizeNumber = exports.logTable = exports.log = exports.indexer = exports.graph = exports.blocks = exports.api2 = exports.elastic = exports.api = exports.sdkCache = exports.getEventLogs = exports.cache = exports.util = exports.setProvider = exports.getProvider = exports.Balances = exports.ChainApi = void 0;
|
|
26
|
+
exports.humanizeNumber = exports.logTable = exports.log = exports.erc20 = exports.tron = exports.types = exports.indexer = exports.graph = exports.blocks = exports.api2 = exports.elastic = exports.api = exports.sdkCache = exports.getEventLogs = exports.cache = exports.util = exports.setProvider = exports.getProvider = exports.Balances = exports.ChainApi = void 0;
|
|
27
27
|
const debugLog_1 = require("./util/debugLog");
|
|
28
28
|
var ChainApi_1 = require("./ChainApi");
|
|
29
29
|
Object.defineProperty(exports, "ChainApi", { enumerable: true, get: function () { return ChainApi_1.ChainApi; } });
|
|
@@ -44,6 +44,9 @@ exports.blocks = __importStar(require("./computeTVL/blocks"));
|
|
|
44
44
|
const humanN = __importStar(require("./computeTVL/humanizeNumber"));
|
|
45
45
|
exports.graph = __importStar(require("./util/graph"));
|
|
46
46
|
exports.indexer = __importStar(require("./util/indexer"));
|
|
47
|
+
exports.types = __importStar(require("./types"));
|
|
48
|
+
exports.tron = __importStar(require("./abi/tron"));
|
|
49
|
+
exports.erc20 = __importStar(require("./erc20"));
|
|
47
50
|
exports.log = debugLog_1.debugLog;
|
|
48
51
|
exports.logTable = debugLog_1.debugTable;
|
|
49
52
|
exports.humanizeNumber = humanN.humanizeNumber;
|