@eluvio/elv-client-js 4.0.136 → 4.0.138
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/ElvClient-min.js +14 -15
- package/dist/ElvClient-node-min.js +13 -14
- package/dist/ElvFrameClient-min.js +10 -10
- package/dist/ElvPermissionsClient-min.js +9 -9
- package/dist/ElvWalletClient-min.js +14 -15
- package/dist/ElvWalletClient-node-min.js +13 -14
- package/dist/src/AuthorizationClient.js +12 -9
- package/dist/src/ContentObjectAudit.js +3 -3
- package/dist/src/ContentObjectVerification.js +3 -3
- package/dist/src/Crypto.js +2 -2
- package/dist/src/ElvClient.js +397 -522
- package/dist/src/ElvWallet.js +5 -7
- package/dist/src/EthClient.js +9 -8
- package/dist/src/FrameClient.js +10 -9
- package/dist/src/HttpClient.js +5 -5
- package/dist/src/Id.js +2 -1
- package/dist/src/PermissionsClient.js +19 -31
- package/dist/src/RemoteSigner.js +11 -10
- package/dist/src/UserProfileClient.js +20 -35
- package/dist/src/Utils.js +3 -2
- package/dist/src/client/ABRPublishing.js +196 -342
- package/dist/src/client/AccessGroups.js +2 -2
- package/dist/src/client/ContentAccess.js +12 -8
- package/dist/src/client/ContentManagement.js +83 -99
- package/dist/src/client/Contracts.js +2 -2
- package/dist/src/client/Files.js +2 -2
- package/dist/src/client/LiveConf.js +26 -43
- package/dist/src/client/LiveStream.js +63 -65
- package/dist/src/client/NFT.js +2 -2
- package/dist/src/client/Shares.js +24 -47
- package/dist/src/walletClient/ClientMethods.js +2 -2
- package/dist/src/walletClient/Profile.js +2 -2
- package/dist/src/walletClient/Utils.js +2 -2
- package/dist/src/walletClient/index.js +50 -65
- package/package.json +1 -1
- package/src/AuthorizationClient.js +2 -1
- package/src/ElvClient.js +2 -0
- package/src/EthClient.js +1 -1
- package/src/client/ABRPublishing.js +1 -1
- package/src/client/ContentAccess.js +30 -71
- package/src/walletClient/index.js +10 -6
|
@@ -62,7 +62,7 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
62
62
|
this.walletAddress = undefined;
|
|
63
63
|
this.walletAddressRetrieved = false;
|
|
64
64
|
}
|
|
65
|
-
|
|
65
|
+
_createClass(UserProfileClient, [{
|
|
66
66
|
key: "Log",
|
|
67
67
|
value: function Log(message) {
|
|
68
68
|
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -202,7 +202,7 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
202
202
|
*/
|
|
203
203
|
}, {
|
|
204
204
|
key: "WalletAddress",
|
|
205
|
-
value:
|
|
205
|
+
value: function () {
|
|
206
206
|
var _WalletAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
207
207
|
var autoCreate,
|
|
208
208
|
walletAddress,
|
|
@@ -259,10 +259,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
259
259
|
*
|
|
260
260
|
* @return {Promise<string>} - The wallet address of the specified user, if it exists
|
|
261
261
|
*/
|
|
262
|
-
)
|
|
263
262
|
}, {
|
|
264
263
|
key: "UserWalletAddress",
|
|
265
|
-
value:
|
|
264
|
+
value: function () {
|
|
266
265
|
var _UserWalletAddress = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref2) {
|
|
267
266
|
var address, walletAddress;
|
|
268
267
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -316,10 +315,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
316
315
|
*
|
|
317
316
|
* @return {Promise<{Object}>} - An object containing the libraryId and objectId for the wallet object.
|
|
318
317
|
*/
|
|
319
|
-
)
|
|
320
318
|
}, {
|
|
321
319
|
key: "UserWalletObjectInfo",
|
|
322
|
-
value:
|
|
320
|
+
value: function () {
|
|
323
321
|
var _UserWalletObjectInfo = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
324
322
|
var _ref3,
|
|
325
323
|
address,
|
|
@@ -391,10 +389,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
391
389
|
*
|
|
392
390
|
* @return {Promise<Object|string>}
|
|
393
391
|
*/
|
|
394
|
-
)
|
|
395
392
|
}, {
|
|
396
393
|
key: "PublicUserMetadata",
|
|
397
|
-
value:
|
|
394
|
+
value: function () {
|
|
398
395
|
var _PublicUserMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref4) {
|
|
399
396
|
var address, _ref4$metadataSubtree, metadataSubtree, _ref4$queryParams, queryParams, _ref4$select, select, _ref4$resolveLinks, resolveLinks, _ref4$resolveIncludeS, resolveIncludeSource, _ref4$resolveIgnoreEr, resolveIgnoreErrors, _ref4$linkDepthLimit, linkDepthLimit, walletAddress, _yield$this$UserWalle, libraryId, objectId;
|
|
400
397
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
@@ -490,10 +487,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
490
487
|
*
|
|
491
488
|
* @return {Promise<Object|string>} - The user's profile metadata - returns undefined if no metadata set or subtree doesn't exist
|
|
492
489
|
*/
|
|
493
|
-
)
|
|
494
490
|
}, {
|
|
495
491
|
key: "UserMetadata",
|
|
496
|
-
value:
|
|
492
|
+
value: function () {
|
|
497
493
|
var _UserMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6() {
|
|
498
494
|
var _ref5,
|
|
499
495
|
_ref5$metadataSubtree,
|
|
@@ -557,10 +553,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
557
553
|
* @param {Object} metadata - New metadata
|
|
558
554
|
* @param {string=} metadataSubtree - Subtree to merge into - modifies root metadata if not specified
|
|
559
555
|
*/
|
|
560
|
-
)
|
|
561
556
|
}, {
|
|
562
557
|
key: "MergeUserMetadata",
|
|
563
|
-
value:
|
|
558
|
+
value: function () {
|
|
564
559
|
var _MergeUserMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref6) {
|
|
565
560
|
var _ref6$metadataSubtree, metadataSubtree, _ref6$metadata, metadata, _yield$this$UserWalle3, libraryId, objectId, editRequest;
|
|
566
561
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
@@ -615,10 +610,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
615
610
|
* @param {Object} metadata - New metadata
|
|
616
611
|
* @param {string=} metadataSubtree - Subtree to replace - modifies root metadata if not specified
|
|
617
612
|
*/
|
|
618
|
-
)
|
|
619
613
|
}, {
|
|
620
614
|
key: "ReplaceUserMetadata",
|
|
621
|
-
value:
|
|
615
|
+
value: function () {
|
|
622
616
|
var _ReplaceUserMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref7) {
|
|
623
617
|
var _ref7$metadataSubtree, metadataSubtree, _ref7$metadata, metadata, _yield$this$UserWalle4, libraryId, objectId, editRequest;
|
|
624
618
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
@@ -672,10 +666,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
672
666
|
* @namedParams
|
|
673
667
|
* @param {string=} metadataSubtree - Subtree to delete - deletes all metadata if not specified
|
|
674
668
|
*/
|
|
675
|
-
)
|
|
676
669
|
}, {
|
|
677
670
|
key: "DeleteUserMetadata",
|
|
678
|
-
value:
|
|
671
|
+
value: function () {
|
|
679
672
|
var _DeleteUserMetadata = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref8) {
|
|
680
673
|
var _ref8$metadataSubtree, metadataSubtree, _yield$this$UserWalle5, libraryId, objectId, editRequest;
|
|
681
674
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
@@ -731,10 +724,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
731
724
|
*
|
|
732
725
|
* @return {Promise<string>} - Access setting
|
|
733
726
|
*/
|
|
734
|
-
)
|
|
735
727
|
}, {
|
|
736
728
|
key: "AccessLevel",
|
|
737
|
-
value:
|
|
729
|
+
value: function () {
|
|
738
730
|
var _AccessLevel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {
|
|
739
731
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
740
732
|
while (1) switch (_context10.prev = _context10.next) {
|
|
@@ -771,10 +763,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
771
763
|
* @namedParams
|
|
772
764
|
* @param level
|
|
773
765
|
*/
|
|
774
|
-
)
|
|
775
766
|
}, {
|
|
776
767
|
key: "SetAccessLevel",
|
|
777
|
-
value:
|
|
768
|
+
value: function () {
|
|
778
769
|
var _SetAccessLevel = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(_ref9) {
|
|
779
770
|
var level;
|
|
780
771
|
return _regeneratorRuntime.wrap(function _callee11$(_context11) {
|
|
@@ -809,10 +800,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
809
800
|
*
|
|
810
801
|
* @return {Promise<string>} - Tenant ID
|
|
811
802
|
*/
|
|
812
|
-
)
|
|
813
803
|
}, {
|
|
814
804
|
key: "TenantId",
|
|
815
|
-
value:
|
|
805
|
+
value: function () {
|
|
816
806
|
var _TenantId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12() {
|
|
817
807
|
var _yield$this$UserWalle6, objectId;
|
|
818
808
|
return _regeneratorRuntime.wrap(function _callee12$(_context12) {
|
|
@@ -855,10 +845,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
855
845
|
* @param {string} id - The tenant ID in hash format
|
|
856
846
|
* @param {string} address - The group address to use in the hash if id is not provided
|
|
857
847
|
*/
|
|
858
|
-
)
|
|
859
848
|
}, {
|
|
860
849
|
key: "SetTenantId",
|
|
861
|
-
value:
|
|
850
|
+
value: function () {
|
|
862
851
|
var _SetTenantId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref10) {
|
|
863
852
|
var id, address, _yield$this$UserWalle7, objectId, tenantInfo;
|
|
864
853
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
@@ -913,10 +902,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
913
902
|
*
|
|
914
903
|
* @return {Promise<string>} - Tenant Contract ID
|
|
915
904
|
*/
|
|
916
|
-
)
|
|
917
905
|
}, {
|
|
918
906
|
key: "TenantContractId",
|
|
919
|
-
value:
|
|
907
|
+
value: function () {
|
|
920
908
|
var _TenantContractId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14() {
|
|
921
909
|
var _yield$this$UserWalle8, objectId;
|
|
922
910
|
return _regeneratorRuntime.wrap(function _callee14$(_context14) {
|
|
@@ -959,10 +947,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
959
947
|
* @param {string} tenantContractId - The tenant contract ID in hash format
|
|
960
948
|
* @param {string} address - The tenant address to use in the hash if id is not provided
|
|
961
949
|
*/
|
|
962
|
-
)
|
|
963
950
|
}, {
|
|
964
951
|
key: "SetTenantContractId",
|
|
965
|
-
value:
|
|
952
|
+
value: function () {
|
|
966
953
|
var _SetTenantContractId = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref11) {
|
|
967
954
|
var tenantContractId, _yield$this$UserWalle9, objectId, tenantInfo;
|
|
968
955
|
return _regeneratorRuntime.wrap(function _callee15$(_context15) {
|
|
@@ -993,7 +980,7 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
993
980
|
return _SetTenantContractId.apply(this, arguments);
|
|
994
981
|
}
|
|
995
982
|
return SetTenantContractId;
|
|
996
|
-
}()
|
|
983
|
+
}()
|
|
997
984
|
}, {
|
|
998
985
|
key: "ResetTenantId",
|
|
999
986
|
value: function () {
|
|
@@ -1045,7 +1032,7 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
1045
1032
|
*/
|
|
1046
1033
|
}, {
|
|
1047
1034
|
key: "UserProfileImage",
|
|
1048
|
-
value:
|
|
1035
|
+
value: function () {
|
|
1049
1036
|
var _UserProfileImage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17() {
|
|
1050
1037
|
var _ref12,
|
|
1051
1038
|
address,
|
|
@@ -1112,10 +1099,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
1112
1099
|
* @namedParams
|
|
1113
1100
|
* @param {blob} image - The new profile image for the current user
|
|
1114
1101
|
*/
|
|
1115
|
-
)
|
|
1116
1102
|
}, {
|
|
1117
1103
|
key: "SetUserProfileImage",
|
|
1118
|
-
value:
|
|
1104
|
+
value: function () {
|
|
1119
1105
|
var _SetUserProfileImage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18(_ref13) {
|
|
1120
1106
|
var image, size, _yield$this$UserWalle12, libraryId, objectId, editRequest;
|
|
1121
1107
|
return _regeneratorRuntime.wrap(function _callee18$(_context18) {
|
|
@@ -1180,10 +1166,9 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
1180
1166
|
*
|
|
1181
1167
|
* @return {Promise<Object>} - User tags
|
|
1182
1168
|
*/
|
|
1183
|
-
)
|
|
1184
1169
|
}, {
|
|
1185
1170
|
key: "CollectedTags",
|
|
1186
|
-
value:
|
|
1171
|
+
value: function () {
|
|
1187
1172
|
var _CollectedTags = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {
|
|
1188
1173
|
return _regeneratorRuntime.wrap(function _callee19$(_context19) {
|
|
1189
1174
|
while (1) switch (_context19.prev = _context19.next) {
|
|
@@ -1212,7 +1197,6 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
1212
1197
|
}
|
|
1213
1198
|
return CollectedTags;
|
|
1214
1199
|
}() // Ensure recording tags never causes action to fail
|
|
1215
|
-
)
|
|
1216
1200
|
}, {
|
|
1217
1201
|
key: "RecordTags",
|
|
1218
1202
|
value: function () {
|
|
@@ -1461,5 +1445,6 @@ var UserProfileClient = /*#__PURE__*/function () {
|
|
|
1461
1445
|
});
|
|
1462
1446
|
}
|
|
1463
1447
|
}]);
|
|
1448
|
+
return UserProfileClient;
|
|
1464
1449
|
}();
|
|
1465
1450
|
module.exports = UserProfileClient;
|
package/dist/src/Utils.js
CHANGED
|
@@ -3,8 +3,8 @@ var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
|
3
3
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
4
4
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
5
5
|
var _slicedToArray = require("@babel/runtime/helpers/slicedToArray");
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
8
|
if (typeof globalThis.Buffer === "undefined") {
|
|
9
9
|
globalThis.Buffer = require("buffer/").Buffer;
|
|
10
10
|
}
|
|
@@ -281,6 +281,7 @@ var Utils = {
|
|
|
281
281
|
flags: flags // flags for part write token (tqp_)
|
|
282
282
|
};
|
|
283
283
|
},
|
|
284
|
+
|
|
284
285
|
/**
|
|
285
286
|
* Convert contract address to multiformat hash
|
|
286
287
|
*
|