@audius/sdk 1.0.42 → 1.0.43
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/api/Account.d.ts +7 -7
- package/dist/api/Users.d.ts +9 -2
- package/dist/index.cjs.js +47 -37
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +47 -37
- package/dist/index.esm.js.map +1 -1
- package/dist/legacy.js +47 -37
- package/dist/legacy.js.map +1 -1
- package/dist/native-libs.js +47 -37
- package/dist/native-libs.js.map +1 -1
- package/package.json +2 -2
- package/src/api/Account.ts +5 -7
- package/src/api/Users.ts +6 -3
package/dist/native-libs.js
CHANGED
|
@@ -515,9 +515,9 @@ if (typeof window !== 'undefined' && window && window.Web3) {
|
|
|
515
515
|
var LibsWeb3 = Web3;
|
|
516
516
|
|
|
517
517
|
var name = "@audius/sdk";
|
|
518
|
-
var version = "1.0.
|
|
518
|
+
var version = "1.0.43";
|
|
519
519
|
var audius = {
|
|
520
|
-
releaseSHA: "
|
|
520
|
+
releaseSHA: "ec73ca0407b42e6ad140f9f6a6a5c48da8539be0"
|
|
521
521
|
};
|
|
522
522
|
var description = "";
|
|
523
523
|
var main = "dist/index.cjs.js";
|
|
@@ -42513,12 +42513,13 @@ var Account = /*#__PURE__*/function (_Base) {
|
|
|
42513
42513
|
generateRecoveryLink,
|
|
42514
42514
|
phases,
|
|
42515
42515
|
phase,
|
|
42516
|
-
userId,
|
|
42517
|
-
blockHash,
|
|
42518
|
-
blockNumber,
|
|
42519
42516
|
ownerWallet,
|
|
42517
|
+
_yield$this$User$crea,
|
|
42520
42518
|
newMetadata,
|
|
42519
|
+
blockHash,
|
|
42520
|
+
blockNumber,
|
|
42521
42521
|
_args4 = arguments;
|
|
42522
|
+
|
|
42522
42523
|
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
42523
42524
|
while (1) {
|
|
42524
42525
|
switch (_context4.prev = _context4.next) {
|
|
@@ -42645,16 +42646,22 @@ var Account = /*#__PURE__*/function (_Base) {
|
|
|
42645
42646
|
});
|
|
42646
42647
|
|
|
42647
42648
|
case 31:
|
|
42648
|
-
|
|
42649
|
-
|
|
42649
|
+
_yield$this$User$crea = _context4.sent;
|
|
42650
|
+
newMetadata = _yield$this$User$crea.newMetadata;
|
|
42651
|
+
blockHash = _yield$this$User$crea.blockHash;
|
|
42652
|
+
blockNumber = _yield$this$User$crea.blockNumber;
|
|
42653
|
+
_context4.next = 37;
|
|
42650
42654
|
return this.User.uploadProfileImages(profilePictureFile, coverPhotoFile, newMetadata);
|
|
42651
42655
|
|
|
42652
|
-
case
|
|
42653
|
-
_context4.
|
|
42654
|
-
|
|
42656
|
+
case 37:
|
|
42657
|
+
return _context4.abrupt("return", {
|
|
42658
|
+
blockHash: blockHash,
|
|
42659
|
+
blockNumber: blockNumber,
|
|
42660
|
+
userId: newMetadata.user_id
|
|
42661
|
+
});
|
|
42655
42662
|
|
|
42656
|
-
case
|
|
42657
|
-
_context4.prev =
|
|
42663
|
+
case 40:
|
|
42664
|
+
_context4.prev = 40;
|
|
42658
42665
|
_context4.t0 = _context4["catch"](10);
|
|
42659
42666
|
return _context4.abrupt("return", {
|
|
42660
42667
|
error: _context4.t0.message,
|
|
@@ -42662,19 +42669,12 @@ var Account = /*#__PURE__*/function (_Base) {
|
|
|
42662
42669
|
errorStatus: _context4.t0.response ? _context4.t0.response.status : null
|
|
42663
42670
|
});
|
|
42664
42671
|
|
|
42665
|
-
case
|
|
42666
|
-
return _context4.abrupt("return", {
|
|
42667
|
-
blockHash: blockHash,
|
|
42668
|
-
blockNumber: blockNumber,
|
|
42669
|
-
userId: userId
|
|
42670
|
-
});
|
|
42671
|
-
|
|
42672
|
-
case 40:
|
|
42672
|
+
case 43:
|
|
42673
42673
|
case "end":
|
|
42674
42674
|
return _context4.stop();
|
|
42675
42675
|
}
|
|
42676
42676
|
}
|
|
42677
|
-
}, _callee4, this, [[10,
|
|
42677
|
+
}, _callee4, this, [[10, 40]]);
|
|
42678
42678
|
}));
|
|
42679
42679
|
|
|
42680
42680
|
function signUp(_x3, _x4, _x5) {
|
|
@@ -44831,7 +44831,8 @@ var Users = /*#__PURE__*/function (_Base) {
|
|
|
44831
44831
|
var _createEntityManagerUser = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(_ref2) {
|
|
44832
44832
|
var _this2 = this;
|
|
44833
44833
|
|
|
44834
|
-
var metadata, phases, phase, logPrefix, fnStartMs, startMs, response, primary, secondaries, spIds, userId, manageEntityResponse, newMetadata, newContentNodeEndpoints, errorMsg;
|
|
44834
|
+
var metadata, phases, phase, logPrefix, fnStartMs, startMs, response, primary, secondaries, spIds, userId, manageEntityResponse, newMetadata, newContentNodeEndpoints, _yield$this$updateAnd, blockHash, blockNumber, errorMsg;
|
|
44835
|
+
|
|
44835
44836
|
return regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
44836
44837
|
while (1) {
|
|
44837
44838
|
switch (_context15.prev = _context15.next) {
|
|
@@ -44953,32 +44954,39 @@ var Users = /*#__PURE__*/function (_Base) {
|
|
|
44953
44954
|
});
|
|
44954
44955
|
|
|
44955
44956
|
case 42:
|
|
44957
|
+
_yield$this$updateAnd = _context15.sent;
|
|
44958
|
+
blockHash = _yield$this$updateAnd.blockHash;
|
|
44959
|
+
blockNumber = _yield$this$updateAnd.blockNumber;
|
|
44956
44960
|
console.log("".concat(logPrefix, " [phase: ").concat(phase, "] updateAndUploadMetadata() completed in ").concat(Date.now() - startMs, "ms"));
|
|
44957
44961
|
console.log("".concat(logPrefix, " completed in ").concat(Date.now() - fnStartMs, "ms"));
|
|
44958
|
-
return _context15.abrupt("return",
|
|
44962
|
+
return _context15.abrupt("return", {
|
|
44963
|
+
newMetadata: newMetadata,
|
|
44964
|
+
blockHash: blockHash,
|
|
44965
|
+
blockNumber: blockNumber
|
|
44966
|
+
});
|
|
44959
44967
|
|
|
44960
|
-
case
|
|
44961
|
-
_context15.prev =
|
|
44968
|
+
case 50:
|
|
44969
|
+
_context15.prev = 50;
|
|
44962
44970
|
_context15.t0 = _context15["catch"](7);
|
|
44963
44971
|
errorMsg = "assignReplicaSet() Error -- Phase ".concat(phase, " in ").concat(Date.now() - fnStartMs, "ms: ").concat(_context15.t0);
|
|
44964
44972
|
|
|
44965
44973
|
if (!(_context15.t0 instanceof Error)) {
|
|
44966
|
-
_context15.next =
|
|
44974
|
+
_context15.next = 56;
|
|
44967
44975
|
break;
|
|
44968
44976
|
}
|
|
44969
44977
|
|
|
44970
44978
|
_context15.t0.message = errorMsg;
|
|
44971
44979
|
throw _context15.t0;
|
|
44972
44980
|
|
|
44973
|
-
case
|
|
44981
|
+
case 56:
|
|
44974
44982
|
throw new Error(errorMsg);
|
|
44975
44983
|
|
|
44976
|
-
case
|
|
44984
|
+
case 57:
|
|
44977
44985
|
case "end":
|
|
44978
44986
|
return _context15.stop();
|
|
44979
44987
|
}
|
|
44980
44988
|
}
|
|
44981
|
-
}, _callee15, this, [[7,
|
|
44989
|
+
}, _callee15, this, [[7, 50]]);
|
|
44982
44990
|
}));
|
|
44983
44991
|
|
|
44984
44992
|
function createEntityManagerUser(_x13) {
|
|
@@ -45561,32 +45569,34 @@ var Users = /*#__PURE__*/function (_Base) {
|
|
|
45561
45569
|
|
|
45562
45570
|
this.userStateManager.setCurrentUser(_objectSpread2(_objectSpread2({}, oldMetadata), newMetadata));
|
|
45563
45571
|
console.log("".concat(logPrefix, " completed in ").concat(Date.now() - fnStartMs, "ms"));
|
|
45564
|
-
_context25.
|
|
45565
|
-
|
|
45572
|
+
return _context25.abrupt("return", {
|
|
45573
|
+
blockHash: txReceipt.blockHash,
|
|
45574
|
+
blockNumber: blockNumber
|
|
45575
|
+
});
|
|
45566
45576
|
|
|
45567
|
-
case
|
|
45568
|
-
_context25.prev =
|
|
45577
|
+
case 53:
|
|
45578
|
+
_context25.prev = 53;
|
|
45569
45579
|
_context25.t0 = _context25["catch"](13);
|
|
45570
45580
|
// TODO: think about handling the update metadata on chain and associating..
|
|
45571
45581
|
errorMsg = "updateAndUploadMetadata() Error -- Phase ".concat(phase, " in ").concat(Date.now() - fnStartMs, "ms: ").concat(_context25.t0);
|
|
45572
45582
|
|
|
45573
45583
|
if (!(_context25.t0 instanceof Error)) {
|
|
45574
|
-
_context25.next =
|
|
45584
|
+
_context25.next = 59;
|
|
45575
45585
|
break;
|
|
45576
45586
|
}
|
|
45577
45587
|
|
|
45578
45588
|
_context25.t0.message = errorMsg;
|
|
45579
45589
|
throw _context25.t0;
|
|
45580
45590
|
|
|
45581
|
-
case
|
|
45591
|
+
case 59:
|
|
45582
45592
|
throw new Error(errorMsg);
|
|
45583
45593
|
|
|
45584
|
-
case
|
|
45594
|
+
case 60:
|
|
45585
45595
|
case "end":
|
|
45586
45596
|
return _context25.stop();
|
|
45587
45597
|
}
|
|
45588
45598
|
}
|
|
45589
|
-
}, _callee25, this, [[13,
|
|
45599
|
+
}, _callee25, this, [[13, 53]]);
|
|
45590
45600
|
}));
|
|
45591
45601
|
|
|
45592
45602
|
function updateAndUploadMetadata(_x27) {
|