@audius/sdk 1.0.16 → 1.0.18

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.
@@ -514,9 +514,9 @@ if (typeof window !== 'undefined' && window && window.Web3) {
514
514
  var LibsWeb3 = Web3;
515
515
 
516
516
  var name = "@audius/sdk";
517
- var version = "1.0.16";
517
+ var version = "1.0.18";
518
518
  var audius = {
519
- releaseSHA: "e0b7ce2e170d45ba8be2a30623688bd77cf6b4b4"
519
+ releaseSHA: "cc52bcb636e5a70a3e50f6fe3b7eccc8f1f0c479"
520
520
  };
521
521
  var description = "";
522
522
  var main = "dist/index.cjs.js";
@@ -647,7 +647,7 @@ var devDependencies = {
647
647
  };
648
648
  var repository = {
649
649
  type: "git",
650
- url: "git+https://github.com/AudiusProject/audius-protocol/tree/master/libs"
650
+ url: "git+https://github.com/AudiusProject/audius-protocol/tree/main/libs"
651
651
  };
652
652
  var engines = {
653
653
  node: ">=14.0.0"
@@ -657,7 +657,7 @@ var license = "Apache-2.0";
657
657
  var bugs = {
658
658
  url: "https://github.com/AudiusProject/audius-protocol/issues"
659
659
  };
660
- var homepage = "https://github.com/AudiusProject/audius-protocol/tree/master/libs";
660
+ var homepage = "https://github.com/AudiusProject/audius-protocol/tree/main/libs";
661
661
  var require$$0 = {
662
662
  name: name,
663
663
  version: version,
@@ -3169,7 +3169,10 @@ var definitions$2 = {
3169
3169
  title: "CID"
3170
3170
  },
3171
3171
  PremiumConditions: {
3172
- type: "object",
3172
+ type: [
3173
+ "object",
3174
+ "null"
3175
+ ],
3173
3176
  additionalProperties: false,
3174
3177
  properties: {
3175
3178
  nft_collection: {
@@ -31448,7 +31451,7 @@ var EthContracts = /*#__PURE__*/function () {
31448
31451
  /**
31449
31452
  * Converts a BN to a Uint8Array of length 8, in little endian notation.
31450
31453
  * Useful for when Rust wants a u64 (8 * 8) represented as a byte array.
31451
- * Ex: https://github.com/AudiusProject/audius-protocol/blob/master/solana-programs/reward-manager/program/src/processor.rs#L389
31454
+ * Ex: https://github.com/AudiusProject/audius-protocol/blob/main/solana-programs/reward-manager/program/src/processor.rs#L389
31452
31455
  */
31453
31456
  var padBNToUint8Array = function padBNToUint8Array(bn) {
31454
31457
  return bn.toArray('le', 8);
@@ -48136,17 +48139,18 @@ var File = /*#__PURE__*/function (_Base) {
48136
48139
 
48137
48140
  var _super = _createSuper(File);
48138
48141
 
48139
- function File(user) {
48142
+ function File(user, serviceProvider) {
48140
48143
  var _this;
48141
48144
 
48142
48145
  _classCallCheck(this, File);
48143
48146
 
48144
- for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
48145
- args[_key - 1] = arguments[_key];
48147
+ for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
48148
+ args[_key - 2] = arguments[_key];
48146
48149
  }
48147
48150
 
48148
48151
  _this = _super.call.apply(_super, [this].concat(args));
48149
48152
  _this.User = user;
48153
+ _this.ServiceProvider = serviceProvider;
48150
48154
  return _this;
48151
48155
  }
48152
48156
  /**
@@ -48162,21 +48166,86 @@ var File = /*#__PURE__*/function (_Base) {
48162
48166
  _createClass(File, [{
48163
48167
  key: "fetchCID",
48164
48168
  value: function () {
48165
- var _fetchCID = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(cid, creatorNodeGateways) {
48169
+ var _fetchCID = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(cid, creatorNodeGateways) {
48170
+ var callback,
48171
+ responseType,
48172
+ trackId,
48173
+ premiumContentHeaders,
48174
+ replicaSetAttempt,
48175
+ allCreatorNodes,
48176
+ allCreatorNodeEndpoints,
48177
+ allNodesAttempt,
48178
+ _args = arguments;
48179
+ return regeneratorRuntime.wrap(function _callee$(_context) {
48180
+ while (1) {
48181
+ switch (_context.prev = _context.next) {
48182
+ case 0:
48183
+ callback = _args.length > 2 && _args[2] !== undefined ? _args[2] : null;
48184
+ responseType = _args.length > 3 && _args[3] !== undefined ? _args[3] : 'blob';
48185
+ trackId = _args.length > 4 && _args[4] !== undefined ? _args[4] : null;
48186
+ premiumContentHeaders = _args.length > 5 && _args[5] !== undefined ? _args[5] : {};
48187
+ _context.prev = 4;
48188
+ _context.next = 7;
48189
+ return this.fetchCIDInternal(cid, creatorNodeGateways, callback, responseType, trackId, premiumContentHeaders);
48190
+
48191
+ case 7:
48192
+ replicaSetAttempt = _context.sent;
48193
+ return _context.abrupt("return", replicaSetAttempt);
48194
+
48195
+ case 11:
48196
+ _context.prev = 11;
48197
+ _context.t0 = _context["catch"](4);
48198
+ // In the case we can't find the CID from anywhere in the user's replica set,
48199
+ // retry the whole network
48200
+ console.error(_context.t0);
48201
+ _context.next = 16;
48202
+ return this.ServiceProvider.listCreatorNodes();
48203
+
48204
+ case 16:
48205
+ allCreatorNodes = _context.sent;
48206
+ allCreatorNodeEndpoints = allCreatorNodes.map(function (node) {
48207
+ return urlJoin(node.endpoint, 'ipfs');
48208
+ }); // Re-throw whatever error might happen here
48209
+
48210
+ _context.next = 20;
48211
+ return this.fetchCIDInternal(cid, allCreatorNodeEndpoints, callback, responseType, trackId, premiumContentHeaders);
48212
+
48213
+ case 20:
48214
+ allNodesAttempt = _context.sent;
48215
+ return _context.abrupt("return", allNodesAttempt);
48216
+
48217
+ case 22:
48218
+ case "end":
48219
+ return _context.stop();
48220
+ }
48221
+ }
48222
+ }, _callee, this, [[4, 11]]);
48223
+ }));
48224
+
48225
+ function fetchCID(_x, _x2) {
48226
+ return _fetchCID.apply(this, arguments);
48227
+ }
48228
+
48229
+ return fetchCID;
48230
+ }()
48231
+ }, {
48232
+ key: "fetchCIDInternal",
48233
+ value: function () {
48234
+ var _fetchCIDInternal = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(cid, creatorNodeGateways) {
48166
48235
  var callback,
48167
48236
  responseType,
48168
48237
  trackId,
48169
48238
  premiumContentHeaders,
48170
48239
  urls,
48171
- _args2 = arguments;
48172
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
48240
+ _args3 = arguments;
48241
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
48173
48242
  while (1) {
48174
- switch (_context2.prev = _context2.next) {
48243
+ switch (_context3.prev = _context3.next) {
48175
48244
  case 0:
48176
- callback = _args2.length > 2 && _args2[2] !== undefined ? _args2[2] : null;
48177
- responseType = _args2.length > 3 && _args2[3] !== undefined ? _args2[3] : 'blob';
48178
- trackId = _args2.length > 4 && _args2[4] !== undefined ? _args2[4] : null;
48179
- premiumContentHeaders = _args2.length > 5 && _args2[5] !== undefined ? _args2[5] : {};
48245
+ callback = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : null;
48246
+ responseType = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : 'blob';
48247
+ trackId = _args3.length > 4 && _args3[4] !== undefined ? _args3[4] : null;
48248
+ premiumContentHeaders = _args3.length > 5 && _args3[5] !== undefined ? _args3[5] : {};
48180
48249
  urls = [];
48181
48250
  creatorNodeGateways.forEach(function (gateway) {
48182
48251
  var gatewayWithCid = urlJoin(gateway, cid);
@@ -48187,17 +48256,17 @@ var File = /*#__PURE__*/function (_Base) {
48187
48256
  });
48188
48257
  urls.push(gatewayWithCid);
48189
48258
  });
48190
- _context2.next = 8;
48259
+ _context3.next = 8;
48191
48260
  return retry( /*#__PURE__*/function () {
48192
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(bail) {
48261
+ var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(bail) {
48193
48262
  var _yield$raceRequests, response, errored, allForbidden, legacyUrls, _yield$raceRequests2, _response;
48194
48263
 
48195
- return regeneratorRuntime.wrap(function _callee$(_context) {
48264
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
48196
48265
  while (1) {
48197
- switch (_context.prev = _context.next) {
48266
+ switch (_context2.prev = _context2.next) {
48198
48267
  case 0:
48199
- _context.prev = 0;
48200
- _context.next = 3;
48268
+ _context2.prev = 0;
48269
+ _context2.next = 3;
48201
48270
  return raceRequests(urls, callback, _objectSpread2({
48202
48271
  method: 'get',
48203
48272
  responseType: responseType
@@ -48206,12 +48275,12 @@ var File = /*#__PURE__*/function (_Base) {
48206
48275
  null);
48207
48276
 
48208
48277
  case 3:
48209
- _yield$raceRequests = _context.sent;
48278
+ _yield$raceRequests = _context2.sent;
48210
48279
  response = _yield$raceRequests.response;
48211
48280
  errored = _yield$raceRequests.errored;
48212
48281
 
48213
48282
  if (response) {
48214
- _context.next = 12;
48283
+ _context2.next = 12;
48215
48284
  break;
48216
48285
  }
48217
48286
 
@@ -48221,26 +48290,26 @@ var File = /*#__PURE__*/function (_Base) {
48221
48290
  });
48222
48291
 
48223
48292
  if (!allForbidden) {
48224
- _context.next = 11;
48293
+ _context2.next = 11;
48225
48294
  break;
48226
48295
  }
48227
48296
 
48228
48297
  // In the case for a 403, do not retry fetching
48229
48298
  bail(new Error('Forbidden'));
48230
- return _context.abrupt("return");
48299
+ return _context2.abrupt("return");
48231
48300
 
48232
48301
  case 11:
48233
48302
  throw new Error("Could not fetch ".concat(cid));
48234
48303
 
48235
48304
  case 12:
48236
- return _context.abrupt("return", response);
48305
+ return _context2.abrupt("return", response);
48237
48306
 
48238
48307
  case 15:
48239
- _context.prev = 15;
48240
- _context.t0 = _context["catch"](0);
48308
+ _context2.prev = 15;
48309
+ _context2.t0 = _context2["catch"](0);
48241
48310
 
48242
48311
  if (!cid.includes('/')) {
48243
- _context.next = 33;
48312
+ _context2.next = 33;
48244
48313
  break;
48245
48314
  }
48246
48315
 
@@ -48253,8 +48322,8 @@ var File = /*#__PURE__*/function (_Base) {
48253
48322
  legacyUrls = creatorNodeGateways.map(function (gateway) {
48254
48323
  return urlJoin(gateway, cid.split('/')[0]);
48255
48324
  });
48256
- _context.prev = 20;
48257
- _context.next = 23;
48325
+ _context2.prev = 20;
48326
+ _context2.next = 23;
48258
48327
  return raceRequests(legacyUrls, callback, _objectSpread2({
48259
48328
  method: 'get',
48260
48329
  responseType: responseType
@@ -48263,22 +48332,22 @@ var File = /*#__PURE__*/function (_Base) {
48263
48332
  null);
48264
48333
 
48265
48334
  case 23:
48266
- _yield$raceRequests2 = _context.sent;
48335
+ _yield$raceRequests2 = _context2.sent;
48267
48336
  _response = _yield$raceRequests2.response;
48268
48337
 
48269
48338
  if (_response) {
48270
- _context.next = 27;
48339
+ _context2.next = 27;
48271
48340
  break;
48272
48341
  }
48273
48342
 
48274
48343
  throw new Error("Could not fetch ".concat(cid, " via legacy method"));
48275
48344
 
48276
48345
  case 27:
48277
- return _context.abrupt("return", _response);
48346
+ return _context2.abrupt("return", _response);
48278
48347
 
48279
48348
  case 30:
48280
- _context.prev = 30;
48281
- _context.t1 = _context["catch"](20);
48349
+ _context2.prev = 30;
48350
+ _context2.t1 = _context2["catch"](20);
48282
48351
  throw new Error("Failed to retrieve ".concat(cid, " by legacy method"));
48283
48352
 
48284
48353
  case 33:
@@ -48286,20 +48355,20 @@ var File = /*#__PURE__*/function (_Base) {
48286
48355
 
48287
48356
  case 34:
48288
48357
  case "end":
48289
- return _context.stop();
48358
+ return _context2.stop();
48290
48359
  }
48291
48360
  }
48292
- }, _callee, null, [[0, 15], [20, 30]]);
48361
+ }, _callee2, null, [[0, 15], [20, 30]]);
48293
48362
  }));
48294
48363
 
48295
- return function (_x3) {
48364
+ return function (_x5) {
48296
48365
  return _ref.apply(this, arguments);
48297
48366
  };
48298
48367
  }(), {
48299
48368
  minTimeout: 500,
48300
48369
  maxTimeout: 4000,
48301
48370
  factor: 3,
48302
- retries: 5,
48371
+ retries: 3,
48303
48372
  onRetry: function onRetry(err, i) {
48304
48373
  // eslint-disable-next-line no-console
48305
48374
  console.log("FetchCID attempt ".concat(i, " error: ").concat(err));
@@ -48307,21 +48376,21 @@ var File = /*#__PURE__*/function (_Base) {
48307
48376
  });
48308
48377
 
48309
48378
  case 8:
48310
- return _context2.abrupt("return", _context2.sent);
48379
+ return _context3.abrupt("return", _context3.sent);
48311
48380
 
48312
48381
  case 9:
48313
48382
  case "end":
48314
- return _context2.stop();
48383
+ return _context3.stop();
48315
48384
  }
48316
48385
  }
48317
- }, _callee2);
48386
+ }, _callee3);
48318
48387
  }));
48319
48388
 
48320
- function fetchCID(_x, _x2) {
48321
- return _fetchCID.apply(this, arguments);
48389
+ function fetchCIDInternal(_x3, _x4) {
48390
+ return _fetchCIDInternal.apply(this, arguments);
48322
48391
  }
48323
48392
 
48324
- return fetchCID;
48393
+ return fetchCIDInternal;
48325
48394
  }()
48326
48395
  /**
48327
48396
  * Fetches a file from Content Node with a given CID. Follows the same pattern
@@ -48335,12 +48404,12 @@ var File = /*#__PURE__*/function (_Base) {
48335
48404
  }, {
48336
48405
  key: "downloadCID",
48337
48406
  value: function () {
48338
- var _downloadCID = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(cid, creatorNodeGateways, filename) {
48407
+ var _downloadCID = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(cid, creatorNodeGateways, filename) {
48339
48408
  var urls, _yield$raceRequests3, response;
48340
48409
 
48341
- return regeneratorRuntime.wrap(function _callee3$(_context3) {
48410
+ return regeneratorRuntime.wrap(function _callee4$(_context4) {
48342
48411
  while (1) {
48343
- switch (_context3.prev = _context3.next) {
48412
+ switch (_context4.prev = _context4.next) {
48344
48413
  case 0:
48345
48414
  urls = creatorNodeGateways.map(function (gateway) {
48346
48415
  return urlJoin(gateway, cid, {
@@ -48349,8 +48418,8 @@ var File = /*#__PURE__*/function (_Base) {
48349
48418
  }
48350
48419
  });
48351
48420
  });
48352
- _context3.prev = 1;
48353
- _context3.next = 4;
48421
+ _context4.prev = 1;
48422
+ _context4.next = 4;
48354
48423
  return raceRequests(urls, function (url) {
48355
48424
  return downloadURL(url, filename);
48356
48425
  }, {
@@ -48360,24 +48429,24 @@ var File = /*#__PURE__*/function (_Base) {
48360
48429
  10000);
48361
48430
 
48362
48431
  case 4:
48363
- _yield$raceRequests3 = _context3.sent;
48432
+ _yield$raceRequests3 = _context4.sent;
48364
48433
  response = _yield$raceRequests3.response;
48365
- return _context3.abrupt("return", response);
48434
+ return _context4.abrupt("return", response);
48366
48435
 
48367
48436
  case 9:
48368
- _context3.prev = 9;
48369
- _context3.t0 = _context3["catch"](1);
48437
+ _context4.prev = 9;
48438
+ _context4.t0 = _context4["catch"](1);
48370
48439
  throw new Error("Failed to retrieve ".concat(cid));
48371
48440
 
48372
48441
  case 12:
48373
48442
  case "end":
48374
- return _context3.stop();
48443
+ return _context4.stop();
48375
48444
  }
48376
48445
  }
48377
- }, _callee3, null, [[1, 9]]);
48446
+ }, _callee4, null, [[1, 9]]);
48378
48447
  }));
48379
48448
 
48380
- function downloadCID(_x4, _x5, _x6) {
48449
+ function downloadCID(_x6, _x7, _x8) {
48381
48450
  return _downloadCID.apply(this, arguments);
48382
48451
  }
48383
48452
 
@@ -48393,66 +48462,66 @@ var File = /*#__PURE__*/function (_Base) {
48393
48462
  }, {
48394
48463
  key: "checkIfCidAvailable",
48395
48464
  value: function () {
48396
- var _checkIfCidAvailable = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(cid, creatorNodeGateways) {
48465
+ var _checkIfCidAvailable = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(cid, creatorNodeGateways) {
48397
48466
  var exists;
48398
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
48467
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
48399
48468
  while (1) {
48400
- switch (_context5.prev = _context5.next) {
48469
+ switch (_context6.prev = _context6.next) {
48401
48470
  case 0:
48402
48471
  exists = {};
48403
- _context5.next = 3;
48472
+ _context6.next = 3;
48404
48473
  return Promise.all(creatorNodeGateways.map( /*#__PURE__*/function () {
48405
- var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(gateway) {
48474
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(gateway) {
48406
48475
  var _yield$axios, status;
48407
48476
 
48408
- return regeneratorRuntime.wrap(function _callee4$(_context4) {
48477
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
48409
48478
  while (1) {
48410
- switch (_context4.prev = _context4.next) {
48479
+ switch (_context5.prev = _context5.next) {
48411
48480
  case 0:
48412
- _context4.prev = 0;
48413
- _context4.next = 3;
48481
+ _context5.prev = 0;
48482
+ _context5.next = 3;
48414
48483
  return axios({
48415
48484
  url: urlJoin(gateway, cid),
48416
48485
  method: 'head'
48417
48486
  });
48418
48487
 
48419
48488
  case 3:
48420
- _yield$axios = _context4.sent;
48489
+ _yield$axios = _context5.sent;
48421
48490
  status = _yield$axios.status;
48422
48491
  exists[gateway] = status === 200;
48423
- _context4.next = 11;
48492
+ _context5.next = 11;
48424
48493
  break;
48425
48494
 
48426
48495
  case 8:
48427
- _context4.prev = 8;
48428
- _context4.t0 = _context4["catch"](0);
48496
+ _context5.prev = 8;
48497
+ _context5.t0 = _context5["catch"](0);
48429
48498
  exists[gateway] = false;
48430
48499
 
48431
48500
  case 11:
48432
48501
  case "end":
48433
- return _context4.stop();
48502
+ return _context5.stop();
48434
48503
  }
48435
48504
  }
48436
- }, _callee4, null, [[0, 8]]);
48505
+ }, _callee5, null, [[0, 8]]);
48437
48506
  }));
48438
48507
 
48439
- return function (_x9) {
48508
+ return function (_x11) {
48440
48509
  return _ref2.apply(this, arguments);
48441
48510
  };
48442
48511
  }()));
48443
48512
 
48444
48513
  case 3:
48445
- return _context5.abrupt("return", exists);
48514
+ return _context6.abrupt("return", exists);
48446
48515
 
48447
48516
  case 4:
48448
48517
  case "end":
48449
- return _context5.stop();
48518
+ return _context6.stop();
48450
48519
  }
48451
48520
  }
48452
- }, _callee5);
48521
+ }, _callee6);
48453
48522
  }));
48454
48523
 
48455
- function checkIfCidAvailable(_x7, _x8) {
48524
+ function checkIfCidAvailable(_x9, _x10) {
48456
48525
  return _checkIfCidAvailable.apply(this, arguments);
48457
48526
  }
48458
48527
 
@@ -48466,40 +48535,40 @@ var File = /*#__PURE__*/function (_Base) {
48466
48535
  }, {
48467
48536
  key: "uploadImage",
48468
48537
  value: function () {
48469
- var _uploadImage = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(file, square) {
48538
+ var _uploadImage = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(file, square) {
48470
48539
  var timeoutMs,
48471
48540
  resp,
48472
- _args6 = arguments;
48473
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
48541
+ _args7 = arguments;
48542
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
48474
48543
  while (1) {
48475
- switch (_context6.prev = _context6.next) {
48544
+ switch (_context7.prev = _context7.next) {
48476
48545
  case 0:
48477
- timeoutMs = _args6.length > 2 && _args6[2] !== undefined ? _args6[2] : null;
48546
+ timeoutMs = _args7.length > 2 && _args7[2] !== undefined ? _args7[2] : null;
48478
48547
  this.REQUIRES(Services.CREATOR_NODE);
48479
48548
  this.FILE_IS_VALID(file); // Assign a creator_node_endpoint to the user if necessary
48480
48549
 
48481
- _context6.next = 5;
48550
+ _context7.next = 5;
48482
48551
  return this.User.assignReplicaSetIfNecessary();
48483
48552
 
48484
48553
  case 5:
48485
- _context6.next = 7;
48554
+ _context7.next = 7;
48486
48555
  return this.creatorNode.uploadImage(file, square,
48487
48556
  /* onProgress */
48488
48557
  undefined, timeoutMs);
48489
48558
 
48490
48559
  case 7:
48491
- resp = _context6.sent;
48492
- return _context6.abrupt("return", resp);
48560
+ resp = _context7.sent;
48561
+ return _context7.abrupt("return", resp);
48493
48562
 
48494
48563
  case 9:
48495
48564
  case "end":
48496
- return _context6.stop();
48565
+ return _context7.stop();
48497
48566
  }
48498
48567
  }
48499
- }, _callee6, this);
48568
+ }, _callee7, this);
48500
48569
  }));
48501
48570
 
48502
- function uploadImage(_x10, _x11) {
48571
+ function uploadImage(_x12, _x13) {
48503
48572
  return _uploadImage.apply(this, arguments);
48504
48573
  }
48505
48574
 
@@ -50020,7 +50089,7 @@ var AudiusLibs = /*#__PURE__*/function () {
50020
50089
  this.Account = _construct(Account, [this.User].concat(services));
50021
50090
  this.Track = _construct(Track, services);
50022
50091
  this.Playlist = _construct(Playlists, services);
50023
- this.File = _construct(File, [this.User].concat(services));
50092
+ this.File = _construct(File, [this.User, this.ServiceProvider].concat(services));
50024
50093
  this.Rewards = _construct(Rewards, [this.ServiceProvider].concat(services));
50025
50094
  this.Reactions = _construct(Reactions, services);
50026
50095
  this.EntityManager = _construct(EntityManager, services);