@trezor/connect 9.0.0-beta.4 → 9.0.0-beta.7

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 (157) hide show
  1. package/README.md +37 -14
  2. package/lib/api/binance/binanceSignTx.d.ts +1 -1
  3. package/lib/api/binanceSignTransaction.d.ts +1 -1
  4. package/lib/api/binanceSignTransaction.js +1 -1
  5. package/lib/api/bitcoin/Fees.js +1 -1
  6. package/lib/api/bitcoin/TransactionComposer.js +1 -1
  7. package/lib/api/bitcoin/enhanceSignTx.d.ts +1 -1
  8. package/lib/api/bitcoin/index.js +9 -9
  9. package/lib/api/bitcoin/refTx.d.ts +3 -3
  10. package/lib/api/bitcoin/signtx.d.ts +1 -1
  11. package/lib/api/bitcoin/signtxLegacy.d.ts +1 -1
  12. package/lib/api/cardano/cardanoAddressParameters.d.ts +1 -1
  13. package/lib/api/cardano/cardanoAuxiliaryData.d.ts +1 -1
  14. package/lib/api/cardano/cardanoCertificate.d.ts +1 -1
  15. package/lib/api/cardano/cardanoInputs.d.ts +1 -0
  16. package/lib/api/cardano/cardanoInputs.js +12 -1
  17. package/lib/api/cardano/cardanoOutputs.d.ts +6 -3
  18. package/lib/api/cardano/cardanoOutputs.js +37 -1
  19. package/lib/api/cardano/cardanoTokenBundle.d.ts +1 -1
  20. package/lib/api/cardano/cardanoUtils.d.ts +3 -0
  21. package/lib/api/cardano/cardanoUtils.js +17 -0
  22. package/lib/api/cardano/cardanoWitnesses.js +4 -4
  23. package/lib/api/cardanoGetAddress.d.ts +1 -1
  24. package/lib/api/cardanoGetNativeScriptHash.d.ts +1 -1
  25. package/lib/api/cardanoGetPublicKey.d.ts +1 -1
  26. package/lib/api/cardanoSignTransaction.d.ts +8 -4
  27. package/lib/api/cardanoSignTransaction.js +40 -17
  28. package/lib/api/common/Discovery.js +1 -1
  29. package/lib/api/common/paramsValidator.d.ts +1 -1
  30. package/lib/api/composeTransaction.d.ts +1 -1
  31. package/lib/api/composeTransaction.js +2 -2
  32. package/lib/api/eos/eosSignTx.d.ts +1 -1
  33. package/lib/api/eos/eosSignTx.js +1 -1
  34. package/lib/api/eosGetPublicKey.d.ts +1 -1
  35. package/lib/api/eosSignTransaction.js +1 -1
  36. package/lib/api/ethereum/__fixtures__/ethereumSignTypedData.js +1 -1
  37. package/lib/api/ethereum/ethereumSignTx.d.ts +3 -3
  38. package/lib/api/ethereum/ethereumSignTypedData.d.ts +1 -1
  39. package/lib/api/ethereum/ethereumSignTypedData.js +1 -1
  40. package/lib/api/ethereumSignTransaction.d.ts +1 -1
  41. package/lib/api/ethereumSignTransaction.js +1 -1
  42. package/lib/api/ethereumSignTypedData.d.ts +1 -1
  43. package/lib/api/firmware/calculateFirmwareHash.d.ts +6 -0
  44. package/lib/api/firmware/calculateFirmwareHash.js +26 -0
  45. package/lib/api/firmware/getBinary.d.ts +2 -2
  46. package/lib/api/firmware/getBinary.js +2 -3
  47. package/lib/api/firmware/index.d.ts +5 -0
  48. package/lib/api/firmware/index.js +13 -0
  49. package/lib/api/firmware/modifyFirmware.d.ts +3 -5
  50. package/lib/api/firmware/modifyFirmware.js +12 -10
  51. package/lib/api/{management → firmware}/uploadFirmware.d.ts +0 -0
  52. package/lib/api/{management → firmware}/uploadFirmware.js +0 -0
  53. package/lib/api/firmwareUpdate.d.ts +4 -1
  54. package/lib/api/firmwareUpdate.js +8 -13
  55. package/lib/api/getFirmwareHash.d.ts +7 -0
  56. package/lib/api/getFirmwareHash.js +29 -0
  57. package/lib/api/index.d.ts +1 -0
  58. package/lib/api/index.js +4 -2
  59. package/lib/api/nem/nemSignTx.d.ts +1 -1
  60. package/lib/api/nemSignTransaction.js +1 -1
  61. package/lib/api/signTransaction.d.ts +2 -2
  62. package/lib/api/signTransaction.js +1 -1
  63. package/lib/api/stellar/stellarSignTx.d.ts +1 -1
  64. package/lib/api/stellarSignTransaction.d.ts +1 -1
  65. package/lib/api/stellarSignTransaction.js +1 -1
  66. package/lib/api/tezos/tezosSignTx.d.ts +1 -1
  67. package/lib/api/tezos/tezosSignTx.js +1 -1
  68. package/lib/api/tezosSignTransaction.js +1 -1
  69. package/lib/backend/BlockchainLink.js +1 -1
  70. package/lib/constants/errors.d.ts +1 -1
  71. package/lib/constants/errors.js +1 -1
  72. package/lib/constants/index.js +5 -5
  73. package/lib/core/AbstractMethod.js +1 -1
  74. package/lib/core/index.d.ts +1 -1
  75. package/lib/core/index.js +1 -1
  76. package/lib/core/method.d.ts +1 -1
  77. package/lib/core/method.js +1 -1
  78. package/lib/data/DataManager.js +1 -1
  79. package/lib/data/connectSettings.d.ts +1 -1
  80. package/lib/data/firmwareInfo.js +0 -9
  81. package/lib/data/version.d.ts +1 -1
  82. package/lib/data/version.js +1 -1
  83. package/lib/device/AbortController.js +1 -1
  84. package/lib/device/DescriptorStream.js +1 -1
  85. package/lib/device/Device.js +1 -1
  86. package/lib/device/DeviceCommands.js +2 -2
  87. package/lib/device/DeviceList.js +6 -4
  88. package/lib/events/index.js +10 -10
  89. package/lib/exports.js +3 -3
  90. package/lib/factory.js +1 -0
  91. package/lib/index-browser.js +1 -1
  92. package/lib/index.js +2 -2
  93. package/lib/types/api/binance/index.d.ts +29 -0
  94. package/lib/types/api/binance/index.js +3 -0
  95. package/lib/types/api/binanceSignTransaction.d.ts +1 -27
  96. package/lib/types/api/bitcoin/index.d.ts +82 -0
  97. package/lib/types/api/bitcoin/index.js +3 -0
  98. package/lib/types/api/cardano/index.d.ts +193 -0
  99. package/lib/types/api/cardano/index.js +3 -0
  100. package/lib/types/api/cardanoGetAddress.d.ts +1 -31
  101. package/lib/types/api/cardanoGetNativeScriptHash.d.ts +1 -18
  102. package/lib/types/api/cardanoGetPublicKey.d.ts +1 -12
  103. package/lib/types/api/cardanoSignTransaction.d.ts +1 -127
  104. package/lib/types/api/eos/index.d.ts +119 -0
  105. package/lib/types/api/eos/index.js +3 -0
  106. package/lib/types/api/eosGetPublicKey.d.ts +1 -10
  107. package/lib/types/api/eosSignTransaction.d.ts +1 -107
  108. package/lib/types/api/ethereum/index.d.ts +86 -0
  109. package/lib/types/api/ethereum/index.js +3 -0
  110. package/lib/types/api/ethereumSignMessage.d.ts +1 -5
  111. package/lib/types/api/ethereumSignTransaction.d.ts +1 -37
  112. package/lib/types/api/ethereumSignTypedData.d.ts +1 -37
  113. package/lib/types/api/ethereumVerifyMessage.d.ts +1 -6
  114. package/lib/types/api/firmwareUpdate.d.ts +6 -3
  115. package/lib/types/api/getFirmwareHash.d.ts +4 -0
  116. package/lib/types/api/getFirmwareHash.js +3 -0
  117. package/lib/types/api/index.d.ts +2 -0
  118. package/lib/types/api/nem/index.d.ts +90 -0
  119. package/lib/types/api/nem/index.js +3 -0
  120. package/lib/types/api/nemSignTransaction.d.ts +2 -89
  121. package/lib/types/api/ripple/index.d.ts +21 -0
  122. package/lib/types/api/ripple/index.js +3 -0
  123. package/lib/types/api/rippleSignTransaction.d.ts +1 -20
  124. package/lib/types/api/signMessage.d.ts +1 -7
  125. package/lib/types/api/signTransaction.d.ts +1 -67
  126. package/lib/types/api/stellar/index.d.ts +180 -0
  127. package/lib/types/api/stellar/index.js +3 -0
  128. package/lib/types/api/stellarSignTransaction.d.ts +1 -179
  129. package/lib/types/api/tezos/index.d.ts +58 -0
  130. package/lib/types/api/tezos/index.js +3 -0
  131. package/lib/types/api/tezosSignTransaction.d.ts +1 -57
  132. package/lib/types/api/verifyMessage.d.ts +1 -7
  133. package/lib/types/index.d.ts +8 -4
  134. package/lib/types/index.js +15 -7
  135. package/lib/utils/__fixtures__/accountUtils.js +1 -1
  136. package/lib/utils/__fixtures__/ethereumUtils.js +1 -1
  137. package/lib/utils/__fixtures__/formatUtils.js +1 -1
  138. package/lib/utils/accountUtils.d.ts +2 -2
  139. package/lib/utils/assetUtils.d.ts +2 -0
  140. package/lib/utils/assetUtils.js +22 -0
  141. package/lib/utils/assets-browser.js +1 -1
  142. package/lib/utils/assets-native.d.ts +2 -0
  143. package/lib/utils/assets-native.js +7 -0
  144. package/lib/utils/assets.js +6 -14
  145. package/lib/utils/browserUtils.js +1 -1
  146. package/lib/utils/debug.d.ts +2 -2
  147. package/lib/utils/deviceFeaturesUtils.d.ts +1 -1
  148. package/lib/utils/deviceFeaturesUtils.js +1 -1
  149. package/lib/utils/ethereumUtils.d.ts +1 -1
  150. package/lib/utils/formatUtils.js +1 -1
  151. package/lib/utils/hdnodeUtils.d.ts +1 -1
  152. package/lib/utils/pathUtils.d.ts +2 -2
  153. package/lib/workers/workers-browser.js +5 -5
  154. package/lib/workers/workers-react-native.js +4 -4
  155. package/lib/workers/workers.js +4 -4
  156. package/package.json +12 -9
  157. package/CHANGELOG.md +0 -26
@@ -1,130 +1,4 @@
1
- import type { PROTO } from '../../constants';
2
- import type { CardanoAddressParameters } from './cardanoGetAddress';
3
1
  import type { Params, Response } from '../params';
4
- export interface CardanoInput {
5
- path?: string | number[];
6
- prev_hash: string;
7
- prev_index: number;
8
- }
9
- export interface CardanoToken {
10
- assetNameBytes: string;
11
- amount?: string;
12
- mintAmount?: string;
13
- }
14
- export interface CardanoAssetGroup {
15
- policyId: string;
16
- tokenAmounts: CardanoToken[];
17
- }
18
- export declare type CardanoOutput = {
19
- addressParameters: CardanoAddressParameters;
20
- amount: string;
21
- tokenBundle?: CardanoAssetGroup[];
22
- datumHash?: string;
23
- } | {
24
- address: string;
25
- amount: string;
26
- tokenBundle?: CardanoAssetGroup[];
27
- datumHash?: string;
28
- };
29
- export interface CardanoPoolOwner {
30
- stakingKeyPath?: string | number[];
31
- stakingKeyHash?: string;
32
- }
33
- export interface CardanoPoolRelay {
34
- type: PROTO.CardanoPoolRelayType;
35
- ipv4Address?: string;
36
- ipv6Address?: string;
37
- port?: number;
38
- hostName?: string;
39
- }
40
- export interface CardanoPoolMetadata {
41
- url: string;
42
- hash: string;
43
- }
44
- export interface CardanoPoolMargin {
45
- numerator: string;
46
- denominator: string;
47
- }
48
- export interface CardanoPoolParameters {
49
- poolId: string;
50
- vrfKeyHash: string;
51
- pledge: string;
52
- cost: string;
53
- margin: CardanoPoolMargin;
54
- rewardAccount: string;
55
- owners: CardanoPoolOwner[];
56
- relays: CardanoPoolRelay[];
57
- metadata: CardanoPoolMetadata;
58
- }
59
- export interface CardanoCertificate {
60
- type: PROTO.CardanoCertificateType;
61
- path?: string | number[];
62
- pool?: string;
63
- poolParameters?: CardanoPoolParameters;
64
- scriptHash?: string;
65
- keyHash?: string;
66
- }
67
- export interface CardanoWithdrawal {
68
- path?: string | number[];
69
- amount: string;
70
- scriptHash?: string;
71
- keyHash?: string;
72
- }
73
- export declare type CardanoMint = CardanoAssetGroup[];
74
- export interface CardanoCollateralInput {
75
- path?: string | number[];
76
- prev_hash: string;
77
- prev_index: number;
78
- }
79
- export interface CardanoRequiredSigner {
80
- keyPath?: string | number[];
81
- keyHash?: string;
82
- }
83
- export interface CardanoCatalystRegistrationParameters {
84
- votingPublicKey: string;
85
- stakingPath: string | number[];
86
- rewardAddressParameters: CardanoAddressParameters;
87
- nonce: string;
88
- }
89
- export interface CardanoAuxiliaryData {
90
- hash?: string;
91
- catalystRegistrationParameters?: CardanoCatalystRegistrationParameters;
92
- }
93
- export interface CardanoSignTransaction {
94
- inputs: CardanoInput[];
95
- outputs: CardanoOutput[];
96
- fee: string;
97
- ttl?: string;
98
- certificates?: CardanoCertificate[];
99
- withdrawals?: CardanoWithdrawal[];
100
- validityIntervalStart?: string;
101
- auxiliaryData?: CardanoAuxiliaryData;
102
- mint?: CardanoMint;
103
- scriptDataHash?: string;
104
- collateralInputs?: CardanoCollateralInput[];
105
- requiredSigners?: CardanoRequiredSigner[];
106
- additionalWitnessRequests?: (string | number[])[];
107
- protocolMagic: number;
108
- networkId: number;
109
- signingMode: PROTO.CardanoTxSigningMode;
110
- derivationType?: PROTO.CardanoDerivationType;
111
- includeNetworkId?: boolean;
112
- }
113
- export interface CardanoSignedTxWitness {
114
- type: PROTO.CardanoTxWitnessType;
115
- pubKey: string;
116
- signature: string;
117
- chainCode?: string;
118
- }
119
- export interface CardanoAuxiliaryDataSupplement {
120
- type: PROTO.CardanoTxAuxiliaryDataSupplementType;
121
- auxiliaryDataHash: string;
122
- catalystSignature?: string;
123
- }
124
- export interface CardanoSignedTxData {
125
- hash: string;
126
- witnesses: CardanoSignedTxWitness[];
127
- auxiliaryDataSupplement?: CardanoAuxiliaryDataSupplement;
128
- }
2
+ import type { CardanoSignTransaction, CardanoSignedTxData } from './cardano';
129
3
  export declare function cardanoSignTransaction(params: Params<CardanoSignTransaction>): Response<CardanoSignedTxData>;
