@trezor/connect 9.1.12 → 9.2.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 (102) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/README.md +1 -1
  3. package/lib/api/binance/api/binanceSignTransaction.d.ts +1 -1
  4. package/lib/api/binance/binanceSignTx.d.ts +1 -1
  5. package/lib/api/bitcoin/Fees.d.ts +2 -2
  6. package/lib/api/bitcoin/TransactionComposer.d.ts +2 -2
  7. package/lib/api/bitcoin/refTx.js +3 -4
  8. package/lib/api/blockchainGetCurrentFiatRates.d.ts +1 -1
  9. package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +1 -1
  10. package/lib/api/changeLanguage.d.ts +11 -0
  11. package/lib/api/changeLanguage.js +73 -0
  12. package/lib/api/common/paramsValidator.js +4 -5
  13. package/lib/api/eos/eosSignTx.d.ts +58 -58
  14. package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +8 -6
  15. package/lib/api/ethereum/api/ethereumSignMessage.d.ts +2 -2
  16. package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +2 -2
  17. package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +2 -2
  18. package/lib/api/ethereum/api/ethereumSignTypedData.js +2 -2
  19. package/lib/api/ethereum/ethereumDefinitions.d.ts +2 -2
  20. package/lib/api/ethereum/ethereumSignTx.d.ts +3 -3
  21. package/lib/api/firmware/getBinary.d.ts +1 -1
  22. package/lib/api/firmware/getBinary.js +4 -5
  23. package/lib/api/firmware/modifyFirmware.js +2 -3
  24. package/lib/api/firmware/verifyAuthenticityProof.js +3 -3
  25. package/lib/api/getAccountInfo.d.ts +2 -0
  26. package/lib/api/getAccountInfo.js +3 -0
  27. package/lib/api/getCoinInfo.d.ts +22 -22
  28. package/lib/api/getFeatures.d.ts +13 -12
  29. package/lib/api/getPublicKey.d.ts +8 -6
  30. package/lib/api/index.d.ts +1 -0
  31. package/lib/api/index.js +3 -1
  32. package/lib/api/nem/nemSignTx.d.ts +13 -13
  33. package/lib/api/rebootToBootloader.d.ts +2 -1
  34. package/lib/api/rebootToBootloader.js +10 -1
  35. package/lib/api/recoveryDevice.d.ts +1 -0
  36. package/lib/api/recoveryDevice.js +3 -0
  37. package/lib/api/stellar/stellarSignTx.d.ts +1 -1
  38. package/lib/api/stellar/stellarSignTx.js +6 -0
  39. package/lib/api/tezos/tezosSignTx.d.ts +18 -18
  40. package/lib/backend/BackendManager.d.ts +4 -2
  41. package/lib/backend/BackendManager.js +55 -21
  42. package/lib/backend/Blockchain.d.ts +6 -6
  43. package/lib/backend/Blockchain.js +37 -27
  44. package/lib/constants/index.d.ts +1 -1
  45. package/lib/constants/index.js +2 -1
  46. package/lib/core/AbstractMethod.d.ts +1 -1
  47. package/lib/core/AbstractMethod.js +3 -4
  48. package/lib/core/index.js +23 -11
  49. package/lib/data/DataManager.d.ts +2 -2
  50. package/lib/data/coinInfo.d.ts +117 -117
  51. package/lib/data/coinInfo.js +6 -6
  52. package/lib/data/config.js +1 -1
  53. package/lib/data/connectSettings.js +3 -0
  54. package/lib/data/deviceAuthenticityConfig.js +4 -1
  55. package/lib/data/firmwareInfo.d.ts +1 -1
  56. package/lib/data/firmwareInfo.js +14 -12
  57. package/lib/data/version.d.ts +1 -1
  58. package/lib/data/version.js +1 -1
  59. package/lib/device/Device.d.ts +5 -4
  60. package/lib/device/Device.js +13 -11
  61. package/lib/device/DeviceCommands.d.ts +11 -7
  62. package/lib/device/DeviceCommands.js +12 -9
  63. package/lib/device/DeviceList.d.ts +1 -1
  64. package/lib/device/DeviceList.js +3 -3
  65. package/lib/device/resolveDescriptorForTaproot.d.ts +15 -0
  66. package/lib/device/resolveDescriptorForTaproot.js +26 -0
  67. package/lib/events/blockchain.d.ts +10 -2
  68. package/lib/events/blockchain.js +1 -0
  69. package/lib/events/call.d.ts +2 -2
  70. package/lib/events/core.d.ts +4 -0
  71. package/lib/events/popup.d.ts +13 -1
  72. package/lib/events/ui-promise.d.ts +1 -1
  73. package/lib/events/webextension.d.ts +1 -0
  74. package/lib/events/webextension.js +1 -0
  75. package/lib/factory.js +1 -0
  76. package/lib/index.js +2 -2
  77. package/lib/types/account.d.ts +2 -0
  78. package/lib/types/api/applySettings.d.ts +6 -6
  79. package/lib/types/api/changeLanguage.d.ts +15 -0
  80. package/lib/types/api/changeLanguage.js +17 -0
  81. package/lib/types/api/getAddress.d.ts +5 -5
  82. package/lib/types/api/getPublicKey.d.ts +1 -0
  83. package/lib/types/api/getPublicKey.js +1 -0
  84. package/lib/types/api/index.d.ts +2 -0
  85. package/lib/types/api/rebootToBootloader.d.ts +2 -2
  86. package/lib/types/api/recoveryDevice.d.ts +1 -1
  87. package/lib/types/api/stellar/index.d.ts +23 -0
  88. package/lib/types/api/stellar/index.js +13 -1
  89. package/lib/types/device.d.ts +4 -1
  90. package/lib/types/device.js +2 -2
  91. package/lib/types/firmware.d.ts +2 -0
  92. package/lib/types/index.d.ts +1 -1
  93. package/lib/types/settings.d.ts +1 -0
  94. package/lib/utils/assets-browser.d.ts +1 -1
  95. package/lib/utils/assets.d.ts +3 -1
  96. package/lib/utils/assets.js +2 -2
  97. package/lib/utils/deviceFeaturesUtils.js +4 -5
  98. package/lib/utils/firmwareUtils.js +4 -5
  99. package/lib/utils/hdnodeUtils.d.ts +3 -3
  100. package/lib/utils/pathUtils.d.ts +3 -3
  101. package/lib/utils/urlUtils.js +3 -3
  102. package/package.json +26 -28
