@trezor/connect 9.1.12 → 9.2.0

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 (105) hide show
  1. package/CHANGELOG.md +69 -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/cardano/cardanoOutputs.d.ts +1 -1
  11. package/lib/api/cardano/cardanoTokenBundle.d.ts +2 -2
  12. package/lib/api/changeLanguage.d.ts +11 -0
  13. package/lib/api/changeLanguage.js +73 -0
  14. package/lib/api/common/paramsValidator.js +4 -5
  15. package/lib/api/eos/eosSignTx.d.ts +58 -58
  16. package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +6 -6
  17. package/lib/api/ethereum/api/ethereumSignMessage.d.ts +2 -2
  18. package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +2 -2
  19. package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +6 -6
  20. package/lib/api/ethereum/api/ethereumSignTypedData.js +2 -2
  21. package/lib/api/ethereum/ethereumDefinitions.d.ts +2 -2
  22. package/lib/api/ethereum/ethereumSignTx.d.ts +3 -3
  23. package/lib/api/firmware/getBinary.d.ts +1 -1
  24. package/lib/api/firmware/getBinary.js +4 -5
  25. package/lib/api/firmware/modifyFirmware.js +2 -3
  26. package/lib/api/firmware/verifyAuthenticityProof.js +3 -3
  27. package/lib/api/getAccountInfo.d.ts +2 -0
  28. package/lib/api/getCoinInfo.d.ts +22 -22
  29. package/lib/api/getFeatures.d.ts +11 -11
  30. package/lib/api/getPublicKey.d.ts +6 -6
  31. package/lib/api/index.d.ts +1 -0
  32. package/lib/api/index.js +3 -1
  33. package/lib/api/nem/nemSignTx.d.ts +13 -13
  34. package/lib/api/rebootToBootloader.d.ts +2 -1
  35. package/lib/api/rebootToBootloader.js +10 -1
  36. package/lib/api/recoveryDevice.d.ts +1 -0
  37. package/lib/api/recoveryDevice.js +3 -0
  38. package/lib/api/stellar/stellarSignTx.d.ts +1 -1
  39. package/lib/api/stellar/stellarSignTx.js +6 -0
  40. package/lib/api/tezos/tezosSignTx.d.ts +18 -18
  41. package/lib/backend/BackendManager.d.ts +5 -2
  42. package/lib/backend/BackendManager.js +54 -20
  43. package/lib/backend/Blockchain.d.ts +6 -6
  44. package/lib/backend/Blockchain.js +37 -27
  45. package/lib/constants/index.d.ts +1 -1
  46. package/lib/constants/index.js +2 -1
  47. package/lib/core/AbstractMethod.d.ts +1 -1
  48. package/lib/core/AbstractMethod.js +3 -4
  49. package/lib/core/index.js +23 -11
  50. package/lib/data/DataManager.d.ts +2 -2
  51. package/lib/data/coinInfo.d.ts +117 -117
  52. package/lib/data/coinInfo.js +6 -6
  53. package/lib/data/config.js +1 -1
  54. package/lib/data/connectSettings.js +3 -0
  55. package/lib/data/deviceAuthenticityConfig.js +4 -1
  56. package/lib/data/firmwareInfo.d.ts +1 -1
  57. package/lib/data/firmwareInfo.js +14 -12
  58. package/lib/data/version.d.ts +1 -1
  59. package/lib/data/version.js +1 -1
  60. package/lib/device/Device.d.ts +5 -4
  61. package/lib/device/Device.js +13 -11
  62. package/lib/device/DeviceCommands.d.ts +7 -7
  63. package/lib/device/DeviceCommands.js +4 -4
  64. package/lib/device/DeviceList.d.ts +1 -1
  65. package/lib/device/DeviceList.js +3 -3
  66. package/lib/events/blockchain.d.ts +10 -2
  67. package/lib/events/blockchain.js +1 -0
  68. package/lib/events/call.d.ts +2 -2
  69. package/lib/events/core.d.ts +4 -0
  70. package/lib/events/popup.d.ts +13 -1
  71. package/lib/events/ui-promise.d.ts +1 -1
  72. package/lib/events/webextension.d.ts +1 -0
  73. package/lib/events/webextension.js +1 -0
  74. package/lib/factory.js +1 -0
  75. package/lib/index.js +2 -2
  76. package/lib/types/api/applySettings.d.ts +6 -6
  77. package/lib/types/api/binance/index.d.ts +10 -10
  78. package/lib/types/api/cardano/index.d.ts +4 -4
  79. package/lib/types/api/changeLanguage.d.ts +15 -0
  80. package/lib/types/api/changeLanguage.js +17 -0
  81. package/lib/types/api/cipherKeyValue.d.ts +2 -2
  82. package/lib/types/api/eos/index.d.ts +3 -3
  83. package/lib/types/api/ethereum/index.d.ts +3 -3
  84. package/lib/types/api/firmwareUpdate.d.ts +1 -1
  85. package/lib/types/api/getAddress.d.ts +5 -5
  86. package/lib/types/api/index.d.ts +2 -0
  87. package/lib/types/api/nem/index.d.ts +7 -7
  88. package/lib/types/api/rebootToBootloader.d.ts +2 -2
  89. package/lib/types/api/recoveryDevice.d.ts +1 -1
  90. package/lib/types/api/stellar/index.d.ts +169 -146
  91. package/lib/types/api/stellar/index.js +13 -1
  92. package/lib/types/device.d.ts +4 -1
  93. package/lib/types/device.js +2 -2
  94. package/lib/types/firmware.d.ts +2 -0
  95. package/lib/types/index.d.ts +1 -1
  96. package/lib/types/settings.d.ts +1 -0
  97. package/lib/utils/assets-browser.d.ts +1 -1
  98. package/lib/utils/assets.d.ts +3 -1
  99. package/lib/utils/assets.js +2 -2
  100. package/lib/utils/deviceFeaturesUtils.js +4 -5
  101. package/lib/utils/firmwareUtils.js +4 -5
  102. package/lib/utils/hdnodeUtils.d.ts +3 -3
  103. package/lib/utils/pathUtils.d.ts +3 -3
  104. package/lib/utils/urlUtils.js +3 -3
  105. package/package.json +26 -28
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.StellarOperationMessage = exports.StellarSignedTx = exports.StellarSignTransaction = exports.StellarTransaction = exports.StellarOperation = exports.StellarInflationOperation = exports.StellarBumpSequenceOperation = exports.StellarManageDataOperation = exports.StellarAccountMergeOperation = exports.StellarAllowTrustOperation = exports.StellarChangeTrustOperation = exports.StellarSetOptionsOperation = exports.StellarManageBuyOfferOperation = exports.StellarManageSellOfferOperation = exports.StellarPassiveSellOfferOperation = exports.StellarPathPaymentStrictSendOperation = exports.StellarPathPaymentStrictReceiveOperation = exports.StellarPaymentOperation = exports.StellarCreateAccountOperation = exports.StellarAsset = void 0;
3
+ exports.StellarOperationMessage = exports.StellarSignedTx = exports.StellarSignTransaction = exports.StellarTransaction = exports.StellarOperation = exports.StellarClaimClaimableBalanceOperation = exports.StellarInflationOperation = exports.StellarBumpSequenceOperation = exports.StellarManageDataOperation = exports.StellarAccountMergeOperation = exports.StellarAllowTrustOperation = exports.StellarChangeTrustOperation = exports.StellarSetOptionsOperation = exports.StellarManageBuyOfferOperation = exports.StellarManageSellOfferOperation = exports.StellarPassiveSellOfferOperation = exports.StellarPathPaymentStrictSendOperation = exports.StellarPathPaymentStrictReceiveOperation = exports.StellarPaymentOperation = exports.StellarCreateAccountOperation = exports.StellarAsset = void 0;
4
4
  const constants_1 = require("../../../constants");
