@fileverse-dev/formulajs 4.4.11-mod-49 → 4.4.11-mod-51

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.11-mod-49 */
1
+ /* @fileverse-dev/formulajs v4.4.11-mod-51 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -10945,8 +10945,7 @@ function _typeof(o) {
10945
10945
  Firefly: "FIRE_FLY_API_KEY",
10946
10946
  GnosisPay: "GNOSIS_API_KEY",
10947
10947
  Neynar: "NEYNAR_API_KEY",
10948
- Defillama: "DEFILLAMA_API_KEY",
10949
- Uniswap: "UNISWAP_API_KEY"
10948
+ Defillama: "DEFILLAMA_API_KEY"
10950
10949
  };
10951
10950
  var fromTimeStampToBlock = function() {
10952
10951
  var _ref = _asyncToGenerator(_regeneratorRuntime().mark((function _callee(timestamp, chain, apiKey) {
@@ -11217,7 +11216,7 @@ function _typeof(o) {
11217
11216
  _context2.next = 5;
11218
11217
  return fetch(url, {
11219
11218
  headers: {
11220
- "x-api-key": API_KEY,
11219
+ "x-api-key": apiKey,
11221
11220
  "x-neynar-experimental": "false"
11222
11221
  }
11223
11222
  });
@@ -11747,7 +11746,7 @@ function _typeof(o) {
11747
11746
 
11748
11747
  case 6:
11749
11748
  _context0.next = 8;
11750
- return fromUsernameToFid(username);
11749
+ return fromUsernameToFid(username, API_KEY);
11751
11750
 
11752
11751
  case 8:
11753
11752
  fid = _context0.sent;
@@ -12722,6 +12721,102 @@ function _typeof(o) {
12722
12721
  })));
12723
12722
  return _DEFILLAMA.apply(this, arguments);
12724
12723
  }
12724
+ function UNISWAP() {
12725
+ return _UNISWAP.apply(this, arguments);
12726
+ }
12727
+ function _UNISWAP() {
12728
+ _UNISWAP = _asyncToGenerator(_regeneratorRuntime().mark((function _callee17() {
12729
+ var _argsToArray19, _argsToArray20, graphType, category, param1, param2, baseUrl, url, res, json, _args20 = arguments;
12730
+ return _regeneratorRuntime().wrap((function _callee17$(_context20) {
12731
+ while (1) switch (_context20.prev = _context20.next) {
12732
+ case 0:
12733
+ _argsToArray19 = argsToArray(_args20), _argsToArray20 = _slicedToArray(_argsToArray19, 4),
12734
+ graphType = _argsToArray20[0], category = _argsToArray20[1], param1 = _argsToArray20[2],
12735
+ param2 = _argsToArray20[3];
12736
+ baseUrl = "https://onchain-proxy.fileverse.io/third-party";
12737
+ _context20.prev = 2;
12738
+ url = "".concat(baseUrl, "?service=uniswap&graphType=").concat(graphType, "&category=").concat(category, "&input1=").concat(param1, "&input2=").concat(param2);
12739
+ _context20.next = 6;
12740
+ return fetch(url);
12741
+
12742
+ case 6:
12743
+ res = _context20.sent;
12744
+ if (res.ok) {
12745
+ _context20.next = 9;
12746
+ break;
12747
+ }
12748
+ throw new Error("HTTP ".concat(res.status));
12749
+
12750
+ case 9:
12751
+ _context20.next = 11;
12752
+ return res.json();
12753
+
12754
+ case 11:
12755
+ json = _context20.sent;
12756
+ return _context20.abrupt("return", removeNestedStructure(json));
12757
+
12758
+ case 15:
12759
+ _context20.prev = 15;
12760
+ _context20.t0 = _context20["catch"](2);
12761
+ console.error("UNISWAP fetch error:", _context20.t0);
12762
+ return _context20.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
12763
+
12764
+ case 19:
12765
+ case "end":
12766
+ return _context20.stop();
12767
+ }
12768
+ }), _callee17, null, [ [ 2, 15 ] ]);
12769
+ })));
12770
+ return _UNISWAP.apply(this, arguments);
12771
+ }
12772
+ function AAVE() {
12773
+ return _AAVE.apply(this, arguments);
12774
+ }
12775
+ function _AAVE() {
12776
+ _AAVE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee18() {
12777
+ var _argsToArray21, _argsToArray22, graphType, category, param1, param2, baseUrl, url, res, json, _args21 = arguments;
12778
+ return _regeneratorRuntime().wrap((function _callee18$(_context21) {
12779
+ while (1) switch (_context21.prev = _context21.next) {
12780
+ case 0:
12781
+ _argsToArray21 = argsToArray(_args21), _argsToArray22 = _slicedToArray(_argsToArray21, 4),
12782
+ graphType = _argsToArray22[0], category = _argsToArray22[1], param1 = _argsToArray22[2],
12783
+ param2 = _argsToArray22[3];
12784
+ baseUrl = "https://onchain-proxy.fileverse.io/third-party";
12785
+ _context21.prev = 2;
12786
+ url = "".concat(baseUrl, "?service=aave&graphType=").concat(graphType, "&category=").concat(category, "&input1=").concat(param1, "&input2=").concat(param2);
12787
+ _context21.next = 6;
12788
+ return fetch(url);
12789
+
12790
+ case 6:
12791
+ res = _context21.sent;
12792
+ if (res.ok) {
12793
+ _context21.next = 9;
12794
+ break;
12795
+ }
12796
+ throw new Error("HTTP ".concat(res.status));
12797
+
12798
+ case 9:
12799
+ _context21.next = 11;
12800
+ return res.json();
12801
+
12802
+ case 11:
12803
+ json = _context21.sent;
12804
+ return _context21.abrupt("return", removeNestedStructure(json));
12805
+
12806
+ case 15:
12807
+ _context21.prev = 15;
12808
+ _context21.t0 = _context21["catch"](2);
12809
+ console.error("AAVE fetch error:", _context21.t0);
12810
+ return _context21.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
12811
+
12812
+ case 19:
12813
+ case "end":
12814
+ return _context21.stop();
12815
+ }
12816
+ }), _callee18, null, [ [ 2, 15 ] ]);
12817
+ })));
12818
+ return _AAVE.apply(this, arguments);
12819
+ }
12725
12820
  function POLYMARKET() {
12726
12821
  return "Coming Soon";
12727
12822
  }
@@ -12745,6 +12840,7 @@ function _typeof(o) {
12745
12840
  symbols: symbols,
12746
12841
  date: date
12747
12842
  };
12843
+ exports.AAVE = AAVE;
12748
12844
  exports.ABS = ABS;
12749
12845
  exports.ACCRINT = ACCRINT;
12750
12846
  exports.ACOS = ACOS;
@@ -13136,6 +13232,7 @@ function _typeof(o) {
13136
13232
  exports.UNICHAR = UNICHAR;
13137
13233
  exports.UNICODE = UNICODE;
13138
13234
  exports.UNIQUE = UNIQUE;
13235
+ exports.UNISWAP = UNISWAP;
13139
13236
  exports.UPPER = UPPER;
13140
13237
  exports.VALUE = VALUE;
13141
13238
  exports.VAR = VAR;