@defillama/sdk 5.0.236 → 5.0.240

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 (131) hide show
  1. package/package.json +3 -3
  2. package/build/Balances.d.ts +0 -139
  3. package/build/Balances.js +0 -363
  4. package/build/ChainApi.d.ts +0 -142
  5. package/build/ChainApi.js +0 -297
  6. package/build/abi/abi2.d.ts +0 -5
  7. package/build/abi/abi2.js +0 -215
  8. package/build/abi/cachedABIs.d.ts +0 -4
  9. package/build/abi/cachedABIs.js +0 -8
  10. package/build/abi/convertResults.d.ts +0 -5
  11. package/build/abi/convertResults.js +0 -60
  12. package/build/abi/index.d.ts +0 -31
  13. package/build/abi/index.js +0 -327
  14. package/build/abi/multicall.d.ts +0 -23
  15. package/build/abi/multicall.js +0 -382
  16. package/build/abi/multicall3.d.ts +0 -7
  17. package/build/abi/multicall3.js +0 -397
  18. package/build/abi/rpcCall.d.ts +0 -4
  19. package/build/abi/rpcCall.js +0 -62
  20. package/build/abi/tron.d.ts +0 -33
  21. package/build/abi/tron.js +0 -110
  22. package/build/api.d.ts +0 -10
  23. package/build/api.js +0 -45
  24. package/build/api2.d.ts +0 -5
  25. package/build/api2.js +0 -41
  26. package/build/chains/algorand.d.ts +0 -277
  27. package/build/chains/algorand.js +0 -618
  28. package/build/chains/aptos.d.ts +0 -230
  29. package/build/chains/aptos.js +0 -612
  30. package/build/chains/cardano.d.ts +0 -242
  31. package/build/chains/cardano.js +0 -407
  32. package/build/chains/cosmos.d.ts +0 -252
  33. package/build/chains/cosmos.js +0 -618
  34. package/build/chains/icp.d.ts +0 -235
  35. package/build/chains/icp.js +0 -1040
  36. package/build/chains/index.d.ts +0 -23
  37. package/build/chains/index.js +0 -59
  38. package/build/chains/near.d.ts +0 -192
  39. package/build/chains/near.js +0 -446
  40. package/build/chains/rpc.d.ts +0 -125
  41. package/build/chains/rpc.js +0 -326
  42. package/build/chains/starknet.d.ts +0 -205
  43. package/build/chains/starknet.js +0 -884
  44. package/build/chains/stellar.d.ts +0 -410
  45. package/build/chains/stellar.js +0 -1082
  46. package/build/chains/substrate.d.ts +0 -333
  47. package/build/chains/substrate.js +0 -1042
  48. package/build/chains/sui.d.ts +0 -365
  49. package/build/chains/sui.js +0 -1135
  50. package/build/chains/svm.d.ts +0 -340
  51. package/build/chains/svm.js +0 -760
  52. package/build/chains/tezos.d.ts +0 -225
  53. package/build/chains/tezos.js +0 -412
  54. package/build/chains/ton.d.ts +0 -353
  55. package/build/chains/ton.js +0 -788
  56. package/build/chains/tron.d.ts +0 -45
  57. package/build/chains/tron.js +0 -110
  58. package/build/chains/utxo.d.ts +0 -202
  59. package/build/chains/utxo.js +0 -592
  60. package/build/chains/xrpl.d.ts +0 -179
  61. package/build/chains/xrpl.js +0 -467
  62. package/build/computeTVL/blocks.d.ts +0 -1
  63. package/build/computeTVL/blocks.js +0 -12
  64. package/build/computeTVL/humanizeNumber.d.ts +0 -1
  65. package/build/computeTVL/humanizeNumber.js +0 -19
  66. package/build/erc20/index.d.ts +0 -31
  67. package/build/erc20/index.js +0 -56
  68. package/build/eth/index.d.ts +0 -22
  69. package/build/eth/index.js +0 -118
  70. package/build/general.d.ts +0 -5
  71. package/build/general.js +0 -20
  72. package/build/generalUtil.d.ts +0 -8
  73. package/build/generalUtil.js +0 -73
  74. package/build/index.d.ts +0 -32
  75. package/build/index.js +0 -74
  76. package/build/providers.json +0 -1
  77. package/build/types.d.ts +0 -76
  78. package/build/types.js +0 -2
  79. package/build/util/LlamaProvider.d.ts +0 -46
  80. package/build/util/LlamaProvider.js +0 -365
  81. package/build/util/blocks.d.ts +0 -36
  82. package/build/util/blocks.js +0 -292
  83. package/build/util/cache.d.ts +0 -45
  84. package/build/util/cache.js +0 -309
  85. package/build/util/chainUtils/data.json +0 -1356
  86. package/build/util/chainUtils/index.d.ts +0 -11
  87. package/build/util/chainUtils/index.js +0 -136
  88. package/build/util/coins.d.ts +0 -19
  89. package/build/util/coins.js +0 -113
  90. package/build/util/common.d.ts +0 -34
  91. package/build/util/common.js +0 -373
  92. package/build/util/computeTVL.d.ts +0 -19
  93. package/build/util/computeTVL.js +0 -102
  94. package/build/util/cosmos.d.ts +0 -1
  95. package/build/util/cosmos.js +0 -8
  96. package/build/util/debugLog.d.ts +0 -4
  97. package/build/util/debugLog.js +0 -18
  98. package/build/util/discord.d.ts +0 -1
  99. package/build/util/discord.js +0 -33
  100. package/build/util/elastic.d.ts +0 -43
  101. package/build/util/elastic.js +0 -113
  102. package/build/util/env.d.ts +0 -19
  103. package/build/util/env.js +0 -158
  104. package/build/util/graph.d.ts +0 -8
  105. package/build/util/graph.js +0 -50
  106. package/build/util/index.d.ts +0 -32
  107. package/build/util/index.js +0 -227
  108. package/build/util/indexer.compatibility.d.ts +0 -6
  109. package/build/util/indexer.compatibility.js +0 -64
  110. package/build/util/indexer.d.ts +0 -92
  111. package/build/util/indexer.js +0 -744
  112. package/build/util/indexerSql.d.ts +0 -9
  113. package/build/util/indexerSql.js +0 -102
  114. package/build/util/internal-cache.d.ts +0 -11
  115. package/build/util/internal-cache.js +0 -77
  116. package/build/util/logs.d.ts +0 -55
  117. package/build/util/logs.decode.shared.d.ts +0 -8
  118. package/build/util/logs.decode.shared.js +0 -289
  119. package/build/util/logs.js +0 -401
  120. package/build/util/promisePool.d.ts +0 -8
  121. package/build/util/promisePool.js +0 -31
  122. package/build/util/r2.d.ts +0 -4
  123. package/build/util/r2.js +0 -52
  124. package/build/util/removeRedundantRPCs.d.ts +0 -1
  125. package/build/util/removeRedundantRPCs.js +0 -49
  126. package/build/util/transactions.d.ts +0 -35
  127. package/build/util/transactions.js +0 -22
  128. package/build/util/updateChainLabels.d.ts +0 -1
  129. package/build/util/updateChainLabels.js +0 -5
  130. package/build/util/updateProviderList.d.ts +0 -1
  131. package/build/util/updateProviderList.js +0 -274
