@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.
@@ -193,7 +193,8 @@ export declare class Users extends Base {
193
193
  blockNumber: number;
194
194
  }>;
195
195
  /**
196
- * Updates a creator (updates their data on the creator node)
196
+ * Updates a creator (updates their data on the creator node).
197
+ * DO NOT CALL FOR A STORAGEV2 USER (use updateMetadataV2 instead)
197
198
  */
198
199
  updateCreator(userId: number, metadata: UserMetadata, writeMetadataThroughChain?: boolean): Promise<{
199
200
  blockHash: string;
package/dist/index.cjs.js CHANGED
@@ -29992,7 +29992,7 @@ var RendezvousHash = /*#__PURE__*/function () {
29992
29992
  */
29993
29993
 
29994
29994
  var getNStorageNodes = /*#__PURE__*/function () {
29995
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(allNodes) {
29995
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(allNodes) {
29996
29996
  var numNodes,
29997
29997
  rendezvousKey,
29998
29998
  logger,
@@ -30006,15 +30006,15 @@ var getNStorageNodes = /*#__PURE__*/function () {
30006
30006
  healthCheckPromises,
30007
30007
  healthCheckResults,
30008
30008
  j,
30009
- _args = arguments;
30010
- return regeneratorRuntime.wrap(function _callee$(_context) {
30009
+ _args2 = arguments;
30010
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
30011
30011
  while (1) {
30012
- switch (_context.prev = _context.next) {
30012
+ switch (_context2.prev = _context2.next) {
30013
30013
  case 0:
30014
- numNodes = _args.length > 1 && _args[1] !== undefined ? _args[1] : 0;
30015
- rendezvousKey = _args.length > 2 && _args[2] !== undefined ? _args[2] : '';
30016
- logger = _args.length > 3 && _args[3] !== undefined ? _args[3] : console;
30017
- _context.prev = 3;
30014
+ numNodes = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 0;
30015
+ rendezvousKey = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : '';
30016
+ logger = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : console;
30017
+ _context2.prev = 3;
30018
30018
  if (numNodes === 0) numNodes = allNodes.length;
30019
30019
  nodeOwnerWallets = allNodes.map(function (n) {
30020
30020
  return n.delegateOwnerWallet;
@@ -30041,19 +30041,40 @@ var getNStorageNodes = /*#__PURE__*/function () {
30041
30041
 
30042
30042
  case 9:
30043
30043
  if (!(i < endpoints.length)) {
30044
- _context.next = 19;
30044
+ _context2.next = 19;
30045
30045
  break;
30046
30046
  }
30047
30047
 
30048
30048
  batch = endpoints.slice(i, i + numNodes);
30049
- healthCheckPromises = batch.map(function (endpoint) {
30050
- return isNodeHealthy(endpoint, logger);
30051
- });
30052
- _context.next = 14;
30049
+ healthCheckPromises = batch.map( /*#__PURE__*/function () {
30050
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(endpoint) {
30051
+ return regeneratorRuntime.wrap(function _callee$(_context) {
30052
+ while (1) {
30053
+ switch (_context.prev = _context.next) {
30054
+ case 0:
30055
+ _context.next = 2;
30056
+ return isNodeHealthy(endpoint, logger);
30057
+
30058
+ case 2:
30059
+ return _context.abrupt("return", _context.sent);
30060
+
30061
+ case 3:
30062
+ case "end":
30063
+ return _context.stop();
30064
+ }
30065
+ }
30066
+ }, _callee);
30067
+ }));
30068
+
30069
+ return function (_x2) {
30070
+ return _ref2.apply(this, arguments);
30071
+ };
30072
+ }());
30073
+ _context2.next = 14;
30053
30074
  return Promise.all(healthCheckPromises);
30054
30075
 
30055
30076
  case 14:
30056
- healthCheckResults = _context.sent;
30077
+ healthCheckResults = _context2.sent;
30057
30078
 
30058
30079
  for (j = 0; j < healthCheckResults.length; j++) {
30059
30080
  if (healthCheckResults[j]) {
@@ -30063,7 +30084,7 @@ var getNStorageNodes = /*#__PURE__*/function () {
30063
30084
 
30064
30085
  case 16:
30065
30086
  i += numNodes;
30066
- _context.next = 9;
30087
+ _context2.next = 9;
30067
30088
  break;
30068
30089
 
30069
30090
  case 19:
@@ -30071,20 +30092,20 @@ var getNStorageNodes = /*#__PURE__*/function () {
30071
30092
  logger.error("getNStorageNodes: Could not select ".concat(numNodes, " healthy nodes from ").concat(allNodes.length, " nodes"));
30072
30093
  }
30073
30094
 
30074
- return _context.abrupt("return", healthyEndpoints);
30095
+ return _context2.abrupt("return", healthyEndpoints);
30075
30096
 
30076
30097
  case 23:
30077
- _context.prev = 23;
30078
- _context.t0 = _context["catch"](3);
30079
- logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context.t0));
30080
- return _context.abrupt("return", []);
30098
+ _context2.prev = 23;
30099
+ _context2.t0 = _context2["catch"](3);
30100
+ logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context2.t0));
30101
+ return _context2.abrupt("return", []);
30081
30102
 
30082
30103
  case 27:
30083
30104
  case "end":
30084
- return _context.stop();
30105
+ return _context2.stop();
30085
30106
  }
30086
30107
  }
30087
- }, _callee, null, [[3, 23]]);
30108
+ }, _callee2, null, [[3, 23]]);
30088
30109
  }));
30089
30110
 
30090
30111
  return function getNStorageNodes(_x) {
@@ -30092,17 +30113,17 @@ var getNStorageNodes = /*#__PURE__*/function () {
30092
30113
  };
30093
30114
  }();
30094
30115
  var isNodeHealthy = /*#__PURE__*/function () {
30095
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(endpoint) {
30116
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(endpoint) {
30096
30117
  var logger,
30097
30118
  resp,
30098
- _args2 = arguments;
30099
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
30119
+ _args3 = arguments;
30120
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
30100
30121
  while (1) {
30101
- switch (_context2.prev = _context2.next) {
30122
+ switch (_context3.prev = _context3.next) {
30102
30123
  case 0:
30103
- logger = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : console;
30104
- _context2.prev = 1;
30105
- _context2.next = 4;
30124
+ logger = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : console;
30125
+ _context3.prev = 1;
30126
+ _context3.next = 4;
30106
30127
  return axios__default["default"]({
30107
30128
  baseURL: endpoint,
30108
30129
  url: "/status",
@@ -30111,39 +30132,39 @@ var isNodeHealthy = /*#__PURE__*/function () {
30111
30132
  });
30112
30133
 
30113
30134
  case 4:
30114
- resp = _context2.sent;
30135
+ resp = _context3.sent;
30115
30136
 
30116
30137
  if (!(resp.status === 200)) {
30117
- _context2.next = 9;
30138
+ _context3.next = 9;
30118
30139
  break;
30119
30140
  }
30120
30141
 
30121
- return _context2.abrupt("return", true);
30142
+ return _context3.abrupt("return", true);
30122
30143
 
30123
30144
  case 9:
30124
30145
  logger.warn("isNodeHealthy: ".concat(endpoint, " returned non-200 status ").concat(resp.status));
30125
- return _context2.abrupt("return", false);
30146
+ return _context3.abrupt("return", false);
30126
30147
 
30127
30148
  case 11:
30128
- _context2.next = 17;
30149
+ _context3.next = 17;
30129
30150
  break;
30130
30151
 
30131
30152
  case 13:
30132
- _context2.prev = 13;
30133
- _context2.t0 = _context2["catch"](1);
30134
- logger.error("isNodeHealthy: Error checking health: ".concat(_context2.t0));
30135
- return _context2.abrupt("return", false);
30153
+ _context3.prev = 13;
30154
+ _context3.t0 = _context3["catch"](1);
30155
+ logger.error("isNodeHealthy: Error checking health: ".concat(_context3.t0));
30156
+ return _context3.abrupt("return", false);
30136
30157
 
30137
30158
  case 17:
30138
30159
  case "end":
30139
- return _context2.stop();
30160
+ return _context3.stop();
30140
30161
  }
30141
30162
  }
30142
- }, _callee2, null, [[1, 13]]);
30163
+ }, _callee3, null, [[1, 13]]);
30143
30164
  }));
30144
30165
 
30145
- return function isNodeHealthy(_x2) {
30146
- return _ref2.apply(this, arguments);
30166
+ return function isNodeHealthy(_x3) {
30167
+ return _ref3.apply(this, arguments);
30147
30168
  };
30148
30169
  }();
30149
30170
 
@@ -30579,9 +30600,9 @@ var EthWeb3Manager = /*#__PURE__*/function () {
30579
30600
  }();
30580
30601
 
30581
30602
  var name = "@audius/sdk";
30582
- var version = "2.0.3-beta.23";
30603
+ var version = "2.0.3-beta.25";
30583
30604
  var audius = {
30584
- releaseSHA: "0098d11a05e6a85cc2081cefb8c21d3108ec5478"
30605
+ releaseSHA: "febcdf96c3c45f2efdd6a5f757dbf1792edd4bda"
30585
30606
  };
30586
30607
  var description = "Audius SDK";
30587
30608
  var main = "dist/index.cjs.js";
@@ -55291,32 +55312,28 @@ var definitions$1 = {
55291
55312
  "string",
55292
55313
  "null"
55293
55314
  ],
55294
- "default": null,
55295
- $ref: "#/definitions/CID"
55315
+ "default": null
55296
55316
  },
55297
55317
  profile_picture_sizes: {
55298
55318
  type: [
55299
55319
  "string",
55300
55320
  "null"
55301
55321
  ],
55302
- "default": null,
55303
- $ref: "#/definitions/CID"
55322
+ "default": null
55304
55323
  },
55305
55324
  cover_photo: {
55306
55325
  type: [
55307
55326
  "string",
55308
55327
  "null"
55309
55328
  ],
55310
- "default": null,
55311
- $ref: "#/definitions/CID"
55329
+ "default": null
55312
55330
  },
55313
55331
  cover_photo_sizes: {
55314
55332
  type: [
55315
55333
  "string",
55316
55334
  "null"
55317
55335
  ],
55318
- "default": null,
55319
- $ref: "#/definitions/CID"
55336
+ "default": null
55320
55337
  },
55321
55338
  bio: {
55322
55339
  type: [
@@ -55598,8 +55615,7 @@ var definitions = {
55598
55615
  "string",
55599
55616
  "null"
55600
55617
  ],
55601
- "default": null,
55602
- $ref: "#/definitions/CID"
55618
+ "default": null
55603
55619
  },
55604
55620
  description: {
55605
55621
  type: [
@@ -67875,7 +67891,8 @@ var Users = /*#__PURE__*/function (_Base) {
67875
67891
  return updateEntityManagerReplicaSet;
67876
67892
  }()
67877
67893
  /**
67878
- * Updates a creator (updates their data on the creator node)
67894
+ * Updates a creator (updates their data on the creator node).
67895
+ * DO NOT CALL FOR A STORAGEV2 USER (use updateMetadataV2 instead)
67879
67896
  */
67880
67897
 
67881
67898
  }, {