@shapeshiftoss/hdwallet-trezor 1.55.4-alpha.1 → 1.55.5

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/trezor.js CHANGED
@@ -1,10 +1,51 @@
1
- import * as core from "@shapeshiftoss/hdwallet-core";
2
- import _ from "lodash";
3
- import * as Btc from "./bitcoin";
4
- import * as Eth from "./ethereum";
5
- import { handleError } from "./utils";
6
- export function isTrezor(wallet) {
7
- return _.isObject(wallet) && wallet._isTrezor;
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __importDefault = (this && this.__importDefault) || function (mod) {
35
+ return (mod && mod.__esModule) ? mod : { "default": mod };
36
+ };
37
+ Object.defineProperty(exports, "__esModule", { value: true });
38
+ exports.TrezorHDWallet = exports.TrezorHDWalletInfo = void 0;
39
+ exports.isTrezor = isTrezor;
40
+ exports.info = info;
41
+ exports.create = create;
42
+ const core = __importStar(require("@shapeshiftoss/hdwallet-core"));
43
+ const lodash_1 = __importDefault(require("lodash"));
44
+ const Btc = __importStar(require("./bitcoin"));
45
+ const Eth = __importStar(require("./ethereum"));
46
+ const utils_1 = require("./utils");
47
+ function isTrezor(wallet) {
48
+ return lodash_1.default.isObject(wallet) && wallet._isTrezor;
8
49
  }
9
50
  function describeETHPath(path) {
10
51
  const pathStr = core.addressNListToBIP32(path);
@@ -36,6 +77,7 @@ function describeETHPath(path) {
36
77
  };
37
78
  }
38
79
  function describeUTXOPath(path, coin, scriptType) {
80
+ var _a;
39
81
  const pathStr = core.addressNListToBIP32(path);
40
82
  const unknown = {
41
83
  verbose: pathStr,
@@ -65,11 +107,11 @@ function describeUTXOPath(path, coin, scriptType) {
65
107
  return unknown;
66
108
  const wholeAccount = path.length === 3;
67
109
  let script = scriptType
68
- ? {
110
+ ? (_a = {
69
111
  [core.BTCInputScriptType.SpendAddress]: " (Legacy)",
70
112
  [core.BTCInputScriptType.SpendP2SHWitness]: "",
71
113
  [core.BTCInputScriptType.SpendWitness]: " (Segwit Native)",
72
- }[scriptType] ?? ""
114
+ }[scriptType]) !== null && _a !== void 0 ? _a : ""
73
115
  : "";
74
116
  switch (coin) {
75
117
  case "Bitcoin":
@@ -108,20 +150,28 @@ function describeUTXOPath(path, coin, scriptType) {
108
150
  };
109
151
  }
110
152
  }
111
- export class TrezorHDWalletInfo {
112
- _supportsBTCInfo = true;
113
- _supportsETHInfo = true;
153
+ class TrezorHDWalletInfo {
154
+ constructor() {
155
+ this._supportsBTCInfo = true;
156
+ this._supportsETHInfo = true;
157
+ }
114
158
  getVendor() {
115
159
  return "Trezor";
116
160
  }
117
- async btcSupportsCoin(coin) {
118
- return Btc.btcSupportsCoin(coin);
161
+ btcSupportsCoin(coin) {
162
+ return __awaiter(this, void 0, void 0, function* () {
163
+ return Btc.btcSupportsCoin(coin);
164
+ });
119
165
  }
120
- async btcSupportsScriptType(coin, scriptType) {
121
- return Btc.btcSupportsScriptType(coin, scriptType);
166
+ btcSupportsScriptType(coin, scriptType) {
167
+ return __awaiter(this, void 0, void 0, function* () {
168
+ return Btc.btcSupportsScriptType(coin, scriptType);
169
+ });
122
170
  }
123
- async btcSupportsSecureTransfer() {
124
- return Btc.btcSupportsSecureTransfer();
171
+ btcSupportsSecureTransfer() {
172
+ return __awaiter(this, void 0, void 0, function* () {
173
+ return Btc.btcSupportsSecureTransfer();
174
+ });
125
175
  }
126
176
  btcSupportsNativeShapeShift() {
127
177
  return Btc.btcSupportsNativeShapeShift();
@@ -132,17 +182,23 @@ export class TrezorHDWalletInfo {
132
182
  btcIsSameAccount(msg) {
133
183
  return Btc.btcIsSameAccount(msg);
134
184
  }
135
- async ethSupportsNetwork(chain_id) {
136
- return Eth.ethSupportsNetwork(chain_id);
185
+ ethSupportsNetwork(chain_id) {
186
+ return __awaiter(this, void 0, void 0, function* () {
187
+ return Eth.ethSupportsNetwork(chain_id);
188
+ });
137
189
  }
138
- async ethSupportsSecureTransfer() {
139
- return Eth.ethSupportsSecureTransfer();
190
+ ethSupportsSecureTransfer() {
191
+ return __awaiter(this, void 0, void 0, function* () {
192
+ return Eth.ethSupportsSecureTransfer();
193
+ });
140
194
  }
141
195
  ethSupportsNativeShapeShift() {
142
196
  return Eth.ethSupportsNativeShapeShift();
143
197
  }
144
- async ethSupportsEIP1559() {
145
- return await Eth.ethSupportsEIP1559();
198
+ ethSupportsEIP1559() {
199
+ return __awaiter(this, void 0, void 0, function* () {
200
+ return yield Eth.ethSupportsEIP1559();
201
+ });
146
202
  }
147
203
  ethGetAccountPaths(msg) {
148
204
  return Eth.ethGetAccountPaths(msg);
@@ -191,10 +247,7 @@ export class TrezorHDWalletInfo {
191
247
  addressNList[0] === 0x80000000 + 49 ||
192
248
  addressNList[0] === 0x80000000 + 84) {
193
249
  addressNList[2] += 1;
194
- return {
195
- ...msg,
196
- addressNList,
197
- };
250
+ return Object.assign(Object.assign({}, msg), { addressNList });
198
251
  }
199
252
  return undefined;
200
253
  }
@@ -206,186 +259,219 @@ export class TrezorHDWalletInfo {
206
259
  }
207
260
  if (addressNList[0] === 0x80000000 + 44) {
208
261
  addressNList[4] += 1;
209
- return {
210
- ...msg,
211
- addressNList,
212
- hardenedPath: core.hardenedPath(addressNList),
213
- relPath: core.relativePath(addressNList),
214
- };
262
+ return Object.assign(Object.assign({}, msg), { addressNList, hardenedPath: core.hardenedPath(addressNList), relPath: core.relativePath(addressNList) });
215
263
  }
216
264
  return undefined;
217
265
  }
218
266
  }
219
- export class TrezorHDWallet {
220
- _supportsETHInfo = true;
221
- _supportsBTCInfo = true;
222
- _supportsBTC = true;
223
- _supportsETH = true;
224
- _supportsEthSwitchChain = true;
225
- _supportsAvalanche = true;
226
- _supportsOptimism = false;
227
- _supportsBSC = false;
228
- _supportsPolygon = false;
229
- _supportsGnosis = false;
230
- _supportsArbitrum = true;
231
- _supportsArbitrumNova = true;
232
- _supportsBase = true;
233
- _supportsKavaInfo = true;
234
- _supportsTerraInfo = true;
235
- _isTrezor = true;
236
- transport;
237
- featuresCache;
238
- info;
267
+ exports.TrezorHDWalletInfo = TrezorHDWalletInfo;
268
+ class TrezorHDWallet {
239
269
  constructor(transport) {
270
+ this._supportsETHInfo = true;
271
+ this._supportsBTCInfo = true;
272
+ this._supportsBTC = true;
273
+ this._supportsETH = true;
274
+ this._supportsEthSwitchChain = true;
275
+ this._supportsAvalanche = true;
276
+ this._supportsOptimism = false;
277
+ this._supportsBSC = false;
278
+ this._supportsPolygon = false;
279
+ this._supportsGnosis = false;
280
+ this._supportsArbitrum = true;
281
+ this._supportsArbitrumNova = true;
282
+ this._supportsBase = true;
283
+ this._supportsKavaInfo = true;
284
+ this._supportsTerraInfo = true;
285
+ this._isTrezor = true;
240
286
  this.transport = transport;
241
287
  this.info = new TrezorHDWalletInfo();
242
288
  }
243
- async initialize() {
244
- return;
289
+ initialize() {
290
+ return __awaiter(this, void 0, void 0, function* () {
291
+ return;
292
+ });
245
293
  }
246
- async isInitialized() {
247
- const features = await this.getFeatures(/*cached*/ true);
248
- return features.initialized;
294
+ isInitialized() {
295
+ return __awaiter(this, void 0, void 0, function* () {
296
+ const features = yield this.getFeatures(/*cached*/ true);
297
+ return features.initialized;
298
+ });
249
299
  }
250
- async getDeviceID() {
251
- const { device: { deviceID: transportId }, } = this.transport;
252
- if (transportId)
253
- return transportId;
254
- const features = await this.getFeatures(/*cached*/ true);
255
- return features.device_id;
300
+ getDeviceID() {
301
+ return __awaiter(this, void 0, void 0, function* () {
302
+ const { device: { deviceID: transportId }, } = this.transport;
303
+ if (transportId)
304
+ return transportId;
305
+ const features = yield this.getFeatures(/*cached*/ true);
306
+ return features.device_id;
307
+ });
256
308
  }
257
- async getFirmwareVersion() {
258
- const features = await this.getFeatures(/*cached*/ true);
259
- return `v${features.major_version}.${features.minor_version}.${features.patch_version}`;
309
+ getFirmwareVersion() {
310
+ return __awaiter(this, void 0, void 0, function* () {
311
+ const features = yield this.getFeatures(/*cached*/ true);
312
+ return `v${features.major_version}.${features.minor_version}.${features.patch_version}`;
313
+ });
260
314
  }
261
315
  getVendor() {
262
316
  return "Trezor";
263
317
  }
264
- async getModel() {
265
- const features = await this.getFeatures(/*cached*/ true);
266
- return "Trezor " + features.model;
318
+ getModel() {
319
+ return __awaiter(this, void 0, void 0, function* () {
320
+ const features = yield this.getFeatures(/*cached*/ true);
321
+ return "Trezor " + features.model;
322
+ });
267
323
  }
268
- async getLabel() {
269
- const features = await this.getFeatures(/*cached*/ true);
270
- return typeof features.label === "string" ? features.label : "";
324
+ getLabel() {
325
+ return __awaiter(this, void 0, void 0, function* () {
326
+ const features = yield this.getFeatures(/*cached*/ true);
327
+ return typeof features.label === "string" ? features.label : "";
328
+ });
271
329
  }
272
- async getFeatures(cached = false) {
273
- if (cached && this.featuresCache)
274
- return this.featuresCache;
275
- const res = await this.transport.call("getFeatures", {});
276
- handleError(this.transport, res, "Could not get Trezor features");
277
- this.cacheFeatures(res.payload);
278
- return res.payload;
330
+ getFeatures() {
331
+ return __awaiter(this, arguments, void 0, function* (cached = false) {
332
+ if (cached && this.featuresCache)
333
+ return this.featuresCache;
334
+ const res = yield this.transport.call("getFeatures", {});
335
+ (0, utils_1.handleError)(this.transport, res, "Could not get Trezor features");
336
+ this.cacheFeatures(res.payload);
337
+ return res.payload;
338
+ });
279
339
  }
280
340
  cacheFeatures(features) {
281
341
  this.featuresCache = features;
282
342
  }
283
- async getPublicKeys(msg) {
284
- if (!msg.length)
285
- return [];
286
- const res = await this.transport.call("getPublicKey", {
287
- bundle: msg.map((request) => {
288
- return {
289
- path: request.addressNList,
290
- coin: request.coin || "Bitcoin",
291
- crossChain: true,
292
- };
293
- }),
294
- });
295
- handleError(this.transport, res, "Could not load xpubs from Trezor");
296
- return res.payload.map((result, i) => {
297
- const scriptType = msg[i].scriptType;
298
- switch (scriptType) {
299
- case core.BTCInputScriptType.SpendP2SHWitness:
300
- case core.BTCInputScriptType.SpendWitness: {
301
- const xpub = result.xpubSegwit;
302
- if (!xpub)
303
- throw new Error("unable to get public key");
304
- return {
305
- xpub,
306
- };
307
- }
308
- case core.BTCInputScriptType.SpendAddress:
309
- default: {
310
- const xpub = result.xpub;
311
- if (!xpub)
312
- throw new Error("unable to get public key");
343
+ getPublicKeys(msg) {
344
+ return __awaiter(this, void 0, void 0, function* () {
345
+ if (!msg.length)
346
+ return [];
347
+ const res = yield this.transport.call("getPublicKey", {
348
+ bundle: msg.map((request) => {
313
349
  return {
314
- xpub,
350
+ path: request.addressNList,
351
+ coin: request.coin || "Bitcoin",
352
+ crossChain: true,
315
353
  };
354
+ }),
355
+ });
356
+ (0, utils_1.handleError)(this.transport, res, "Could not load xpubs from Trezor");
357
+ return res.payload.map((result, i) => {
358
+ const scriptType = msg[i].scriptType;
359
+ switch (scriptType) {
360
+ case core.BTCInputScriptType.SpendP2SHWitness:
361
+ case core.BTCInputScriptType.SpendWitness: {
362
+ const xpub = result.xpubSegwit;
363
+ if (!xpub)
364
+ throw new Error("unable to get public key");
365
+ return {
366
+ xpub,
367
+ };
368
+ }
369
+ case core.BTCInputScriptType.SpendAddress:
370
+ default: {
371
+ const xpub = result.xpub;
372
+ if (!xpub)
373
+ throw new Error("unable to get public key");
374
+ return {
375
+ xpub,
376
+ };
377
+ }
316
378
  }
317
- }
379
+ });
318
380
  });
319
381
  }
320
- async isLocked() {
321
- const features = await this.getFeatures(false);
322
- if (features.pin_protection && !features.pin_cached)
323
- return true;
324
- if (features.passphrase_protection && !features.passphrase_cached)
325
- return true;
326
- return false;
382
+ isLocked() {
383
+ return __awaiter(this, void 0, void 0, function* () {
384
+ const features = yield this.getFeatures(false);
385
+ if (features.pin_protection && !features.pin_cached)
386
+ return true;
387
+ if (features.passphrase_protection && !features.passphrase_cached)
388
+ return true;
389
+ return false;
390
+ });
327
391
  }
328
- async clearSession() {
329
- // TrezorConnect doesn't expose session management, so this is a no-op.
392
+ clearSession() {
393
+ return __awaiter(this, void 0, void 0, function* () {
394
+ // TrezorConnect doesn't expose session management, so this is a no-op.
395
+ });
330
396
  }
331
- async sendPin(pin) {
332
- await this.transport.call("uiResponse", {
333
- type: "ui-receive_pin",
334
- payload: pin,
397
+ sendPin(pin) {
398
+ return __awaiter(this, void 0, void 0, function* () {
399
+ yield this.transport.call("uiResponse", {
400
+ type: "ui-receive_pin",
401
+ payload: pin,
402
+ });
335
403
  });
336
404
  }
337
- async sendPassphrase(passphrase) {
338
- await this.transport.call("uiResponse", {
339
- type: "ui-receive_passphrase",
340
- payload: {
341
- value: passphrase,
342
- save: true,
343
- },
405
+ sendPassphrase(passphrase) {
406
+ return __awaiter(this, void 0, void 0, function* () {
407
+ yield this.transport.call("uiResponse", {
408
+ type: "ui-receive_passphrase",
409
+ payload: {
410
+ value: passphrase,
411
+ save: true,
412
+ },
413
+ });
344
414
  });
345
415
  }
346
416
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
347
- async sendCharacter(charater) {
348
- throw new Error("Trezor does not suport chiphered recovery");
417
+ sendCharacter(charater) {
418
+ return __awaiter(this, void 0, void 0, function* () {
419
+ throw new Error("Trezor does not suport chiphered recovery");
420
+ });
349
421
  }
350
422
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
351
- async sendWord(word) {
352
- throw new Error("Trezor does not yet support recoverDevice");
423
+ sendWord(word) {
424
+ return __awaiter(this, void 0, void 0, function* () {
425
+ throw new Error("Trezor does not yet support recoverDevice");
426
+ });
353
427
  }
354
- async ping(msg) {
355
- // TrezorConnect doesn't expose the device's normal 'Core.Ping' message, so we
356
- // have to fake it here:
357
- return { msg: msg.msg };
428
+ ping(msg) {
429
+ return __awaiter(this, void 0, void 0, function* () {
430
+ // TrezorConnect doesn't expose the device's normal 'Core.Ping' message, so we
431
+ // have to fake it here:
432
+ return { msg: msg.msg };
433
+ });
358
434
  }
359
- async wipe() {
360
- const res = await this.transport.call("wipeDevice", {});
361
- handleError(this.transport, res, "Could not wipe Trezor");
435
+ wipe() {
436
+ return __awaiter(this, void 0, void 0, function* () {
437
+ const res = yield this.transport.call("wipeDevice", {});
438
+ (0, utils_1.handleError)(this.transport, res, "Could not wipe Trezor");
439
+ });
362
440
  }
363
- async reset(msg) {
364
- const res = await this.transport.call("resetDevice", {
365
- strength: msg.entropy,
366
- label: msg.label,
367
- pinProtection: msg.pin,
368
- passphraseProtection: msg.passphrase,
441
+ reset(msg) {
442
+ return __awaiter(this, void 0, void 0, function* () {
443
+ const res = yield this.transport.call("resetDevice", {
444
+ strength: msg.entropy,
445
+ label: msg.label,
446
+ pinProtection: msg.pin,
447
+ passphraseProtection: msg.passphrase,
448
+ });
449
+ (0, utils_1.handleError)(this.transport, res, "Could not reset Trezor");
369
450
  });
370
- handleError(this.transport, res, "Could not reset Trezor");
371
451
  }
372
- async cancel() {
373
- await this.transport.cancel();
452
+ cancel() {
453
+ return __awaiter(this, void 0, void 0, function* () {
454
+ yield this.transport.cancel();
455
+ });
374
456
  }
375
457
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
376
- async recover(msg) {
377
- // https://github.com/trezor/connect/pull/320
378
- throw new Error("TrezorConnect does not expose Core.RecoverDevice... yet?");
458
+ recover(msg) {
459
+ return __awaiter(this, void 0, void 0, function* () {
460
+ // https://github.com/trezor/connect/pull/320
461
+ throw new Error("TrezorConnect does not expose Core.RecoverDevice... yet?");
462
+ });
379
463
  }
380
- async loadDevice(msg) {
381
- // https://github.com/trezor/connect/issues/363
382
- const res = await this.transport.call("loadDevice", {
383
- mnemonic: msg.mnemonic,
384
- pin: msg.pin,
385
- passphraseProtection: msg.passphrase,
386
- label: msg.label,
464
+ loadDevice(msg) {
465
+ return __awaiter(this, void 0, void 0, function* () {
466
+ // https://github.com/trezor/connect/issues/363
467
+ const res = yield this.transport.call("loadDevice", {
468
+ mnemonic: msg.mnemonic,
469
+ pin: msg.pin,
470
+ passphraseProtection: msg.passphrase,
471
+ label: msg.label,
472
+ });
473
+ (0, utils_1.handleError)(this.transport, res, "Could not load seed into Trezor");
387
474
  });
388
- handleError(this.transport, res, "Could not load seed into Trezor");
389
475
  }
390
476
  hasOnDevicePinEntry() {
391
477
  return this.transport.hasPopup;
@@ -413,29 +499,43 @@ export class TrezorHDWallet {
413
499
  supportsBroadcast() {
414
500
  return false;
415
501
  }
416
- async btcSupportsCoin(coin) {
417
- return this.info.btcSupportsCoin(coin);
502
+ btcSupportsCoin(coin) {
503
+ return __awaiter(this, void 0, void 0, function* () {
504
+ return this.info.btcSupportsCoin(coin);
505
+ });
418
506
  }
419
- async btcSupportsScriptType(coin, scriptType) {
420
- return this.info.btcSupportsScriptType(coin, scriptType);
507
+ btcSupportsScriptType(coin, scriptType) {
508
+ return __awaiter(this, void 0, void 0, function* () {
509
+ return this.info.btcSupportsScriptType(coin, scriptType);
510
+ });
421
511
  }
422
- async btcGetAddress(msg) {
423
- return Btc.btcGetAddress(this.transport, msg);
512
+ btcGetAddress(msg) {
513
+ return __awaiter(this, void 0, void 0, function* () {
514
+ return Btc.btcGetAddress(this.transport, msg);
515
+ });
424
516
  }
425
- async btcSignTx(msg) {
426
- return Btc.btcSignTx(this, this.transport, msg);
517
+ btcSignTx(msg) {
518
+ return __awaiter(this, void 0, void 0, function* () {
519
+ return Btc.btcSignTx(this, this.transport, msg);
520
+ });
427
521
  }
428
- async btcSupportsSecureTransfer() {
429
- return this.info.btcSupportsSecureTransfer();
522
+ btcSupportsSecureTransfer() {
523
+ return __awaiter(this, void 0, void 0, function* () {
524
+ return this.info.btcSupportsSecureTransfer();
525
+ });
430
526
  }
431
527
  btcSupportsNativeShapeShift() {
432
528
  return this.info.btcSupportsNativeShapeShift();
433
529
  }
434
- async btcSignMessage(msg) {
435
- return Btc.btcSignMessage(this.transport, msg);
530
+ btcSignMessage(msg) {
531
+ return __awaiter(this, void 0, void 0, function* () {
532
+ return Btc.btcSignMessage(this.transport, msg);
533
+ });
436
534
  }
437
- async btcVerifyMessage(msg) {
438
- return Btc.btcVerifyMessage(this.transport, msg);
535
+ btcVerifyMessage(msg) {
536
+ return __awaiter(this, void 0, void 0, function* () {
537
+ return Btc.btcVerifyMessage(this.transport, msg);
538
+ });
439
539
  }
440
540
  btcGetAccountPaths(msg) {
441
541
  return Btc.btcGetAccountPaths(msg);
@@ -443,29 +543,43 @@ export class TrezorHDWallet {
443
543
  btcIsSameAccount(msg) {
444
544
  return this.info.btcIsSameAccount(msg);
445
545
  }
446
- async ethSignTx(msg) {
447
- return Eth.ethSignTx(this, this.transport, msg);
546
+ ethSignTx(msg) {
547
+ return __awaiter(this, void 0, void 0, function* () {
548
+ return Eth.ethSignTx(this, this.transport, msg);
549
+ });
448
550
  }
449
- async ethGetAddress(msg) {
450
- return Eth.ethGetAddress(this.transport, msg);
551
+ ethGetAddress(msg) {
552
+ return __awaiter(this, void 0, void 0, function* () {
553
+ return Eth.ethGetAddress(this.transport, msg);
554
+ });
451
555
  }
452
- async ethSignMessage(msg) {
453
- return Eth.ethSignMessage(this.transport, msg);
556
+ ethSignMessage(msg) {
557
+ return __awaiter(this, void 0, void 0, function* () {
558
+ return Eth.ethSignMessage(this.transport, msg);
559
+ });
454
560
  }
455
- async ethVerifyMessage(msg) {
456
- return Eth.ethVerifyMessage(this.transport, msg);
561
+ ethVerifyMessage(msg) {
562
+ return __awaiter(this, void 0, void 0, function* () {
563
+ return Eth.ethVerifyMessage(this.transport, msg);
564
+ });
457
565
  }
458
- async ethSupportsNetwork(chain_id) {
459
- return this.info.ethSupportsNetwork(chain_id);
566
+ ethSupportsNetwork(chain_id) {
567
+ return __awaiter(this, void 0, void 0, function* () {
568
+ return this.info.ethSupportsNetwork(chain_id);
569
+ });
460
570
  }
461
- async ethSupportsSecureTransfer() {
462
- return this.info.ethSupportsSecureTransfer();
571
+ ethSupportsSecureTransfer() {
572
+ return __awaiter(this, void 0, void 0, function* () {
573
+ return this.info.ethSupportsSecureTransfer();
574
+ });
463
575
  }
464
576
  ethSupportsNativeShapeShift() {
465
577
  return this.info.ethSupportsNativeShapeShift();
466
578
  }
467
- async ethSupportsEIP1559() {
468
- return await this.info.ethSupportsEIP1559();
579
+ ethSupportsEIP1559() {
580
+ return __awaiter(this, void 0, void 0, function* () {
581
+ return yield this.info.ethSupportsEIP1559();
582
+ });
469
583
  }
470
584
  ethGetAccountPaths(msg) {
471
585
  return this.info.ethGetAccountPaths(msg);
@@ -483,10 +597,11 @@ export class TrezorHDWallet {
483
597
  return this.info.ethNextAccountPath(msg);
484
598
  }
485
599
  }
486
- export function info() {
600
+ exports.TrezorHDWallet = TrezorHDWallet;
601
+ function info() {
487
602
  return new TrezorHDWalletInfo();
488
603
  }
489
- export function create(transport) {
604
+ function create(transport) {
490
605
  return new TrezorHDWallet(transport);
491
606
  }
492
607
  //# sourceMappingURL=trezor.js.map