@eluvio/elv-client-js 4.2.13 → 4.2.15
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 +1 -1
- package/dist/ElvClient-node-min.js +1 -1
- package/dist/ElvFrameClient-min.js +1 -1
- package/dist/ElvPermissionsClient-min.js +1 -1
- package/dist/ElvWalletClient-min.js +1 -1
- package/dist/ElvWalletClient-node-min.js +1 -1
- package/dist/src/AuthorizationClient.js +723 -710
- package/dist/src/ContentObjectAudit.js +56 -56
- package/dist/src/Crypto.js +85 -85
- package/dist/src/ElvClient.js +502 -530
- package/dist/src/ElvWallet.js +28 -30
- package/dist/src/EthClient.js +311 -311
- package/dist/src/FrameClient.js +65 -64
- package/dist/src/HttpClient.js +60 -60
- package/dist/src/Id.js +2 -1
- package/dist/src/PermissionsClient.js +487 -499
- package/dist/src/RemoteSigner.js +178 -123
- package/dist/src/UserProfileClient.js +374 -392
- package/dist/src/Utils.js +66 -69
- package/dist/src/Validation.js +10 -10
- package/dist/src/client/ABRPublishing.js +239 -239
- package/dist/src/client/AccessGroups.js +474 -477
- package/dist/src/client/ContentAccess.js +1713 -1708
- package/dist/src/client/ContentManagement.js +871 -871
- package/dist/src/client/Contracts.js +736 -582
- package/dist/src/client/Files.js +684 -700
- package/dist/src/client/LiveConf.js +6 -1
- package/dist/src/client/LiveStream.js +686 -722
- package/dist/src/client/NFT.js +14 -14
- package/dist/src/client/NTP.js +84 -84
- package/dist/src/client/Shares.js +60 -53
- package/dist/src/walletClient/ClientMethods.js +951 -977
- package/dist/src/walletClient/Notifications.js +14 -14
- package/dist/src/walletClient/Profile.js +66 -66
- package/dist/src/walletClient/Utils.js +15 -15
- package/dist/src/walletClient/index.js +584 -581
- package/package.json +3 -2
- package/src/ElvClient.js +2 -1
- package/src/FrameClient.js +3 -0
- package/src/LogMessage.js +1 -1
- package/src/RemoteSigner.js +17 -3
- package/src/client/ABRPublishing.js +1 -1
- package/src/client/ContentAccess.js +17 -13
- package/src/client/Contracts.js +88 -7
- package/src/walletClient/index.js +15 -4
- package/utilities/ChannelCreate.js +1 -1
- package/utilities/CompositionCreate.js +517 -0
- package/utilities/LibraryDownloadMp4.js +371 -0
- package/utilities/MezDownloadMp4.js +177 -0
- package/utilities/lib/DownloadFile.js +88 -0
- package/utilities/lib/FrameAccurateVideo.js +431 -0
- package/utilities/lib/concerns/Metadata.js +2 -1
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
|
-
|
|
28
|
+
_createClass(ElvWallet, [{
|
|
29
29
|
key: "GenerateMnemonic",
|
|
30
30
|
value: function GenerateMnemonic() {
|
|
31
31
|
return Ethers.Wallet.createRandom().mnemonic.phrase;
|
|
@@ -64,25 +64,25 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
64
64
|
*/
|
|
65
65
|
}, {
|
|
66
66
|
key: "AddAccountFromEncryptedPK",
|
|
67
|
-
value:
|
|
68
|
-
var _AddAccountFromEncryptedPK = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
|
|
67
|
+
value: function () {
|
|
68
|
+
var _AddAccountFromEncryptedPK = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref2) {
|
|
69
69
|
var accountName, encryptedPrivateKey, password, signer;
|
|
70
|
-
return _regeneratorRuntime.wrap(function (_context) {
|
|
70
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
71
71
|
while (1) switch (_context.prev = _context.next) {
|
|
72
72
|
case 0:
|
|
73
73
|
accountName = _ref2.accountName, encryptedPrivateKey = _ref2.encryptedPrivateKey, password = _ref2.password;
|
|
74
74
|
if (_typeof(encryptedPrivateKey) === "object") {
|
|
75
75
|
encryptedPrivateKey = JSON.stringify(encryptedPrivateKey);
|
|
76
76
|
}
|
|
77
|
-
_context.next =
|
|
77
|
+
_context.next = 4;
|
|
78
78
|
return Ethers.Wallet.fromEncryptedJson(encryptedPrivateKey, password);
|
|
79
|
-
case
|
|
79
|
+
case 4:
|
|
80
80
|
signer = _context.sent;
|
|
81
81
|
return _context.abrupt("return", this.AddAccount({
|
|
82
82
|
accountName: accountName,
|
|
83
83
|
privateKey: signer.privateKey
|
|
84
84
|
}));
|
|
85
|
-
case
|
|
85
|
+
case 6:
|
|
86
86
|
case "end":
|
|
87
87
|
return _context.stop();
|
|
88
88
|
}
|
|
@@ -102,7 +102,6 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
102
102
|
*
|
|
103
103
|
* @returns {Signer} - Signer with the private key, connected to the provider
|
|
104
104
|
*/
|
|
105
|
-
)
|
|
106
105
|
}, {
|
|
107
106
|
key: "AddAccount",
|
|
108
107
|
value: function AddAccount(_ref3) {
|
|
@@ -134,10 +133,10 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
134
133
|
*/
|
|
135
134
|
}, {
|
|
136
135
|
key: "GetAccountBalance",
|
|
137
|
-
value:
|
|
138
|
-
var _GetAccountBalance = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref4) {
|
|
139
|
-
var accountName, signer, accountSigner
|
|
140
|
-
return _regeneratorRuntime.wrap(function (_context2) {
|
|
136
|
+
value: function () {
|
|
137
|
+
var _GetAccountBalance = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref4) {
|
|
138
|
+
var accountName, signer, accountSigner;
|
|
139
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
141
140
|
while (1) switch (_context2.prev = _context2.next) {
|
|
142
141
|
case 0:
|
|
143
142
|
accountName = _ref4.accountName, signer = _ref4.signer;
|
|
@@ -145,18 +144,18 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
145
144
|
accountName: accountName
|
|
146
145
|
});
|
|
147
146
|
if (accountSigner) {
|
|
148
|
-
_context2.next =
|
|
147
|
+
_context2.next = 4;
|
|
149
148
|
break;
|
|
150
149
|
}
|
|
151
150
|
throw Error("Unknown account: " + accountName);
|
|
152
|
-
case
|
|
153
|
-
|
|
154
|
-
_context2.next =
|
|
151
|
+
case 4:
|
|
152
|
+
_context2.t0 = Ethers.utils;
|
|
153
|
+
_context2.next = 7;
|
|
155
154
|
return accountSigner.getBalance();
|
|
156
|
-
case
|
|
157
|
-
|
|
158
|
-
return _context2.abrupt("return",
|
|
159
|
-
case
|
|
155
|
+
case 7:
|
|
156
|
+
_context2.t1 = _context2.sent;
|
|
157
|
+
return _context2.abrupt("return", _context2.t0.formatEther.call(_context2.t0, _context2.t1));
|
|
158
|
+
case 9:
|
|
160
159
|
case "end":
|
|
161
160
|
return _context2.stop();
|
|
162
161
|
}
|
|
@@ -181,13 +180,12 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
181
180
|
*
|
|
182
181
|
* @returns {Promise<string>} - The encrypted private key (in Ethereum keystore format)
|
|
183
182
|
*/
|
|
184
|
-
)
|
|
185
183
|
}, {
|
|
186
184
|
key: "GenerateEncryptedPrivateKey",
|
|
187
|
-
value:
|
|
188
|
-
var _GenerateEncryptedPrivateKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
|
|
185
|
+
value: function () {
|
|
186
|
+
var _GenerateEncryptedPrivateKey = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
|
|
189
187
|
var accountName, signer, password, options, accountSigner;
|
|
190
|
-
return _regeneratorRuntime.wrap(function (_context3) {
|
|
188
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
191
189
|
while (1) switch (_context3.prev = _context3.next) {
|
|
192
190
|
case 0:
|
|
193
191
|
accountName = _ref5.accountName, signer = _ref5.signer, password = _ref5.password, options = _ref5.options;
|
|
@@ -195,16 +193,16 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
195
193
|
accountName: accountName
|
|
196
194
|
});
|
|
197
195
|
if (accountSigner) {
|
|
198
|
-
_context3.next =
|
|
196
|
+
_context3.next = 4;
|
|
199
197
|
break;
|
|
200
198
|
}
|
|
201
199
|
throw Error("Unknown account: " + accountName);
|
|
202
|
-
case
|
|
203
|
-
_context3.next =
|
|
200
|
+
case 4:
|
|
201
|
+
_context3.next = 6;
|
|
204
202
|
return accountSigner.encrypt(password, options);
|
|
205
|
-
case
|
|
203
|
+
case 6:
|
|
206
204
|
return _context3.abrupt("return", _context3.sent);
|
|
207
|
-
case
|
|
205
|
+
case 7:
|
|
208
206
|
case "end":
|
|
209
207
|
return _context3.stop();
|
|
210
208
|
}
|
|
@@ -222,7 +220,6 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
222
220
|
* @param {string} accountName - Name of the account
|
|
223
221
|
* @returns {(Signer|undefined)} - Signer of the saved account, if it exists
|
|
224
222
|
*/
|
|
225
|
-
)
|
|
226
223
|
}, {
|
|
227
224
|
key: "GetAccount",
|
|
228
225
|
value: function GetAccount(_ref6) {
|
|
@@ -243,5 +240,6 @@ var ElvWallet = /*#__PURE__*/function () {
|
|
|
243
240
|
delete this.signers[accountName];
|
|
244
241
|
}
|
|
245
242
|
}]);
|
|
243
|
+
return ElvWallet;
|
|
246
244
|
}();
|
|
247
245
|
module.exports = ElvWallet;
|