@trezor/connect 9.0.0-beta.6 → 9.0.1

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 (86) hide show
  1. package/README.md +32 -19
  2. package/lib/api/binanceSignTransaction.js +1 -1
  3. package/lib/api/bitcoin/Fees.js +1 -1
  4. package/lib/api/bitcoin/TransactionComposer.js +1 -1
  5. package/lib/api/bitcoin/index.js +9 -9
  6. package/lib/api/bitcoin/refTx.d.ts +2 -2
  7. package/lib/api/checkFirmwareAuthenticity.d.ts +10 -0
  8. package/lib/api/checkFirmwareAuthenticity.js +44 -0
  9. package/lib/api/common/Discovery.js +1 -1
  10. package/lib/api/common/paramsValidator.d.ts +1 -1
  11. package/lib/api/composeTransaction.js +2 -2
  12. package/lib/api/eos/eosSignTx.js +1 -1
  13. package/lib/api/eosSignTransaction.js +1 -1
  14. package/lib/api/ethereum/__fixtures__/ethereumSignTypedData.js +1 -1
  15. package/lib/api/ethereum/ethereumSignTx.d.ts +2 -2
  16. package/lib/api/ethereum/ethereumSignTypedData.js +1 -1
  17. package/lib/api/ethereumSignTransaction.js +1 -1
  18. package/lib/api/firmware/calculateFirmwareHash.d.ts +1 -1
  19. package/lib/api/firmwareUpdate.js +1 -1
  20. package/lib/api/index.d.ts +1 -1
  21. package/lib/api/index.js +4 -4
  22. package/lib/api/nemSignTransaction.js +1 -1
  23. package/lib/api/signTransaction.js +1 -1
  24. package/lib/api/stellarSignTransaction.js +1 -1
  25. package/lib/api/tezos/tezosSignTx.js +1 -1
  26. package/lib/api/tezosSignTransaction.js +1 -1
  27. package/lib/backend/BlockchainLink.js +1 -1
  28. package/lib/constants/errors.d.ts +1 -2
  29. package/lib/constants/errors.js +0 -1
  30. package/lib/constants/index.js +5 -5
  31. package/lib/core/AbstractMethod.d.ts +0 -1
  32. package/lib/core/AbstractMethod.js +1 -2
  33. package/lib/core/index.d.ts +1 -1
  34. package/lib/core/index.js +1 -14
  35. package/lib/core/method.d.ts +1 -1
  36. package/lib/core/method.js +1 -1
  37. package/lib/data/DataManager.d.ts +2 -4
  38. package/lib/data/DataManager.js +4 -9
  39. package/lib/data/config.d.ts +1 -7
  40. package/lib/data/config.js +1 -9
  41. package/lib/data/connectSettings.d.ts +1 -1
  42. package/lib/data/version.d.ts +1 -1
  43. package/lib/data/version.js +1 -1
  44. package/lib/device/AbortController.js +1 -1
  45. package/lib/device/DescriptorStream.js +1 -1
  46. package/lib/device/Device.d.ts +1 -0
  47. package/lib/device/Device.js +9 -1
  48. package/lib/device/DeviceCommands.js +2 -2
  49. package/lib/device/DeviceList.d.ts +1 -5
  50. package/lib/device/DeviceList.js +7 -35
  51. package/lib/events/index.d.ts +0 -2
  52. package/lib/events/index.js +10 -10
  53. package/lib/events/ui-request.d.ts +1 -9
  54. package/lib/events/ui-request.js +0 -1
  55. package/lib/events/ui-response.d.ts +1 -10
  56. package/lib/events/ui-response.js +0 -1
  57. package/lib/exports.js +3 -3
  58. package/lib/factory.d.ts +1 -2
  59. package/lib/factory.js +2 -2
  60. package/lib/index-browser.js +1 -2
  61. package/lib/index.js +2 -35
  62. package/lib/types/api/checkFirmwareAuthenticity.d.ts +8 -0
  63. package/lib/types/api/{customMessage.js → checkFirmwareAuthenticity.js} +1 -1
  64. package/lib/types/api/index.d.ts +2 -2
  65. package/lib/types/device.d.ts +4 -0
  66. package/lib/types/index.js +15 -15
  67. package/lib/utils/__fixtures__/accountUtils.js +1 -1
  68. package/lib/utils/__fixtures__/ethereumUtils.js +1 -1
  69. package/lib/utils/__fixtures__/formatUtils.js +1 -1
  70. package/lib/utils/accountUtils.d.ts +2 -2
  71. package/lib/utils/assets-browser.js +1 -1
  72. package/lib/utils/assets.js +1 -1
  73. package/lib/utils/browserUtils.js +1 -1
  74. package/lib/utils/debug.d.ts +2 -2
  75. package/lib/utils/deviceFeaturesUtils.d.ts +1 -1
  76. package/lib/utils/ethereumUtils.d.ts +1 -1
  77. package/lib/utils/formatUtils.js +1 -1
  78. package/lib/utils/hdnodeUtils.d.ts +1 -1
  79. package/lib/utils/pathUtils.d.ts +2 -2
  80. package/lib/workers/workers-browser.js +5 -5
  81. package/lib/workers/workers-react-native.js +4 -4
  82. package/lib/workers/workers.js +4 -4
  83. package/package.json +16 -13
  84. package/lib/api/customMessage.d.ts +0 -13
  85. package/lib/api/customMessage.js +0 -56
  86. package/lib/types/api/customMessage.d.ts +0 -12
package/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # @trezor/connect API version 9.0.0-beta.6
1
+ # @trezor/connect
2
+
3
+ API version 9.0.1
2
4
 
