@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
@@ -0,0 +1,15 @@
1
+ import { Static } from '@trezor/schema-utils';
2
+ import type { Params, Response } from '../params';
3
+ import { PROTO } from '../../constants';
4
+ export type ChangeLanguage = Static<typeof ChangeLanguage>;
5
+ export declare const ChangeLanguage: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
6
+ binary: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
7
+ language: import("@sinclair/typebox").TString;
8
+ baseUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
9
+ }>, import("@sinclair/typebox").TObject<{
10
+ binary: import("@trezor/schema-utils/lib/custom-types/array-buffer").TArrayBuffer;
11
+ language: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
12
+ baseUrl: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUndefined>;
13
+ }>]>;
14
+ export declare function changeLanguage(params: Params<ChangeLanguage>): Response<PROTO.Success>;
15
+ //# sourceMappingURL=changeLanguage.d.ts.map
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ChangeLanguage = void 0;
4
+ const schema_utils_1 = require("@trezor/schema-utils");
5
+ exports.ChangeLanguage = schema_utils_1.Type.Union([
6
+ schema_utils_1.Type.Object({
7
+ binary: schema_utils_1.Type.Optional(schema_utils_1.Type.Undefined()),
8
+ language: schema_utils_1.Type.String(),
9
+ baseUrl: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
10
+ }),
11
+ schema_utils_1.Type.Object({
12
+ binary: schema_utils_1.Type.ArrayBuffer(),
13
+ language: schema_utils_1.Type.Optional(schema_utils_1.Type.Undefined()),
14
+ baseUrl: schema_utils_1.Type.Optional(schema_utils_1.Type.Undefined()),
15
+ }),
16
+ ]);
17
+ //# sourceMappingURL=changeLanguage.js.map
@@ -3,13 +3,9 @@ import { PROTO } from '../../constants';
3
3
  import { Address as AddressShared, Params, BundledParams, Response } from '../params';
4
4
  export type GetAddress = Static<typeof GetAddress>;
5
5
  export declare const GetAddress: import("@sinclair/typebox").TObject<{
6
- coin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
7
6
  path: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>;
8
- address: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
9
- showOnTrezor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
10
7
  chunkify: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
11
- useEventListener: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
12
- scriptType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"SPENDADDRESS">, import("@sinclair/typebox").TLiteral<"SPENDMULTISIG">, import("@sinclair/typebox").TLiteral<"SPENDWITNESS">, import("@sinclair/typebox").TLiteral<"SPENDP2SHWITNESS">, import("@sinclair/typebox").TLiteral<"SPENDTAPROOT">]>>;
8
+ address: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
13
9
  multisig: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
14
10
  pubkeys: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
15
11
  node: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
@@ -34,6 +30,10 @@ export declare const GetAddress: import("@sinclair/typebox").TObject<{
34
30
  }>>>;
35
31
  address_n: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>>;
36
32
  }>>;
33
+ coin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
34
+ showOnTrezor: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
35
+ useEventListener: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
36
+ scriptType: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"SPENDADDRESS">, import("@sinclair/typebox").TLiteral<"SPENDMULTISIG">, import("@sinclair/typebox").TLiteral<"SPENDWITNESS">, import("@sinclair/typebox").TLiteral<"SPENDP2SHWITNESS">, import("@sinclair/typebox").TLiteral<"SPENDTAPROOT">]>>;
37
37
  crossChain: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
38
38
  unlockPath: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TObject<{
39
39
  address_n: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>;
@@ -24,6 +24,7 @@ export declare const HDNodeResponse: import("@sinclair/typebox").TObject<{
24
24
  childNum: import("@sinclair/typebox").TNumber;
25
25
  xpub: import("@sinclair/typebox").TString;
26
26
  xpubSegwit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
27
+ descriptorChecksum: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
27
28
  chainCode: import("@sinclair/typebox").TString;
28
29
  publicKey: import("@sinclair/typebox").TString;
29
30
  fingerprint: import("@sinclair/typebox").TNumber;
@@ -21,6 +21,7 @@ exports.HDNodeResponse = schema_utils_1.Type.Object({
21
21
  childNum: schema_utils_1.Type.Number(),
22
22
  xpub: schema_utils_1.Type.String(),
23
23
  xpubSegwit: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
24
+ descriptorChecksum: schema_utils_1.Type.Optional(schema_utils_1.Type.String()),
24
25
  chainCode: schema_utils_1.Type.String(),
25
26
  publicKey: schema_utils_1.Type.String(),
26
27
  fingerprint: schema_utils_1.Type.Number(),
@@ -23,6 +23,7 @@ import { cardanoGetNativeScriptHash } from './cardanoGetNativeScriptHash';
23
23
  import { cardanoGetPublicKey } from './cardanoGetPublicKey';
24
24
  import { cardanoSignTransaction } from './cardanoSignTransaction';
25
25
  import { cardanoComposeTransaction } from './cardanoComposeTransaction';
26
+ import { changeLanguage } from './changeLanguage';
26
27
  import { changePin } from './changePin';
27
28
  import { changeWipeCode } from './changeWipeCode';
28
29
  import { cipherKeyValue } from './cipherKeyValue';
@@ -112,6 +113,7 @@ export interface TrezorConnect {
112
113
  cardanoGetPublicKey: typeof cardanoGetPublicKey;
113
114
  cardanoSignTransaction: typeof cardanoSignTransaction;
114
115
  cardanoComposeTransaction: typeof cardanoComposeTransaction;
116
+ changeLanguage: typeof changeLanguage;
115
117
  changePin: typeof changePin;
116
118
  changeWipeCode: typeof changeWipeCode;
117
119
  cipherKeyValue: typeof cipherKeyValue;
@@ -1,4 +1,4 @@
1
1
  import type { PROTO } from '../../constants';
2
- import type { CommonParams, Response } from '../params';
3
- export declare function rebootToBootloader(params?: CommonParams): Response<PROTO.Success>;
2
+ import type { Params, Response } from '../params';
3
+ export declare function rebootToBootloader(params?: Params<PROTO.RebootToBootloader>): Response<PROTO.Success>;
4
4
  //# sourceMappingURL=rebootToBootloader.d.ts.map
@@ -8,9 +8,9 @@ export declare const RecoveryDevice: import("@sinclair/typebox").TObject<{
8
8
  type: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TEnum<typeof PROTO.RecoveryDeviceType>>;
9
9
  pin_protection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
10
10
  passphrase_protection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
11
+ u2f_counter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
11
12
  word_count: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<12>, import("@sinclair/typebox").TLiteral<18>, import("@sinclair/typebox").TLiteral<24>]>]>>;
12
13
  enforce_wordlist: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
13
- u2f_counter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
14
14
  dry_run: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
15
15
  }>;
16
16
  export declare function recoveryDevice(params: Params<RecoveryDevice>): Response<PROTO.Success>;
@@ -195,6 +195,12 @@ export declare const StellarInflationOperation: import("@sinclair/typebox").TObj
195
195
  type: import("@sinclair/typebox").TLiteral<"inflation">;
196
196
  source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
197
197
  }>;
198
+ export type StellarClaimClaimableBalanceOperation = Static<typeof StellarClaimClaimableBalanceOperation>;
199
+ export declare const StellarClaimClaimableBalanceOperation: import("@sinclair/typebox").TObject<{
200
+ type: import("@sinclair/typebox").TLiteral<"claimClaimableBalance">;
201
+ source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
202
+ balanceId: import("@sinclair/typebox").TString;
203
+ }>;
198
204
  export type StellarOperation = Static<typeof StellarOperation>;
199
205
  export declare const StellarOperation: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
200
206
  type: import("@sinclair/typebox").TLiteral<"createAccount">;
@@ -357,6 +363,10 @@ export declare const StellarOperation: import("@sinclair/typebox").TUnion<[impor
357
363
  type: import("@sinclair/typebox").TLiteral<"bumpSequence">;
358
364
  source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
359
365
  bumpTo: import("@trezor/schema-utils/lib/custom-types/uint").TUint;
366
+ }>, import("@sinclair/typebox").TObject<{
367
+ type: import("@sinclair/typebox").TLiteral<"claimClaimableBalance">;
368
+ source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
369
+ balanceId: import("@sinclair/typebox").TString;
360
370
  }>]>;
361
371
  export type StellarTransaction = Static<typeof StellarTransaction>;
362
372
  export declare const StellarTransaction: import("@sinclair/typebox").TObject<{
@@ -534,6 +544,10 @@ export declare const StellarTransaction: import("@sinclair/typebox").TObject<{
534
544
  type: import("@sinclair/typebox").TLiteral<"bumpSequence">;
535
545
  source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
536
546
  bumpTo: import("@trezor/schema-utils/lib/custom-types/uint").TUint;
547
+ }>, import("@sinclair/typebox").TObject<{
548
+ type: import("@sinclair/typebox").TLiteral<"claimClaimableBalance">;
549
+ source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
550
+ balanceId: import("@sinclair/typebox").TString;
537
551
  }>]>>;
538
552
  }>;
539
553
  export type StellarSignTransaction = Static<typeof StellarSignTransaction>;
@@ -715,6 +729,10 @@ export declare const StellarSignTransaction: import("@sinclair/typebox").TObject
715
729
  type: import("@sinclair/typebox").TLiteral<"bumpSequence">;
716
730
  source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
717
731
  bumpTo: import("@trezor/schema-utils/lib/custom-types/uint").TUint;
732
+ }>, import("@sinclair/typebox").TObject<{
733
+ type: import("@sinclair/typebox").TLiteral<"claimClaimableBalance">;
734
+ source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
735
+ balanceId: import("@sinclair/typebox").TString;
718
736
  }>]>>;
719
737
  }>;
720
738
  }>;
@@ -887,5 +905,10 @@ export declare const StellarOperationMessage: import("@sinclair/typebox").TUnion
887
905
  }>, import("@sinclair/typebox").TObject<{
888
906
  source_account: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
889
907
  bump_to: import("@trezor/schema-utils/lib/custom-types/uint").TUint;
908
+ }>]>, import("@sinclair/typebox").TIntersect<[import("@sinclair/typebox").TObject<{
909
+ type: import("@sinclair/typebox").TLiteral<"StellarClaimClaimableBalanceOp">;
910
+ }>, import("@sinclair/typebox").TObject<{
911
+ source_account: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
912
+ balance_id: import("@sinclair/typebox").TString;
890
913
  }>]>]>;
891
914
  //# sourceMappingURL=index.d.ts.map
@@ -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.1",
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.27",
56
+ "@trezor/blockchain-link-types": "1.0.14",
57
+ "@trezor/connect-analytics": "1.0.13",
58
+ "@trezor/connect-common": "0.0.30",
59
+ "@trezor/protobuf": "1.0.10",
60
+ "@trezor/protocol": "1.0.6",
61
+ "@trezor/schema-utils": "1.0.2",
62
+ "@trezor/transport": "1.1.26",
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": {