@defillama/sdk 4.0.75 → 4.0.76

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 (62) hide show
  1. package/package.json +1 -1
  2. package/build/test.d.ts +0 -1
  3. package/build/test.js +0 -62
  4. /package/build/{src/Balances.d.ts → Balances.d.ts} +0 -0
  5. /package/build/{src/Balances.js → Balances.js} +0 -0
  6. /package/build/{src/ChainApi.d.ts → ChainApi.d.ts} +0 -0
  7. /package/build/{src/ChainApi.js → ChainApi.js} +0 -0
  8. /package/build/{src/abi → abi}/abi2.d.ts +0 -0
  9. /package/build/{src/abi → abi}/abi2.js +0 -0
  10. /package/build/{src/abi → abi}/cachedABIs.d.ts +0 -0
  11. /package/build/{src/abi → abi}/cachedABIs.js +0 -0
  12. /package/build/{src/abi → abi}/convertResults.d.ts +0 -0
  13. /package/build/{src/abi → abi}/convertResults.js +0 -0
  14. /package/build/{src/abi → abi}/index.d.ts +0 -0
  15. /package/build/{src/abi → abi}/index.js +0 -0
  16. /package/build/{src/abi → abi}/multicall.d.ts +0 -0
  17. /package/build/{src/abi → abi}/multicall.js +0 -0
  18. /package/build/{src/abi → abi}/multicall3.d.ts +0 -0
  19. /package/build/{src/abi → abi}/multicall3.js +0 -0
  20. /package/build/{src/abi → abi}/rpcCall.d.ts +0 -0
  21. /package/build/{src/abi → abi}/rpcCall.js +0 -0
  22. /package/build/{src/abi → abi}/tron.d.ts +0 -0
  23. /package/build/{src/abi → abi}/tron.js +0 -0
  24. /package/build/{src/api.d.ts → api.d.ts} +0 -0
  25. /package/build/{src/api.js → api.js} +0 -0
  26. /package/build/{src/api2.d.ts → api2.d.ts} +0 -0
  27. /package/build/{src/api2.js → api2.js} +0 -0
  28. /package/build/{src/computeTVL → computeTVL}/blocks.d.ts +0 -0
  29. /package/build/{src/computeTVL → computeTVL}/blocks.js +0 -0
  30. /package/build/{src/computeTVL → computeTVL}/humanizeNumber.d.ts +0 -0
  31. /package/build/{src/computeTVL → computeTVL}/humanizeNumber.js +0 -0
  32. /package/build/{src/computeTVL → computeTVL}/prices.d.ts +0 -0
  33. /package/build/{src/computeTVL → computeTVL}/prices.js +0 -0
  34. /package/build/{src/erc20 → erc20}/index.d.ts +0 -0
  35. /package/build/{src/erc20 → erc20}/index.js +0 -0
  36. /package/build/{src/eth → eth}/index.d.ts +0 -0
  37. /package/build/{src/eth → eth}/index.js +0 -0
  38. /package/build/{src/general.d.ts → general.d.ts} +0 -0
  39. /package/build/{src/general.js → general.js} +0 -0
  40. /package/build/{src/generalUtil.d.ts → generalUtil.d.ts} +0 -0
  41. /package/build/{src/generalUtil.js → generalUtil.js} +0 -0
  42. /package/build/{src/index.d.ts → index.d.ts} +0 -0
  43. /package/build/{src/index.js → index.js} +0 -0
  44. /package/build/{src/providers.json → providers.json} +0 -0
  45. /package/build/{src/types.d.ts → types.d.ts} +0 -0
  46. /package/build/{src/types.js → types.js} +0 -0
  47. /package/build/{src/util → util}/cache.d.ts +0 -0
  48. /package/build/{src/util → util}/cache.js +0 -0
  49. /package/build/{src/util → util}/computeTVL.d.ts +0 -0
  50. /package/build/{src/util → util}/computeTVL.js +0 -0
  51. /package/build/{src/util → util}/debugLog.d.ts +0 -0
  52. /package/build/{src/util → util}/debugLog.js +0 -0
  53. /package/build/{src/util → util}/index.d.ts +0 -0
  54. /package/build/{src/util → util}/index.js +0 -0
  55. /package/build/{src/util → util}/internal-cache.d.ts +0 -0
  56. /package/build/{src/util → util}/internal-cache.js +0 -0
  57. /package/build/{src/util → util}/promisePool.d.ts +0 -0
  58. /package/build/{src/util → util}/promisePool.js +0 -0
  59. /package/build/{src/util → util}/r2.d.ts +0 -0
  60. /package/build/{src/util → util}/r2.js +0 -0
  61. /package/build/{src/util → util}/updateProviderList.d.ts +0 -0
  62. /package/build/{src/util → util}/updateProviderList.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defillama/sdk",
