@fileverse-dev/formulajs 4.4.11-mod-38-patch-004 → 4.4.11-mod-40

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-38-patch-004 */
1
+ /* @fileverse-dev/formulajs v4.4.11-mod-40 */
2
2
  var _excluded = [ "confirmations", "dataDecoded" ];
3
3
 
4
4
  function _objectWithoutProperties(e, t) {
@@ -6978,20 +6978,6 @@ function _typeof(o) {
6978
6978
  }
6979
6979
  return result;
6980
6980
  }
6981
- function BASE(number, radix, min_length) {
6982
- number = parseNumber(number);
6983
- radix = parseNumber(radix);
6984
- min_length = parseNumber(min_length);
6985
- var anyError$1 = anyError(number, radix, min_length);
6986
- if (anyError$1) {
6987
- return anyError$1;
6988
- }
6989
- if (radix === 0) {
6990
- return num;
6991
- }
6992
- var result = number.toString(radix);
6993
- return new Array(Math.max(min_length + 1 - result.length, 0)).join("0") + result;
6994
- }
6995
6981
  function CEILING(number, significance) {
6996
6982
  number = parseNumber(number);
6997
6983
  significance = parseNumber(significance);
@@ -11211,24 +11197,26 @@ function _typeof(o) {
11211
11197
  })));
11212
11198
  return _handleScanRequest.apply(this, arguments);
11213
11199
  }
11214
- function FIREFLY() {
11200
+ function FIREFLY(_x6, _x7, _x8) {
11215
11201
  return _FIREFLY.apply(this, arguments);
11216
11202
  }
11217
11203
  function _FIREFLY() {
11218
- _FIREFLY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee4() {
11204
+ _FIREFLY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee4(platform, contentType, identifier) {
11219
11205
  var _typeMap$platform;
11220
- var API_KEY, baseUrl, headers, typeMap, _argsToArray3, _argsToArray4, platform, contentType, identifier, _argsToArray4$, start, _argsToArray4$2, end, platformType, query, url, res, json, _args4 = arguments;
11206
+ var start, end, API_KEY, baseUrl, headers, typeMap, platformType, query, url, res, json, _args4 = arguments;
11221
11207
  return _regeneratorRuntime().wrap((function _callee4$(_context4) {
11222
11208
  while (1) switch (_context4.prev = _context4.next) {
11223
11209
  case 0:
11210
+ start = _args4.length > 3 && _args4[3] !== undefined ? _args4[3] : 0;
11211
+ end = _args4.length > 4 && _args4[4] !== undefined ? _args4[4] : 10;
11224
11212
  API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Firefly);
11225
11213
  if (API_KEY) {
11226
- _context4.next = 3;
11214
+ _context4.next = 5;
11227
11215
  break;
11228
11216
  }
11229
11217
  return _context4.abrupt("return", "".concat(SERVICE_API_KEY.Firefly).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11230
11218
 
11231
- case 3:
11219
+ case 5:
11232
11220
  baseUrl = "https://openapi.firefly.land/v1/fileverse/fetch";
11233
11221
  headers = {
11234
11222
  "x-api-key": API_KEY
@@ -11244,18 +11232,14 @@ function _typeof(o) {
11244
11232
  replies: "lenspostid"
11245
11233
  }
11246
11234
  };
11247
- _argsToArray3 = argsToArray(_args4), _argsToArray4 = _slicedToArray(_argsToArray3, 5),
11248
- platform = _argsToArray4[0], contentType = _argsToArray4[1], identifier = _argsToArray4[2],
11249
- _argsToArray4$ = _argsToArray4[3], start = _argsToArray4$ === void 0 ? 0 : _argsToArray4$,
11250
- _argsToArray4$2 = _argsToArray4[4], end = _argsToArray4$2 === void 0 ? 10 : _argsToArray4$2;
11251
11235
  platformType = (_typeMap$platform = typeMap[platform]) === null || _typeMap$platform === void 0 ? void 0 : _typeMap$platform[contentType];
11252
11236
  if (platformType) {
11253
- _context4.next = 10;
11237
+ _context4.next = 11;
11254
11238
  break;
11255
11239
  }
11256
11240
  return _context4.abrupt("return", "".concat(SERVICE_API_KEY.Firefly).concat(ERROR_MESSAGES_FLAG.INVALID_TYPE));
11257
11241
 
11258
- case 10:
11242
+ case 11:
11259
11243
  query = identifier.split(",").map((function(s) {
11260
11244
  return s.trim();
11261
11245
  })).filter(Boolean).join(",");
@@ -11264,33 +11248,33 @@ function _typeof(o) {
11264
11248
  url.searchParams.set("type", platformType);
11265
11249
  url.searchParams.set("start", String(start));
11266
11250
  url.searchParams.set("end", String(end));
11267
- _context4.prev = 16;
11268
- _context4.next = 19;
11251
+ _context4.prev = 17;
11252
+ _context4.next = 20;
11269
11253
  return fetch(url.toString(), {
11270
11254
  headers: headers
11271
11255
  });
11272
11256
 
11273
- case 19:
11257
+ case 20:
11274
11258
  res = _context4.sent;
11275
11259
  if (res.ok) {
11276
- _context4.next = 22;
11260
+ _context4.next = 23;
11277
11261
  break;
11278
11262
  }
11279
11263
  throw new Error("HTTP ".concat(res.status));
11280
11264
 
11281
- case 22:
11282
- _context4.next = 24;
11265
+ case 23:
11266
+ _context4.next = 25;
11283
11267
  return res.json();
11284
11268
 
11285
- case 24:
11269
+ case 25:
11286
11270
  json = _context4.sent;
11287
11271
  if (Array.isArray(json === null || json === void 0 ? void 0 : json.data)) {
11288
- _context4.next = 27;
11272
+ _context4.next = 28;
11289
11273
  break;
11290
11274
  }
11291
11275
  return _context4.abrupt("return", []);
11292
11276
 
11293
- case 27:
11277
+ case 28:
11294
11278
  return _context4.abrupt("return", json.data.map((function(item) {
11295
11279
  var flat = {};
11296
11280
  for (var _i10 = 0, _Object$entries = Object.entries(item); _i10 < _Object$entries.length; _i10++) {
@@ -11303,33 +11287,25 @@ function _typeof(o) {
11303
11287
  return flat;
11304
11288
  })));
11305
11289
 
11306
- case 30:
11307
- _context4.prev = 30;
11308
- _context4.t0 = _context4["catch"](16);
11290
+ case 31:
11291
+ _context4.prev = 31;
11292
+ _context4.t0 = _context4["catch"](17);
11309
11293
  console.error("FIREFLY fetch error:", _context4.t0);
11310
11294
  return _context4.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11311
11295
 
11312
- case 34:
11296
+ case 35:
11313
11297
  case "end":
11314
11298
  return _context4.stop();
11315
11299
  }
11316
- }), _callee4, null, [ [ 16, 30 ] ]);
11300
+ }), _callee4, null, [ [ 17, 31 ] ]);
11317
11301
  })));
11318
11302
  return _FIREFLY.apply(this, arguments);
11319
11303
  }
11320
- function BLOCKSCOUT() {
11321
- console.log("HUMBLE");
11322
- var args = argsToArray(arguments);
11323
- return JSON.stringify({
11324
- args: args,
11325
- name: "_BLOCKSCOUT"
11326
- });
11327
- }
11328
- function _BLOCKSCOUT(_x6, _x7, _x8, _x9, _x0, _x1, _x10) {
11329
- return _BLOCKSCOUT2.apply(this, arguments);
11304
+ function BLOCKSCOUT(_x9, _x0, _x1, _x10, _x11, _x12, _x13) {
11305
+ return _BLOCKSCOUT.apply(this, arguments);
11330
11306
  }
11331
- function _BLOCKSCOUT2() {
11332
- _BLOCKSCOUT2 = _asyncToGenerator(_regeneratorRuntime().mark((function _callee5(address, type, chain, startTimestamp, endTimestamp, page, offset) {
11307
+ function _BLOCKSCOUT() {
11308
+ _BLOCKSCOUT = _asyncToGenerator(_regeneratorRuntime().mark((function _callee5(address, type, chain, startTimestamp, endTimestamp, page, offset) {
11333
11309
  var currentTimestamp, hostname, requestUrl, _json$result, _json$result2, response, json;
11334
11310
  return _regeneratorRuntime().wrap((function _callee5$(_context5) {
11335
11311
  while (1) switch (_context5.prev = _context5.next) {
@@ -11447,53 +11423,23 @@ function _typeof(o) {
11447
11423
  }
11448
11424
  }), _callee5, null, [ [ 23, 42 ] ]);
11449
11425
  })));
11450
- return _BLOCKSCOUT2.apply(this, arguments);
11426
+ return _BLOCKSCOUT.apply(this, arguments);
11451
11427
  }
11452
- function BASESCAN() {
11453
- return _BASESCAN.apply(this, arguments);
11428
+ function GNOSIS() {
11429
+ return _GNOSIS.apply(this, arguments);
11454
11430
  }
11455
- function _BASESCAN() {
11456
- _BASESCAN = _asyncToGenerator(_regeneratorRuntime().mark((function _callee6() {
11457
- var _argsToArray5, _argsToArray6, type, chain, address, startDate, endDate, page, limit, _args6 = arguments;
11431
+ function _GNOSIS() {
11432
+ _GNOSIS = _asyncToGenerator(_regeneratorRuntime().mark((function _callee6() {
11433
+ var _len2, args, _key2, type, chain, address, startDate, endDate, page, limit, _args6 = arguments;
11458
11434
  return _regeneratorRuntime().wrap((function _callee6$(_context6) {
11459
11435
  while (1) switch (_context6.prev = _context6.next) {
11460
11436
  case 0:
11461
- _argsToArray5 = argsToArray(_args6), _argsToArray6 = _slicedToArray(_argsToArray5, 7),
11462
- type = _argsToArray6[0], chain = _argsToArray6[1], address = _argsToArray6[2], startDate = _argsToArray6[3],
11463
- endDate = _argsToArray6[4], page = _argsToArray6[5], limit = _argsToArray6[6];
11437
+ for (_len2 = _args6.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
11438
+ args[_key2] = _args6[_key2];
11439
+ }
11440
+ type = args[0], chain = args[1], address = args[2], startDate = args[3], endDate = args[4],
11441
+ page = args[5], limit = args[6];
11464
11442
  return _context6.abrupt("return", handleScanRequest({
11465
- scanKey: SERVICE_API_KEY.Basescan,
11466
- baseUrl: "https://api.basescan.org/api",
11467
- type: type,
11468
- chain: chain,
11469
- address: address,
11470
- startDate: startDate,
11471
- endDate: endDate,
11472
- page: page,
11473
- offset: limit
11474
- }));
11475
-
11476
- case 2:
11477
- case "end":
11478
- return _context6.stop();
11479
- }
11480
- }), _callee6);
11481
- })));
11482
- return _BASESCAN.apply(this, arguments);
11483
- }
11484
- function GNOSISSCAN() {
11485
- return _GNOSISSCAN.apply(this, arguments);
11486
- }
11487
- function _GNOSISSCAN() {
11488
- _GNOSISSCAN = _asyncToGenerator(_regeneratorRuntime().mark((function _callee7() {
11489
- var _argsToArray7, _argsToArray8, type, chain, address, startDate, endDate, page, limit, _args7 = arguments;
11490
- return _regeneratorRuntime().wrap((function _callee7$(_context7) {
11491
- while (1) switch (_context7.prev = _context7.next) {
11492
- case 0:
11493
- _argsToArray7 = argsToArray(_args7), _argsToArray8 = _slicedToArray(_argsToArray7, 7),
11494
- type = _argsToArray8[0], chain = _argsToArray8[1], address = _argsToArray8[2], startDate = _argsToArray8[3],
11495
- endDate = _argsToArray8[4], page = _argsToArray8[5], limit = _argsToArray8[6];
11496
- return _context7.abrupt("return", handleScanRequest({
11497
11443
  scanKey: SERVICE_API_KEY.Gnosisscan,
11498
11444
  baseUrl: "https://api.gnosisscan.io/api",
11499
11445
  type: type,
@@ -11505,42 +11451,39 @@ function _typeof(o) {
11505
11451
  offset: limit
11506
11452
  }));
11507
11453
 
11508
- case 2:
11454
+ case 3:
11509
11455
  case "end":
11510
- return _context7.stop();
11456
+ return _context6.stop();
11511
11457
  }
11512
- }), _callee7);
11458
+ }), _callee6);
11513
11459
  })));
11514
- return _GNOSISSCAN.apply(this, arguments);
11460
+ return _GNOSIS.apply(this, arguments);
11515
11461
  }
11516
- function NEYNAR() {
11462
+ function NEYNAR(_x14, _x15, _x16, _x17, _x18) {
11517
11463
  return _NEYNAR.apply(this, arguments);
11518
11464
  }
11519
11465
  function _NEYNAR() {
11520
- _NEYNAR = _asyncToGenerator(_regeneratorRuntime().mark((function _callee8() {
11521
- var API_KEY, _argsToArray9, _argsToArray0, fid, viewerFid, sortType, limit, cursor, url, _json$users, response, json, _args8 = arguments;
11522
- return _regeneratorRuntime().wrap((function _callee8$(_context8) {
11523
- while (1) switch (_context8.prev = _context8.next) {
11466
+ _NEYNAR = _asyncToGenerator(_regeneratorRuntime().mark((function _callee7(fid, viewerFid, sortType, limit, cursor) {
11467
+ var API_KEY, url, _json$users, response, json;
11468
+ return _regeneratorRuntime().wrap((function _callee7$(_context7) {
11469
+ while (1) switch (_context7.prev = _context7.next) {
11524
11470
  case 0:
11525
11471
  API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Neynar);
11526
11472
  if (API_KEY) {
11527
- _context8.next = 3;
11473
+ _context7.next = 3;
11528
11474
  break;
11529
11475
  }
11530
- return _context8.abrupt("return", "".concat(SERVICE_API_KEY.Neynar).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11476
+ return _context7.abrupt("return", "".concat(SERVICE_API_KEY.Neynar).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11531
11477
 
11532
11478
  case 3:
11533
- _argsToArray9 = argsToArray(_args8), _argsToArray0 = _slicedToArray(_argsToArray9, 5),
11534
- fid = _argsToArray0[0], viewerFid = _argsToArray0[1], sortType = _argsToArray0[2],
11535
- limit = _argsToArray0[3], cursor = _argsToArray0[4];
11536
11479
  url = new URL("https://api.neynar.com/v2/farcaster/followers");
11537
11480
  url.searchParams.set("fid", fid.toString());
11538
11481
  url.searchParams.set("sort_type", sortType);
11539
11482
  url.searchParams.set("limit", limit.toString());
11540
11483
  if (viewerFid !== null) url.searchParams.set("viewer_fid", viewerFid.toString());
11541
11484
  if (cursor) url.searchParams.set("cursor", cursor);
11542
- _context8.prev = 10;
11543
- _context8.next = 13;
11485
+ _context7.prev = 9;
11486
+ _context7.next = 12;
11544
11487
  return fetch(url.toString(), {
11545
11488
  headers: {
11546
11489
  "x-api-key": API_KEY,
@@ -11548,30 +11491,30 @@ function _typeof(o) {
11548
11491
  }
11549
11492
  });
11550
11493
 
11551
- case 13:
11552
- response = _context8.sent;
11494
+ case 12:
11495
+ response = _context7.sent;
11553
11496
  if (response.ok) {
11554
- _context8.next = 16;
11497
+ _context7.next = 15;
11555
11498
  break;
11556
11499
  }
11557
11500
  throw new Error("HTTP ".concat(response.status));
11558
11501
 
11559
- case 16:
11560
- _context8.next = 18;
11502
+ case 15:
11503
+ _context7.next = 17;
11561
11504
  return response.json();
11562
11505
 
11563
- case 18:
11564
- json = _context8.sent;
11506
+ case 17:
11507
+ json = _context7.sent;
11565
11508
  if (json !== null && json !== void 0 && (_json$users = json.users) !== null && _json$users !== void 0 && _json$users.length) {
11566
- _context8.next = 21;
11509
+ _context7.next = 20;
11567
11510
  break;
11568
11511
  }
11569
- return _context8.abrupt("return", []);
11512
+ return _context7.abrupt("return", []);
11570
11513
 
11571
- case 21:
11572
- return _context8.abrupt("return", json.users.map((function(_ref3) {
11514
+ case 20:
11515
+ return _context7.abrupt("return", json.users.map((function(_ref4) {
11573
11516
  var _user$profile, _user$profile2;
11574
- var user = _ref3.user;
11517
+ var user = _ref4.user;
11575
11518
  return {
11576
11519
  username: user.username,
11577
11520
  custody_address: user.custody_address,
@@ -11581,49 +11524,48 @@ function _typeof(o) {
11581
11524
  };
11582
11525
  })));
11583
11526
 
11584
- case 24:
11585
- _context8.prev = 24;
11586
- _context8.t0 = _context8["catch"](10);
11587
- console.error("NEYNAR_FETCH_FOLLOWERS error:", _context8.t0);
11588
- return _context8.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11527
+ case 23:
11528
+ _context7.prev = 23;
11529
+ _context7.t0 = _context7["catch"](9);
11530
+ console.error("NEYNAR_FETCH_FOLLOWERS error:", _context7.t0);
11531
+ return _context7.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11589
11532
 
11590
- case 28:
11533
+ case 27:
11591
11534
  case "end":
11592
- return _context8.stop();
11535
+ return _context7.stop();
11593
11536
  }
11594
- }), _callee8, null, [ [ 10, 24 ] ]);
11537
+ }), _callee7, null, [ [ 9, 23 ] ]);
11595
11538
  })));
11596
11539
  return _NEYNAR.apply(this, arguments);
11597
11540
  }
11598
- function GNOSISPAY() {
11541
+ function GNOSISPAY(_x19) {
11599
11542
  return _GNOSISPAY.apply(this, arguments);
11600
11543
  }
11601
11544
  function _GNOSISPAY() {
11602
- _GNOSISPAY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee9() {
11603
- var apiKeyKey, API_KEY, _argsToArray1, _argsToArray10, cardId, startDate, endDate, _argsToArray10$, limit, _argsToArray10$2, offset, url, res, json, _args9 = arguments;
11604
- return _regeneratorRuntime().wrap((function _callee9$(_context9) {
11605
- while (1) switch (_context9.prev = _context9.next) {
11545
+ _GNOSISPAY = _asyncToGenerator(_regeneratorRuntime().mark((function _callee8(_ref3) {
11546
+ var cardId, startDate, endDate, _ref3$limit, limit, _ref3$offset, offset, apiKeyKey, API_KEY, url, res, json;
11547
+ return _regeneratorRuntime().wrap((function _callee8$(_context8) {
11548
+ while (1) switch (_context8.prev = _context8.next) {
11606
11549
  case 0:
11550
+ cardId = _ref3.cardId, startDate = _ref3.startDate, endDate = _ref3.endDate, _ref3$limit = _ref3.limit,
11551
+ limit = _ref3$limit === void 0 ? 20 : _ref3$limit, _ref3$offset = _ref3.offset,
11552
+ offset = _ref3$offset === void 0 ? 0 : _ref3$offset;
11607
11553
  apiKeyKey = SERVICE_API_KEY.GnosisPay;
11608
11554
  API_KEY = window.localStorage.getItem(apiKeyKey);
11609
11555
  if (API_KEY) {
11610
- _context9.next = 4;
11556
+ _context8.next = 5;
11611
11557
  break;
11612
11558
  }
11613
- return _context9.abrupt("return", "".concat(apiKeyKey).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11559
+ return _context8.abrupt("return", "".concat(apiKeyKey).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11614
11560
 
11615
- case 4:
11561
+ case 5:
11616
11562
  if (cardId) {
11617
- _context9.next = 6;
11563
+ _context8.next = 7;
11618
11564
  break;
11619
11565
  }
11620
- return _context9.abrupt("return", "".concat(apiKeyKey).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11566
+ return _context8.abrupt("return", "".concat(apiKeyKey).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11621
11567
 
11622
- case 6:
11623
- _argsToArray1 = argsToArray(_args9), _argsToArray10 = _slicedToArray(_argsToArray1, 5),
11624
- cardId = _argsToArray10[0], startDate = _argsToArray10[1], endDate = _argsToArray10[2],
11625
- _argsToArray10$ = _argsToArray10[3], limit = _argsToArray10$ === void 0 ? 20 : _argsToArray10$,
11626
- _argsToArray10$2 = _argsToArray10[4], offset = _argsToArray10$2 === void 0 ? 0 : _argsToArray10$2;
11568
+ case 7:
11627
11569
  url = new URL("https://api.gnosispay.com/cards/".concat(cardId, "/transactions"));
11628
11570
  url.searchParams.set("limit", limit.toString());
11629
11571
  url.searchParams.set("offset", offset.toString());
@@ -11633,8 +11575,8 @@ function _typeof(o) {
11633
11575
  if (!isNaN(toTimestamp(endDate))) {
11634
11576
  url.searchParams.set("endDate", new Date(endDate * 1e3).toISOString());
11635
11577
  }
11636
- _context9.prev = 12;
11637
- _context9.next = 15;
11578
+ _context8.prev = 12;
11579
+ _context8.next = 15;
11638
11580
  return fetch(url.toString(), {
11639
11581
  headers: {
11640
11582
  Authorization: "Bearer ".concat(API_KEY),
@@ -11643,27 +11585,27 @@ function _typeof(o) {
11643
11585
  });
11644
11586
 
11645
11587
  case 15:
11646
- res = _context9.sent;
11588
+ res = _context8.sent;
11647
11589
  if (res.ok) {
11648
- _context9.next = 18;
11590
+ _context8.next = 18;
11649
11591
  break;
11650
11592
  }
11651
11593
  throw new Error("HTTP error! Status: ".concat(res.status));
11652
11594
 
11653
11595
  case 18:
11654
- _context9.next = 20;
11596
+ _context8.next = 20;
11655
11597
  return res.json();
11656
11598
 
11657
11599
  case 20:
11658
- json = _context9.sent;
11600
+ json = _context8.sent;
11659
11601
  if (Array.isArray(json)) {
11660
- _context9.next = 23;
11602
+ _context8.next = 23;
11661
11603
  break;
11662
11604
  }
11663
- return _context9.abrupt("return", []);
11605
+ return _context8.abrupt("return", []);
11664
11606
 
11665
11607
  case 23:
11666
- return _context9.abrupt("return", json.map((function(tx) {
11608
+ return _context8.abrupt("return", json.map((function(tx) {
11667
11609
  return {
11668
11610
  createdAt: tx.createdAt,
11669
11611
  clearedAt: tx.clearedAt,
@@ -11681,16 +11623,16 @@ function _typeof(o) {
11681
11623
  })));
11682
11624
 
11683
11625
  case 26:
11684
- _context9.prev = 26;
11685
- _context9.t0 = _context9["catch"](12);
11686
- console.error("GNOSISPAY_CARD_TXNS error:", _context9.t0);
11687
- return _context9.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11626
+ _context8.prev = 26;
11627
+ _context8.t0 = _context8["catch"](12);
11628
+ console.error("GNOSISPAY_CARD_TXNS error:", _context8.t0);
11629
+ return _context8.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11688
11630
 
11689
11631
  case 30:
11690
11632
  case "end":
11691
- return _context9.stop();
11633
+ return _context8.stop();
11692
11634
  }
11693
- }), _callee9, null, [ [ 12, 26 ] ]);
11635
+ }), _callee8, null, [ [ 12, 26 ] ]);
11694
11636
  })));
11695
11637
  return _GNOSISPAY.apply(this, arguments);
11696
11638
  }
@@ -11698,16 +11640,17 @@ function _typeof(o) {
11698
11640
  return _ETHERSCAN.apply(this, arguments);
11699
11641
  }
11700
11642
  function _ETHERSCAN() {
11701
- _ETHERSCAN = _asyncToGenerator(_regeneratorRuntime().mark((function _callee0() {
11702
- var _argsToArray11, _argsToArray12, type, chain, address, startDate, endDate, page, limit, _args0 = arguments;
11703
- return _regeneratorRuntime().wrap((function _callee0$(_context0) {
11704
- while (1) switch (_context0.prev = _context0.next) {
11643
+ _ETHERSCAN = _asyncToGenerator(_regeneratorRuntime().mark((function _callee9() {
11644
+ var _len3, args, _key3, type, chain, address, startDate, endDate, page, limit, _args9 = arguments;
11645
+ return _regeneratorRuntime().wrap((function _callee9$(_context9) {
11646
+ while (1) switch (_context9.prev = _context9.next) {
11705
11647
  case 0:
11706
- _argsToArray11 = argsToArray(_args0), _argsToArray12 = _slicedToArray(_argsToArray11, 7),
11707
- type = _argsToArray12[0], chain = _argsToArray12[1], address = _argsToArray12[2],
11708
- startDate = _argsToArray12[3], endDate = _argsToArray12[4], page = _argsToArray12[5],
11709
- limit = _argsToArray12[6];
11710
- return _context0.abrupt("return", handleScanRequest({
11648
+ for (_len3 = _args9.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
11649
+ args[_key3] = _args9[_key3];
11650
+ }
11651
+ type = args[0], chain = args[1], address = args[2], startDate = args[3], endDate = args[4],
11652
+ page = args[5], limit = args[6];
11653
+ return _context9.abrupt("return", handleScanRequest({
11711
11654
  scanKey: SERVICE_API_KEY.Etherscan,
11712
11655
  baseUrl: "https://api.etherscan.io/v2/api",
11713
11656
  type: type,
@@ -11719,59 +11662,57 @@ function _typeof(o) {
11719
11662
  offset: limit
11720
11663
  }));
11721
11664
 
11722
- case 2:
11665
+ case 3:
11723
11666
  case "end":
11724
- return _context0.stop();
11667
+ return _context9.stop();
11725
11668
  }
11726
- }), _callee0);
11669
+ }), _callee9);
11727
11670
  })));
11728
11671
  return _ETHERSCAN.apply(this, arguments);
11729
11672
  }
11730
- function COINGECKO() {
11673
+ function COINGECKO(_x20, _x21, _x22) {
11731
11674
  return _COINGECKO.apply(this, arguments);
11732
11675
  }
11733
11676
  function _COINGECKO() {
11734
- _COINGECKO = _asyncToGenerator(_regeneratorRuntime().mark((function _callee1() {
11735
- var API_KEY, headers, url, _argsToArray13, _argsToArray14, category, param1, param2, _argsToArray14$, page, _argsToArray14$2, perPage, lowerCategory, token, vsCurrencies, ecosystemMap, key, categoryVal, trend, _category, _trend, exchange, response, json, _json$status, message, output, _i11, _Object$entries2, _Object$entries2$_i, _token, prices, _i12, _Object$entries3, _Object$entries3$_i, currency, _value6, _key2, flatArray, _args1 = arguments;
11736
- return _regeneratorRuntime().wrap((function _callee1$(_context1) {
11737
- while (1) switch (_context1.prev = _context1.next) {
11677
+ _COINGECKO = _asyncToGenerator(_regeneratorRuntime().mark((function _callee0(category, param1, param2) {
11678
+ var page, perPage, API_KEY, headers, url, lowerCategory, token, vsCurrencies, ecosystemMap, key, categoryVal, trend, _category, _trend, exchange, response, json, _json$status, message, output, _i11, _Object$entries2, _Object$entries2$_i, _token, prices, _i12, _Object$entries3, _Object$entries3$_i, currency, _value6, _key4, flatArray, _args0 = arguments;
11679
+ return _regeneratorRuntime().wrap((function _callee0$(_context0) {
11680
+ while (1) switch (_context0.prev = _context0.next) {
11738
11681
  case 0:
11682
+ page = _args0.length > 3 && _args0[3] !== undefined ? _args0[3] : 1;
11683
+ perPage = _args0.length > 4 && _args0[4] !== undefined ? _args0[4] : 2;
11739
11684
  API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Coingecko);
11740
11685
  if (API_KEY) {
11741
- _context1.next = 3;
11686
+ _context0.next = 5;
11742
11687
  break;
11743
11688
  }
11744
- return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11689
+ return _context0.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11745
11690
 
11746
- case 3:
11691
+ case 5:
11747
11692
  headers = {
11748
11693
  accept: "application/json",
11749
11694
  "x-cg-demo-api-key": API_KEY
11750
11695
  };
11751
11696
  url = "";
11752
- _argsToArray13 = argsToArray(_args1), _argsToArray14 = _slicedToArray(_argsToArray13, 5),
11753
- category = _argsToArray14[0], param1 = _argsToArray14[1], param2 = _argsToArray14[2],
11754
- _argsToArray14$ = _argsToArray14[3], page = _argsToArray14$ === void 0 ? 1 : _argsToArray14$,
11755
- _argsToArray14$2 = _argsToArray14[4], perPage = _argsToArray14$2 === void 0 ? 2 : _argsToArray14$2;
11756
11697
  lowerCategory = (category || "").toLowerCase();
11757
- _context1.t0 = lowerCategory;
11758
- _context1.next = _context1.t0 === "price" ? 10 : _context1.t0 === "market" ? 16 : _context1.t0 === "stablecoins" ? 26 : _context1.t0 === "derivatives" ? 30 : 33;
11698
+ _context0.t0 = lowerCategory;
11699
+ _context0.next = _context0.t0 === "price" ? 11 : _context0.t0 === "market" ? 17 : _context0.t0 === "stablecoins" ? 27 : _context0.t0 === "derivatives" ? 31 : 34;
11759
11700
  break;
11760
11701
 
11761
- case 10:
11702
+ case 11:
11762
11703
  token = param1;
11763
11704
  vsCurrencies = param2;
11764
11705
  if (!(!token || !vsCurrencies)) {
11765
- _context1.next = 14;
11706
+ _context0.next = 15;
11766
11707
  break;
11767
11708
  }
11768
- return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11709
+ return _context0.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11769
11710
 
11770
- case 14:
11711
+ case 15:
11771
11712
  url = "https://api.coingecko.com/api/v3/simple/price?vs_currencies=".concat(vsCurrencies, "&ids=").concat(token);
11772
- return _context1.abrupt("break", 34);
11713
+ return _context0.abrupt("break", 35);
11773
11714
 
11774
- case 16:
11715
+ case 17:
11775
11716
  ecosystemMap = {
11776
11717
  eth: "ethereum-ecosystem",
11777
11718
  base: "base-ecosystem",
@@ -11788,70 +11729,70 @@ function _typeof(o) {
11788
11729
  trend = param2 ? "&price_change_percentage=".concat(param2) : "";
11789
11730
  url = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&include_tokens=top&page=".concat(page, "&per_page=").concat(perPage);
11790
11731
  if (!(key && !categoryVal)) {
11791
- _context1.next = 23;
11732
+ _context0.next = 24;
11792
11733
  break;
11793
11734
  }
11794
- return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11735
+ return _context0.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11795
11736
 
11796
- case 23:
11737
+ case 24:
11797
11738
  if (categoryVal) url += "&category=".concat(categoryVal);
11798
11739
  if (trend) url += trend;
11799
- return _context1.abrupt("break", 34);
11740
+ return _context0.abrupt("break", 35);
11800
11741
 
11801
- case 26:
11742
+ case 27:
11802
11743
  _category = !param1 || param1.toLowerCase() === "all" ? "stablecoins" : param1.toLowerCase();
11803
11744
  _trend = param2 ? "&price_change_percentage=".concat(param2) : "";
11804
11745
  url = "https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&category=".concat(_category, "&order=market_cap_desc&page=").concat(page, "&per_page=").concat(perPage).concat(_trend);
11805
- return _context1.abrupt("break", 34);
11746
+ return _context0.abrupt("break", 35);
11806
11747
 
11807
- case 30:
11748
+ case 31:
11808
11749
  exchange = param1;
11809
11750
  if (exchange) {
11810
11751
  url = "https://api.coingecko.com/api/v3/derivatives/exchanges/".concat(exchange, "?include_tickers=all");
11811
11752
  } else {
11812
11753
  url = "https://api.coingecko.com/api/v3/derivatives?page=".concat(page, "&per_page=").concat(perPage);
11813
11754
  }
11814
- return _context1.abrupt("break", 34);
11815
-
11816
- case 33:
11817
- return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_PARAMS));
11755
+ return _context0.abrupt("break", 35);
11818
11756
 
11819
11757
  case 34:
11820
- _context1.prev = 34;
11821
- _context1.next = 37;
11758
+ return _context0.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_PARAMS));
11759
+
11760
+ case 35:
11761
+ _context0.prev = 35;
11762
+ _context0.next = 38;
11822
11763
  return fetch(url, {
11823
11764
  method: "GET",
11824
11765
  headers: headers
11825
11766
  });
11826
11767
 
11827
- case 37:
11828
- response = _context1.sent;
11829
- _context1.next = 40;
11768
+ case 38:
11769
+ response = _context0.sent;
11770
+ _context0.next = 41;
11830
11771
  return response.json();
11831
11772
 
11832
- case 40:
11833
- json = _context1.sent;
11773
+ case 41:
11774
+ json = _context0.sent;
11834
11775
  if (response.ok) {
11835
- _context1.next = 47;
11776
+ _context0.next = 48;
11836
11777
  break;
11837
11778
  }
11838
11779
  message = (json === null || json === void 0 || (_json$status = json.status) === null || _json$status === void 0 ? void 0 : _json$status.error_message) || "";
11839
11780
  if (!message.includes("API Key Missing")) {
11840
- _context1.next = 45;
11781
+ _context0.next = 46;
11841
11782
  break;
11842
11783
  }
11843
- return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_API_KEY));
11784
+ return _context0.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.INVALID_API_KEY));
11844
11785
 
11845
- case 45:
11786
+ case 46:
11846
11787
  if (!(response.status === 429)) {
11847
- _context1.next = 47;
11788
+ _context0.next = 48;
11848
11789
  break;
11849
11790
  }
11850
- return _context1.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.RATE_LIMIT));
11791
+ return _context0.abrupt("return", "".concat(SERVICE_API_KEY.Coingecko).concat(ERROR_MESSAGES_FLAG.RATE_LIMIT));
11851
11792
 
11852
- case 47:
11793
+ case 48:
11853
11794
  if (!(lowerCategory === "price")) {
11854
- _context1.next = 51;
11795
+ _context0.next = 52;
11855
11796
  break;
11856
11797
  }
11857
11798
  output = {};
@@ -11861,240 +11802,225 @@ function _typeof(o) {
11861
11802
  for (_i12 = 0, _Object$entries3 = Object.entries(prices); _i12 < _Object$entries3.length; _i12++) {
11862
11803
  _Object$entries3$_i = _slicedToArray(_Object$entries3[_i12], 2), currency = _Object$entries3$_i[0],
11863
11804
  _value6 = _Object$entries3$_i[1];
11864
- _key2 = "".concat(_token.charAt(0).toUpperCase() + _token.slice(1), "_").concat(currency.toUpperCase());
11865
- output[_key2] = _value6;
11805
+ _key4 = "".concat(_token.charAt(0).toUpperCase() + _token.slice(1), "_").concat(currency.toUpperCase());
11806
+ output[_key4] = _value6;
11866
11807
  }
11867
11808
  }
11868
- return _context1.abrupt("return", [ output ]);
11809
+ return _context0.abrupt("return", [ output ]);
11869
11810
 
11870
- case 51:
11811
+ case 52:
11871
11812
  flatArray = Array.isArray(json) ? json : [ json ];
11872
- return _context1.abrupt("return", flatArray.map((function(item) {
11813
+ return _context0.abrupt("return", flatArray.map((function(item) {
11873
11814
  var flat = {};
11874
11815
  for (var _i13 = 0, _Object$entries4 = Object.entries(item); _i13 < _Object$entries4.length; _i13++) {
11875
- var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i13], 2), _key3 = _Object$entries4$_i[0], _value7 = _Object$entries4$_i[1];
11816
+ var _Object$entries4$_i = _slicedToArray(_Object$entries4[_i13], 2), _key5 = _Object$entries4$_i[0], _value7 = _Object$entries4$_i[1];
11876
11817
  if (_typeof(_value7) !== "object" || _value7 === null) {
11877
- flat[_key3] = _value7;
11818
+ flat[_key5] = _value7;
11878
11819
  }
11879
11820
  }
11880
11821
  return flat;
11881
11822
  })));
11882
11823
 
11883
- case 55:
11884
- _context1.prev = 55;
11885
- _context1.t1 = _context1["catch"](34);
11886
- console.error(_context1.t1);
11887
- return _context1.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11824
+ case 56:
11825
+ _context0.prev = 56;
11826
+ _context0.t1 = _context0["catch"](35);
11827
+ console.error(_context0.t1);
11828
+ return _context0.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11888
11829
 
11889
- case 59:
11830
+ case 60:
11890
11831
  case "end":
11891
- return _context1.stop();
11832
+ return _context0.stop();
11892
11833
  }
11893
- }), _callee1, null, [ [ 34, 55 ] ]);
11834
+ }), _callee0, null, [ [ 35, 56 ] ]);
11894
11835
  })));
11895
11836
  return _COINGECKO.apply(this, arguments);
11896
11837
  }
11897
- function EOA() {
11838
+ function EOA(_x23, _x24, _x25, _x26, _x27) {
11898
11839
  return _EOA.apply(this, arguments);
11899
11840
  }
11900
11841
  function _EOA() {
11901
- _EOA = _asyncToGenerator(_regeneratorRuntime().mark((function _callee11() {
11902
- var _argsToArray15, _argsToArray16, addresses, category, chains, startTime, endTime, _argsToArray16$, page, _argsToArray16$2, offset, someError, API_KEY, INPUTS, CHAINS, out, ADDRESS_MAP, _iterator, _step, input, resolved, ADDRS, _iterator2, _step2, _loop, _ret, fetchJSON, _fetchJSON, _args13 = arguments;
11903
- return _regeneratorRuntime().wrap((function _callee11$(_context13) {
11904
- while (1) switch (_context13.prev = _context13.next) {
11842
+ _EOA = _asyncToGenerator(_regeneratorRuntime().mark((function _callee10(addresses, category, chains, startTime, endTime) {
11843
+ var page, offset, API_KEY, INPUTS, CHAINS, out, ADDRESS_MAP, _iterator, _step, input, resolved, ADDRS, _iterator2, _step2, _loop, _ret, fetchJSON, _fetchJSON, _args12 = arguments;
11844
+ return _regeneratorRuntime().wrap((function _callee10$(_context12) {
11845
+ while (1) switch (_context12.prev = _context12.next) {
11905
11846
  case 0:
11906
11847
  _fetchJSON = function _fetchJSON3() {
11907
- _fetchJSON = _asyncToGenerator(_regeneratorRuntime().mark((function _callee10(url) {
11848
+ _fetchJSON = _asyncToGenerator(_regeneratorRuntime().mark((function _callee1(url) {
11908
11849
  var _json$result3, _json$result3$include, _json$result4, _json$result4$include, res, json;
11909
- return _regeneratorRuntime().wrap((function _callee10$(_context12) {
11910
- while (1) switch (_context12.prev = _context12.next) {
11850
+ return _regeneratorRuntime().wrap((function _callee1$(_context11) {
11851
+ while (1) switch (_context11.prev = _context11.next) {
11911
11852
  case 0:
11912
- _context12.prev = 0;
11913
- _context12.next = 3;
11853
+ _context11.prev = 0;
11854
+ _context11.next = 3;
11914
11855
  return fetch(url);
11915
11856
 
11916
11857
  case 3:
11917
- res = _context12.sent;
11858
+ res = _context11.sent;
11918
11859
  if (res.ok) {
11919
- _context12.next = 6;
11860
+ _context11.next = 6;
11920
11861
  break;
11921
11862
  }
11922
- return _context12.abrupt("return", "HTTP_".concat(res.status));
11863
+ return _context11.abrupt("return", "HTTP_".concat(res.status));
11923
11864
 
11924
11865
  case 6:
11925
- _context12.next = 8;
11866
+ _context11.next = 8;
11926
11867
  return res.json();
11927
11868
 
11928
11869
  case 8:
11929
- json = _context12.sent;
11870
+ json = _context11.sent;
11930
11871
  if (!((_json$result3 = json.result) !== null && _json$result3 !== void 0 && (_json$result3$include = _json$result3.includes) !== null && _json$result3$include !== void 0 && _json$result3$include.call(_json$result3, "Invalid API Key"))) {
11931
- _context12.next = 11;
11872
+ _context11.next = 11;
11932
11873
  break;
11933
11874
  }
11934
- return _context12.abrupt("return", "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.INVALID_API_KEY));
11875
+ return _context11.abrupt("return", "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.INVALID_API_KEY));
11935
11876
 
11936
11877
  case 11:
11937
11878
  if (!((_json$result4 = json.result) !== null && _json$result4 !== void 0 && (_json$result4$include = _json$result4.includes) !== null && _json$result4$include !== void 0 && _json$result4$include.call(_json$result4, "Max rate limit reached"))) {
11938
- _context12.next = 13;
11879
+ _context11.next = 13;
11939
11880
  break;
11940
11881
  }
11941
- return _context12.abrupt("return", "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.RATE_LIMIT));
11882
+ return _context11.abrupt("return", "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.RATE_LIMIT));
11942
11883
 
11943
11884
  case 13:
11944
11885
  if (!(json.status === "0" && json.message !== "No transactions found")) {
11945
- _context12.next = 15;
11886
+ _context11.next = 15;
11946
11887
  break;
11947
11888
  }
11948
- return _context12.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11889
+ return _context11.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11949
11890
 
11950
11891
  case 15:
11951
- return _context12.abrupt("return", json.result);
11892
+ return _context11.abrupt("return", json.result);
11952
11893
 
11953
11894
  case 18:
11954
- _context12.prev = 18;
11955
- _context12.t0 = _context12["catch"](0);
11956
- return _context12.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11895
+ _context11.prev = 18;
11896
+ _context11.t0 = _context11["catch"](0);
11897
+ return _context11.abrupt("return", ERROR_MESSAGES_FLAG.DEFAULT);
11957
11898
 
11958
11899
  case 21:
11959
11900
  case "end":
11960
- return _context12.stop();
11901
+ return _context11.stop();
11961
11902
  }
11962
- }), _callee10, null, [ [ 0, 18 ] ]);
11903
+ }), _callee1, null, [ [ 0, 18 ] ]);
11963
11904
  })));
11964
11905
  return _fetchJSON.apply(this, arguments);
11965
11906
  };
11966
- fetchJSON = function _fetchJSON2(_x13) {
11907
+ fetchJSON = function _fetchJSON2(_x35) {
11967
11908
  return _fetchJSON.apply(this, arguments);
11968
11909
  };
11969
- _argsToArray15 = argsToArray(_args13), _argsToArray16 = _slicedToArray(_argsToArray15, 7),
11970
- addresses = _argsToArray16[0], category = _argsToArray16[1], chains = _argsToArray16[2],
11971
- startTime = _argsToArray16[3], endTime = _argsToArray16[4], _argsToArray16$ = _argsToArray16[5],
11972
- page = _argsToArray16$ === void 0 ? 1 : _argsToArray16$, _argsToArray16$2 = _argsToArray16[6],
11973
- offset = _argsToArray16$2 === void 0 ? 10 : _argsToArray16$2;
11974
- someError = anyError(addresses, category, chains, startTime, endTime, page, offset);
11975
- if (!someError) {
11976
- _context13.next = 6;
11977
- break;
11978
- }
11979
- return _context13.abrupt("return", someError);
11980
-
11981
- case 6:
11910
+ page = _args12.length > 5 && _args12[5] !== undefined ? _args12[5] : 1;
11911
+ offset = _args12.length > 6 && _args12[6] !== undefined ? _args12[6] : 10;
11982
11912
  API_KEY = window.localStorage.getItem(SERVICE_API_KEY.Etherscan);
11983
11913
  if (API_KEY) {
11984
- _context13.next = 9;
11914
+ _context12.next = 7;
11985
11915
  break;
11986
11916
  }
11987
- return _context13.abrupt("return", "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11917
+ return _context12.abrupt("return", "".concat(SERVICE_API_KEY.Etherscan).concat(ERROR_MESSAGES_FLAG.MISSING_KEY));
11988
11918
 
11989
- case 9:
11990
- if (typeof addresses === "string") {
11991
- INPUTS = addresses.split(",").map((function(a) {
11992
- return a.trim();
11993
- })).filter(Boolean);
11994
- } else if (_typeof(addresses) === "object") {
11995
- INPUTS = addresses;
11996
- }
11919
+ case 7:
11920
+ INPUTS = addresses.split(",").map((function(a) {
11921
+ return a.trim();
11922
+ })).filter(Boolean);
11997
11923
  CHAINS = chains.split(",").map((function(c) {
11998
11924
  return c.trim();
11999
11925
  })).filter(Boolean);
12000
11926
  out = [];
12001
11927
  ADDRESS_MAP = {};
12002
11928
  _iterator = _createForOfIteratorHelper(INPUTS);
12003
- _context13.prev = 14;
11929
+ _context12.prev = 12;
12004
11930
  _iterator.s();
12005
11931
 
12006
- case 16:
11932
+ case 14:
12007
11933
  if ((_step = _iterator.n()).done) {
12008
- _context13.next = 34;
11934
+ _context12.next = 32;
12009
11935
  break;
12010
11936
  }
12011
11937
  input = _step.value;
12012
11938
  if (!isAddress(input)) {
12013
- _context13.next = 22;
11939
+ _context12.next = 20;
12014
11940
  break;
12015
11941
  }
12016
11942
  ADDRESS_MAP[input.toLowerCase()] = null;
12017
- _context13.next = 32;
11943
+ _context12.next = 30;
12018
11944
  break;
12019
11945
 
12020
- case 22:
12021
- _context13.prev = 22;
12022
- _context13.next = 25;
11946
+ case 20:
11947
+ _context12.prev = 20;
11948
+ _context12.next = 23;
12023
11949
  return fromEnsNameToAddress(input);
12024
11950
 
12025
- case 25:
12026
- resolved = _context13.sent;
11951
+ case 23:
11952
+ resolved = _context12.sent;
12027
11953
  if (resolved) ADDRESS_MAP[resolved.toLowerCase()] = input;
12028
- _context13.next = 32;
11954
+ _context12.next = 30;
12029
11955
  break;
12030
11956
 
12031
- case 29:
12032
- _context13.prev = 29;
12033
- _context13.t0 = _context13["catch"](22);
12034
- return _context13.abrupt("return", "".concat(input).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
11957
+ case 27:
11958
+ _context12.prev = 27;
11959
+ _context12.t0 = _context12["catch"](20);
11960
+ return _context12.abrupt("return", "".concat(input).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
12035
11961
 
12036
- case 32:
12037
- _context13.next = 16;
11962
+ case 30:
11963
+ _context12.next = 14;
12038
11964
  break;
12039
11965
 
12040
- case 34:
12041
- _context13.next = 39;
11966
+ case 32:
11967
+ _context12.next = 37;
12042
11968
  break;
12043
11969
 
12044
- case 36:
12045
- _context13.prev = 36;
12046
- _context13.t1 = _context13["catch"](14);
12047
- _iterator.e(_context13.t1);
11970
+ case 34:
11971
+ _context12.prev = 34;
11972
+ _context12.t1 = _context12["catch"](12);
11973
+ _iterator.e(_context12.t1);
12048
11974
 
12049
- case 39:
12050
- _context13.prev = 39;
11975
+ case 37:
11976
+ _context12.prev = 37;
12051
11977
  _iterator.f();
12052
- return _context13.finish(39);
11978
+ return _context12.finish(37);
12053
11979
 
12054
- case 42:
11980
+ case 40:
12055
11981
  ADDRS = Object.keys(ADDRESS_MAP);
12056
11982
  _iterator2 = _createForOfIteratorHelper(CHAINS);
12057
- _context13.prev = 44;
11983
+ _context12.prev = 42;
12058
11984
  _loop = _regeneratorRuntime().mark((function _loop() {
12059
11985
  var chain, chainId, i, slice, action, url, _data, startBlock, endBlock, _loop2, _ret2, _i14, _ADDRS;
12060
- return _regeneratorRuntime().wrap((function _loop$(_context11) {
12061
- while (1) switch (_context11.prev = _context11.next) {
11986
+ return _regeneratorRuntime().wrap((function _loop$(_context10) {
11987
+ while (1) switch (_context10.prev = _context10.next) {
12062
11988
  case 0:
12063
11989
  chain = _step2.value;
12064
11990
  chainId = CHAIN_ID_MAP[chain];
12065
11991
  if (chainId) {
12066
- _context11.next = 4;
11992
+ _context10.next = 4;
12067
11993
  break;
12068
11994
  }
12069
- return _context11.abrupt("return", {
11995
+ return _context10.abrupt("return", {
12070
11996
  v: ERROR_MESSAGES_FLAG.UNSUPPORTED_CHAIN
12071
11997
  });
12072
11998
 
12073
11999
  case 4:
12074
12000
  if (!(category === "balance")) {
12075
- _context11.next = 20;
12001
+ _context10.next = 20;
12076
12002
  break;
12077
12003
  }
12078
12004
  i = 0;
12079
12005
 
12080
12006
  case 6:
12081
12007
  if (!(i < ADDRS.length)) {
12082
- _context11.next = 19;
12008
+ _context10.next = 19;
12083
12009
  break;
12084
12010
  }
12085
12011
  slice = ADDRS.slice(i, i + 20).join(",");
12086
12012
  action = ADDRS.length > 1 ? "balancemulti" : "balance";
12087
12013
  url = "https://api.etherscan.io/v2/api?chainid=".concat(chainId) + "&module=account&action=".concat(action, "&address=").concat(slice) + "&tag=latest&apikey=".concat(API_KEY);
12088
- _context11.next = 12;
12014
+ _context10.next = 12;
12089
12015
  return fetchJSON(url);
12090
12016
 
12091
12017
  case 12:
12092
- _data = _context11.sent;
12018
+ _data = _context10.sent;
12093
12019
  if (!(typeof _data === "string")) {
12094
- _context11.next = 15;
12020
+ _context10.next = 15;
12095
12021
  break;
12096
12022
  }
12097
- return _context11.abrupt("return", {
12023
+ return _context10.abrupt("return", {
12098
12024
  v: _data
12099
12025
  });
12100
12026
 
@@ -12109,44 +12035,44 @@ function _typeof(o) {
12109
12035
 
12110
12036
  case 16:
12111
12037
  i += 20;
12112
- _context11.next = 6;
12038
+ _context10.next = 6;
12113
12039
  break;
12114
12040
 
12115
12041
  case 19:
12116
- return _context11.abrupt("return", 0);
12042
+ return _context10.abrupt("return", 0);
12117
12043
 
12118
12044
  case 20:
12119
12045
  if (!(category === "txns")) {
12120
- _context11.next = 38;
12046
+ _context10.next = 38;
12121
12047
  break;
12122
12048
  }
12123
- _context11.next = 23;
12049
+ _context10.next = 23;
12124
12050
  return fromTimeStampToBlock(toTimestamp(startTime), chain, API_KEY);
12125
12051
 
12126
12052
  case 23:
12127
- startBlock = _context11.sent;
12128
- _context11.next = 26;
12053
+ startBlock = _context10.sent;
12054
+ _context10.next = 26;
12129
12055
  return fromTimeStampToBlock(toTimestamp(endTime), chain, API_KEY);
12130
12056
 
12131
12057
  case 26:
12132
- endBlock = _context11.sent;
12058
+ endBlock = _context10.sent;
12133
12059
  _loop2 = _regeneratorRuntime().mark((function _loop2() {
12134
12060
  var addr, url, data;
12135
- return _regeneratorRuntime().wrap((function _loop2$(_context10) {
12136
- while (1) switch (_context10.prev = _context10.next) {
12061
+ return _regeneratorRuntime().wrap((function _loop2$(_context1) {
12062
+ while (1) switch (_context1.prev = _context1.next) {
12137
12063
  case 0:
12138
12064
  addr = _ADDRS[_i14];
12139
12065
  url = "https://api.etherscan.io/v2/api?chainid=".concat(chainId) + "&module=account&action=txlist&address=".concat(addr) + "&startblock=".concat(startBlock, "&endblock=").concat(endBlock) + "&page=".concat(page, "&offset=").concat(offset, "&sort=asc&apikey=").concat(API_KEY);
12140
- _context10.next = 4;
12066
+ _context1.next = 4;
12141
12067
  return fetchJSON(url);
12142
12068
 
12143
12069
  case 4:
12144
- data = _context10.sent;
12070
+ data = _context1.sent;
12145
12071
  if (!(typeof data === "string")) {
12146
- _context10.next = 7;
12072
+ _context1.next = 7;
12147
12073
  break;
12148
12074
  }
12149
- return _context10.abrupt("return", {
12075
+ return _context1.abrupt("return", {
12150
12076
  v: {
12151
12077
  v: data
12152
12078
  }
@@ -12163,7 +12089,7 @@ function _typeof(o) {
12163
12089
 
12164
12090
  case 8:
12165
12091
  case "end":
12166
- return _context10.stop();
12092
+ return _context1.stop();
12167
12093
  }
12168
12094
  }), _loop2);
12169
12095
  }));
@@ -12171,100 +12097,100 @@ function _typeof(o) {
12171
12097
 
12172
12098
  case 29:
12173
12099
  if (!(_i14 < _ADDRS.length)) {
12174
- _context11.next = 37;
12100
+ _context10.next = 37;
12175
12101
  break;
12176
12102
  }
12177
- return _context11.delegateYield(_loop2(), "t0", 31);
12103
+ return _context10.delegateYield(_loop2(), "t0", 31);
12178
12104
 
12179
12105
  case 31:
12180
- _ret2 = _context11.t0;
12106
+ _ret2 = _context10.t0;
12181
12107
  if (!_ret2) {
12182
- _context11.next = 34;
12108
+ _context10.next = 34;
12183
12109
  break;
12184
12110
  }
12185
- return _context11.abrupt("return", _ret2.v);
12111
+ return _context10.abrupt("return", _ret2.v);
12186
12112
 
12187
12113
  case 34:
12188
12114
  _i14++;
12189
- _context11.next = 29;
12115
+ _context10.next = 29;
12190
12116
  break;
12191
12117
 
12192
12118
  case 37:
12193
- return _context11.abrupt("return", 0);
12119
+ return _context10.abrupt("return", 0);
12194
12120
 
12195
12121
  case 38:
12196
- return _context11.abrupt("return", {
12122
+ return _context10.abrupt("return", {
12197
12123
  v: ERROR_MESSAGES_FLAG.INVALID_CATEGORY
12198
12124
  });
12199
12125
 
12200
12126
  case 39:
12201
12127
  case "end":
12202
- return _context11.stop();
12128
+ return _context10.stop();
12203
12129
  }
12204
12130
  }), _loop);
12205
12131
  }));
12206
12132
  _iterator2.s();
12207
12133
 
12208
- case 47:
12134
+ case 45:
12209
12135
  if ((_step2 = _iterator2.n()).done) {
12210
- _context13.next = 56;
12136
+ _context12.next = 54;
12211
12137
  break;
12212
12138
  }
12213
- return _context13.delegateYield(_loop(), "t2", 49);
12139
+ return _context12.delegateYield(_loop(), "t2", 47);
12214
12140
 
12215
- case 49:
12216
- _ret = _context13.t2;
12141
+ case 47:
12142
+ _ret = _context12.t2;
12217
12143
  if (!(_ret === 0)) {
12218
- _context13.next = 52;
12144
+ _context12.next = 50;
12219
12145
  break;
12220
12146
  }
12221
- return _context13.abrupt("continue", 54);
12147
+ return _context12.abrupt("continue", 52);
12222
12148
 
12223
- case 52:
12149
+ case 50:
12224
12150
  if (!_ret) {
12225
- _context13.next = 54;
12151
+ _context12.next = 52;
12226
12152
  break;
12227
12153
  }
12228
- return _context13.abrupt("return", _ret.v);
12154
+ return _context12.abrupt("return", _ret.v);
12229
12155
 
12230
- case 54:
12231
- _context13.next = 47;
12156
+ case 52:
12157
+ _context12.next = 45;
12232
12158
  break;
12233
12159
 
12234
- case 56:
12235
- _context13.next = 61;
12160
+ case 54:
12161
+ _context12.next = 59;
12236
12162
  break;
12237
12163
 
12238
- case 58:
12239
- _context13.prev = 58;
12240
- _context13.t3 = _context13["catch"](44);
12241
- _iterator2.e(_context13.t3);
12164
+ case 56:
12165
+ _context12.prev = 56;
12166
+ _context12.t3 = _context12["catch"](42);
12167
+ _iterator2.e(_context12.t3);
12242
12168
 
12243
- case 61:
12244
- _context13.prev = 61;
12169
+ case 59:
12170
+ _context12.prev = 59;
12245
12171
  _iterator2.f();
12246
- return _context13.finish(61);
12172
+ return _context12.finish(59);
12247
12173
 
12248
- case 64:
12249
- return _context13.abrupt("return", out);
12174
+ case 62:
12175
+ return _context12.abrupt("return", out);
12250
12176
 
12251
- case 65:
12177
+ case 63:
12252
12178
  case "end":
12253
- return _context13.stop();
12179
+ return _context12.stop();
12254
12180
  }
12255
- }), _callee11, null, [ [ 14, 36, 39, 42 ], [ 22, 29 ], [ 44, 58, 61, 64 ] ]);
12181
+ }), _callee10, null, [ [ 12, 34, 37, 40 ], [ 20, 27 ], [ 42, 56, 59, 62 ] ]);
12256
12182
  })));
12257
12183
  return _EOA.apply(this, arguments);
12258
12184
  }
12259
- function FLVURL(_x11, _x12) {
12185
+ function FLVURL(_x28, _x29) {
12260
12186
  return _FLVURL.apply(this, arguments);
12261
12187
  }
12262
12188
  function _FLVURL() {
12263
- _FLVURL = _asyncToGenerator(_regeneratorRuntime().mark((function _callee12(token, vs_currencies) {
12264
- return _regeneratorRuntime().wrap((function _callee12$(_context14) {
12265
- while (1) switch (_context14.prev = _context14.next) {
12189
+ _FLVURL = _asyncToGenerator(_regeneratorRuntime().mark((function _callee11(token, vs_currencies) {
12190
+ return _regeneratorRuntime().wrap((function _callee11$(_context13) {
12191
+ while (1) switch (_context13.prev = _context13.next) {
12266
12192
  case 0:
12267
- return _context14.abrupt("return", new Promise((function(resolve) {
12193
+ return _context13.abrupt("return", new Promise((function(resolve) {
12268
12194
  setTimeout((function() {
12269
12195
  resolve([ {
12270
12196
  Yoo: "gotcha"
@@ -12274,125 +12200,122 @@ function _typeof(o) {
12274
12200
 
12275
12201
  case 1:
12276
12202
  case "end":
12277
- return _context14.stop();
12203
+ return _context13.stop();
12278
12204
  }
12279
- }), _callee12);
12205
+ }), _callee11);
12280
12206
  })));
12281
12207
  return _FLVURL.apply(this, arguments);
12282
12208
  }
12283
- function SAFE() {
12209
+ function SAFE(_x30, _x31, _x32, _x33, _x34) {
12284
12210
  return _SAFE.apply(this, arguments);
12285
12211
  }
12286
12212
  function _SAFE() {
12287
- _SAFE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee13() {
12288
- var _argsToArray17, _argsToArray18, address, utility, chain, limit, offset, apiKey, chainIdentifier, url, response, json, _args15 = arguments;
12289
- return _regeneratorRuntime().wrap((function _callee13$(_context15) {
12290
- while (1) switch (_context15.prev = _context15.next) {
12213
+ _SAFE = _asyncToGenerator(_regeneratorRuntime().mark((function _callee12(address, utility, chain, limit, offset) {
12214
+ var apiKey, chainIdentifier, url, response, json;
12215
+ return _regeneratorRuntime().wrap((function _callee12$(_context14) {
12216
+ while (1) switch (_context14.prev = _context14.next) {
12291
12217
  case 0:
12292
- _argsToArray17 = argsToArray(_args15), _argsToArray18 = _slicedToArray(_argsToArray17, 5),
12293
- address = _argsToArray18[0], utility = _argsToArray18[1], chain = _argsToArray18[2],
12294
- limit = _argsToArray18[3], offset = _argsToArray18[4];
12295
12218
  if (!(typeof limit !== "number" || limit < 0)) {
12296
- _context15.next = 3;
12219
+ _context14.next = 2;
12297
12220
  break;
12298
12221
  }
12299
- return _context15.abrupt("return", "INVALID_LIMIT");
12222
+ return _context14.abrupt("return", "INVALID_LIMIT");
12300
12223
 
12301
- case 3:
12224
+ case 2:
12302
12225
  if (!(typeof offset !== "number" || offset < 0)) {
12303
- _context15.next = 5;
12226
+ _context14.next = 4;
12304
12227
  break;
12305
12228
  }
12306
- return _context15.abrupt("return", "INVALID_OFFSET");
12229
+ return _context14.abrupt("return", "INVALID_OFFSET");
12307
12230
 
12308
- case 5:
12231
+ case 4:
12309
12232
  if (!(utility !== "txns")) {
12310
- _context15.next = 7;
12233
+ _context14.next = 6;
12311
12234
  break;
12312
12235
  }
12313
- return _context15.abrupt("return", "UTILITY IS NOT SUPPORTED");
12236
+ return _context14.abrupt("return", "UTILITY IS NOT SUPPORTED");
12314
12237
 
12315
- case 7:
12238
+ case 6:
12316
12239
  apiKey = window.localStorage.getItem(SERVICE_API_KEY.Safe);
12317
12240
  chainIdentifier = SAFE_CHAIN_MAP[chain];
12318
12241
  if (apiKey) {
12319
- _context15.next = 11;
12242
+ _context14.next = 10;
12320
12243
  break;
12321
12244
  }
12322
- return _context15.abrupt("return", "".concat(SERVICE_API_KEY.Safe, "_MISSING"));
12245
+ return _context14.abrupt("return", "".concat(SERVICE_API_KEY.Safe, "_MISSING"));
12323
12246
 
12324
- case 11:
12247
+ case 10:
12325
12248
  if (chainIdentifier) {
12326
- _context15.next = 13;
12249
+ _context14.next = 12;
12327
12250
  break;
12328
12251
  }
12329
- return _context15.abrupt("return", "CHAIN IS NOT SUPPORTED");
12252
+ return _context14.abrupt("return", "CHAIN IS NOT SUPPORTED");
12330
12253
 
12331
- case 13:
12254
+ case 12:
12332
12255
  if (isAddress(address)) {
12333
- _context15.next = 17;
12256
+ _context14.next = 16;
12334
12257
  break;
12335
12258
  }
12336
- _context15.next = 16;
12259
+ _context14.next = 15;
12337
12260
  return fromEnsNameToAddress(address);
12338
12261
 
12339
- case 16:
12340
- address = _context15.sent;
12262
+ case 15:
12263
+ address = _context14.sent;
12341
12264
 
12342
- case 17:
12265
+ case 16:
12343
12266
  if (address) {
12344
- _context15.next = 19;
12267
+ _context14.next = 18;
12345
12268
  break;
12346
12269
  }
12347
- return _context15.abrupt("return", "".concat(address).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
12270
+ return _context14.abrupt("return", "".concat(address).concat(ERROR_MESSAGES_FLAG.INVALID_PARAM));
12348
12271
 
12349
- case 19:
12272
+ case 18:
12350
12273
  url = "https://api.safe.global/tx-service/".concat(chainIdentifier, "/api/v2/safes/").concat(address, "/multisig-transactions?limit=").concat(limit, "&offset=").concat(offset);
12351
- _context15.prev = 20;
12352
- _context15.next = 23;
12274
+ _context14.prev = 19;
12275
+ _context14.next = 22;
12353
12276
  return fetch(url, {
12354
12277
  headers: {
12355
12278
  Authorization: "Bearer ".concat(apiKey)
12356
12279
  }
12357
12280
  });
12358
12281
 
12359
- case 23:
12360
- response = _context15.sent;
12282
+ case 22:
12283
+ response = _context14.sent;
12361
12284
  if (response.ok) {
12362
- _context15.next = 26;
12285
+ _context14.next = 25;
12363
12286
  break;
12364
12287
  }
12365
12288
  throw new Error("HTTP error! Status: ".concat(response.status));
12366
12289
 
12367
- case 26:
12368
- _context15.next = 28;
12290
+ case 25:
12291
+ _context14.next = 27;
12369
12292
  return response.json();
12370
12293
 
12371
- case 28:
12372
- json = _context15.sent;
12294
+ case 27:
12295
+ json = _context14.sent;
12373
12296
  if (Array.isArray(json.results)) {
12374
- _context15.next = 31;
12297
+ _context14.next = 30;
12375
12298
  break;
12376
12299
  }
12377
- return _context15.abrupt("return", "INVALID API RESPONSE");
12300
+ return _context14.abrupt("return", "INVALID API RESPONSE");
12378
12301
 
12379
- case 31:
12380
- return _context15.abrupt("return", json.results.map((function(_ref4) {
12381
- var confirmations = _ref4.confirmations, dataDecoded = _ref4.dataDecoded, rest = _objectWithoutProperties(_ref4, _excluded);
12302
+ case 30:
12303
+ return _context14.abrupt("return", json.results.map((function(_ref5) {
12304
+ var confirmations = _ref5.confirmations, dataDecoded = _ref5.dataDecoded, rest = _objectWithoutProperties(_ref5, _excluded);
12382
12305
  return rest;
12383
12306
  })));
12384
12307
 
12385
- case 34:
12386
- _context15.prev = 34;
12387
- _context15.t0 = _context15["catch"](20);
12388
- console.log(_context15.t0);
12389
- return _context15.abrupt("return", "ERROR IN FETCHING");
12308
+ case 33:
12309
+ _context14.prev = 33;
12310
+ _context14.t0 = _context14["catch"](19);
12311
+ console.log(_context14.t0);
12312
+ return _context14.abrupt("return", "ERROR IN FETCHING");
12390
12313
 
12391
- case 38:
12314
+ case 37:
12392
12315
  case "end":
12393
- return _context15.stop();
12316
+ return _context14.stop();
12394
12317
  }
12395
- }), _callee13, null, [ [ 20, 34 ] ]);
12318
+ }), _callee12, null, [ [ 19, 33 ] ]);
12396
12319
  })));
12397
12320
  return _SAFE.apply(this, arguments);
12398
12321
  }
@@ -12420,8 +12343,6 @@ function _typeof(o) {
12420
12343
  exports.AVERAGEA = AVERAGEA;
12421
12344
  exports.AVERAGEIF = AVERAGEIF;
12422
12345
  exports.AVERAGEIFS = AVERAGEIFS;
12423
- exports.BASE = BASE;
12424
- exports.BASESCAN = BASESCAN;
12425
12346
  exports.BESSELI = BESSELI;
12426
12347
  exports.BESSELJ = BESSELJ;
12427
12348
  exports.BESSELK = BESSELK;
@@ -12560,8 +12481,8 @@ function _typeof(o) {
12560
12481
  exports.GCD = GCD;
12561
12482
  exports.GEOMEAN = GEOMEAN;
12562
12483
  exports.GESTEP = GESTEP;
12484
+ exports.GNOSIS = GNOSIS;
12563
12485
  exports.GNOSISPAY = GNOSISPAY;
12564
- exports.GNOSISSCAN = GNOSISSCAN;
12565
12486
  exports.GROWTH = GROWTH;
12566
12487
  exports.HARMEAN = HARMEAN;
12567
12488
  exports.HEX2BIN = HEX2BIN;
@@ -12807,6 +12728,5 @@ function _typeof(o) {
12807
12728
  exports.YEARFRAC = YEARFRAC;
12808
12729
  exports.Z = Z;
12809
12730
  exports.ZTEST = ZTEST;
12810
- exports._BLOCKSCOUT = _BLOCKSCOUT;
12811
12731
  exports.utils = utils;
12812
12732
  }));