@eluvio/elv-client-js 4.2.6 → 4.2.7

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.
Files changed (40) hide show
  1. package/dist/ElvClient-min.js +1 -1
  2. package/dist/ElvClient-node-min.js +1 -1
  3. package/dist/ElvFrameClient-min.js +1 -1
  4. package/dist/ElvPermissionsClient-min.js +1 -1
  5. package/dist/ElvWalletClient-min.js +1 -1
  6. package/dist/ElvWalletClient-node-min.js +1 -1
  7. package/dist/src/AuthorizationClient.js +709 -710
  8. package/dist/src/ContentObjectAudit.js +56 -56
  9. package/dist/src/Crypto.js +85 -85
  10. package/dist/src/ElvClient.js +529 -499
  11. package/dist/src/ElvWallet.js +30 -28
  12. package/dist/src/EthClient.js +311 -311
  13. package/dist/src/FrameClient.js +63 -64
  14. package/dist/src/HttpClient.js +60 -60
  15. package/dist/src/Id.js +1 -2
  16. package/dist/src/PermissionsClient.js +499 -487
  17. package/dist/src/RemoteSigner.js +82 -83
  18. package/dist/src/UserProfileClient.js +392 -374
  19. package/dist/src/Utils.js +69 -66
  20. package/dist/src/Validation.js +10 -10
  21. package/dist/src/client/ABRPublishing.js +238 -238
  22. package/dist/src/client/AccessGroups.js +477 -474
  23. package/dist/src/client/ContentAccess.js +1707 -1711
  24. package/dist/src/client/ContentManagement.js +871 -871
  25. package/dist/src/client/Contracts.js +575 -578
  26. package/dist/src/client/Files.js +700 -684
  27. package/dist/src/client/LiveConf.js +1 -3
  28. package/dist/src/client/LiveStream.js +694 -693
  29. package/dist/src/client/NFT.js +14 -14
  30. package/dist/src/client/NTP.js +84 -84
  31. package/dist/src/client/Shares.js +53 -60
  32. package/dist/src/walletClient/ClientMethods.js +977 -951
  33. package/dist/src/walletClient/Notifications.js +14 -14
  34. package/dist/src/walletClient/Profile.js +66 -66
  35. package/dist/src/walletClient/Utils.js +15 -15
  36. package/dist/src/walletClient/index.js +572 -562
  37. package/package.json +1 -1
  38. package/src/ElvClient.js +1 -1
  39. package/src/walletClient/index.js +6 -2
  40. package/dist/src/ContentObjectVerification.js +0 -281
@@ -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,25 +64,25 @@ var ElvWallet = /*#__PURE__*/function () {
64
64
  */
65
65
  }, {
66
66
  key: "AddAccountFromEncryptedPK",
67
- value: function () {
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 _callee$(_context) {
70
+ return _regeneratorRuntime.wrap(function (_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 = 4;
77
+ _context.next = 1;
78
78
  return Ethers.Wallet.fromEncryptedJson(encryptedPrivateKey, password);
79
- case 4:
79
+ case 1:
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 6:
85
+ case 2:
86
86
  case "end":
87
87
  return _context.stop();
88
88
  }
@@ -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,10 +134,10 @@ var ElvWallet = /*#__PURE__*/function () {
133
134
  */
134
135
  }, {
135
136
  key: "GetAccountBalance",
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) {
137
+ value: (function () {
138
+ var _GetAccountBalance = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref4) {
139
+ var accountName, signer, accountSigner, _t, _t2;
140
+ return _regeneratorRuntime.wrap(function (_context2) {
140
141
  while (1) switch (_context2.prev = _context2.next) {
141
142
  case 0:
142
143
  accountName = _ref4.accountName, signer = _ref4.signer;
@@ -144,18 +145,18 @@ var ElvWallet = /*#__PURE__*/function () {
144
145
  accountName: accountName
145
146
  });
146
147
  if (accountSigner) {
147
- _context2.next = 4;
148
+ _context2.next = 1;
148
149
  break;
149
150
  }
150
151
  throw Error("Unknown account: " + accountName);
151
- case 4:
152
- _context2.t0 = Ethers.utils;
153
- _context2.next = 7;
152
+ case 1:
153
+ _t = Ethers.utils;
154
+ _context2.next = 2;
154
155
  return accountSigner.getBalance();
155
- case 7:
156
- _context2.t1 = _context2.sent;
157
- return _context2.abrupt("return", _context2.t0.formatEther.call(_context2.t0, _context2.t1));
158
- case 9:
156
+ case 2:
157
+ _t2 = _context2.sent;
158
+ return _context2.abrupt("return", _t.formatEther.call(_t, _t2));
159
+ case 3:
159
160
  case "end":
160
161
  return _context2.stop();
161
162
  }
@@ -180,12 +181,13 @@ 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 () {
186
- var _GenerateEncryptedPrivateKey = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
187
+ value: (function () {
188
+ var _GenerateEncryptedPrivateKey = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref5) {
187
189
  var accountName, signer, password, options, accountSigner;
188
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
190
+ return _regeneratorRuntime.wrap(function (_context3) {
189
191
  while (1) switch (_context3.prev = _context3.next) {
190
192
  case 0:
191
193
  accountName = _ref5.accountName, signer = _ref5.signer, password = _ref5.password, options = _ref5.options;
@@ -193,16 +195,16 @@ var ElvWallet = /*#__PURE__*/function () {
193
195
  accountName: accountName
194
196
  });
195
197
  if (accountSigner) {
196
- _context3.next = 4;
198
+ _context3.next = 1;
197
199
  break;
198
200
  }
199
201
  throw Error("Unknown account: " + accountName);
200
- case 4:
201
- _context3.next = 6;
202
+ case 1:
203
+ _context3.next = 2;
202
204
  return accountSigner.encrypt(password, options);
203
- case 6:
205
+ case 2:
204
206
  return _context3.abrupt("return", _context3.sent);
205
- case 7:
207
+ case 3:
206
208
  case "end":
207
209
  return _context3.stop();
208
210
  }
@@ -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;