@eluvio/elv-client-js 4.0.127 → 4.0.129
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 +15 -14
- package/dist/ElvClient-node-min.js +14 -13
- package/dist/ElvFrameClient-min.js +10 -10
- package/dist/ElvPermissionsClient-min.js +9 -9
- package/dist/ElvWalletClient-min.js +15 -14
- package/dist/ElvWalletClient-node-min.js +14 -13
- package/dist/src/AuthorizationClient.js +9 -12
- 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 +263 -222
- package/dist/src/ElvWallet.js +7 -5
- package/dist/src/EthClient.js +8 -9
- package/dist/src/FrameClient.js +9 -10
- package/dist/src/HttpClient.js +1 -2
- package/dist/src/Id.js +1 -2
- package/dist/src/PermissionsClient.js +31 -19
- package/dist/src/RemoteSigner.js +6 -8
- package/dist/src/UserProfileClient.js +35 -20
- package/dist/src/Utils.js +2 -3
- package/dist/src/client/ABRPublishing.js +2 -2
- package/dist/src/client/AccessGroups.js +2 -2
- package/dist/src/client/ContentAccess.js +8 -12
- package/dist/src/client/ContentManagement.js +82 -72
- package/dist/src/client/Contracts.js +2 -2
- package/dist/src/client/Files.js +2 -2
- package/dist/src/client/LiveConf.js +9 -5
- package/dist/src/client/LiveStream.js +0 -2
- package/dist/src/client/NFT.js +2 -2
- package/dist/src/client/Shares.js +47 -24
- 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 +35 -21
- package/package.json +1 -1
- package/src/ElvClient.js +9 -6
- package/src/client/ContentAccess.js +2 -2
- package/src/client/ContentManagement.js +47 -27
- package/src/client/LiveConf.js +8 -0
- package/src/client/Shares.js +14 -5
package/dist/src/ElvWallet.js
CHANGED
|
@@ -25,7 +25,7 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
25
25
|
*
|
|
26
26
|
* @returns {string} - Space-separated list of random words
|
|
27
27
|
*/
|
|
28
|
-
_createClass(ElvWallet, [{
|
|
28
|
+
return _createClass(ElvWallet, [{
|
|
29
29
|
key: "GenerateMnemonic",
|
|
30
30
|
value: function GenerateMnemonic() {
|
|
31
31
|
return Ethers.Wallet.createRandom().mnemonic.phrase;
|
|
@@ -64,7 +64,7 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
64
64
|
*/
|
|
65
65
|
}, {
|
|
66
66
|
key: "AddAccountFromEncryptedPK",
|
|
67
|
-
value: function () {
|
|
67
|
+
value: (function () {
|
|
68
68
|
var _AddAccountFromEncryptedPK = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
|
|
69
69
|
var accountName, encryptedPrivateKey, password, signer;
|
|
70
70
|
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
@@ -102,6 +102,7 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
102
102
|
*
|
|
103
103
|
* @returns {Signer} - Signer with the private key, connected to the provider
|
|
104
104
|
*/
|
|
105
|
+
)
|
|
105
106
|
}, {
|
|
106
107
|
key: "AddAccount",
|
|
107
108
|
value: function AddAccount(_ref3) {
|
|
@@ -133,7 +134,7 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
133
134
|
*/
|
|
134
135
|
}, {
|
|
135
136
|
key: "GetAccountBalance",
|
|
136
|
-
value: function () {
|
|
137
|
+
value: (function () {
|
|
137
138
|
var _GetAccountBalance = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref4) {
|
|
138
139
|
var accountName, signer, accountSigner;
|
|
139
140
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
@@ -180,9 +181,10 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
180
181
|
*
|
|
181
182
|
* @returns {Promise<string>} - The encrypted private key (in Ethereum keystore format)
|
|
182
183
|
*/
|
|
184
|
+
)
|
|
183
185
|
}, {
|
|
184
186
|
key: "GenerateEncryptedPrivateKey",
|
|
185
|
-
value: function () {
|
|
187
|
+
value: (function () {
|
|
186
188
|
var _GenerateEncryptedPrivateKey = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
|
|
187
189
|
var accountName, signer, password, options, accountSigner;
|
|
188
190
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -220,6 +222,7 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
220
222
|
* @param {string} accountName - Name of the account
|
|
221
223
|
* @returns {(Signer|undefined)} - Signer of the saved account, if it exists
|
|
222
224
|
*/
|
|
225
|
+
)
|
|
223
226
|
}, {
|
|
224
227
|
key: "GetAccount",
|
|
225
228
|
value: function GetAccount(_ref6) {
|
|
@@ -240,6 +243,5 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
240
243
|
delete this.signers[accountName];
|
|
241
244
|
}
|
|
242
245
|
}]);
|
|
243
|
-
return ElvWallet;
|
|
244
246
|
}();
|
|
245
247
|
module.exports = ElvWallet;
|
package/dist/src/EthClient.js
CHANGED
|
@@ -5,11 +5,11 @@ var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
|
5
5
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
6
6
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
7
7
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
8
|
-
function _createForOfIteratorHelper(
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
11
|
-
function ownKeys(
|
|
12
|
-
function _objectSpread(
|
|
8
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
13
13
|
// NOTE: Querying Ethereum requires CORS enabled
|
|
14
14
|
// Use --rpccorsdomain "http[s]://hostname:port" or set up proxy
|
|
15
15
|
var Ethers = require("ethers");
|
|
@@ -57,7 +57,7 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
57
57
|
|
|
58
58
|
//Ethers.errors.setLogLevel("error");
|
|
59
59
|
}
|
|
60
|
-
_createClass(EthClient, [{
|
|
60
|
+
return _createClass(EthClient, [{
|
|
61
61
|
key: "Log",
|
|
62
62
|
value: function Log(message) {
|
|
63
63
|
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -701,7 +701,7 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
701
701
|
}() /* Specific contract management */
|
|
702
702
|
}, {
|
|
703
703
|
key: "DeployAccessGroupContract",
|
|
704
|
-
value: function () {
|
|
704
|
+
value: (function () {
|
|
705
705
|
var _DeployAccessGroupContract = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref14) {
|
|
706
706
|
var contentSpaceAddress;
|
|
707
707
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
@@ -725,7 +725,7 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
725
725
|
return _DeployAccessGroupContract.apply(this, arguments);
|
|
726
726
|
}
|
|
727
727
|
return DeployAccessGroupContract;
|
|
728
|
-
}()
|
|
728
|
+
}())
|
|
729
729
|
}, {
|
|
730
730
|
key: "DeployTypeContract",
|
|
731
731
|
value: function () {
|
|
@@ -1149,6 +1149,5 @@ var EthClient = /*#__PURE__*/function () {
|
|
|
1149
1149
|
return Events;
|
|
1150
1150
|
}()
|
|
1151
1151
|
}]);
|
|
1152
|
-
return EthClient;
|
|
1153
1152
|
}();
|
|
1154
1153
|
module.exports = EthClient;
|
package/dist/src/FrameClient.js
CHANGED
|
@@ -3,11 +3,11 @@ var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
|
3
3
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
4
4
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
5
5
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
8
|
-
function _createForOfIteratorHelper(
|
|
9
|
-
function _unsupportedIterableToArray(
|
|
10
|
-
function _arrayLikeToArray(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
9
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
10
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
11
11
|
var Id = require("./Id");
|
|
12
12
|
var Utils = require("./Utils");
|
|
13
13
|
var permissionLevels = require("./client/ContentAccess").permissionLevels;
|
|
@@ -214,7 +214,7 @@ var FrameClient = /*#__PURE__*/function () {
|
|
|
214
214
|
* @param {object} request - An ElvFrameRequest
|
|
215
215
|
* @returns {object} - The resultant ElvFrameResponse
|
|
216
216
|
*/
|
|
217
|
-
_createClass(FrameClient, [{
|
|
217
|
+
return _createClass(FrameClient, [{
|
|
218
218
|
key: "Log",
|
|
219
219
|
value: function Log(message) {
|
|
220
220
|
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -222,7 +222,7 @@ var FrameClient = /*#__PURE__*/function () {
|
|
|
222
222
|
}
|
|
223
223
|
}, {
|
|
224
224
|
key: "PassRequest",
|
|
225
|
-
value: function () {
|
|
225
|
+
value: (function () {
|
|
226
226
|
var _PassRequest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref5) {
|
|
227
227
|
var request, Respond, response, error, callback;
|
|
228
228
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
@@ -269,7 +269,7 @@ var FrameClient = /*#__PURE__*/function () {
|
|
|
269
269
|
return _PassRequest.apply(this, arguments);
|
|
270
270
|
}
|
|
271
271
|
return PassRequest;
|
|
272
|
-
}()
|
|
272
|
+
}())
|
|
273
273
|
}, {
|
|
274
274
|
key: "SendMessage",
|
|
275
275
|
value: function () {
|
|
@@ -449,7 +449,7 @@ var FrameClient = /*#__PURE__*/function () {
|
|
|
449
449
|
}, {
|
|
450
450
|
key: "AllowedMethods",
|
|
451
451
|
value: function AllowedMethods() {
|
|
452
|
-
return ["AccessGroupManagers", "AccessGroupMembers", "AccessGroupOwner", "AccessInfo", "AccessRequest", "AccessType", "AddAccessGroupManager", "AddAccessGroupMember", "AddContentLibraryGroup", "AddContentObjectGroupPermission", "AddLibraryContentType", "AssetMetadata", "AuditContentObject", "AuditStream", "AvailableDRMs", "AvailableOfferings", "AwaitPending", "BitmovinPlayoutOptions", "BlockNumber", "CallBitcodeMethod", "CallContractMethod", "CallContractMethodAndWait", "ClearCache", "ClearStaticToken", "Collection", "CollectionTransactions", "ConfigUrl", "ContentLibraries", "ContentLibrary", "ContentLibraryGroupPermissions", "ContentLibraryOwner", "ContentObject", "ContentObjectAccessComplete", "ContentObjectGraph", "ContentObjectGroupPermissions", "ContentObjectImageUrl", "ContentObjectLibraryId", "ContentObjectMetadata", "ContentObjectOwner", "ContentObjectTenantId", "ContentObjectVersions", "ContentObjects", "ContentPart", "ContentParts", "ContentSpaceId", "ContentType", "ContentTypeOwner", "ContentTypes", "ContractAbi", "ContractEvents", "ContractInfo", "ContractMetadata", "ContractName", "CopyContentObject", "CreateABRMezzanine", "CreateAccessGroup", "CreateAndFinalizeContentObject", "CreateContentLibrary", "CreateContentObject", "CreateContentType", "CreateEncryptionConk", "CreateFabricToken", "CreateFileDirectories", "CreateFileUploadJob", "CreateLinks", "CreateNTPInstance", "CreateNonOwnerCap", "CreatePart", "CreateProductionMaster", "CreateShare", "CreateSignedToken", "CreateStaticToken", "CurrentAccountAddress", "CustomContractAddress", "Decrypt", "DecryptECIES", "DefaultKMSAddress", "DeleteAccessGroup", "DeleteContentLibrary", "DeleteContentObject", "DeleteContentVersion", "DeleteFiles", "DeleteMetadata", "DeleteNTPInstance", "DeletePart", "DeleteWriteToken", "DeployContract", "Download", "DownloadEncrypted", "DownloadFile", "DownloadPart", "EditAndFinalizeContentObject", "EditContentObject", "EmbedUrl", "Encrypt", "EncryptECIES", "EncryptionConk", "Events", "ExtractEventFromLogs", "ExtractValueFromEvent", "FabricUrl", "FileUrl", "FinalizeABRMezzanine", "FinalizeContentObject", "FinalizePart", "FinalizeStateChannelAccess", "FinalizeUploadJob", "FormatContractArguments", "GenerateStateChannelToken", "GenerateSignedLinkToken", "GetBalance", "GlobalUrl", "InitializeAuthPolicy", "IssueNTPCode", "IssueSignedNTPCode", "LatestVersionHash", "LibraryContentTypes", "LinkAccessGroupToOauth", "LinkData", "LinkTarget", "LinkUrl", "ListAccessGroups", "ListFiles", "ListNTPInstances", "LRODraftInfo", "LROStatus", "MakeAuthServiceRequest", "MakeFileServiceRequest", "MergeContractMetadata", "MergeMetadata", "MetadataAuth", "MintNFT", "MoveFiles", "NetworkInfo", "NodeId", "Nodes", "NTPInstance", "Permission", "PlayoutOptions", "PlayoutPathResolution", "ProduceMetadataLinks", "Proofs", "PublicRep", "PublishContentVersion", "QParts", "RecordWriteToken", "RedeemCode", "RedeemShareToken", "RemoveAccessGroupManager", "RemoveAccessGroupMember", "RemoveContentObjectGroupPermission", "RemoveContentLibraryGroup", "RemoveLibraryContentType", "Rep", "ReplaceContractMetadata", "ReplaceMetadata", "Request", "ResetRegion", "RevokeShare", "SendFunds", "SetAccessCharge", "SetAuth", "SetAuthContext", "SetAuthPolicy", "SetContentLibraryImage", "SetContentObjectImage", "SetCustomContentContract", "SetGroupPermission", "SetNodes", "SetOauthToken", "SetPolicyAuthorization", "SetSignerFromOauthToken", "SetStaticToken", "SetVisibility", "SetPermission", "Shares", "SpaceNodes", "StartABRMezzanineJobs", "StreamAddWatermark", "StreamConfig", "StreamCopyToVod", "StreamCreate", "StreamInitialize", "StreamInsertion", "StreamListUrls", "StreamRemoveWatermark", "StreamStatus", "StreamStartOrStopOrReset", "StreamStopSession", "SuspendNTPInstance", "UnlinkAccessGroupFromOauth", "UpdateContentObjectGraph", "UpdateNTPInstance", "UpdateShare", "UploadFileData", "UploadFilesFromS3", "UploadJobStatus", "UploadPart", "UploadPartChunk", "UploadStatus", "UseRegion", "Visibility", "WriteTokenNodeUrl"];
|
|
452
|
+
return ["AccessGroupManagers", "AccessGroupMembers", "AccessGroupOwner", "AccessInfo", "AccessRequest", "AccessType", "AddAccessGroupManager", "AddAccessGroupMember", "AddContentLibraryGroup", "AddContentObjectGroupPermission", "AddLibraryContentType", "AssetMetadata", "AuditContentObject", "AuditStream", "AvailableDRMs", "AvailableOfferings", "AwaitPending", "BitmovinPlayoutOptions", "BlockNumber", "CallBitcodeMethod", "CallContractMethod", "CallContractMethodAndWait", "ClearCache", "ClearStaticToken", "Collection", "CollectionTransactions", "ConfigUrl", "ContentLibraries", "ContentLibrary", "ContentLibraryGroupPermissions", "ContentLibraryOwner", "ContentObject", "ContentObjectAccessComplete", "ContentObjectGraph", "ContentObjectGroupPermissions", "ContentObjectImageUrl", "ContentObjectLibraryId", "ContentObjectMetadata", "ContentObjectOwner", "ContentObjectTenantId", "ContentObjectVersions", "ContentObjects", "ContentPart", "ContentParts", "ContentSpaceId", "ContentType", "ContentTypeOwner", "ContentTypes", "ContractAbi", "ContractEvents", "ContractInfo", "ContractMetadata", "ContractName", "CopyContentObject", "CreateABRMezzanine", "CreateAccessGroup", "CreateAndFinalizeContentObject", "CreateAuthorizationToken", "CreateContentLibrary", "CreateContentObject", "CreateContentType", "CreateEncryptionConk", "CreateFabricToken", "CreateFileDirectories", "CreateFileUploadJob", "CreateLinks", "CreateNTPInstance", "CreateNonOwnerCap", "CreatePart", "CreateProductionMaster", "CreateShare", "CreateSignedToken", "CreateStaticToken", "CurrentAccountAddress", "CustomContractAddress", "Decrypt", "DecryptECIES", "DefaultKMSAddress", "DeleteAccessGroup", "DeleteContentLibrary", "DeleteContentObject", "DeleteContentVersion", "DeleteFiles", "DeleteMetadata", "DeleteNTPInstance", "DeletePart", "DeleteWriteToken", "DeployContract", "Download", "DownloadEncrypted", "DownloadFile", "DownloadPart", "EditAndFinalizeContentObject", "EditContentObject", "EmbedUrl", "Encrypt", "EncryptECIES", "EncryptionConk", "Events", "ExtractEventFromLogs", "ExtractValueFromEvent", "FabricUrl", "FileUrl", "FinalizeABRMezzanine", "FinalizeContentObject", "FinalizePart", "FinalizeStateChannelAccess", "FinalizeUploadJob", "FormatContractArguments", "GenerateStateChannelToken", "GenerateSignedLinkToken", "GetBalance", "GlobalUrl", "InitializeAuthPolicy", "IssueNTPCode", "IssueSignedNTPCode", "LatestVersionHash", "LibraryContentTypes", "LinkAccessGroupToOauth", "LinkData", "LinkTarget", "LinkUrl", "ListAccessGroups", "ListFiles", "ListNTPInstances", "LRODraftInfo", "LROStatus", "MakeAuthServiceRequest", "MakeFileServiceRequest", "MergeContractMetadata", "MergeMetadata", "MetadataAuth", "MintNFT", "MoveFiles", "NetworkInfo", "NodeId", "Nodes", "NTPInstance", "Permission", "PlayoutOptions", "PlayoutPathResolution", "ProduceMetadataLinks", "Proofs", "PublicRep", "PublishContentVersion", "QParts", "RecordWriteToken", "RedeemCode", "RedeemShareToken", "RemoveAccessGroupManager", "RemoveAccessGroupMember", "RemoveContentObjectGroupPermission", "RemoveContentLibraryGroup", "RemoveLibraryContentType", "Rep", "ReplaceContractMetadata", "ReplaceMetadata", "Request", "ResetRegion", "RevokeShare", "SendFunds", "SetAccessCharge", "SetAuth", "SetAuthContext", "SetAuthPolicy", "SetContentLibraryImage", "SetContentObjectImage", "SetCustomContentContract", "SetGroupPermission", "SetNodes", "SetOauthToken", "SetPolicyAuthorization", "SetSignerFromOauthToken", "SetStaticToken", "SetVisibility", "SetPermission", "Shares", "SpaceNodes", "StartABRMezzanineJobs", "StreamAddWatermark", "StreamConfig", "StreamCopyToVod", "StreamCreate", "StreamInitialize", "StreamInsertion", "StreamListUrls", "StreamRemoveWatermark", "StreamStatus", "StreamStartOrStopOrReset", "StreamStopSession", "SuspendNTPInstance", "UnlinkAccessGroupFromOauth", "UpdateContentObjectGraph", "UpdateNTPInstance", "UpdateShare", "UploadFileData", "UploadFilesFromS3", "UploadJobStatus", "UploadPart", "UploadPartChunk", "UploadStatus", "UseRegion", "Visibility", "WriteTokenNodeUrl"];
|
|
453
453
|
}
|
|
454
454
|
}, {
|
|
455
455
|
key: "AllowedUserProfileMethods",
|
|
@@ -477,7 +477,6 @@ var FrameClient = /*#__PURE__*/function () {
|
|
|
477
477
|
return ["CreateFileUploadJob", "DownloadEncrypted", "DownloadFile", "DownloadPart", "FinalizeUploadJob", "UpdateContentObjectGraph", "UploadFileData", "UploadFiles", "UploadFilesFromS3", "UploadJobStatus", "UploadPart", "UploadPartChunk", "UploadStatus"];
|
|
478
478
|
}
|
|
479
479
|
}]);
|
|
480
|
-
return FrameClient;
|
|
481
480
|
}();
|
|
482
481
|
var _require2 = require("./client/Files"),
|
|
483
482
|
UploadFiles = _require2.UploadFiles;
|
package/dist/src/HttpClient.js
CHANGED
|
@@ -20,7 +20,7 @@ var HttpClient = /*#__PURE__*/function () {
|
|
|
20
20
|
this.draftURIs = {};
|
|
21
21
|
this.retries = Math.max(3, uris.length);
|
|
22
22
|
}
|
|
23
|
-
_createClass(HttpClient, [{
|
|
23
|
+
return _createClass(HttpClient, [{
|
|
24
24
|
key: "Log",
|
|
25
25
|
value: function Log(message) {
|
|
26
26
|
var error = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
@@ -310,6 +310,5 @@ var HttpClient = /*#__PURE__*/function () {
|
|
|
310
310
|
return _Fetch(url, params);
|
|
311
311
|
}
|
|
312
312
|
}]);
|
|
313
|
-
return HttpClient;
|
|
314
313
|
}();
|
|
315
314
|
module.exports = HttpClient;
|
package/dist/src/Id.js
CHANGED
|
@@ -9,13 +9,12 @@ var Id = /*#__PURE__*/function () {
|
|
|
9
9
|
function Id() {
|
|
10
10
|
_classCallCheck(this, Id);
|
|
11
11
|
}
|
|
12
|
-
_createClass(Id, null, [{
|
|
12
|
+
return _createClass(Id, null, [{
|
|
13
13
|
key: "next",
|
|
14
14
|
value: function next() {
|
|
15
15
|
__id++;
|
|
16
16
|
return __id;
|
|
17
17
|
}
|
|
18
18
|
}]);
|
|
19
|
-
return Id;
|
|
20
19
|
}();
|
|
21
20
|
module.exports = Id;
|
|
@@ -3,8 +3,8 @@ var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
|
3
3
|
var _defineProperty = require("@babel/runtime/helpers/defineProperty");
|
|
4
4
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
5
5
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
6
|
-
function ownKeys(
|
|
7
|
-
function _objectSpread(
|
|
6
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8
8
|
var UrlJoin = require("url-join");
|
|
9
9
|
var _require = require("./Validation"),
|
|
10
10
|
ValidatePresence = _require.ValidatePresence,
|
|
@@ -124,7 +124,7 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
124
124
|
this.drafts = {};
|
|
125
125
|
this.offline = options.offline;
|
|
126
126
|
}
|
|
127
|
-
_createClass(PermissionsClient, [{
|
|
127
|
+
return _createClass(PermissionsClient, [{
|
|
128
128
|
key: "FormatDate",
|
|
129
129
|
value: function FormatDate(date) {
|
|
130
130
|
if (!date) {
|
|
@@ -362,7 +362,7 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
362
362
|
*/
|
|
363
363
|
}, {
|
|
364
364
|
key: "OpenOfflineDraft",
|
|
365
|
-
value: function () {
|
|
365
|
+
value: (function () {
|
|
366
366
|
var _OpenOfflineDraft = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
|
|
367
367
|
var policyId, policyLibraryId, policyWriteToken, meta;
|
|
368
368
|
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
@@ -412,9 +412,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
412
412
|
* @namedParams
|
|
413
413
|
* @param {string} policyId - Object ID of the policy
|
|
414
414
|
*/
|
|
415
|
+
)
|
|
415
416
|
}, {
|
|
416
417
|
key: "CloseOfflineDraft",
|
|
417
|
-
value: function () {
|
|
418
|
+
value: (function () {
|
|
418
419
|
var _CloseOfflineDraft = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref3) {
|
|
419
420
|
var policyId;
|
|
420
421
|
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
@@ -457,9 +458,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
457
458
|
* @param {string=} policyWriteToken - Write token for the policy object - if specified, info will be retrieved from the write draft instead of the last finalized policy object
|
|
458
459
|
* @return {Promise<Object>} - A mapping of item objectId to the display name of the item
|
|
459
460
|
*/
|
|
461
|
+
)
|
|
460
462
|
}, {
|
|
461
463
|
key: "PolicyItems",
|
|
462
|
-
value: function () {
|
|
464
|
+
value: (function () {
|
|
463
465
|
var _PolicyItems = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref4) {
|
|
464
466
|
var policyId, policyWriteToken;
|
|
465
467
|
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
@@ -515,9 +517,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
515
517
|
* @param {string} itemId - Object ID of the item
|
|
516
518
|
* @return {Promise<Object | undefined>} - The policy for the specified item. If none exists, returns undefined
|
|
517
519
|
*/
|
|
520
|
+
)
|
|
518
521
|
}, {
|
|
519
522
|
key: "ItemPolicy",
|
|
520
|
-
value: function () {
|
|
523
|
+
value: (function () {
|
|
521
524
|
var _ItemPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref5) {
|
|
522
525
|
var policyId, policyWriteToken, itemId, profiles, permissions;
|
|
523
526
|
return _regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
@@ -571,9 +574,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
571
574
|
* @param {string} itemId - Object ID of the item
|
|
572
575
|
* @param {object=} profiles={} - Profiles to create
|
|
573
576
|
*/
|
|
577
|
+
)
|
|
574
578
|
}, {
|
|
575
579
|
key: "CreateItemPolicy",
|
|
576
|
-
value: function () {
|
|
580
|
+
value: (function () {
|
|
577
581
|
var _CreateItemPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(_ref6) {
|
|
578
582
|
var _this2 = this;
|
|
579
583
|
var policyId, policyWriteToken, itemId, _ref6$profiles, profiles, metadata, assetMetadata, displayTitle, itemSpec;
|
|
@@ -660,9 +664,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
660
664
|
* @param {string} policyWriteToken - Write token for the policy
|
|
661
665
|
* @param {string} itemId - Object ID of the item
|
|
662
666
|
*/
|
|
667
|
+
)
|
|
663
668
|
}, {
|
|
664
669
|
key: "RemoveItemPolicy",
|
|
665
|
-
value: function () {
|
|
670
|
+
value: (function () {
|
|
666
671
|
var _RemoveItemPolicy = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(_ref7) {
|
|
667
672
|
var policyId, policyWriteToken, itemId;
|
|
668
673
|
return _regeneratorRuntime.wrap(function _callee7$(_context7) {
|
|
@@ -712,9 +717,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
712
717
|
* @param {string} itemId - Object ID of the item
|
|
713
718
|
* @param {string=} profileName - The name of the profile. If not specified, all profiles will be returned
|
|
714
719
|
*/
|
|
720
|
+
)
|
|
715
721
|
}, {
|
|
716
722
|
key: "ItemProfiles",
|
|
717
|
-
value: function () {
|
|
723
|
+
value: (function () {
|
|
718
724
|
var _ItemProfiles = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(_ref8) {
|
|
719
725
|
var policyId, policyWriteToken, itemId, profileName;
|
|
720
726
|
return _regeneratorRuntime.wrap(function _callee8$(_context8) {
|
|
@@ -764,9 +770,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
764
770
|
* @param {object} profileSpec - Specification for the profile. If not provided, profile
|
|
765
771
|
* will default to no access for both assets and offerings
|
|
766
772
|
*/
|
|
773
|
+
)
|
|
767
774
|
}, {
|
|
768
775
|
key: "SetProfile",
|
|
769
|
-
value: function () {
|
|
776
|
+
value: (function () {
|
|
770
777
|
var _SetProfile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(_ref9) {
|
|
771
778
|
var policyId, policyWriteToken, itemId, profileName, profileSpec;
|
|
772
779
|
return _regeneratorRuntime.wrap(function _callee9$(_context9) {
|
|
@@ -821,9 +828,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
821
828
|
* @param {object} profileSpec - Specification for the profile. If not provided, profile
|
|
822
829
|
* will default to no access for both assets and offerings
|
|
823
830
|
*/
|
|
831
|
+
)
|
|
824
832
|
}, {
|
|
825
833
|
key: "RemoveProfile",
|
|
826
|
-
value: function () {
|
|
834
|
+
value: (function () {
|
|
827
835
|
var _RemoveProfile = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(_ref10) {
|
|
828
836
|
var policyId, policyWriteToken, itemId, profileName;
|
|
829
837
|
return _regeneratorRuntime.wrap(function _callee10$(_context10) {
|
|
@@ -875,9 +883,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
875
883
|
*
|
|
876
884
|
* @return {Promise<Array>} - The list of permissions for the specified item
|
|
877
885
|
*/
|
|
886
|
+
)
|
|
878
887
|
}, {
|
|
879
888
|
key: "ItemPermissions",
|
|
880
|
-
value: function () {
|
|
889
|
+
value: (function () {
|
|
881
890
|
var _ItemPermissions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(_ref11) {
|
|
882
891
|
var _this3 = this;
|
|
883
892
|
var policyId, policyWriteToken, itemId, libraryId, permissions;
|
|
@@ -961,9 +970,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
961
970
|
* @param {string | number} start - The start time for the permission
|
|
962
971
|
* @param {string | number} end - The end time for the permission
|
|
963
972
|
*/
|
|
973
|
+
)
|
|
964
974
|
}, {
|
|
965
975
|
key: "SetPermission",
|
|
966
|
-
value: function () {
|
|
976
|
+
value: (function () {
|
|
967
977
|
var _SetPermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(_ref13) {
|
|
968
978
|
var policyId, policyWriteToken, itemId, _ref13$subjectSource, subjectSource, _ref13$subjectType, subjectType, subjectName, subjectId, subjectNTPId, profileName, start, end, offlineDraft, policyLibraryId, existingPermissions, index, permissionSpec, subjectInfo, newMeta, userInfo, _newMeta, _userInfo;
|
|
969
979
|
return _regeneratorRuntime.wrap(function _callee13$(_context13) {
|
|
@@ -1260,9 +1270,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
1260
1270
|
* @param {string} itemId - Object ID of the item
|
|
1261
1271
|
* @param {string} subjectId - The ID of the subject
|
|
1262
1272
|
*/
|
|
1273
|
+
)
|
|
1263
1274
|
}, {
|
|
1264
1275
|
key: "RemovePermission",
|
|
1265
|
-
value: function () {
|
|
1276
|
+
value: (function () {
|
|
1266
1277
|
var _RemovePermission = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(_ref14) {
|
|
1267
1278
|
var _this4 = this;
|
|
1268
1279
|
var policyId, policyWriteToken, itemId, subjectId, policyLibraryId, permissions, id;
|
|
@@ -1365,9 +1376,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
1365
1376
|
*
|
|
1366
1377
|
* @returns {Object} - All permissions pertaining to the given subject. Format of result for each item is identical to the format of `ItemPolicy`
|
|
1367
1378
|
*/
|
|
1379
|
+
)
|
|
1368
1380
|
}, {
|
|
1369
1381
|
key: "SubjectPermissions",
|
|
1370
|
-
value: function () {
|
|
1382
|
+
value: (function () {
|
|
1371
1383
|
var _SubjectPermissions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(_ref16) {
|
|
1372
1384
|
var _this5 = this;
|
|
1373
1385
|
var policyId, policyWriteToken, subjectId, id, policyLibraryId, policy, allSubjectPermissions, _i, _Object$keys, itemId, itemPermissions, subjectPermissions;
|
|
@@ -1483,9 +1495,10 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
1483
1495
|
* @param {string} policyWriteToken - Write token for the policy
|
|
1484
1496
|
* @param {string} subjectId - The ID of the subject
|
|
1485
1497
|
*/
|
|
1498
|
+
)
|
|
1486
1499
|
}, {
|
|
1487
1500
|
key: "RemoveSubjectPermissions",
|
|
1488
|
-
value: function () {
|
|
1501
|
+
value: (function () {
|
|
1489
1502
|
var _RemoveSubjectPermissions = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19(_ref18) {
|
|
1490
1503
|
var _this6 = this;
|
|
1491
1504
|
var policyId, policyWriteToken, subjectId, subjectPermissions;
|
|
@@ -1537,8 +1550,7 @@ var PermissionsClient = /*#__PURE__*/function () {
|
|
|
1537
1550
|
return _RemoveSubjectPermissions.apply(this, arguments);
|
|
1538
1551
|
}
|
|
1539
1552
|
return RemoveSubjectPermissions;
|
|
1540
|
-
}()
|
|
1553
|
+
}())
|
|
1541
1554
|
}]);
|
|
1542
|
-
return PermissionsClient;
|
|
1543
1555
|
}();
|
|
1544
1556
|
module.exports = PermissionsClient;
|
package/dist/src/RemoteSigner.js
CHANGED
|
@@ -2,11 +2,11 @@ var _regeneratorRuntime = require("@babel/runtime/regenerator");
|
|
|
2
2
|
var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
|
|
3
3
|
var _classCallCheck = require("@babel/runtime/helpers/classCallCheck");
|
|
4
4
|
var _createClass = require("@babel/runtime/helpers/createClass");
|
|
5
|
-
var _inherits = require("@babel/runtime/helpers/inherits");
|
|
6
5
|
var _possibleConstructorReturn = require("@babel/runtime/helpers/possibleConstructorReturn");
|
|
7
6
|
var _getPrototypeOf = require("@babel/runtime/helpers/getPrototypeOf");
|
|
8
|
-
|
|
9
|
-
function
|
|
7
|
+
var _inherits = require("@babel/runtime/helpers/inherits");
|
|
8
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
10
10
|
var Ethers = require("ethers");
|
|
11
11
|
var Utils = require("./Utils");
|
|
12
12
|
var HttpClient = require("./HttpClient");
|
|
@@ -15,8 +15,6 @@ var UUID = require("uuid");
|
|
|
15
15
|
var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
|
|
16
16
|
"use strict";
|
|
17
17
|
|
|
18
|
-
_inherits(RemoteSigner, _Ethers$Signer);
|
|
19
|
-
var _super = _createSuper(RemoteSigner);
|
|
20
18
|
function RemoteSigner(_ref) {
|
|
21
19
|
var _this;
|
|
22
20
|
var signerURIs = _ref.signerURIs,
|
|
@@ -29,7 +27,7 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
|
|
|
29
27
|
_ref$unsignedPublicAu = _ref.unsignedPublicAuth,
|
|
30
28
|
unsignedPublicAuth = _ref$unsignedPublicAu === void 0 ? false : _ref$unsignedPublicAu;
|
|
31
29
|
_classCallCheck(this, RemoteSigner);
|
|
32
|
-
_this =
|
|
30
|
+
_this = _callSuper(this, RemoteSigner);
|
|
33
31
|
_this.remoteSigner = true;
|
|
34
32
|
_this.unsignedPublicAuth = unsignedPublicAuth;
|
|
35
33
|
_this.HttpClient = new HttpClient({
|
|
@@ -43,7 +41,8 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
|
|
|
43
41
|
_this.signatureCache = {};
|
|
44
42
|
return _this;
|
|
45
43
|
}
|
|
46
|
-
|
|
44
|
+
_inherits(RemoteSigner, _Ethers$Signer);
|
|
45
|
+
return _createClass(RemoteSigner, [{
|
|
47
46
|
key: "Initialize",
|
|
48
47
|
value: function () {
|
|
49
48
|
var _Initialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
@@ -380,6 +379,5 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
|
|
|
380
379
|
key: "connect",
|
|
381
380
|
value: function connect() {}
|
|
382
381
|
}]);
|
|
383
|
-
return RemoteSigner;
|
|
384
382
|
}(Ethers.Signer);
|
|
385
383
|
module.exports = RemoteSigner;
|