@defillama/sdk 3.0.45 → 3.0.46

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/ChainApi.js CHANGED
@@ -46,11 +46,15 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
46
46
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
47
47
  }
48
48
  };
49
+ var __importDefault = (this && this.__importDefault) || function (mod) {
50
+ return (mod && mod.__esModule) ? mod : { "default": mod };
51
+ };
49
52
  Object.defineProperty(exports, "__esModule", { value: true });
50
53
  exports.ChainApi = void 0;
51
54
  var general_1 = require("./general");
52
55
  var abi2_1 = require("./abi/abi2");
53
56
  var blocks_1 = require("./computeTVL/blocks");
57
+ var providers_json_1 = __importDefault(require("./providers.json"));
54
58
  var debugLog_1 = require("./util/debugLog");
55
59
  var generalUtil_1 = require("./generalUtil");
56
60
  var ChainApi = /** @class */ (function () {
@@ -128,6 +132,11 @@ var ChainApi = /** @class */ (function () {
128
132
  ChainApi.prototype.getBalances = function () {
129
133
  return this._balances;
130
134
  };
135
+ ChainApi.prototype.getChainId = function () {
136
+ var _a;
137
+ // @ts-ignore
138
+ return (_a = providers_json_1.default[this.chain]) === null || _a === void 0 ? void 0 : _a.chainId;
139
+ };
131
140
  return ChainApi;
132
141
  }());
133
142
  exports.ChainApi = ChainApi;