@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.
@@ -597,9 +597,9 @@ if (typeof window !== 'undefined' && window && window.Web3) {
597
597
  var LibsWeb3 = Web3;
598
598
 
599
599
  var name = "@audius/sdk";
600
- var version$1 = "2.0.3-beta.23";
600
+ var version$1 = "2.0.3-beta.25";
601
601
  var audius = {
602
- releaseSHA: "0098d11a05e6a85cc2081cefb8c21d3108ec5478"
602
+ releaseSHA: "febcdf96c3c45f2efdd6a5f757dbf1792edd4bda"
603
603
  };
604
604
  var description = "Audius SDK";
605
605
  var main = "dist/index.cjs.js";
@@ -4164,7 +4164,7 @@ var RendezvousHash = /*#__PURE__*/function () {
4164
4164
  */
4165
4165
 
4166
4166
  var getNStorageNodes = /*#__PURE__*/function () {
4167
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(allNodes) {
4167
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(allNodes) {
4168
4168
  var numNodes,
4169
4169
  rendezvousKey,
4170
4170
  logger,
@@ -4178,15 +4178,15 @@ var getNStorageNodes = /*#__PURE__*/function () {
4178
4178
  healthCheckPromises,
4179
4179
  healthCheckResults,
4180
4180
  j,
4181
- _args = arguments;
4182
- return regeneratorRuntime.wrap(function _callee$(_context) {
4181
+ _args2 = arguments;
4182
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
4183
4183
  while (1) {
4184
- switch (_context.prev = _context.next) {
4184
+ switch (_context2.prev = _context2.next) {
4185
4185
  case 0:
4186
- numNodes = _args.length > 1 && _args[1] !== undefined ? _args[1] : 0;
4187
- rendezvousKey = _args.length > 2 && _args[2] !== undefined ? _args[2] : '';
4188
- logger = _args.length > 3 && _args[3] !== undefined ? _args[3] : console;
4189
- _context.prev = 3;
4186
+ numNodes = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : 0;
4187
+ rendezvousKey = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : '';
4188
+ logger = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : console;
4189
+ _context2.prev = 3;
4190
4190
  if (numNodes === 0) numNodes = allNodes.length;
4191
4191
  nodeOwnerWallets = allNodes.map(function (n) {
4192
4192
  return n.delegateOwnerWallet;
@@ -4213,19 +4213,40 @@ var getNStorageNodes = /*#__PURE__*/function () {
4213
4213
 
4214
4214
  case 9:
4215
4215
  if (!(i < endpoints.length)) {
4216
- _context.next = 19;
4216
+ _context2.next = 19;
4217
4217
  break;
4218
4218
  }
4219
4219
 
4220
4220
  batch = endpoints.slice(i, i + numNodes);
4221
- healthCheckPromises = batch.map(function (endpoint) {
4222
- return isNodeHealthy(endpoint, logger);
4223
- });
4224
- _context.next = 14;
4221
+ healthCheckPromises = batch.map( /*#__PURE__*/function () {
4222
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(endpoint) {
4223
+ return regeneratorRuntime.wrap(function _callee$(_context) {
4224
+ while (1) {
4225
+ switch (_context.prev = _context.next) {
4226
+ case 0:
4227
+ _context.next = 2;
4228
+ return isNodeHealthy(endpoint, logger);
4229
+
4230
+ case 2:
4231
+ return _context.abrupt("return", _context.sent);
4232
+
4233
+ case 3:
4234
+ case "end":
4235
+ return _context.stop();
4236
+ }
4237
+ }
4238
+ }, _callee);
4239
+ }));
4240
+
4241
+ return function (_x2) {
4242
+ return _ref2.apply(this, arguments);
4243
+ };
4244
+ }());
4245
+ _context2.next = 14;
4225
4246
  return Promise.all(healthCheckPromises);
4226
4247
 
4227
4248
  case 14:
4228
- healthCheckResults = _context.sent;
4249
+ healthCheckResults = _context2.sent;
4229
4250
 
4230
4251
  for (j = 0; j < healthCheckResults.length; j++) {
4231
4252
  if (healthCheckResults[j]) {
@@ -4235,7 +4256,7 @@ var getNStorageNodes = /*#__PURE__*/function () {
4235
4256
 
4236
4257
  case 16:
4237
4258
  i += numNodes;
4238
- _context.next = 9;
4259
+ _context2.next = 9;
4239
4260
  break;
4240
4261
 
4241
4262
  case 19:
@@ -4243,20 +4264,20 @@ var getNStorageNodes = /*#__PURE__*/function () {
4243
4264
  logger.error("getNStorageNodes: Could not select ".concat(numNodes, " healthy nodes from ").concat(allNodes.length, " nodes"));
4244
4265
  }
4245
4266
 
4246
- return _context.abrupt("return", healthyEndpoints);
4267
+ return _context2.abrupt("return", healthyEndpoints);
4247
4268
 
4248
4269
  case 23:
4249
- _context.prev = 23;
4250
- _context.t0 = _context["catch"](3);
4251
- logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context.t0));
4252
- return _context.abrupt("return", []);
4270
+ _context2.prev = 23;
4271
+ _context2.t0 = _context2["catch"](3);
4272
+ logger.error("getNStorageNodes: Error selecting nodes: ".concat(_context2.t0));
4273
+ return _context2.abrupt("return", []);
4253
4274
 
4254
4275
  case 27:
4255
4276
  case "end":
4256
- return _context.stop();
4277
+ return _context2.stop();
4257
4278
  }
4258
4279
  }
4259
- }, _callee, null, [[3, 23]]);
4280
+ }, _callee2, null, [[3, 23]]);
4260
4281
  }));
4261
4282
 
4262
4283
  return function getNStorageNodes(_x) {
@@ -4264,17 +4285,17 @@ var getNStorageNodes = /*#__PURE__*/function () {
4264
4285
  };
4265
4286
  }();
4266
4287
  var isNodeHealthy = /*#__PURE__*/function () {
4267
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(endpoint) {
4288
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(endpoint) {
4268
4289
  var logger,
4269
4290
  resp,
4270
- _args2 = arguments;
4271
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
4291
+ _args3 = arguments;
4292
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
4272
4293
  while (1) {
4273
- switch (_context2.prev = _context2.next) {
4294
+ switch (_context3.prev = _context3.next) {
4274
4295
  case 0:
4275
- logger = _args2.length > 1 && _args2[1] !== undefined ? _args2[1] : console;
4276
- _context2.prev = 1;
4277
- _context2.next = 4;
4296
+ logger = _args3.length > 1 && _args3[1] !== undefined ? _args3[1] : console;
4297
+ _context3.prev = 1;
4298
+ _context3.next = 4;
4278
4299
  return axios({
4279
4300
  baseURL: endpoint,
4280
4301
  url: "/status",
@@ -4283,39 +4304,39 @@ var isNodeHealthy = /*#__PURE__*/function () {
4283
4304
  });
4284
4305
 
4285
4306
  case 4:
4286
- resp = _context2.sent;
4307
+ resp = _context3.sent;
4287
4308
 
4288
4309
  if (!(resp.status === 200)) {
4289
- _context2.next = 9;
4310
+ _context3.next = 9;
4290
4311
  break;
4291
4312
  }
4292
4313
 
4293
- return _context2.abrupt("return", true);
4314
+ return _context3.abrupt("return", true);
4294
4315
 
4295
4316
  case 9:
4296
4317
  logger.warn("isNodeHealthy: ".concat(endpoint, " returned non-200 status ").concat(resp.status));
4297
- return _context2.abrupt("return", false);
4318
+ return _context3.abrupt("return", false);
4298
4319
 
4299
4320
  case 11:
4300
- _context2.next = 17;
4321
+ _context3.next = 17;
4301
4322
  break;
4302
4323
 
4303
4324
  case 13:
4304
- _context2.prev = 13;
4305
- _context2.t0 = _context2["catch"](1);
4306
- logger.error("isNodeHealthy: Error checking health: ".concat(_context2.t0));
4307
- return _context2.abrupt("return", false);
4325
+ _context3.prev = 13;
4326
+ _context3.t0 = _context3["catch"](1);
4327
+ logger.error("isNodeHealthy: Error checking health: ".concat(_context3.t0));
4328
+ return _context3.abrupt("return", false);
4308
4329
 
4309
4330
  case 17:
4310
4331
  case "end":
4311
- return _context2.stop();
4332
+ return _context3.stop();
4312
4333
  }
4313
4334
  }
4314
- }, _callee2, null, [[1, 13]]);
4335
+ }, _callee3, null, [[1, 13]]);
4315
4336
  }));
4316
4337
 
4317
- return function isNodeHealthy(_x2) {
4318
- return _ref2.apply(this, arguments);
4338
+ return function isNodeHealthy(_x3) {
4339
+ return _ref3.apply(this, arguments);
4319
4340
  };
4320
4341
  }();
4321
4342
 
@@ -4845,32 +4866,28 @@ var definitions$1 = {
4845
4866
  "string",
4846
4867
  "null"
4847
4868
  ],
4848
- "default": null,
4849
- $ref: "#/definitions/CID"
4869
+ "default": null
4850
4870
  },
4851
4871
  profile_picture_sizes: {
4852
4872
  type: [
4853
4873
  "string",
4854
4874
  "null"
4855
4875
  ],
4856
- "default": null,
4857
- $ref: "#/definitions/CID"
4876
+ "default": null
4858
4877
  },
4859
4878
  cover_photo: {
4860
4879
  type: [
4861
4880
  "string",
4862
4881
  "null"
4863
4882
  ],
4864
- "default": null,
4865
- $ref: "#/definitions/CID"
4883
+ "default": null
4866
4884
  },
4867
4885
  cover_photo_sizes: {
4868
4886
  type: [
4869
4887
  "string",
4870
4888
  "null"
4871
4889
  ],
4872
- "default": null,
4873
- $ref: "#/definitions/CID"
4890
+ "default": null
4874
4891
  },
4875
4892
  bio: {
4876
4893
  type: [
@@ -5152,8 +5169,7 @@ var definitions = {
5152
5169
  "string",
5153
5170
  "null"
5154
5171
  ],
5155
- "default": null,
5156
- $ref: "#/definitions/CID"
5172
+ "default": null
5157
5173
  },
5158
5174
  description: {
5159
5175
  type: [
@@ -44420,7 +44436,8 @@ var Users = /*#__PURE__*/function (_Base) {
44420
44436
  return updateEntityManagerReplicaSet;
44421
44437
  }()
44422
44438
  /**
44423
- * Updates a creator (updates their data on the creator node)
44439
+ * Updates a creator (updates their data on the creator node).
44440
+ * DO NOT CALL FOR A STORAGEV2 USER (use updateMetadataV2 instead)
44424
44441
  */
44425
44442
 
44426
44443
  }, {