5
5
  const params_1 = require("../../params");
6
6
  const schema_utils_1 = require("@trezor/schema-utils");
@@ -128,6 +128,11 @@ exports.StellarInflationOperation = schema_utils_1.Type.Object({
128
128
  type: schema_utils_1.Type.Literal('inflation'),
129
129
  source: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
130
130
  });
131
+ exports.StellarClaimClaimableBalanceOperation = schema_utils_1.Type.Object({
132
+ type: schema_utils_1.Type.Literal('claimClaimableBalance'),
133
+ source: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
134
+ balanceId: schema_utils_1.Type.String(),
135
+ });
131
136
  exports.StellarOperation = schema_utils_1.Type.Union([
132
137
  exports.StellarCreateAccountOperation,
133
138
  exports.StellarPaymentOperation,
@@ -143,6 +148,7 @@ exports.StellarOperation = schema_utils_1.Type.Union([
143
148
  exports.StellarInflationOperation,
144
149
  exports.StellarManageDataOperation,
145
150
  exports.StellarBumpSequenceOperation,
151
+ exports.StellarClaimClaimableBalanceOperation,
146
152
  ]);
147
153
  exports.StellarTransaction = schema_utils_1.Type.Object({
148
154
  source: schema_utils_1.Type.String(),
@@ -248,5 +254,11 @@ exports.StellarOperationMessage = schema_utils_1.Type.Union([
248
254
  }),
249
255
  constants_1.PROTO.StellarBumpSequenceOp,
250
256
  ]),
257
+ schema_utils_1.Type.Intersect([
258
+ schema_utils_1.Type.Object({
259
+ type: schema_utils_1.Type.Literal('StellarClaimClaimableBalanceOp'),
260
+ }),
261
+ constants_1.PROTO.StellarClaimClaimableBalanceOp,
262
+ ]),
251
263
  ]);
252
264
  //# sourceMappingURL=index.js.map
@@ -27,6 +27,7 @@ export type KnownDevice = {
27
27
  state?: string;
28
28
  features: PROTO.Features;
29
29
  unavailableCapabilities: UnavailableCapabilities;
30
+ availableTranslations: string[];
30
31
  };
31
32
  export type UnknownDevice = {
32
33
  type: 'unacquired';
@@ -44,6 +45,7 @@ export type UnknownDevice = {
44
45
  mode?: typeof undefined;
45
46
  state?: typeof undefined;
46
47
  unavailableCapabilities?: typeof undefined;
48
+ availableTranslations?: typeof undefined;
47
49
  };
48
50
  export type UnreadableDevice = {
49
51
  type: 'unreadable';
@@ -61,10 +63,11 @@ export type UnreadableDevice = {
61
63
  mode?: typeof undefined;
62
64
  state?: typeof undefined;
63
65
  unavailableCapabilities?: typeof undefined;
66
+ availableTranslations?: typeof undefined;
64
67
  };
65
68
  export type Device = KnownDevice | UnknownDevice | UnreadableDevice;
66
69
  export type Features = PROTO.Features;
67
- export { DeviceModelInternal } from '@trezor/protobuf/lib/messages-schema';
70
+ export { DeviceModelInternal } from '@trezor/protobuf';
68
71
  type FeaturesNarrowing = {
69
72
  major_version: 2;
70
73
  fw_major: null;
@@ -6,6 +6,6 @@ var FirmwareType;
6
6
  FirmwareType["BitcoinOnly"] = "bitcoin-only";
7
7
  FirmwareType["Regular"] = "regular";
8
8
  })(FirmwareType || (exports.FirmwareType = FirmwareType = {}));
9
- var messages_schema_1 = require("@trezor/protobuf/lib/messages-schema");
10
- Object.defineProperty(exports, "DeviceModelInternal", { enumerable: true, get: function () { return messages_schema_1.DeviceModelInternal; } });
9
+ var protobuf_1 = require("@trezor/protobuf");
10
+ Object.defineProperty(exports, "DeviceModelInternal", { enumerable: true, get: function () { return protobuf_1.DeviceModelInternal; } });
11
11
  //# sourceMappingURL=device.js.map
@@ -27,6 +27,7 @@ export type FirmwareRelease = {
27
27
  fingerprint_bitcoinonly?: string;
28
28
  notes?: string;
29
29
  channel?: string;
30
+ translations?: string[];
30
31
  };
31
32
  export type IntermediaryVersion = 1 | 2 | 3;
32
33
  export declare const IntermediaryVersion: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<1>, import("@sinclair/typebox").TLiteral<2>, import("@sinclair/typebox").TLiteral<3>]>;
@@ -36,5 +37,6 @@ export type ReleaseInfo = {
36
37
  isRequired: boolean | null;
37
38
  isNewer: boolean | null;
38
39
  intermediaryVersion?: IntermediaryVersion;
40
+ translations?: string[];
39
41
  };
40
42
  //# sourceMappingURL=firmware.d.ts.map
@@ -19,5 +19,5 @@ export type { ComposeOutput, PrecomposeResultError, PrecomposeResultNonFinal, Pr
19
19
  export type { PrecomposedTransactionCardano, PrecomposedTransactionErrorCardano, PrecomposedTransactionFinalCardano, PrecomposedTransactionNonFinalCardano, } from './api/cardanoComposeTransaction';
20
20
  export type { RecoveryDevice } from './api/recoveryDevice';
21
21
  export type { AuthenticateDeviceResult } from './api/authenticateDevice';
22
- export type { TokenInfo, TokenTransfer, InternalTransfer, FiatRates, Target as TransactionTarget, AccountBalanceHistory as BlockchainAccountBalanceHistory, } from '@trezor/blockchain-link';
22
+ export type { TokenInfo, TokenTransfer, InternalTransfer, FiatRatesLegacy, Target as TransactionTarget, AccountBalanceHistory as BlockchainAccountBalanceHistory, } from '@trezor/blockchain-link';
23
23
  //# sourceMappingURL=index.d.ts.map
@@ -32,5 +32,6 @@ export interface ConnectSettings {
32
32
  timestamp: number;
33
33
  proxy?: Proxy;
34
34
  sharedLogger?: boolean;
35
+ useCoreInPopup?: boolean;
35
36
  }
36
37
  //# sourceMappingURL=settings.d.ts.map
@@ -1,2 +1,2 @@
1
- export declare const httpRequest: (url: string, type?: string) => Promise<any>;
1
+ export declare const httpRequest: (url: string, type?: 'text' | 'binary' | 'json') => Promise<any>;
2
2
  //# sourceMappingURL=assets-browser.d.ts.map
@@ -1,2 +1,4 @@
1
- export declare const httpRequest: (url: string, type: string) => any;
1
+ export declare function httpRequest(url: string, type: 'text'): Promise<string>;
2
+ export declare function httpRequest(url: string, type: 'binary'): Promise<ArrayBuffer>;
3
+ export declare function httpRequest(url: string, type: 'json'): Promise<Record<string, any>>;
2
4
  //# sourceMappingURL=assets.d.ts.map
@@ -9,12 +9,12 @@ const assetUtils_1 = require("./assetUtils");
9
9
  if (global && typeof global.fetch !== 'function') {
10
10
  global.fetch = cross_fetch_1.default;
11
11
  }
12
- const httpRequest = (url, type) => {
12
+ function httpRequest(url, type) {
13
13
  const asset = (0, assetUtils_1.getAssetByUrl)(url);
14
14
  if (!asset) {
15
15
  return /^https?/.test(url) ? (0, assets_browser_1.httpRequest)(url, type) : fs_1.promises.readFile(url);
16
16
  }
17
17
  return asset;
18
- };
18
+ }
19
19
  exports.httpRequest = httpRequest;
20
20
  //# sourceMappingURL=assets.js.map
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ensureInternalModelFeature = exports.parseRevision = exports.getUnavailableCapabilities = exports.parseCapabilities = 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 config_1 = require("../data/config");
7
6
  const types_1 = require("../types");
8
7
  const DEFAULT_CAPABILITIES_T1 = [
@@ -82,7 +81,7 @@ const getUnavailableCapabilities = (features, coins) => {
82
81
  .filter(info => !unavailable.includes(info))
83
82
  .forEach(info => {
84
83
  const supportVersion = info.support[key];
85
- if (typeof supportVersion === 'string' && versionUtils.isNewer(supportVersion, fw)) {
84
+ if (typeof supportVersion === 'string' && utils_1.versionUtils.isNewer(supportVersion, fw)) {
86
85
  list[info.shortcut.toLowerCase()] = 'update-required';
87
86
  unavailable.push(info);
88
87
  }
@@ -92,13 +91,13 @@ const getUnavailableCapabilities = (features, coins) => {
92
91
  return;
93
92
  const min = s.min ? s.min[key] : null;
94
93
  const max = s.max ? s.max[key] : null;
95
- if (min && (min === '0' || versionUtils.isNewer(min, fw))) {
94
+ if (min && (min === '0' || utils_1.versionUtils.isNewer(min, fw))) {
96
95
  const value = min === '0' ? 'no-support' : 'update-required';
97
96
  s.capabilities.forEach(m => {
98
97
  list[m] = value;
99
98
  });
100
99
  }
101
- if (max && !versionUtils.isNewerOrEqual(max, fw)) {
100
+ if (max && !utils_1.versionUtils.isNewerOrEqual(max, fw)) {
102
101
  s.capabilities.forEach(m => {
103
102
  list[m] = 'trezor-connect-outdated';
104
103
  });
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.filterSafeListByFirmware = exports.filterSafeListByBootloader = exports.isValidReleases = exports.isStrictFeatures = 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 isStrictFeatures = (extFeatures) => [1, 2].includes(extFeatures.major_version) &&
7
6
  (extFeatures.firmware_present === false ||
8
7
  extFeatures.bootloader_mode == null ||
@@ -12,10 +11,10 @@ const isValidReleases = (extReleases) => Array.isArray(extReleases) &&
12
11
  extReleases.every(release => release.version && release.min_firmware_version && release.min_bootloader_version);
13
12
  exports.isValidReleases = isValidReleases;
14
13
  const filterSafeListByBootloader = (releasesList, bootloaderVersion) => releasesList.filter(item => (!item.min_bootloader_version ||
15
- versionUtils.isNewerOrEqual(bootloaderVersion, item.min_bootloader_version)) &&
14
+ utils_1.versionUtils.isNewerOrEqual(bootloaderVersion, item.min_bootloader_version)) &&
16
15
  (!item.bootloader_version ||
17
- versionUtils.isNewerOrEqual(item.bootloader_version, bootloaderVersion)));
16
+ utils_1.versionUtils.isNewerOrEqual(item.bootloader_version, bootloaderVersion)));
18
17
  exports.filterSafeListByBootloader = filterSafeListByBootloader;
19
- const filterSafeListByFirmware = (releasesList, firmwareVersion) => releasesList.filter(item => versionUtils.isNewerOrEqual(firmwareVersion, item.min_firmware_version));
18
+ const filterSafeListByFirmware = (releasesList, firmwareVersion) => releasesList.filter(item => utils_1.versionUtils.isNewerOrEqual(firmwareVersion, item.min_firmware_version));
20
19
  exports.filterSafeListByFirmware = filterSafeListByFirmware;
21
20
  //# sourceMappingURL=firmwareUtils.js.map
@@ -87,8 +87,8 @@ export declare const convertMultisigPubKey: <T extends ({
87
87
  prev_index: number;
88
88
  } & {
89
89
  address_n?: undefined;
90
- script_pubkey: string;
91
90
  script_type: "EXTERNAL";
91
+ script_pubkey: string;
92
92
  }) | {
93
93
  address_n?: undefined;
94
94
  multisig?: {
@@ -123,6 +123,7 @@ export declare const convertMultisigPubKey: <T extends ({
123
123
  script_type: "PAYTOADDRESS";
124
124
  } | {
125
125
  address?: undefined;
126
+ script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
126
127
  multisig?: {
127
128
  address_n?: number[] | undefined;
128
129
  nodes?: {
@@ -149,12 +150,12 @@ export declare const convertMultisigPubKey: <T extends ({
149
150
  } | undefined;
150
151
  orig_hash?: string | undefined;
151
152
  orig_index?: number | undefined;
152
- script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
153
153
  payment_req_index?: number | undefined;
154
154
  address_n: number[];
155
155
  amount: string | number;
156
156
  } | {
157
157
  address_n?: undefined;
158
+ script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
158
159
  multisig?: {
159
160
  address_n?: number[] | undefined;
160
161
  nodes?: {
@@ -181,7 +182,6 @@ export declare const convertMultisigPubKey: <T extends ({
181
182
  } | undefined;
182
183
  orig_hash?: string | undefined;
183
184
  orig_index?: number | undefined;
184
- script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
185
185
  payment_req_index?: number | undefined;
186
186
  address: string;
187
187
  amount: string | number;
@@ -98,8 +98,8 @@ export declare const fixPath: <T extends ProtoWithDerivationPath<({
98
98
  prev_index: number;
99
99
  } & {
100
100
  address_n?: undefined;
101
- script_pubkey: string;
102
101
  script_type: "EXTERNAL";
102
+ script_pubkey: string;
103
103
  })> | ProtoWithDerivationPath<{
104
104
  address_n?: undefined;
105
105
  multisig?: {
@@ -134,6 +134,7 @@ export declare const fixPath: <T extends ProtoWithDerivationPath<({
134
134
  script_type: "PAYTOADDRESS";
135
135
  } | {
136
136
  address?: undefined;
137
+ script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
137
138
  multisig?: {
138
139
  address_n?: number[] | undefined;
139
140
  nodes?: {
@@ -160,12 +161,12 @@ export declare const fixPath: <T extends ProtoWithDerivationPath<({
160
161
  } | undefined;
161
162
  orig_hash?: string | undefined;
162
163
  orig_index?: number | undefined;
163
- script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
164
164
  payment_req_index?: number | undefined;
165
165
  address_n: number[];
166
166
  amount: string | number;
167
167
  } | {
168
168
  address_n?: undefined;
169
+ script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
169
170
  multisig?: {
170
171
  address_n?: number[] | undefined;
171
172
  nodes?: {
@@ -192,7 +193,6 @@ export declare const fixPath: <T extends ProtoWithDerivationPath<({
192
193
  } | undefined;
193
194
  orig_hash?: string | undefined;
194
195
  orig_index?: number | undefined;
195
- script_type?: "PAYTOADDRESS" | "PAYTOSCRIPTHASH" | "PAYTOMULTISIG" | "PAYTOWITNESS" | "PAYTOP2SHWITNESS" | "PAYTOTAPROOT" | undefined;
196
196
  payment_req_index?: number | undefined;
197
197
  address: string;
198
198
  amount: string | number;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getOnionDomain = exports.getHost = exports.getOrigin = void 0;
4
- const urlToOnion_1 = require("@trezor/utils/lib/urlToOnion");
4
+ const utils_1 = require("@trezor/utils");
5
5
  const getOrigin = (url) => {
6
6
  var _a;
7
7
  if (typeof url !== 'string')
@@ -29,9 +29,9 @@ exports.getHost = getHost;
29
29
  const getOnionDomain = (url, dict) => {
30
30
  var _a;
31
31
  if (Array.isArray(url))
32
- return url.map(u => { var _a; return (_a = (0, urlToOnion_1.urlToOnion)(u, dict)) !== null && _a !== void 0 ? _a : u; });
32
+ return url.map(u => { var _a; return (_a = (0, utils_1.urlToOnion)(u, dict)) !== null && _a !== void 0 ? _a : u; });
33
33
  if (typeof url === 'string')
34
- return (_a = (0, urlToOnion_1.urlToOnion)(url, dict)) !== null && _a !== void 0 ? _a : url;
34
+ return (_a = (0, utils_1.urlToOnion)(url, dict)) !== null && _a !== void 0 ? _a : url;
35
35
  return url;
36
36
  };
37
37
  exports.getOnionDomain = getOnionDomain;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trezor/connect",
3
- "version": "9.1.12",
3
+ "version": "9.2.0",
4
4
  "author": "Trezor <info@trezor.io>",
5
5
  "homepage": "https://github.com/trezor/trezor-suite/tree/develop/packages/connect",
6
6
  "description": "High-level javascript interface for Trezor hardware wallet.",
@@ -37,32 +37,32 @@
37
37
  "scripts": {
38
38
  "lint:js": "yarn g:eslint '**/*.{ts,tsx,js}'",
39
39
  "test:unit": "jest --version && jest",
40
- "type-check": "tsc --build",
41
- "build:lib": "rimraf ./lib && yarn tsc --build tsconfig.lib.json",
42
- "version:beta": "tsx scripts/bump-version.ts prerelease",
43
- "version:patch": "tsx scripts/bump-version.ts patch",
44
- "version:minor": "tsx scripts/bump-version.ts minor",
45
- "version:major": "tsx scripts/bump-version.ts major",
40
+ "type-check": "yarn g:tsc --build",
41
+ "build:lib": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.lib.json",
42
+ "version:beta": "yarn g:tsx scripts/bump-version.ts prerelease",
43
+ "version:patch": "yarn g:tsx scripts/bump-version.ts patch",
44
+ "version:minor": "yarn g:tsx scripts/bump-version.ts minor",
45
+ "version:major": "yarn g:tsx scripts/bump-version.ts major",
46
46
  "test:e2e:web": "ts-node -O '{\"module\": \"commonjs\", \"moduleResolution\": \"node\"}' ./e2e/run.ts web",
47
47
  "test:e2e:node": "ts-node -O '{\"module\": \"commonjs\", \"moduleResolution\": \"node\"}' ./e2e/run.ts node",
48
48
  "prepublishOnly": "yarn tsx ../../scripts/prepublishNPM.js",
49
49
  "prepublish": "yarn tsx ../../scripts/prepublish.js"
50
50
  },
51
51
  "dependencies": {
52
- "@ethereumjs/common": "^4.1.0",
53
- "@ethereumjs/tx": "^5.1.0",
52
+ "@ethereumjs/common": "^4.2.0",
53
+ "@ethereumjs/tx": "^5.2.1",
54
54
  "@fivebinaries/coin-selection": "2.2.1",
55
- "@trezor/blockchain-link": "2.1.25",
56
- "@trezor/blockchain-link-types": "1.0.13",
57
- "@trezor/connect-analytics": "1.0.12",
58
- "@trezor/connect-common": "0.0.28",
59
- "@trezor/protobuf": "1.0.8",
60
- "@trezor/protocol": "1.0.5",
61
- "@trezor/schema-utils": "1.0.1",
62
- "@trezor/transport": "1.1.24",
63
- "@trezor/utils": "9.0.21",
64
- "@trezor/utxo-lib": "2.0.6",
65
- "bignumber.js": "^9.1.1",
55
+ "@trezor/blockchain-link": "2.1.26",
56
+ "@trezor/blockchain-link-types": "1.0.14",
57
+ "@trezor/connect-analytics": "1.0.13",
58
+ "@trezor/connect-common": "0.0.29",
59
+ "@trezor/protobuf": "1.0.9",
60
+ "@trezor/protocol": "1.0.6",
61
+ "@trezor/schema-utils": "1.0.2",
62
+ "@trezor/transport": "1.1.25",
63
+ "@trezor/utils": "9.0.22",
64
+ "@trezor/utxo-lib": "2.0.7",
65
+ "bignumber.js": "^9.1.2",
66
66
  "blakejs": "^1.2.1",
67
67
  "bs58": "^5.0.0",
68
68
  "bs58check": "^3.0.1",
@@ -71,22 +71,20 @@
71
71
  },
72
72
  "devDependencies": {
73
73
  "@trezor/trezor-user-env-link": "1.0.2",
74
- "@types/karma": "^6.3.6",
74
+ "@types/karma": "^6.3.8",
75
75
  "@types/parse-uri": "^1.0.2",
76
- "ethereum-cryptography": "^2.0.0",
77
- "jest": "29.5.0",
76
+ "ethereum-cryptography": "^2.1.3",
77
+ "jest": "29.7.0",
78
78
  "karma": "^6.4.2",
79
79
  "karma-babel-preprocessor": "^8.0.2",
80
80
  "karma-chrome-launcher": "^3.2.0",
81
81
  "karma-jasmine": "^5.1.0",
82
82
  "karma-jasmine-async": "^0.0.1",
83
83
  "karma-sourcemap-loader": "^0.4.0",
84
- "karma-webpack": "^5.0.0",
85
- "rimraf": "^5.0.5",
84
+ "karma-webpack": "^5.0.1",
86
85
  "ts-node": "^10.9.1",
87
- "tsx": "^4.6.2",
88
- "typescript": "5.3.2",
89
- "webpack": "^5.89.0",
86
+ "tsx": "^4.7.0",
87
+ "webpack": "^5.90.1",
90
88
  "ws": "^8.16.0"
91
89
  },
92
90
  "peerDependencies": {