@audius/sdk 2.0.3-beta.23 → 2.0.3-beta.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.
package/dist/legacy.js CHANGED
@@ -29800,7 +29800,7 @@ var RendezvousHash = /*#__PURE__*/function () {
29800
29800
  */
29801
29801
 
29802
29802
  var getNStorageNodes = /*#__PURE__*/function () {
29803
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(allNodes) {
29803
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(allNodes) {
29804
29804
  var numNodes,
29805
29805
  rendezvousKey,
29806
29806
  logger,
@@ -29814,15 +29814,15 @@ var getNStorageNodes = /*#__PURE__*/function () {
29814
29814
  healthCheckPromises,
29815
29815
  healthCheckResults,
29816
29816
  j,
29817
- _args = arguments;
29818
- return regeneratorRuntime.wrap(function _callee$(_context) {
29817
+ _args2 = arguments;
29818
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
29819
29819
  while (1) {
29820
- switch (_context.prev = _context.next) {
29820
+ switch (_context2.prev = _context2.next) {
29821
29821
  case 0:
29822
- numNodes = _args.length > 1 && _args[1] !== undefined ? _args[1] : 0;
29823
- rendezvousKey = _args.length > 2 && _args[2] !== undefined ? _args[2] : '';
29824
- logger = _args.length > 3 && _args[3] !== undefined ? _args[3] : console;
29825
- _context.prev = 3;
29822
+ numNodes = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 0;
29823
+ rendezvousKey = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : '';
29824
+ logger = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : console;
29825
+ _context2.prev = 3;
29826
29826
  if (numNodes === 0) numNodes = allNodes.length;
29827
29827
  nodeOwnerWallets = allNodes.map(function (n) {
29828
29828
  return n.delegateOwnerWallet;
@@ -29849,19 +29849,40 @@ var getNStorageNodes = /*#__PURE__*/function () {
29849
29849
 
29850
29850
  case 9:
29851
29851
  if (!(i < endpoints.length)) {
29852
- _context.next = 19;
29852
+ _context2.next = 19;
29853
29853
  break;
29854
29854
  }
29855
29855
 
29856
29856
  batch = endpoints.slice(i, i + numNodes);
29857
- healthCheckPromises = batch.map(function (endpoint) {
29858
- return isNodeHealthy(endpoint, logger);
29859
- });
29860
- _context.next = 14;
29857
+ healthCheckPromises = batch.map( /*#__PURE__*/function () {
29858
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(endpoint) {
29859
+ return regeneratorRuntime.wrap(function _callee$(_context) {
29860
+ while (1) {
29861
+ switch (_context.prev = _context.next) {
29862
+ case 0:
29863
+ _context.next = 2;
29864
+ return isNodeHealthy(endpoint, logger);
29865
+
29866
+ case 2:
29867
+ return _context.abrupt("return", _context.sent);
29868
+
29869
+ case 3:
29870
+ case "end":
29871
+ return _context.stop();
29872
+ }
29873
+ }
29874
+ }, _callee);
29875
+ }));
29876
+
29877
+ return function (_x2) {
29878
+ return _ref2.apply(this, arguments);
29879
+ };
29880
+ }());
29881
+ _context2.next = 14;
29861
29882
  return Promise.all(healthCheckPromises);
29862
29883
 
29863
29884
  case 14:
29864
- healthCheckResults = _context.sent;
29885
+ healthCheckResults = _context2.sent;
29865
29886
 
29866
29887
  for (j = 0; j < healthCheckResults.length; j++) {
29867
29888
  if (healthCheckResults[j]) {
@@ -29871,7 +29892,7 @@ var getNStorageNodes = /*#__PURE__*/function () {
29871
29892
 
29872
29893
  case 16:
29873
29894
  i += numNodes;
29874
- _context.next = 9;
29895
+ _context2.next = 9;
29875
29896
  break;
29876
29897
 
29877
29898
  case 19:
@@ -29879,20 +29900,20 @@ var getNStorageNodes = /*#__PURE__*/function () {
29879
29900
  logger.error("getNStorageNodes: Could not select ".concat(numNodes, " healthy nodes from ").concat(allNodes.length, " nodes"));
29880
29901
  }
29881
29902
 
29882
- return _context.abrupt("return", healthyEndpoints);
29903
+ return _context2.abrupt("return", healthyEndpoints);
29883
29904
 
29884
29905
  case 23:
29885
- _context.prev = 23;
29886
- _context.t0 = _context["catch"](3);
29887
- logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context.t0));
29888
- return _context.abrupt("return", []);
29906
+ _context2.prev = 23;
29907
+ _context2.t0 = _context2["catch"](3);
29908
+ logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context2.t0));
29909
+ return _context2.abrupt("return", []);
29889
29910
 
29890
29911
  case 27:
29891
29912
  case "end":
29892
- return _context.stop();
29913
+ return _context2.stop();
29893
29914
  }
29894
29915
  }
29895
- }, _callee, null, [[3, 23]]);
29916
+ }, _callee2, null, [[3, 23]]);
29896
29917
  }));
29897
29918
 
29898
29919
  return function getNStorageNodes(_x) {
@@ -29900,17 +29921,17 @@ var getNStorageNodes = /*#__PURE__*/function () {
29900
29921
  };
29901
29922
  }();
29902
29923
  var isNodeHealthy = /*#__PURE__*/function () {
29903
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(endpoint) {
29924
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(endpoint) {
29904
29925
  var logger,
29905
29926
  resp,
29906
- _args2 = arguments;
29907
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
29927
+ _args3 = arguments;
29928
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
29908
29929
  while (1) {
29909
- switch (_context2.prev = _context2.next) {
29930
+ switch (_context3.prev = _context3.next) {
29910
29931
  case 0:
29911
- logger = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : console;
29912
- _context2.prev = 1;
29913
- _context2.next = 4;
29932
+ logger = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : console;
29933
+ _context3.prev = 1;
29934
+ _context3.next = 4;
29914
29935
  return axios__default["default"]({
29915
29936
  baseURL: endpoint,
29916
29937
  url: "/status",
@@ -29919,39 +29940,39 @@ var isNodeHealthy = /*#__PURE__*/function () {
29919
29940
  });
29920
29941
 
29921
29942
  case 4:
29922
- resp = _context2.sent;
29943
+ resp = _context3.sent;
29923
29944
 
29924
29945
  if (!(resp.status === 200)) {
29925
- _context2.next = 9;
29946
+ _context3.next = 9;
29926
29947
  break;
29927
29948
  }
29928
29949
 
29929
- return _context2.abrupt("return", true);
29950
+ return _context3.abrupt("return", true);
29930
29951
 
29931
29952
  case 9:
29932
29953
  logger.warn("isNodeHealthy: ".concat(endpoint, " returned non-200 status ").concat(resp.status));
29933
- return _context2.abrupt("return", false);
29954
+ return _context3.abrupt("return", false);
29934
29955
 
29935
29956
  case 11:
29936
- _context2.next = 17;
29957
+ _context3.next = 17;
29937
29958
  break;
29938
29959
 
29939
29960
  case 13:
29940
- _context2.prev = 13;
29941
- _context2.t0 = _context2["catch"](1);
29942
- logger.error("isNodeHealthy: Error checking health: ".concat(_context2.t0));
29943
- return _context2.abrupt("return", false);
29961
+ _context3.prev = 13;
29962
+ _context3.t0 = _context3["catch"](1);
29963
+ logger.error("isNodeHealthy: Error checking health: ".concat(_context3.t0));
29964
+ return _context3.abrupt("return", false);
29944
29965
 
29945
29966
  case 17:
29946
29967
  case "end":
29947
- return _context2.stop();
29968
+ return _context3.stop();
29948
29969
  }
29949
29970
  }
29950
- }, _callee2, null, [[1, 13]]);
29971
+ }, _callee3, null, [[1, 13]]);
29951
29972
  }));
29952
29973
 
29953
- return function isNodeHealthy(_x2) {
29954
- return _ref2.apply(this, arguments);
29974
+ return function isNodeHealthy(_x3) {
29975
+ return _ref3.apply(this, arguments);
29955
29976
  };
29956
29977
  }();
29957
29978
 
@@ -30387,9 +30408,9 @@ var EthWeb3Manager = /*#__PURE__*/function () {
30387
30408
  }();
30388
30409
 
30389
30410
  var name = "@audius/sdk";
30390
- var version = "2.0.3-beta.23";
30411
+ var version = "2.0.3-beta.25";
30391
30412
  var audius = {
30392
- releaseSHA: "0098d11a05e6a85cc2081cefb8c21d3108ec5478"
30413
+ releaseSHA: "febcdf96c3c45f2efdd6a5f757dbf1792edd4bda"
30393
30414
  };
30394
30415
  var description = "Audius SDK";
30395
30416
  var main = "dist/index.cjs.js";
@@ -55099,32 +55120,28 @@ var definitions$1 = {
55099
55120
  "string",
55100
55121
  "null"
55101
55122
  ],
55102
- "default": null,
55103
- $ref: "#/definitions/CID"
55123
+ "default": null
55104
55124
  },
55105
55125
  profile_picture_sizes: {
55106
55126
  type: [
55107
55127
  "string",
55108
55128
  "null"
55109
55129
  ],
55110
- "default": null,
55111
- $ref: "#/definitions/CID"
55130
+ "default": null
55112
55131
  },
55113
55132
  cover_photo: {
55114
55133
  type: [
55115
55134
  "string",
55116
55135
  "null"
55117
55136
  ],
55118
- "default": null,
55119
- $ref: "#/definitions/CID"
55137
+ "default": null
55120
55138
  },
55121
55139
  cover_photo_sizes: {
55122
55140
  type: [
55123
55141
  "string",
55124
55142
  "null"
55125
55143
  ],
55126
- "default": null,
55127
- $ref: "#/definitions/CID"
55144
+ "default": null
55128
55145
  },
55129
55146
  bio: {
55130
55147
  type: [
@@ -55406,8 +55423,7 @@ var definitions = {
55406
55423
  "string",
55407
55424
  "null"
55408
55425
  ],
55409
- "default": null,
55410
- $ref: "#/definitions/CID"
55426
+ "default": null
55411
55427
  },
55412
55428
  description: {
55413
55429
  type: [
@@ -67683,7 +67699,8 @@ var Users = /*#__PURE__*/function (_Base) {
67683
67699
  return updateEntityManagerReplicaSet;
67684
67700
  }()
67685
67701
  /**
67686
- * Updates a creator (updates their data on the creator node)
67702
+ * Updates a creator (updates their data on the creator node).
67703
+ * DO NOT CALL FOR A STORAGEV2 USER (use updateMetadataV2 instead)
67687
67704
  */
67688
67705
 
67689
67706
  }, {