3
5
  [![Build Status](https://github.com/trezor/trezor-suite/actions/workflows/connect-test.yml/badge.svg)](https://github.com/trezor/trezor-suite/actions/workflows/connect-test.yml)
4
6
  [![NPM](https://img.shields.io/npm/v/@trezor/connect.svg)](https://www.npmjs.org/package/@trezor/connect)
@@ -6,33 +8,44 @@
6
8
 
7
9
  Trezor Connect is a platform for easy integration of Trezor into 3rd party services, as well as into Trezor Suite. It provides an API with functionality to access public keys, sign transactions and authenticate users.
8
10
 
9
- User interface is presented in a secure popup window served from `connect.trezor.io/<version>/popup.html`. To try it out, use [@trezor/connect-explorer](../connect-explorer) hosted [here](https://trezor.github.io/trezor-suite/connect-explorer).
11
+ This package is intended to be used in node.js environment. If you wan't to build a web application please refer to [@trezor/connect-web package](../connect-web/README.md).
10
12
 
11
- - [Integration](https://github.com/trezor/trezor-suite/blob/develop/docs/packages/connect/index.md)
13
+ ## Installation
12
14
 
13
- ## Version 9+ (experimental)
15
+ Install library as npm module:
14
16
 
15
- Since version 9 we are adopting a new versioning strategy. With every release, we are going to update two urls
17
+ ```javascript
18
+ npm install @trezor/connect
19
+ ```
20
+
21
+ or
22
+
23
+ ```javascript
24
+ yarn add @trezor/connect
25
+ ```
26
+
27
+ ## Initialization
16
28
 
17
- - A] The latest release will always be available on https://connect.trezor.io/9/trezor-connect.js.
18
- - B] For those who like to have more control over their dependencies, there will be also a new url created in form of https://connect.trezor.io/9.1../trezor-connect.js. Please note that these endpoints will not receive any further updates including security updates.
29
+ ES6
19
30
 
20
- Version 9+ will be available as `@trezor/connect` and `@trezor/connect-web` npm packages.
31
+ ```javascript
32
+ import TrezorConnect from '@trezor/connect';
33
+ ```
34
+
35
+ For more instructions [refer to this document](../../docs/packages/connect/index.md)
36
+
37
+ ## Version 9 (stable)
38
+
39
+ Since version 9 we are adopting a new versioning strategy. With every release, we are going to update two urls
21
40
 
22
- ## Step by step release process
41
+ - A) The latest release will always be available on https://connect.trezor.io/9/trezor-connect.js.
42
+ - B) For those who like to have more control over their dependencies, there will be also a new url created in form of https://connect.trezor.io/9.1../trezor-connect.js. Please note that these endpoints will not receive any further updates including security updates.
23
43
 
24
- - Make sure you have released all [npm dependencies](../../releases/npm-packages.md).
25
- - Optional: if unsure run `node ./ci/scripts/check-npm-dependencies.js connect`. Please note that this script will report unreleased dependencies even for changes that do not affect runtime (READMEs etc.)
26
- - bump version in all @trezor/connect\* packages (except plugin packages). `yarn workspace @trezor/connect version:<beta|patch|minor|major>`
27
- - make sure CHANGELOG files have been updated
28
- - merge into develop branch
29
- - from develop branch create a pull requests into branch `release/connect-v9`
30
- - gitlab: click manual release `@trezor/connect-web` and `@trezor/connect` into npm
31
- - gitlab: click manual deploy job to connect.trezor.io/9
44
+ Version 9 is available as `@trezor/connect` and `@trezor/connect-web` npm packages.
32
45
 
33
- ## Version 8 (stable)
46
+ ## Version 8 (legacy)
34
47
 
35
- Currently, we are at version 8, which has an url https://connect.trezor.io/8/trezor-connect.js.
48
+ Legacy version 8 is accessible from url https://connect.trezor.io/8/trezor-connect.js.
36
49
 
37
50
  Version 8 is available as `trezor-connect` npm package.
38
51
 
@@ -5,7 +5,7 @@ const AbstractMethod_1 = require("../core/AbstractMethod");
5
5
  const paramsValidator_1 = require("./common/paramsValidator");
6
6
  const coinInfo_1 = require("../data/coinInfo");
7
7
  const pathUtils_1 = require("../utils/pathUtils");
8
- const helper = (0, tslib_1.__importStar)(require("./binance/binanceSignTx"));
8
+ const helper = tslib_1.__importStar(require("./binance/binanceSignTx"));
9
9
  class BinanceSignTransaction extends AbstractMethod_1.AbstractMethod {
10
10
  init() {
11
11
  this.requiredPermissions = ['read', 'write'];
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FeeLevels = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const bignumber_js_1 = (0, tslib_1.__importDefault)(require("bignumber.js"));
5
+ const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
6
6
  const BLOCKS = {
7
7
  btc: {
8
8
  high: 1,
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TransactionComposer = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const bignumber_js_1 = (0, tslib_1.__importDefault)(require("bignumber.js"));
5
+ const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
6
6
  const utxo_lib_1 = require("@trezor/utxo-lib");
7
7
  const Fees_1 = require("./Fees");
8
8
  const pathUtils_1 = require("../../utils/pathUtils");
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- (0, tslib_1.__exportStar)(require("./enhanceSignTx"), exports);
5
- (0, tslib_1.__exportStar)(require("./Fees"), exports);
6
- (0, tslib_1.__exportStar)(require("./inputs"), exports);
7
- (0, tslib_1.__exportStar)(require("./outputs"), exports);
8
- (0, tslib_1.__exportStar)(require("./refTx"), exports);
9
- (0, tslib_1.__exportStar)(require("./signtx"), exports);
10
- (0, tslib_1.__exportStar)(require("./signtxLegacy"), exports);
11
- (0, tslib_1.__exportStar)(require("./signtxVerify"), exports);
12
- (0, tslib_1.__exportStar)(require("./TransactionComposer"), exports);
4
+ tslib_1.__exportStar(require("./enhanceSignTx"), exports);
5
+ tslib_1.__exportStar(require("./Fees"), exports);
6
+ tslib_1.__exportStar(require("./inputs"), exports);
7
+ tslib_1.__exportStar(require("./outputs"), exports);
8
+ tslib_1.__exportStar(require("./refTx"), exports);
9
+ tslib_1.__exportStar(require("./signtx"), exports);
10
+ tslib_1.__exportStar(require("./signtxLegacy"), exports);
11
+ tslib_1.__exportStar(require("./signtxVerify"), exports);
12
+ tslib_1.__exportStar(require("./TransactionComposer"), exports);
13
13
  //# sourceMappingURL=index.js.map
@@ -2,10 +2,10 @@ import type { TypedRawTransaction } from '@trezor/blockchain-link';
2
2
  import type { CoinInfo, AccountAddresses } from '../../types';
3
3
  import type { RefTransaction, TransactionOptions } from '../../types/api/bitcoin';
4
4
  import type { PROTO } from '../../constants';
5
- export declare const requireReferencedTransactions: (inputs: PROTO.TxInputType[], options?: TransactionOptions, coinInfo?: CoinInfo | undefined) => boolean;
5
+ export declare const requireReferencedTransactions: (inputs: PROTO.TxInputType[], options?: TransactionOptions, coinInfo?: CoinInfo) => boolean;
6
6
  export declare const getReferencedTransactions: (inputs: PROTO.TxInputType[]) => string[];
7
7
  export declare const getOrigTransactions: (inputs: PROTO.TxInputType[], outputs: PROTO.TxOutputType[]) => string[];
8
- export declare const transformOrigTransactions: (txs: TypedRawTransaction[], coinInfo: CoinInfo, addresses?: AccountAddresses | undefined) => RefTransaction[];
8
+ export declare const transformOrigTransactions: (txs: TypedRawTransaction[], coinInfo: CoinInfo, addresses?: AccountAddresses) => RefTransaction[];
9
9
  export declare const transformReferencedTransactions: (txs: TypedRawTransaction[], coinInfo: CoinInfo) => RefTransaction[];
10
10
  export declare const validateReferencedTransactions: (txs: RefTransaction[] | typeof undefined, inputs: PROTO.TxInputType[], outputs: PROTO.TxOutputType[]) => RefTransaction[] | undefined;
11
11
  //# sourceMappingURL=refTx.d.ts.map
@@ -0,0 +1,10 @@
1
+ import { AbstractMethod } from '../core/AbstractMethod';
2
+ export default class CheckFirmwareAuthenticity extends AbstractMethod<'checkFirmwareAuthenticity'> {
3
+ init(): void;
4
+ run(): Promise<{
5
+ expectedFirmwareHash: string;
6
+ actualFirmwareHash: string;
7
+ valid: boolean;
8
+ }>;
9
+ }
10
+ //# sourceMappingURL=checkFirmwareAuthenticity.d.ts.map
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ const randombytes_1 = tslib_1.__importDefault(require("randombytes"));
5
+ const AbstractMethod_1 = require("../core/AbstractMethod");
6
+ const firmware_1 = require("./firmware");
7
+ const firmwareInfo_1 = require("../data/firmwareInfo");
8
+ const constants_1 = require("../constants");
9
+ const assets_1 = require("../utils/assets");
10
+ class CheckFirmwareAuthenticity extends AbstractMethod_1.AbstractMethod {
11
+ init() {
12
+ this.useEmptyPassphrase = true;
13
+ this.requiredPermissions = ['management'];
14
+ this.useDeviceState = false;
15
+ }
16
+ async run() {
17
+ const { device } = this;
18
+ const deviceVersion = `${device.features.major_version}.${device.features.minor_version}.${device.features.patch_version}`;
19
+ const releases = (0, firmwareInfo_1.getReleases)(device.features.major_version);
20
+ const release = releases.find(release => release.version.join('.') === deviceVersion);
21
+ if (!release) {
22
+ throw constants_1.ERRORS.TypedError('Runtime', 'checkFirmwareAuthenticity: No release found for device firmware');
23
+ }
24
+ const baseUrl = `https://data.trezor.io/firmware/${device.features.major_version}`;
25
+ const fwUrl = `${baseUrl}/trezor-${deviceVersion}${device.firmwareType === 'bitcoin-only' ? '-bitcoinonly.bin' : '.bin'}`;
26
+ const fw = await (0, assets_1.httpRequest)(fwUrl, 'binary');
27
+ if (!fw) {
28
+ throw constants_1.ERRORS.TypedError('Runtime', 'checkFirmwareAuthenticity: firmware binary not found');
29
+ }
30
+ const { hash: expectedFirmwareHash, challenge } = (0, firmware_1.calculateFirmwareHash)(device.features.major_version, (0, firmware_1.stripFwHeaders)(fw), (0, randombytes_1.default)(32));
31
+ const result = await this.device.commands.typedCall('GetFirmwareHash', 'FirmwareHash', {
32
+ challenge,
33
+ });
34
+ const { message } = result;
35
+ const { hash: actualFirmwareHash } = message;
36
+ return {
37
+ expectedFirmwareHash,
38
+ actualFirmwareHash,
39
+ valid: actualFirmwareHash === expectedFirmwareHash,
40
+ };
41
+ }
42
+ }
43
+ exports.default = CheckFirmwareAuthenticity;
44
+ //# sourceMappingURL=checkFirmwareAuthenticity.js.map
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Discovery = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const events_1 = (0, tslib_1.__importDefault)(require("events"));
5
+ const events_1 = tslib_1.__importDefault(require("events"));
6
6
  const constants_1 = require("../../constants");
7
7
  const accountUtils_1 = require("../../utils/accountUtils");
8
8
  const formatUtils_1 = require("../../utils/formatUtils");
@@ -8,7 +8,7 @@ declare type Param = {
8
8
  allowNegative?: boolean;
9
9
  };
10
10
  export declare function validateParams<P extends Record<string, any>>(params: P, schema: Param[]): P;
11
- export declare const validateCoinPath: (path: number[], coinInfo?: CoinInfo | undefined) => void;
11
+ export declare const validateCoinPath: (path: number[], coinInfo?: CoinInfo) => void;
12
12
  export declare const getFirmwareRange: (method: string, coinInfo: CoinInfo | null | undefined, currentRange: FirmwareRange) => FirmwareRange;
13
13
  export {};
14
14
  //# sourceMappingURL=paramsValidator.d.ts.map
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const bignumber_js_1 = (0, tslib_1.__importDefault)(require("bignumber.js"));
4
+ const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
5
5
  const AbstractMethod_1 = require("../core/AbstractMethod");
6
6
  const constants_1 = require("../constants");
7
7
  const events_1 = require("../events");
8
8
  const Discovery_1 = require("./common/Discovery");
9
9
  const paramsValidator_1 = require("./common/paramsValidator");
10
- const pathUtils = (0, tslib_1.__importStar)(require("../utils/pathUtils"));
10
+ const pathUtils = tslib_1.__importStar(require("../utils/pathUtils"));
11
11
  const promiseUtils_1 = require("../utils/promiseUtils");
12
12
  const formatUtils_1 = require("../utils/formatUtils");
13
13
  const coinInfo_1 = require("../data/coinInfo");
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.signTx = exports.validate = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const bs58 = (0, tslib_1.__importStar)(require("bs58"));
5
+ const bs58 = tslib_1.__importStar(require("bs58"));
6
6
  const constants_1 = require("../../constants");
7
7
  const binaryToDecimal = (bignum, minDigits = 1) => {
8
8
  const result = Array(minDigits).fill('0'.charCodeAt(0));
@@ -5,7 +5,7 @@ const AbstractMethod_1 = require("../core/AbstractMethod");
5
5
  const paramsValidator_1 = require("./common/paramsValidator");
6
6
  const coinInfo_1 = require("../data/coinInfo");
7
7
  const pathUtils_1 = require("../utils/pathUtils");
8
- const helper = (0, tslib_1.__importStar)(require("./eos/eosSignTx"));
8
+ const helper = tslib_1.__importStar(require("./eos/eosSignTx"));
9
9
  class EosSignTransaction extends AbstractMethod_1.AbstractMethod {
10
10
  init() {
11
11
  this.requiredPermissions = ['read', 'write'];
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.encodeData = exports.getFieldType = exports.parseArrayType = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const bignumber_js_1 = (0, tslib_1.__importDefault)(require("bignumber.js"));
5
+ const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
6
6
  const errors_1 = require("../../../constants/errors");
7
7
  const constants_1 = require("../../../constants");
8
8
  exports.parseArrayType = [
@@ -1,11 +1,11 @@
1
1
  import type { TypedCall } from '../../device/DeviceCommands';
2
2
  import type { EthereumAccessList } from '../../types/api/ethereum';
3
- export declare const ethereumSignTx: (typedCall: TypedCall, address_n: number[], to: string, value: string, gas_limit: string, gas_price: string, nonce: string, chain_id: number, data?: string | undefined, tx_type?: number | undefined) => Promise<{
3
+ export declare const ethereumSignTx: (typedCall: TypedCall, address_n: number[], to: string, value: string, gas_limit: string, gas_price: string, nonce: string, chain_id: number, data?: string, tx_type?: number) => Promise<{
4
4
  v: string;
5
5
  r: string;
6
6
  s: string;
7
7
  }>;
8
- export declare const ethereumSignTxEIP1559: (typedCall: TypedCall, address_n: number[], to: string, value: string, gas_limit: string, max_gas_fee: string, max_priority_fee: string, nonce: string, chain_id: number, data?: string | undefined, access_list?: EthereumAccessList[] | undefined) => Promise<{
8
+ export declare const ethereumSignTxEIP1559: (typedCall: TypedCall, address_n: number[], to: string, value: string, gas_limit: string, max_gas_fee: string, max_priority_fee: string, nonce: string, chain_id: number, data?: string, access_list?: EthereumAccessList[]) => Promise<{
9
9
  v: string;
10
10
  r: string;
11
11
  s: string;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFieldType = exports.encodeData = exports.parseArrayType = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const bignumber_js_1 = (0, tslib_1.__importDefault)(require("bignumber.js"));
5
+ const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
6
6
  const constants_1 = require("../../constants");
7
7
  const formatUtils_1 = require("../../utils/formatUtils");
8
8
  const paramTypeArray = new RegExp(/^(.*)\[([0-9]*)\]$/);
@@ -7,7 +7,7 @@ const pathUtils_1 = require("../utils/pathUtils");
7
7
  const coinInfo_1 = require("../data/coinInfo");
8
8
  const ethereumUtils_1 = require("../utils/ethereumUtils");
9
9
  const formatUtils_1 = require("../utils/formatUtils");
10
- const helper = (0, tslib_1.__importStar)(require("./ethereum/ethereumSignTx"));
10
+ const helper = tslib_1.__importStar(require("./ethereum/ethereumSignTx"));
11
11
  const strip = value => {
12
12
  if (typeof value === 'string') {
13
13
  let stripped = (0, formatUtils_1.stripHexPrefix)(value);
@@ -1,5 +1,5 @@
1
1
  /// <reference types="node" />
2
- export declare const calculateFirmwareHash: (major_version: number, fw: ArrayBuffer, key?: Buffer | undefined) => {
2
+ export declare const calculateFirmwareHash: (major_version: number, fw: ArrayBuffer, key?: Buffer) => {
3
3
  hash: string;
4
4
  challenge: string;
5
5
  };
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const randombytes_1 = (0, tslib_1.__importDefault)(require("randombytes"));
4
+ const randombytes_1 = tslib_1.__importDefault(require("randombytes"));
5
5
  const AbstractMethod_1 = require("../core/AbstractMethod");
6
6
  const constants_1 = require("../constants");
7
7
  const events_1 = require("../events");
@@ -23,7 +23,6 @@ export { default as cardanoSignTransaction } from './cardanoSignTransaction';
23
23
  export { default as changePin } from './changePin';
24
24
  export { default as cipherKeyValue } from './cipherKeyValue';
25
25
  export { default as composeTransaction } from './composeTransaction';
26
- export { default as customMessage } from './customMessage';
27
26
  export { default as eosGetPublicKey } from './eosGetPublicKey';
28
27
  export { default as eosSignTransaction } from './eosSignTransaction';
29
28
  export { default as ethereumGetAddress } from './ethereumGetAddress';
@@ -62,4 +61,5 @@ export { default as tezosGetPublicKey } from './tezosGetPublicKey';
62
61
  export { default as tezosSignTransaction } from './tezosSignTransaction';
63
62
  export { default as verifyMessage } from './verifyMessage';
64
63
  export { default as wipeDevice } from './wipeDevice';
64
+ export { default as checkFirmwareAuthenticity } from './checkFirmwareAuthenticity';
65
65
  //# sourceMappingURL=index.d.ts.map
package/lib/api/index.js CHANGED
@@ -3,8 +3,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.recoveryDevice = exports.rebootToBootloader = exports.pushTransaction = exports.nemSignTransaction = exports.nemGetAddress = exports.getSettings = exports.getPublicKey = exports.getOwnershipProof = exports.getOwnershipId = exports.getFirmwareHash = exports.getFeatures = exports.getDeviceState = exports.getCoinInfo = exports.getAddress = exports.getAccountInfo = exports.firmwareUpdate = exports.ethereumVerifyMessage = exports.ethereumSignTypedData = exports.ethereumSignTransaction = exports.ethereumSignMessage = exports.ethereumGetPublicKey = exports.ethereumGetAddress = exports.eosSignTransaction = exports.eosGetPublicKey = exports.customMessage = exports.composeTransaction = exports.cipherKeyValue = exports.changePin = exports.cardanoSignTransaction = exports.cardanoGetPublicKey = exports.cardanoGetNativeScriptHash = exports.cardanoGetAddress = exports.blockchainUnsubscribeFiatRates = exports.blockchainUnsubscribe = exports.blockchainSubscribeFiatRates = exports.blockchainSubscribe = exports.blockchainSetCustomBackend = exports.blockchainGetTransactions = exports.blockchainGetFiatRatesForTimestamps = exports.blockchainGetCurrentFiatRates = exports.blockchainGetAccountBalanceHistory = exports.blockchainEstimateFee = exports.blockchainDisconnect = exports.binanceSignTransaction = exports.binanceGetPublicKey = exports.binanceGetAddress = exports.backupDevice = exports.authorizeCoinJoin = exports.applySettings = exports.applyFlags = void 0;
7
- exports.wipeDevice = exports.verifyMessage = exports.tezosSignTransaction = exports.tezosGetPublicKey = exports.tezosGetAddress = exports.stellarSignTransaction = exports.stellarGetAddress = exports.signTransaction = exports.signMessage = exports.setProxy = exports.rippleSignTransaction = exports.rippleGetAddress = exports.resetDevice = exports.requestLogin = void 0;
6
+ exports.requestLogin = exports.recoveryDevice = exports.rebootToBootloader = exports.pushTransaction = exports.nemSignTransaction = exports.nemGetAddress = exports.getSettings = exports.getPublicKey = exports.getOwnershipProof = exports.getOwnershipId = exports.getFirmwareHash = exports.getFeatures = exports.getDeviceState = exports.getCoinInfo = exports.getAddress = exports.getAccountInfo = exports.firmwareUpdate = exports.ethereumVerifyMessage = exports.ethereumSignTypedData = exports.ethereumSignTransaction = exports.ethereumSignMessage = exports.ethereumGetPublicKey = exports.ethereumGetAddress = exports.eosSignTransaction = exports.eosGetPublicKey = exports.composeTransaction = exports.cipherKeyValue = exports.changePin = exports.cardanoSignTransaction = exports.cardanoGetPublicKey = exports.cardanoGetNativeScriptHash = exports.cardanoGetAddress = exports.blockchainUnsubscribeFiatRates = exports.blockchainUnsubscribe = exports.blockchainSubscribeFiatRates = exports.blockchainSubscribe = exports.blockchainSetCustomBackend = exports.blockchainGetTransactions = exports.blockchainGetFiatRatesForTimestamps = exports.blockchainGetCurrentFiatRates = exports.blockchainGetAccountBalanceHistory = exports.blockchainEstimateFee = exports.blockchainDisconnect = exports.binanceSignTransaction = exports.binanceGetPublicKey = exports.binanceGetAddress = exports.backupDevice = exports.authorizeCoinJoin = exports.applySettings = exports.applyFlags = void 0;
7
+ exports.checkFirmwareAuthenticity = exports.wipeDevice = exports.verifyMessage = exports.tezosSignTransaction = exports.tezosGetPublicKey = exports.tezosGetAddress = exports.stellarSignTransaction = exports.stellarGetAddress = exports.signTransaction = exports.signMessage = exports.setProxy = exports.rippleSignTransaction = exports.rippleGetAddress = exports.resetDevice = void 0;
8
8
  var applyFlags_1 = require("./applyFlags");
9
9
  Object.defineProperty(exports, "applyFlags", { enumerable: true, get: function () { return __importDefault(applyFlags_1).default; } });
10
10
  var applySettings_1 = require("./applySettings");
@@ -55,8 +55,6 @@ var cipherKeyValue_1 = require("./cipherKeyValue");
55
55
  Object.defineProperty(exports, "cipherKeyValue", { enumerable: true, get: function () { return __importDefault(cipherKeyValue_1).default; } });
56
56
  var composeTransaction_1 = require("./composeTransaction");
57
57
  Object.defineProperty(exports, "composeTransaction", { enumerable: true, get: function () { return __importDefault(composeTransaction_1).default; } });
58
- var customMessage_1 = require("./customMessage");
59
- Object.defineProperty(exports, "customMessage", { enumerable: true, get: function () { return __importDefault(customMessage_1).default; } });
60
58
  var eosGetPublicKey_1 = require("./eosGetPublicKey");
61
59
  Object.defineProperty(exports, "eosGetPublicKey", { enumerable: true, get: function () { return __importDefault(eosGetPublicKey_1).default; } });
62
60
  var eosSignTransaction_1 = require("./eosSignTransaction");
@@ -133,4 +131,6 @@ var verifyMessage_1 = require("./verifyMessage");
133
131
  Object.defineProperty(exports, "verifyMessage", { enumerable: true, get: function () { return __importDefault(verifyMessage_1).default; } });
134
132
  var wipeDevice_1 = require("./wipeDevice");
135
133
  Object.defineProperty(exports, "wipeDevice", { enumerable: true, get: function () { return __importDefault(wipeDevice_1).default; } });
134
+ var checkFirmwareAuthenticity_1 = require("./checkFirmwareAuthenticity");
135
+ Object.defineProperty(exports, "checkFirmwareAuthenticity", { enumerable: true, get: function () { return __importDefault(checkFirmwareAuthenticity_1).default; } });
136
136
  //# sourceMappingURL=index.js.map
@@ -5,7 +5,7 @@ const AbstractMethod_1 = require("../core/AbstractMethod");
5
5
  const paramsValidator_1 = require("./common/paramsValidator");
6
6
  const coinInfo_1 = require("../data/coinInfo");
7
7
  const pathUtils_1 = require("../utils/pathUtils");
8
- const helper = (0, tslib_1.__importStar)(require("./nem/nemSignTx"));
8
+ const helper = tslib_1.__importStar(require("./nem/nemSignTx"));
9
9
  class NEMSignTransaction extends AbstractMethod_1.AbstractMethod {
10
10
  init() {
11
11
  this.requiredPermissions = ['read', 'write'];
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- const bignumber_js_1 = (0, tslib_1.__importDefault)(require("bignumber.js"));
4
+ const bignumber_js_1 = tslib_1.__importDefault(require("bignumber.js"));
5
5
  const AbstractMethod_1 = require("../core/AbstractMethod");
6
6
  const paramsValidator_1 = require("./common/paramsValidator");
7
7
  const coinInfo_1 = require("../data/coinInfo");
@@ -5,7 +5,7 @@ const AbstractMethod_1 = require("../core/AbstractMethod");
5
5
  const paramsValidator_1 = require("./common/paramsValidator");
6
6
  const coinInfo_1 = require("../data/coinInfo");
7
7
  const pathUtils_1 = require("../utils/pathUtils");
8
- const helper = (0, tslib_1.__importStar)(require("./stellar/stellarSignTx"));
8
+ const helper = tslib_1.__importStar(require("./stellar/stellarSignTx"));
9
9
  const constants_1 = require("../constants");
10
10
  const StellarSignTransactionFeatures = Object.freeze({
11
11
  manageBuyOffer: ['1.10.4', '2.4.3'],
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createTx = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const bs58check = (0, tslib_1.__importStar)(require("bs58check"));
5
+ const bs58check = tslib_1.__importStar(require("bs58check"));
6
6
  const constants_1 = require("../../constants");
7
7
  const paramsValidator_1 = require("../common/paramsValidator");
8
8
  const PREFIX = {
@@ -5,7 +5,7 @@ const AbstractMethod_1 = require("../core/AbstractMethod");
5
5
  const paramsValidator_1 = require("./common/paramsValidator");
6
6
  const coinInfo_1 = require("../data/coinInfo");
7
7
  const pathUtils_1 = require("../utils/pathUtils");
8
- const helper = (0, tslib_1.__importStar)(require("./tezos/tezosSignTx"));
8
+ const helper = tslib_1.__importStar(require("./tezos/tezosSignTx"));
9
9
  class TezosSignTransaction extends AbstractMethod_1.AbstractMethod {
10
10
  init() {
11
11
  this.requiredPermissions = ['read', 'write'];
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.dispose = exports.reconnectAllBackends = exports.initBlockchain = exports.isBackendSupported = exports.setCustomBackend = exports.findBackend = exports.Blockchain = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const blockchain_link_1 = (0, tslib_1.__importDefault)(require("@trezor/blockchain-link"));
5
+ const blockchain_link_1 = tslib_1.__importDefault(require("@trezor/blockchain-link"));
6
6
  const config_1 = require("../data/config");
7
7
  const DataManager_1 = require("../data/DataManager");
8
8
  const events_1 = require("../events");
@@ -16,7 +16,6 @@ export declare const ERROR_CODES: {
16
16
  Method_UnknownCoin: string;
17
17
  Method_AddressNotMatch: string;
18
18
  Method_FirmwareUpdate_DownloadFailed: string;
19
- Method_CustomMessage_Callback: string;
20
19
  Method_Discovery_BundleException: string;
21
20
  Method_Override: string;
22
21
  Method_NoResponse: string;
@@ -40,7 +39,7 @@ export declare class TrezorError extends Error {
40
39
  message: string;
41
40
  constructor(code: string, message: string);
42
41
  }
43
- export declare const TypedError: (id: keyof typeof ERROR_CODES, message?: string | undefined) => TrezorError;
42
+ export declare const TypedError: (id: keyof typeof ERROR_CODES, message?: string) => TrezorError;
44
43
  export declare const serializeError: (payload: any) => any;
45
44
  export declare const WRONG_PREVIOUS_SESSION_ERROR_MESSAGE = "wrong previous session";
46
45
  export declare const INVALID_PIN_ERROR_MESSAGE = "PIN invalid";
@@ -19,7 +19,6 @@ exports.ERROR_CODES = {
19
19
  Method_UnknownCoin: 'Coin not found',
20
20
  Method_AddressNotMatch: 'Addresses do not match',
21
21
  Method_FirmwareUpdate_DownloadFailed: 'Failed to download firmware binary',
22
- Method_CustomMessage_Callback: 'Parameter "callback" is not a function',
23
22
  Method_Discovery_BundleException: '',
24
23
  Method_Override: 'override',
25
24
  Method_NoResponse: 'Call resolved without response',
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PROTO = exports.NEM = exports.CARDANO = exports.NETWORK = exports.ERRORS = void 0;
4
4
  const tslib_1 = require("tslib");
5
- exports.ERRORS = (0, tslib_1.__importStar)(require("./errors"));
6
- exports.NETWORK = (0, tslib_1.__importStar)(require("./network"));
7
- exports.CARDANO = (0, tslib_1.__importStar)(require("./cardano"));
8
- exports.NEM = (0, tslib_1.__importStar)(require("./nem"));
9
- exports.PROTO = (0, tslib_1.__importStar)(require("@trezor/transport/lib/types/messages"));
5
+ exports.ERRORS = tslib_1.__importStar(require("./errors"));
6
+ exports.NETWORK = tslib_1.__importStar(require("./network"));
7
+ exports.CARDANO = tslib_1.__importStar(require("./cardano"));
8
+ exports.NEM = tslib_1.__importStar(require("./nem"));
9
+ exports.PROTO = tslib_1.__importStar(require("@trezor/transport/lib/types/messages"));
10
10
  //# sourceMappingURL=index.js.map
@@ -53,7 +53,6 @@ export declare abstract class AbstractMethod<Name extends CallMethodPayload['met
53
53
  checkFirmwareRange(isUsingPopup?: boolean): Promise<"ui-device_firmware_old" | "ui-device_firmware_unsupported" | "ui-device_firmware_not_compatible" | "ui-device_firmware_not_installed" | undefined>;
54
54
  abstract init(): void;
55
55
  abstract run(): Promise<MethodReturnType<Name>>;
56
- getCustomMessages(): void;
57
56
  dispose(): void;
58
57
  }
59
58
  //# sourceMappingURL=AbstractMethod.d.ts.map
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AbstractMethod = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const storage = (0, tslib_1.__importStar)(require("@trezor/connect-common/lib/storage"));
5
+ const storage = tslib_1.__importStar(require("@trezor/connect-common/lib/storage"));
6
6
  const DataManager_1 = require("../data/DataManager");
7
7
  const constants_1 = require("../constants");
8
8
  const events_1 = require("../events");
@@ -152,7 +152,6 @@ class AbstractMethod {
152
152
  }
153
153
  }
154
154
  }
155
- getCustomMessages() { }
156
155
  dispose() { }
157
156
  }
158
157
  exports.AbstractMethod = AbstractMethod;
@@ -7,7 +7,7 @@ export declare const onCall: (message: CoreMessage) => Promise<void>;
7
7
  export declare class Core extends EventEmitter {
8
8
  handleMessage(message: any, isTrustedOrigin: boolean): void;
9
9
  dispose(): void;
10
- getCurrentMethod(): (import("../api").applyFlags | import("../api").applySettings | import("../api").authorizeCoinJoin | import("../api").backupDevice | import("../api").binanceGetAddress | import("../api").binanceGetPublicKey | import("../api").binanceSignTransaction | import("../api").blockchainDisconnect | import("../api").blockchainEstimateFee | import("../api").blockchainGetAccountBalanceHistory | import("../api").blockchainGetCurrentFiatRates | import("../api").blockchainGetFiatRatesForTimestamps | import("../api").blockchainGetTransactions | import("../api").blockchainSetCustomBackend | import("../api").blockchainSubscribe | import("../api").blockchainSubscribeFiatRates | import("../api").blockchainUnsubscribe | import("../api").blockchainUnsubscribeFiatRates | import("../api").cardanoGetAddress | import("../api").cardanoGetNativeScriptHash | import("../api").cardanoGetPublicKey | import("../api").cardanoSignTransaction | import("../api").changePin | import("../api").cipherKeyValue | import("../api").composeTransaction | import("../api").customMessage | import("../api").eosGetPublicKey | import("../api").eosSignTransaction | import("../api").ethereumGetAddress | import("../api").ethereumGetPublicKey | import("../api").ethereumSignMessage | import("../api").ethereumSignTransaction | import("../api").ethereumSignTypedData | import("../api").ethereumVerifyMessage | import("../api").firmwareUpdate | import("../api").getAccountInfo | import("../api").getAddress | import("../api").getCoinInfo | import("../api").getDeviceState | import("../api").getFeatures | import("../api").getFirmwareHash | import("../api").getOwnershipId | import("../api").getOwnershipProof | import("../api").getPublicKey | import("../api").getSettings | import("../api").nemGetAddress | import("../api").nemSignTransaction | import("../api").pushTransaction | import("../api").rebootToBootloader | import("../api").recoveryDevice | import("../api").requestLogin | import("../api").resetDevice | import("../api").rippleGetAddress | import("../api").rippleSignTransaction | import("../api").setProxy | import("../api").signMessage | import("../api").signTransaction | import("../api").stellarGetAddress | import("../api").stellarSignTransaction | import("../api").tezosGetAddress | import("../api").tezosGetPublicKey | import("../api").tezosSignTransaction | import("../api").verifyMessage | import("../api").wipeDevice)[];
10
+ getCurrentMethod(): (import("../api").applyFlags | import("../api").applySettings | import("../api").authorizeCoinJoin | import("../api").backupDevice | import("../api").binanceGetAddress | import("../api").binanceGetPublicKey | import("../api").binanceSignTransaction | import("../api").blockchainDisconnect | import("../api").blockchainEstimateFee | import("../api").blockchainGetAccountBalanceHistory | import("../api").blockchainGetCurrentFiatRates | import("../api").blockchainGetFiatRatesForTimestamps | import("../api").blockchainGetTransactions | import("../api").blockchainSetCustomBackend | import("../api").blockchainSubscribe | import("../api").blockchainSubscribeFiatRates | import("../api").blockchainUnsubscribe | import("../api").blockchainUnsubscribeFiatRates | import("../api").cardanoGetAddress | import("../api").cardanoGetNativeScriptHash | import("../api").cardanoGetPublicKey | import("../api").cardanoSignTransaction | import("../api").changePin | import("../api").cipherKeyValue | import("../api").composeTransaction | import("../api").eosGetPublicKey | import("../api").eosSignTransaction | import("../api").ethereumGetAddress | import("../api").ethereumGetPublicKey | import("../api").ethereumSignMessage | import("../api").ethereumSignTransaction | import("../api").ethereumSignTypedData | import("../api").ethereumVerifyMessage | import("../api").firmwareUpdate | import("../api").getAccountInfo | import("../api").getAddress | import("../api").getCoinInfo | import("../api").getDeviceState | import("../api").getFeatures | import("../api").getFirmwareHash | import("../api").getOwnershipId | import("../api").getOwnershipProof | import("../api").getPublicKey | import("../api").getSettings | import("../api").nemGetAddress | import("../api").nemSignTransaction | import("../api").pushTransaction | import("../api").rebootToBootloader | import("../api").recoveryDevice | import("../api").requestLogin | import("../api").resetDevice | import("../api").rippleGetAddress | import("../api").rippleSignTransaction | import("../api").setProxy | import("../api").signMessage | import("../api").signTransaction | import("../api").stellarGetAddress | import("../api").stellarSignTransaction | import("../api").tezosGetAddress | import("../api").tezosGetPublicKey | import("../api").tezosSignTransaction | import("../api").verifyMessage | import("../api").wipeDevice | import("../api").checkFirmwareAuthenticity)[];
11
11
  getTransportInfo(): TransportInfo;
12
12
  }
13
13
  export declare const initCore: () => Core;
package/lib/core/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initTransport = exports.init = exports.initCore = exports.Core = exports.onCall = exports.handleMessage = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const events_1 = (0, tslib_1.__importDefault)(require("events"));
5
+ const events_1 = tslib_1.__importDefault(require("events"));
6
6
  const DataManager_1 = require("../data/DataManager");
7
7
  const DeviceList_1 = require("../device/DeviceList");
8
8
  const constants_1 = require("../constants");
@@ -57,7 +57,6 @@ const handleMessage = (message, isTrustedOrigin = false) => {
57
57
  const safeMessages = [
58
58
  events_2.IFRAME.CALL,
59
59
  events_2.POPUP.CLOSED,
60
- events_2.UI.CUSTOM_MESSAGE_RESPONSE,
61
60
  events_2.UI.LOGIN_CHALLENGE_RESPONSE,
62
61
  events_2.TRANSPORT.DISABLE_WEBUSB,
63
62
  ];
@@ -82,7 +81,6 @@ const handleMessage = (message, isTrustedOrigin = false) => {
82
81
  case events_2.UI.INVALID_PASSPHRASE_ACTION:
83
82
  case events_2.UI.RECEIVE_ACCOUNT:
84
83
  case events_2.UI.RECEIVE_FEE:
85
- case events_2.UI.CUSTOM_MESSAGE_RESPONSE:
86
84
  case events_2.UI.RECEIVE_WORD:
87
85
  case events_2.UI.LOGIN_CHALLENGE_RESPONSE: {
88
86
  const uiPromise = findUiPromise(message.type);
@@ -255,9 +253,6 @@ const onCall = async (message) => {
255
253
  device.on(events_2.DEVICE.PASSPHRASE_ON_DEVICE, () => {
256
254
  postMessage((0, events_2.createUiMessage)(events_2.UI.REQUEST_PASSPHRASE_ON_DEVICE, { device: device.toMessageObject() }));
257
255
  });
258
- if (_deviceList) {
259
- await _deviceList.reconfigure(device.getVersion());
260
- }
261
256
  try {
262
257
  let PIN_TRIES = 1;
263
258
  const MAX_PIN_TRIES = 3;
@@ -311,9 +306,6 @@ const onCall = async (message) => {
311
306
  return Promise.reject(constants_1.ERRORS.TypedError('Method_Cancel'));
312
307
  }
313
308
  }
314
- if (_deviceList) {
315
- await _deviceList.reconfigure(device.getVersion());
316
- }
317
309
  try {
318
310
  const invalidDeviceState = method.useDeviceState
319
311
  ? await device.validateState(method.network)
@@ -354,10 +346,6 @@ const onCall = async (message) => {
354
346
  postMessage((0, events_2.createPopupMessage)(events_2.POPUP.CANCEL_POPUP_REQUEST));
355
347
  }
356
348
  try {
357
- const customMessages = method.getCustomMessages();
358
- if (_deviceList && customMessages) {
359
- await _deviceList.reconfigure(customMessages, true);
360
- }
361
349
  const response = await method.run();
362
350
  messageResponse = (0, events_2.createResponseMessage)(method.responseID, true, response);
363
351
  }
@@ -400,7 +388,6 @@ const onCall = async (message) => {
400
388
  if (response.success) {
401
389
  _deviceList.removeAuthPenalty(device);
402
390
  }
403
- await _deviceList.restoreMessages();
404
391
  }
405
392
  postMessage(response);
406
393
  }
@@ -2,5 +2,5 @@ import * as Methods from '../api';
2
2
  import type { IFrameCallMessage } from '../events';
3
3
  export declare const getMethod: (message: IFrameCallMessage & {
4
4
  id?: number;
5
- }) => Methods.applyFlags | Methods.applySettings | Methods.authorizeCoinJoin | Methods.backupDevice | Methods.binanceGetAddress | Methods.binanceGetPublicKey | Methods.binanceSignTransaction | Methods.blockchainDisconnect | Methods.blockchainEstimateFee | Methods.blockchainGetAccountBalanceHistory | Methods.blockchainGetCurrentFiatRates | Methods.blockchainGetFiatRatesForTimestamps | Methods.blockchainGetTransactions | Methods.blockchainSetCustomBackend | Methods.blockchainSubscribe | Methods.blockchainSubscribeFiatRates | Methods.blockchainUnsubscribe | Methods.blockchainUnsubscribeFiatRates | Methods.cardanoGetAddress | Methods.cardanoGetNativeScriptHash | Methods.cardanoGetPublicKey | Methods.cardanoSignTransaction | Methods.changePin | Methods.cipherKeyValue | Methods.composeTransaction | Methods.customMessage | Methods.eosGetPublicKey | Methods.eosSignTransaction | Methods.ethereumGetAddress | Methods.ethereumGetPublicKey | Methods.ethereumSignMessage | Methods.ethereumSignTransaction | Methods.ethereumSignTypedData | Methods.ethereumVerifyMessage | Methods.firmwareUpdate | Methods.getAccountInfo | Methods.getAddress | Methods.getCoinInfo | Methods.getDeviceState | Methods.getFeatures | Methods.getFirmwareHash | Methods.getOwnershipId | Methods.getOwnershipProof | Methods.getPublicKey | Methods.getSettings | Methods.nemGetAddress | Methods.nemSignTransaction | Methods.pushTransaction | Methods.rebootToBootloader | Methods.recoveryDevice | Methods.requestLogin | Methods.resetDevice | Methods.rippleGetAddress | Methods.rippleSignTransaction | Methods.setProxy | Methods.signMessage | Methods.signTransaction | Methods.stellarGetAddress | Methods.stellarSignTransaction | Methods.tezosGetAddress | Methods.tezosGetPublicKey | Methods.tezosSignTransaction | Methods.verifyMessage | Methods.wipeDevice;
5
+ }) => Methods.applyFlags | Methods.applySettings | Methods.authorizeCoinJoin | Methods.backupDevice | Methods.binanceGetAddress | Methods.binanceGetPublicKey | Methods.binanceSignTransaction | Methods.blockchainDisconnect | Methods.blockchainEstimateFee | Methods.blockchainGetAccountBalanceHistory | Methods.blockchainGetCurrentFiatRates | Methods.blockchainGetFiatRatesForTimestamps | Methods.blockchainGetTransactions | Methods.blockchainSetCustomBackend | Methods.blockchainSubscribe | Methods.blockchainSubscribeFiatRates | Methods.blockchainUnsubscribe | Methods.blockchainUnsubscribeFiatRates | Methods.cardanoGetAddress | Methods.cardanoGetNativeScriptHash | Methods.cardanoGetPublicKey | Methods.cardanoSignTransaction | Methods.changePin | Methods.cipherKeyValue | Methods.composeTransaction | Methods.eosGetPublicKey | Methods.eosSignTransaction | Methods.ethereumGetAddress | Methods.ethereumGetPublicKey | Methods.ethereumSignMessage | Methods.ethereumSignTransaction | Methods.ethereumSignTypedData | Methods.ethereumVerifyMessage | Methods.firmwareUpdate | Methods.getAccountInfo | Methods.getAddress | Methods.getCoinInfo | Methods.getDeviceState | Methods.getFeatures | Methods.getFirmwareHash | Methods.getOwnershipId | Methods.getOwnershipProof | Methods.getPublicKey | Methods.getSettings | Methods.nemGetAddress | Methods.nemSignTransaction | Methods.pushTransaction | Methods.rebootToBootloader | Methods.recoveryDevice | Methods.requestLogin | Methods.resetDevice | Methods.rippleGetAddress | Methods.rippleSignTransaction | Methods.setProxy | Methods.signMessage | Methods.signTransaction | Methods.stellarGetAddress | Methods.stellarSignTransaction | Methods.tezosGetAddress | Methods.tezosGetPublicKey | Methods.tezosSignTransaction | Methods.verifyMessage | Methods.wipeDevice | Methods.checkFirmwareAuthenticity;
6
6
  //# sourceMappingURL=method.d.ts.map
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getMethod = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const Methods = (0, tslib_1.__importStar)(require("../api"));
5
+ const Methods = tslib_1.__importStar(require("../api"));
6
6
  const errors_1 = require("../constants/errors");
7
7
  const getMethod = (message) => {
8
8
  const { method } = message.payload;