3
- "version": "4.0.75",
3
+ "version": "4.0.76",
4
4
  "description": "SDK for calculating TVL",
5
5
  "main": "build/index.js",
6
6
  "scripts": {
package/build/test.d.ts DELETED
@@ -1 +0,0 @@
1
- export {};
package/build/test.js DELETED
@@ -1,62 +0,0 @@
1
- "use strict";
2
- // process.env.ETHEREUM_RPC=''
3
- // process.env.SDK_MULTICALL_CHUNK_SIZE='100'
4
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
5
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6
- return new (P || (P = Promise))(function (resolve, reject) {
7
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
9
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
10
- step((generator = generator.apply(thisArg, _arguments || [])).next());
11
- });
12
- };
13
- var __generator = (this && this.__generator) || function (thisArg, body) {
14
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
15
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
16
- function verb(n) { return function (v) { return step([n, v]); }; }
17
- function step(op) {
18
- if (f) throw new TypeError("Generator is already executing.");
19
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
20
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
21
- if (y = 0, t) op = [op[0] & 2, t.value];
22
- switch (op[0]) {
23
- case 0: case 1: t = op; break;
24
- case 4: _.label++; return { value: op[1], done: false };
25
- case 5: _.label++; y = op[1]; op = [0]; continue;
26
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
27
- default:
28
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
29
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
30
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
31
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
32
- if (t[2]) _.ops.pop();
33
- _.trys.pop(); continue;
34
- }
35
- op = body.call(thisArg, _);
36
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
37
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
38
- }
39
- };
40
- Object.defineProperty(exports, "__esModule", { value: true });
41
- var src_1 = require("./src");
42
- function run() {
43
- return __awaiter(this, void 0, void 0, function () {
44
- var api, calls, target, loanData;
45
- return __generator(this, function (_a) {
46
- switch (_a.label) {
47
- case 0:
48
- api = new src_1.ChainApi({
49
- chain: 'ethereum',
50
- });
51
- calls = ["76", "91", "92", "93", "94", "100", "101", "124", "125", "126", "137", "142", "147", "150", "173", "179", "183", "195", "198", "203", "238", "245", "258", "281", "283", "286", "294", "296", "302", "303", "324", "338", "342", "344", "351", "352", "353", "365", "386", "428", "436", "437", "438", "439", "440", "442", "444", "445", "451", "453", "454", "461", "462", "465", "468", "481", "482", "483", "491", "495", "496", "497", "498", "499", "505", "506", "523", "525", "527", "528", "529", "531", "541", "596", "599", "605", "610", "611", "612", "613", "614", "615", "616", "617", "618", "619", "620", "622", "623", "655", "663", "664", "665", "666", "680", "709", "771", "772", "776", "777", "778", "779", "780", "783", "785", "802", "806", "816", "819", "824", "852", "853", "888", "896", "906", "907", "921", "927", "928", "929", "930", "931", "932", "933", "934", "935", "939", "942", "943", "950", "956", "957", "958", "961", "972", "978", "980", "987", "997", "998", "1001", "1002", "1003", "1004", "1005", "1010", "1011", "1012", "1013", "1014", "1015", "1016", "1017", "1018", "1019", "1024", "1025", "1029", "1031", "1036", "1037", "1046", "1063", "1064", "1065", "1067", "1068", "1071", "1072", "1073", "1079", "1080", "1089", "1090", "1091", "1092", "1093", "1094", "1096", "1105", "1106", "1107", "1111", "1112", "1114", "1115", "1116", "1117", "1123", "1126", "1127", "1131", "1132", "1134", "1142", "1146", "1147", "1149", "1154", "1155", "1156", "1158", "1159", "1160", "1165", "1166", "1167"];
52
- target = '0x00182FdB0B880eE24D428e3Cc39383717677C37e';
53
- return [4 /*yield*/, api.multiCall({ abi: "function bids(uint256) view returns (address borrower, address receiver, address lender, uint256 marketplaceId, bytes32 _metadataURI, tuple(address lendingToken, uint256 principal, tuple(uint256 principal, uint256 interest) totalRepaid, uint32 timestamp, uint32 acceptedTimestamp, uint32 lastRepaidTimestamp, uint32 loanDuration) loanDetails, tuple(uint256 paymentCycleAmount, uint32 paymentCycle, uint16 APR) terms, uint8 state, uint8 paymentType)", calls: calls, target: target, })];
54
- case 1:
55
- loanData = _a.sent();
56
- console.log(loanData.length);
57
- return [2 /*return*/];
58
- }
59
- });
60
- });
61
- }
62
- run().catch(console.error);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes