@curvefi/api 1.15.0 → 1.17.0

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/utils.d.ts CHANGED
@@ -22,3 +22,4 @@ export declare const ensureAllowance: (coins: string[], amounts: string[], spend
22
22
  export declare const getPoolNameBySwapAddress: (swapAddress: string) => string;
23
23
  export declare const _getUsdRate: (assetId: string) => Promise<number>;
24
24
  export declare const _getStatsUrl: (isCrypto?: boolean) => string;
25
+ export declare const getPoolList: () => string[];
package/lib/utils.js CHANGED
@@ -59,7 +59,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
59
59
  return (mod && mod.__esModule) ? mod : { "default": mod };
60
60
  };
61
61
  Object.defineProperty(exports, "__esModule", { value: true });
62
- exports._getStatsUrl = exports._getUsdRate = exports.getPoolNameBySwapAddress = exports.ensureAllowance = exports.ensureAllowanceEstimateGas = exports._ensureAllowance = exports.hasAllowance = exports.getAllowance = exports._getAllowance = exports.getBalances = exports._prepareAddresses = exports._getBalances = exports._getCoinDecimals = exports._getCoinAddresses = exports.getEthIndex = exports.isEth = exports.fromBN = exports.toStringFromBN = exports.toBN = exports.BN = exports.MAX_ALLOWANCE = void 0;
62
+ exports.getPoolList = exports._getStatsUrl = exports._getUsdRate = exports.getPoolNameBySwapAddress = exports.ensureAllowance = exports.ensureAllowanceEstimateGas = exports._ensureAllowance = exports.hasAllowance = exports.getAllowance = exports._getAllowance = exports.getBalances = exports._prepareAddresses = exports._getBalances = exports._getCoinDecimals = exports._getCoinAddresses = exports.getEthIndex = exports.isEth = exports.fromBN = exports.toStringFromBN = exports.toBN = exports.BN = exports.MAX_ALLOWANCE = void 0;
63
63
  var axios_1 = __importDefault(require("axios"));
64
64
  var ethers_1 = require("ethers");
65
65
  var bignumber_js_1 = __importDefault(require("bignumber.js"));
@@ -419,13 +419,15 @@ exports._getUsdRate = _getUsdRate;
419
419
  var _getStatsUrl = function (isCrypto) {
420
420
  if (isCrypto === void 0) { isCrypto = false; }
421
421
  if (curve_1.curve.chainId === 1 || curve_1.curve.chainId === 1337) {
422
- return isCrypto ? "http://stats.curve.fi/raw-stats-crypto/apys.json" : "http://stats.curve.fi/raw-stats/apys.json";
422
+ return isCrypto ? "https://stats.curve.fi/raw-stats-crypto/apys.json" : "https://stats.curve.fi/raw-stats/apys.json";
423
423
  }
424
424
  else if (curve_1.curve.chainId === 137) {
425
- return "http://stats.curve.fi/raw-stats-polygon/apys.json";
425
+ return "https://stats.curve.fi/raw-stats-polygon/apys.json";
426
426
  }
427
427
  else {
428
428
  throw Error("Unsupported network id".concat(curve_1.curve.chainId));
429
429
  }
430
430
  };
431
431
  exports._getStatsUrl = _getStatsUrl;
432
+ var getPoolList = function () { return Object.keys(curve_1.POOLS_DATA); };
433
+ exports.getPoolList = getPoolList;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@curvefi/api",
3
- "version": "1.15.0",
3
+ "version": "1.17.0",
4
4
  "description": "JavaScript library for curve.fi",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {