@fileverse-dev/formulajs 4.4.24 → 4.4.25

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.
@@ -1,4 +1,4 @@
1
- /* @fileverse-dev/formulajs v4.4.24 */
1
+ /* @fileverse-dev/formulajs v4.4.25 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -19321,15 +19321,71 @@ function _typeof(o) {
19321
19321
  })));
19322
19322
  return _WALLET.apply(this, arguments);
19323
19323
  }
19324
+ var yieldParamsSchema = objectType({
19325
+ category: enumType([ "all", "stablecoins" ])
19326
+ });
19327
+ function YIELD() {
19328
+ return _YIELD.apply(this, arguments);
19329
+ }
19330
+ function _YIELD() {
19331
+ _YIELD = _asyncToGenerator(_regeneratorRuntime().mark((function _callee34() {
19332
+ var _argsToArray37, _argsToArray38, category, response, result, _args38 = arguments;
19333
+ return _regeneratorRuntime().wrap((function _callee34$(_context38) {
19334
+ while (1) switch (_context38.prev = _context38.next) {
19335
+ case 0:
19336
+ _context38.prev = 0;
19337
+ _argsToArray37 = argsToArray(_args38), _argsToArray38 = _slicedToArray(_argsToArray37, 1),
19338
+ category = _argsToArray38[0];
19339
+ validateParams(yieldParamsSchema, {
19340
+ category: category
19341
+ });
19342
+ _context38.next = 5;
19343
+ return DEFILLAMA("yields");
19344
+
19345
+ case 5:
19346
+ response = _context38.sent;
19347
+ if (!response.functionName) {
19348
+ _context38.next = 9;
19349
+ break;
19350
+ }
19351
+ response.functionName = "YIELD";
19352
+ return _context38.abrupt("return", response);
19353
+
19354
+ case 9:
19355
+ if (!(category === "all")) {
19356
+ _context38.next = 11;
19357
+ break;
19358
+ }
19359
+ return _context38.abrupt("return", response);
19360
+
19361
+ case 11:
19362
+ result = response.filter((function(data) {
19363
+ return data.stablecoin;
19364
+ }));
19365
+ return _context38.abrupt("return", result);
19366
+
19367
+ case 15:
19368
+ _context38.prev = 15;
19369
+ _context38.t0 = _context38["catch"](0);
19370
+ return _context38.abrupt("return", errorMessageHandler(_context38.t0, "YIELD"));
19371
+
19372
+ case 18:
19373
+ case "end":
19374
+ return _context38.stop();
19375
+ }
19376
+ }), _callee34, null, [ [ 0, 15 ] ]);
19377
+ })));
19378
+ return _YIELD.apply(this, arguments);
19379
+ }
19324
19380
  function FLVURL() {
19325
19381
  return _FLVURL.apply(this, arguments);
19326
19382
  }
19327
19383
  function _FLVURL() {
19328
- _FLVURL = _asyncToGenerator(_regeneratorRuntime().mark((function _callee34() {
19329
- return _regeneratorRuntime().wrap((function _callee34$(_context38) {
19330
- while (1) switch (_context38.prev = _context38.next) {
19384
+ _FLVURL = _asyncToGenerator(_regeneratorRuntime().mark((function _callee35() {
19385
+ return _regeneratorRuntime().wrap((function _callee35$(_context39) {
19386
+ while (1) switch (_context39.prev = _context39.next) {
19331
19387
  case 0:
19332
- return _context38.abrupt("return", new Promise((function(resolve) {
19388
+ return _context39.abrupt("return", new Promise((function(resolve) {
19333
19389
  setTimeout((function() {
19334
19390
  resolve([ {
19335
19391
  Yoo: "gotcha"
@@ -19339,9 +19395,9 @@ function _typeof(o) {
19339
19395
 
19340
19396
  case 1:
19341
19397
  case "end":
19342
- return _context38.stop();
19398
+ return _context39.stop();
19343
19399
  }
19344
- }), _callee34);
19400
+ }), _callee35);
19345
19401
  })));
19346
19402
  return _FLVURL.apply(this, arguments);
19347
19403
  }
@@ -19788,6 +19844,7 @@ function _typeof(o) {
19788
19844
  exports.XOR = XOR;
19789
19845
  exports.YEAR = YEAR;
19790
19846
  exports.YEARFRAC = YEARFRAC;
19847
+ exports.YIELD = YIELD;
19791
19848
  exports.Z = Z;
19792
19849
  exports.ZTEST = ZTEST;
19793
19850
  exports.utils = utils;