130
4
  //# sourceMappingURL=cardanoSignTransaction.d.ts.map
@@ -0,0 +1,119 @@
1
+ import { PROTO } from '../../../constants';
2
+ export interface EosGetPublicKey {
3
+ path: string | number[];
4
+ showOnTrezor?: boolean;
5
+ }
6
+ export interface EosPublicKey {
7
+ wifPublicKey: string;
8
+ rawPublicKey: string;
9
+ path: number[];
10
+ serializedPath: string;
11
+ }
12
+ export interface EosTxHeader {
13
+ expiration: PROTO.UintType;
14
+ refBlockNum: number;
15
+ refBlockPrefix: number;
16
+ maxNetUsageWords: number;
17
+ maxCpuUsageMs: number;
18
+ delaySec: number;
19
+ }
20
+ export interface EosAuthorization {
21
+ threshold: number;
22
+ keys: PROTO.EosAuthorizationKey[];
23
+ accounts: {
24
+ permission: PROTO.EosPermissionLevel;
25
+ weight: number;
26
+ }[];
27
+ waits: PROTO.EosAuthorizationWait[];
28
+ }
29
+ export interface EosTxActionCommon {
30
+ account: string;
31
+ authorization: PROTO.EosPermissionLevel[];
32
+ }
33
+ export declare type EosTxAction = (EosTxActionCommon & {
34
+ name: 'transfer';
35
+ data: {
36
+ from: string;
37
+ to: string;
38
+ quantity: string;
39
+ memo: string;
40
+ };
41
+ }) | (EosTxActionCommon & {
42
+ name: 'delegatebw';
43
+ data: {
44
+ from: string;
45
+ receiver: string;
46
+ stake_net_quantity: string;
47
+ stake_cpu_quantity: string;
48
+ transfer: boolean;
49
+ };
50
+ }) | (EosTxActionCommon & {
51
+ name: 'undelegatebw';
52
+ data: {
53
+ from: string;
54
+ receiver: string;
55
+ unstake_net_quantity: string;
56
+ unstake_cpu_quantity: string;
57
+ };
58
+ }) | (EosTxActionCommon & {
59
+ name: 'buyram';
60
+ data: {
61
+ payer: string;
62
+ receiver: string;
63
+ quant: string;
64
+ };
65
+ }) | (EosTxActionCommon & {
66
+ name: 'buyrambytes';
67
+ data: PROTO.EosActionBuyRamBytes;
68
+ }) | (EosTxActionCommon & {
69
+ name: 'sellram';
70
+ data: PROTO.EosActionSellRam;
71
+ }) | (EosTxActionCommon & {
72
+ name: 'voteproducer';
73
+ data: {
74
+ voter: string;
75
+ proxy: string;
76
+ producers: string[];
77
+ };
78
+ }) | (EosTxActionCommon & {
79
+ name: 'refund';
80
+ data: PROTO.EosActionRefund;
81
+ }) | (EosTxActionCommon & {
82
+ name: 'updateauth';
83
+ data: {
84
+ account: string;
85
+ permission: string;
86
+ parent: string;
87
+ auth: EosAuthorization;
88
+ };
89
+ }) | (EosTxActionCommon & {
90
+ name: 'deleteauth';
91
+ data: PROTO.EosActionDeleteAuth;
92
+ }) | (EosTxActionCommon & {
93
+ name: 'linkauth';
94
+ data: PROTO.EosActionLinkAuth;
95
+ }) | (EosTxActionCommon & {
96
+ name: 'unlinkauth';
97
+ data: PROTO.EosActionUnlinkAuth;
98
+ }) | (EosTxActionCommon & {
99
+ name: 'newaccount';
100
+ data: {
101
+ creator: string;
102
+ name: string;
103
+ owner: EosAuthorization;
104
+ active: EosAuthorization;
105
+ };
106
+ });
107
+ export interface EosSDKTransaction {
108
+ chainId: string;
109
+ header: EosTxHeader;
110
+ actions: Array<EosTxAction | (EosTxActionCommon & {
111
+ name: string;
112
+ data: string;
113
+ })>;
114
+ }
115
+ export interface EosSignTransaction {
116
+ path: string | number[];
117
+ transaction: EosSDKTransaction;
118
+ }
119
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -1,14 +1,5 @@
1
1
  import type { Params, BundledParams, Response } from '../params';