package/CHANGELOG.md CHANGED
@@ -1,3 +1,90 @@
1
+ # 9.2.1
2
+
3
+ Main motivation for this release was [issue](https://github.com/trezor/trezor-suite/issues/11442) introduced in 9.2.0 release in @trezor/connect-web npm package.
4
+
5
+ - fix(connect): fix build of connect-web (50f35cb) [related issue](https://github.com/trezor/trezor-suite/issues/11442)
6
+ - feat(connect): return checksum in the xpub for taproot (458ddf9)
7
+ - fix(connect-ui): analytics button to reflect state (cc59ef9)
8
+ - chore(connect): unify failed connection and disconnection (c863646)
9
+ - feat(connect): leave sticky backend after some time (021ec5c)
10
+ - chore(connect-iframe): fix conflicting variable webpack warning on build:lib (cdbdfb2)
11
+
12
+ ## Dependencies update
13
+
14
+ - npm-release: @trezor/blockchain-link 2.1.27
15
+ - npm-release: @trezor/connect-common 0.0.30
16
+ - npm-release: @trezor/transport 1.1.26
17
+ - npm-release: @trezor/protobuf 1.0.10
18
+
19
+ # 9.2.0
20
+
21
+ ## @trezor/connect-web npm package
22
+
23
+ Single unified popup manager that for both connect-web and connect-webextension package.
24
+
25
+ - chore(connect-web): add channel descriptors to poup, iframe (d6a054e)
26
+ - chore(connect-web): refactor popupmanager (af1723e)
27
+ - other: 0059145, 5da505b, ee98bb5
28
+ - fix(connect-web): race condition POPUP.HANDSHAKE before IFRAME.CALL (a433f85)
29
+
30
+ ## @trezor/connect-webextension npm package
31
+
32
+ This package is now out of beta.
33
+
34
+ - fix(connect-webextension): equalSettings in init, don't focus extension on error (64eb6ec)
35
+ - feat(connect): add CHANNEL_HANDSHAKE_CONFIRM to webextension events (1527034)
36
+ - feat(connect-webextension): emit events for WEBEXTENSION.CHANNEL_HANDSHAKE_CONFIRM (4ab8a8c)
37
+ - test(connect-popup): integrate testing for connect-webextension (06b91ec)
38
+
39
+ ## @trezor/connect
40
+
41
+ - feat(connect): device.availableTranslations field (5ac97e7)
42
+ - feat(connect): rebootToBootloader, add params (boot_command, firmware_header, language_data_length) (b0f7487)
43
+ - fix(connect): set min version for rebootToBootloader to correct value (74ad010)
44
+ - chore(connect): improve types of fetch assets util (9d60004)
45
+ - fix(connect): toMessageObject undefined (df55715)
46
+ - feat(connect): add reconnect functionality to BackendManager (9783a9e, 3390bfb, af0599f)
47
+
48
+ ## @trezor/connect-explorer and @trezor/connect-popup
49
+
50
+ - feat(connect-explorer): add changeLanguage method (7339a2d)
51
+ - chore(connect-explorer): upgrade markdown-it (087ca01)
52
+ - chore(connect-explorer): update markdown-it-replace-link (0a83011)
53
+ - chore(connect-explorer): remove unused AsyncSelect (94eb3f7)
54
+ - fix(connect): display loading before device acquired (815c69d)
55
+ - fix(connect): display device selection if device unacquired (231410e)
56
+
57
+ ## Stellar
58
+
59
+ - feat(connect): add support for StellarClaimClaimableBalanceOp. (51a3e29)
60
+ - chore(connect-plugin-stellar): update stellar libraries (2130437, 714bbbd)
61
+
62
+ ## General refactoring
63
+
64
+ - chore: dependencies and monorepo changes (fecd89f, c21d81f, 84bc9b8, 5a6759e, 01e33b7, 00fe229, a7e6879, 004938e, fac6d99, d3f8043, ed1fd3e, 3861846, 9fdccc9, 44fa12a)
65
+ - chore(repo): remove build from protobuf (chore(repo): remove build from protobuf #11288) (11ffd94)
66
+ - chore(repo): remove build:lib for some simple packages (chore(repo): remove build:lib for some simple packages #11276) (7febd10)
67
+ - chore(utils): remove build step requirement from @trezor/utils (chore(utils): remove build step requirement from @trezor/utils #11176) (6cd3d3c)
68
+ - chore(connect-explorer-webextension): delete package - now in connect-explorer/src-webextension (494afc7)
69
+
70
+ ## Dependencies update
71
+
72
+ - npm-release: @trezor/blockchain-link 2.1.26
73
+ - npm-release: @trezor/blockchain-link-utils 1.0.15
74
+ - npm-release: @trezor/blockchain-link-types 1.0.14
75
+ - npm-release: @trezor/type-utils 1.0.5
76
+ - npm-release: @trezor/connect-analytics 1.0.13
77
+ - npm-release: @trezor/analytics 1.0.15
78
+ - npm-release: @trezor/connect-common 0.0.29
79
+ - npm-release: @trezor/env-utils 1.0.14
80
+ - npm-release: @trezor/transport 1.1.25
81
+ - npm-release: @trezor/protobuf 1.0.9
82
+ - npm-release: @trezor/schema-utils 1.0.2
83
+ - npm-release: @trezor/protocol 1.0.6
84
+ - npm-release: @trezor/utxo-lib 2.0.7
85
+ - npm-release: @trezor/utils 9.0.22
86
+ - npm-release: @trezor/connect 9.2.0
87
+
1
88
  # 9.1.12
2
89
 
3
90
  - chore(connect): add new CA pubkeys and update timestamp (a4ca9b1)
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @trezor/connect
2
2
 
3
- API version 9.1.12
3
+ API version 9.2.1
4
4
 
5
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)
6
6
  [![NPM](https://img.shields.io/npm/v/@trezor/connect.svg)](https://www.npmjs.org/package/@trezor/connect)
@@ -9,8 +9,8 @@ export default class BinanceSignTransaction extends AbstractMethod<'binanceSignT
9
9
  init(): void;
10
10
  get info(): string;
11
11
  run(): Promise<{
12
- signature: string;
13
12
  public_key: string;
13
+ signature: string;
14
14
  }>;
15
15
  }
16
16
  export {};
@@ -81,7 +81,7 @@ export declare const validate: (tx: BinanceSDKTransaction) => {
81
81
  }))[];
82
82
  };
83
83
  export declare const signTx: (typedCall: TypedCall, address_n: number[], tx: BinancePreparedTransaction, chunkify?: boolean) => Promise<{
84
- signature: string;
85
84
  public_key: string;
85
+ signature: string;
86
86
  }>;
87
87
  //# sourceMappingURL=binanceSignTx.d.ts.map
@@ -10,14 +10,14 @@ export declare class FeeLevels {
10
10
  loadMisc(blockchain: Blockchain): Promise<{
11
11
  feeLimit?: string | undefined;
12
12
  feePerTx?: string | undefined;
13
- label: "high" | "normal" | "economy" | "low" | "custom";
13
+ label: "normal" | "high" | "economy" | "low" | "custom";
14
14
  feePerUnit: string;
15
15
  blocks: number;
16
16
  }[]>;
17
17
  load(blockchain: Blockchain): Promise<{
18
18
  feeLimit?: string | undefined;
19
19
  feePerTx?: string | undefined;
20
- label: "high" | "normal" | "economy" | "low" | "custom";
20
+ label: "normal" | "high" | "economy" | "low" | "custom";
21
21
  feePerUnit: string;
22
22
  blocks: number;
23
23
  }[]>;
@@ -29,12 +29,12 @@ export declare class TransactionComposer {
29
29
  composeCustomFee(fee: string): void;
30
30
  getFeeLevelList(): ({
31
31
  feePerByte?: undefined;
32
- name: string;
33
32
  fee: "0";
33
+ name: string;
34
34
  disabled: true;
35
35
  } | {
36
- name: string;
37
36
  fee: string;
37
+ name: string;
38
38
  feePerByte: string;
39
39
  minutes: number;
40
40
  total: string;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.validateReferencedTransactions = exports.transformReferencedTransactions = exports.transformReferencedTransaction = exports.transformOrigTransactions = exports.parseTransactionHexes = exports.getOrigTransactions = exports.getReferencedTransactions = exports.requireReferencedTransactions = void 0;
4
- const tslib_1 = require("tslib");
5
4
  const utxo_lib_1 = require("@trezor/utxo-lib");
6
- const bufferUtils = tslib_1.__importStar(require("@trezor/utils/lib/bufferUtils"));
5
+ const utils_1 = require("@trezor/utils");
7
6
  const pathUtils_1 = require("../../utils/pathUtils");
8
7
  const errors_1 = require("../../constants/errors");
9
8
  const constants_1 = require("../../constants");
@@ -77,7 +76,7 @@ const parseOutputScript = (output, network) => {
77
76
  const transformOrigTransaction = (tx, coinInfo, currentInputs, addresses) => {
78
77
  const inputsMap = (input, i) => {
79
78
  var _a;
80
- const prev_hash = bufferUtils.reverseBuffer(input.hash).toString('hex');
79
+ const prev_hash = utils_1.bufferUtils.reverseBuffer(input.hash).toString('hex');
81
80
  const currentInput = currentInputs.find(inp => inp.prev_hash === prev_hash && inp.prev_index === input.index);
82
81
  if (!(currentInput === null || currentInput === void 0 ? void 0 : currentInput.address_n)) {
83
82
  throw (0, errors_1.TypedError)('Method_InvalidParameter', `transformOrigTransactions: invalid input at ${tx.getId()} [${i}]`);
@@ -151,7 +150,7 @@ const transformReferencedTransaction = (tx) => {
151
150
  const inputsMap = (input) => ({
152
151
  prev_index: input.index,
153
152
  sequence: input.sequence,
154
- prev_hash: bufferUtils.reverseBuffer(input.hash).toString('hex'),
153
+ prev_hash: utils_1.bufferUtils.reverseBuffer(input.hash).toString('hex'),
155
154
  script_sig: input.script.toString('hex'),
156
155
  });
157
156
  const binOutputsMap = (output) => ({
@@ -9,7 +9,7 @@ export default class BlockchainGetCurrentFiatRates extends AbstractMethod<'block
9
9
  init(): void;
10
10
  run(): Promise<{
11
11
  ts: number;
12
- rates: import("@trezor/blockchain-link-types/lib/common").FiatRates;
12
+ rates: import("@trezor/blockchain-link-types/lib/common").FiatRatesLegacy;
13
13
  }>;
14
14
  }
15
15
  export {};
@@ -11,7 +11,7 @@ export default class BlockchainGetFiatRatesForTimestamps extends AbstractMethod<
11
11
  run(): Promise<{
12
12
  tickers: {
13
13
  ts: number;
14
- rates: import("@trezor/blockchain-link-types/lib/common").FiatRates;
14
+ rates: import("@trezor/blockchain-link-types/lib/common").FiatRatesLegacy;
15
15
  }[];
16
16
  }>;
17
17
  }
@@ -0,0 +1,11 @@
1
+ import { AbstractMethod } from '../core/AbstractMethod';
2
+ import { ChangeLanguage as ChangeLanguageSchema } from '../types/api/changeLanguage';
3
+ export default class ChangeLanguage extends AbstractMethod<'changeLanguage', ChangeLanguageSchema> {
4
+ init(): void;
5
+ confirmation(): Promise<boolean>;
6
+ private uploadTranslationData;
7
+ run(): Promise<{
8
+ message: string;
9
+ }>;
10
+ }
11
+ //# sourceMappingURL=changeLanguage.d.ts.map
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const AbstractMethod_1 = require("../core/AbstractMethod");
4
+ const constants_1 = require("../constants");
5
+ const events_1 = require("../events");
6
+ const schema_utils_1 = require("@trezor/schema-utils");
7
+ const changeLanguage_1 = require("../types/api/changeLanguage");
8
+ const assets_1 = require("../utils/assets");
9
+ class ChangeLanguage extends AbstractMethod_1.AbstractMethod {
10
+ init() {
11
+ this.useEmptyPassphrase = true;
12
+ this.requiredPermissions = ['management'];
13
+ this.useDeviceState = false;
14
+ const { payload } = this;
15
+ (0, schema_utils_1.Assert)(changeLanguage_1.ChangeLanguage, payload);
16
+ if (payload.binary) {
17
+ this.params = {
18
+ binary: payload.binary,
19
+ };
20
+ }
21
+ else {
22
+ this.params = {
23
+ language: payload.language,
24
+ baseUrl: payload.baseUrl || 'https://data.trezor.io',
25
+ };
26
+ }
27
+ }
28
+ async confirmation() {
29
+ await this.getPopupPromise().promise;
30
+ const uiPromise = this.createUiPromise(events_1.UI.RECEIVE_CONFIRMATION);
31
+ this.postMessage((0, events_1.createUiMessage)(events_1.UI.REQUEST_CONFIRMATION, {
32
+ view: 'device-management',
33
+ customConfirmButton: {
34
+ className: 'confirm',
35
+ label: 'Proceed',
36
+ },
37
+ label: 'Do you want to change language?',
38
+ }));
39
+ const uiResp = await uiPromise.promise;
40
+ return uiResp.payload;
41
+ }
42
+ async uploadTranslationData(payload) {
43
+ const length = payload.byteLength;
44
+ if (!this.device.commands) {
45
+ throw constants_1.ERRORS.TypedError('Runtime', 'uploadTranslationData: device.commands is not set');
46
+ }
47
+ let response = await this.device.commands.typedCall('ChangeLanguage', ['TranslationDataRequest', 'Success'], {
48
+ data_length: length,
49
+ });
50
+ while (response.type !== 'Success') {
51
+ const start = response.message.data_offset;
52
+ const end = response.message.data_offset + response.message.data_length;
53
+ const chunk = payload.slice(start, end);
54
+ response = await this.device.commands.typedCall('TranslationDataAck', ['TranslationDataRequest', 'Success'], {
55
+ data_chunk: Buffer.from(chunk).toString('hex'),
56
+ });
57
+ }
58
+ return response.message;
59
+ }
60
+ async run() {
61
+ const { language, binary, baseUrl } = this.params;
62
+ if (binary) {
63
+ return this.uploadTranslationData(binary);
64
+ }
65
+ const version = this.device.getVersion().join('.');
66
+ const model = this.device.features.internal_model;
67
+ const url = `${baseUrl}/data/translations/translation-${model}-${language}-${version}-unsigned.bin`;
68
+ const downloadedBinary = await (0, assets_1.httpRequest)(url, 'binary');
69
+ return this.uploadTranslationData(downloadedBinary);
70
+ }
71
+ }
72
+ exports.default = ChangeLanguage;
73
+ //# sourceMappingURL=changeLanguage.js.map
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFirmwareRange = exports.validateCoinPath = exports.validateParams = void 0;
4
- const tslib_1 = require("tslib");
5
- const versionUtils = tslib_1.__importStar(require("@trezor/utils/lib/versionUtils"));
4
+ const utils_1 = require("@trezor/utils");
6
5
  const constants_1 = require("../../constants");
7
6
  const pathUtils_1 = require("../../utils/pathUtils");
8
7
  const config_1 = require("../../data/config");
@@ -79,7 +78,7 @@ const getFirmwareRange = (method, coinInfo, currentRange) => {
79
78
  }
80
79
  else if (range[model].min !== '0' &&
81
80
  typeof supportVersion === 'string' &&
82
- versionUtils.isNewer(supportVersion, range[model].min)) {
81
+ utils_1.versionUtils.isNewer(supportVersion, range[model].min)) {
83
82
  range[model].min = supportVersion;
84
83
  }
85
84
  });
@@ -112,7 +111,7 @@ const getFirmwareRange = (method, coinInfo, currentRange) => {
112
111
  if (modelMin) {
113
112
  if (modelMin === '0' ||
114
113
  range[model].min === '0' ||
115
- !versionUtils.isNewerOrEqual(range[model].min, modelMin)) {
114
+ !utils_1.versionUtils.isNewerOrEqual(range[model].min, modelMin)) {
116
115
  range[model].min = modelMin;
117
116
  }
118
117
  }
@@ -124,7 +123,7 @@ const getFirmwareRange = (method, coinInfo, currentRange) => {
124
123
  if (modelMax) {
125
124
  if (modelMax === '0' ||
126
125
  range[model].max === '0' ||
127
- !versionUtils.isNewerOrEqual(range[model].max, modelMax)) {
126
+ !utils_1.versionUtils.isNewerOrEqual(range[model].max, modelMax)) {
128
127
  range[model].max = modelMax;
129
128
  }
130
129
  }
@@ -21,59 +21,7 @@ export declare const validate: (tx: EosSDKTransaction) => {
21
21
  sender: string;
22
22
  receiver: string;
23
23
  } | undefined;
24
- refund?: {
25
- owner: string;
26
- } | undefined;
27
- unknown?: {
28
- data_size: number;
29
- data_chunk: string;
30
- } | undefined;
31
- new_account?: {
32
- name: string;
33
- owner: {
34
- keys: {
35
- address_n?: number[] | undefined;
36
- type?: number | undefined;
37
- weight: number;
38
- key: string;
39
- }[];
40
- threshold: number;
41
- accounts: {
42
- weight: number;
43
- account: {
44
- permission: string;
45
- actor: string;
46
- };
47
- }[];
48
- waits: {
49
- weight: number;
50
- wait_sec: number;
51
- }[];
52
- };
53
- creator: string;
54
- active: {
55
- keys: {
56
- address_n?: number[] | undefined;
57
- type?: number | undefined;
58
- weight: number;
59
- key: string;
60
- }[];
61
- threshold: number;
62
- accounts: {
63
- weight: number;
64
- account: {
65
- permission: string;
66
- actor: string;
67
- };
68
- }[];
69
- waits: {
70
- weight: number;
71
- wait_sec: number;
72
- }[];
73
- };
74
- } | undefined;
75
24
  delegate?: {
76
- transfer: boolean;
77
25
  sender: string;
78
26
  receiver: string;
79
27
  net_quantity: {
@@ -84,6 +32,7 @@ export declare const validate: (tx: EosSDKTransaction) => {
84
32
  symbol: string;
85
33
  amount: string | number;
86
34
  };
35
+ transfer: boolean;
87
36
  } | undefined;
88
37
  undelegate?: {
89
38
  sender: string;
@@ -97,6 +46,9 @@ export declare const validate: (tx: EosSDKTransaction) => {
97
46
  amount: string | number;
98
47
  };
99
48
  } | undefined;
49
+ refund?: {
50
+ owner: string;
51
+ } | undefined;
100
52
  buy_ram?: {
101
53
  quantity: {
102
54
  symbol: string;
@@ -125,8 +77,8 @@ export declare const validate: (tx: EosSDKTransaction) => {
125
77
  parent: string;
126
78
  auth: {
127
79
  keys: {
128
- address_n?: number[] | undefined;
129
80
  type?: number | undefined;
81
+ address_n?: number[] | undefined;
130
82
  weight: number;
131
83
  key: string;
132
84
  }[];
@@ -134,8 +86,8 @@ export declare const validate: (tx: EosSDKTransaction) => {
134
86
  accounts: {
135
87
  weight: number;
136
88
  account: {
137
- permission: string;
138
89
  actor: string;
90
+ permission: string;
139
91
  };
140
92
  }[];
141
93
  waits: {
@@ -150,21 +102,69 @@ export declare const validate: (tx: EosSDKTransaction) => {
150
102
  } | undefined;
151
103
  link_auth?: {
152
104
  type: string;
153
- account: string;
154
105
  code: string;
106
+ account: string;
155
107
  requirement: string;
156
108
  } | undefined;
157
109
  unlink_auth?: {
158
110
  type: string;
159
- account: string;
160
111
  code: string;
112
+ account: string;
161
113
  } | undefined;
162
- common: {
114
+ new_account?: {
163
115
  name: string;
116
+ owner: {
117
+ keys: {
118
+ type?: number | undefined;
119
+ address_n?: number[] | undefined;
120
+ weight: number;
121
+ key: string;
122
+ }[];
123
+ threshold: number;
124
+ accounts: {
125
+ weight: number;
126
+ account: {
127
+ actor: string;
128
+ permission: string;
129
+ };
130
+ }[];
131
+ waits: {
132
+ weight: number;
133
+ wait_sec: number;
134
+ }[];
135
+ };
136
+ creator: string;
137
+ active: {
138
+ keys: {
139
+ type?: number | undefined;
140
+ address_n?: number[] | undefined;
141
+ weight: number;
142
+ key: string;
143
+ }[];
144
+ threshold: number;
145
+ accounts: {
146
+ weight: number;
147
+ account: {
148
+ actor: string;
149
+ permission: string;
150
+ };
151
+ }[];
152
+ waits: {
153
+ weight: number;
154
+ wait_sec: number;
155
+ }[];
156
+ };
157
+ } | undefined;
158
+ unknown?: {
159
+ data_size: number;
160
+ data_chunk: string;
161
+ } | undefined;
162
+ common: {
164
163
  account: string;
164
+ name: string;
165
165
  authorization: {
166
- permission: string;
167
166
  actor: string;
167
+ permission: string;
168
168
  }[];
169
169
  };
170
170
  }[];
@@ -12,24 +12,26 @@ export default class EthereumGetPublicKey extends AbstractMethod<'ethereumGetPub
12
12
  confirmation(): Promise<boolean>;
13
13
  run(): Promise<{
14
14
  xpubSegwit?: string | undefined;
15
+ descriptorChecksum?: string | undefined;
15
16
  path: number[];
16
- publicKey: string;
17
- serializedPath: string;
18
17
  depth: number;
19
18
  fingerprint: number;
19
+ xpub: string;
20
+ publicKey: string;
21
+ serializedPath: string;
20
22
  chainCode: string;
21
23
  childNum: number;
22
- xpub: string;
23
24
  } | {
24
25
  xpubSegwit?: string | undefined;
26
+ descriptorChecksum?: string | undefined;
25
27
  path: number[];
26
- publicKey: string;
27
- serializedPath: string;
28
28
  depth: number;
29
29
  fingerprint: number;
30
+ xpub: string;
31
+ publicKey: string;
32
+ serializedPath: string;
30
33
  chainCode: string;
31
34
  childNum: number;
32
- xpub: string;
33
35
  }[]>;
34
36
  }
35
37
  export {};
@@ -1,10 +1,10 @@
1
1
  import { AbstractMethod } from '../../../core/AbstractMethod';
2
2
  import type { PROTO } from '../../../constants';
3
3
  import { EthereumNetworkInfo } from '../../../types';
4
- import type { EthereumDefinitions } from '@trezor/protobuf/lib/messages-schema';
4
+ import { MessagesSchema } from '@trezor/protobuf';
5
5
  type Params = PROTO.EthereumSignMessage & {
6
6
  network?: EthereumNetworkInfo;
7
- definitions?: EthereumDefinitions;
7
+ definitions?: MessagesSchema.EthereumDefinitions;
8
8
  };
9
9
  export default class EthereumSignMessage extends AbstractMethod<'ethereumSignMessage', Params> {
10
10
  init(): void;
@@ -1,11 +1,11 @@
1
1
  import { AbstractMethod } from '../../../core/AbstractMethod';
2
2
  import type { EthereumTransaction, EthereumTransactionEIP1559 } from '../../../types/api/ethereum';
3
3
  import { EthereumNetworkInfo } from '../../../types';
4
- import type { EthereumDefinitions } from '@trezor/protobuf/lib/messages-schema';
4
+ import { MessagesSchema } from '@trezor/protobuf';
5
5
  type Params = {
6
6
  path: number[];
7
7
  network?: EthereumNetworkInfo;
8
- definitions?: EthereumDefinitions;
8
+ definitions?: MessagesSchema.EthereumDefinitions;
9
9
  chunkify: boolean;
10
10
  } & ({
11
11
  type: 'legacy';
@@ -1,11 +1,11 @@
1
1
  import { AbstractMethod } from '../../../core/AbstractMethod';
2
2
  import { EthereumSignTypedDataTypes, EthereumSignTypedData as EthereumSignTypedDataParams, EthereumSignTypedHash as EthereumSignTypedHashParams } from '../../../types/api/ethereum';
3
3
  import { EthereumNetworkInfo } from '../../../types';
4
- import { EthereumDefinitions } from '@trezor/protobuf/lib/messages-schema';
4
+ import { MessagesSchema } from '@trezor/protobuf';
5
5
  type Params = (Omit<EthereumSignTypedDataParams<EthereumSignTypedDataTypes>, 'path'> | Omit<EthereumSignTypedHashParams<EthereumSignTypedDataTypes>, 'path'>) & {
6
6
  address_n: number[];
7
7
  network?: EthereumNetworkInfo;
8
- definitions?: EthereumDefinitions;
8
+ definitions?: MessagesSchema.EthereumDefinitions;
9
9
  };
10
10
  declare const Params: import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
11
11
  data: import("@sinclair/typebox").TObject<{
@@ -11,7 +11,7 @@ const ethereumSignTypedData_1 = require("../ethereumSignTypedData");
11
11
  const formatUtils_1 = require("../../../utils/formatUtils");
12
12
  const ethereumDefinitions_1 = require("../ethereumDefinitions");
13
13
  const types_1 = require("../../../types");
14
- const messages_schema_1 = require("@trezor/protobuf/lib/messages-schema");
14
+ const protobuf_1 = require("@trezor/protobuf");
15
15
  const schema_utils_1 = require("@trezor/schema-utils");
16
16
  const Params = schema_utils_1.Type.Intersect([
17
17
  schema_utils_1.Type.Union([
@@ -21,7 +21,7 @@ const Params = schema_utils_1.Type.Intersect([
21
21
  schema_utils_1.Type.Object({
22
22
  address_n: schema_utils_1.Type.Array(schema_utils_1.Type.Number()),
23
23
  network: schema_utils_1.Type.Optional(types_1.EthereumNetworkInfo),
24
- definitions: schema_utils_1.Type.Optional(messages_schema_1.EthereumDefinitions),
24
+ definitions: schema_utils_1.Type.Optional(protobuf_1.MessagesSchema.EthereumDefinitions),
25
25
  }),
26
26
  ]);
27
27
  class EthereumSignTypedData extends AbstractMethod_1.AbstractMethod {
@@ -1,4 +1,4 @@
1
- import { EthereumDefinitions } from '@trezor/protobuf/lib/messages-schema';
1
+ import { MessagesSchema } from '@trezor/protobuf';
2
2
  import { EthereumNetworkInfo } from '../../types';
3
3
  import { Static } from '@trezor/schema-utils';
4
4
  interface GetEthereumDefinitions {
@@ -41,7 +41,7 @@ export declare const EthereumDefinitionDecoded: import("@sinclair/typebox").TObj
41
41
  symbol: import("@sinclair/typebox").TString;
42
42
  }>>;
43
43
  }>;
44
- export declare const decodeEthereumDefinition: (encodedDefinition: EthereumDefinitions) => EthereumDefinitionDecoded;
44
+ export declare const decodeEthereumDefinition: (encodedDefinition: MessagesSchema.EthereumDefinitions) => EthereumDefinitionDecoded;
45
45
  export declare const ethereumNetworkInfoFromDefinition: (definition: EthereumNetworkDefinitionDecoded) => EthereumNetworkInfo;
46
46
  export {};
47
47
  //# sourceMappingURL=ethereumDefinitions.d.ts.map
@@ -1,14 +1,14 @@
1
1
  import { FeeMarketEIP1559TxData, LegacyTxData } from '@ethereumjs/tx';
2
- import { EthereumDefinitions } from '@trezor/protobuf/lib/messages-schema';
2
+ import { MessagesSchema } from '@trezor/protobuf';
3
3
  import type { TypedCall } from '../../device/DeviceCommands';
4
4
  import type { EthereumAccessList } from '../../types/api/ethereum';
5
5
  export declare const serializeEthereumTx: (txData: LegacyTxData | FeeMarketEIP1559TxData, chainId: number) => string;
6
- export declare const ethereumSignTx: (typedCall: TypedCall, address_n: number[], to: string, value: string, gas_limit: string, gas_price: string, nonce: string, chain_id: number, chunkify: boolean, data?: string, tx_type?: number, definitions?: EthereumDefinitions) => Promise<{
6
+ export declare const ethereumSignTx: (typedCall: TypedCall, address_n: number[], to: string, value: string, gas_limit: string, gas_price: string, nonce: string, chain_id: number, chunkify: boolean, data?: string, tx_type?: number, definitions?: MessagesSchema.EthereumDefinitions) => Promise<{
7
7
  v: string;
8
8
  r: string;
9
9
  s: string;
10
10
  }>;
11
- 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, chunkify: boolean, data?: string, access_list?: EthereumAccessList[], definitions?: EthereumDefinitions) => Promise<{
11
+ 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, chunkify: boolean, data?: string, access_list?: EthereumAccessList[], definitions?: MessagesSchema.EthereumDefinitions) => Promise<{
12
12
  v: string;
13
13
  r: string;
14
14
  s: string;
@@ -6,6 +6,6 @@ interface GetBinaryProps extends GetInfoProps {
6
6
  version?: number[];
7
7
  intermediaryVersion?: IntermediaryVersion;
8
8
  }
9
- export declare const getBinary: ({ features, releases, baseUrl, version, btcOnly, intermediaryVersion, }: GetBinaryProps) => any;
9
+ export declare const getBinary: ({ features, releases, baseUrl, version, btcOnly, intermediaryVersion, }: GetBinaryProps) => Promise<ArrayBuffer>;
10
10
  export {};
11
11
  //# sourceMappingURL=getBinary.d.ts.map