@onekeyfe/hd-core 1.1.34-alpha.3 → 1.1.34-alpha.4

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 (613) hide show
  1. package/__tests__/DeviceCommands.test.ts +0 -217
  2. package/__tests__/evmLedgerLegacySafety.test.ts +4 -15
  3. package/__tests__/evmSignTransaction.test.ts +1 -1
  4. package/__tests__/evmSignTypedData.test.ts +1 -1
  5. package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +31 -48
  6. package/__tests__/preInitialize.test.ts +0 -33
  7. package/dist/api/BaseMethod.d.ts +0 -12
  8. package/dist/api/BaseMethod.d.ts.map +1 -1
  9. package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
  10. package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
  11. package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
  12. package/dist/api/FirmwareUpdate.d.ts.map +1 -1
  13. package/dist/api/FirmwareUpdateV2.d.ts +3 -14
  14. package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
  15. package/dist/api/FirmwareUpdateV3.d.ts +3 -10
  16. package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
  17. package/dist/api/GetFeatures.d.ts +1 -1
  18. package/dist/api/GetFeatures.d.ts.map +1 -1
  19. package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
  20. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  21. package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
  22. package/dist/api/SearchDevices.d.ts +1 -5
  23. package/dist/api/SearchDevices.d.ts.map +1 -1
  24. package/dist/api/alephium/AlephiumGetAddress.d.ts +6 -2
  25. package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
  26. package/dist/api/alephium/AlephiumSignMessage.d.ts +5 -2
  27. package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
  28. package/dist/api/alephium/AlephiumSignTransaction.d.ts +8 -5
  29. package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
  30. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
  31. package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
  32. package/dist/api/benfen/BenfenGetAddress.d.ts +9 -2
  33. package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
  34. package/dist/api/benfen/BenfenGetPublicKey.d.ts +9 -2
  35. package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
  36. package/dist/api/benfen/BenfenSignMessage.d.ts +8 -2
  37. package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
  38. package/dist/api/benfen/BenfenSignTransaction.d.ts +8 -2
  39. package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
  40. package/dist/api/btc/BTCGetAddress.d.ts +11 -1
  41. package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
  42. package/dist/api/btc/BTCGetPublicKey.d.ts +11 -1
  43. package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
  44. package/dist/api/btc/BTCSignMessage.d.ts +15 -1
  45. package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
  46. package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
  47. package/dist/api/btc/BTCSignTransaction.d.ts +11 -1
  48. package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
  49. package/dist/api/btc/BTCVerifyMessage.d.ts +11 -1
  50. package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
  51. package/dist/api/btc/helpers/versionLimit.d.ts +11 -2
  52. package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
  53. package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
  54. package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
  55. package/dist/api/device/DeviceCancel.d.ts.map +1 -1
  56. package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
  57. package/dist/api/device/DeviceFullyUploadResource.d.ts +2 -1
  58. package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -1
  59. package/dist/api/device/DeviceLock.d.ts.map +1 -1
  60. package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -1
  61. package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
  62. package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
  63. package/dist/api/device/DeviceSettings.d.ts.map +1 -1
  64. package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
  65. package/dist/api/device/DeviceUnlock.d.ts +1 -1
  66. package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
  67. package/dist/api/device/DeviceUpdateBootloader.d.ts +1 -7
  68. package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
  69. package/dist/api/device/DeviceUploadResource.d.ts.map +1 -1
  70. package/dist/api/device/DeviceVerify.d.ts.map +1 -1
  71. package/dist/api/device/DeviceWipe.d.ts.map +1 -1
  72. package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -1
  73. package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -1
  74. package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
  75. package/dist/api/evm/EVMSignMessageEIP712.d.ts +8 -2
  76. package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
  77. package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
  78. package/dist/api/evm/latest/signTypedData.d.ts +1 -1
  79. package/dist/api/evm/latest/signTypedData.d.ts.map +1 -1
  80. package/dist/api/evm/latest/signTypedHash.d.ts.map +1 -1
  81. package/dist/api/evm/legacyV1/getAddress.d.ts.map +1 -1
  82. package/dist/api/evm/legacyV1/getPublicKey.d.ts.map +1 -1
  83. package/dist/api/evm/legacyV1/signMessage.d.ts.map +1 -1
  84. package/dist/api/evm/legacyV1/signTypedData.d.ts +1 -1
  85. package/dist/api/evm/legacyV1/signTypedData.d.ts.map +1 -1
  86. package/dist/api/evm/legacyV1/signTypedHash.d.ts.map +1 -1
  87. package/dist/api/evm/legacyV1/verifyMessage.d.ts.map +1 -1
  88. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +1 -10
  89. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
  90. package/dist/api/firmware/bootloaderHelper.d.ts.map +1 -1
  91. package/dist/api/firmware/getBinary.d.ts +0 -11
  92. package/dist/api/firmware/getBinary.d.ts.map +1 -1
  93. package/dist/api/firmware/updateBootloader.d.ts +0 -2
  94. package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
  95. package/dist/api/firmware/uploadFirmware.d.ts +1 -9
  96. package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
  97. package/dist/api/helpers/batchGetPublickeys.d.ts +0 -3
  98. package/dist/api/helpers/batchGetPublickeys.d.ts.map +1 -1
  99. package/dist/api/index.d.ts +0 -29
  100. package/dist/api/index.d.ts.map +1 -1
  101. package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
  102. package/dist/api/lightning/LnurlAuth.d.ts +0 -4
  103. package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
  104. package/dist/api/neo/NeoGetAddress.d.ts +8 -2
  105. package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
  106. package/dist/api/neo/NeoSignTransaction.d.ts +8 -2
  107. package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
  108. package/dist/api/nervos/NervosGetAddress.d.ts +9 -2
  109. package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
  110. package/dist/api/nervos/NervosSignTransaction.d.ts +12 -9
  111. package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
  112. package/dist/api/nexa/NexaGetAddress.d.ts +8 -2
  113. package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
  114. package/dist/api/nexa/NexaSignTransaction.d.ts +9 -2
  115. package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
  116. package/dist/api/polkadot/PolkadotGetAddress.d.ts +0 -3
  117. package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
  118. package/dist/api/polkadot/networks.d.ts +0 -3
  119. package/dist/api/polkadot/networks.d.ts.map +1 -1
  120. package/dist/api/scdo/ScdoGetAddress.d.ts +6 -2
  121. package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
  122. package/dist/api/scdo/ScdoSignMessage.d.ts +5 -2
  123. package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
  124. package/dist/api/scdo/ScdoSignTransaction.d.ts +5 -2
  125. package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
  126. package/dist/api/solana/SolGetAddress.d.ts +0 -1
  127. package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
  128. package/dist/api/solana/SolSignMessage.d.ts +0 -3
  129. package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
  130. package/dist/api/solana/SolSignOffchainMessage.d.ts +0 -3
  131. package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
  132. package/dist/api/solana/SolSignTransaction.d.ts +0 -6
  133. package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
  134. package/dist/api/stellar/StellarGetAddress.d.ts +1 -2
  135. package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
  136. package/dist/api/stellar/StellarSignTransaction.d.ts +2 -3
  137. package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
  138. package/dist/api/sui/SuiGetAddress.d.ts +0 -3
  139. package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
  140. package/dist/api/sui/SuiGetPublicKey.d.ts +0 -3
  141. package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
  142. package/dist/api/sui/SuiSignMessage.d.ts +0 -3
  143. package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
  144. package/dist/api/sui/SuiSignTransaction.d.ts +2 -5
  145. package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
  146. package/dist/api/ton/TonGetAddress.d.ts +0 -3
  147. package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
  148. package/dist/api/ton/TonSignData.d.ts +0 -1
  149. package/dist/api/ton/TonSignData.d.ts.map +1 -1
  150. package/dist/api/ton/TonSignMessage.d.ts +0 -3
  151. package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
  152. package/dist/api/ton/TonSignProof.d.ts +0 -3
  153. package/dist/api/ton/TonSignProof.d.ts.map +1 -1
  154. package/dist/api/tron/TronSignMessage.d.ts +0 -3
  155. package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
  156. package/dist/api/tron/TronSignTransaction.d.ts +0 -3
  157. package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
  158. package/dist/api/utils.d.ts +1 -2
  159. package/dist/api/utils.d.ts.map +1 -1
  160. package/dist/constants/index.d.ts +1 -2
  161. package/dist/constants/index.d.ts.map +1 -1
  162. package/dist/core/RequestQueue.d.ts +1 -19
  163. package/dist/core/RequestQueue.d.ts.map +1 -1
  164. package/dist/core/index.d.ts +1 -4
  165. package/dist/core/index.d.ts.map +1 -1
  166. package/dist/data-manager/DataManager.d.ts +5 -9
  167. package/dist/data-manager/DataManager.d.ts.map +1 -1
  168. package/dist/data-manager/MessagesConfig.d.ts +2 -2
  169. package/dist/data-manager/MessagesConfig.d.ts.map +1 -1
  170. package/dist/data-manager/TransportManager.d.ts +4 -5
  171. package/dist/data-manager/TransportManager.d.ts.map +1 -1
  172. package/dist/data-manager/connectSettings.d.ts.map +1 -1
  173. package/dist/device/Device.d.ts +16 -60
  174. package/dist/device/Device.d.ts.map +1 -1
  175. package/dist/device/DeviceCommands.d.ts +14 -16
  176. package/dist/device/DeviceCommands.d.ts.map +1 -1
  177. package/dist/device/DeviceConnector.d.ts +1 -2
  178. package/dist/device/DeviceConnector.d.ts.map +1 -1
  179. package/dist/device/DevicePool.d.ts +2 -4
  180. package/dist/device/DevicePool.d.ts.map +1 -1
  181. package/dist/events/call.d.ts +0 -7
  182. package/dist/events/call.d.ts.map +1 -1
  183. package/dist/events/core.d.ts +2 -2
  184. package/dist/events/core.d.ts.map +1 -1
  185. package/dist/events/device.d.ts +2 -11
  186. package/dist/events/device.d.ts.map +1 -1
  187. package/dist/events/iframe.d.ts +0 -1
  188. package/dist/events/iframe.d.ts.map +1 -1
  189. package/dist/events/logBlockEvent.d.ts +0 -1
  190. package/dist/events/logBlockEvent.d.ts.map +1 -1
  191. package/dist/events/ui-request.d.ts +2 -26
  192. package/dist/events/ui-request.d.ts.map +1 -1
  193. package/dist/index.d.ts +451 -1797
  194. package/dist/index.d.ts.map +1 -1
  195. package/dist/index.js +5556 -26855
  196. package/dist/inject.d.ts +2 -3
  197. package/dist/inject.d.ts.map +1 -1
  198. package/dist/lowLevelInject.d.ts +1 -2
  199. package/dist/lowLevelInject.d.ts.map +1 -1
  200. package/dist/topLevelInject.d.ts.map +1 -1
  201. package/dist/types/api/checkAllFirmwareRelease.d.ts +2 -4
  202. package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
  203. package/dist/types/api/deviceSettings.d.ts +0 -9
  204. package/dist/types/api/deviceSettings.d.ts.map +1 -1
  205. package/dist/types/api/deviceUnlock.d.ts +1 -1
  206. package/dist/types/api/deviceUnlock.d.ts.map +1 -1
  207. package/dist/types/api/deviceUpdateBootloader.d.ts +1 -6
  208. package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
  209. package/dist/types/api/export.d.ts +1 -4
  210. package/dist/types/api/export.d.ts.map +1 -1
  211. package/dist/types/api/firmwareUpdate.d.ts +1 -114
  212. package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
  213. package/dist/types/api/getFeatures.d.ts.map +1 -1
  214. package/dist/types/api/getOnekeyFeatures.d.ts.map +1 -1
  215. package/dist/types/api/getPassphraseState.d.ts +1 -2
  216. package/dist/types/api/getPassphraseState.d.ts.map +1 -1
  217. package/dist/types/api/index.d.ts +2 -48
  218. package/dist/types/api/index.d.ts.map +1 -1
  219. package/dist/types/api/searchDevices.d.ts +2 -2
  220. package/dist/types/api/searchDevices.d.ts.map +1 -1
  221. package/dist/types/device.d.ts +5 -207
  222. package/dist/types/device.d.ts.map +1 -1
  223. package/dist/types/params.d.ts +0 -3
  224. package/dist/types/params.d.ts.map +1 -1
  225. package/dist/types/settings.d.ts +0 -33
  226. package/dist/types/settings.d.ts.map +1 -1
  227. package/dist/utils/capabilitieUtils.d.ts.map +1 -1
  228. package/dist/utils/deviceFeaturesUtils.d.ts +9 -17
  229. package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
  230. package/dist/utils/deviceInfoUtils.d.ts +8 -10
  231. package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
  232. package/dist/utils/deviceSettings.d.ts +0 -2
  233. package/dist/utils/deviceSettings.d.ts.map +1 -1
  234. package/dist/utils/deviceVersionUtils.d.ts +5 -6
  235. package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
  236. package/dist/utils/findDefectiveBatchDevice.d.ts +1 -1
  237. package/dist/utils/homescreen.d.ts.map +1 -1
  238. package/dist/utils/index.d.ts +1 -3
  239. package/dist/utils/index.d.ts.map +1 -1
  240. package/dist/utils/patch.d.ts +1 -1
  241. package/dist/utils/patch.d.ts.map +1 -1
  242. package/dist/utils/tracing.d.ts.map +1 -1
  243. package/dist/utils/versionUtils.d.ts +1 -1
  244. package/package.json +4 -4
  245. package/src/api/BaseMethod.ts +23 -60
  246. package/src/api/CheckAllFirmwareRelease.ts +3 -16
  247. package/src/api/CheckBootloaderRelease.ts +2 -1
  248. package/src/api/CheckFirmwareRelease.ts +2 -1
  249. package/src/api/FirmwareUpdate.ts +7 -15
  250. package/src/api/FirmwareUpdateV2.ts +148 -354
  251. package/src/api/FirmwareUpdateV3.ts +62 -376
  252. package/src/api/GetFeatures.ts +4 -12
  253. package/src/api/GetOnekeyFeatures.ts +3 -15
  254. package/src/api/GetPassphraseState.ts +10 -9
  255. package/src/api/PromptWebDeviceAccess.ts +1 -10
  256. package/src/api/SearchDevices.ts +3 -33
  257. package/src/api/alephium/AlephiumGetAddress.ts +2 -6
  258. package/src/api/alephium/AlephiumSignMessage.ts +1 -6
  259. package/src/api/alephium/AlephiumSignTransaction.ts +4 -15
  260. package/src/api/allnetwork/AllNetworkGetAddressBase.ts +21 -25
  261. package/src/api/aptos/AptosGetAddress.ts +3 -2
  262. package/src/api/benfen/BenfenGetAddress.ts +7 -11
  263. package/src/api/benfen/BenfenGetPublicKey.ts +2 -6
  264. package/src/api/benfen/BenfenSignMessage.ts +1 -6
  265. package/src/api/benfen/BenfenSignTransaction.ts +1 -6
  266. package/src/api/btc/BTCGetPublicKey.ts +2 -3
  267. package/src/api/btc/BTCSignPsbt.ts +2 -1
  268. package/src/api/btc/helpers/versionLimit.ts +1 -7
  269. package/src/api/cardano/CardanoSignTransaction.ts +4 -2
  270. package/src/api/conflux/ConfluxSignTransaction.ts +2 -5
  271. package/src/api/device/DeviceCancel.ts +0 -1
  272. package/src/api/device/DeviceChangePin.ts +0 -24
  273. package/src/api/device/DeviceFullyUploadResource.ts +7 -6
  274. package/src/api/device/DeviceLock.ts +3 -2
  275. package/src/api/device/DeviceRebootToBoardloader.ts +1 -11
  276. package/src/api/device/DeviceRebootToBootloader.ts +1 -11
  277. package/src/api/device/DeviceSettings.ts +0 -121
  278. package/src/api/device/DeviceSupportFeatures.ts +13 -2
  279. package/src/api/device/DeviceUnlock.ts +0 -9
  280. package/src/api/device/DeviceUpdateBootloader.ts +11 -175
  281. package/src/api/device/DeviceUploadResource.ts +5 -4
  282. package/src/api/device/DeviceVerify.ts +2 -1
  283. package/src/api/device/DeviceWipe.ts +0 -19
  284. package/src/api/dynex/DnxGetAddress.ts +0 -6
  285. package/src/api/dynex/DnxSignTransaction.ts +0 -6
  286. package/src/api/evm/EVMGetAddress.ts +1 -1
  287. package/src/api/evm/EVMGetPublicKey.ts +4 -3
  288. package/src/api/evm/EVMSignMessage.ts +1 -1
  289. package/src/api/evm/EVMSignMessageEIP712.ts +1 -14
  290. package/src/api/evm/EVMSignTransaction.ts +1 -1
  291. package/src/api/evm/EVMSignTypedData.ts +18 -30
  292. package/src/api/evm/EVMVerifyMessage.ts +1 -1
  293. package/src/api/evm/latest/signTypedHash.ts +4 -2
  294. package/src/api/evm/legacyV1/getAddress.ts +3 -5
  295. package/src/api/evm/legacyV1/getPublicKey.ts +3 -5
  296. package/src/api/evm/legacyV1/signMessage.ts +3 -5
  297. package/src/api/evm/legacyV1/signTypedData.ts +8 -9
  298. package/src/api/evm/legacyV1/signTypedHash.ts +7 -7
  299. package/src/api/evm/legacyV1/verifyMessage.ts +3 -5
  300. package/src/api/firmware/FirmwareUpdateBaseMethod.ts +15 -83
  301. package/src/api/firmware/bootloaderHelper.ts +2 -3
  302. package/src/api/firmware/getBinary.ts +1 -1
  303. package/src/api/firmware/releaseHelper.ts +3 -3
  304. package/src/api/firmware/updateBootloader.ts +4 -19
  305. package/src/api/firmware/uploadFirmware.ts +34 -148
  306. package/src/api/helpers/batchGetPublickeys.ts +6 -51
  307. package/src/api/index.ts +0 -32
  308. package/src/api/kaspa/KaspaSignTransaction.ts +3 -2
  309. package/src/api/lightning/LnurlAuth.ts +0 -4
  310. package/src/api/neo/NeoGetAddress.ts +1 -6
  311. package/src/api/neo/NeoSignTransaction.ts +1 -6
  312. package/src/api/nervos/NervosGetAddress.ts +2 -6
  313. package/src/api/nervos/NervosSignTransaction.ts +4 -14
  314. package/src/api/nexa/NexaGetAddress.ts +2 -6
  315. package/src/api/nexa/NexaSignTransaction.ts +12 -11
  316. package/src/api/polkadot/networks.ts +0 -9
  317. package/src/api/scdo/ScdoGetAddress.ts +2 -6
  318. package/src/api/scdo/ScdoSignMessage.ts +1 -6
  319. package/src/api/scdo/ScdoSignTransaction.ts +2 -6
  320. package/src/api/solana/SolGetAddress.ts +0 -4
  321. package/src/api/solana/SolSignMessage.ts +0 -3
  322. package/src/api/solana/SolSignOffchainMessage.ts +0 -3
  323. package/src/api/solana/SolSignTransaction.ts +0 -6
  324. package/src/api/stellar/StellarGetAddress.ts +1 -10
  325. package/src/api/stellar/StellarSignTransaction.ts +1 -14
  326. package/src/api/sui/SuiGetAddress.ts +3 -5
  327. package/src/api/sui/SuiGetPublicKey.ts +0 -3
  328. package/src/api/sui/SuiSignMessage.ts +0 -3
  329. package/src/api/sui/SuiSignTransaction.ts +12 -14
  330. package/src/api/ton/TonGetAddress.ts +0 -3
  331. package/src/api/ton/TonSignData.ts +3 -6
  332. package/src/api/ton/TonSignMessage.ts +5 -6
  333. package/src/api/ton/TonSignProof.ts +0 -3
  334. package/src/api/tron/TronSignMessage.ts +1 -4
  335. package/src/api/tron/TronSignTransaction.ts +0 -3
  336. package/src/api/utils.ts +3 -7
  337. package/src/api/xrp/XrpSignTransaction.ts +1 -1
  338. package/src/constants/index.ts +1 -7
  339. package/src/core/RequestQueue.ts +4 -124
  340. package/src/core/index.ts +116 -255
  341. package/src/data-manager/DataManager.ts +49 -61
  342. package/src/data-manager/MessagesConfig.ts +14 -14
  343. package/src/data-manager/TransportManager.ts +12 -38
  344. package/src/data-manager/connectSettings.ts +0 -15
  345. package/src/device/Device.ts +164 -759
  346. package/src/device/DeviceCommands.ts +36 -245
  347. package/src/device/DeviceConnector.ts +4 -29
  348. package/src/device/DevicePool.ts +21 -69
  349. package/src/events/call.ts +0 -6
  350. package/src/events/core.ts +0 -2
  351. package/src/events/device.ts +1 -17
  352. package/src/events/iframe.ts +0 -1
  353. package/src/events/logBlockEvent.ts +0 -30
  354. package/src/events/ui-request.ts +2 -32
  355. package/src/index.ts +0 -9
  356. package/src/inject.ts +3 -75
  357. package/src/lowLevelInject.ts +1 -8
  358. package/src/topLevelInject.ts +1 -7
  359. package/src/types/api/checkAllFirmwareRelease.ts +2 -4
  360. package/src/types/api/deviceSettings.ts +0 -9
  361. package/src/types/api/deviceUnlock.ts +1 -1
  362. package/src/types/api/deviceUpdateBootloader.ts +1 -10
  363. package/src/types/api/export.ts +0 -25
  364. package/src/types/api/firmwareUpdate.ts +1 -163
  365. package/src/types/api/getFeatures.ts +0 -3
  366. package/src/types/api/getOnekeyFeatures.ts +0 -3
  367. package/src/types/api/getPassphraseState.ts +2 -10
  368. package/src/types/api/index.ts +2 -89
  369. package/src/types/api/searchDevices.ts +2 -2
  370. package/src/types/device.ts +5 -266
  371. package/src/types/params.ts +0 -11
  372. package/src/types/settings.ts +29 -54
  373. package/src/utils/capabilitieUtils.ts +2 -1
  374. package/src/utils/deviceFeaturesUtils.ts +84 -122
  375. package/src/utils/deviceInfoUtils.ts +87 -38
  376. package/src/utils/deviceSettings.ts +0 -48
  377. package/src/utils/deviceVersionUtils.ts +62 -25
  378. package/src/utils/findDefectiveBatchDevice.ts +8 -8
  379. package/src/utils/homescreen.ts +0 -10
  380. package/src/utils/index.ts +0 -4
  381. package/src/utils/tracing.ts +1 -3
  382. package/__tests__/AllNetworkGetAddressBase.tracing.test.ts +0 -75
  383. package/__tests__/RequestQueue.test.ts +0 -140
  384. package/__tests__/UploadPortfolio.test.ts +0 -46
  385. package/__tests__/connectSettings.test.ts +0 -61
  386. package/__tests__/device-lifecycle-events.test.ts +0 -117
  387. package/__tests__/device-pool-state.test.ts +0 -132
  388. package/__tests__/device-settings.test.ts +0 -286
  389. package/__tests__/device-state-mapper.test.ts +0 -229
  390. package/__tests__/device-utils.test.ts +0 -106
  391. package/__tests__/device-wallet-session-store.test.ts +0 -191
  392. package/__tests__/filesystemValidation.test.ts +0 -53
  393. package/__tests__/firmware-update/firmware-artifact-source.test.ts +0 -119
  394. package/__tests__/firmware-update/firmware-checkpoint.test.ts +0 -105
  395. package/__tests__/firmware-update/firmware-host-binding.test.ts +0 -73
  396. package/__tests__/firmware-update/firmware-update-capabilities.test.ts +0 -17
  397. package/__tests__/firmware-update/firmware-update-plan.test.ts +0 -358
  398. package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +0 -200
  399. package/__tests__/firmware-update/firmware-update-recovery.test.ts +0 -81
  400. package/__tests__/firmware-update/firmware-upload-source.test.ts +0 -70
  401. package/__tests__/get-device-state.test.ts +0 -403
  402. package/__tests__/logBlockEvent.test.ts +0 -61
  403. package/__tests__/logger.test.ts +0 -34
  404. package/__tests__/open-wallet-session.test.ts +0 -565
  405. package/__tests__/pro2Wallpaper.test.ts +0 -39
  406. package/__tests__/protocol-v2-bootloader-mode.test.ts +0 -37
  407. package/__tests__/protocol-v2-firmware-targets.test.ts +0 -19
  408. package/__tests__/protocol-v2.test.ts +0 -6008
  409. package/__tests__/protocolV2FileWrite.test.ts +0 -67
  410. package/__tests__/public-pro2-api-boundary.test.ts +0 -66
  411. package/__tests__/search-devices.test.ts +0 -136
  412. package/dist/api/ClearSessionCache.d.ts +0 -9
  413. package/dist/api/ClearSessionCache.d.ts.map +0 -1
  414. package/dist/api/DirList.d.ts +0 -10
  415. package/dist/api/DirList.d.ts.map +0 -1
  416. package/dist/api/DirMake.d.ts +0 -9
  417. package/dist/api/DirMake.d.ts.map +0 -1
  418. package/dist/api/DirRemove.d.ts +0 -9
  419. package/dist/api/DirRemove.d.ts.map +0 -1
  420. package/dist/api/FileDelete.d.ts +0 -9
  421. package/dist/api/FileDelete.d.ts.map +0 -1
  422. package/dist/api/FileRead.d.ts +0 -19
  423. package/dist/api/FileRead.d.ts.map +0 -1
  424. package/dist/api/FileWrite.d.ts +0 -25
  425. package/dist/api/FileWrite.d.ts.map +0 -1
  426. package/dist/api/FirmwareUpdateV4.d.ts +0 -75
  427. package/dist/api/FirmwareUpdateV4.d.ts.map +0 -1
  428. package/dist/api/GetDeviceState.d.ts +0 -7
  429. package/dist/api/GetDeviceState.d.ts.map +0 -1
  430. package/dist/api/OpenWalletSession.d.ts +0 -14
  431. package/dist/api/OpenWalletSession.d.ts.map +0 -1
  432. package/dist/api/PathInfo.d.ts +0 -10
  433. package/dist/api/PathInfo.d.ts.map +0 -1
  434. package/dist/api/UploadPortfolio.d.ts +0 -18
  435. package/dist/api/UploadPortfolio.d.ts.map +0 -1
  436. package/dist/api/firmware/FirmwareArtifactSource.d.ts +0 -26
  437. package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +0 -1
  438. package/dist/api/firmware/FirmwareCheckpoint.d.ts +0 -15
  439. package/dist/api/firmware/FirmwareCheckpoint.d.ts.map +0 -1
  440. package/dist/api/firmware/FirmwareHostBinding.d.ts +0 -6
  441. package/dist/api/firmware/FirmwareHostBinding.d.ts.map +0 -1
  442. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts +0 -3
  443. package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts.map +0 -1
  444. package/dist/api/firmware/FirmwareUpdatePlan.d.ts +0 -29
  445. package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +0 -1
  446. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +0 -25
  447. package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +0 -1
  448. package/dist/api/firmware/progressThrottle.d.ts +0 -3
  449. package/dist/api/firmware/progressThrottle.d.ts.map +0 -1
  450. package/dist/api/helpers/filesystemValidation.d.ts +0 -10
  451. package/dist/api/helpers/filesystemValidation.d.ts.map +0 -1
  452. package/dist/api/helpers/protocolV2FileWrite.d.ts +0 -33
  453. package/dist/api/helpers/protocolV2FileWrite.d.ts.map +0 -1
  454. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +0 -6
  455. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +0 -1
  456. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +0 -7
  457. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +0 -1
  458. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +0 -7
  459. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +0 -1
  460. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +0 -7
  461. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +0 -1
  462. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +0 -6
  463. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +0 -1
  464. package/dist/api/protocol-v2/DeviceInfoGet.d.ts +0 -28
  465. package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +0 -1
  466. package/dist/api/protocol-v2/DeviceReboot.d.ts +0 -7
  467. package/dist/api/protocol-v2/DeviceReboot.d.ts.map +0 -1
  468. package/dist/api/protocol-v2/DeviceSessionOpen.d.ts +0 -28
  469. package/dist/api/protocol-v2/DeviceSessionOpen.d.ts.map +0 -1
  470. package/dist/api/protocol-v2/DeviceSettingsGet.d.ts +0 -6
  471. package/dist/api/protocol-v2/DeviceSettingsGet.d.ts.map +0 -1
  472. package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts +0 -16
  473. package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts.map +0 -1
  474. package/dist/api/protocol-v2/DeviceSettingsSet.d.ts +0 -12
  475. package/dist/api/protocol-v2/DeviceSettingsSet.d.ts.map +0 -1
  476. package/dist/api/protocol-v2/DeviceStatusGet.d.ts +0 -6
  477. package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +0 -1
  478. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +0 -26
  479. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +0 -1
  480. package/dist/api/protocol-v2/FilesystemFormat.d.ts +0 -6
  481. package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +0 -1
  482. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +0 -6
  483. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +0 -1
  484. package/dist/api/protocol-v2/Ping.d.ts +0 -8
  485. package/dist/api/protocol-v2/Ping.d.ts.map +0 -1
  486. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +0 -6
  487. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +0 -1
  488. package/dist/api/protocol-v2/helpers.d.ts +0 -42
  489. package/dist/api/protocol-v2/helpers.d.ts.map +0 -1
  490. package/dist/core/deviceEventRegistration.d.ts +0 -11
  491. package/dist/core/deviceEventRegistration.d.ts.map +0 -1
  492. package/dist/device/DeviceFeaturesState.d.ts +0 -4
  493. package/dist/device/DeviceFeaturesState.d.ts.map +0 -1
  494. package/dist/device/DeviceStateMapper.d.ts +0 -13
  495. package/dist/device/DeviceStateMapper.d.ts.map +0 -1
  496. package/dist/device/DeviceStateProjector.d.ts +0 -7
  497. package/dist/device/DeviceStateProjector.d.ts.map +0 -1
  498. package/dist/device/DeviceStateStore.d.ts +0 -21
  499. package/dist/device/DeviceStateStore.d.ts.map +0 -1
  500. package/dist/device/DeviceWalletSessionStore.d.ts +0 -15
  501. package/dist/device/DeviceWalletSessionStore.d.ts.map +0 -1
  502. package/dist/device/cloneDeviceState.d.ts +0 -2
  503. package/dist/device/cloneDeviceState.d.ts.map +0 -1
  504. package/dist/device/deviceIdentity.d.ts +0 -5
  505. package/dist/device/deviceIdentity.d.ts.map +0 -1
  506. package/dist/deviceProfile/buildDeviceFeatures.d.ts +0 -12
  507. package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +0 -1
  508. package/dist/deviceProfile/index.d.ts +0 -2
  509. package/dist/deviceProfile/index.d.ts.map +0 -1
  510. package/dist/protocols/protocol-v2/deviceSession.d.ts +0 -7
  511. package/dist/protocols/protocol-v2/deviceSession.d.ts.map +0 -1
  512. package/dist/protocols/protocol-v2/features.d.ts +0 -88
  513. package/dist/protocols/protocol-v2/features.d.ts.map +0 -1
  514. package/dist/protocols/protocol-v2/firmware.d.ts +0 -15
  515. package/dist/protocols/protocol-v2/firmware.d.ts.map +0 -1
  516. package/dist/protocols/protocol-v2/index.d.ts +0 -5
  517. package/dist/protocols/protocol-v2/index.d.ts.map +0 -1
  518. package/dist/protocols/protocol-v2/lockedError.d.ts +0 -2
  519. package/dist/protocols/protocol-v2/lockedError.d.ts.map +0 -1
  520. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +0 -16
  521. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +0 -1
  522. package/dist/protocols/protocol-v2/uiInteraction.d.ts +0 -39
  523. package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +0 -1
  524. package/dist/protocols/protocol-v2/unlockRetry.d.ts +0 -11
  525. package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +0 -1
  526. package/dist/protocols/protocol-v2/walletSession.d.ts +0 -21
  527. package/dist/protocols/protocol-v2/walletSession.d.ts.map +0 -1
  528. package/dist/types/api/firmwareUpdateCapabilities.d.ts +0 -13
  529. package/dist/types/api/firmwareUpdateCapabilities.d.ts.map +0 -1
  530. package/dist/types/api/firmwareUpdatePlan.d.ts +0 -35
  531. package/dist/types/api/firmwareUpdatePlan.d.ts.map +0 -1
  532. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts +0 -43
  533. package/dist/types/api/firmwareUpdatePreparedPlan.d.ts.map +0 -1
  534. package/dist/types/api/getDeviceState.d.ts +0 -12
  535. package/dist/types/api/getDeviceState.d.ts.map +0 -1
  536. package/dist/types/api/openWalletSession.d.ts +0 -35
  537. package/dist/types/api/openWalletSession.d.ts.map +0 -1
  538. package/dist/types/api/protocolV2.d.ts +0 -113
  539. package/dist/types/api/protocolV2.d.ts.map +0 -1
  540. package/dist/types/api/sessionCache.d.ts +0 -10
  541. package/dist/types/api/sessionCache.d.ts.map +0 -1
  542. package/dist/utils/deviceFeaturesCompat.d.ts +0 -13
  543. package/dist/utils/deviceFeaturesCompat.d.ts.map +0 -1
  544. package/dist/utils/pro2Wallpaper.d.ts +0 -12
  545. package/dist/utils/pro2Wallpaper.d.ts.map +0 -1
  546. package/src/api/ClearSessionCache.ts +0 -28
  547. package/src/api/DirList.ts +0 -33
  548. package/src/api/DirMake.ts +0 -23
  549. package/src/api/DirRemove.ts +0 -23
  550. package/src/api/FileDelete.ts +0 -23
  551. package/src/api/FileRead.ts +0 -183
  552. package/src/api/FileWrite.ts +0 -71
  553. package/src/api/FirmwareUpdateV4.ts +0 -2279
  554. package/src/api/GetDeviceState.ts +0 -55
  555. package/src/api/OpenWalletSession.ts +0 -211
  556. package/src/api/PathInfo.ts +0 -41
  557. package/src/api/UploadPortfolio.ts +0 -50
  558. package/src/api/firmware/FirmwareArtifactSource.ts +0 -278
  559. package/src/api/firmware/FirmwareCheckpoint.ts +0 -188
  560. package/src/api/firmware/FirmwareHostBinding.ts +0 -108
  561. package/src/api/firmware/FirmwareUpdateCapabilities.ts +0 -13
  562. package/src/api/firmware/FirmwareUpdatePlan.ts +0 -729
  563. package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +0 -403
  564. package/src/api/firmware/progressThrottle.ts +0 -44
  565. package/src/api/helpers/filesystemValidation.ts +0 -112
  566. package/src/api/helpers/protocolV2FileWrite.ts +0 -193
  567. package/src/api/protocol-v2/DeviceFactoryInfoGet.ts +0 -20
  568. package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +0 -32
  569. package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +0 -61
  570. package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +0 -55
  571. package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +0 -18
  572. package/src/api/protocol-v2/DeviceInfoGet.ts +0 -145
  573. package/src/api/protocol-v2/DeviceReboot.ts +0 -26
  574. package/src/api/protocol-v2/DeviceSessionOpen.ts +0 -102
  575. package/src/api/protocol-v2/DeviceSettingsGet.ts +0 -18
  576. package/src/api/protocol-v2/DeviceSettingsPageShow.ts +0 -70
  577. package/src/api/protocol-v2/DeviceSettingsSet.ts +0 -44
  578. package/src/api/protocol-v2/DeviceStatusGet.ts +0 -16
  579. package/src/api/protocol-v2/DeviceUploadWallpaper.ts +0 -131
  580. package/src/api/protocol-v2/FilesystemFormat.ts +0 -19
  581. package/src/api/protocol-v2/FilesystemPermissionFix.ts +0 -16
  582. package/src/api/protocol-v2/Ping.ts +0 -18
  583. package/src/api/protocol-v2/ProtocolInfoRequest.ts +0 -16
  584. package/src/api/protocol-v2/helpers.ts +0 -203
  585. package/src/core/deviceEventRegistration.ts +0 -23
  586. package/src/data/messages/messages-protocol-v2.json +0 -13544
  587. package/src/device/DeviceFeaturesState.ts +0 -34
  588. package/src/device/DeviceStateMapper.ts +0 -348
  589. package/src/device/DeviceStateProjector.ts +0 -95
  590. package/src/device/DeviceStateStore.ts +0 -201
  591. package/src/device/DeviceWalletSessionStore.ts +0 -78
  592. package/src/device/cloneDeviceState.ts +0 -39
  593. package/src/device/deviceIdentity.ts +0 -18
  594. package/src/deviceProfile/buildDeviceFeatures.ts +0 -391
  595. package/src/deviceProfile/index.ts +0 -4
  596. package/src/protocols/protocol-v2/deviceSession.ts +0 -24
  597. package/src/protocols/protocol-v2/features.ts +0 -163
  598. package/src/protocols/protocol-v2/firmware.ts +0 -21
  599. package/src/protocols/protocol-v2/index.ts +0 -18
  600. package/src/protocols/protocol-v2/lockedError.ts +0 -10
  601. package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +0 -61
  602. package/src/protocols/protocol-v2/uiInteraction.ts +0 -210
  603. package/src/protocols/protocol-v2/unlockRetry.ts +0 -76
  604. package/src/protocols/protocol-v2/walletSession.ts +0 -202
  605. package/src/types/api/firmwareUpdateCapabilities.ts +0 -13
  606. package/src/types/api/firmwareUpdatePlan.ts +0 -52
  607. package/src/types/api/firmwareUpdatePreparedPlan.ts +0 -55
  608. package/src/types/api/getDeviceState.ts +0 -19
  609. package/src/types/api/openWalletSession.ts +0 -54
  610. package/src/types/api/protocolV2.ts +0 -244
  611. package/src/types/api/sessionCache.ts +0 -14
  612. package/src/utils/deviceFeaturesCompat.ts +0 -173
  613. package/src/utils/pro2Wallpaper.ts +0 -109
