@trezor/connect 9.1.9 → 9.1.11

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 (229) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +1 -1
  3. package/lib/api/applyFlags.d.ts +4 -2
  4. package/lib/api/applyFlags.js +3 -2
  5. package/lib/api/applySettings.d.ts +4 -2
  6. package/lib/api/applySettings.js +3 -13
  7. package/lib/api/authenticateDevice.js +3 -11
  8. package/lib/api/authorizeCoinjoin.d.ts +3 -1
  9. package/lib/api/authorizeCoinjoin.js +3 -11
  10. package/lib/api/backupDevice.d.ts +3 -1
  11. package/lib/api/binance/api/binanceGetAddress.d.ts +4 -2
  12. package/lib/api/binance/api/binanceGetAddress.js +4 -10
  13. package/lib/api/binance/api/binanceGetPublicKey.d.ts +9 -1
  14. package/lib/api/binance/api/binanceGetPublicKey.js +3 -5
  15. package/lib/api/binance/api/binanceSignTransaction.d.ts +4 -1
  16. package/lib/api/binance/api/binanceSignTransaction.js +5 -6
  17. package/lib/api/binance/binanceSignTx.d.ts +84 -3
  18. package/lib/api/binance/binanceSignTx.js +3 -26
  19. package/lib/api/bitcoin/Fees.d.ts +14 -2
  20. package/lib/api/bitcoin/TransactionComposer.d.ts +13 -2
  21. package/lib/api/bitcoin/refTx.d.ts +2 -2
  22. package/lib/api/bitcoin/refTx.js +22 -24
  23. package/lib/api/bitcoin/signtxVerify.d.ts +1 -1
  24. package/lib/api/blockchainDisconnect.d.ts +1 -1
  25. package/lib/api/blockchainDisconnect.js +3 -2
  26. package/lib/api/blockchainGetAccountBalanceHistory.d.ts +1 -1
  27. package/lib/api/blockchainGetCurrentFiatRates.d.ts +1 -1
  28. package/lib/api/blockchainGetFiatRatesForTimestamps.d.ts +1 -1
  29. package/lib/api/blockchainGetTransactions.d.ts +1 -1
  30. package/lib/api/cancelCoinjoinAuthorization.d.ts +3 -1
  31. package/lib/api/cancelCoinjoinAuthorization.js +3 -0
  32. package/lib/api/cardano/api/cardanoGetAddress.d.ts +4 -2
  33. package/lib/api/cardano/api/cardanoGetAddress.js +4 -13
  34. package/lib/api/cardano/api/cardanoGetNativeScriptHash.d.ts +1 -1
  35. package/lib/api/cardano/api/cardanoGetNativeScriptHash.js +3 -13
  36. package/lib/api/cardano/api/cardanoGetPublicKey.d.ts +1 -1
  37. package/lib/api/cardano/api/cardanoGetPublicKey.js +4 -7
  38. package/lib/api/cardano/api/cardanoSignTransaction.d.ts +26 -4
  39. package/lib/api/cardano/api/cardanoSignTransaction.js +15 -46
  40. package/lib/api/cardano/cardanoAddressParameters.d.ts +1 -1
  41. package/lib/api/cardano/cardanoAddressParameters.js +3 -14
  42. package/lib/api/cardano/cardanoAuxiliaryData.d.ts +1 -1
  43. package/lib/api/cardano/cardanoAuxiliaryData.js +5 -20
  44. package/lib/api/cardano/cardanoCertificate.d.ts +1 -1
  45. package/lib/api/cardano/cardanoCertificate.js +20 -59
  46. package/lib/api/cardano/cardanoInputs.d.ts +20 -8
  47. package/lib/api/cardano/cardanoInputs.js +18 -14
  48. package/lib/api/cardano/cardanoOutputs.d.ts +31 -2
  49. package/lib/api/cardano/cardanoOutputs.js +14 -11
  50. package/lib/api/cardano/cardanoTokenBundle.d.ts +11 -6
  51. package/lib/api/cardano/cardanoTokenBundle.js +9 -21
  52. package/lib/api/changePin.d.ts +4 -2
  53. package/lib/api/changePin.js +3 -2
  54. package/lib/api/changeWipeCode.d.ts +3 -1
  55. package/lib/api/cipherKeyValue.d.ts +5 -1
  56. package/lib/api/cipherKeyValue.js +13 -21
  57. package/lib/api/common/paramsValidator.js +5 -4
  58. package/lib/api/eos/api/eosGetPublicKey.d.ts +11 -1
  59. package/lib/api/eos/api/eosGetPublicKey.js +3 -6
  60. package/lib/api/eos/api/eosSignTransaction.js +3 -5
  61. package/lib/api/eos/eosSignTx.d.ts +160 -2
  62. package/lib/api/ethereum/api/ethereumGetAddress.js +4 -10
  63. package/lib/api/ethereum/api/ethereumGetPublicKey.d.ts +21 -1
  64. package/lib/api/ethereum/api/ethereumGetPublicKey.js +3 -5
  65. package/lib/api/ethereum/api/ethereumSignMessage.d.ts +6 -3
  66. package/lib/api/ethereum/api/ethereumSignMessage.js +3 -5
  67. package/lib/api/ethereum/api/ethereumSignTransaction.d.ts +2 -2
  68. package/lib/api/ethereum/api/ethereumSignTransaction.js +3 -25
  69. package/lib/api/ethereum/api/ethereumSignTypedData.d.ts +83 -3
  70. package/lib/api/ethereum/api/ethereumSignTypedData.js +20 -12
  71. package/lib/api/ethereum/api/ethereumVerifyMessage.d.ts +3 -1
  72. package/lib/api/ethereum/api/ethereumVerifyMessage.js +3 -6
  73. package/lib/api/ethereum/ethereumDefinitions.d.ts +37 -19
  74. package/lib/api/ethereum/ethereumDefinitions.js +21 -15
  75. package/lib/api/ethereum/ethereumSignTx.d.ts +1 -1
  76. package/lib/api/firmware/getBinary.js +5 -4
  77. package/lib/api/firmware/modifyFirmware.js +3 -2
  78. package/lib/api/firmware/uploadFirmware.d.ts +3 -1
  79. package/lib/api/firmware/verifyAuthenticityProof.js +3 -3
  80. package/lib/api/firmwareUpdate.js +10 -15
  81. package/lib/api/getAccountDescriptor.d.ts +2 -2
  82. package/lib/api/getAccountDescriptor.js +4 -7
  83. package/lib/api/getAccountInfo.d.ts +8 -8
  84. package/lib/api/getAddress.d.ts +8 -2
  85. package/lib/api/getAddress.js +10 -20
  86. package/lib/api/getCoinInfo.d.ts +117 -2
  87. package/lib/api/getCoinInfo.js +3 -2
  88. package/lib/api/getFeatures.d.ts +49 -1
  89. package/lib/api/getFirmwareHash.d.ts +3 -1
  90. package/lib/api/getFirmwareHash.js +3 -1
  91. package/lib/api/getOwnershipId.js +4 -7
  92. package/lib/api/getOwnershipProof.js +4 -11
  93. package/lib/api/getPublicKey.d.ts +21 -1
  94. package/lib/api/getPublicKey.js +4 -18
  95. package/lib/api/nem/api/nemGetAddress.d.ts +4 -2
  96. package/lib/api/nem/api/nemGetAddress.js +4 -11
  97. package/lib/api/nem/api/nemSignTransaction.d.ts +4 -1
  98. package/lib/api/nem/api/nemSignTransaction.js +7 -5
  99. package/lib/api/nem/nemSignTx.d.ts +75 -1
  100. package/lib/api/pushTransaction.js +3 -5
  101. package/lib/api/rebootToBootloader.d.ts +3 -1
  102. package/lib/api/recoveryDevice.d.ts +3 -1
  103. package/lib/api/recoveryDevice.js +3 -12
  104. package/lib/api/requestLogin.js +7 -9
  105. package/lib/api/resetDevice.d.ts +3 -1
  106. package/lib/api/resetDevice.js +3 -12
  107. package/lib/api/ripple/api/rippleGetAddress.d.ts +4 -2
  108. package/lib/api/ripple/api/rippleGetAddress.js +4 -10
  109. package/lib/api/ripple/api/rippleSignTransaction.js +3 -17
  110. package/lib/api/setBusy.d.ts +3 -1
  111. package/lib/api/setBusy.js +3 -1
  112. package/lib/api/showDeviceTutorial.d.ts +3 -1
  113. package/lib/api/signMessage.d.ts +4 -1
  114. package/lib/api/signMessage.js +3 -7
  115. package/lib/api/solana/additionalInfo.js +3 -14
  116. package/lib/api/solana/api/solanaGetAddress.d.ts +4 -2
  117. package/lib/api/solana/api/solanaGetAddress.js +4 -7
  118. package/lib/api/solana/api/solanaGetPublicKey.d.ts +13 -1
  119. package/lib/api/solana/api/solanaGetPublicKey.js +3 -5
  120. package/lib/api/solana/api/solanaSignTransaction.js +3 -4
  121. package/lib/api/stellar/api/stellarGetAddress.d.ts +4 -2
  122. package/lib/api/stellar/api/stellarGetAddress.js +4 -10
  123. package/lib/api/stellar/api/stellarSignTransaction.js +3 -5
  124. package/lib/api/stellar/stellarSignTx.d.ts +5 -3
  125. package/lib/api/stellar/stellarSignTx.js +3 -15
  126. package/lib/api/tezos/api/tezosGetAddress.d.ts +4 -2
  127. package/lib/api/tezos/api/tezosGetAddress.js +4 -10
  128. package/lib/api/tezos/api/tezosGetPublicKey.d.ts +9 -1
  129. package/lib/api/tezos/api/tezosGetPublicKey.js +3 -6
  130. package/lib/api/tezos/api/tezosSignTransaction.d.ts +5 -1
  131. package/lib/api/tezos/api/tezosSignTransaction.js +3 -5
  132. package/lib/api/tezos/tezosSignTx.d.ts +70 -2
  133. package/lib/api/tezos/tezosSignTx.js +3 -44
  134. package/lib/api/unlockPath.js +3 -4
  135. package/lib/api/verifyMessage.d.ts +3 -1
  136. package/lib/api/verifyMessage.js +3 -7
  137. package/lib/api/wipeDevice.d.ts +3 -1
  138. package/lib/constants/index.d.ts +1 -1
  139. package/lib/constants/index.js +1 -1
  140. package/lib/constants/nem.d.ts +7 -0
  141. package/lib/constants/nem.js +5 -1
  142. package/lib/core/AbstractMethod.d.ts +1 -1
  143. package/lib/core/AbstractMethod.js +4 -3
  144. package/lib/core/index.js +4 -4
  145. package/lib/data/coinInfo.d.ts +588 -12
  146. package/lib/data/coinInfo.js +6 -6
  147. package/lib/data/config.js +5 -0
  148. package/lib/data/deviceAuthenticityConfig.d.ts +19 -13
  149. package/lib/data/deviceAuthenticityConfig.js +23 -1
  150. package/lib/data/firmwareInfo.js +11 -10
  151. package/lib/data/version.d.ts +1 -1
  152. package/lib/data/version.js +1 -1
  153. package/lib/device/Device.d.ts +2 -6
  154. package/lib/device/Device.js +8 -27
  155. package/lib/device/DeviceCommands.d.ts +36 -4
  156. package/lib/device/DeviceCommands.js +5 -2
  157. package/lib/device/DeviceList.js +1 -1
  158. package/lib/events/ui-promise.d.ts +1 -1
  159. package/lib/index.d.ts +1 -1
  160. package/lib/index.js +2 -2
  161. package/lib/types/api/applySettings.d.ts +18 -2
  162. package/lib/types/api/applySettings.js +9 -0
  163. package/lib/types/api/authenticateDevice.d.ts +22 -5
  164. package/lib/types/api/authenticateDevice.js +7 -0
  165. package/lib/types/api/authorizeCoinjoin.d.ts +15 -13
  166. package/lib/types/api/authorizeCoinjoin.js +15 -0
  167. package/lib/types/api/binance/index.d.ts +203 -30
  168. package/lib/types/api/binance/index.js +48 -0
  169. package/lib/types/api/bitcoin/index.d.ts +18 -15
  170. package/lib/types/api/bitcoin/index.js +17 -0
  171. package/lib/types/api/cancelCoinjoinAuthorization.d.ts +5 -4
  172. package/lib/types/api/cancelCoinjoinAuthorization.js +5 -0
  173. package/lib/types/api/cardano/index.d.ts +685 -187
  174. package/lib/types/api/cardano/index.js +208 -0
  175. package/lib/types/api/cardanoSignTransaction.d.ts +5 -8
  176. package/lib/types/api/cipherKeyValue.d.ts +12 -11
  177. package/lib/types/api/cipherKeyValue.js +12 -0
  178. package/lib/types/api/eos/index.d.ts +783 -116
  179. package/lib/types/api/eos/index.js +177 -0
  180. package/lib/types/api/ethereum/index.d.ts +163 -57
  181. package/lib/types/api/ethereum/index.js +90 -0
  182. package/lib/types/api/firmwareUpdate.d.ts +11 -11
  183. package/lib/types/api/firmwareUpdate.js +15 -0
  184. package/lib/types/api/getAccountDescriptor.d.ts +10 -8
  185. package/lib/types/api/getAccountDescriptor.js +10 -0
  186. package/lib/types/api/getAddress.d.ts +42 -9
  187. package/lib/types/api/getAddress.js +14 -0
  188. package/lib/types/api/getOwnershipId.d.ts +33 -8
  189. package/lib/types/api/getOwnershipId.js +10 -0
  190. package/lib/types/api/getOwnershipProof.d.ts +37 -12
  191. package/lib/types/api/getOwnershipProof.js +14 -0
  192. package/lib/types/api/getPublicKey.d.ts +31 -21
  193. package/lib/types/api/getPublicKey.js +26 -0
  194. package/lib/types/api/nem/index.d.ts +841 -91
  195. package/lib/types/api/nem/index.js +130 -0
  196. package/lib/types/api/pushTransaction.d.ts +6 -4
  197. package/lib/types/api/pushTransaction.js +6 -0
  198. package/lib/types/api/recoveryDevice.d.ts +14 -4
  199. package/lib/types/api/recoveryDevice.js +9 -0
  200. package/lib/types/api/requestLogin.d.ts +38 -13
  201. package/lib/types/api/requestLogin.js +15 -0
  202. package/lib/types/api/resetDevice.d.ts +15 -13
  203. package/lib/types/api/resetDevice.js +9 -0
  204. package/lib/types/api/ripple/index.d.ts +40 -22
  205. package/lib/types/api/ripple/index.js +24 -0
  206. package/lib/types/api/solana/index.d.ts +42 -21
  207. package/lib/types/api/solana/index.js +26 -0
  208. package/lib/types/api/stellar/index.d.ts +890 -180
  209. package/lib/types/api/stellar/index.js +249 -0
  210. package/lib/types/api/tezos/index.d.ts +162 -59
  211. package/lib/types/api/tezos/index.js +61 -0
  212. package/lib/types/api/unlockPath.d.ts +7 -5
  213. package/lib/types/api/unlockPath.js +7 -0
  214. package/lib/types/coinInfo.d.ts +273 -56
  215. package/lib/types/coinInfo.js +81 -0
  216. package/lib/types/device.d.ts +1 -1
  217. package/lib/types/device.js +2 -2
  218. package/lib/types/fees.d.ts +29 -25
  219. package/lib/types/fees.js +36 -0
  220. package/lib/types/firmware.d.ts +1 -0
  221. package/lib/types/firmware.js +3 -0
  222. package/lib/types/params.d.ts +26 -17
  223. package/lib/types/params.js +23 -0
  224. package/lib/utils/deviceFeaturesUtils.js +5 -4
  225. package/lib/utils/firmwareUtils.js +5 -4
  226. package/lib/utils/hdnodeUtils.d.ts +191 -1
  227. package/lib/utils/pathUtils.d.ts +191 -1
  228. package/lib/utils/urlUtils.js +3 -3
  229. package/package.json +10 -9
@@ -1,45 +1,621 @@
1
- import type { CoinInfo, BitcoinNetworkInfo, EthereumNetworkInfo, MiscNetworkInfo, DerivationPath } from '../types';
2
- export declare const getBitcoinNetwork: (pathOrName: DerivationPath) => BitcoinNetworkInfo | undefined;
3
- export declare const getEthereumNetwork: (pathOrName: DerivationPath) => EthereumNetworkInfo | undefined;
4
- export declare const getMiscNetwork: (pathOrName: DerivationPath) => MiscNetworkInfo | undefined;
1
+ import type { CoinInfo, BitcoinNetworkInfo, DerivationPath } from '../types';
2
+ export declare const getBitcoinNetwork: (pathOrName: DerivationPath) => ({
3
+ blockchainLink?: {
4
+ type: string;
5
+ url: string[];
6
+ } | undefined;
7
+ name: string;
8
+ label: string;
9
+ blockTime: number;
10
+ minFee: number;
11
+ maxFee: number;
12
+ shortcut: string;
13
+ slip44: number;
14
+ support: {
15
+ T1B1: string | false;
16
+ T2T1: string | false;
17
+ T2B1: string | false;
18
+ connect: boolean;
19
+ };
20
+ decimals: number;
21
+ defaultFees: {
22
+ feeLimit?: string | undefined;
23
+ feePerTx?: string | undefined;
24
+ label: "high" | "normal" | "economy" | "low" | "custom";
25
+ feePerUnit: string;
26
+ blocks: number;
27
+ }[];
28
+ } & {
29
+ cashAddrPrefix?: string | undefined;
30
+ xPubMagicSegwitNative?: number | undefined;
31
+ xPubMagicSegwit?: number | undefined;
32
+ taproot?: boolean | undefined;
33
+ type: "bitcoin";
34
+ dustLimit: number;
35
+ curveName: string;
36
+ forceBip143: boolean;
37
+ hashGenesisBlock: string;
38
+ maxAddressLength: number;
39
+ maxFeeSatoshiKb: number;
40
+ minAddressLength: number;
41
+ minFeeSatoshiKb: number;
42
+ segwit: boolean;
43
+ xPubMagic: number;
44
+ network: {
45
+ forkId?: number | undefined;
46
+ messagePrefix: string;
47
+ bech32: string;
48
+ bip32: {
49
+ public: number;
50
+ private: number;
51
+ };
52
+ pubKeyHash: number;
53
+ scriptHash: number;
54
+ wif: number;
55
+ };
56
+ isBitcoin: boolean;
57
+ }) | undefined;
58
+ export declare const getEthereumNetwork: (pathOrName: DerivationPath) => ({
59
+ blockchainLink?: {
60
+ type: string;
61
+ url: string[];
62
+ } | undefined;
63
+ name: string;
64
+ label: string;
65
+ blockTime: number;
66
+ minFee: number;
67
+ maxFee: number;
68
+ shortcut: string;
69
+ slip44: number;
70
+ support: {
71
+ T1B1: string | false;
72
+ T2T1: string | false;
73
+ T2B1: string | false;
74
+ connect: boolean;
75
+ };
76
+ decimals: number;
77
+ defaultFees: {
78
+ feeLimit?: string | undefined;
79
+ feePerTx?: string | undefined;
80
+ label: "high" | "normal" | "economy" | "low" | "custom";
81
+ feePerUnit: string;
82
+ blocks: number;
83
+ }[];
84
+ } & {
85
+ network?: undefined;
86
+ type: "ethereum";
87
+ chainId: number;
88
+ }) | undefined;
89
+ export declare const getMiscNetwork: (pathOrName: DerivationPath) => ({
90
+ blockchainLink?: {
91
+ type: string;
92
+ url: string[];
93
+ } | undefined;
94
+ name: string;
95
+ label: string;
96
+ blockTime: number;
97
+ minFee: number;
98
+ maxFee: number;
99
+ shortcut: string;
100
+ slip44: number;
101
+ support: {
102
+ T1B1: string | false;
103
+ T2T1: string | false;
104
+ T2B1: string | false;
105
+ connect: boolean;
106
+ };
107
+ decimals: number;
108
+ defaultFees: {
109
+ feeLimit?: string | undefined;
110
+ feePerTx?: string | undefined;
111
+ label: "high" | "normal" | "economy" | "low" | "custom";
112
+ feePerUnit: string;
113
+ blocks: number;
114
+ }[];
115
+ } & {
116
+ network?: undefined;
117
+ type: "nem" | "misc";
118
+ curve: string;
119
+ }) | undefined;
5
120
  export declare const getSegwitNetwork: (coin: BitcoinNetworkInfo) => {
6
121
  bip32: {
7
122
  public: number;
8
123
  private: number;
9
124
  };
125
+ forkId?: number | undefined;
10
126
  messagePrefix: string;
11
127
  bech32: string;
12
128
  pubKeyHash: number;
13
129
  scriptHash: number;
14
130
  wif: number;
15
- forkId?: number | undefined;
16
131
  } | null;
17
132
  export declare const getBech32Network: (coin: BitcoinNetworkInfo) => {
18
133
  bip32: {
19
134
  public: number;
20
135
  private: number;
21
136
  };
137
+ forkId?: number | undefined;
22
138
  messagePrefix: string;
23
139
  bech32: string;
24
140
  pubKeyHash: number;
25
141
  scriptHash: number;
26
142
  wif: number;
27
- forkId?: number | undefined;
28
143
  } | null;
29
- export declare const fixCoinInfoNetwork: (ci: BitcoinNetworkInfo, path: number[]) => BitcoinNetworkInfo;
30
- export declare const getCoinInfoByHash: (hash: string, networkInfo: any) => BitcoinNetworkInfo;
31
- export declare const getCoinInfo: (currency: string) => BitcoinNetworkInfo | EthereumNetworkInfo | MiscNetworkInfo | undefined;
144
+ export declare const fixCoinInfoNetwork: (ci: BitcoinNetworkInfo, path: number[]) => {
145
+ blockchainLink?: {
146
+ type: string;
147
+ url: string[];
148
+ } | undefined;
149
+ name: string;
150
+ label: string;
151
+ blockTime: number;
152
+ minFee: number;
153
+ maxFee: number;
154
+ shortcut: string;
155
+ slip44: number;
156
+ support: {
157
+ T1B1: string | false;
158
+ T2T1: string | false;
159
+ T2B1: string | false;
160
+ connect: boolean;
161
+ };
162
+ decimals: number;
163
+ defaultFees: {
164
+ feeLimit?: string | undefined;
165
+ feePerTx?: string | undefined;
166
+ label: "high" | "normal" | "economy" | "low" | "custom";
167
+ feePerUnit: string;
168
+ blocks: number;
169
+ }[];
170
+ } & {
171
+ cashAddrPrefix?: string | undefined;
172
+ xPubMagicSegwitNative?: number | undefined;
173
+ xPubMagicSegwit?: number | undefined;
174
+ taproot?: boolean | undefined;
175
+ type: "bitcoin";
176
+ dustLimit: number;
177
+ curveName: string;
178
+ forceBip143: boolean;
179
+ hashGenesisBlock: string;
180
+ maxAddressLength: number;
181
+ maxFeeSatoshiKb: number;
182
+ minAddressLength: number;
183
+ minFeeSatoshiKb: number;
184
+ segwit: boolean;
185
+ xPubMagic: number;
186
+ network: {
187
+ forkId?: number | undefined;
188
+ messagePrefix: string;
189
+ bech32: string;
190
+ bip32: {
191
+ public: number;
192
+ private: number;
193
+ };
194
+ pubKeyHash: number;
195
+ scriptHash: number;
196
+ wif: number;
197
+ };
198
+ isBitcoin: boolean;
199
+ };
200
+ export declare const getCoinInfoByHash: (hash: string, networkInfo: any) => {
201
+ blockchainLink?: {
202
+ type: string;
203
+ url: string[];
204
+ } | undefined;
205
+ name: string;
206
+ label: string;
207
+ blockTime: number;
208
+ minFee: number;
209
+ maxFee: number;
210
+ shortcut: string;
211
+ slip44: number;
212
+ support: {
213
+ T1B1: string | false;
214
+ T2T1: string | false;
215
+ T2B1: string | false;
216
+ connect: boolean;
217
+ };
218
+ decimals: number;
219
+ defaultFees: {
220
+ feeLimit?: string | undefined;
221
+ feePerTx?: string | undefined;
222
+ label: "high" | "normal" | "economy" | "low" | "custom";
223
+ feePerUnit: string;
224
+ blocks: number;
225
+ }[];
226
+ } & {
227
+ cashAddrPrefix?: string | undefined;
228
+ xPubMagicSegwitNative?: number | undefined;
229
+ xPubMagicSegwit?: number | undefined;
230
+ taproot?: boolean | undefined;
231
+ type: "bitcoin";
232
+ dustLimit: number;
233
+ curveName: string;
234
+ forceBip143: boolean;
235
+ hashGenesisBlock: string;
236
+ maxAddressLength: number;
237
+ maxFeeSatoshiKb: number;
238
+ minAddressLength: number;
239
+ minFeeSatoshiKb: number;
240
+ segwit: boolean;
241
+ xPubMagic: number;
242
+ network: {
243
+ forkId?: number | undefined;
244
+ messagePrefix: string;
245
+ bech32: string;
246
+ bip32: {
247
+ public: number;
248
+ private: number;
249
+ };
250
+ pubKeyHash: number;
251
+ scriptHash: number;
252
+ wif: number;
253
+ };
254
+ isBitcoin: boolean;
255
+ };
256
+ export declare const getCoinInfo: (currency: string) => ({
257
+ blockchainLink?: {
258
+ type: string;
259
+ url: string[];
260
+ } | undefined;
261
+ name: string;
262
+ label: string;
263
+ blockTime: number;
264
+ minFee: number;
265
+ maxFee: number;
266
+ shortcut: string;
267
+ slip44: number;
268
+ support: {
269
+ T1B1: string | false;
270
+ T2T1: string | false;
271
+ T2B1: string | false;
272
+ connect: boolean;
273
+ };
274
+ decimals: number;
275
+ defaultFees: {
276
+ feeLimit?: string | undefined;
277
+ feePerTx?: string | undefined;
278
+ label: "high" | "normal" | "economy" | "low" | "custom";
279
+ feePerUnit: string;
280
+ blocks: number;
281
+ }[];
282
+ } & {
283
+ cashAddrPrefix?: string | undefined;
284
+ xPubMagicSegwitNative?: number | undefined;
285
+ xPubMagicSegwit?: number | undefined;
286
+ taproot?: boolean | undefined;
287
+ type: "bitcoin";
288
+ dustLimit: number;
289
+ curveName: string;
290
+ forceBip143: boolean;
291
+ hashGenesisBlock: string;
292
+ maxAddressLength: number;
293
+ maxFeeSatoshiKb: number;
294
+ minAddressLength: number;
295
+ minFeeSatoshiKb: number;
296
+ segwit: boolean;
297
+ xPubMagic: number;
298
+ network: {
299
+ forkId?: number | undefined;
300
+ messagePrefix: string;
301
+ bech32: string;
302
+ bip32: {
303
+ public: number;
304
+ private: number;
305
+ };
306
+ pubKeyHash: number;
307
+ scriptHash: number;
308
+ wif: number;
309
+ };
310
+ isBitcoin: boolean;
311
+ }) | ({
312
+ blockchainLink?: {
313
+ type: string;
314
+ url: string[];
315
+ } | undefined;
316
+ name: string;
317
+ label: string;
318
+ blockTime: number;
319
+ minFee: number;
320
+ maxFee: number;
321
+ shortcut: string;
322
+ slip44: number;
323
+ support: {
324
+ T1B1: string | false;
325
+ T2T1: string | false;
326
+ T2B1: string | false;
327
+ connect: boolean;
328
+ };
329
+ decimals: number;
330
+ defaultFees: {
331
+ feeLimit?: string | undefined;
332
+ feePerTx?: string | undefined;
333
+ label: "high" | "normal" | "economy" | "low" | "custom";
334
+ feePerUnit: string;
335
+ blocks: number;
336
+ }[];
337
+ } & {
338
+ network?: undefined;
339
+ type: "ethereum";
340
+ chainId: number;
341
+ }) | ({
342
+ blockchainLink?: {
343
+ type: string;
344
+ url: string[];
345
+ } | undefined;
346
+ name: string;
347
+ label: string;
348
+ blockTime: number;
349
+ minFee: number;
350
+ maxFee: number;
351
+ shortcut: string;
352
+ slip44: number;
353
+ support: {
354
+ T1B1: string | false;
355
+ T2T1: string | false;
356
+ T2B1: string | false;
357
+ connect: boolean;
358
+ };
359
+ decimals: number;
360
+ defaultFees: {
361
+ feeLimit?: string | undefined;
362
+ feePerTx?: string | undefined;
363
+ label: "high" | "normal" | "economy" | "low" | "custom";
364
+ feePerUnit: string;
365
+ blocks: number;
366
+ }[];
367
+ } & {
368
+ network?: undefined;
369
+ type: "nem" | "misc";
370
+ curve: string;
371
+ }) | undefined;
32
372
  export declare const getCoinName: (path: number[]) => string;
33
373
  export declare const ethereumNetworkInfoBase: {
34
374
  blockTime: number;
35
375
  minFee: number;
36
376
  maxFee: number;
37
377
  dustLimit: number;
38
- defaultFees: import("../types").FeeLevel[];
378
+ defaultFees: {
379
+ feeLimit?: string | undefined;
380
+ feePerTx?: string | undefined;
381
+ label: "high" | "normal" | "economy" | "low" | "custom";
382
+ feePerUnit: string;
383
+ blocks: number;
384
+ }[];
39
385
  type: "ethereum";
40
386
  decimals: number;
41
387
  };
42
388
  export declare const parseCoinsJson: (json: any) => void;
43
- export declare const getUniqueNetworks: (networks: (CoinInfo | undefined)[]) => CoinInfo[];
44
- export declare const getAllNetworks: () => (BitcoinNetworkInfo | EthereumNetworkInfo | MiscNetworkInfo)[];
389
+ export declare const getUniqueNetworks: (networks: (CoinInfo | undefined)[]) => (({
390
+ blockchainLink?: {
391
+ type: string;
392
+ url: string[];
393
+ } | undefined;
394
+ name: string;
395
+ label: string;
396
+ blockTime: number;
397
+ minFee: number;
398
+ maxFee: number;
399
+ shortcut: string;
400
+ slip44: number;
401
+ support: {
402
+ T1B1: string | false;
403
+ T2T1: string | false;
404
+ T2B1: string | false;
405
+ connect: boolean;
406
+ };
407
+ decimals: number;
408
+ defaultFees: {
409
+ feeLimit?: string | undefined;
410
+ feePerTx?: string | undefined;
411
+ label: "high" | "normal" | "economy" | "low" | "custom";
412
+ feePerUnit: string;
413
+ blocks: number;
414
+ }[];
415
+ } & {
416
+ cashAddrPrefix?: string | undefined;
417
+ xPubMagicSegwitNative?: number | undefined;
418
+ xPubMagicSegwit?: number | undefined;
419
+ taproot?: boolean | undefined;
420
+ type: "bitcoin";
421
+ dustLimit: number;
422
+ curveName: string;
423
+ forceBip143: boolean;
424
+ hashGenesisBlock: string;
425
+ maxAddressLength: number;
426
+ maxFeeSatoshiKb: number;
427
+ minAddressLength: number;
428
+ minFeeSatoshiKb: number;
429
+ segwit: boolean;
430
+ xPubMagic: number;
431
+ network: {
432
+ forkId?: number | undefined;
433
+ messagePrefix: string;
434
+ bech32: string;
435
+ bip32: {
436
+ public: number;
437
+ private: number;
438
+ };
439
+ pubKeyHash: number;
440
+ scriptHash: number;
441
+ wif: number;
442
+ };
443
+ isBitcoin: boolean;
444
+ }) | ({
445
+ blockchainLink?: {
446
+ type: string;
447
+ url: string[];
448
+ } | undefined;
449
+ name: string;
450
+ label: string;
451
+ blockTime: number;
452
+ minFee: number;
453
+ maxFee: number;
454
+ shortcut: string;
455
+ slip44: number;
456
+ support: {
457
+ T1B1: string | false;
458
+ T2T1: string | false;
459
+ T2B1: string | false;
460
+ connect: boolean;
461
+ };
462
+ decimals: number;
463
+ defaultFees: {
464
+ feeLimit?: string | undefined;
465
+ feePerTx?: string | undefined;
466
+ label: "high" | "normal" | "economy" | "low" | "custom";
467
+ feePerUnit: string;
468
+ blocks: number;
469
+ }[];
470
+ } & {
471
+ network?: undefined;
472
+ type: "ethereum";
473
+ chainId: number;
474
+ }) | ({
475
+ blockchainLink?: {
476
+ type: string;
477
+ url: string[];
478
+ } | undefined;
479
+ name: string;
480
+ label: string;
481
+ blockTime: number;
482
+ minFee: number;
483
+ maxFee: number;
484
+ shortcut: string;
485
+ slip44: number;
486
+ support: {
487
+ T1B1: string | false;
488
+ T2T1: string | false;
489
+ T2B1: string | false;
490
+ connect: boolean;
491
+ };
492
+ decimals: number;
493
+ defaultFees: {
494
+ feeLimit?: string | undefined;
495
+ feePerTx?: string | undefined;
496
+ label: "high" | "normal" | "economy" | "low" | "custom";
497
+ feePerUnit: string;
498
+ blocks: number;
499
+ }[];
500
+ } & {
501
+ network?: undefined;
502
+ type: "nem" | "misc";
503
+ curve: string;
504
+ }))[];
505
+ export declare const getAllNetworks: () => (({
506
+ blockchainLink?: {
507
+ type: string;
508
+ url: string[];
509
+ } | undefined;
510
+ name: string;
511
+ label: string;
512
+ blockTime: number;
513
+ minFee: number;
514
+ maxFee: number;
515
+ shortcut: string;
516
+ slip44: number;
517
+ support: {
518
+ T1B1: string | false;
519
+ T2T1: string | false;
520
+ T2B1: string | false;
521
+ connect: boolean;
522
+ };
523
+ decimals: number;
524
+ defaultFees: {
525
+ feeLimit?: string | undefined;
526
+ feePerTx?: string | undefined;
527
+ label: "high" | "normal" | "economy" | "low" | "custom";
528
+ feePerUnit: string;
529
+ blocks: number;
530
+ }[];
531
+ } & {
532
+ cashAddrPrefix?: string | undefined;
533
+ xPubMagicSegwitNative?: number | undefined;
534
+ xPubMagicSegwit?: number | undefined;
535
+ taproot?: boolean | undefined;
536
+ type: "bitcoin";
537
+ dustLimit: number;
538
+ curveName: string;
539
+ forceBip143: boolean;
540
+ hashGenesisBlock: string;
541
+ maxAddressLength: number;
542
+ maxFeeSatoshiKb: number;
543
+ minAddressLength: number;
544
+ minFeeSatoshiKb: number;
545
+ segwit: boolean;
546
+ xPubMagic: number;
547
+ network: {
548
+ forkId?: number | undefined;
549
+ messagePrefix: string;
550
+ bech32: string;
551
+ bip32: {
552
+ public: number;
553
+ private: number;
554
+ };
555
+ pubKeyHash: number;
556
+ scriptHash: number;
557
+ wif: number;
558
+ };
559
+ isBitcoin: boolean;
560
+ }) | ({
561
+ blockchainLink?: {
562
+ type: string;
563
+ url: string[];
564
+ } | undefined;
565
+ name: string;
566
+ label: string;
567
+ blockTime: number;
568
+ minFee: number;
569
+ maxFee: number;
570
+ shortcut: string;
571
+ slip44: number;
572
+ support: {
573
+ T1B1: string | false;
574
+ T2T1: string | false;
575
+ T2B1: string | false;
576
+ connect: boolean;
577
+ };
578
+ decimals: number;
579
+ defaultFees: {
580
+ feeLimit?: string | undefined;
581
+ feePerTx?: string | undefined;
582
+ label: "high" | "normal" | "economy" | "low" | "custom";
583
+ feePerUnit: string;
584
+ blocks: number;
585
+ }[];
586
+ } & {
587
+ network?: undefined;
588
+ type: "ethereum";
589
+ chainId: number;
590
+ }) | ({
591
+ blockchainLink?: {
592
+ type: string;
593
+ url: string[];
594
+ } | undefined;
595
+ name: string;
596
+ label: string;
597
+ blockTime: number;
598
+ minFee: number;
599
+ maxFee: number;
600
+ shortcut: string;
601
+ slip44: number;
602
+ support: {
603
+ T1B1: string | false;
604
+ T2T1: string | false;
605
+ T2B1: string | false;
606
+ connect: boolean;
607
+ };
608
+ decimals: number;
609
+ defaultFees: {
610
+ feeLimit?: string | undefined;
611
+ feePerTx?: string | undefined;
612
+ label: "high" | "normal" | "economy" | "low" | "custom";
613
+ feePerUnit: string;
614
+ blocks: number;
615
+ }[];
616
+ } & {
617
+ network?: undefined;
618
+ type: "nem" | "misc";
619
+ curve: string;
620
+ }))[];
45
621
  //# sourceMappingURL=coinInfo.d.ts.map
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAllNetworks = exports.getUniqueNetworks = exports.parseCoinsJson = exports.ethereumNetworkInfoBase = exports.getCoinName = exports.getCoinInfo = exports.getCoinInfoByHash = exports.fixCoinInfoNetwork = exports.getBech32Network = exports.getSegwitNetwork = exports.getMiscNetwork = exports.getEthereumNetwork = exports.getBitcoinNetwork = void 0;
4
- const utils_1 = require("@trezor/utils");
4
+ const cloneObject_1 = require("@trezor/utils/lib/cloneObject");
5
5
  const defaultFeeLevels_1 = require("./defaultFeeLevels");
6
6
  const constants_1 = require("../constants");
7
7
  const pathUtils_1 = require("../utils/pathUtils");
@@ -9,7 +9,7 @@ const bitcoinNetworks = [];
9
9
  const ethereumNetworks = [];
10
10
  const miscNetworks = [];
11
11
  const getBitcoinNetwork = (pathOrName) => {
12
- const networks = (0, utils_1.cloneObject)(bitcoinNetworks);
12
+ const networks = (0, cloneObject_1.cloneObject)(bitcoinNetworks);
13
13
  if (typeof pathOrName === 'string') {
14
14
  const name = pathOrName.toLowerCase();
15
15
  return networks.find(n => n.name.toLowerCase() === name ||
@@ -21,7 +21,7 @@ const getBitcoinNetwork = (pathOrName) => {
21
21
  };
22
22
  exports.getBitcoinNetwork = getBitcoinNetwork;
23
23
  const getEthereumNetwork = (pathOrName) => {
24
- const networks = (0, utils_1.cloneObject)(ethereumNetworks);
24
+ const networks = (0, cloneObject_1.cloneObject)(ethereumNetworks);
25
25
  if (typeof pathOrName === 'string') {
26
26
  const name = pathOrName.toLowerCase();
27
27
  return networks.find(n => n.name.toLowerCase() === name || n.shortcut.toLowerCase() === name);
@@ -31,7 +31,7 @@ const getEthereumNetwork = (pathOrName) => {
31
31
  };
32
32
  exports.getEthereumNetwork = getEthereumNetwork;
33
33
  const getMiscNetwork = (pathOrName) => {
34
- const networks = (0, utils_1.cloneObject)(miscNetworks);
34
+ const networks = (0, cloneObject_1.cloneObject)(miscNetworks);
35
35
  if (typeof pathOrName === 'string') {
36
36
  const name = pathOrName.toLowerCase();
37
37
  return networks.find(n => n.name.toLowerCase() === name || n.shortcut.toLowerCase() === name);
@@ -67,7 +67,7 @@ const getBech32Network = (coin) => {
67
67
  };
68
68
  exports.getBech32Network = getBech32Network;
69
69
  const fixCoinInfoNetwork = (ci, path) => {
70
- const coinInfo = (0, utils_1.cloneObject)(ci);
70
+ const coinInfo = (0, cloneObject_1.cloneObject)(ci);
71
71
  if (path[0] === (0, pathUtils_1.toHardened)(84)) {
72
72
  const bech32Network = (0, exports.getBech32Network)(coinInfo);
73
73
  if (bech32Network) {
@@ -102,7 +102,7 @@ const detectBtcVersion = (data) => {
102
102
  return 'btc';
103
103
  };
104
104
  const getCoinInfoByHash = (hash, networkInfo) => {
105
- const networks = (0, utils_1.cloneObject)(bitcoinNetworks);
105
+ const networks = (0, cloneObject_1.cloneObject)(bitcoinNetworks);
106
106
  const result = networks.find(info => hash.toLowerCase() === info.hashGenesisBlock.toLowerCase());
107
107
  if (!result) {
108
108
  throw constants_1.ERRORS.TypedError('Method_UnknownCoin', `Coin info not found for hash: ${hash} ${networkInfo.hashGenesisBlock}`);
@@ -112,6 +112,11 @@ exports.config = {
112
112
  min: { T1B1: '1.8.0', T2T1: '2.1.0' },
113
113
  comment: ['There were protobuf backwards incompatible changes.'],
114
114
  },
115
+ {
116
+ coin: ['ada', 'tada'],
117
+ min: { T1B1: '0', T2T1: '2.4.3' },
118
+ comment: ['Since 2.4.3 there is initialize.derive_cardano message'],
119
+ },
115
120
  {
116
121
  methods: ['rippleGetAddress', 'rippleSignTransaction'],
117
122
  min: { T1B1: '0', T2T1: '2.1.0' },