@trezor/connect 9.4.3-beta.1 → 9.4.3-beta.2

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 (200) hide show
  1. package/CHANGELOG.md +43 -4
  2. package/README.md +1 -1
  3. package/lib/api/applyFlags.js +1 -1
  4. package/lib/api/applySettings.js +1 -1
  5. package/lib/api/authenticateDevice.js +1 -1
  6. package/lib/api/authorizeCoinjoin.js +1 -1
  7. package/lib/api/backupDevice.js +1 -1
  8. package/lib/api/binance/api/binanceGetAddress.js +2 -1
  9. package/lib/api/binance/api/binanceGetPublicKey.js +2 -1
  10. package/lib/api/binance/api/binanceSignTransaction.js +2 -1
  11. package/lib/api/binance/binanceSignTx.js +1 -1
  12. package/lib/api/bitcoin/Fees.js +2 -2
  13. package/lib/api/bitcoin/TransactionComposer.d.ts +3 -3
  14. package/lib/api/bitcoin/TransactionComposer.js +2 -2
  15. package/lib/api/bitcoin/refTx.js +1 -1
  16. package/lib/api/blockchainDisconnect.js +1 -1
  17. package/lib/api/blockchainEvmRpcCall.d.ts +16 -0
  18. package/lib/api/blockchainEvmRpcCall.js +45 -0
  19. package/lib/api/cancelCoinjoinAuthorization.js +1 -1
  20. package/lib/api/cardano/api/cardanoGetAddress.js +2 -1
  21. package/lib/api/cardano/api/cardanoGetNativeScriptHash.js +2 -1
  22. package/lib/api/cardano/api/cardanoGetPublicKey.js +2 -1
  23. package/lib/api/cardano/api/cardanoSignTransaction.js +2 -1
  24. package/lib/api/cardano/cardanoAddressParameters.js +1 -1
  25. package/lib/api/cardano/cardanoAuxiliaryData.js +1 -1
  26. package/lib/api/cardano/cardanoCertificate.js +1 -1
  27. package/lib/api/cardano/cardanoInputs.d.ts +8 -8
  28. package/lib/api/cardano/cardanoInputs.js +1 -1
  29. package/lib/api/cardano/cardanoOutputs.d.ts +22 -22
  30. package/lib/api/cardano/cardanoOutputs.js +1 -1
  31. package/lib/api/cardano/cardanoTokenBundle.d.ts +6 -6
  32. package/lib/api/cardano/cardanoTokenBundle.js +1 -1
  33. package/lib/api/changeLanguage.js +1 -1
  34. package/lib/api/changePin.js +1 -1
  35. package/lib/api/cipherKeyValue.js +1 -1
  36. package/lib/api/common/paramsValidator.js +1 -1
  37. package/lib/api/composeTransaction.d.ts +9 -3
  38. package/lib/api/composeTransaction.js +7 -4
  39. package/lib/api/eos/api/eosGetPublicKey.js +2 -1
  40. package/lib/api/eos/api/eosSignTransaction.js +2 -1
  41. package/lib/api/eos/eosSignTx.d.ts +3 -3
  42. package/lib/api/ethereum/api/ethereumGetAddress.js +2 -1
  43. package/lib/api/ethereum/api/ethereumGetPublicKey.js +2 -1
  44. package/lib/api/ethereum/api/ethereumSignMessage.d.ts +1 -1
  45. package/lib/api/ethereum/api/ethereumSignMessage.js +2 -1
  46. package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +1 -1
  47. package/lib/api/ethereum/api/ethereumSignTransaction.js +13 -7
  48. package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +58 -57
  49. package/lib/api/ethereum/api/ethereumSignTypedData.js +3 -2
  50. package/lib/api/ethereum/api/ethereumVerifyMessage.js +2 -1
  51. package/lib/api/ethereum/ethereumDefinitions.d.ts +21 -21
  52. package/lib/api/ethereum/ethereumDefinitions.js +6 -5
  53. package/lib/api/firmware/getBinary.js +1 -1
  54. package/lib/api/firmware/x509certificate.js +3 -5
  55. package/lib/api/getAccountDescriptor.js +1 -1
  56. package/lib/api/getAddress.js +1 -1
  57. package/lib/api/getCoinInfo.d.ts +3 -0
  58. package/lib/api/getCoinInfo.js +1 -1
  59. package/lib/api/getFirmwareHash.js +1 -1
  60. package/lib/api/getOwnershipId.js +1 -1
  61. package/lib/api/getOwnershipProof.js +1 -1
  62. package/lib/api/getPublicKey.js +1 -1
  63. package/lib/api/index.d.ts +2 -1
  64. package/lib/api/index.js +5 -3
  65. package/lib/api/loadDevice.d.ts +14 -0
  66. package/lib/api/loadDevice.js +44 -0
  67. package/lib/api/nem/api/nemGetAddress.js +2 -1
  68. package/lib/api/nem/api/nemSignTransaction.js +2 -1
  69. package/lib/api/pushTransaction.js +1 -1
  70. package/lib/api/rebootToBootloader.js +1 -1
  71. package/lib/api/recoveryDevice.js +1 -1
  72. package/lib/api/requestLogin.js +1 -1
  73. package/lib/api/resetDevice.js +1 -1
  74. package/lib/api/ripple/api/rippleGetAddress.js +2 -1
  75. package/lib/api/ripple/api/rippleSignTransaction.js +2 -1
  76. package/lib/api/setBrightness.js +1 -1
  77. package/lib/api/setBusy.js +1 -1
  78. package/lib/api/signMessage.js +1 -1
  79. package/lib/api/solana/api/solanaGetAddress.js +2 -1
  80. package/lib/api/solana/api/solanaGetPublicKey.js +2 -1
  81. package/lib/api/solana/api/solanaSignTransaction.js +2 -1
  82. package/lib/api/stellar/api/stellarGetAddress.js +2 -1
  83. package/lib/api/stellar/api/stellarSignTransaction.js +2 -1
  84. package/lib/api/stellar/stellarSignTx.js +1 -1
  85. package/lib/api/tezos/api/tezosGetAddress.js +2 -1
  86. package/lib/api/tezos/api/tezosGetPublicKey.js +2 -1
  87. package/lib/api/tezos/api/tezosSignTransaction.js +2 -1
  88. package/lib/api/tezos/tezosSignTx.js +1 -1
  89. package/lib/api/unlockPath.js +1 -1
  90. package/lib/api/verifyMessage.js +1 -1
  91. package/lib/backend/Blockchain.d.ts +3 -0
  92. package/lib/backend/Blockchain.js +3 -0
  93. package/lib/constants/errors.d.ts +3 -0
  94. package/lib/constants/errors.js +3 -0
  95. package/lib/constants/index.d.ts +1 -0
  96. package/lib/constants/index.js +3 -1
  97. package/lib/constants/nem.d.ts +3 -3
  98. package/lib/constants/utxo.d.ts +3 -0
  99. package/lib/constants/utxo.js +5 -0
  100. package/lib/core/AbstractMethod.d.ts +13 -5
  101. package/lib/core/AbstractMethod.js +50 -24
  102. package/lib/core/index.js +41 -30
  103. package/lib/core/onCallFirmwareUpdate.d.ts +2 -2
  104. package/lib/core/onCallFirmwareUpdate.js +5 -5
  105. package/lib/data/DataManager.d.ts +0 -181
  106. package/lib/data/DataManager.js +40 -6
  107. package/lib/data/analyticsInfo.js +2 -1
  108. package/lib/data/coinInfo.d.ts +14 -0
  109. package/lib/data/config.d.ts +20 -22
  110. package/lib/data/config.js +15 -40
  111. package/lib/data/connectSettings.js +5 -4
  112. package/lib/data/deviceAuthenticityConfig.js +17 -0
  113. package/lib/data/deviceAuthenticityConfigTypes.d.ts +32 -23
  114. package/lib/data/firmwareInfo.d.ts +1 -1
  115. package/lib/data/models.d.ts +9 -0
  116. package/lib/data/models.js +9 -0
  117. package/lib/data/version.d.ts +1 -1
  118. package/lib/data/version.js +1 -1
  119. package/lib/device/Device.d.ts +143 -36
  120. package/lib/device/Device.js +226 -119
  121. package/lib/device/DeviceCommands.js +4 -4
  122. package/lib/device/DeviceList.d.ts +13 -21
  123. package/lib/device/DeviceList.js +54 -168
  124. package/lib/device/prompts.js +3 -2
  125. package/lib/device/resolveDescriptorForTaproot.d.ts +1 -1
  126. package/lib/events/call.d.ts +5 -5
  127. package/lib/events/call.js +2 -2
  128. package/lib/events/device.d.ts +0 -6
  129. package/lib/events/device.js +0 -6
  130. package/lib/events/transport.d.ts +1 -1
  131. package/lib/factory.d.ts +6 -6
  132. package/lib/factory.js +132 -136
  133. package/lib/impl/dynamic.d.ts +13 -19
  134. package/lib/impl/dynamic.js +0 -9
  135. package/lib/index-browser.d.ts +3 -1
  136. package/lib/index-browser.js +0 -3
  137. package/lib/index.d.ts +3 -1
  138. package/lib/index.js +1 -13
  139. package/lib/types/api/applySettings.d.ts +13 -13
  140. package/lib/types/api/authenticateDevice.d.ts +33 -24
  141. package/lib/types/api/authorizeCoinjoin.d.ts +10 -10
  142. package/lib/types/api/binance/index.d.ts +143 -143
  143. package/lib/types/api/binance/index.js +1 -1
  144. package/lib/types/api/bitcoin/index.d.ts +11 -11
  145. package/lib/types/api/bitcoin/index.js +1 -1
  146. package/lib/types/api/blockchainEvmRpcCall.d.ts +4 -0
  147. package/lib/types/api/{checkFirmwareAuthenticity.js → blockchainEvmRpcCall.js} +1 -1
  148. package/lib/types/api/cancelCoinjoinAuthorization.d.ts +1 -1
  149. package/lib/types/api/cardano/index.d.ts +507 -507
  150. package/lib/types/api/changeLanguage.d.ts +6 -6
  151. package/lib/types/api/cipherKeyValue.d.ts +8 -8
  152. package/lib/types/api/cipherKeyValue.js +1 -1
  153. package/lib/types/api/composeTransaction.d.ts +13 -7
  154. package/lib/types/api/eos/index.d.ts +525 -525
  155. package/lib/types/api/eos/index.js +1 -1
  156. package/lib/types/api/ethereum/index.d.ts +100 -100
  157. package/lib/types/api/firmwareUpdate.d.ts +5 -5
  158. package/lib/types/api/getAccountDescriptor.d.ts +4 -4
  159. package/lib/types/api/getAddress.d.ts +32 -32
  160. package/lib/types/api/getOwnershipId.d.ts +24 -24
  161. package/lib/types/api/getOwnershipProof.d.ts +28 -28
  162. package/lib/types/api/getPublicKey.d.ts +24 -24
  163. package/lib/types/api/getPublicKey.js +1 -1
  164. package/lib/types/api/index.d.ts +4 -8
  165. package/lib/types/api/init.d.ts +4 -2
  166. package/lib/types/api/loadDevice.d.ts +4 -0
  167. package/lib/types/api/loadDevice.js +3 -0
  168. package/lib/types/api/nem/index.d.ts +612 -612
  169. package/lib/types/api/nem/index.js +1 -1
  170. package/lib/types/api/nemGetAddress.d.ts +6 -6
  171. package/lib/types/api/pushTransaction.d.ts +3 -3
  172. package/lib/types/api/recoveryDevice.d.ts +9 -9
  173. package/lib/types/api/requestLogin.d.ts +25 -25
  174. package/lib/types/api/ripple/index.d.ts +21 -21
  175. package/lib/types/api/ripple/index.js +1 -1
  176. package/lib/types/api/solana/index.d.ts +23 -23
  177. package/lib/types/api/solana/index.js +1 -1
  178. package/lib/types/api/stellar/index.d.ts +582 -582
  179. package/lib/types/api/stellar/index.js +1 -1
  180. package/lib/types/api/tezos/index.d.ts +120 -120
  181. package/lib/types/api/tezos/index.js +1 -1
  182. package/lib/types/api/unlockPath.d.ts +2 -2
  183. package/lib/types/coinInfo.d.ts +231 -224
  184. package/lib/types/device.d.ts +13 -1
  185. package/lib/types/device.js +3 -1
  186. package/lib/types/fees.d.ts +19 -19
  187. package/lib/types/firmware.d.ts +1 -1
  188. package/lib/types/params.d.ts +21 -18
  189. package/lib/types/settings.d.ts +15 -9
  190. package/lib/types/utils.d.ts +1 -0
  191. package/lib/types/utils.js +3 -0
  192. package/lib/utils/addressUtils.js +2 -2
  193. package/lib/utils/assetUtils.js +3 -3
  194. package/lib/utils/deviceFeaturesUtils.js +1 -1
  195. package/lib/utils/uiPromiseManager.d.ts +2 -1
  196. package/lib/utils/uiPromiseManager.js +3 -3
  197. package/package.json +12 -12
  198. package/lib/api/checkFirmwareAuthenticity.d.ts +0 -11
  199. package/lib/api/checkFirmwareAuthenticity.js +0 -63
  200. package/lib/types/api/checkFirmwareAuthenticity.d.ts +0 -11
@@ -2,14 +2,14 @@ import { Static } from '@trezor/schema-utils';
2
2
  import type { Params, Response } from '../params';
3
3
  import { PROTO } from '../../constants';
4
4
  export type ChangeLanguage = Static<typeof ChangeLanguage>;
5
- export declare const ChangeLanguage: import("@sinclair/typebox").TUnion<[import("@trezor/schema-utils").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>;
5
+ export declare const ChangeLanguage: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TObject<{
6
+ binary: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUndefined>;
7
+ language: import("@trezor/schema-utils").TString;
8
+ baseUrl: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TString>;
9
9
  }>, import("@trezor/schema-utils").TObject<{
10
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>;
11
+ language: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUndefined>;
12
+ baseUrl: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUndefined>;
13
13
  }>]>;
14
14
  export declare function changeLanguage(params: Params<ChangeLanguage>): Response<PROTO.Success>;
15
15
  //# sourceMappingURL=changeLanguage.d.ts.map
@@ -1,14 +1,14 @@
1
- import { Params, BundledParams, Response } from '../params';
2
1
  import { Static } from '@trezor/schema-utils';
2
+ import { Params, BundledParams, Response } from '../params';
3
3
  export type CipherKeyValue = Static<typeof CipherKeyValue>;
4
4
  export declare const CipherKeyValue: import("@trezor/schema-utils").TObject<{
5
- path: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TArray<import("@sinclair/typebox").TNumber>]>;
6
- key: import("@sinclair/typebox").TString;
7
- value: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@trezor/schema-utils/lib/custom-types/buffer").TBuffer]>;
8
- encrypt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
9
- askOnEncrypt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
10
- askOnDecrypt: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
11
- iv: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@trezor/schema-utils/lib/custom-types/buffer").TBuffer]>>;
5
+ path: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils").TArray<import("@trezor/schema-utils").TNumber>]>;
6
+ key: import("@trezor/schema-utils").TString;
7
+ value: import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils/lib/custom-types/buffer").TBuffer]>;
8
+ encrypt: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
9
+ askOnEncrypt: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
10
+ askOnDecrypt: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TBoolean>;
11
+ iv: import("@trezor/schema-utils").TOptional<import("@trezor/schema-utils").TUnion<[import("@trezor/schema-utils").TString, import("@trezor/schema-utils/lib/custom-types/buffer").TBuffer]>>;
12
12
  }>;
13
13
  export interface CipheredValue {
14
14
  value: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CipherKeyValue = void 0;
4
- const params_1 = require("../params");
5
4
  const schema_utils_1 = require("@trezor/schema-utils");
5
+ const params_1 = require("../params");
6
6
  exports.CipherKeyValue = schema_utils_1.Type.Object({
7
7
  path: params_1.DerivationPath,
8
8
  key: schema_utils_1.Type.String(),
@@ -1,5 +1,5 @@
1
1
  import type { AccountAddresses, Utxo as AccountUtxo, Address as AccountAddress } from '@trezor/blockchain-link';
2
- import type { ComposeInput as ComposeInputBase, ComposeOutput as ComposeOutputBase, ComposeResultError as ComposeResultErrorBase, ComposeResultFinal as ComposeResultFinalBase, ComposeResultNonFinal as ComposeResultNonFinalBase } from '@trezor/utxo-lib';
2
+ import type { ComposeInput as ComposeInputBase, ComposeOutput as ComposeOutputBase, ComposeResultError as ComposeResultErrorBase, ComposeResultFinal as ComposeResultFinalBase, ComposeResultNonFinal as ComposeResultNonFinalBase, TransactionInputOutputSortingStrategy } from '@trezor/utxo-lib';
3
3
  import type { PROTO } from '../../constants';
4
4
  import type { Params, Response } from '../params';
5
5
  export type ComposeOutputPayment = Omit<Extract<ComposeOutputBase, {
@@ -10,7 +10,14 @@ export type ComposeOutputPayment = Omit<Extract<ComposeOutputBase, {
10
10
  export type ComposeOutput = Exclude<ComposeOutputBase, {
11
11
  type: 'payment';
12
12
  }> | ComposeOutputPayment;
13
- export interface ComposeParams {
13
+ type SortingStrategyPropsWithBackCompatibility = {
14
+ skipPermutation?: boolean;
15
+ sortingStrategy?: undefined;
16
+ } | {
17
+ skipPermutation?: undefined;
18
+ sortingStrategy?: TransactionInputOutputSortingStrategy;
19
+ };
20
+ export type ComposeParams = {
14
21
  outputs: ComposeOutput[];
15
22
  coin: string;
16
23
  identity?: string;
@@ -20,15 +27,14 @@ export interface ComposeParams {
20
27
  sequence?: number;
21
28
  baseFee?: number;
22
29
  floorBaseFee?: boolean;
23
- skipPermutation?: boolean;
24
- }
30
+ } & SortingStrategyPropsWithBackCompatibility;
25
31
  export type SignedTransaction = {
26
32
  signatures: string[];
27
33
  serializedTx: string;
28
34
  txid?: string;
29
35
  };
30
36
  export type ComposeUtxo = AccountUtxo & Partial<ComposeInputBase>;
31
- export interface PrecomposeParams {
37
+ export type PrecomposeParams = {
32
38
  outputs: ComposeOutput[];
33
39
  coin: string;
34
40
  identity?: string;
@@ -44,8 +50,7 @@ export interface PrecomposeParams {
44
50
  baseFee?: number;
45
51
  floorBaseFee?: boolean;
46
52
  sequence?: number;
47
- skipPermutation?: boolean;
48
- }
53
+ } & SortingStrategyPropsWithBackCompatibility;
49
54
  export type ComposedInputs = AccountUtxo & ComposeInputBase;
50
55
  export type ComposeResultError = ComposeResultErrorBase | {
51
56
  type: 'error';
@@ -65,4 +70,5 @@ export type PrecomposeResultFinal = Omit<ComposeResultFinal, 'inputs' | 'outputs
65
70
  export type PrecomposedResult = PrecomposeResultError | PrecomposeResultNonFinal | PrecomposeResultFinal;
66
71
  export declare function composeTransaction(params: Params<ComposeParams>): Response<SignedTransaction>;
67
72
  export declare function composeTransaction(params: Params<PrecomposeParams>): Response<PrecomposedResult[]>;
73
+ export {};
68
74
  //# sourceMappingURL=composeTransaction.d.ts.map