2
- export interface EosGetPublicKey {
3
- path: string | number[];
4
- showOnTrezor?: boolean;
5
- }
6
- export interface EosPublicKey {
7
- wifPublicKey: string;
8
- rawPublicKey: string;
9
- path: number[];
10
- serializedPath: string;
11
- }
2
+ import { EosGetPublicKey, EosPublicKey } from './eos';
12
3
  export declare function eosGetPublicKey(params: Params<EosGetPublicKey>): Response<EosPublicKey>;
13
4
  export declare function eosGetPublicKey(params: BundledParams<EosGetPublicKey>): Response<EosPublicKey[]>;
14
5
  //# sourceMappingURL=eosGetPublicKey.d.ts.map
@@ -1,111 +1,5 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- export interface EosTxHeader {
4
- expiration: PROTO.UintType;
5
- refBlockNum: number;
6
- refBlockPrefix: number;
7
- maxNetUsageWords: number;
8
- maxCpuUsageMs: number;
9
- delaySec: number;
10
- }
11
- export interface EosAuthorization {
12
- threshold: number;
13
- keys: PROTO.EosAuthorizationKey[];
14
- accounts: {
15
- permission: PROTO.EosPermissionLevel;
16
- weight: number;
17
- }[];
18
- waits: PROTO.EosAuthorizationWait[];
19
- }
20
- export interface EosTxActionCommon {
21
- account: string;
22
- authorization: PROTO.EosPermissionLevel[];
23
- }
24
- export declare type EosTxAction = (EosTxActionCommon & {
25
- name: 'transfer';
26
- data: {
27
- from: string;
28
- to: string;
29
- quantity: string;
30
- memo: string;
31
- };
32
- }) | (EosTxActionCommon & {
33
- name: 'delegatebw';
34
- data: {
35
- from: string;
36
- receiver: string;
37
- stake_net_quantity: string;
38
- stake_cpu_quantity: string;
39
- transfer: boolean;
40
- };
41
- }) | (EosTxActionCommon & {
42
- name: 'undelegatebw';
43
- data: {
44
- from: string;
45
- receiver: string;
46
- unstake_net_quantity: string;
47
- unstake_cpu_quantity: string;
48
- };
49
- }) | (EosTxActionCommon & {
50
- name: 'buyram';
51
- data: {
52
- payer: string;
53
- receiver: string;
54
- quant: string;
55
- };
56
- }) | (EosTxActionCommon & {
57
- name: 'buyrambytes';
58
- data: PROTO.EosActionBuyRamBytes;
59
- }) | (EosTxActionCommon & {
60
- name: 'sellram';
61
- data: PROTO.EosActionSellRam;
62
- }) | (EosTxActionCommon & {
63
- name: 'voteproducer';
64
- data: {
65
- voter: string;
66
- proxy: string;
67
- producers: string[];
68
- };
69
- }) | (EosTxActionCommon & {
70
- name: 'refund';
71
- data: PROTO.EosActionRefund;
72
- }) | (EosTxActionCommon & {
73
- name: 'updateauth';
74
- data: {
75
- account: string;
76
- permission: string;
77
- parent: string;
78
- auth: EosAuthorization;
79
- };
80
- }) | (EosTxActionCommon & {
81
- name: 'deleteauth';
82
- data: PROTO.EosActionDeleteAuth;
83
- }) | (EosTxActionCommon & {
84
- name: 'linkauth';
85
- data: PROTO.EosActionLinkAuth;
86
- }) | (EosTxActionCommon & {
87
- name: 'unlinkauth';
88
- data: PROTO.EosActionUnlinkAuth;
89
- }) | (EosTxActionCommon & {
90
- name: 'newaccount';
91
- data: {
92
- creator: string;
93
- name: string;
94
- owner: EosAuthorization;
95
- active: EosAuthorization;
96
- };
97
- });
98
- export interface EosSDKTransaction {
99
- chainId: string;
100
- header: EosTxHeader;
101
- actions: Array<EosTxAction | (EosTxActionCommon & {
102
- name: string;
103
- data: string;
104
- })>;
105
- }
106
- export interface EosSignTransaction {
107
- path: string | number[];
108
- transaction: EosSDKTransaction;
109
- }
3
+ import type { EosSignTransaction } from './eos';
110
4
  export declare function eosSignTransaction(params: Params<EosSignTransaction>): Response<PROTO.EosSignedTx>;
111
5
  //# sourceMappingURL=eosSignTransaction.d.ts.map
@@ -0,0 +1,86 @@
1
+ export interface EthereumSignMessage {
2
+ path: string | number[];
3
+ message: string;
4
+ hex?: boolean;
5
+ }
6
+ export interface EthereumTransaction {
7
+ to: string;
8
+ value: string;
9
+ gasPrice: string;
10
+ gasLimit: string;
11
+ maxFeePerGas?: typeof undefined;
12
+ maxPriorityFeePerGas?: typeof undefined;
13
+ nonce: string;
14
+ data?: string;
15
+ chainId: number;
16
+ txType?: number;
17
+ }
18
+ export interface EthereumAccessList {
19
+ address: string;
20
+ storageKeys: string[];
21
+ }
22
+ export interface EthereumTransactionEIP1559 {
23
+ to: string;
24
+ value: string;
25
+ gasLimit: string;
26
+ gasPrice?: typeof undefined;
27
+ nonce: string;
28
+ data?: string;
29
+ chainId: number;
30
+ maxFeePerGas: string;
31
+ maxPriorityFeePerGas: string;
32
+ accessList?: EthereumAccessList[];
33
+ }
34
+ export interface EthereumSignTransaction {
35
+ path: string | number[];
36
+ transaction: EthereumTransaction | EthereumTransactionEIP1559;
37
+ }
38
+ export interface EthereumSignedTx {
39
+ v: string;
40
+ r: string;
41
+ s: string;
42
+ }
43
+ interface EthereumSignTypedDataTypeProperty {
44
+ name: string;
45
+ type: string;
46
+ }
47
+ export interface EthereumSignTypedDataTypes {
48
+ EIP712Domain: EthereumSignTypedDataTypeProperty[];
49
+ [additionalProperties: string]: EthereumSignTypedDataTypeProperty[];
50
+ }
51
+ export interface EthereumSignTypedDataMessage<T extends EthereumSignTypedDataTypes> {
52
+ types: T;
53
+ primaryType: keyof T;
54
+ domain: {
55
+ name?: string;
56
+ version?: string;
57
+ chainId?: number | bigint;
58
+ verifyingContract?: string;
59
+ salt?: ArrayBuffer;
60
+ };
61
+ message: {
62
+ [fieldName: string]: any;
63
+ };
64
+ }
65
+ export interface EthereumSignTypedData<T extends EthereumSignTypedDataTypes> {
66
+ path: string | number[];
67
+ data: EthereumSignTypedDataMessage<T>;
68
+ metamask_v4_compat: boolean;
69
+ domain_separator_hash?: undefined;
70
+ message_hash?: undefined;
71
+ }
72
+ export interface EthereumSignTypedHash<T extends EthereumSignTypedDataTypes> {
73
+ path: string | number[];
74
+ data: EthereumSignTypedDataMessage<T>;
75
+ metamask_v4_compat: boolean;
76
+ domain_separator_hash: string;
77
+ message_hash?: string;
78
+ }
79
+ export interface EthereumVerifyMessage {
80
+ address: string;
81
+ message: string;
82
+ hex?: boolean;
83
+ signature: string;
84
+ }
85
+ export {};
86
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -1,9 +1,5 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- export interface EthereumSignMessage {
4
- path: string | number[];
5
- message: string;
6
- hex?: boolean;
7
- }
3
+ import type { EthereumSignMessage } from './ethereum';
8
4
  export declare function ethereumSignMessage(params: Params<EthereumSignMessage>): Response<PROTO.MessageSignature>;
9
5
  //# sourceMappingURL=ethereumSignMessage.d.ts.map
@@ -1,40 +1,4 @@
1
1
  import type { Params, Response } from '../params';
2
- export interface EthereumTransaction {
3
- to: string;
4
- value: string;
5
- gasPrice: string;
6
- gasLimit: string;
7
- maxFeePerGas?: typeof undefined;
8
- maxPriorityFeePerGas?: typeof undefined;
9
- nonce: string;
10
- data?: string;
11
- chainId: number;
12
- txType?: number;
13
- }
14
- export interface EthereumAccessList {
15
- address: string;
16
- storageKeys: string[];
17
- }
18
- export interface EthereumTransactionEIP1559 {
19
- to: string;
20
- value: string;
21
- gasLimit: string;
22
- gasPrice?: typeof undefined;
23
- nonce: string;
24
- data?: string;
25
- chainId: number;
26
- maxFeePerGas: string;
27
- maxPriorityFeePerGas: string;
28
- accessList?: EthereumAccessList[];
29
- }
30
- export interface EthereumSignTransaction {
31
- path: string | number[];
32
- transaction: EthereumTransaction | EthereumTransactionEIP1559;
33
- }
34
- export interface EthereumSignedTx {
35
- v: string;
36
- r: string;
37
- s: string;
38
- }
2
+ import type { EthereumSignTransaction, EthereumSignedTx } from './ethereum';
39
3
  export declare function ethereumSignTransaction(params: Params<EthereumSignTransaction>): Response<EthereumSignedTx>;
40
4
  //# sourceMappingURL=ethereumSignTransaction.d.ts.map
@@ -1,42 +1,6 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- interface EthereumSignTypedDataTypeProperty {
4
- name: string;
5
- type: string;
6
- }
7
- export interface EthereumSignTypedDataTypes {
8
- EIP712Domain: EthereumSignTypedDataTypeProperty[];
9
- [additionalProperties: string]: EthereumSignTypedDataTypeProperty[];
10
- }
11
- export interface EthereumSignTypedDataMessage<T extends EthereumSignTypedDataTypes> {
12
- types: T;
13
- primaryType: keyof T;
14
- domain: {
15
- name?: string;
16
- version?: string;
17
- chainId?: number | bigint;
18
- verifyingContract?: string;
19
- salt?: ArrayBuffer;
20
- };
21
- message: {
22
- [fieldName: string]: any;
23
- };
24
- }
25
- export interface EthereumSignTypedData<T extends EthereumSignTypedDataTypes> {
26
- path: string | number[];
27
- data: EthereumSignTypedDataMessage<T>;
28
- metamask_v4_compat: boolean;
29
- domain_separator_hash?: undefined;
30
- message_hash?: undefined;
31
- }
32
- export interface EthereumSignTypedHash<T extends EthereumSignTypedDataTypes> {
33
- path: string | number[];
34
- data: EthereumSignTypedDataMessage<T>;
35
- metamask_v4_compat: boolean;
36
- domain_separator_hash: string;
37
- message_hash?: string;
38
- }
3
+ import type { EthereumSignTypedDataTypes, EthereumSignTypedData, EthereumSignTypedHash } from './ethereum';
39
4
  export declare function ethereumSignTypedData<T extends EthereumSignTypedDataTypes>(params: Params<EthereumSignTypedData<T>>): Response<PROTO.EthereumTypedDataSignature>;
40
5
  export declare function ethereumSignTypedData<T extends EthereumSignTypedDataTypes>(params: Params<EthereumSignTypedHash<T>>): Response<PROTO.EthereumTypedDataSignature>;
41
- export {};
42
6
  //# sourceMappingURL=ethereumSignTypedData.d.ts.map
@@ -1,10 +1,5 @@
1
1
  import type { PROTO } from '../../constants';
2
2
  import type { Params, Response } from '../params';
3
- export interface EthereumVerifyMessage {
4
- address: string;
5
- message: string;
6
- hex?: boolean;
7
- signature: string;
8
- }
3
+ import type { EthereumVerifyMessage } from './ethereum';
9
4
  export declare function ethereumVerifyMessage(params: Params<EthereumVerifyMessage>): Response<PROTO.Success>;
10
5
  //# sourceMappingURL=ethereumVerifyMessage.d.ts.map
@@ -1,4 +1,3 @@
1
- import type { PROTO } from '../../constants';
2
1
  import type { Params, Response } from '../params';
3
2
  export interface FirmwareUpdateBinary {
4
3
  binary: ArrayBuffer;
@@ -9,6 +8,10 @@ export interface FirmwareUpdate {
9
8
  baseUrl?: string;
10
9
  intermediary?: boolean;
11
10
  }
12
- export declare function firmwareUpdate(params: Params<FirmwareUpdate>): Response<PROTO.Success>;
13
- export declare function firmwareUpdate(params: Params<FirmwareUpdateBinary>): Response<PROTO.Success>;
11
+ export interface FirmwareUpdateResponse {
12
+ hash: string;
13
+ challenge: string;
14
+ }
15
+ export declare function firmwareUpdate(params: Params<FirmwareUpdate>): Response<FirmwareUpdateResponse>;
16
+ export declare function firmwareUpdate(params: Params<FirmwareUpdateBinary>): Response<FirmwareUpdateResponse>;
14
17
  //# sourceMappingURL=firmwareUpdate.d.ts.map
@@ -0,0 +1,4 @@
1
+ import type { PROTO } from '../../constants';
2
+ import type { Params, Response } from '../params';
3
+ export declare function getFirmwareHash(params: Params<PROTO.GetFirmwareHash>): Response<PROTO.FirmwareHash>;
4
+ //# sourceMappingURL=getFirmwareHash.d.ts.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=getFirmwareHash.js.map
@@ -41,6 +41,7 @@ import { getAddress } from './getAddress';
41
41
  import { getCoinInfo } from './getCoinInfo';
42
42
  import { getDeviceState } from './getDeviceState';
43
43
  import { getFeatures } from './getFeatures';
44
+ import { getFirmwareHash } from './getFirmwareHash';
44
45
  import { getOwnershipId } from './getOwnershipId';
45
46
  import { getOwnershipProof } from './getOwnershipProof';
46
47
  import { getPublicKey } from './getPublicKey';
@@ -115,6 +116,7 @@ export interface TrezorConnect {
115
116
  getCoinInfo: typeof getCoinInfo;
116
117
  getDeviceState: typeof getDeviceState;
117
118
  getFeatures: typeof getFeatures;
119
+ getFirmwareHash: typeof getFirmwareHash;
118
120
  getOwnershipId: typeof getOwnershipId;
119
121
  getOwnershipProof: typeof getOwnershipProof;
120
122
  getPublicKey: typeof getPublicKey;