@@ -1,31 +0,0 @@
1
- import { Address } from "../types";
2
- import { Chain } from "../general";
3
- export declare function info(tokenAddress: Address, chain?: Chain): Promise<{
4
- output: {
5
- symbol: any;
6
- decimals: number;
7
- };
8
- }>;
9
- export declare function symbol(tokenAddress: Address, chain?: Chain): Promise<{
10
- output: any;
11
- }>;
12
- export declare function decimals(tokenAddress: Address, chain?: Chain): Promise<{
13
- output: number;
14
- }>;
15
- export declare function totalSupply(params: {
16
- target: Address;
17
- block?: number;
18
- decimals?: number;
19
- chain?: Chain;
20
- }): Promise<{
21
- output: string;
22
- }>;
23
- export declare function balanceOf(params: {
24
- target: Address;
25
- owner: Address;
26
- block?: number;
27
- decimals?: number;
28
- chain?: Chain;
29
- }): Promise<{
30
- output: string;
31
- }>;
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.info = info;
4
- exports.symbol = symbol;
5
- exports.decimals = decimals;
6
- exports.totalSupply = totalSupply;
7
- exports.balanceOf = balanceOf;
8
- const ethers_1 = require("ethers");
9
- const general_1 = require("../general");
10
- const abi = [
11
- "function balanceOf(address owner) view returns (uint256)",
12
- "function totalSupply() view returns (uint256)",
13
- "function decimals() view returns (uint8)",
14
- "function symbol() view returns (string)",
15
- ];
16
- function getContract(address, chain) {
17
- return new ethers_1.ethers.Contract(address, abi, (0, general_1.getProvider)(chain));
18
- }
19
- async function info(tokenAddress, chain) {
20
- const contract = getContract(tokenAddress, chain);
21
- const tokenSymbol = contract.symbol();
22
- const tokenDecimals = contract.decimals();
23
- return {
24
- output: {
25
- symbol: await tokenSymbol,
26
- decimals: Number(await tokenDecimals),
27
- },
28
- };
29
- }
30
- async function symbol(tokenAddress, chain) {
31
- return {
32
- output: await getContract(tokenAddress, chain).symbol(),
33
- };
34
- }
35
- async function decimals(tokenAddress, chain) {
36
- return {
37
- output: Number(await getContract(tokenAddress, chain).decimals()),
38
- };
39
- }
40
- async function totalSupply(params) {
41
- const contract = getContract(params.target, params.chain);
42
- const supply = await contract.totalSupply({
43
- blockTag: params.block,
44
- });
45
- return {
46
- output: (0, general_1.handleDecimals)(supply, params.decimals),
47
- };
48
- }
49
- async function balanceOf(params) {
50
- const balance = await getContract(params.target, params.chain).balanceOf(params.owner, {
51
- blockTag: params.block,
52
- });
53
- return {
54
- output: (0, general_1.handleDecimals)(balance, params.decimals),
55
- };
56
- }
@@ -1,22 +0,0 @@
1
- import { Address, LogArray } from "../types";
2
- import { Chain } from "../general";
3
- export declare function getBalance(params: {
4
- target: Address;
5
- block?: number;
6
- decimals?: number;
7
- chain?: Chain;
8
- logArray?: LogArray;
9
- }): Promise<{
10
- output: string;
11
- }>;
12
- export declare function getBalances(params: {
13
- targets: Address[];
14
- block?: number;
15
- decimals?: number;
16
- chain?: Chain;
17
- logArray?: LogArray;
18
- skipMultiCall?: boolean;
19
- permitFailure?: boolean;
20
- }): Promise<{
21
- output: any;
22
- }>;
@@ -1,118 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.getBalance = getBalance;
37
- exports.getBalances = getBalances;
38
- const general_1 = require("../general");
39
- const Tron = __importStar(require("../abi/tron"));
40
- const multicall3_1 = require("../abi/multicall3");
41
- const abi2_1 = require("../abi/abi2");
42
- const debugLog_1 = require("../util/debugLog");
43
- const generalUtil_1 = require("../generalUtil");
44
- async function getBalance(params) {
45
- var _a;
46
- // this is needed eth.getBalances doesnt include staked trx value
47
- if (params.chain === 'tron')
48
- return Tron.getBalance(params);
49
- const balance = await (0, general_1.getProvider)(params.chain).getBalance(params.target, params.block);
50
- const output = (0, general_1.handleDecimals)(balance, params.decimals);
51
- if (params.logArray)
52
- params.logArray.push({
53
- chain: (_a = params.chain) !== null && _a !== void 0 ? _a : "ethereum",
54
- holder: params.target,
55
- token: general_1.ETHER_ADDRESS,
56
- amount: output
57
- });
58
- return {
59
- output,
60
- };
61
- }
62
- async function getBalances(params) {
63
- var _a;
64
- // this is needed eth.getBalances doesnt include staked trx value
65
- if (params.chain === 'tron')
66
- return Tron.getBalances(params);
67
- let output;
68
- try {
69
- const multicallContract = (0, multicall3_1.getMulticallAddress)((_a = params.chain) !== null && _a !== void 0 ? _a : "ethereum", params.block);
70
- if (!params.skipMultiCall && multicallContract) {
71
- const multicallResults = await (0, abi2_1.multiCall)({
72
- calls: params.targets,
73
- target: multicallContract,
74
- abi: 'function getEthBalance(address addr) view returns (uint256)',
75
- chain: params.chain,
76
- block: params.block,
77
- permitFailure: params.permitFailure,
78
- });
79
- output = multicallResults.map((value, i) => ({
80
- target: params.targets[i],
81
- balance: (0, general_1.handleDecimals)(value !== null && value !== void 0 ? value : '0', params.decimals)
82
- }));
83
- }
84
- }
85
- catch (e) {
86
- (0, debugLog_1.debugLog)('Multicall failed, falling back to single calls for fetching eth balances', e);
87
- }
88
- if (!output) {
89
- output = await (0, generalUtil_1.runInPromisePool)({
90
- items: params.targets,
91
- concurrency: 7,
92
- processor: async (target) => ({
93
- target,
94
- balance: (0, general_1.handleDecimals)(await (0, general_1.getProvider)(params.chain).getBalance(target, params.block), params.decimals),
95
- }),
96
- permitFailure: params.permitFailure
97
- });
98
- // If some calls failed, fill their balance with 0
99
- if (params.permitFailure)
100
- output.forEach((o, idx) => {
101
- if (!(o === null || o === void 0 ? void 0 : o.balance))
102
- output[idx] = { target: params.targets[idx], balance: '0' };
103
- });
104
- }
105
- if (params.logArray)
106
- params.logArray.push(...params.targets.map((holder, i) => {
107
- var _a;
108
- return ({
109
- chain: (_a = params.chain) !== null && _a !== void 0 ? _a : "ethereum",
110
- holder,
111
- token: general_1.ETHER_ADDRESS,
112
- amount: output[i].balance
113
- });
114
- }));
115
- return {
116
- output,
117
- };
118
- }
@@ -1,5 +0,0 @@
1
- export { providers, setProvider, getProvider, } from './util/LlamaProvider';
2
- export { Chain } from './types';
3
- export declare const TEN: bigint;
4
- export declare function handleDecimals(num: any, decimals?: number): string;
5
- export declare const ETHER_ADDRESS = "0x0000000000000000000000000000000000000000";
package/build/general.js DELETED
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ETHER_ADDRESS = exports.TEN = exports.getProvider = exports.setProvider = exports.providers = void 0;
4
- exports.handleDecimals = handleDecimals;
5
- var LlamaProvider_1 = require("./util/LlamaProvider");
6
- Object.defineProperty(exports, "providers", { enumerable: true, get: function () { return LlamaProvider_1.providers; } });
7
- Object.defineProperty(exports, "setProvider", { enumerable: true, get: function () { return LlamaProvider_1.setProvider; } });
8
- Object.defineProperty(exports, "getProvider", { enumerable: true, get: function () { return LlamaProvider_1.getProvider; } });
9
- exports.TEN = BigInt(10);
10
- function handleDecimals(num, decimals) {
11
- if (typeof num !== 'number')
12
- num = num.toString();
13
- if (decimals === undefined) {
14
- return num.toString();
15
- }
16
- else {
17
- return Number(num / (10 ** decimals)).toString();
18
- }
19
- }
20
- exports.ETHER_ADDRESS = "0x0000000000000000000000000000000000000000";
@@ -1,8 +0,0 @@
1
- import * as blocks from "./computeTVL/blocks";
2
- import * as discord from "./util/discord";
3
- import * as humanizeNumber from "./computeTVL/humanizeNumber";
4
- export { sliceIntoChunks, normalizeAddress, getTimestamp, tableToString, } from "./util";
5
- export { isEvmChain, getEVMChainSet, getEVMProvidersConfigMap, } from "./util/LlamaProvider";
6
- export { runInPromisePool } from "./util/promisePool";
7
- export { sumMultiBalanceOf, sumSingleBalance, mergeBalances, removeTokenBalance, sumChainTvls, getUniqueAddresses, convertToBigInt, getProviderUrl, formError, formErrorString, shortenString, fetchJson, postJson, tronToEvmAddress, evmToTronAddress, sleep, sleepRandom, getHash, } from './util/common';
8
- export { blocks, humanizeNumber, discord, };
@@ -1,73 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.discord = exports.humanizeNumber = exports.blocks = exports.getHash = exports.sleepRandom = exports.sleep = exports.evmToTronAddress = exports.tronToEvmAddress = exports.postJson = exports.fetchJson = exports.shortenString = exports.formErrorString = exports.formError = exports.getProviderUrl = exports.convertToBigInt = exports.getUniqueAddresses = exports.sumChainTvls = exports.removeTokenBalance = exports.mergeBalances = exports.sumSingleBalance = exports.sumMultiBalanceOf = exports.runInPromisePool = exports.getEVMProvidersConfigMap = exports.getEVMChainSet = exports.isEvmChain = exports.tableToString = exports.getTimestamp = exports.normalizeAddress = exports.sliceIntoChunks = void 0;
37
- const blocks = __importStar(require("./computeTVL/blocks"));
38
- exports.blocks = blocks;
39
- const discord = __importStar(require("./util/discord"));
40
- exports.discord = discord;
41
- const humanizeNumber = __importStar(require("./computeTVL/humanizeNumber"));
42
- exports.humanizeNumber = humanizeNumber;
43
- var util_1 = require("./util");
44
- Object.defineProperty(exports, "sliceIntoChunks", { enumerable: true, get: function () { return util_1.sliceIntoChunks; } });
45
- Object.defineProperty(exports, "normalizeAddress", { enumerable: true, get: function () { return util_1.normalizeAddress; } });
46
- Object.defineProperty(exports, "getTimestamp", { enumerable: true, get: function () { return util_1.getTimestamp; } });
47
- Object.defineProperty(exports, "tableToString", { enumerable: true, get: function () { return util_1.tableToString; } });
48
- var LlamaProvider_1 = require("./util/LlamaProvider");
49
- Object.defineProperty(exports, "isEvmChain", { enumerable: true, get: function () { return LlamaProvider_1.isEvmChain; } });
50
- Object.defineProperty(exports, "getEVMChainSet", { enumerable: true, get: function () { return LlamaProvider_1.getEVMChainSet; } });
51
- Object.defineProperty(exports, "getEVMProvidersConfigMap", { enumerable: true, get: function () { return LlamaProvider_1.getEVMProvidersConfigMap; } });
52
- var promisePool_1 = require("./util/promisePool");
53
- Object.defineProperty(exports, "runInPromisePool", { enumerable: true, get: function () { return promisePool_1.runInPromisePool; } });
54
- // most of the code has been moved to util/common.ts to avoid circular dependencies
55
- var common_1 = require("./util/common");
56
- Object.defineProperty(exports, "sumMultiBalanceOf", { enumerable: true, get: function () { return common_1.sumMultiBalanceOf; } });
57
- Object.defineProperty(exports, "sumSingleBalance", { enumerable: true, get: function () { return common_1.sumSingleBalance; } });
58
- Object.defineProperty(exports, "mergeBalances", { enumerable: true, get: function () { return common_1.mergeBalances; } });
59
- Object.defineProperty(exports, "removeTokenBalance", { enumerable: true, get: function () { return common_1.removeTokenBalance; } });
60
- Object.defineProperty(exports, "sumChainTvls", { enumerable: true, get: function () { return common_1.sumChainTvls; } });
61
- Object.defineProperty(exports, "getUniqueAddresses", { enumerable: true, get: function () { return common_1.getUniqueAddresses; } });
62
- Object.defineProperty(exports, "convertToBigInt", { enumerable: true, get: function () { return common_1.convertToBigInt; } });
63
- Object.defineProperty(exports, "getProviderUrl", { enumerable: true, get: function () { return common_1.getProviderUrl; } });
64
- Object.defineProperty(exports, "formError", { enumerable: true, get: function () { return common_1.formError; } });
65
- Object.defineProperty(exports, "formErrorString", { enumerable: true, get: function () { return common_1.formErrorString; } });
66
- Object.defineProperty(exports, "shortenString", { enumerable: true, get: function () { return common_1.shortenString; } });
67
- Object.defineProperty(exports, "fetchJson", { enumerable: true, get: function () { return common_1.fetchJson; } });
68
- Object.defineProperty(exports, "postJson", { enumerable: true, get: function () { return common_1.postJson; } });
69
- Object.defineProperty(exports, "tronToEvmAddress", { enumerable: true, get: function () { return common_1.tronToEvmAddress; } });
70
- Object.defineProperty(exports, "evmToTronAddress", { enumerable: true, get: function () { return common_1.evmToTronAddress; } });
71
- Object.defineProperty(exports, "sleep", { enumerable: true, get: function () { return common_1.sleep; } });
72
- Object.defineProperty(exports, "sleepRandom", { enumerable: true, get: function () { return common_1.sleepRandom; } });
73
- Object.defineProperty(exports, "getHash", { enumerable: true, get: function () { return common_1.getHash; } });
package/build/index.d.ts DELETED
@@ -1,32 +0,0 @@
1
- import { debugLog, debugTable } from "./util/debugLog";
2
- export { ChainApi } from './ChainApi';
3
- export { Balances } from './Balances';
4
- export { getProvider, setProvider, } from './general';
5
- export * as util from "./generalUtil";
6
- export * as cache from "./util/cache";
7
- export { getLogs as getEventLogs } from "./util/logs";
8
- export * as sdkCache from "./util/internal-cache";
9
- export * as api from "./api";
10
- export * as elastic from "./util/elastic";
11
- export * as api2 from "./api2";
12
- export * as blocks from "./computeTVL/blocks";
13
- import * as humanN from "./computeTVL/humanizeNumber";
14
- export * as graph from "./util/graph";
15
- export * as indexer from "./util/indexer";
16
- export { queryClickhouse, queryIndexerSql, isIndexerSqlEnabled, IndexerSqlOptions } from "./util/indexerSql";
17
- export * as types from "./types";
18
- export * as tron from "./abi/tron";
19
- export * as erc20 from "./erc20";
20
- export * as coins from "./util/coins";
21
- export * as chainUtils from "./util/chainUtils";
22
- export * as chains from "./chains";
23
- export declare const log: typeof debugLog;
24
- export declare const logTable: typeof debugTable;
25
- export declare const humanizeNumber: typeof humanN.humanizeNumber;
26
- export declare const providerListJSON: {
27
- [chain: string]: {
28
- rpc: string[];
29
- chainId: number;
30
- explorer?: string;
31
- };
32
- };
package/build/index.js DELETED
@@ -1,74 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- var __importDefault = (this && this.__importDefault) || function (mod) {
36
- return (mod && mod.__esModule) ? mod : { "default": mod };
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.providerListJSON = exports.humanizeNumber = exports.logTable = exports.log = exports.chains = exports.chainUtils = exports.coins = exports.erc20 = exports.tron = exports.types = exports.isIndexerSqlEnabled = exports.queryIndexerSql = exports.queryClickhouse = 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;
40
- const debugLog_1 = require("./util/debugLog");
41
- var ChainApi_1 = require("./ChainApi");
42
- Object.defineProperty(exports, "ChainApi", { enumerable: true, get: function () { return ChainApi_1.ChainApi; } });
43
- var Balances_1 = require("./Balances");
44
- Object.defineProperty(exports, "Balances", { enumerable: true, get: function () { return Balances_1.Balances; } });
45
- var general_1 = require("./general"); // need to rethink usage of providers in server repo, it is initally empty
46
- Object.defineProperty(exports, "getProvider", { enumerable: true, get: function () { return general_1.getProvider; } });
47
- Object.defineProperty(exports, "setProvider", { enumerable: true, get: function () { return general_1.setProvider; } });
48
- exports.util = __importStar(require("./generalUtil"));
49
- exports.cache = __importStar(require("./util/cache"));
50
- var logs_1 = require("./util/logs");
51
- Object.defineProperty(exports, "getEventLogs", { enumerable: true, get: function () { return logs_1.getLogs; } });
52
- exports.sdkCache = __importStar(require("./util/internal-cache"));
53
- exports.api = __importStar(require("./api"));
54
- exports.elastic = __importStar(require("./util/elastic"));
55
- exports.api2 = __importStar(require("./api2"));
56
- exports.blocks = __importStar(require("./computeTVL/blocks"));
57
- const humanN = __importStar(require("./computeTVL/humanizeNumber"));
58
- exports.graph = __importStar(require("./util/graph"));
59
- exports.indexer = __importStar(require("./util/indexer"));
60
- var indexerSql_1 = require("./util/indexerSql");
61
- Object.defineProperty(exports, "queryClickhouse", { enumerable: true, get: function () { return indexerSql_1.queryClickhouse; } });
62
- Object.defineProperty(exports, "queryIndexerSql", { enumerable: true, get: function () { return indexerSql_1.queryIndexerSql; } });
63
- Object.defineProperty(exports, "isIndexerSqlEnabled", { enumerable: true, get: function () { return indexerSql_1.isIndexerSqlEnabled; } });
64
- exports.types = __importStar(require("./types"));
65
- exports.tron = __importStar(require("./abi/tron"));
66
- exports.erc20 = __importStar(require("./erc20"));
67
- exports.coins = __importStar(require("./util/coins"));
68
- exports.chainUtils = __importStar(require("./util/chainUtils"));
69
- exports.chains = __importStar(require("./chains"));
70
- const providers_json_1 = __importDefault(require("./providers.json"));
71
- exports.log = debugLog_1.debugLog;
72
- exports.logTable = debugLog_1.debugTable;
73
- exports.humanizeNumber = humanN.humanizeNumber;
74
- exports.providerListJSON = providers_json_1.default;