@eluvio/elv-client-js 4.2.12 → 4.2.13

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 (39) 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 +710 -723
  8. package/dist/src/ContentObjectAudit.js +56 -56
  9. package/dist/src/Crypto.js +85 -85
  10. package/dist/src/ElvClient.js +530 -500
  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 +114 -163
  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 -6
  28. package/dist/src/client/LiveStream.js +722 -686
  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 +579 -581
  37. package/package.json +1 -1
  38. package/src/client/ContentAccess.js +1 -1
  39. package/dist/src/ContentObjectVerification.js +0 -281
@@ -2,10 +2,10 @@ 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
- function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
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
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");
@@ -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 = _super.call(this);
30
+ _this = _callSuper(this, RemoteSigner);
33
31
  _this.remoteSigner = true;
34
32
  _this.unsignedPublicAuth = unsignedPublicAuth;
35
33
  _this.HttpClient = new HttpClient({
@@ -43,19 +41,20 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
43
41
  _this.signatureCache = {};
44
42
  return _this;
45
43
  }
46
- _createClass(RemoteSigner, [{
44
+ _inherits(RemoteSigner, _Ethers$Signer);
45
+ return _createClass(RemoteSigner, [{
47
46
  key: "Initialize",
48
47
  value: function () {
49
- var _Initialize = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
48
+ var _Initialize = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
50
49
  var _yield$Utils$Response, addr, eth, token, keys, address;
51
- return _regeneratorRuntime.wrap(function _callee$(_context) {
50
+ return _regeneratorRuntime.wrap(function (_context) {
52
51
  while (1) switch (_context.prev = _context.next) {
53
52
  case 0:
54
53
  if (this.authToken) {
55
- _context.next = 10;
54
+ _context.next = 2;
56
55
  break;
57
56
  }
58
- _context.next = 3;
57
+ _context.next = 1;
59
58
  return Utils.ResponseToJson(this.HttpClient.Request({
60
59
  path: UrlJoin("as", "wlt", "login", "jwt"),
61
60
  method: "POST",
@@ -69,7 +68,7 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
69
68
  Authorization: "Bearer ".concat(this.idToken)
70
69
  }
71
70
  }));
72
- case 3:
71
+ case 1:
73
72
  _yield$Utils$Response = _context.sent;
74
73
  addr = _yield$Utils$Response.addr;
75
74
  eth = _yield$Utils$Response.eth;
@@ -77,12 +76,12 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
77
76
  this.authToken = token;
78
77
  this.address = Utils.FormatAddress(addr);
79
78
  this.id = eth;
80
- case 10:
79
+ case 2:
81
80
  if (this.address) {
82
- _context.next = 16;
81
+ _context.next = 4;
83
82
  break;
84
83
  }
85
- _context.next = 13;
84
+ _context.next = 3;
86
85
  return Utils.ResponseToJson(this.HttpClient.Request({
87
86
  method: "GET",
88
87
  path: UrlJoin("as", "wlt", "keys"),
@@ -90,7 +89,7 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
90
89
  Authorization: "Bearer ".concat(this.authToken)
91
90
  }
92
91
  }));
93
- case 13:
92
+ case 3:
94
93
  keys = _context.sent;
95
94
  address = keys.eth[0];
96
95
  if (address && address.startsWith("0x")) {
@@ -98,10 +97,10 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
98
97
  } else {
99
98
  this.address = Utils.HashToAddress(keys.eth[0]);
100
99
  }
101
- case 16:
100
+ case 4:
102
101
  this.id = this.address ? "ikms".concat(Utils.AddressToHash(this.address)) : undefined;
103
102
  this.signer = this.provider.getSigner(this.address);
104
- case 18:
103
+ case 5:
105
104
  case "end":
106
105
  return _context.stop();
107
106
  }
@@ -115,33 +114,21 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
115
114
  }, {
116
115
  key: "RetrieveCSAT",
117
116
  value: function () {
118
- var _RetrieveCSAT = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
119
- var email, nonce, installId, tenantId, _ref2$force, force, _ref2$duration, duration, appName, buf, response;
120
- return _regeneratorRuntime.wrap(function _callee2$(_context2) {
117
+ var _RetrieveCSAT = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref2) {
118
+ var email, nonce, tenantId, _ref2$force, force, _ref2$duration, duration, response;
119
+ return _regeneratorRuntime.wrap(function (_context2) {
121
120
  while (1) switch (_context2.prev = _context2.next) {
122
121
  case 0:
123
- email = _ref2.email, nonce = _ref2.nonce, installId = _ref2.installId, tenantId = _ref2.tenantId, _ref2$force = _ref2.force, force = _ref2$force === void 0 ? false : _ref2$force, _ref2$duration = _ref2.duration, duration = _ref2$duration === void 0 ? 24 : _ref2$duration, appName = _ref2.appName;
124
- if (!(nonce && !installId)) {
125
- _context2.next = 6;
126
- break;
127
- }
128
- _context2.next = 4;
129
- return crypto.subtle.digest("SHA-512", new TextEncoder("utf-8").encode(nonce));
130
- case 4:
131
- buf = _context2.sent;
132
- installId = Array.prototype.map.call(new Uint8Array(buf), function (x) {
133
- return ("00" + x.toString(16)).slice(-2);
134
- }).join("");
135
- case 6:
136
- _context2.next = 8;
122
+ email = _ref2.email, nonce = _ref2.nonce, tenantId = _ref2.tenantId, _ref2$force = _ref2.force, force = _ref2$force === void 0 ? false : _ref2$force, _ref2$duration = _ref2.duration, duration = _ref2$duration === void 0 ? 24 : _ref2$duration;
123
+ nonce = nonce || Utils.B58(UUID.parse(UUID.v4()));
124
+ _context2.next = 1;
137
125
  return Utils.ResponseToJson(this.HttpClient.Request({
138
126
  method: "POST",
139
127
  body: {
140
128
  email: email,
141
- install_id: installId,
129
+ nonce: nonce,
142
130
  force: force,
143
131
  tid: tenantId,
144
- app_name: appName,
145
132
  exp: parseInt(duration * 60 * 60)
146
133
  },
147
134
  path: UrlJoin("as", "wlt", "sign", "csat"),
@@ -149,12 +136,11 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
149
136
  Authorization: "Bearer ".concat(this.authToken)
150
137
  }
151
138
  }));
152
- case 8:
139
+ case 1:
153
140
  response = _context2.sent;
154
141
  response.nonce = nonce;
155
- response.installId = installId;
156
142
  return _context2.abrupt("return", response);
157
- case 12:
143
+ case 2:
158
144
  case "end":
159
145
  return _context2.stop();
160
146
  }
@@ -168,14 +154,14 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
168
154
  }, {
169
155
  key: "CSATStatus",
170
156
  value: function () {
171
- var _CSATStatus = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref3) {
172
- var accessToken, response;
173
- return _regeneratorRuntime.wrap(function _callee3$(_context3) {
157
+ var _CSATStatus = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref3) {
158
+ var accessToken, response, _t;
159
+ return _regeneratorRuntime.wrap(function (_context3) {
174
160
  while (1) switch (_context3.prev = _context3.next) {
175
161
  case 0:
176
162
  accessToken = _ref3.accessToken;
177
163
  _context3.prev = 1;
178
- _context3.next = 4;
164
+ _context3.next = 2;
179
165
  return Utils.ResponseToJson(this.HttpClient.Request({
180
166
  method: "POST",
181
167
  path: UrlJoin("as", "wlt", "login", "status"),
@@ -183,18 +169,18 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
183
169
  Authorization: "Bearer ".concat(accessToken)
184
170
  }
185
171
  }));
186
- case 4:
172
+ case 2:
187
173
  response = _context3.sent;
188
174
  return _context3.abrupt("return", response && response.is_active);
189
- case 8:
190
- _context3.prev = 8;
191
- _context3.t0 = _context3["catch"](1);
192
- return _context3.abrupt("return", !_context3.t0 || _context3.t0.status !== 403);
193
- case 11:
175
+ case 3:
176
+ _context3.prev = 3;
177
+ _t = _context3["catch"](1);
178
+ return _context3.abrupt("return", !_t || _t.status !== 403);
179
+ case 4:
194
180
  case "end":
195
181
  return _context3.stop();
196
182
  }
197
- }, _callee3, this, [[1, 8]]);
183
+ }, _callee3, this, [[1, 3]]);
198
184
  }));
199
185
  function CSATStatus(_x2) {
200
186
  return _CSATStatus.apply(this, arguments);
@@ -204,13 +190,13 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
204
190
  }, {
205
191
  key: "ReleaseCSAT",
206
192
  value: function () {
207
- var _ReleaseCSAT = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref4) {
193
+ var _ReleaseCSAT = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref4) {
208
194
  var accessToken;
209
- return _regeneratorRuntime.wrap(function _callee4$(_context4) {
195
+ return _regeneratorRuntime.wrap(function (_context4) {
210
196
  while (1) switch (_context4.prev = _context4.next) {
211
197
  case 0:
212
198
  accessToken = _ref4.accessToken;
213
- _context4.next = 3;
199
+ _context4.next = 1;
214
200
  return Utils.ResponseToJson(this.HttpClient.Request({
215
201
  method: "POST",
216
202
  path: UrlJoin("as", "wlt", "login", "release"),
@@ -218,9 +204,9 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
218
204
  Authorization: "Bearer ".concat(accessToken)
219
205
  }
220
206
  }));
221
- case 3:
207
+ case 1:
222
208
  return _context4.abrupt("return", _context4.sent);
223
- case 4:
209
+ case 2:
224
210
  case "end":
225
211
  return _context4.stop();
226
212
  }
@@ -230,41 +216,6 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
230
216
  return _ReleaseCSAT.apply(this, arguments);
231
217
  }
232
218
  return ReleaseCSAT;
233
- }()
234
- }, {
235
- key: "RefreshCSAT",
236
- value: function () {
237
- var _RefreshCSAT = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref5) {
238
- var accessToken, refreshToken, nonce;
239
- return _regeneratorRuntime.wrap(function _callee5$(_context5) {
240
- while (1) switch (_context5.prev = _context5.next) {
241
- case 0:
242
- accessToken = _ref5.accessToken, refreshToken = _ref5.refreshToken, nonce = _ref5.nonce;
243
- _context5.next = 3;
244
- return Utils.ResponseToJson(this.HttpClient.Request({
245
- method: "POST",
246
- path: UrlJoin("as", "wlt", "refresh", "csat"),
247
- body: {
248
- last_csat: accessToken,
249
- refresh_token: refreshToken,
250
- nonce: nonce
251
- },
252
- headers: {
253
- Authorization: "Bearer ".concat(accessToken)
254
- }
255
- }));
256
- case 3:
257
- return _context5.abrupt("return", _context5.sent);
258
- case 4:
259
- case "end":
260
- return _context5.stop();
261
- }
262
- }, _callee5, this);
263
- }));
264
- function RefreshCSAT(_x4) {
265
- return _RefreshCSAT.apply(this, arguments);
266
- }
267
- return RefreshCSAT;
268
219
  }() // Overrides
269
220
  }, {
270
221
  key: "getAddress",
@@ -274,20 +225,20 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
274
225
  }, {
275
226
  key: "signDigest",
276
227
  value: function () {
277
- var _signDigest = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7(digest) {
228
+ var _signDigest = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee6(digest) {
278
229
  var _this2 = this;
279
- return _regeneratorRuntime.wrap(function _callee7$(_context7) {
280
- while (1) switch (_context7.prev = _context7.next) {
230
+ return _regeneratorRuntime.wrap(function (_context6) {
231
+ while (1) switch (_context6.prev = _context6.next) {
281
232
  case 0:
282
233
  if (!this.signatureCache[digest]) {
283
- this.signatureCache[digest] = new Promise( /*#__PURE__*/function () {
284
- var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(resolve, reject) {
285
- var signature;
286
- return _regeneratorRuntime.wrap(function _callee6$(_context6) {
287
- while (1) switch (_context6.prev = _context6.next) {
234
+ this.signatureCache[digest] = new Promise(/*#__PURE__*/function () {
235
+ var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5(resolve, reject) {
236
+ var signature, _t2;
237
+ return _regeneratorRuntime.wrap(function (_context5) {
238
+ while (1) switch (_context5.prev = _context5.next) {
288
239
  case 0:
289
- _context6.prev = 0;
290
- _context6.next = 3;
240
+ _context5.prev = 0;
241
+ _context5.next = 1;
291
242
  return Utils.ResponseToJson(_this2.HttpClient.Request({
292
243
  method: "POST",
293
244
  path: UrlJoin("as", "wlt", "sign", "eth", _this2.id),
@@ -298,39 +249,39 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
298
249
  hash: digest
299
250
  }
300
251
  }));
301
- case 3:
302
- signature = _context6.sent;
252
+ case 1:
253
+ signature = _context5.sent;
303
254
  signature.v = parseInt(signature.v, 16);
304
255
  signature.recoveryParam = signature.v - 27;
305
256
  resolve(signature);
306
- _context6.next = 12;
257
+ _context5.next = 3;
307
258
  break;
308
- case 9:
309
- _context6.prev = 9;
310
- _context6.t0 = _context6["catch"](0);
311
- reject(_context6.t0);
312
- case 12:
259
+ case 2:
260
+ _context5.prev = 2;
261
+ _t2 = _context5["catch"](0);
262
+ reject(_t2);
263
+ case 3:
313
264
  case "end":
314
- return _context6.stop();
265
+ return _context5.stop();
315
266
  }
316
- }, _callee6, null, [[0, 9]]);
267
+ }, _callee5, null, [[0, 2]]);
317
268
  }));
318
- return function (_x6, _x7) {
319
- return _ref6.apply(this, arguments);
269
+ return function (_x5, _x6) {
270
+ return _ref5.apply(this, arguments);
320
271
  };
321
272
  }());
322
273
  }
323
- _context7.next = 3;
274
+ _context6.next = 1;
324
275
  return this.signatureCache[digest];
325
- case 3:
326
- return _context7.abrupt("return", _context7.sent);
327
- case 4:
276
+ case 1:
277
+ return _context6.abrupt("return", _context6.sent);
278
+ case 2:
328
279
  case "end":
329
- return _context7.stop();
280
+ return _context6.stop();
330
281
  }
331
- }, _callee7, this);
282
+ }, _callee6, this);
332
283
  }));
333
- function signDigest(_x5) {
284
+ function signDigest(_x4) {
334
285
  return _signDigest.apply(this, arguments);
335
286
  }
336
287
  return signDigest;
@@ -338,27 +289,28 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
338
289
  }, {
339
290
  key: "signMessage",
340
291
  value: function () {
341
- var _signMessage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8(message) {
342
- return _regeneratorRuntime.wrap(function _callee8$(_context8) {
343
- while (1) switch (_context8.prev = _context8.next) {
292
+ var _signMessage = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee7(message) {
293
+ var _t3, _t4, _t5, _t6, _t7, _t8;
294
+ return _regeneratorRuntime.wrap(function (_context7) {
295
+ while (1) switch (_context7.prev = _context7.next) {
344
296
  case 0:
345
- _context8.t0 = Promise;
346
- _context8.t1 = Ethers.utils;
347
- _context8.t2 = "0x";
348
- _context8.next = 5;
297
+ _t3 = Promise;
298
+ _t4 = Ethers.utils;
299
+ _t5 = "0x";
300
+ _context7.next = 1;
349
301
  return this.signDigest(Ethers.utils.hashMessage(message));
350
- case 5:
351
- _context8.t3 = _context8.sent;
352
- _context8.t4 = _context8.t2.concat.call(_context8.t2, _context8.t3);
353
- _context8.t5 = _context8.t1.joinSignature.call(_context8.t1, _context8.t4);
354
- return _context8.abrupt("return", _context8.t0.resolve.call(_context8.t0, _context8.t5));
355
- case 9:
302
+ case 1:
303
+ _t6 = _context7.sent;
304
+ _t7 = _t5.concat.call(_t5, _t6);
305
+ _t8 = _t4.joinSignature.call(_t4, _t7);
306
+ return _context7.abrupt("return", _t3.resolve.call(_t3, _t8));
307
+ case 2:
356
308
  case "end":
357
- return _context8.stop();
309
+ return _context7.stop();
358
310
  }
359
- }, _callee8, this);
311
+ }, _callee7, this);
360
312
  }));
361
- function signMessage(_x8) {
313
+ function signMessage(_x7) {
362
314
  return _signMessage.apply(this, arguments);
363
315
  }
364
316
  return signMessage;
@@ -366,27 +318,27 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
366
318
  }, {
367
319
  key: "sign",
368
320
  value: function () {
369
- var _sign = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9(transaction) {
321
+ var _sign = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee8(transaction) {
370
322
  var signature;
371
- return _regeneratorRuntime.wrap(function _callee9$(_context9) {
372
- while (1) switch (_context9.prev = _context9.next) {
323
+ return _regeneratorRuntime.wrap(function (_context8) {
324
+ while (1) switch (_context8.prev = _context8.next) {
373
325
  case 0:
374
- _context9.next = 2;
326
+ _context8.next = 1;
375
327
  return Ethers.utils.resolveProperties(transaction);
376
- case 2:
377
- transaction = _context9.sent;
378
- _context9.next = 5;
328
+ case 1:
329
+ transaction = _context8.sent;
330
+ _context8.next = 2;
379
331
  return this.signDigest(Ethers.utils.keccak256(Ethers.utils.serializeTransaction(transaction)));
380
- case 5:
381
- signature = _context9.sent;
382
- return _context9.abrupt("return", Ethers.utils.serializeTransaction(transaction, signature));
383
- case 7:
332
+ case 2:
333
+ signature = _context8.sent;
334
+ return _context8.abrupt("return", Ethers.utils.serializeTransaction(transaction, signature));
335
+ case 3:
384
336
  case "end":
385
- return _context9.stop();
337
+ return _context8.stop();
386
338
  }
387
- }, _callee9, this);
339
+ }, _callee8, this);
388
340
  }));
389
- function sign(_x9) {
341
+ function sign(_x8) {
390
342
  return _sign.apply(this, arguments);
391
343
  }
392
344
  return sign;
@@ -394,33 +346,33 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
394
346
  }, {
395
347
  key: "sendTransaction",
396
348
  value: function () {
397
- var _sendTransaction = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10(transaction) {
349
+ var _sendTransaction = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee9(transaction) {
398
350
  var _this3 = this;
399
- return _regeneratorRuntime.wrap(function _callee10$(_context10) {
400
- while (1) switch (_context10.prev = _context10.next) {
351
+ return _regeneratorRuntime.wrap(function (_context9) {
352
+ while (1) switch (_context9.prev = _context9.next) {
401
353
  case 0:
402
354
  if (!(transaction.nonce == null)) {
403
- _context10.next = 5;
355
+ _context9.next = 2;
404
356
  break;
405
357
  }
406
358
  transaction = Ethers.utils.shallowCopy(transaction);
407
- _context10.next = 4;
359
+ _context9.next = 1;
408
360
  return this.provider.getTransactionCount(this.address, "pending");
409
- case 4:
410
- transaction.nonce = _context10.sent;
411
- case 5:
412
- return _context10.abrupt("return", this.populateTransaction(transaction, this.provider, this.address).then(function (tx) {
361
+ case 1:
362
+ transaction.nonce = _context9.sent;
363
+ case 2:
364
+ return _context9.abrupt("return", this.populateTransaction(transaction, this.provider, this.address).then(function (tx) {
413
365
  return _this3.sign(tx).then(function (signedTransaction) {
414
366
  return _this3.provider.sendTransaction(signedTransaction);
415
367
  });
416
368
  }));
417
- case 6:
369
+ case 3:
418
370
  case "end":
419
- return _context10.stop();
371
+ return _context9.stop();
420
372
  }
421
- }, _callee10, this);
373
+ }, _callee9, this);
422
374
  }));
423
- function sendTransaction(_x10) {
375
+ function sendTransaction(_x9) {
424
376
  return _sendTransaction.apply(this, arguments);
425
377
  }
426
378
  return sendTransaction;
@@ -429,6 +381,5 @@ var RemoteSigner = /*#__PURE__*/function (_Ethers$Signer) {
429
381
  key: "connect",
430
382
  value: function connect() {}
431
383
  }]);
432
- return RemoteSigner;
433
384
  }(Ethers.Signer);
434
385
  module.exports = RemoteSigner;