@gearbox-protocol/sdk 1.7.0 → 1.7.2

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/lib/index.d.ts CHANGED
@@ -60,3 +60,5 @@ export * from "./utils/multicall";
60
60
  export * from "./utils/price";
61
61
  export { callRepeater } from "./utils/repeater";
62
62
  export * from "./utils/types";
63
+ export * from "./watchers/creditAccountWatcher";
64
+ export * from "./watchers/creditManagerWatcher";
package/lib/index.js CHANGED
@@ -87,3 +87,5 @@ __exportStar(require("./utils/price"), exports);
87
87
  var repeater_1 = require("./utils/repeater");
88
88
  Object.defineProperty(exports, "callRepeater", { enumerable: true, get: function () { return repeater_1.callRepeater; } });
89
89
  __exportStar(require("./utils/types"), exports);
90
+ __exportStar(require("./watchers/creditAccountWatcher"), exports);
91
+ __exportStar(require("./watchers/creditManagerWatcher"), exports);
@@ -1,3 +1,4 @@
1
1
  import { ethers } from "ethers";
2
2
  import { NetworkType } from "../core/constants";
3
3
  export declare function detectNetwork(provider: ethers.providers.Provider): Promise<NetworkType>;
4
+ export declare function getEtherscan(chainId: number): string;
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  }
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.detectNetwork = void 0;
39
+ exports.getEtherscan = exports.detectNetwork = void 0;
40
40
  var constants_1 = require("../core/constants");
41
41
  var token_1 = require("../tokens/token");
42
42
  var types_1 = require("../types");
@@ -72,3 +72,14 @@ function detectNetwork(provider) {
72
72
  });
73
73
  }
74
74
  exports.detectNetwork = detectNetwork;
75
+ function getEtherscan(chainId) {
76
+ switch (chainId) {
77
+ case constants_1.MAINNET_NETWORK:
78
+ return "https://etherscan.io";
79
+ case constants_1.GOERLI_NETWORK:
80
+ return "https://goerli.etherscan.io";
81
+ default:
82
+ return "";
83
+ }
84
+ }
85
+ exports.getEtherscan = getEtherscan;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "1.7.0",
3
+ "version": "1.7.2",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",