package/dist/index.d.ts CHANGED
@@ -1,64 +1,23 @@
1
- import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
2
- import { DeviceFirmwareTargetType, DeviceFirmwareUpdateRecordFields, DeviceRebootType, DeviceFirmwareTarget, Messages, Transport, TransportCallOptions, OneKeyDeviceCommType, ProtocolV2DeviceInfo, DeviceStatus as DeviceStatus$1, OneKeyDeviceInfo, Success as Success$1, LowlevelTransportSharedPlugin, DeviceSessionResume, DeviceHostPassphrase, DevicePassphraseOnDevice, DeviceAttachPinOnDevice, DeviceSettings, DeviceSettingsPage, ProtocolInfo, DevOnboardingStatus, DeviceFirmwareUpdateStatus, DeviceFactoryInfo, RecoveryDeviceType, SafetyCheckLevel, ResourceType, NextU2FCounter, SetU2FCounter, CipheredKeyValue as CipheredKeyValue$1, UintType, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, SignedPsbt, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, SolanaTxExtraInfo, SolanaOffChainMessageVersion, SolanaOffChainMessageFormat, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, TronResourceCode, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, SuiMessageSignature, CardanoAddressParametersType, CardanoMessageSignature, FilecoinAddress as FilecoinAddress$1, FilecoinSignedTx as FilecoinSignedTx$1, PolkadotAddress as PolkadotAddress$1, PolkadotSignedTx as PolkadotSignedTx$1, KaspaAddress as KaspaAddress$1, NervosAddress as NervosAddress$1, NervosSignedTx as NervosSignedTx$1, DnxAddress as DnxAddress$1, TonWalletVersion, TonWorkChain, TonSignedMessage, TonSignedProof, TonSignDataType, TonSignedData, ScdoAddress as ScdoAddress$1, ScdoSignedMessage, ScdoSignedTx as ScdoSignedTx$1, AlephiumMessageSignature, AlephiumSignedTx as AlephiumSignedTx$1, BenfenAddress as BenfenAddress$1, BenfenMessageSignature, ChangeOutputScriptType } from '@onekeyfe/hd-transport';
3
- export { Success as DeviceSuccess, HDNodeType, Messages as PROTO, ResourceType, TonSignDataType, TonWalletVersion } from '@onekeyfe/hd-transport';
4
- import * as _onekeyfe_hd_shared from '@onekeyfe/hd-shared';
5
- import { HardwareConnectProtocol, EFirmwareType, EDeviceType, Deferred } from '@onekeyfe/hd-shared';
1
+ import EventEmitter$1, { EventEmitter } from 'events';
2
+ import * as _onekeyfe_hd_transport from '@onekeyfe/hd-transport';
3
+ import { OneKeyDeviceCommType, Messages, LowlevelTransportSharedPlugin, Features as Features$1, Success as Success$1, RecoveryDeviceType, SafetyCheckLevel, ResourceType, NextU2FCounter, SetU2FCounter, CipheredKeyValue as CipheredKeyValue$1, UintType, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, SignedPsbt, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, SolanaTxExtraInfo, SolanaOffChainMessageVersion, SolanaOffChainMessageFormat, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, TronResourceCode, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, SuiMessageSignature, CardanoAddressParametersType, CardanoMessageSignature, FilecoinAddress as FilecoinAddress$1, FilecoinSignedTx as FilecoinSignedTx$1, PolkadotAddress as PolkadotAddress$1, PolkadotSignedTx as PolkadotSignedTx$1, KaspaAddress as KaspaAddress$1, NervosAddress as NervosAddress$1, NervosSignedTx as NervosSignedTx$1, DnxAddress as DnxAddress$1, TonWalletVersion, TonWorkChain, TonSignedMessage, TonSignedProof, TonSignDataType, TonSignedData, ScdoAddress as ScdoAddress$1, ScdoSignedMessage, ScdoSignedTx as ScdoSignedTx$1, AlephiumMessageSignature, AlephiumSignedTx as AlephiumSignedTx$1, BenfenAddress as BenfenAddress$1, BenfenMessageSignature, Transport, OneKeyDeviceInfo, ChangeOutputScriptType } from '@onekeyfe/hd-transport';
4
+ export { Messages as PROTO, TonSignDataType } from '@onekeyfe/hd-transport';
5
+ import { EDeviceType, EFirmwareType, Deferred } from '@onekeyfe/hd-shared';
6
6
 
7
7
  interface CommonParams {
8
8
  keepSession?: boolean;
9
- /**
10
- * polling connect max retry count
11
- */
12
9
  retryCount?: number;
13
- /**
14
- * polling interval time
15
- */
16
10
  pollIntervalTime?: number;
17
- /**
18
- * Timeout time for single polling
19
- */
20
11
  timeout?: number;
21
- /**
22
- * DeviceInfoGet timeout during Protocol V2 initialization.
23
- */
24
- protocolV2DeviceInfoTimeoutMs?: number;
25
- /**
26
- * passphrase state
27
- */
28
12
  passphraseState?: string;
29
- /**
30
- * Use empty passphrase
31
- */
32
13
  useEmptyPassphrase?: boolean;
33
- /**
34
- * Every init session
35
- */
36
14
  initSession?: boolean;
37
- /**
38
- * Use derive cardano
39
- */
40
15
  deriveCardano?: boolean;
41
16
  detectBootloaderDevice?: boolean;
42
- /**
43
- * Skip web device prompt
44
- */
45
17
  skipWebDevicePrompt?: boolean;
46
- /**
47
- * Skip passphrase check
48
- */
49
18
  skipPassphraseCheck?: boolean;
50
- /**
51
- * Only connect device, not initialize device, only ble connect
52
- */
53
19
  onlyConnectBleDevice?: boolean;
54
- /**
55
- * Use pre-initialized device state (BLE only)
56
- */
57
20
  usePreInitialize?: boolean;
58
- /**
59
- * Expected transport protocol. If omitted, SDK probes Protocol V1 then Protocol V2.
60
- */
61
- connectProtocol?: HardwareConnectProtocol;
62
21
  }
63
22
  type Params<T> = CommonParams & T & {
64
23
  bundle?: undefined;
@@ -78,258 +37,27 @@ type Response<T> = Promise<Success<T> | Unsuccessful>;
78
37
 
79
38
  declare const safeThrowError: (error: any) => never;
80
39
 
81
- type RebootTypeInput = DeviceRebootType | keyof typeof DeviceRebootType | string | number;
82
- type DeviceRebootParams = {
83
- rebootType?: RebootTypeInput;
84
- reboot_type?: RebootTypeInput;
85
- };
86
- type DeviceFirmwareTargetInput = DeviceFirmwareTarget | {
87
- targetId?: DeviceFirmwareTargetType | string | number;
88
- target_id?: DeviceFirmwareTargetType | string | number;
89
- path: string;
90
- };
91
- type DeviceFirmwareUpdateParams = {
92
- targets?: DeviceFirmwareTargetInput[];
93
- targetId?: DeviceFirmwareTargetType | string | number;
94
- target_id?: DeviceFirmwareTargetType | string | number;
95
- path?: string;
96
- };
97
- type DeviceFirmwareUpdateStatusGetParams = {
98
- fields?: DeviceFirmwareUpdateRecordFields;
99
- };
100
- type DeviceFactoryInfoSetParams = {
101
- version?: number;
102
- serial_number?: string;
103
- burn_in_completed?: boolean;
104
- factory_test_completed?: boolean;
105
- manufacture_time?: {
106
- year: number;
107
- month: number;
108
- day: number;
109
- hour: number;
110
- minute: number;
111
- second: number;
112
- };
113
- };
114
-
115
- type PassphrasePromptResponse = {
116
- passphrase?: string;
117
- passphraseOnDevice?: boolean;
118
- attachPinOnDevice?: boolean;
119
- cache?: boolean;
120
- };
121
- type MessageType = Messages.MessageType;
122
- type MessageKey = Extract<keyof MessageType, string>;
123
- type TypedResponseMessage<T extends MessageKey> = {
124
- type: T;
125
- message: MessageType[T];
126
- };
127
- type TypedCallResponseMap = {
128
- [K in MessageKey]: TypedResponseMessage<K>;
129
- };
130
- type DefaultMessageResponse = TypedCallResponseMap[MessageKey];
131
- /**
132
- * The life cycle begins with the acquisition of the device and ends with the disposal device commands
133
- * acquire device -> create DeviceCommands -> release device -> dispose DeviceCommands
134
- */
135
- declare class DeviceCommands {
136
- instanceId: string;
137
- currentResponseID?: number;
138
- device: Device;
139
- transport: Transport;
140
- mainId: string;
141
- disposed: boolean;
142
- callPromise?: Promise<DefaultMessageResponse>;
143
- constructor(device: Device, mainId: string);
144
- dispose(_cancelRequest: boolean): Promise<void>;
145
- checkDisposed(): void;
146
- cancelDeviceOnOneKeyDevice(): Promise<{
147
- readonly success: false;
148
- readonly error: 800;
149
- readonly payload: {
150
- readonly message: "Device disconnected or acquired by someone else";
151
- };
152
- } | {
153
- success: boolean;
154
- error: null;
155
- payload: {
156
- message: string;
157
- };
158
- } | {
159
- success: boolean;
160
- error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 900 | 901 | 902;
161
- payload: {
162
- message: string;
163
- };
164
- } | undefined>;
165
- cancelDevice(): Promise<{
166
- readonly success: false;
167
- readonly error: 800;
168
- readonly payload: {
169
- readonly message: "Device disconnected or acquired by someone else";
170
- };
171
- } | {
172
- success: boolean;
173
- error: null;
174
- payload: {
175
- message: string;
176
- };
177
- } | {
178
- success: boolean;
179
- error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 900 | 901 | 902;
180
- payload: {
181
- message: string;
182
- };
183
- } | undefined>;
184
- cancel(): Promise<void>;
185
- call(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
186
- typedCall<T extends MessageKey, R extends MessageKey[]>(type: T, resType: R, msg?: MessageType[T], options?: TransportCallOptions): Promise<TypedCallResponseMap[R[number]]>;
187
- typedCall<T extends MessageKey, R extends MessageKey>(type: T, resType: R, msg?: MessageType[T], options?: TransportCallOptions): Promise<TypedResponseMessage<R>>;
188
- _commonCall(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
189
- _filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey, options?: TransportCallOptions): Promise<DefaultMessageResponse>;
190
- _promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
191
- promptPassphrase(options: PassphraseRequestPayload, promptOptions?: {
192
- cancelDeviceOnReject?: boolean;
193
- }): Promise<PassphrasePromptResponse>;
194
- }
40
+ declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
41
+ declare const off: (type: any, fn: any) => void;
42
+ declare const removeAllListeners: (type: any) => void;
195
43
 
196
- type ProtocolV2RuntimeMode = 'normal' | 'bootloader';
44
+ declare function uiResponse(response: UiResponseEvent): void;
197
45
 
198
- type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
199
- type ConnectSettings = {
200
- connectSrc?: string;
201
- debug?: boolean;
202
- transportReconnect?: boolean;
203
- lazyLoad?: boolean;
204
- origin?: string;
205
- parentOrigin?: string;
206
- configSrc: string;
207
- iframeSrc: string;
208
- version: string;
209
- priority: number;
210
- trustedHost: boolean;
211
- supportedBrowser?: boolean;
212
- env: transportEnv;
213
- timestamp: number;
214
- isFrame?: boolean;
215
- preRelease?: boolean;
216
- firmwareManifestMode?: 'sdk-managed' | 'external-only';
217
- preloadedConfig?: RemoteConfigResponse;
218
- fetchConfig?: boolean;
219
- extension?: string;
220
- configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
221
- };
222
- type IVersionArray = [number, number, number];
223
- type ILocale = 'zh-CN' | 'en-US';
224
- type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04';
225
- type IProtocolV2FirmwareComponent = {
226
- target: IProtocolV2FirmwareComponentTarget;
227
- url: string;
228
- fingerprint?: string;
229
- expectedSize?: number;
230
- version?: IVersionArray;
231
- };
232
- /** Pro2 RESC bundle okpkg descriptor for incremental FileWrite synchronization. */
233
- type IProtocolV2ResourceBundle = {
234
- /** Bundle name, such as images, animation, translations, or fonts_roobert. */
235
- name: string;
236
- /** Download URL. */
237
- url: string;
238
- fingerprint?: string;
239
- expectedSize?: number;
240
- /** Device target path, such as vol0:/bundles/images/images.okpkg. */
241
- devicePath: string;
242
- /** okpkg payload_version used to skip matching content after FileRead. */
243
- version?: IVersionArray;
244
- /** okpkg payload_hash used for SHA3-512 comparison after FileRead. */
245
- payloadHash?: string;
246
- /** okpkg header_hash used for SHA3-512 comparison after FileRead. */
247
- headerHash?: string;
248
- };
249
- /** STM32 firmware config */
250
- type IFirmwareReleaseInfo = {
251
- required: boolean;
252
- url: string;
253
- /**
254
- * Firmware type (bitcoinonly or universal)
255
- * This field is not present in the remote config, but will be inferred from the firmware field name
256
- */
257
- firmwareType?: EFirmwareType;
258
- /** Firmware UI resource */
259
- resource?: string;
260
- resourceFingerprint?: string;
261
- resourceExpectedSize?: number;
262
- /** Firmware full UI resource */
263
- fullResource?: string;
264
- fullResourceFingerprint?: string;
265
- fullResourceExpectedSize?: number;
266
- fullResourceRange?: string[];
267
- bootloaderResource?: string;
268
- bootloaderFingerprint?: string;
269
- bootloaderExpectedSize?: number;
270
- bootloaderVersion?: IVersionArray;
271
- displayBootloaderVersion?: IVersionArray;
272
- bootloaderRelatedFirmwareVersion?: IVersionArray;
273
- upgradeType?: 'payload-package-set' | string;
274
- components?: Record<string, IProtocolV2FirmwareComponent>;
275
- installOrder?: string[];
276
- /** Pro2 RESC bundles for incremental direct FileWrite synchronization. */
277
- resourceBundles?: IProtocolV2ResourceBundle[];
278
- bootloaderChangelog?: {
279
- [k in ILocale]: string;
280
- };
281
- fingerprint: string;
282
- expectedSize?: number;
283
- version: IVersionArray;
284
- changelog: {
285
- [k in ILocale]: string;
286
- };
287
- };
288
- /** BLE firmware config */
289
- type IBLEFirmwareReleaseInfo = {
290
- required: boolean;
291
- /** bluetooth dfu version */
292
- url: string;
293
- /** stm bluetooth update version */
294
- webUpdate: string;
295
- fingerprint: string;
296
- fingerprintWeb: string;
297
- expectedSize?: number;
298
- version: IVersionArray;
299
- changelog: {
300
- [k in ILocale]: string;
301
- };
302
- };
303
- type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
304
- type DeviceTypeMap = {
305
- [k in IKnownDevice]: {
306
- firmware: IFirmwareReleaseInfo[];
307
- /** Pro2 Protocol V2 payload package set */
308
- 'firmware-v1'?: IFirmwareReleaseInfo[];
309
- 'firmware-v2'?: IFirmwareReleaseInfo[];
310
- 'firmware-v8'?: IFirmwareReleaseInfo[];
311
- 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
312
- ble: IBLEFirmwareReleaseInfo[];
313
- };
314
- };
315
- type AssetsMap = {
316
- bridge: {
317
- version: IVersionArray;
318
- linux32Rpm: string;
319
- linux64Rpm: string;
320
- linux32Deb: string;
321
- linux64Deb: string;
322
- win: string;
323
- mac: string;
324
- sha256sumAsc: string;
325
- changelog: {
326
- [k in ILocale]: string;
327
- };
328
- };
46
+ type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
47
+ interface LowLevelInjectApi {
48
+ call: CallMethod;
49
+ eventEmitter: EventEmitter;
50
+ init: CoreApi['init'];
51
+ dispose: CoreApi['dispose'];
52
+ uiResponse: CoreApi['uiResponse'];
53
+ cancel: CoreApi['cancel'];
54
+ updateSettings: CoreApi['updateSettings'];
55
+ switchTransport: CoreApi['switchTransport'];
56
+ addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
57
+ }
58
+ type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
59
+ addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
329
60
  };
330
- type RemoteConfigResponse = {
331
- bridge: AssetsMap['bridge'];
332
- } & DeviceTypeMap;
333
61
 
334
62
  type DeviceStatus = 'available' | 'occupied' | 'used';
335
63
  declare enum EOneKeyDeviceMode {
@@ -344,12 +72,6 @@ type UnavailableCapabilities = {
344
72
  };
345
73
  type KnownDevice = {
346
74
  connectId: string | null;
347
- /**
348
- * Stable physical-device identity. Current SDK responses always include this
349
- * value; it remains optional in the type during the uuid compatibility window.
350
- */
351
- serialNo?: string;
352
- /** @deprecated Use serialNo instead. */
353
75
  uuid: string;
354
76
  deviceId: string | null;
355
77
  deviceType: IDeviceType | null;
@@ -360,9 +82,7 @@ type KnownDevice = {
360
82
  name: string;
361
83
  error?: typeof undefined;
362
84
  mode: EOneKeyDeviceMode;
363
- features?: Features;
364
- /** Unified SDK device-state snapshot; features remains a legacy projection. */
365
- state?: DeviceState;
85
+ features: Messages.Features;
366
86
  unavailableCapabilities: UnavailableCapabilities;
367
87
  bleFirmwareVersion: IVersionArray | null;
368
88
  firmwareVersion: IVersionArray | null;
@@ -372,17 +92,6 @@ type KnownDevice = {
372
92
  };
373
93
  type SearchDevice = {
374
94
  connectId: string | null;
375
- /**
376
- * Available after device initialization. BLE discovery does not connect to the
377
- * device, so it returns null until a later initialized device response. Current
378
- * SDK responses always include the field; it remains optional in the type during
379
- * the uuid compatibility window.
380
- */
381
- serialNo?: string | null;
382
- /**
383
- * @deprecated Ambiguous legacy identifier. Use serialNo for hardware identity
384
- * and connectId for transport routing.
385
- */
386
95
  uuid: string;
387
96
  deviceId: string | null;
388
97
  deviceType: IDeviceType;
@@ -390,214 +99,9 @@ type SearchDevice = {
390
99
  commType: OneKeyDeviceCommType;
391
100
  };
392
101
  type Device$1 = KnownDevice;
393
- type DeviceFeaturesProtocol = 'V1' | 'V2' | 'unknown';
394
- type DeviceFeaturesMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'backupMode' | 'unknown';
395
- type DeviceFeaturesVerify = {
396
- firmwareBuildId?: string;
397
- firmwareHash?: string;
398
- bootloaderBuildId?: string;
399
- bootloaderHash?: string;
400
- boardBuildId?: string;
401
- boardHash?: string;
402
- bleBuildId?: string;
403
- bleHash?: string;
404
- se01BuildId?: string;
405
- se01Hash?: string;
406
- se02BuildId?: string;
407
- se02Hash?: string;
408
- se03BuildId?: string;
409
- se03Hash?: string;
410
- se04BuildId?: string;
411
- se04Hash?: string;
412
- se01BootBuildId?: string;
413
- se01BootHash?: string;
414
- se02BootBuildId?: string;
415
- se02BootHash?: string;
416
- se03BootBuildId?: string;
417
- se03BootHash?: string;
418
- se04BootBuildId?: string;
419
- se04BootHash?: string;
420
- };
421
- type DeviceFeaturesRaw = {
422
- protocolV1Features?: Messages.Features;
423
- protocolV1OneKeyFeatures?: OnekeyFeatures;
424
- protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
425
- protocolV2DeviceStatus?: DeviceStatus$1;
426
- };
427
- type DeviceFeaturesRawPatch = {
428
- [Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
429
- };
430
- type DeviceStateProtocol = DeviceFeaturesProtocol;
431
- type DeviceStateMode = DeviceFeaturesMode;
432
- type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
433
- type DeviceStateUpdateSource = 'initialize' | 'device-info' | 'device-status' | 'apply-settings' | 'change-pin' | 'lock' | 'unlock' | 'passphrase' | 'session-clear' | 'firmware-update' | 'transport-reconnect' | 'compatibility';
434
- type DeviceStateIdentity = {
435
- deviceType: IDeviceType;
436
- firmwareType: EFirmwareType;
437
- model: string | null;
438
- vendor: string | null;
439
- deviceId: string | null;
440
- serialNo: string;
441
- label: string | null;
442
- bleName: string | null;
443
- };
444
- type DeviceStateStatus = {
445
- mode: DeviceStateMode;
446
- initialized: boolean | null;
447
- unlocked: boolean | null;
448
- firmwarePresent: boolean | null;
449
- backupRequired: boolean | null;
450
- noBackup: boolean | null;
451
- unfinishedBackup: boolean | null;
452
- recoveryMode: boolean | null;
453
- passphraseProtection: boolean | null;
454
- pinProtection: boolean | null;
455
- attachToPinEnabled: boolean | null;
456
- unlockedAttachPin: boolean | null;
457
- };
458
- type DeviceStateSettings = {
459
- language: string | null;
460
- bleEnabled: boolean | null;
461
- sdCardPresent: boolean | null;
462
- sdProtection: boolean | null;
463
- wipeCodeProtection: boolean | null;
464
- passphraseAlwaysOnDevice: boolean | null;
465
- safetyChecks: string | null;
466
- autoLockDelayMs: number | null;
467
- autoShutdownDelayMs: number | null;
468
- displayRotation: number | null;
469
- experimentalFeatures: boolean | null;
470
- wallpaperPath: string | null;
471
- brightness: number | null;
472
- animationEnabled: boolean | null;
473
- tapToWake: boolean | null;
474
- hapticFeedback: boolean | null;
475
- deviceNameDisplayEnabled: boolean | null;
476
- airgapMode: boolean | null;
477
- fidoEnabled: boolean | null;
478
- usbLockEnabled: boolean | null;
479
- randomKeypad: boolean | null;
480
- };
481
- type DeviceStateVersions = {
482
- firmware: string | null;
483
- bootloader: string | null;
484
- board: string | null;
485
- ble: string | null;
486
- /** @deprecated Kept for legacy consumers; new code should read se01. */
487
- se?: string | null;
488
- se01?: string | null;
489
- se02?: string | null;
490
- se03?: string | null;
491
- se04?: string | null;
492
- se01Boot?: string | null;
493
- se02Boot?: string | null;
494
- se03Boot?: string | null;
495
- se04Boot?: string | null;
496
- };
497
- type DeviceState = {
498
- schemaVersion: 1;
499
- revision: number;
500
- updatedAt: number;
501
- protocol: DeviceStateProtocol;
502
- /** Device-message protocol version, independent of the SDK V1/V2 protocol family. */
503
- protocolVersion: number | null;
504
- identity: DeviceStateIdentity;
505
- status: DeviceStateStatus;
506
- settings: DeviceStateSettings;
507
- versions: DeviceStateVersions;
508
- capabilities: Array<number | string>;
509
- verification?: Partial<DeviceFeaturesVerify>;
510
- };
511
- type DeviceStatePatch = {
512
- protocol?: DeviceStateProtocol;
513
- protocolVersion?: number | null;
514
- identity?: Partial<DeviceStateIdentity>;
515
- status?: Partial<DeviceStateStatus>;
516
- settings?: Partial<DeviceStateSettings>;
517
- versions?: Partial<DeviceStateVersions>;
518
- capabilities?: Array<number | string>;
519
- verification?: DeviceFeaturesVerify;
520
- raw?: DeviceFeaturesRawPatch;
521
- };
522
- type DeviceStateEvent = {
523
- connectId: string | null;
524
- state: DeviceState;
525
- revision: number;
526
- source: DeviceStateUpdateSource;
527
- changedKeys: string[];
528
- };
529
- type NormalizedFeatures = {
530
- protocol: DeviceFeaturesProtocol;
531
- protocolVersion?: number | null;
532
- deviceType: IDeviceType;
533
- firmwareType: EFirmwareType;
534
- model: string | null;
535
- vendor: string | null;
536
- deviceId: string | null;
537
- serialNo: string;
538
- label: string | null;
539
- bleName: string | null;
540
- capabilities: Array<number | string>;
541
- mode: DeviceFeaturesMode;
542
- initialized: boolean | null;
543
- bootloaderMode: boolean | null;
544
- unlocked: boolean | null;
545
- firmwarePresent: boolean | null;
546
- passphraseProtection: boolean | null;
547
- pinProtection: boolean | null;
548
- backupRequired: boolean | null;
549
- noBackup: boolean | null;
550
- unfinishedBackup: boolean | null;
551
- recoveryMode: boolean | null;
552
- language: string | null;
553
- bleEnabled: boolean | null;
554
- sdCardPresent: boolean | null;
555
- sdProtection: boolean | null;
556
- wipeCodeProtection: boolean | null;
557
- passphraseAlwaysOnDevice: boolean | null;
558
- attachToPinEnabled?: boolean | null;
559
- safetyChecks: string | null;
560
- autoLockDelayMs: number | null;
561
- autoShutdownDelayMs: number | null;
562
- displayRotation: number | null;
563
- experimentalFeatures: boolean | null;
564
- wallpaperPath: string | null;
565
- brightness: number | null;
566
- animationEnabled: boolean | null;
567
- tapToWake: boolean | null;
568
- hapticFeedback: boolean | null;
569
- deviceNameDisplayEnabled: boolean | null;
570
- airgapMode: boolean | null;
571
- fidoEnabled: boolean | null;
572
- usbLockEnabled: boolean | null;
573
- randomKeypad: boolean | null;
574
- firmwareVersion: string | null;
575
- bootloaderVersion: string | null;
576
- boardVersion: string | null;
577
- bleVersion: string | null;
578
- se01Version?: string | null;
579
- se02Version?: string | null;
580
- se03Version?: string | null;
581
- se04Version?: string | null;
582
- se01BootVersion?: string | null;
583
- se02BootVersion?: string | null;
584
- se03BootVersion?: string | null;
585
- se04BootVersion?: string | null;
586
- seVersion?: string | null;
587
- verify?: DeviceFeaturesVerify;
588
- sessionId: string | null;
589
- passphraseState?: string;
590
- unlockedAttachPin?: boolean;
591
- raw?: DeviceFeaturesRaw;
592
- };
593
- type Features = NormalizedFeatures & Partial<Omit<Messages.Features, keyof NormalizedFeatures>> & Partial<Omit<Messages.OnekeyFeatures, keyof NormalizedFeatures | keyof Messages.Features>>;
102
+ type Features = Messages.Features;
594
103
  type OnekeyFeatures = Messages.OnekeyFeatures;
595
- type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
596
- /**
597
- * model_classic: 'classic' | 'classic1s' | 'classicpure'
598
- * model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
599
- * model_touch: 'touch' | 'pro'
600
- */
104
+ type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro;
601
105
  type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
602
106
  declare const DeviceModelToTypes: {
603
107
  [deviceModel in IDeviceModel]: IDeviceType[];
@@ -611,7 +115,6 @@ type ITransportStatus = 'valid' | 'outdated';
611
115
  type IVersionRange = {
612
116
  min: string;
613
117
  max?: string;
614
- unsupported?: boolean;
615
118
  };
616
119
  type DeviceFirmwareRange = {
617
120
  [deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
@@ -662,593 +165,91 @@ type SupportFeatures = {
662
165
  modifyHomescreen: SupportFeatureType;
663
166
  };
664
167
 
665
- type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
666
- type GetDeviceStateParams = CommonParams & {
667
- scope?: DeviceStateScope;
168
+ type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
169
+ type ConnectSettings = {
170
+ connectSrc?: string;
171
+ debug?: boolean;
172
+ transportReconnect?: boolean;
173
+ lazyLoad?: boolean;
174
+ origin?: string;
175
+ parentOrigin?: string;
176
+ configSrc: string;
177
+ iframeSrc: string;
178
+ version: string;
179
+ priority: number;
180
+ trustedHost: boolean;
181
+ supportedBrowser?: boolean;
182
+ env: transportEnv;
183
+ timestamp: number;
184
+ isFrame?: boolean;
185
+ preRelease?: boolean;
186
+ fetchConfig?: boolean;
187
+ extension?: string;
188
+ configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
668
189
  };
669
- /** Internal state-read options, not part of the public CoreApi. */
670
- type DeviceStateReadOptions = {
671
- refreshSections?: DeviceStateSection[];
672
- includeRaw?: boolean;
190
+ type IVersionArray = [number, number, number];
191
+ type ILocale = 'zh-CN' | 'en-US';
192
+ type IFirmwareReleaseInfo = {
193
+ required: boolean;
194
+ url: string;
195
+ firmwareType?: EFirmwareType;
196
+ resource?: string;
197
+ fullResource?: string;
198
+ fullResourceRange?: string[];
199
+ bootloaderResource?: string;
200
+ bootloaderVersion?: IVersionArray;
201
+ displayBootloaderVersion?: IVersionArray;
202
+ bootloaderRelatedFirmwareVersion?: IVersionArray;
203
+ bootloaderChangelog?: {
204
+ [k in ILocale]: string;
205
+ };
206
+ fingerprint: string;
207
+ version: IVersionArray;
208
+ changelog: {
209
+ [k in ILocale]: string;
210
+ };
673
211
  };
674
- declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
675
-
676
- type DeviceDescriptorDiff = {
677
- didUpdate: boolean;
678
- connected: OneKeyDeviceInfo[];
679
- disconnected: OneKeyDeviceInfo[];
680
- changedSessions: OneKeyDeviceInfo[];
681
- changedDebugSessions: OneKeyDeviceInfo[];
682
- acquired: OneKeyDeviceInfo[];
683
- debugAcquired: OneKeyDeviceInfo[];
684
- released: OneKeyDeviceInfo[];
685
- debugReleased: OneKeyDeviceInfo[];
686
- descriptors: OneKeyDeviceInfo[];
212
+ type IBLEFirmwareReleaseInfo = {
213
+ required: boolean;
214
+ url: string;
215
+ webUpdate: string;
216
+ fingerprint: string;
217
+ fingerprintWeb: string;
218
+ version: IVersionArray;
219
+ changelog: {
220
+ [k in ILocale]: string;
221
+ };
687
222
  };
688
-
689
- declare class DeviceConnector {
690
- transport: Transport;
691
- listenTimestamp: number;
692
- current: OneKeyDeviceInfo[] | null;
693
- upcoming: OneKeyDeviceInfo[];
694
- listening: boolean;
695
- constructor();
696
- enumerate(): Promise<DeviceDescriptorDiff | undefined>;
697
- listen(): Promise<void>;
698
- stop(): void;
699
- acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
700
- release(session: string, onclose: boolean): Promise<void>;
701
- disconnect(session: string | undefined | null): Promise<void>;
702
- promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
703
- _reportDevicesChange(): void;
704
- }
705
-
706
- type InitOptions = {
707
- initSession?: boolean;
708
- deviceId?: string;
709
- passphraseState?: string;
710
- deriveCardano?: boolean;
711
- connectProtocol?: HardwareConnectProtocol;
712
- protocolV2DeviceInfoTimeoutMs?: number;
713
- /** Refresh Protocol V2 runtime state before returning discovery results. */
714
- refreshRuntimeState?: boolean;
715
- };
716
- type RunOptions = {
717
- keepSession?: boolean;
718
- skipInitialize?: boolean;
719
- } & InitOptions;
720
- interface DeviceEvents {
721
- [DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
722
- [DEVICE.PASSPHRASE_ON_DEVICE]: [Device, PassphraseRequestPayload?];
723
- [DEVICE.ATTACH_PIN_ON_DEVICE]: [Device, PassphraseRequestPayload?];
724
- [DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
725
- [DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
726
- [DEVICE.STATE]: [Device, DeviceStateEvent];
727
- [DEVICE.PASSPHRASE]: [
728
- Device,
729
- PassphraseRequestPayload,
730
- (response: PassphrasePromptResponse, error?: Error) => void
731
- ];
732
- [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
733
- Device,
734
- (err: any, deviceId: string) => void
735
- ];
736
- [DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
737
- Device,
738
- (err: any, deviceId: string) => void
739
- ];
740
- }
741
- /**
742
- * Pre-populate the device session cache with a known session ID.
743
- *
744
- * This allows short-lived processes (e.g. CLI) to restore a previously
745
- * obtained session, avoiding the need to re-enter passphrase on every
746
- * invocation. The session must have been obtained from a prior
747
- * getPassphraseState() call on the same device.
748
- *
749
- * @param deviceId - The device's device_id (from features)
750
- * @param passphraseState - The passphrase state token
751
- * @param sessionId - The session_id to cache (from features.session_id)
752
- */
753
- declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
754
- interface Device {
755
- on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
756
- off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
757
- emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
758
- }
759
- declare class Device extends EventEmitter {
760
- /**
761
- * 设备标识对象
762
- */
763
- originalDescriptor: OneKeyDeviceInfo;
764
- sdkInstanceId?: string;
765
- /**
766
- * 设备实例唯一标识
767
- */
768
- instanceId: string;
769
- createdAt: number;
770
- /**
771
- * 设备主 ID
772
- * 蓝牙连接时是设备的 UUID
773
- * USB连接时是设备的 sessionID
774
- */
775
- mainId?: string | null;
776
- /**
777
- * 通信管道,向设备发送请求
778
- */
779
- deviceConnector?: DeviceConnector | null;
780
- /**
781
- * 固件命令
782
- */
783
- commands: DeviceCommands;
784
- /**
785
- * 可取消的操作
786
- */
787
- private cancelableAction?;
788
- /**
789
- * 设备是否被占用
790
- */
791
- private deviceAcquired;
792
- /** Canonical device-state cache; legacy Features is a compatibility projection. */
793
- private stateStore;
794
- /** Force the next initialization to reload DeviceInfo after reconnect or reboot. */
795
- private protocolV2StateNeedsReload;
796
- get state(): (DeviceState & {
797
- raw?: DeviceFeaturesRaw | undefined;
798
- }) | undefined;
799
- get features(): Features | undefined;
800
- set features(features: Features | undefined);
801
- runPromise?: Deferred<void> | null;
802
- externalState: string[];
803
- unavailableCapabilities: UnavailableCapabilities;
804
- instance: number;
805
- internalState: string[];
806
- needReloadDevice: boolean;
807
- /**
808
- * 执行 API 方法后是否保留 SessionID
809
- */
810
- keepSession: boolean;
811
- passphraseState: string | undefined;
812
- pendingCallbackPromise?: Deferred<void>;
813
- /** Pre-initialize timestamp (ms) */
814
- private preInitializedAt?;
815
- /** Pre-initialize context, used to verify state consistency before skipping */
816
- private preInitializeMeta?;
817
- /** Last Initialize duration (ms), reported as "saved" when a skip happens */
818
- private lastInitializeDurationMs?;
819
- constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
820
- static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
821
- toMessageObject(): Device$1 | null;
822
- /**
823
- * Device connect
824
- * @returns {Promise<boolean>}
825
- */
826
- connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
827
- acquire(connectProtocol?: HardwareConnectProtocol, options?: {
828
- throwOnRunPromiseError?: boolean;
829
- }): Promise<void>;
830
- release(): Promise<void>;
831
- /**
832
- * Pre-initialize: connect + Initialize ahead of the sign.
833
- */
834
- preInitialize(initOptions?: InitOptions): Promise<void>;
835
- markPreInitialized(meta?: {
836
- passphraseState?: string;
837
- }): void;
838
- clearPreInitialized(): void;
839
- isPreInitializeMetaMatch(payload?: {
840
- passphraseState?: string;
841
- }): boolean;
842
- isPreInitializedValid(ttlMs: number): boolean;
843
- setLastInitializeDuration(durationMs: number): void;
844
- getLastInitializeDuration(): number | undefined;
845
- getCommands(): DeviceCommands;
846
- /**
847
- * Canonical protocol discriminator.
848
- *
849
- * descriptor.protocolType is established by active probing; V2 features are mapped
850
- * from DeviceInfoGet. All protocol branches must use this method instead of reading
851
- * originalDescriptor.protocolType directly or inferring a protocol from features.
852
- */
853
- getProtocol(): 'V1' | 'V2';
854
- isProtocolV2(): boolean;
855
- getCurrentDeviceType(): IDeviceType;
856
- getCurrentDeviceId(): string | undefined;
857
- getCurrentSerialNo(): string;
858
- getConnectId(): string;
859
- getCurrentBleName(): string | null;
860
- getCurrentLabel(): string | null;
861
- getCurrentPassphraseProtection(): boolean | null | undefined;
862
- getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
863
- getCurrentFirmwareVersionString(): string;
864
- getCurrentBLEFirmwareVersionString(): string | undefined;
865
- getCurrentBootloaderVersionString(): string | undefined;
866
- getCurrentSafetyChecks(): string | null | undefined;
867
- getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
868
- supportNewPassphrase(): SupportFeatureType;
869
- supportInputPinOnSoftware(): SupportFeatureType;
870
- supportModifyHomescreen(): SupportFeatureType;
871
- private getSessionCacheDeviceKey;
872
- getInternalState(_deviceId?: string): string | undefined;
873
- updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
874
- private setInternalState;
875
- clearInternalState(_deviceId?: string): void;
876
- initialize(options?: InitOptions): Promise<void>;
877
- /**
878
- * Device initialization over Protocol V2.
879
- *
880
- * Protocol V2 bypasses legacy Initialize/GetFeatures and builds its canonical
881
- * features state directly from DeviceInfoGet.
882
- */
883
- private _initializeProtocolV2;
884
- getFeatures(): Promise<Features | undefined>;
885
- getDeviceState(params?: DeviceStateReadOptions): Promise<DeviceState>;
886
- _updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
887
- updateState(patch: DeviceStatePatch, source: DeviceStateUpdateSource): DeviceState & {
888
- raw?: DeviceFeaturesRaw | undefined;
223
+ type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
224
+ type DeviceTypeMap = {
225
+ [k in IKnownDevice]: {
226
+ firmware: IFirmwareReleaseInfo[];
227
+ 'firmware-v2'?: IFirmwareReleaseInfo[];
228
+ 'firmware-v8'?: IFirmwareReleaseInfo[];
229
+ 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
230
+ ble: IBLEFirmwareReleaseInfo[];
889
231
  };
890
- updateFeaturesPatch(patch: Partial<Features>, source: DeviceStateUpdateSource): Features | undefined;
891
- probeProtocolV2RuntimeState(deviceInfo: ProtocolV2DeviceInfo, timeoutMs?: number): Promise<Features>;
892
- updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo, deviceStatus?: DeviceStatus$1 | null, runtimeMode?: ProtocolV2RuntimeMode): Features;
893
- updateProtocolV2Status(status: DeviceStatus$1): Features;
894
- markTransportDisconnected(): void;
895
- markProtocolV2Reboot(rebootType: DeviceRebootType): void;
896
- /**
897
- * 暂时只在 acquire 后更新 Session ID
898
- * 后续看是否有需要依据 listen 返回结果更新
899
- * @param descriptor
900
- */
901
- updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
902
- updateFromCache(device: Device): void;
903
- run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
904
- _runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions, runPromise: Deferred<void>): Promise<void>;
905
- interruptionFromOutside(): Promise<void>;
906
- interruptionFromUser(): Promise<void>;
907
- setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
908
- clearCancelableAction(): void;
909
- getMode(): EOneKeyDeviceMode;
910
- getFirmwareVersion(): IVersionArray | null;
911
- getBLEFirmwareVersion(): IVersionArray | null;
912
- isUsed(): boolean;
913
- hasDeviceAcquire(): boolean;
914
- isUsedHere(): boolean;
915
- isUsedElsewhere(): boolean;
916
- isBootloader(): boolean | undefined;
917
- isInitialized(): boolean | undefined;
918
- isSeedless(): boolean | undefined;
919
- isUnacquired(): boolean;
920
- hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
921
- hasUsePassphrase(): boolean;
922
- checkDeviceId(deviceId: string): boolean;
923
- lockDevice(): Promise<Success$1>;
924
- supportUnlockVersionRange(): DeviceFirmwareRange;
925
- unlockDevice(): Promise<Features | undefined>;
926
- checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
927
- }
928
-
929
- /**
930
- * SDK Tracing Utilities
931
- * Tracks object instances and request call chains across multiple SDK instances
932
- */
933
- /**
934
- * Generate SDK instance ID
935
- * @returns Format: "SDK-<number>-<timestamp>"
936
- * @example "SDK-1-123456"
937
- */
938
- declare function generateSdkInstanceId(): string;
939
- /**
940
- * Generate globally unique instance ID
941
- * @param type Instance type (Device, DeviceCommands, BaseMethod, etc.)
942
- * @param sdkInstanceId SDK instance ID (optional)
943
- * @returns Format: <SDK>.<type>-<number>-<timestamp>
944
- * @example "SDK-1.Device-1-123456" or "Device-1-123456"
945
- */
946
- declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
947
- /**
948
- * Request context information
949
- */
950
- interface RequestContext {
951
- /** Request unique ID (reuses BaseMethod.responseID) */
952
- responseID: number;
953
- /** SDK instance ID */
954
- sdkInstanceId?: string;
955
- /** API method name */
956
- methodName: string;
957
- /** Device connection ID */
958
- connectId?: string;
959
- /** Device instance ID */
960
- deviceInstanceId?: string;
961
- /** DeviceCommands instance ID */
962
- commandsInstanceId?: string;
963
- /** Parent request ID (for nested calls like allNetworkGetAddress) */
964
- parentResponseID?: number;
965
- /** Request start time */
966
- startTime: number;
967
- /** Request end time */
968
- endTime?: number;
969
- /** Request status */
970
- status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
971
- /** Error message */
972
- error?: string;
973
- }
974
- /**
975
- * SDK instance tracing context
976
- */
977
- interface SdkTracingContext {
978
- /** SDK instance ID */
979
- sdkInstanceId: string;
980
- /** Creation timestamp */
981
- createdAt: number;
982
- /** Active requests */
983
- activeRequests: Map<number, RequestContext>;
984
- }
985
- /**
986
- * Create SDK instance tracing context
987
- */
988
- declare function createSdkTracingContext(): SdkTracingContext;
989
- /**
990
- * Create and register request context
991
- * @param responseID Request ID (reuses BaseMethod.responseID)
992
- * @param methodName API method name
993
- * @param options Additional options
994
- */
995
- declare function createRequestContext(responseID: number, methodName: string, options?: {
996
- sdkInstanceId?: string;
997
- connectId?: string;
998
- deviceInstanceId?: string;
999
- commandsInstanceId?: string;
1000
- parentResponseID?: number;
1001
- }): RequestContext;
1002
- /**
1003
- * Update request context
1004
- */
1005
- declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
1006
- /**
1007
- * Complete request context
1008
- */
1009
- declare function completeRequestContext(responseID: number, error?: Error): void;
1010
- /**
1011
- * Get active requests for specific Device instance
1012
- */
1013
- declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
1014
- /**
1015
- * Format request context for logging
1016
- */
1017
- declare function formatRequestContext(context: RequestContext): string;
1018
- /**
1019
- * Cleanup specific SDK instance
1020
- */
1021
- declare function cleanupSdkInstance(sdkInstanceId: string): void;
1022
-
1023
- declare class Core extends EventEmitter {
1024
- private tracingContext;
1025
- readonly sdkInstanceId: string;
1026
- private requestQueue;
1027
- private disposePromise?;
1028
- private prePendingCallPromise;
1029
- private methodSynchronize;
1030
- constructor();
1031
- cancelOperation(operationId: string): void;
1032
- private getCoreContext;
1033
- handleMessage(message: CoreMessage): Promise<any>;
1034
- dispose(): Promise<void>;
1035
- private disposeResources;
1036
- }
1037
- declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
1038
- declare const switchTransport: ({ env, Transport, plugin, }: {
1039
- env: ConnectSettings['env'];
1040
- Transport: any;
1041
- plugin?: LowlevelTransportSharedPlugin | undefined;
1042
- }) => void;
1043
-
1044
- type HiddenWalletSelection = {
1045
- host_passphrase: DeviceHostPassphrase;
1046
- passphrase_on_device?: never;
1047
- attach_pin_on_device?: never;
1048
- } | {
1049
- host_passphrase?: never;
1050
- passphrase_on_device: DevicePassphraseOnDevice;
1051
- attach_pin_on_device?: never;
1052
- } | {
1053
- host_passphrase?: never;
1054
- passphrase_on_device?: never;
1055
- attach_pin_on_device: DeviceAttachPinOnDevice;
1056
- };
1057
- type DeviceSessionOpenParams = {
1058
- resume: DeviceSessionResume;
1059
- select?: never;
1060
- } | {
1061
- resume?: never;
1062
- select: HiddenWalletSelection;
1063
- };
1064
-
1065
- type DeviceInfoGetTargets = {
1066
- hw?: boolean;
1067
- fw?: boolean;
1068
- coprocessor?: boolean;
1069
- se1?: boolean;
1070
- se2?: boolean;
1071
- se3?: boolean;
1072
- se4?: boolean;
1073
232
  };
1074
- type DeviceInfoGetTypes = {
1075
- version?: boolean;
1076
- build_id?: boolean;
1077
- hash?: boolean;
1078
- specific?: boolean;
1079
- };
1080
- type DeviceInfoGetParams = {
1081
- targets?: DeviceInfoGetTargets;
1082
- types?: DeviceInfoGetTypes;
1083
- };
1084
-
1085
- type DeviceSettingsSetParams = {
1086
- settings?: Omit<DeviceSettings, 'passphrase_enable' | 'airgap_mode'>;
1087
- };
1088
-
1089
- type SupportedDeviceSettingsPage = DeviceSettingsPage;
1090
- type DeviceSettingsPageShowParams = {
1091
- page?: SupportedDeviceSettingsPage | 'DeviceReset' | 'DevicePinChange' | 'DevicePassphrase' | 'DeviceAirgap';
1092
- fieldName?: string;
1093
- field_name?: string;
1094
- };
1095
-
1096
- declare const PRO2_WALLPAPER_WIDTH = 604;
1097
- declare const PRO2_WALLPAPER_HEIGHT = 1024;
1098
- type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
1099
- declare function encodePro2Wallpaper(options: {
1100
- width: number;
1101
- height: number;
1102
- rgba: Uint8Array | ArrayBuffer;
1103
- }): {
1104
- data: Uint8Array;
1105
- colorFormat: Pro2WallpaperColorFormat;
1106
- };
1107
-
1108
- type DeviceUploadWallpaperParams = {
1109
- width: number;
1110
- height: number;
1111
- rgba: Uint8Array | ArrayBuffer;
1112
- fileName?: string;
1113
- chunkSize?: number;
1114
- };
1115
- type DeviceUploadWallpaperResponse = {
1116
- path: string;
1117
- size: number;
1118
- colorFormat: Pro2WallpaperColorFormat;
1119
- message?: string;
1120
- };
1121
-
1122
- type FileOpSuccess = {
1123
- message?: string;
1124
- };
1125
- type FileInfo = {
1126
- path: string;
1127
- offset: number;
1128
- total_size: number;
1129
- data?: Uint8Array;
1130
- data_hash?: number;
1131
- processed_byte?: number;
1132
- chunks?: number;
1133
- };
1134
- type DirInfo = {
1135
- path: string;
1136
- child_dirs?: string;
1137
- child_files?: string;
1138
- };
1139
- type PathInfoResult = {
1140
- exist: boolean;
1141
- size: number;
1142
- year: number;
1143
- month: number;
1144
- day: number;
1145
- hour: number;
1146
- minute: number;
1147
- second: number;
1148
- readonly: boolean;
1149
- hidden: boolean;
1150
- system: boolean;
1151
- archive: boolean;
1152
- directory: boolean;
1153
- };
1154
- type DeviceSessionOpenResponse = {
1155
- session_id: string;
1156
- btc_test_address: string;
1157
- };
1158
- /** @deprecated Development-only raw Protocol V2 command. Use `getDeviceState`. */
1159
- declare function deviceInfoGet(connectId: string, params?: CommonParams & DeviceInfoGetParams): Response<ProtocolV2DeviceInfo>;
1160
- /** @deprecated Development-only raw Protocol V2 command. Use `getDeviceState`. */
1161
- declare function deviceStatusGet(connectId: string, params?: CommonParams): Response<DeviceStatus$1>;
1162
- /** @deprecated Development-only raw Protocol V2 command. Use `getDeviceState`. */
1163
- declare function deviceSettingsGet(connectId: string, params?: CommonParams): Response<DeviceSettings>;
1164
- /** @deprecated Development-only raw Protocol V2 command. */
1165
- declare function protocolInfoRequest(connectId: string, params?: CommonParams): Response<ProtocolInfo>;
1166
- declare function ping(connectId: string, params?: CommonParams & {
1167
- message?: string;
1168
- }): Response<Success$1>;
1169
- declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
1170
- declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<DevOnboardingStatus>;
1171
- /**
1172
- * @deprecated Use `openWalletSession` instead of the raw Protocol V2 command.
1173
- */
1174
- declare function deviceSessionOpen(connectId: string, params: CommonParams & DeviceSessionOpenParams): Response<DeviceSessionOpenResponse>;
1175
- declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DeviceFirmwareUpdateStatus>;
1176
- declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams & DeviceFirmwareUpdateStatusGetParams): Response<DeviceFirmwareUpdateStatus>;
1177
- declare function deviceFactoryInfoSet(connectId: string, params: CommonParams & DeviceFactoryInfoSetParams): Response<Success$1>;
1178
- declare function deviceFactoryInfoGet(connectId: string, params?: CommonParams): Response<DeviceFactoryInfo>;
1179
- declare function deviceSettingsSet(connectId: string, params: CommonParams & DeviceSettingsSetParams): Response<Success$1>;
1180
- declare function deviceSettingsPageShow(connectId: string, params: CommonParams & DeviceSettingsPageShowParams): Response<Success$1>;
1181
- declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
1182
- declare function filesystemPermissionFix(connectId: string, params?: CommonParams): Response<Success$1>;
1183
- declare function fileRead(connectId: string, params: {
1184
- path: string;
1185
- offset?: number;
1186
- totalSize?: number;
1187
- chunkLen?: number;
1188
- uiPercentage?: number;
1189
- }): Response<FileInfo>;
1190
- declare function fileWrite(connectId: string, params: {
1191
- path: string;
1192
- offset?: number;
1193
- totalSize?: number;
1194
- chunkSize?: number;
1195
- chunkLen?: number;
1196
- data: ArrayBuffer | Uint8Array | Blob | string;
1197
- overwrite?: boolean;
1198
- append?: boolean;
1199
- uiPercentage?: number;
1200
- timeoutMs?: number | string;
1201
- }): Response<FileInfo>;
1202
- declare function fileDelete(connectId: string, params: {
1203
- path: string;
1204
- }): Response<FileOpSuccess>;
1205
- declare function dirList(connectId: string, params: {
1206
- path: string;
1207
- depth?: number;
1208
- }): Response<DirInfo>;
1209
- declare function dirMake(connectId: string, params: {
1210
- path: string;
1211
- }): Response<FileOpSuccess>;
1212
- declare function dirRemove(connectId: string, params: {
1213
- path: string;
1214
- }): Response<FileOpSuccess>;
1215
- declare function pathInfo(connectId: string, params: {
1216
- path: string;
1217
- timeoutMs?: number | string;
1218
- }): Response<PathInfoResult>;
1219
- declare function uploadPortfolio(connectId: string, params: {
1220
- operationId?: string;
1221
- packageBytes: ArrayBuffer | Uint8Array | Blob;
1222
- timeoutMs?: number | string;
1223
- }): Response<FileInfo & {
1224
- portfolioUpdated: true;
1225
- }>;
1226
- declare function filesystemFormat(connectId: string): Response<Success$1>;
1227
-
1228
- declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
1229
- declare const off: (type: any, fn: any) => void;
1230
- declare const removeAllListeners: (type: any) => void;
1231
-
1232
- declare function uiResponse(response: UiResponseEvent): void;
1233
-
1234
- type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
1235
- interface LowLevelInjectApi {
1236
- call: CallMethod;
1237
- eventEmitter: EventEmitter$1;
1238
- init: CoreApi['init'];
1239
- dispose: CoreApi['dispose'];
1240
- uiResponse: CoreApi['uiResponse'];
1241
- cancel: CoreApi['cancel'];
1242
- cancelOperation: CoreApi['cancelOperation'];
1243
- updateSettings: CoreApi['updateSettings'];
1244
- switchTransport: CoreApi['switchTransport'];
1245
- addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
1246
- }
1247
- type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
1248
- addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
233
+ type AssetsMap = {
234
+ bridge: {
235
+ version: IVersionArray;
236
+ linux32Rpm: string;
237
+ linux64Rpm: string;
238
+ linux32Deb: string;
239
+ linux64Deb: string;
240
+ win: string;
241
+ mac: string;
242
+ sha256sumAsc: string;
243
+ changelog: {
244
+ [k in ILocale]: string;
245
+ };
246
+ };
1249
247
  };
248
+ type RemoteConfigResponse = {
249
+ bridge: AssetsMap['bridge'];
250
+ } & DeviceTypeMap;
1250
251
 
1251
- declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
252
+ declare function init$1(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
1252
253
  declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
1253
254
 
1254
255
  declare function testInitializeDeviceDuration(connectId?: string, params?: CommonParams): Response<number>;
@@ -1257,15 +258,6 @@ declare function preInitialize(connectId: string, params?: CommonParams): Respon
1257
258
 
1258
259
  declare function getLogs(): Response<string[]>;
1259
260
 
1260
- type ClearSessionCacheParams = {
1261
- deviceId?: string;
1262
- passphraseState?: string;
1263
- };
1264
- type ClearSessionCachePayload = {
1265
- cleared: true;
1266
- };
1267
- declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
1268
-
1269
261
  declare function checkBridgeStatus(): Response<boolean>;
1270
262
 
1271
263
  type CheckBridgeReleaseResponse = {
@@ -1289,248 +281,6 @@ type CheckBootloaderReleaseParams = {
1289
281
  };
1290
282
  declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
1291
283
 
1292
- interface FirmwareUpdatePreparedEntry {
1293
- entryName: string;
1294
- artifact: FirmwareArtifactReference;
1295
- }
1296
- interface FirmwareUpdatePreparedArtifactInput {
1297
- artifactId: string;
1298
- artifact: FirmwareArtifactReference;
1299
- materializedEntries?: FirmwareUpdatePreparedEntry[];
1300
- }
1301
- interface FirmwareUpdatePreparedArtifact {
1302
- artifactId: string;
1303
- role: FirmwareUpdatePlanArtifactRole;
1304
- target: FirmwareUpdatePlanTarget;
1305
- container: 'raw' | 'zip';
1306
- logicalName?: string;
1307
- targetVersion?: string;
1308
- artifact: FirmwareArtifactReference;
1309
- materializedEntries?: FirmwareUpdatePreparedEntry[];
1310
- }
1311
- interface FirmwareUpdatePreparedPlan {
1312
- schemaVersion: 1;
1313
- preparedPlanDigest: string;
1314
- planDigest: string;
1315
- networkPolicy: 'forbid';
1316
- executor: FirmwareUpdatePlan['executor'];
1317
- deviceIdentity: string;
1318
- deviceModel: string;
1319
- firmwareType: FirmwareUpdatePlan['firmwareType'];
1320
- platform: FirmwareUpdatePlan['platform'];
1321
- leaseRef: string;
1322
- artifacts: FirmwareUpdatePreparedArtifact[];
1323
- epochs: FirmwareUpdatePlanEpoch[];
1324
- targetsToUpdate: FirmwareUpdatePlanTarget[];
1325
- }
1326
- declare function prepareFirmwareUpdatePlan(input: {
1327
- plan: FirmwareUpdatePlan;
1328
- leaseRef: string;
1329
- artifacts: FirmwareUpdatePreparedArtifactInput[];
1330
- }): FirmwareUpdatePreparedPlan;
1331
- declare function validateFirmwareUpdatePreparedPlan(value: unknown): FirmwareUpdatePreparedPlan;
1332
-
1333
- type IUpdateType = 'firmware' | 'ble';
1334
- interface FirmwareArtifactReference {
1335
- artifactRef: string;
1336
- size: number;
1337
- sha256: string;
1338
- }
1339
- interface FirmwareArtifactReader {
1340
- open(input: {
1341
- artifactRef: string;
1342
- }): Promise<{
1343
- readerId: string;
1344
- size: number;
1345
- }>;
1346
- read(input: {
1347
- readerId: string;
1348
- offset: number;
1349
- length: number;
1350
- }): Promise<{
1351
- data: ArrayBuffer;
1352
- bytesRead: number;
1353
- eof: boolean;
1354
- }>;
1355
- close(input: {
1356
- readerId: string;
1357
- }): Promise<void>;
1358
- }
1359
- type FirmwareCheckpointStage = 'EPOCH_STARTED' | 'EPOCH_COMPLETED' | 'BEFORE_DEVICE_MODE_CHANGE' | 'FILE_TRANSFER_STARTED' | 'FILE_TRANSFER_COMPLETED' | 'INSTALL_REQUESTED' | 'INSTALL_ACCEPTED' | 'FINAL_VERIFIED';
1360
- interface FirmwareCheckpoint {
1361
- schemaVersion: 1;
1362
- sequence: number;
1363
- stage: FirmwareCheckpointStage;
1364
- destructiveActionStarted: boolean;
1365
- target?: string;
1366
- epoch?: number;
1367
- }
1368
- interface FirmwareCheckpointSink {
1369
- commit(checkpoint: FirmwareCheckpoint): Promise<void>;
1370
- }
1371
- interface FirmwareUpdateHostBinding {
1372
- artifactReader: FirmwareArtifactReader;
1373
- checkpointSink: FirmwareCheckpointSink;
1374
- }
1375
- interface FirmwareCheckpointParams {
1376
- hostBindingGeneration?: number;
1377
- checkpointSink?: FirmwareCheckpointSink;
1378
- checkpointSequenceStart?: number;
1379
- resumeCheckpoint?: FirmwareCheckpoint;
1380
- }
1381
- interface FirmwareUpdateBinaryParams {
1382
- binary: ArrayBuffer;
1383
- updateType: IUpdateType;
1384
- }
1385
- interface FirmwareUpdateArtifactParams extends FirmwareCheckpointParams {
1386
- preparedPlan: FirmwareUpdatePreparedPlan;
1387
- hostBindingGeneration: number;
1388
- artifact: FirmwareArtifactReference;
1389
- resourceArtifact?: FirmwareArtifactReference;
1390
- resourceEntries?: Array<{
1391
- entryName: string;
1392
- artifact: FirmwareArtifactReference;
1393
- }>;
1394
- updateType: IUpdateType;
1395
- forcedUpdateRes?: boolean;
1396
- isUpdateBootloader?: boolean;
1397
- firmwareType?: EFirmwareType;
1398
- }
1399
- interface FirmwareUpdateParams {
1400
- version?: number[];
1401
- updateType: IUpdateType;
1402
- forcedUpdateRes?: boolean;
1403
- isUpdateBootloader?: boolean;
1404
- firmwareType?: EFirmwareType;
1405
- }
1406
- declare function firmwareUpdate(connectId: string | undefined, params: Params<FirmwareUpdateParams> & {
1407
- rebootOnSuccess?: boolean;
1408
- }): Response<Messages.Success>;
1409
- declare function firmwareUpdate(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams> & {
1410
- rebootOnSuccess?: boolean;
1411
- }): Response<Messages.Success>;
1412
- type IPlatform = 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
1413
- type Platform = {
1414
- platform: IPlatform;
1415
- };
1416
- declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateParams & Platform>): Response<Messages.Success>;
1417
- declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams & Platform>): Response<Messages.Success>;
1418
- declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateArtifactParams & Platform>): Response<Messages.Success>;
1419
- interface FirmwareUpdateV3Params extends FirmwareCheckpointParams {
1420
- preparedPlan?: FirmwareUpdatePreparedPlan;
1421
- bleVersion?: number[];
1422
- bleBinary?: ArrayBuffer;
1423
- chunkSize?: number;
1424
- firmwareVersion?: number[];
1425
- firmwareBinary?: ArrayBuffer;
1426
- bootloaderVersion?: number[];
1427
- bootloaderBinary?: ArrayBuffer;
1428
- resourceBinary?: ArrayBuffer;
1429
- forcedUpdateRes?: boolean;
1430
- firmwareType?: EFirmwareType;
1431
- platform: IPlatform;
1432
- artifactReader?: FirmwareArtifactReader;
1433
- artifacts?: {
1434
- ble?: FirmwareArtifactReference;
1435
- firmware?: FirmwareArtifactReference;
1436
- bootloader?: FirmwareArtifactReference;
1437
- resourceEntries?: Array<{
1438
- entryName: string;
1439
- artifact: FirmwareArtifactReference;
1440
- }>;
1441
- };
1442
- }
1443
- /**
1444
- * firmwareUpdateV4 target binaries grouped by DeviceFirmwareTargetType.
1445
- * Except for romloader, each field maps to a target accepted by bootloader.
1446
- */
1447
- type FirmwareUpdateV4Target = 'boot' | 'app_v1' | 'app_v2' | 'coprocessor' | 'resource' | 'se01' | 'se02' | 'se03' | 'se04';
1448
- interface FirmwareUpdateV4Params extends FirmwareCheckpointParams {
1449
- preparedPlan?: FirmwareUpdatePreparedPlan;
1450
- platform: IPlatform;
1451
- expectedDeviceId?: string;
1452
- chunkSize?: number;
1453
- firmwareType?: EFirmwareType;
1454
- targetsToUpdate?: FirmwareUpdateV4Target[];
1455
- expectedTargetVersions?: Partial<Record<FirmwareUpdateV4Target, string>>;
1456
- /** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
1457
- romloaderBinary?: ArrayBuffer;
1458
- /** FW_MGMT_TARGET_BOOTLOADER = 3 */
1459
- bootloaderBinary?: ArrayBuffer;
1460
- /** FW_MGMT_TARGET_APPLICATION_P1 = 4 */
1461
- applicationP1Binary?: ArrayBuffer;
1462
- /** FW_MGMT_TARGET_APPLICATION_P2 = 5 */
1463
- applicationP2Binary?: ArrayBuffer;
1464
- /** FW_MGMT_TARGET_COPROCESSOR = 6 */
1465
- coprocessorBinary?: ArrayBuffer;
1466
- /** FW_MGMT_TARGET_SE01-04 = 7-10 */
1467
- se01Binary?: ArrayBuffer;
1468
- se02Binary?: ArrayBuffer;
1469
- se03Binary?: ArrayBuffer;
1470
- se04Binary?: ArrayBuffer;
1471
- forcedUpdateRes?: boolean;
1472
- /**
1473
- * RESC bundle okpkg files written directly to devicePath through FilesystemFileWrite.
1474
- * Manual mode installs them without version comparison.
1475
- */
1476
- resourceBundleFiles?: Array<{
1477
- binary: ArrayBuffer;
1478
- devicePath: string;
1479
- }>;
1480
- artifactReader?: FirmwareArtifactReader;
1481
- componentArtifacts?: Partial<Record<Exclude<FirmwareUpdateV4Target, 'resource'>, FirmwareArtifactReference>>;
1482
- resourceBundleArtifacts?: Array<{
1483
- name: string;
1484
- artifact: FirmwareArtifactReference;
1485
- }>;
1486
- }
1487
- declare function registerFirmwareUpdateHostBinding$1(binding: FirmwareUpdateHostBinding): number;
1488
- declare function unregisterFirmwareUpdateHostBinding$1(generation?: number): boolean;
1489
- declare function getFirmwareUpdateHostBindingGeneration$1(): number;
1490
- declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
1491
- bleVersion: string;
1492
- firmwareVersion: string;
1493
- bootloaderVersion: string;
1494
- }>;
1495
- declare function firmwareUpdateV4(connectId: string | undefined, params: Params<FirmwareUpdateV4Params>): Response<{
1496
- bleVersion: string;
1497
- firmwareVersion: string;
1498
- bootloaderVersion: string;
1499
- }>;
1500
-
1501
- type FirmwareUpdatePlanArtifactRole = 'firmware' | 'ble' | 'bootloader' | 'resource' | 'component' | 'resourceBundle';
1502
- type FirmwareUpdatePlanTarget = 'firmware' | 'ble' | 'bootloader' | FirmwareUpdateV4Target;
1503
- interface FirmwareUpdatePlanArtifact {
1504
- artifactId: string;
1505
- role: FirmwareUpdatePlanArtifactRole;
1506
- target: FirmwareUpdatePlanTarget;
1507
- url: string;
1508
- container: 'raw' | 'zip';
1509
- logicalName?: string;
1510
- expectedSize?: number;
1511
- expectedSha256?: string;
1512
- targetVersion?: string;
1513
- }
1514
- type FirmwareUpdatePlanEpochKind = 'legacy-update' | 'resource-sync' | 'bootloader-install' | 'bootloader-verify' | 'component-install' | 'final-verify';
1515
- interface FirmwareUpdatePlanEpoch {
1516
- epoch: number;
1517
- kind: FirmwareUpdatePlanEpochKind;
1518
- artifactIds: string[];
1519
- targets: FirmwareUpdatePlanTarget[];
1520
- }
1521
- interface FirmwareUpdatePlan {
1522
- schemaVersion: 1;
1523
- planDigest: string;
1524
- executor: 'v2' | 'v3' | 'v4';
1525
- deviceIdentity: string;
1526
- deviceModel: string;
1527
- firmwareType: EFirmwareType;
1528
- platform: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
1529
- artifacts: FirmwareUpdatePlanArtifact[];
1530
- epochs: FirmwareUpdatePlanEpoch[];
1531
- targetsToUpdate: FirmwareUpdatePlanTarget[];
1532
- }
1533
-
1534
284
  type FirmwareRelease$2 = {
1535
285
  shouldUpdate?: boolean;
1536
286
  status: IDeviceFirmwareStatus;
@@ -1546,13 +296,11 @@ type AllFirmwareRelease = {
1546
296
  ble: FirmwareRelease$2;
1547
297
  bootloader?: FirmwareRelease$2;
1548
298
  bridge?: FirmwareRelease$2;
1549
- features?: Features;
1550
- firmwareUpdatePlan?: FirmwareUpdatePlan;
299
+ features?: Features$1;
1551
300
  };
1552
301
  type CheckAllFirmwareReleaseParams = {
1553
302
  checkBridgeRelease?: boolean;
1554
303
  firmwareType?: EFirmwareType;
1555
- platform?: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
1556
304
  };
1557
305
  declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
1558
306
 
@@ -1562,70 +310,13 @@ type CheckFirmwareTypeAvailableParams = {
1562
310
  };
1563
311
  declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
1564
312
 
1565
- declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
313
+ declare function searchDevices(): Response<SearchDevice[]>;
1566
314
 
1567
- /**
1568
- * @deprecated Use `getDeviceState` for both Protocol V1 and Protocol V2 devices.
1569
- */
1570
315
  declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
1571
316
 
1572
- /**
1573
- * @deprecated Use `getDeviceState(connectId, { scope: 'firmware' })`.
1574
- */
1575
317
  declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
1576
318
 
1577
- type GetPassphraseStateParams = CommonParams;
1578
- /**
1579
- * Legacy Protocol V1 wallet API.
1580
- *
1581
- * This remains supported for Protocol V1 integrations. New cross-protocol integrations
1582
- * and all Protocol V2 callers should use `openWalletSession`.
1583
- */
1584
- declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
1585
-
1586
- type OpenWalletSessionParams = {
1587
- mode: 'standard';
1588
- deviceId?: never;
1589
- passphraseState?: never;
1590
- useEmptyPassphrase?: never;
1591
- initSession?: never;
1592
- } | {
1593
- mode: 'select-hidden';
1594
- deviceId?: never;
1595
- passphraseState?: never;
1596
- useEmptyPassphrase?: never;
1597
- initSession?: never;
1598
- } | {
1599
- mode: 'resume-hidden';
1600
- deviceId: string;
1601
- passphraseState: string;
1602
- useEmptyPassphrase?: never;
1603
- initSession?: never;
1604
- } | {
1605
- /**
1606
- * Compatibility form. `useEmptyPassphrase: true` opens the standard wallet;
1607
- * otherwise `initSession: true` starts a fresh hidden-wallet selection, a
1608
- * complete wallet binding resumes a hidden wallet, and no binding starts the
1609
- * hidden-wallet selection flow.
1610
- */
1611
- mode?: undefined;
1612
- useEmptyPassphrase?: boolean;
1613
- initSession?: boolean;
1614
- deviceId?: string;
1615
- passphraseState?: string;
1616
- };
1617
- type OpenWalletSessionPayload = {
1618
- protocol: 'V1' | 'V2';
1619
- walletType: 'standard' | 'hidden';
1620
- deviceId: string;
1621
- passphraseState: string | null;
1622
- resumed: boolean;
1623
- };
1624
- /**
1625
- * Opens the standard, hidden, or Attach-to-PIN wallet flow through a unified
1626
- * Protocol V1/V2 API.
1627
- */
1628
- declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
319
+ declare function getPassphraseState(connectId?: string, params?: CommonParams): Response<string>;
1629
320
 
1630
321
  type FirmwareRelease$1 = {
1631
322
  status: IDeviceFirmwareStatus;
@@ -1652,18 +343,47 @@ type BleFirmwareRelease = {
1652
343
  };
1653
344
  declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
1654
345
 
1655
- interface FirmwareUpdateCapabilities {
1656
- planSchemaVersion: 1;
1657
- preparedPlanSchemaVersion: 1;
1658
- hostBindingProtocolVersion: 1;
1659
- checkpointSchemaVersion: 1;
1660
- manifestModes: Array<'external-only' | 'sdk-managed'>;
1661
- supportsArtifactReader: true;
1662
- supportsAwaitableCheckpoint: true;
1663
- supportsResume: true;
1664
- supportsReconciliation: true;
346
+ type IUpdateType = 'firmware' | 'ble';
347
+ interface FirmwareUpdateBinaryParams {
348
+ binary: ArrayBuffer;
349
+ updateType: IUpdateType;
350
+ }
351
+ interface FirmwareUpdateParams {
352
+ version?: number[];
353
+ updateType: IUpdateType;
354
+ forcedUpdateRes?: boolean;
355
+ isUpdateBootloader?: boolean;
356
+ firmwareType?: EFirmwareType;
357
+ }
358
+ declare function firmwareUpdate(connectId: string | undefined, params: Params<FirmwareUpdateParams> & {
359
+ rebootOnSuccess?: boolean;
360
+ }): Response<Messages.Success>;
361
+ declare function firmwareUpdate(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams> & {
362
+ rebootOnSuccess?: boolean;
363
+ }): Response<Messages.Success>;
364
+ type IPlatform = 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
365
+ type Platform = {
366
+ platform: IPlatform;
367
+ };
368
+ declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateParams & Platform>): Response<Messages.Success>;
369
+ declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams & Platform>): Response<Messages.Success>;
370
+ interface FirmwareUpdateV3Params {
371
+ bleVersion?: number[];
372
+ bleBinary?: ArrayBuffer;
373
+ firmwareVersion?: number[];
374
+ firmwareBinary?: ArrayBuffer;
375
+ bootloaderVersion?: number[];
376
+ bootloaderBinary?: ArrayBuffer;
377
+ resourceBinary?: ArrayBuffer;
378
+ forcedUpdateRes?: boolean;
379
+ firmwareType?: EFirmwareType;
380
+ platform: IPlatform;
1665
381
  }
1666
- declare function getFirmwareUpdateCapabilities(): FirmwareUpdateCapabilities;
382
+ declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
383
+ bleVersion: string;
384
+ firmwareVersion: string;
385
+ bootloaderVersion: string;
386
+ }>;
1667
387
 
1668
388
  declare function promptWebDeviceAccess(options?: {
1669
389
  deviceSerialNumberFromUI?: string;
@@ -1733,16 +453,7 @@ type DeviceSettingsParams = {
1733
453
  experimentalFeatures?: boolean;
1734
454
  autoShutdownDelayMs?: number;
1735
455
  changeBrightness?: boolean;
1736
- brightness?: number;
1737
456
  hapticFeedback?: boolean;
1738
- bluetoothEnabled?: boolean;
1739
- airgapMode?: boolean;
1740
- animationEnabled?: boolean;
1741
- tapToWake?: boolean;
1742
- deviceNameDisplayEnabled?: boolean;
1743
- fidoEnabled?: boolean;
1744
- usbLockEnabled?: boolean;
1745
- randomKeypad?: boolean;
1746
457
  };
1747
458
  declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
1748
459
 
@@ -1776,18 +487,15 @@ declare function deviceFullyUploadResource(connectId: string, params: CommonPara
1776
487
  binary?: ArrayBuffer;
1777
488
  }): Response<Success$1>;
1778
489
 
1779
- type DeviceUpdateBootloaderParams = FirmwareCheckpointParams & {
1780
- preparedPlan?: FirmwareUpdatePreparedPlan;
490
+ type DeviceUpdateBootloaderParams = {
1781
491
  binary?: ArrayBuffer;
1782
- artifact?: FirmwareArtifactReference;
1783
- artifactReader?: FirmwareArtifactReader;
1784
492
  firmwareType?: EFirmwareType;
1785
493
  };
1786
494
  declare function deviceUpdateBootloader(connectId: string, params?: DeviceUpdateBootloaderParams): Response<Success$1>;
1787
495
 
1788
496
  declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
1789
497
 
1790
- declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features>;
498
+ declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features$1>;
1791
499
 
1792
500
  declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
1793
501
 
@@ -1991,9 +699,6 @@ type AllNetworkAddressParams = {
1991
699
  type AllNetworkAddressPayload = {
1992
700
  address: string;
1993
701
  pub?: string;
1994
- /**
1995
- * @deprecated Use `pub` instead.
1996
- */
1997
702
  publicKey?: string;
1998
703
  npub?: string;
1999
704
  } | {
@@ -2059,9 +764,6 @@ declare function evmGetAddress(connectId: string, deviceId: string, params: Comm
2059
764
  type EVMPublicKey = {
2060
765
  path: string;
2061
766
  pub: string;
2062
- /**
2063
- * @deprecated Use `pub` instead.
2064
- */
2065
767
  publicKey?: string;
2066
768
  } & EthereumPublicKey;
2067
769
  type EVMGetPublicKeyParams = {
@@ -2845,9 +1547,6 @@ declare function nearSignTransaction(connectId: string, deviceId: string, params
2845
1547
  type AptosAddress = {
2846
1548
  path: string;
2847
1549
  pub?: string;
2848
- /**
2849
- * @deprecated Use `pub` instead.
2850
- */
2851
1550
  publicKey?: string;
2852
1551
  } & AptosAddress$1;
2853
1552
  type AptosGetAddressParams = {
@@ -2862,9 +1561,6 @@ declare function aptosGetAddress(connectId: string, deviceId: string, params: Co
2862
1561
  type AptosPublicKey = {
2863
1562
  path: string;
2864
1563
  pub: string;
2865
- /**
2866
- * @deprecated Use `pub` instead.
2867
- */
2868
1564
  publicKey?: string;
2869
1565
  };
2870
1566
  type AptosGetPublicKeyParams = {
@@ -2949,9 +1645,6 @@ declare function cosmosGetAddress(connectId: string, deviceId: string, params: C
2949
1645
  type CosmosPublicKey = {
2950
1646
  path: string;
2951
1647
  pub: string;
2952
- /**
2953
- * @deprecated Use `pub` instead.
2954
- */
2955
1648
  publicKey?: string;
2956
1649
  };
2957
1650
  type CosmosGetPublicKeyParams = {
@@ -2976,9 +1669,6 @@ declare function cosmosSignTransaction(connectId: string, deviceId: string, para
2976
1669
  type XrpAddress = {
2977
1670
  path: string;
2978
1671
  pub?: string;
2979
- /**
2980
- * @deprecated Use `pub` instead.
2981
- */
2982
1672
  publicKey?: string;
2983
1673
  address: string;
2984
1674
  };
@@ -3012,9 +1702,6 @@ declare function xrpSignTransaction(connectId: string, deviceId: string, params:
3012
1702
  type SuiAddress = {
3013
1703
  path: string;
3014
1704
  pub?: string;
3015
- /**
3016
- * @deprecated Use `pub` instead.
3017
- */
3018
1705
  publicKey?: string;
3019
1706
  } & SuiAddress$1;
3020
1707
  type SuiGetAddressParams = {
@@ -3029,9 +1716,6 @@ declare function suiGetAddress(connectId: string, deviceId: string, params: Comm
3029
1716
  type SuiPublicKey = {
3030
1717
  path: string;
3031
1718
  pub: string;
3032
- /**
3033
- * @deprecated Use `pub` instead.
3034
- */
3035
1719
  publicKey?: string;
3036
1720
  };
3037
1721
  type SuiGetPublicKeyParams = {
@@ -3061,10 +1745,6 @@ declare function suiSignTransaction(connectId: string, deviceId: string, params:
3061
1745
  type CardanoGetAddressMethodParams = {
3062
1746
  addressParameters: CardanoAddressParameters;
3063
1747
  networkId: number;
3064
- /**
3065
- * Testnet cip34:0-1097911063
3066
- * Mainnet cip34:1-764824073
3067
- */
3068
1748
  protocolMagic: number;
3069
1749
  derivationType: number;
3070
1750
  address?: string;
@@ -3126,10 +1806,6 @@ type CardanoSignMessageMethodParams = {
3126
1806
  derivationType: number;
3127
1807
  networkId: number;
3128
1808
  addressType?: Messages.CardanoAddressType;
3129
- /**
3130
- * Testnet cip34:0-1097911063
3131
- * Mainnet cip34:1-764824073
3132
- */
3133
1809
  protocolMagic?: number;
3134
1810
  };
3135
1811
  declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
@@ -3163,9 +1839,6 @@ declare function filecoinSignTransaction(connectId: string, deviceId: string, pa
3163
1839
  type PolkadotAddress = {
3164
1840
  path: string;
3165
1841
  pub: string;
3166
- /**
3167
- * @deprecated Use `pub` instead.
3168
- */
3169
1842
  publicKey?: string;
3170
1843
  } & PolkadotAddress$1;
3171
1844
  type PolkadotGetAddressParams = {
@@ -3310,9 +1983,6 @@ declare function nexaSignTransaction(connectId: string, deviceId: string, params
3310
1983
  type NostrPublicKey = {
3311
1984
  npub?: string;
3312
1985
  pub?: string;
3313
- /**
3314
- * @deprecated Use `pub` instead.
3315
- */
3316
1986
  publicKey?: string;
3317
1987
  path: string;
3318
1988
  };
@@ -3409,9 +2079,6 @@ declare function nostrSignSchnorr(connectId: string, deviceId: string, params: C
3409
2079
 
3410
2080
  interface LnurlAuth {
3411
2081
  pub?: string;
3412
- /**
3413
- * @deprecated Use `pub` instead.
3414
- */
3415
2082
  publickey?: string;
3416
2083
  path?: string;
3417
2084
  signature?: string;
@@ -3488,9 +2155,6 @@ declare function dnxSignTransaction(connectId: string, deviceId: string, params:
3488
2155
  type TonAddress = {
3489
2156
  path: string;
3490
2157
  pub: string;
3491
- /**
3492
- * @deprecated Use `pub` instead.
3493
- */
3494
2158
  publicKey?: string;
3495
2159
  address: string;
3496
2160
  };
@@ -3602,9 +2266,6 @@ declare function scdoSignTransaction(connectId: string, deviceId: string, params
3602
2266
 
3603
2267
  type AlephiumAddress = {
3604
2268
  path: string;
3605
- /**
3606
- * @deprecated Use `pub` instead.
3607
- */
3608
2269
  publicKey?: string;
3609
2270
  pub?: string;
3610
2271
  address: string;
@@ -3707,48 +2368,32 @@ type NeoSignedTx = {
3707
2368
  declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
3708
2369
 
3709
2370
  type CoreApi = {
3710
- /**
3711
- * Inject function
3712
- */
3713
- init: typeof init;
2371
+ init: typeof init$1;
3714
2372
  on: typeof on;
3715
2373
  off: typeof off;
3716
2374
  emit: (event: string, ...args: any[]) => void;
3717
2375
  removeAllListeners: typeof removeAllListeners;
3718
- dispose: () => void | Promise<void>;
2376
+ dispose: () => void;
3719
2377
  call: (params: any) => Promise<any>;
3720
2378
  uiResponse: typeof uiResponse;
3721
2379
  cancel: (connectId?: string) => void;
3722
- cancelOperation: (operationId: string) => void;
3723
2380
  updateSettings: typeof updateSettings;
3724
2381
  switchTransport: (env: ConnectSettings['env']) => Promise<{
3725
2382
  success: boolean;
3726
2383
  }>;
3727
2384
  getLogs: typeof getLogs;
3728
- clearSessionCache: typeof clearSessionCache;
3729
- /**
3730
- * Test function
3731
- */
3732
2385
  testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
3733
2386
  preInitialize: typeof preInitialize;
3734
- /**
3735
- * Core function
3736
- */
3737
2387
  checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
3738
2388
  checkBridgeStatus: typeof checkBridgeStatus;
3739
2389
  checkBridgeRelease: typeof checkBridgeRelease;
3740
2390
  checkBootloaderRelease: typeof checkBootloaderRelease;
3741
2391
  checkFirmwareTypeAvailable: typeof checkFirmwareTypeAvailable;
3742
- /**
3743
- * Device function
3744
- */
3745
2392
  searchDevices: typeof searchDevices;
3746
2393
  promptWebDeviceAccess: typeof promptWebDeviceAccess;
3747
2394
  getFeatures: typeof getFeatures;
3748
- getDeviceState: typeof getDeviceState;
3749
2395
  getOnekeyFeatures: typeof getOnekeyFeatures;
3750
2396
  getPassphraseState: typeof getPassphraseState;
3751
- openWalletSession: typeof openWalletSession;
3752
2397
  deviceBackup: typeof deviceBackup;
3753
2398
  deviceChangePin: typeof deviceChangePin;
3754
2399
  deviceFlags: typeof deviceFlags;
@@ -3774,50 +2419,9 @@ type CoreApi = {
3774
2419
  firmwareUpdate: typeof firmwareUpdate;
3775
2420
  firmwareUpdateV2: typeof firmwareUpdateV2;
3776
2421
  firmwareUpdateV3: typeof firmwareUpdateV3;
3777
- firmwareUpdateV4: typeof firmwareUpdateV4;
3778
- registerFirmwareUpdateHostBinding: typeof registerFirmwareUpdateHostBinding$1;
3779
- unregisterFirmwareUpdateHostBinding: typeof unregisterFirmwareUpdateHostBinding$1;
3780
- getFirmwareUpdateHostBindingGeneration: typeof getFirmwareUpdateHostBindingGeneration$1;
3781
- getFirmwareUpdateCapabilities: typeof getFirmwareUpdateCapabilities;
3782
- prepareFirmwareUpdatePlan: typeof prepareFirmwareUpdatePlan;
3783
- validateFirmwareUpdatePreparedPlan: typeof validateFirmwareUpdatePreparedPlan;
3784
2422
  cipherKeyValue: typeof cipherKeyValue;
3785
- /**
3786
- * Pro2 business API
3787
- */
3788
- deviceReboot: typeof deviceReboot;
3789
- deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
3790
- deviceUploadWallpaper: typeof deviceUploadWallpaper;
3791
- deviceInfoGet: typeof deviceInfoGet;
3792
- deviceStatusGet: typeof deviceStatusGet;
3793
- deviceSettingsGet: typeof deviceSettingsGet;
3794
- protocolInfoRequest: typeof protocolInfoRequest;
3795
- ping: typeof ping;
3796
- deviceSessionOpen: typeof deviceSessionOpen;
3797
- deviceFirmwareUpdate: typeof deviceFirmwareUpdate;
3798
- deviceGetFirmwareUpdateStatus: typeof deviceGetFirmwareUpdateStatus;
3799
- deviceFactoryInfoSet: typeof deviceFactoryInfoSet;
3800
- deviceFactoryInfoGet: typeof deviceFactoryInfoGet;
3801
- deviceSettingsSet: typeof deviceSettingsSet;
3802
- deviceSettingsPageShow: typeof deviceSettingsPageShow;
3803
- filesystemPermissionFix: typeof filesystemPermissionFix;
3804
- filesystemFormat: typeof filesystemFormat;
3805
- uploadPortfolio: typeof uploadPortfolio;
3806
- fileRead: typeof fileRead;
3807
- fileWrite: typeof fileWrite;
3808
- fileDelete: typeof fileDelete;
3809
- dirList: typeof dirList;
3810
- dirMake: typeof dirMake;
3811
- dirRemove: typeof dirRemove;
3812
- pathInfo: typeof pathInfo;
3813
- /**
3814
- * All network function
3815
- */
3816
2423
  allNetworkGetAddress: typeof allNetworkGetAddress;
3817
2424
  allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
3818
- /**
3819
- * EVM function
3820
- */
3821
2425
  evmGetAddress: typeof evmGetAddress;
3822
2426
  evmGetPublicKey: typeof evmGetPublicKey;
3823
2427
  evmSignMessage: typeof evmSignMessage;
@@ -3825,167 +2429,86 @@ type CoreApi = {
3825
2429
  evmSignTransaction: typeof evmSignTransaction;
3826
2430
  evmSignTypedData: typeof evmSignTypedData;
3827
2431
  evmVerifyMessage: typeof evmVerifyMessage;
3828
- /**
3829
- * BTC function
3830
- */
3831
2432
  btcGetAddress: typeof btcGetAddress;
3832
2433
  btcGetPublicKey: typeof btcGetPublicKey;
3833
2434
  btcSignMessage: typeof btcSignMessage;
3834
2435
  btcSignPsbt: typeof btcSignPsbt;
3835
2436
  btcSignTransaction: typeof btcSignTransaction;
3836
2437
  btcVerifyMessage: typeof btcVerifyMessage;
3837
- /**
3838
- * Starcoin function
3839
- */
3840
2438
  starcoinGetAddress: typeof starcoinGetAddress;
3841
2439
  starcoinGetPublicKey: typeof starcoinGetPublicKey;
3842
2440
  starcoinSignMessage: typeof starcoinSignMessage;
3843
2441
  starcoinSignTransaction: typeof starcoinSignTransaction;
3844
2442
  starcoinVerifyMessage: typeof starcoinVerifyMessage;
3845
- /**
3846
- * Nem function
3847
- */
3848
2443
  nemGetAddress: typeof nemGetAddress;
3849
2444
  nemSignTransaction: typeof nemSignTransaction;
3850
- /**
3851
- * Solana function
3852
- */
3853
2445
  solGetAddress: typeof solGetAddress;
3854
2446
  solSignTransaction: typeof solSignTransaction;
3855
2447
  solSignOffchainMessage: typeof solSignOffchainMessage;
3856
2448
  solSignMessage: typeof solSignMessage;
3857
- /**
3858
- * Stellar function
3859
- */
3860
2449
  stellarGetAddress: typeof stellarGetAddress;
3861
2450
  stellarSignTransaction: typeof stellarSignTransaction;
3862
- /**
3863
- * Tron function
3864
- */
3865
2451
  tronGetAddress: typeof tronGetAddress;
3866
2452
  tronSignMessage: typeof tronSignMessage;
3867
2453
  tronSignTransaction: typeof tronSignTransaction;
3868
- /**
3869
- * Conflux function
3870
- */
3871
2454
  confluxGetAddress: typeof confluxGetAddress;
3872
2455
  confluxSignMessage: typeof confluxSignMessage;
3873
2456
  confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
3874
2457
  confluxSignTransaction: typeof confluxSignTransaction;
3875
- /**
3876
- * Near function
3877
- */
3878
2458
  nearGetAddress: typeof nearGetAddress;
3879
2459
  nearSignTransaction: typeof nearSignTransaction;
3880
- /**
3881
- * Aptos function
3882
- */
3883
2460
  aptosGetAddress: typeof aptosGetAddress;
3884
2461
  aptosGetPublicKey: typeof aptosGetPublicKey;
3885
2462
  aptosSignMessage: typeof aptosSignMessage;
3886
2463
  aptosSignInMessage: typeof aptosSignInMessage;
3887
2464
  aptosSignTransaction: typeof aptosSignTransaction;
3888
- /**
3889
- * Algo function
3890
- */
3891
2465
  algoGetAddress: typeof algoGetAddress;
3892
2466
  algoSignTransaction: typeof algoSignTransaction;
3893
- /**
3894
- * Cosmos function
3895
- */
3896
2467
  cosmosGetAddress: typeof cosmosGetAddress;
3897
2468
  cosmosGetPublicKey: typeof cosmosGetPublicKey;
3898
2469
  cosmosSignTransaction: typeof cosmosSignTransaction;
3899
- /**
3900
- * XRP function
3901
- */
3902
2470
  xrpGetAddress: typeof xrpGetAddress;
3903
2471
  xrpSignTransaction: typeof xrpSignTransaction;
3904
- /**
3905
- * SUI function
3906
- */
3907
2472
  suiGetAddress: typeof suiGetAddress;
3908
2473
  suiGetPublicKey: typeof suiGetPublicKey;
3909
2474
  suiSignMessage: typeof suiSignMessage;
3910
2475
  suiSignTransaction: typeof suiSignTransaction;
3911
- /**
3912
- * Cardano function
3913
- */
3914
2476
  cardanoGetAddress: typeof cardanoGetAddress;
3915
2477
  cardanoGetPublicKey: typeof cardanoGetPublicKey;
3916
2478
  cardanoSignTransaction: typeof cardanoSignTransaction;
3917
2479
  cardanoSignMessage: typeof cardanoSignMessage;
3918
- /**
3919
- * Filecoin function
3920
- */
3921
2480
  filecoinGetAddress: typeof filecoinGetAddress;
3922
2481
  filecoinSignTransaction: typeof filecoinSignTransaction;
3923
- /**
3924
- * Polkadot function
3925
- */
3926
2482
  polkadotGetAddress: typeof polkadotGetAddress;
3927
2483
  polkadotSignTransaction: typeof polkadotSignTransaction;
3928
- /**
3929
- * Kaspa function
3930
- */
3931
2484
  kaspaGetAddress: typeof kaspaGetAddress;
3932
2485
  kaspaSignTransaction: typeof kaspaSignTransaction;
3933
- /**
3934
- * nexa function
3935
- */
3936
2486
  nexaGetAddress: typeof nexaGetAddress;
3937
2487
  nexaSignTransaction: typeof nexaSignTransaction;
3938
- /**
3939
- * Nostr function
3940
- */
3941
2488
  nostrGetPublicKey: typeof nostrGetPublicKey;
3942
2489
  nostrSignEvent: typeof nostrSignEvent;
3943
2490
  nostrEncryptMessage: typeof nostrEncryptMessage;
3944
2491
  nostrDecryptMessage: typeof nostrDecryptMessage;
3945
2492
  nostrSignSchnorr: typeof nostrSignSchnorr;
3946
- /**
3947
- * Lightning Network
3948
- */
3949
2493
  lnurlAuth: typeof lnurlAuth;
3950
- /**
3951
- * Nervos Network
3952
- */
3953
2494
  nervosGetAddress: typeof nervosGetAddress;
3954
2495
  nervosSignTransaction: typeof nervosSignTransaction;
3955
- /**
3956
- * Dnx Network
3957
- */
3958
2496
  dnxGetAddress: typeof dnxGetAddress;
3959
2497
  dnxSignTransaction: typeof dnxSignTransaction;
3960
- /**
3961
- * TON Network
3962
- */
3963
2498
  tonGetAddress: typeof tonGetAddress;
3964
2499
  tonSignMessage: typeof tonSignMessage;
3965
2500
  tonSignProof: typeof tonSignProof;
3966
2501
  tonSignData: typeof tonSignData;
3967
- /**
3968
- * SCDO Network
3969
- */
3970
2502
  scdoGetAddress: typeof scdoGetAddress;
3971
2503
  scdoSignMessage: typeof scdoSignMessage;
3972
2504
  scdoSignTransaction: typeof scdoSignTransaction;
3973
- /**
3974
- * Alephium Network
3975
- */
3976
2505
  alephiumGetAddress: typeof alephiumGetAddress;
3977
2506
  alephiumSignMessage: typeof alephiumSignMessage;
3978
2507
  alephiumSignTransaction: typeof alephiumSignTransaction;
3979
- /**
3980
- * Benfen Network
3981
- */
3982
2508
  benfenGetAddress: typeof benfenGetAddress;
3983
2509
  benfenGetPublicKey: typeof benfenGetPublicKey;
3984
2510
  benfenSignTransaction: typeof benfenSignTransaction;
3985
2511
  benfenSignMessage: typeof benfenSignMessage;
3986
- /**
3987
- * Neo Network
3988
- */
3989
2512
  neoGetAddress: typeof neoGetAddress;
3990
2513
  neoSignTransaction: typeof neoSignTransaction;
3991
2514
  };
@@ -4060,13 +2583,11 @@ declare const DEVICE: {
4060
2583
  readonly PIN: "pin";
4061
2584
  readonly PASSPHRASE: "passphrase";
4062
2585
  readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
4063
- readonly ATTACH_PIN_ON_DEVICE: "attach_pin_on_device";
4064
2586
  readonly WORD: "word";
4065
2587
  readonly SUPPORT_FEATURES: "support_features";
4066
2588
  readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
4067
2589
  readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "select_device_for_switch_firmware_web_device";
4068
2590
  readonly FEATURES: "features";
4069
- readonly STATE: "state";
4070
2591
  };
4071
2592
  interface DeviceConnnectRequest {
4072
2593
  type: typeof DEVICE.CONNECT;
@@ -4085,9 +2606,6 @@ interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'
4085
2606
  }
4086
2607
  type PassphraseRequestPayload = {
4087
2608
  existsAttachPinUser?: boolean;
4088
- source?: 'wallet-session-coordinator';
4089
- reason?: 'open-wallet' | 'session-recovery';
4090
- expectedPassphraseState?: string;
4091
2609
  };
4092
2610
  interface DeviceButtonRequest {
4093
2611
  type: typeof DEVICE.BUTTON;
@@ -4100,10 +2618,6 @@ interface DeviceSendFeatures {
4100
2618
  type: typeof DEVICE.FEATURES;
4101
2619
  payload: DeviceFeaturesPayload;
4102
2620
  }
4103
- interface DeviceSendState {
4104
- type: typeof DEVICE.STATE;
4105
- payload: DeviceStateEvent;
4106
- }
4107
2621
  type DeviceSupportFeaturesPayload = SupportFeatures & {
4108
2622
  device: KnownDevice | null;
4109
2623
  };
@@ -4111,7 +2625,7 @@ interface DeviceSendSupportFeatures {
4111
2625
  type: typeof DEVICE.SUPPORT_FEATURES;
4112
2626
  payload: DeviceSupportFeaturesPayload;
4113
2627
  }
4114
- type DeviceEvent = DeviceButtonRequest | DeviceSendState | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
2628
+ type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
4115
2629
  type DeviceEventMessage = DeviceEvent & {
4116
2630
  event: typeof DEVICE_EVENT;
4117
2631
  };
@@ -4152,17 +2666,6 @@ declare const UI_REQUEST: {
4152
2666
  readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
4153
2667
  readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
4154
2668
  };
4155
- type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
4156
- type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
4157
- type ProtocolV2UiEventMetadata = {
4158
- source?: ProtocolV2UiEventSource;
4159
- reason?: string;
4160
- deviceOnly?: boolean;
4161
- completion?: ProtocolV2UiCompletion;
4162
- method?: string;
4163
- page?: string | number;
4164
- operation?: string;
4165
- };
4166
2669
  interface UiRequestWithoutPayload {
4167
2670
  type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.BLUETOOTH_UNSUPPORTED | typeof UI_REQUEST.BLUETOOTH_POWERED_OFF | typeof UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE | typeof UI_REQUEST.LOCATION_PERMISSION | typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION | typeof UI_REQUEST.FIRMWARE_PROCESSING | typeof UI_REQUEST.WEB_DEVICE_PROMPT_ACCESS_PERMISSION;
4168
2671
  payload?: typeof undefined;
@@ -4175,14 +2678,14 @@ interface UiRequestFirmwareProgressing {
4175
2678
  }
4176
2679
  type UiRequestDeviceAction = {
4177
2680
  type: typeof UI_REQUEST.REQUEST_PIN;
4178
- payload: ProtocolV2UiEventMetadata & {
2681
+ payload: {
4179
2682
  device: Device$1;
4180
2683
  type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
4181
2684
  };
4182
2685
  };
4183
2686
  interface UiRequestButton {
4184
2687
  type: typeof UI_REQUEST.REQUEST_BUTTON;
4185
- payload: DeviceButtonRequest['payload'] & ProtocolV2UiEventMetadata;
2688
+ payload: DeviceButtonRequest['payload'];
4186
2689
  }
4187
2690
  interface UiRequestPassphrase {
4188
2691
  type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
@@ -4190,9 +2693,6 @@ interface UiRequestPassphrase {
4190
2693
  device: Device$1;
4191
2694
  passphraseState?: string;
4192
2695
  existsAttachPinUser?: boolean;
4193
- source?: 'wallet-session-coordinator';
4194
- reason?: 'open-wallet' | 'session-recovery';
4195
- expectedPassphraseState?: string;
4196
2696
  };
4197
2697
  }
4198
2698
  interface UiRequestPassphraseOnDevice {
@@ -4200,8 +2700,6 @@ interface UiRequestPassphraseOnDevice {
4200
2700
  payload: {
4201
2701
  device: Device$1;
4202
2702
  passphraseState?: string;
4203
- source?: 'wallet-session-coordinator';
4204
- reason?: 'open-wallet' | 'session-recovery';
4205
2703
  };
4206
2704
  }
4207
2705
  interface UiRequestSelectDeviceInBootloaderForWebDevice {
@@ -4229,10 +2727,6 @@ interface FirmwareProgress {
4229
2727
  device: Device$1;
4230
2728
  progress: number;
4231
2729
  progressType: IFirmwareUpdateProgressType;
4232
- transferredBytes?: number;
4233
- totalBytes?: number;
4234
- rateBytesPerSecond?: number;
4235
- elapsedMs?: number;
4236
2730
  };
4237
2731
  }
4238
2732
  interface FirmwareTip {
@@ -4248,10 +2742,6 @@ interface DeviceProgress {
4248
2742
  type: typeof UI_REQUEST.DEVICE_PROGRESS;
4249
2743
  payload: {
4250
2744
  progress?: number;
4251
- transferredBytes?: number;
4252
- totalBytes?: number;
4253
- rateBytesPerSecond?: number;
4254
- elapsedMs?: number;
4255
2745
  };
4256
2746
  }
4257
2747
  interface PreviousAddressResult {
@@ -4303,7 +2793,6 @@ declare const IFRAME: {
4303
2793
  readonly INIT_BRIDGE: "iframe-init-bridge";
4304
2794
  readonly CALL: "iframe-call";
4305
2795
  readonly CANCEL: "iframe-cancel";
4306
- readonly CANCEL_OPERATION: "iframe-cancel-operation";
4307
2796
  readonly SWITCH_TRANSPORT: "iframe-switch-transport";
4308
2797
  readonly CALLBACK: "iframe-callback";
4309
2798
  };
@@ -4372,13 +2861,6 @@ interface IFrameCancelMessage {
4372
2861
  connectId?: string;
4373
2862
  };
4374
2863
  }
4375
- interface IFrameCancelOperationMessage {
4376
- event: typeof IFRAME.CANCEL_OPERATION;
4377
- type: typeof IFRAME.CANCEL_OPERATION;
4378
- payload: {
4379
- operationId: string;
4380
- };
4381
- }
4382
2864
  interface IFrameSwitchTransportMessage {
4383
2865
  event: typeof IFRAME.SWITCH_TRANSPORT;
4384
2866
  type: typeof IFRAME.SWITCH_TRANSPORT;
@@ -4505,13 +2987,231 @@ declare const CORE_EVENT = "CORE_EVENT";
4505
2987
  type CoreMessage = {
4506
2988
  id?: string;
4507
2989
  success?: true | false;
4508
- } & (IFrameEventMessage | IFrameCallMessage | IFrameCancelMessage | IFrameCancelOperationMessage | IFrameSwitchTransportMessage | IFrameCallbackMessage | UiResponseMessage | UiEventMessage | DeviceEventMessage | LogEventMessage | FirmwareMessage);
2990
+ } & (IFrameEventMessage | IFrameCallMessage | IFrameCancelMessage | IFrameSwitchTransportMessage | IFrameCallbackMessage | UiResponseMessage | UiEventMessage | DeviceEventMessage | LogEventMessage | FirmwareMessage);
4509
2991
  type PostMessageEvent = MessageEvent<any>;
4510
2992
  declare const parseMessage: (messageData: any) => CoreMessage;
4511
2993
  declare const createErrorMessage: (error: Error & {
4512
2994
  code?: string | number;
4513
2995
  }) => Unsuccessful;
4514
2996
 
2997
+ type PassphrasePromptResponse = {
2998
+ passphrase?: string;
2999
+ passphraseOnDevice?: boolean;
3000
+ attachPinOnDevice?: boolean;
3001
+ cache?: boolean;
3002
+ };
3003
+ type MessageType = Messages.MessageType;
3004
+ type MessageKey = keyof MessageType;
3005
+ type TypedResponseMessage<T extends MessageKey> = {
3006
+ type: T;
3007
+ message: MessageType[T];
3008
+ };
3009
+ type TypedCallResponseMap = {
3010
+ [K in keyof MessageType]: TypedResponseMessage<K>;
3011
+ };
3012
+ type DefaultMessageResponse = TypedCallResponseMap[keyof MessageType];
3013
+ declare class DeviceCommands {
3014
+ instanceId: string;
3015
+ currentResponseID?: number;
3016
+ device: Device;
3017
+ transport: Transport;
3018
+ mainId: string;
3019
+ disposed: boolean;
3020
+ callPromise?: Promise<DefaultMessageResponse>;
3021
+ constructor(device: Device, mainId: string);
3022
+ dispose(_cancelRequest: boolean): Promise<void>;
3023
+ checkDisposed(): void;
3024
+ cancelDeviceOnOneKeyDevice(): Promise<{
3025
+ readonly success: false;
3026
+ readonly error: 800;
3027
+ readonly payload: {
3028
+ readonly message: "Device disconnected or acquired by someone else";
3029
+ };
3030
+ } | {
3031
+ success: boolean;
3032
+ error: null;
3033
+ payload: {
3034
+ message: string;
3035
+ };
3036
+ } | {
3037
+ success: boolean;
3038
+ error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 900 | 901 | 902;
3039
+ payload: {
3040
+ message: string;
3041
+ };
3042
+ } | undefined>;
3043
+ cancelDevice(): Promise<{
3044
+ readonly success: false;
3045
+ readonly error: 800;
3046
+ readonly payload: {
3047
+ readonly message: "Device disconnected or acquired by someone else";
3048
+ };
3049
+ } | {
3050
+ success: boolean;
3051
+ error: null;
3052
+ payload: {
3053
+ message: string;
3054
+ };
3055
+ } | {
3056
+ success: boolean;
3057
+ error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 900 | 901 | 902;
3058
+ payload: {
3059
+ message: string;
3060
+ };
3061
+ } | undefined>;
3062
+ cancel(): Promise<void>;
3063
+ call(type: MessageKey, msg?: DefaultMessageResponse['message']): Promise<DefaultMessageResponse>;
3064
+ typedCall<T extends MessageKey, R extends MessageKey[]>(type: T, resType: R, msg?: MessageType[T]): Promise<TypedCallResponseMap[R[number]]>;
3065
+ typedCall<T extends MessageKey, R extends MessageKey>(type: T, resType: R, msg?: MessageType[T]): Promise<TypedResponseMessage<R>>;
3066
+ _commonCall(type: MessageKey, msg?: DefaultMessageResponse['message']): Promise<DefaultMessageResponse>;
3067
+ _filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey): Promise<DefaultMessageResponse>;
3068
+ _promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
3069
+ _promptPassphrase(options: PassphraseRequestPayload): Promise<PassphrasePromptResponse>;
3070
+ }
3071
+
3072
+ type DeviceDescriptorDiff = {
3073
+ didUpdate: boolean;
3074
+ connected: OneKeyDeviceInfo[];
3075
+ disconnected: OneKeyDeviceInfo[];
3076
+ changedSessions: OneKeyDeviceInfo[];
3077
+ changedDebugSessions: OneKeyDeviceInfo[];
3078
+ acquired: OneKeyDeviceInfo[];
3079
+ debugAcquired: OneKeyDeviceInfo[];
3080
+ released: OneKeyDeviceInfo[];
3081
+ debugReleased: OneKeyDeviceInfo[];
3082
+ descriptors: OneKeyDeviceInfo[];
3083
+ };
3084
+
3085
+ declare class DeviceConnector {
3086
+ transport: Transport;
3087
+ listenTimestamp: number;
3088
+ current: OneKeyDeviceInfo[] | null;
3089
+ upcoming: OneKeyDeviceInfo[];
3090
+ listening: boolean;
3091
+ constructor();
3092
+ enumerate(): Promise<DeviceDescriptorDiff | undefined>;
3093
+ listen(): Promise<void>;
3094
+ stop(): void;
3095
+ acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean): Promise<string | undefined>;
3096
+ release(session: string, onclose: boolean): Promise<void>;
3097
+ disconnect(session: string | undefined | null): Promise<void>;
3098
+ promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
3099
+ _reportDevicesChange(): void;
3100
+ }
3101
+
3102
+ type InitOptions = {
3103
+ initSession?: boolean;
3104
+ deviceId?: string;
3105
+ passphraseState?: string;
3106
+ deriveCardano?: boolean;
3107
+ };
3108
+ type RunOptions = {
3109
+ keepSession?: boolean;
3110
+ skipInitialize?: boolean;
3111
+ } & InitOptions;
3112
+ interface DeviceEvents {
3113
+ [DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
3114
+ [DEVICE.PASSPHRASE_ON_DEVICE]: [Device, ((response: any) => void)?];
3115
+ [DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
3116
+ [DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
3117
+ [DEVICE.PASSPHRASE]: [
3118
+ Device,
3119
+ PassphraseRequestPayload,
3120
+ (response: PassphrasePromptResponse, error?: Error) => void
3121
+ ];
3122
+ [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
3123
+ Device,
3124
+ (err: any, deviceId: string) => void
3125
+ ];
3126
+ [DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
3127
+ Device,
3128
+ (err: any, deviceId: string) => void
3129
+ ];
3130
+ }
3131
+ declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
3132
+ interface Device {
3133
+ on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
3134
+ off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
3135
+ emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
3136
+ }
3137
+ declare class Device extends EventEmitter$1 {
3138
+ originalDescriptor: OneKeyDeviceInfo;
3139
+ sdkInstanceId?: string;
3140
+ instanceId: string;
3141
+ createdAt: number;
3142
+ mainId?: string | null;
3143
+ deviceConnector?: DeviceConnector | null;
3144
+ commands: DeviceCommands;
3145
+ private cancelableAction?;
3146
+ private deviceAcquired;
3147
+ features: Features | undefined;
3148
+ featuresNeedsReload: boolean;
3149
+ runPromise?: Deferred<void> | null;
3150
+ externalState: string[];
3151
+ unavailableCapabilities: UnavailableCapabilities;
3152
+ instance: number;
3153
+ internalState: string[];
3154
+ needReloadDevice: boolean;
3155
+ keepSession: boolean;
3156
+ passphraseState: string | undefined;
3157
+ pendingCallbackPromise?: Deferred<void>;
3158
+ private preInitializedAt?;
3159
+ private preInitializeMeta?;
3160
+ private lastInitializeDurationMs?;
3161
+ constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
3162
+ static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
3163
+ toMessageObject(): Device$1 | null;
3164
+ connect(): Promise<boolean>;
3165
+ acquire(): Promise<void>;
3166
+ release(): Promise<void>;
3167
+ preInitialize(initOptions?: InitOptions): Promise<void>;
3168
+ markPreInitialized(meta?: {
3169
+ passphraseState?: string;
3170
+ }): void;
3171
+ clearPreInitialized(): void;
3172
+ isPreInitializeMetaMatch(payload?: {
3173
+ passphraseState?: string;
3174
+ }): boolean;
3175
+ isPreInitializedValid(ttlMs: number): boolean;
3176
+ setLastInitializeDuration(durationMs: number): void;
3177
+ getLastInitializeDuration(): number | undefined;
3178
+ getCommands(): DeviceCommands;
3179
+ private generateStateKey;
3180
+ getInternalState(_deviceId?: string): string | undefined;
3181
+ updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string, sessionId?: string | null, featuresSessionId?: string | null): void;
3182
+ private setInternalState;
3183
+ clearInternalState(_deviceId?: string): void;
3184
+ initialize(options?: InitOptions): Promise<void>;
3185
+ getFeatures(): Promise<void>;
3186
+ _updateFeatures(feat: Features, initSession?: boolean): void;
3187
+ updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
3188
+ updateFromCache(device: Device): void;
3189
+ run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
3190
+ _runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
3191
+ interruptionFromOutside(): Promise<void>;
3192
+ interruptionFromUser(): Promise<void>;
3193
+ setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
3194
+ clearCancelableAction(): void;
3195
+ getMode(): EOneKeyDeviceMode;
3196
+ getFirmwareVersion(): IVersionArray | null;
3197
+ getBLEFirmwareVersion(): IVersionArray | null;
3198
+ isUsed(): boolean;
3199
+ hasDeviceAcquire(): boolean;
3200
+ isUsedHere(): boolean;
3201
+ isUsedElsewhere(): boolean;
3202
+ isBootloader(): boolean | undefined;
3203
+ isInitialized(): boolean | undefined;
3204
+ isSeedless(): boolean | undefined;
3205
+ isUnacquired(): boolean;
3206
+ hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
3207
+ hasUsePassphrase(): boolean | undefined;
3208
+ checkDeviceId(deviceId: string): boolean;
3209
+ lockDevice(): Promise<_onekeyfe_hd_transport.Success>;
3210
+ supportUnlockVersionRange(): DeviceFirmwareRange;
3211
+ unlockDevice(): Promise<_onekeyfe_hd_transport.Features>;
3212
+ checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
3213
+ }
3214
+
4515
3215
  type UiPromiseResponse = UiResponseEvent | {
4516
3216
  type: typeof DEVICE.DISCONNECT;
4517
3217
  payload?: undefined;
@@ -4521,20 +3221,18 @@ type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromise
4521
3221
  }>, T, Device>;
4522
3222
 
4523
3223
  declare const LogBlockEvent: Set<string>;
4524
- declare function getLogBlockLabel(message: unknown): string | undefined;
4525
3224
 
4526
3225
  declare const executeCallback: (id: string, ...args: any[]) => void;
4527
3226
  declare const cleanupCallback: (id: string) => void;
4528
3227
 
4529
3228
  interface InjectApi {
4530
3229
  call: CallMethod;
4531
- eventEmitter: EventEmitter$1;
3230
+ eventEmitter: EventEmitter;
4532
3231
  init: CoreApi['init'];
4533
3232
  updateSettings: CoreApi['updateSettings'];
4534
3233
  dispose: CoreApi['dispose'];
4535
3234
  uiResponse: CoreApi['uiResponse'];
4536
3235
  cancel: CoreApi['cancel'];
4537
- cancelOperation: CoreApi['cancelOperation'];
4538
3236
  switchTransport: CoreApi['switchTransport'];
4539
3237
  }
4540
3238
 
@@ -4543,6 +3241,24 @@ interface TopLevelInjectApi {
4543
3241
  call: CoreApi['call'];
4544
3242
  }
4545
3243
 
3244
+ declare class Core extends EventEmitter$1 {
3245
+ private tracingContext;
3246
+ readonly sdkInstanceId: string;
3247
+ private requestQueue;
3248
+ private prePendingCallPromise;
3249
+ private methodSynchronize;
3250
+ constructor();
3251
+ private getCoreContext;
3252
+ handleMessage(message: CoreMessage): Promise<any>;
3253
+ dispose(): void;
3254
+ }
3255
+ declare const init: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
3256
+ declare const switchTransport: ({ env, Transport, plugin, }: {
3257
+ env: ConnectSettings['env'];
3258
+ Transport: any;
3259
+ plugin?: LowlevelTransportSharedPlugin | undefined;
3260
+ }) => void;
3261
+
4546
3262
  type LogMessage = {
4547
3263
  level: string;
4548
3264
  prefix: string;
@@ -4587,13 +3303,9 @@ declare enum LoggerNames {
4587
3303
  declare const getLogger: (key: LoggerNames) => Log;
4588
3304
 
4589
3305
  type HttpRequestOptions = {
4590
- /** Axios adapter-defined request timeout retained for existing opt-in callers. */
4591
3306
  timeoutMs?: number;
4592
- /** Deadline for DNS, connection, TLS, redirects, and the first response-body progress. */
4593
3307
  connectTimeoutMs?: number;
4594
- /** Maximum idle interval between response-body progress events. */
4595
3308
  readTimeoutMs?: number;
4596
- /** Wall-clock deadline across all attempts and retry backoff. */
4597
3309
  overallTimeoutMs?: number;
4598
3310
  maxRetries?: number;
4599
3311
  retryDelayMs?: number;
@@ -4602,121 +3314,78 @@ type HttpRequestOptions = {
4602
3314
  declare const httpRequest: (url: string, type: string, options?: HttpRequestOptions) => any;
4603
3315
  declare const getTimeStamp: () => number;
4604
3316
 
4605
- /**
4606
- * Validates version string
4607
- * @param {string} version Version string
4608
- * @returns {boolean} True if version string is valid, false if not
4609
- */
4610
3317
  declare const isValidVersionString: (version: string) => boolean;
4611
- /**
4612
- * Validates a version array
4613
- * @param {number[]} version Version array
4614
- * @returns {boolean} True if version array is valid, false if not
4615
- */
4616
3318
  declare const isValidVersionArray: (version: number[]) => boolean;
4617
- /**
4618
- * Fills the missing version numbers with zeros (ie: [1, 2] will become [1, 2, 0])
4619
- * @param {number[]} version Version array
4620
- * @returns {number[]} Version array with all positions filled
4621
- */
4622
3319
  declare const normalizeVersionArray: (version: number[]) => number[];
4623
- /**
4624
- * Returns a valid version array from a version string
4625
- * @param {string} version Version string
4626
- * @returns {number[]} Version array
4627
- */
4628
3320
  declare const versionSplit: (version: string) => number[];
4629
- /**
4630
- * Compares two versions and returns if the version is newer (1), older (-1) or equal (0).
4631
- * @param {string | number[]} a Version to compare from
4632
- * @param {string | number[]} b Version to compare with
4633
- * @returns {number} Returns 1 if newer, -1 if older and 0 if equal
4634
- */
4635
- declare const versionCompare: (a: string | number[], b: string | number[]) => 1 | 0 | -1;
4636
-
4637
- declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceStatus"> | TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"DeviceFirmwareUpdateStatus"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoDRep"> | TypedResponseMessage<"CardanoCVoteRegistrationDelegation"> | TypedResponseMessage<"CardanoCVoteRegistrationParametersType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"DnxTxKey"> | TypedResponseMessage<"DnxComputedKeyImage"> | TypedResponseMessage<"EmmcFile"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMemberOneKey"> | TypedResponseMessage<"EthereumFieldTypeOneKey"> | TypedResponseMessage<"EthereumDefinitions"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessListOneKey"> | TypedResponseMessage<"EthereumAuthorizationOneKey"> | TypedResponseMessage<"EthereumAuthorizationSignature"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"KaspaTxRequestSignature"> | TypedResponseMessage<"KaspaOutpoint"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"SolanaTxATADetails"> | TypedResponseMessage<"SolanaTxExtraInfo"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"CoinJoinRequest"> | TypedResponseMessage<"PaymentRequestMemo"> | TypedResponseMessage<"TextMemo"> | TypedResponseMessage<"RefundMemo"> | TypedResponseMessage<"CoinPurchaseMemo"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"ViewRawData"> | TypedResponseMessage<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"DeviceHostPassphrase"> | TypedResponseMessage<"DevicePassphraseOnDevice"> | TypedResponseMessage<"DeviceAttachPinOnDevice"> | TypedResponseMessage<"DeviceSessionResume"> | TypedResponseMessage<"DeviceWalletSelect"> | TypedResponseMessage<"DevOnboardingSetupStatus"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaTxRequest"> | TypedResponseMessage<"KaspaTxAckInput"> | TypedResponseMessage<"KaspaTxAckOutput"> | TypedResponseMessage<"KaspaTxAckPayloadChunk"> | TypedResponseMessage<"KaspaTxAckPrevMeta"> | TypedResponseMessage<"KaspaTxAckPrevInput"> | TypedResponseMessage<"KaspaTxAckPrevOutput"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"BlurRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarInvokeHostFunctionOp"> | TypedResponseMessage<"StellarSorobanDataRequest"> | TypedResponseMessage<"StellarSorobanDataAck"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TonSignData"> | TypedResponseMessage<"TonSignedData"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry"> | TypedResponseMessage<"experimental_message"> | TypedResponseMessage<"experimental_field"> | TypedResponseMessage<"TxAckPaymentRequest"> | TypedResponseMessage<"EthereumSignTypedDataQR"> | TypedResponseMessage<"InternalMyAddressRequest"> | TypedResponseMessage<"StartSession"> | TypedResponseMessage<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"SetWallpaper"> | TypedResponseMessage<"GetWallpaper"> | TypedResponseMessage<"Wallpaper"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage"> | TypedResponseMessage<"ProtocolInfoRequest"> | TypedResponseMessage<"ProtocolInfo"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DeviceSettingsGet"> | TypedResponseMessage<"DeviceSettingsSet"> | TypedResponseMessage<"DeviceSettingsPageShow"> | TypedResponseMessage<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionOpen"> | TypedResponseMessage<"DeviceSessionAskPin"> | TypedResponseMessage<"DeviceStatusGet"> | TypedResponseMessage<"DevGetOnboardingStatus"> | TypedResponseMessage<"DevOnboardingStatus"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"PortfolioUpdate">;
4638
-
4639
- type DeviceFeaturesInput = Features | Messages.Features;
4640
-
4641
- /**
4642
- * get device type by features
4643
- */
4644
- declare const getDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
4645
- /**
4646
- * get device type by ble name
4647
- * @param name Ble name
4648
- */
3321
+ declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
3322
+
3323
+ declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoDRep"> | TypedResponseMessage<"CardanoCVoteRegistrationDelegation"> | TypedResponseMessage<"CardanoCVoteRegistrationParametersType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"DnxTxKey"> | TypedResponseMessage<"DnxComputedKeyImage"> | TypedResponseMessage<"EmmcFile"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMemberOneKey"> | TypedResponseMessage<"EthereumFieldTypeOneKey"> | TypedResponseMessage<"EthereumDefinitions"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessListOneKey"> | TypedResponseMessage<"EthereumAuthorizationOneKey"> | TypedResponseMessage<"EthereumAuthorizationSignature"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"KaspaTxRequestSignature"> | TypedResponseMessage<"KaspaOutpoint"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"SolanaTxATADetails"> | TypedResponseMessage<"SolanaTxExtraInfo"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaTxRequest"> | TypedResponseMessage<"KaspaTxAckInput"> | TypedResponseMessage<"KaspaTxAckOutput"> | TypedResponseMessage<"KaspaTxAckPayloadChunk"> | TypedResponseMessage<"KaspaTxAckPrevMeta"> | TypedResponseMessage<"KaspaTxAckPrevInput"> | TypedResponseMessage<"KaspaTxAckPrevOutput"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"BlurRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarInvokeHostFunctionOp"> | TypedResponseMessage<"StellarSorobanDataRequest"> | TypedResponseMessage<"StellarSorobanDataAck"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TonSignData"> | TypedResponseMessage<"TonSignedData"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry">;
3324
+
3325
+ declare function generateSdkInstanceId(): string;
3326
+ declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
3327
+ interface RequestContext {
3328
+ responseID: number;
3329
+ sdkInstanceId?: string;
3330
+ methodName: string;
3331
+ connectId?: string;
3332
+ deviceInstanceId?: string;
3333
+ commandsInstanceId?: string;
3334
+ parentResponseID?: number;
3335
+ startTime: number;
3336
+ endTime?: number;
3337
+ status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
3338
+ error?: string;
3339
+ }
3340
+ interface SdkTracingContext {
3341
+ sdkInstanceId: string;
3342
+ createdAt: number;
3343
+ activeRequests: Map<number, RequestContext>;
3344
+ }
3345
+ declare function createSdkTracingContext(): SdkTracingContext;
3346
+ declare function createRequestContext(responseID: number, methodName: string, options?: {
3347
+ sdkInstanceId?: string;
3348
+ connectId?: string;
3349
+ deviceInstanceId?: string;
3350
+ commandsInstanceId?: string;
3351
+ parentResponseID?: number;
3352
+ }): RequestContext;
3353
+ declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
3354
+ declare function completeRequestContext(responseID: number, error?: Error): void;
3355
+ declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
3356
+ declare function formatRequestContext(context: RequestContext): string;
3357
+ declare function cleanupSdkInstance(sdkInstanceId: string): void;
3358
+
3359
+ declare const getDeviceType: (features?: Features) => IDeviceType;
4649
3360
  declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
4650
- /**
4651
- * Get Connected Device ble name by features
4652
- * @returns
4653
- */
4654
- declare const getDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
4655
- /**
4656
- * Get Connected Device serial number by features
4657
- */
4658
- declare const getDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
4659
- /**
4660
- * @deprecated Use getDeviceSerialNo instead.
4661
- */
4662
- declare const getDeviceUUID: (features?: DeviceFeaturesInput) => string;
4663
- /**
4664
- * Get Connected Device label by features
4665
- */
4666
- declare const getDeviceLabel: (features?: DeviceFeaturesInput) => string | null;
4667
- /**
4668
- * Get firmware version range by features
4669
- * Type has a higher priority than Model
4670
- */
4671
- declare const getMethodVersionRange: (features: DeviceFeaturesInput | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
4672
- declare const isMethodVersionRangeUnsupported: (versionRange?: IVersionRange) => boolean;
4673
- declare const getFirmwareType: (features?: DeviceFeaturesInput) => _onekeyfe_hd_shared.EFirmwareType;
4674
-
4675
- /**
4676
- * Get Connected Device version by features
4677
- */
4678
- declare const getDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4679
- /**
4680
- * Get Connected Device bootloader version by features
4681
- */
4682
- declare const getDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4683
- /**
4684
- * Get Connected Device boardloader/romloader version by features
4685
- */
4686
- declare const getDeviceBoardloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4687
- /**
4688
- * Get Connected Device bluetooth firmware version by features
4689
- */
4690
- declare const getDeviceBLEFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4691
-
4692
- declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v1", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
3361
+ declare const getDeviceBleName: (features?: Features) => string | null;
3362
+ declare const getDeviceUUID: (features: Features) => string;
3363
+ declare const getDeviceLabel: (features?: Features) => string | null;
3364
+ declare const getMethodVersionRange: (features: Features | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
3365
+ declare const getFirmwareType: (features: Features | undefined) => EFirmwareType;
3366
+
3367
+ declare const getDeviceFirmwareVersion: (features: Features | undefined) => IVersionArray;
3368
+ declare const getDeviceBLEFirmwareVersion: (features: Features) => IVersionArray;
3369
+ declare const getDeviceBootloaderVersion: (features: Features | undefined) => IVersionArray;
3370
+ declare const getDeviceBoardloaderVersion: (features: Features) => IVersionArray;
3371
+
3372
+ declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
4693
3373
  type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
4694
- type ProtocolV1MessageSchema = 'v1CurrentSchema' | 'v1LegacySchema';
4695
- type ProtobufMessageSchema = ProtocolV1MessageSchema | 'v2Schema';
3374
+ type MessageVersion = 'latest' | 'v1';
4696
3375
  declare class DataManager {
4697
- static deviceMap: DeviceTypeMap & {
4698
- [k: string]: DeviceTypeMap[keyof DeviceTypeMap] | undefined;
4699
- };
3376
+ static deviceMap: DeviceTypeMap;
4700
3377
  static assets: AssetsMap | null;
4701
3378
  static settings: ConnectSettings;
4702
3379
  static messages: {
4703
- [schema in ProtobufMessageSchema]: JSON;
3380
+ [version in MessageVersion]: JSON;
4704
3381
  };
4705
3382
  static lastCheckTimestamp: number;
4706
3383
  static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
4707
- /**
4708
- * Touch、Pro System UI Resource Update
4709
- * ** Interval upgrade is not considered **
4710
- */
4711
3384
  static getSysResourcesLatestRelease: ({ features, forcedUpdateRes, firmwareType, }: {
4712
3385
  features: Features;
4713
3386
  forcedUpdateRes?: boolean | undefined;
4714
3387
  firmwareType: EFirmwareType;
4715
3388
  }) => string | undefined;
4716
- /**
4717
- * Touch、Pro System full UI Resource Update
4718
- * ** Interval upgrade is not considered **
4719
- */
4720
3389
  static getSysFullResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
4721
3390
  static getBootloaderResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
4722
3391
  static getBootloaderTargetVersion: (features: Features, firmwareType: EFirmwareType) => IVersionArray | undefined;
@@ -4739,34 +3408,23 @@ declare class DataManager {
4739
3408
  } | undefined;
4740
3409
  private static enrichFirmwareReleaseInfo;
4741
3410
  static load(settings: ConnectSettings): Promise<void>;
4742
- private static applyRemoteConfig;
4743
3411
  static updateEnv(newEnv: ConnectSettings['env']): void;
4744
3412
  static checkAndReloadData(): Promise<void>;
4745
- static getProtobufMessages(schema?: ProtobufMessageSchema): JSON;
3413
+ static getProtobufMessages(messageVersion?: MessageVersion): JSON;
4746
3414
  static getSettings(key?: undefined): ConnectSettings;
4747
3415
  static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
4748
3416
  static isBleConnect: (env: ConnectSettings['env']) => boolean;
4749
- /** Desktop WebUSB doesn't need browser permission prompt */
4750
3417
  static isDesktopWebUsb: (env: ConnectSettings['env']) => boolean;
4751
- /** Browser WebUSB needs permission prompt */
4752
3418
  static isBrowserWebUsb: (env: ConnectSettings['env']) => boolean;
4753
3419
  }
4754
3420
 
4755
- declare const supportInputPinOnSoftware: (features?: Features) => SupportFeatureType;
4756
- /**
4757
- * Since 3.5.0, Touch uses the firmware-v3 field to get firmware release info
4758
- */
3421
+ declare const supportInputPinOnSoftware: (features: Features) => SupportFeatureType;
4759
3422
  declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, firmwareType, }: {
4760
3423
  features: Features;
4761
3424
  updateType: 'firmware' | 'ble';
4762
3425
  targetVersion?: string | undefined;
4763
3426
  firmwareType: EFirmwareType;
4764
3427
  }) => 'ble' | IFirmwareField;
4765
- /**
4766
- * Returns the optional firmware version
4767
- * Used in firmware web update
4768
- * https://firmware.onekey.so/
4769
- */
4770
3428
  declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('ble' | IFirmwareField)[];
4771
3429
 
4772
3430
  declare function checkNeedUpdateBootForTouch(features: Features, firmwareType: EFirmwareType): boolean;
@@ -4821,12 +3479,8 @@ declare const getEnv: () => "web" | "webextension" | "electron" | "react-native"
4821
3479
  declare const corsValidator: (url?: string) => string | undefined;
4822
3480
  declare const parseConnectSettings: (input?: Partial<ConnectSettings>) => ConnectSettings;
4823
3481
 
4824
- declare const registerFirmwareUpdateHostBinding: (binding: FirmwareUpdateHostBinding) => number;
4825
- declare const unregisterFirmwareUpdateHostBinding: (generation?: number) => boolean;
4826
- declare const getFirmwareUpdateHostBindingGeneration: () => number;
4827
-
4828
- declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, cancelOperation, updateSettings, switchTransport, }: InjectApi) => CoreApi;
4829
- declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, cancelOperation, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
3482
+ declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, updateSettings, switchTransport, }: InjectApi) => CoreApi;
3483
+ declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
4830
3484
  declare const HardwareTopLevelSdk: () => CoreApi;
4831
3485
 
4832
- export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllFirmwareRelease, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, ClearSessionCacheParams, ClearSessionCachePayload, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesRawPatch, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendState, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceState, DeviceStateEvent, DeviceStateIdentity, DeviceStateMode, DeviceStatePatch, DeviceStateProtocol, DeviceStateScope, DeviceStateSection, DeviceStateSettings, DeviceStateStatus, DeviceStateUpdateSource, DeviceStateVersions, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareArtifactReader, FirmwareArtifactReference, FirmwareCheckpoint, FirmwareCheckpointParams, FirmwareCheckpointSink, FirmwareCheckpointStage, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateArtifactParams, FirmwareUpdateBinaryParams, FirmwareUpdateCapabilities, FirmwareUpdateHostBinding, FirmwareUpdateParams, FirmwareUpdatePlan, FirmwareUpdatePlanArtifact, FirmwareUpdatePlanArtifactRole, FirmwareUpdatePlanEpoch, FirmwareUpdatePlanEpochKind, FirmwareUpdatePlanTarget, FirmwareUpdatePreparedArtifact, FirmwareUpdatePreparedArtifactInput, FirmwareUpdatePreparedEntry, FirmwareUpdatePreparedPlan, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4Params, FirmwareUpdateV4Target, GetDeviceStateParams, GetPassphraseStateParams, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameCancelOperationMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceBundle, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, NormalizedFeatures, OnekeyFeatures, OpenWalletSessionParams, OpenWalletSessionPayload, PRO2_WALLPAPER_HEIGHT, PRO2_WALLPAPER_WIDTH, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, Pro2WallpaperColorFormat, ProtocolV2UiCompletion, ProtocolV2UiEventMetadata, ProtocolV2UiEventSource, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TonAddress, TonGetAddressParams, TonSignDataParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceForSwitchFirmwareWebDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceForSwitchFirmwareWebDevice, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, cleanupSdkInstance, completeRequestContext, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createRequestContext, createResponseMessage, createSdkTracingContext, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, encodePro2Wallpaper, executeCallback, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceSerialNo, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getFirmwareUpdateHostBindingGeneration, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogBlockLabel, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init$1 as initCore, isBleConnect, isMethodVersionRangeUnsupported, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, registerFirmwareUpdateHostBinding, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, unregisterFirmwareUpdateHostBinding, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
3486
+ export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllFirmwareRelease, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesPayload, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, OnekeyFeatures, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TonAddress, TonGetAddressParams, TonSignDataParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceForSwitchFirmwareWebDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceForSwitchFirmwareWebDevice, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, cleanupSdkInstance, completeRequestContext, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createRequestContext, createResponseMessage, createSdkTracingContext, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, executeCallback, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init as initCore, isBleConnect, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };