@gearbox-protocol/sdk 3.0.0-next.248 → 3.0.0-next.249

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/apy/skyAPY.js CHANGED
@@ -6,16 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getSkyAPY = void 0;
7
7
  const sdk_gov_1 = require("@gearbox-protocol/sdk-gov");
8
8
  const axios_1 = __importDefault(require("axios"));
9
- const getSavingsURL = () => `https://info-sky.blockanalitica.com/save/?format=json`;
10
- const getFarmingURL = () => `https://info-sky.blockanalitica.com/farms/?format=json`;
9
+ const getAPYURL = () => "https://info-sky.blockanalitica.com/api/v1/overall/";
11
10
  async function getSkyAPY() {
12
11
  try {
13
- const [savings, farm] = await Promise.all([
14
- axios_1.default.get(getSavingsURL()),
15
- axios_1.default.get(getFarmingURL()),
16
- ]);
17
- const savingsRate = savings?.data?.ssr_rate || 0;
18
- const farmRate = farm?.data?.sky_farm.apy || 0;
12
+ const resp = await axios_1.default.get(getAPYURL());
13
+ const apyInfo = resp?.data?.[0];
14
+ const savingsRate = apyInfo?.sky_savings_rate_apy || 0;
15
+ const farmRate = apyInfo?.sky_farm_apy || 0;
19
16
  return {
20
17
  sUSDS: numberToAPY(Number(savingsRate)),
21
18
  stkUSDS: numberToAPY(Number(farmRate)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "3.0.0-next.248",
3
+ "version": "3.0.0-next.249",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",