@onekeyfe/hd-core 1.2.0-alpha.6 → 1.2.0-alpha.61

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 (734) hide show
  1. package/__tests__/AllNetworkGetAddressBase.tracing.test.ts +390 -0
  2. package/__tests__/DeviceCommands.test.ts +563 -0
  3. package/__tests__/DeviceEventRegistration.test.ts +49 -0
  4. package/__tests__/chain-params-onekey-compatibility.test.ts +229 -0
  5. package/__tests__/check-all-firmware-release-protocol-v2.test.ts +477 -0
  6. package/__tests__/connectSettings.test.ts +19 -0
  7. package/__tests__/core-dispose.test.ts +34 -0
  8. package/__tests__/core-error-output.test.ts +39 -0
  9. package/__tests__/core-initialization.test.ts +23 -0
  10. package/__tests__/device-connector-protocol.test.ts +81 -0
  11. package/__tests__/device-features-state.test.ts +78 -0
  12. package/__tests__/device-identity.test.ts +52 -0
  13. package/__tests__/device-lifecycle-events.test.ts +351 -0
  14. package/__tests__/device-pool-state.test.ts +166 -0
  15. package/__tests__/device-settings.test.ts +437 -0
  16. package/__tests__/device-state-contract.test.ts +28 -0
  17. package/__tests__/device-state-events.test.ts +286 -0
  18. package/__tests__/device-state-mapper.test.ts +273 -0
  19. package/__tests__/device-state-projector.test.ts +94 -0
  20. package/__tests__/device-state-store.test.ts +82 -0
  21. package/__tests__/device-utils.test.ts +154 -0
  22. package/__tests__/device-wallet-session-store.test.ts +478 -0
  23. package/__tests__/deviceFeaturesUtils.test.ts +39 -0
  24. package/__tests__/deviceSettings.test.ts +113 -0
  25. package/__tests__/deviceUploadNft.test.ts +316 -0
  26. package/__tests__/evmLedgerLegacySafety.test.ts +12 -6
  27. package/__tests__/evmSignTransaction.test.ts +69 -0
  28. package/__tests__/evmSignTypedData.test.ts +80 -0
  29. package/__tests__/filesystemValidation.test.ts +53 -0
  30. package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +402 -0
  31. package/__tests__/get-device-state.test.ts +578 -0
  32. package/__tests__/homescreen.test.ts +64 -0
  33. package/__tests__/kaspa-public-types.type-test.ts +16 -0
  34. package/__tests__/kaspa-use-tweak-pro2.test.ts +20 -0
  35. package/__tests__/kaspaSignTransaction.test.ts +578 -0
  36. package/__tests__/known-device-public-types.type-test.ts +3 -0
  37. package/__tests__/logBlockEvent.test.ts +128 -1
  38. package/__tests__/method-protocol-support.test.ts +132 -0
  39. package/__tests__/networkUtils.test.ts +406 -0
  40. package/__tests__/open-wallet-session-error-response.test.ts +43 -0
  41. package/__tests__/open-wallet-session.test.ts +1899 -0
  42. package/__tests__/pro2Nft.test.ts +108 -0
  43. package/__tests__/pro2Wallpaper.test.ts +39 -0
  44. package/__tests__/protocol-binding.test.ts +89 -0
  45. package/__tests__/protocol-v2-bootloader-mode.test.ts +37 -0
  46. package/__tests__/protocol-v2-firmware-targets.test.ts +37 -0
  47. package/__tests__/protocol-v2-ping.test.ts +28 -0
  48. package/__tests__/protocol-v2-resources.test.ts +340 -0
  49. package/__tests__/protocol-v2-ui-lifecycle.test.ts +91 -0
  50. package/__tests__/protocol-v2-unlock-policy.test.ts +245 -0
  51. package/__tests__/protocol-v2.test.ts +6478 -2536
  52. package/__tests__/protocolV2FileWrite.test.ts +244 -0
  53. package/__tests__/protocolV2UiInteraction.test.ts +329 -0
  54. package/__tests__/public-device-state-api.test.ts +275 -0
  55. package/__tests__/public-pro2-api-boundary.test.ts +107 -0
  56. package/__tests__/refresh-device-state.test.ts +101 -0
  57. package/__tests__/request-context-logging.test.ts +16 -0
  58. package/__tests__/search-devices.test.ts +145 -0
  59. package/__tests__/tron-sign-message-init.test.ts +74 -0
  60. package/__tests__/uiProgressThrottle.test.ts +74 -0
  61. package/__tests__/uiPromiseRegistry.test.ts +115 -0
  62. package/dist/api/BaseMethod.d.ts +16 -1
  63. package/dist/api/BaseMethod.d.ts.map +1 -1
  64. package/dist/api/CheckAllFirmwareRelease.d.ts +25 -1
  65. package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
  66. package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
  67. package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
  68. package/dist/api/CipherKeyValue.d.ts +1 -0
  69. package/dist/api/CipherKeyValue.d.ts.map +1 -1
  70. package/dist/api/ClearSessionCache.d.ts +9 -0
  71. package/dist/api/ClearSessionCache.d.ts.map +1 -0
  72. package/dist/api/DetectDeviceConnectProtocol.d.ts +7 -0
  73. package/dist/api/DetectDeviceConnectProtocol.d.ts.map +1 -0
  74. package/dist/api/DirList.d.ts +1 -0
  75. package/dist/api/DirList.d.ts.map +1 -1
  76. package/dist/api/DirMake.d.ts +1 -0
  77. package/dist/api/DirMake.d.ts.map +1 -1
  78. package/dist/api/DirRemove.d.ts +1 -0
  79. package/dist/api/DirRemove.d.ts.map +1 -1
  80. package/dist/api/FileDelete.d.ts +1 -0
  81. package/dist/api/FileDelete.d.ts.map +1 -1
  82. package/dist/api/FileRead.d.ts +1 -0
  83. package/dist/api/FileRead.d.ts.map +1 -1
  84. package/dist/api/FileWrite.d.ts +2 -0
  85. package/dist/api/FileWrite.d.ts.map +1 -1
  86. package/dist/api/FirmwareUpdate.d.ts.map +1 -1
  87. package/dist/api/FirmwareUpdateV2.d.ts +2 -2
  88. package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
  89. package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
  90. package/dist/api/FirmwareUpdateV4.d.ts +26 -16
  91. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  92. package/dist/api/GetDeviceState.d.ts +8 -0
  93. package/dist/api/GetDeviceState.d.ts.map +1 -0
  94. package/dist/api/GetFeatures.d.ts +1 -1
  95. package/dist/api/GetFeatures.d.ts.map +1 -1
  96. package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
  97. package/dist/api/GetPassphraseState.d.ts +2 -6
  98. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  99. package/dist/api/OpenWalletSession.d.ts +8 -0
  100. package/dist/api/OpenWalletSession.d.ts.map +1 -0
  101. package/dist/api/PathInfo.d.ts +1 -0
  102. package/dist/api/PathInfo.d.ts.map +1 -1
  103. package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
  104. package/dist/api/SearchDevices.d.ts +3 -0
  105. package/dist/api/SearchDevices.d.ts.map +1 -1
  106. package/dist/api/UploadPortfolio.d.ts +17 -0
  107. package/dist/api/UploadPortfolio.d.ts.map +1 -0
  108. package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
  109. package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
  110. package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
  111. package/dist/api/algo/AlgoGetAddress.d.ts +1 -0
  112. package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -1
  113. package/dist/api/algo/AlgoSignTransaction.d.ts +1 -0
  114. package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -1
  115. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +1 -0
  116. package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
  117. package/dist/api/aptos/AptosGetAddress.d.ts +1 -0
  118. package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
  119. package/dist/api/aptos/AptosGetPublicKey.d.ts +1 -0
  120. package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
  121. package/dist/api/aptos/AptosSignInMessage.d.ts +1 -0
  122. package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
  123. package/dist/api/aptos/AptosSignMessage.d.ts +1 -0
  124. package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -1
  125. package/dist/api/aptos/AptosSignTransaction.d.ts +1 -0
  126. package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
  127. package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
  128. package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
  129. package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
  130. package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
  131. package/dist/api/btc/BTCGetAddress.d.ts +1 -0
  132. package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
  133. package/dist/api/btc/BTCGetPublicKey.d.ts +1 -0
  134. package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
  135. package/dist/api/btc/BTCSignMessage.d.ts +1 -0
  136. package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
  137. package/dist/api/btc/BTCSignPsbt.d.ts +1 -0
  138. package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
  139. package/dist/api/btc/BTCSignTransaction.d.ts +1 -0
  140. package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
  141. package/dist/api/btc/BTCVerifyMessage.d.ts +1 -0
  142. package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
  143. package/dist/api/btc/helpers/versionLimit.d.ts +2 -0
  144. package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
  145. package/dist/api/cardano/CardanoGetAddress.d.ts +1 -0
  146. package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
  147. package/dist/api/cardano/CardanoGetPublicKey.d.ts +1 -0
  148. package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
  149. package/dist/api/cardano/CardanoSignMessage.d.ts +1 -0
  150. package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
  151. package/dist/api/cardano/CardanoSignTransaction.d.ts +1 -0
  152. package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
  153. package/dist/api/conflux/ConfluxGetAddress.d.ts +2 -0
  154. package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -1
  155. package/dist/api/conflux/ConfluxSignMessage.d.ts +2 -0
  156. package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -1
  157. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +2 -0
  158. package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -1
  159. package/dist/api/conflux/ConfluxSignTransaction.d.ts +2 -0
  160. package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
  161. package/dist/api/cosmos/CosmosGetAddress.d.ts +1 -0
  162. package/dist/api/cosmos/CosmosGetAddress.d.ts.map +1 -1
  163. package/dist/api/cosmos/CosmosGetPublicKey.d.ts +1 -0
  164. package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -1
  165. package/dist/api/cosmos/CosmosSignTransaction.d.ts +1 -0
  166. package/dist/api/cosmos/CosmosSignTransaction.d.ts.map +1 -1
  167. package/dist/api/device/DeviceCancel.d.ts +1 -0
  168. package/dist/api/device/DeviceCancel.d.ts.map +1 -1
  169. package/dist/api/device/DeviceChangePin.d.ts +1 -0
  170. package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
  171. package/dist/api/device/DeviceFullyUploadResource.d.ts +1 -2
  172. package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -1
  173. package/dist/api/device/DeviceLock.d.ts +1 -0
  174. package/dist/api/device/DeviceLock.d.ts.map +1 -1
  175. package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -0
  176. package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
  177. package/dist/api/device/DeviceRebootToBootloader.d.ts +1 -0
  178. package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
  179. package/dist/api/device/DeviceSettings.d.ts +1 -0
  180. package/dist/api/device/DeviceSettings.d.ts.map +1 -1
  181. package/dist/api/device/DeviceSupportFeatures.d.ts +1 -0
  182. package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
  183. package/dist/api/device/DeviceUnlock.d.ts +3 -2
  184. package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
  185. package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
  186. package/dist/api/device/DeviceWipe.d.ts +1 -0
  187. package/dist/api/device/DeviceWipe.d.ts.map +1 -1
  188. package/dist/api/device/PreInitialize.d.ts +1 -0
  189. package/dist/api/device/PreInitialize.d.ts.map +1 -1
  190. package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -1
  191. package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -1
  192. package/dist/api/evm/EVMGetAddress.d.ts +1 -0
  193. package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
  194. package/dist/api/evm/EVMGetPublicKey.d.ts +1 -0
  195. package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
  196. package/dist/api/evm/EVMSignMessage.d.ts +1 -0
  197. package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
  198. package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
  199. package/dist/api/evm/EVMSignTransaction.d.ts +1 -0
  200. package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
  201. package/dist/api/evm/EVMSignTypedData.d.ts +1 -0
  202. package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
  203. package/dist/api/evm/EVMVerifyMessage.d.ts +1 -0
  204. package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
  205. package/dist/api/evm/protocol.d.ts +3 -0
  206. package/dist/api/evm/protocol.d.ts.map +1 -0
  207. package/dist/api/filecoin/FilecoinGetAddress.d.ts +1 -0
  208. package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -1
  209. package/dist/api/filecoin/FilecoinSignTransaction.d.ts +1 -0
  210. package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -1
  211. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +4 -3
  212. package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
  213. package/dist/api/firmware/getBinary.d.ts +8 -4
  214. package/dist/api/firmware/getBinary.d.ts.map +1 -1
  215. package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
  216. package/dist/api/helpers/filesystemValidation.d.ts +3 -0
  217. package/dist/api/helpers/filesystemValidation.d.ts.map +1 -1
  218. package/dist/api/helpers/paramsValidator.d.ts +1 -0
  219. package/dist/api/helpers/paramsValidator.d.ts.map +1 -1
  220. package/dist/api/helpers/protocolV2FileWrite.d.ts +42 -0
  221. package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -0
  222. package/dist/api/index.d.ts +9 -25
  223. package/dist/api/index.d.ts.map +1 -1
  224. package/dist/api/kaspa/KaspaGetAddress.d.ts +4 -0
  225. package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
  226. package/dist/api/kaspa/KaspaSignTransaction.d.ts +9 -1
  227. package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
  228. package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -1
  229. package/dist/api/lightning/LnurlAuth.d.ts +0 -4
  230. package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
  231. package/dist/api/near/NearGetAddress.d.ts +1 -0
  232. package/dist/api/near/NearGetAddress.d.ts.map +1 -1
  233. package/dist/api/near/NearSignTransaction.d.ts +1 -0
  234. package/dist/api/near/NearSignTransaction.d.ts.map +1 -1
  235. package/dist/api/nem/NEMGetAddress.d.ts +1 -0
  236. package/dist/api/nem/NEMGetAddress.d.ts.map +1 -1
  237. package/dist/api/nem/NEMSignTransaction.d.ts +1 -0
  238. package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -1
  239. package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
  240. package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
  241. package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
  242. package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
  243. package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
  244. package/dist/api/nexa/NexaSignTransaction.d.ts +1 -0
  245. package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
  246. package/dist/api/nostr/NostrDecryptMessage.d.ts +1 -0
  247. package/dist/api/nostr/NostrDecryptMessage.d.ts.map +1 -1
  248. package/dist/api/nostr/NostrEncryptMessage.d.ts +1 -0
  249. package/dist/api/nostr/NostrEncryptMessage.d.ts.map +1 -1
  250. package/dist/api/nostr/NostrGetPublicKey.d.ts +1 -0
  251. package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -1
  252. package/dist/api/nostr/NostrSignEvent.d.ts +1 -0
  253. package/dist/api/nostr/NostrSignEvent.d.ts.map +1 -1
  254. package/dist/api/nostr/NostrSignSchnorr.d.ts +1 -0
  255. package/dist/api/nostr/NostrSignSchnorr.d.ts.map +1 -1
  256. package/dist/api/polkadot/PolkadotGetAddress.d.ts +2 -1
  257. package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
  258. package/dist/api/polkadot/PolkadotSignTransaction.d.ts +1 -0
  259. package/dist/api/polkadot/PolkadotSignTransaction.d.ts.map +1 -1
  260. package/dist/api/polkadot/networks.d.ts +1 -1
  261. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +1 -0
  262. package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -1
  263. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +1 -0
  264. package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -1
  265. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -0
  266. package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
  267. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +1 -0
  268. package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
  269. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +7 -0
  270. package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -0
  271. package/dist/api/protocol-v2/DeviceInfoGet.d.ts +1 -1
  272. package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -1
  273. package/dist/api/protocol-v2/DeviceReboot.d.ts +1 -0
  274. package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
  275. package/dist/api/protocol-v2/DeviceStatusGet.d.ts +7 -0
  276. package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -0
  277. package/dist/api/protocol-v2/DeviceUploadNft.d.ts +31 -0
  278. package/dist/api/protocol-v2/DeviceUploadNft.d.ts.map +1 -0
  279. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +27 -0
  280. package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -0
  281. package/dist/api/protocol-v2/FilesystemFormat.d.ts +1 -0
  282. package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
  283. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +1 -0
  284. package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -1
  285. package/dist/api/protocol-v2/Ping.d.ts +3 -0
  286. package/dist/api/protocol-v2/Ping.d.ts.map +1 -1
  287. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +1 -0
  288. package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -1
  289. package/dist/api/protocol-v2/helpers.d.ts +1 -1
  290. package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
  291. package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
  292. package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
  293. package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
  294. package/dist/api/solana/SolGetAddress.d.ts +1 -0
  295. package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
  296. package/dist/api/solana/SolSignMessage.d.ts +2 -1
  297. package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
  298. package/dist/api/solana/SolSignOffchainMessage.d.ts +2 -1
  299. package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
  300. package/dist/api/solana/SolSignTransaction.d.ts +3 -2
  301. package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
  302. package/dist/api/starcoin/StarcoinGetAddress.d.ts +1 -0
  303. package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -1
  304. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +1 -0
  305. package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -1
  306. package/dist/api/starcoin/StarcoinSignMessage.d.ts +1 -0
  307. package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -1
  308. package/dist/api/starcoin/StarcoinSignTransaction.d.ts +1 -0
  309. package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -1
  310. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +1 -0
  311. package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -1
  312. package/dist/api/stellar/StellarGetAddress.d.ts +1 -2
  313. package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
  314. package/dist/api/stellar/StellarSignTransaction.d.ts +1 -2
  315. package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
  316. package/dist/api/sui/SuiGetAddress.d.ts +2 -1
  317. package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
  318. package/dist/api/sui/SuiGetPublicKey.d.ts +2 -1
  319. package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
  320. package/dist/api/sui/SuiSignMessage.d.ts +2 -1
  321. package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
  322. package/dist/api/sui/SuiSignTransaction.d.ts +2 -1
  323. package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
  324. package/dist/api/ton/TonGetAddress.d.ts +2 -1
  325. package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
  326. package/dist/api/ton/TonSignData.d.ts +1 -0
  327. package/dist/api/ton/TonSignData.d.ts.map +1 -1
  328. package/dist/api/ton/TonSignMessage.d.ts +2 -1
  329. package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
  330. package/dist/api/ton/TonSignProof.d.ts +2 -1
  331. package/dist/api/ton/TonSignProof.d.ts.map +1 -1
  332. package/dist/api/tron/TronGetAddress.d.ts +1 -0
  333. package/dist/api/tron/TronGetAddress.d.ts.map +1 -1
  334. package/dist/api/tron/TronSignMessage.d.ts +6 -1
  335. package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
  336. package/dist/api/tron/TronSignTransaction.d.ts +2 -1
  337. package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
  338. package/dist/api/utils.d.ts +2 -1
  339. package/dist/api/utils.d.ts.map +1 -1
  340. package/dist/api/xrp/XrpGetAddress.d.ts +1 -0
  341. package/dist/api/xrp/XrpGetAddress.d.ts.map +1 -1
  342. package/dist/api/xrp/XrpSignTransaction.d.ts +1 -0
  343. package/dist/api/xrp/XrpSignTransaction.d.ts.map +1 -1
  344. package/dist/constants/index.d.ts +1 -1
  345. package/dist/constants/index.d.ts.map +1 -1
  346. package/dist/core/RequestQueue.d.ts.map +1 -1
  347. package/dist/core/deviceEventRegistration.d.ts +13 -0
  348. package/dist/core/deviceEventRegistration.d.ts.map +1 -0
  349. package/dist/core/index.d.ts +3 -1
  350. package/dist/core/index.d.ts.map +1 -1
  351. package/dist/core/uiPromiseRegistry.d.ts +6 -0
  352. package/dist/core/uiPromiseRegistry.d.ts.map +1 -0
  353. package/dist/data-manager/DataManager.d.ts +9 -3
  354. package/dist/data-manager/DataManager.d.ts.map +1 -1
  355. package/dist/data-manager/TransportManager.d.ts.map +1 -1
  356. package/dist/data-manager/connectSettings.d.ts.map +1 -1
  357. package/dist/device/Device.d.ts +71 -17
  358. package/dist/device/Device.d.ts.map +1 -1
  359. package/dist/device/DeviceCommands.d.ts +8 -6
  360. package/dist/device/DeviceCommands.d.ts.map +1 -1
  361. package/dist/device/DeviceConnector.d.ts +3 -2
  362. package/dist/device/DeviceConnector.d.ts.map +1 -1
  363. package/dist/device/DeviceFeaturesState.d.ts +3 -0
  364. package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
  365. package/dist/device/DevicePool.d.ts +5 -2
  366. package/dist/device/DevicePool.d.ts.map +1 -1
  367. package/dist/device/DeviceStateMapper.d.ts +13 -0
  368. package/dist/device/DeviceStateMapper.d.ts.map +1 -0
  369. package/dist/device/DeviceStateProjector.d.ts +7 -0
  370. package/dist/device/DeviceStateProjector.d.ts.map +1 -0
  371. package/dist/device/DeviceStateStore.d.ts +21 -0
  372. package/dist/device/DeviceStateStore.d.ts.map +1 -0
  373. package/dist/device/DeviceWalletSessionStore.d.ts +27 -0
  374. package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -0
  375. package/dist/device/cloneDeviceState.d.ts +2 -0
  376. package/dist/device/cloneDeviceState.d.ts.map +1 -0
  377. package/dist/device/deviceIdentity.d.ts +5 -0
  378. package/dist/device/deviceIdentity.d.ts.map +1 -0
  379. package/dist/deviceProfile/buildDeviceFeatures.d.ts +9 -3
  380. package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
  381. package/dist/deviceProfile/index.d.ts +0 -1
  382. package/dist/deviceProfile/index.d.ts.map +1 -1
  383. package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts +7 -0
  384. package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts.map +1 -0
  385. package/dist/events/device.d.ts +16 -2
  386. package/dist/events/device.d.ts.map +1 -1
  387. package/dist/events/logBlockEvent.d.ts +2 -0
  388. package/dist/events/logBlockEvent.d.ts.map +1 -1
  389. package/dist/events/ui-promise.d.ts +4 -2
  390. package/dist/events/ui-promise.d.ts.map +1 -1
  391. package/dist/events/ui-request.d.ts +50 -4
  392. package/dist/events/ui-request.d.ts.map +1 -1
  393. package/dist/events/ui-response.d.ts +10 -2
  394. package/dist/events/ui-response.d.ts.map +1 -1
  395. package/dist/index.d.ts +1593 -773
  396. package/dist/index.js +8507 -3894
  397. package/dist/inject.d.ts +6 -1
  398. package/dist/inject.d.ts.map +1 -1
  399. package/dist/lowLevelInject.d.ts.map +1 -1
  400. package/dist/protocols/protocol-v2/deviceSession.d.ts +7 -0
  401. package/dist/protocols/protocol-v2/deviceSession.d.ts.map +1 -0
  402. package/dist/protocols/protocol-v2/features.d.ts +21 -17
  403. package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
  404. package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
  405. package/dist/protocols/protocol-v2/index.d.ts +3 -2
  406. package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
  407. package/dist/protocols/protocol-v2/resources.d.ts +30 -0
  408. package/dist/protocols/protocol-v2/resources.d.ts.map +1 -0
  409. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +17 -0
  410. package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -0
  411. package/dist/protocols/protocol-v2/uiInteraction.d.ts +42 -0
  412. package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +1 -0
  413. package/dist/protocols/protocol-v2/unlockPolicy.d.ts +2 -0
  414. package/dist/protocols/protocol-v2/unlockPolicy.d.ts.map +1 -0
  415. package/dist/protocols/protocol-v2/unlockPolicyRunner.d.ts +22 -0
  416. package/dist/protocols/protocol-v2/unlockPolicyRunner.d.ts.map +1 -0
  417. package/dist/protocols/protocol-v2/walletSession.d.ts +27 -0
  418. package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -0
  419. package/dist/topLevelInject.d.ts.map +1 -1
  420. package/dist/types/api/checkAllFirmwareRelease.d.ts +27 -4
  421. package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
  422. package/dist/types/api/detectDeviceConnectProtocol.d.ts +4 -0
  423. package/dist/types/api/detectDeviceConnectProtocol.d.ts.map +1 -0
  424. package/dist/types/api/deviceSettings.d.ts +11 -2
  425. package/dist/types/api/deviceSettings.d.ts.map +1 -1
  426. package/dist/types/api/deviceUnlock.d.ts +6 -2
  427. package/dist/types/api/deviceUnlock.d.ts.map +1 -1
  428. package/dist/types/api/export.d.ts +4 -2
  429. package/dist/types/api/export.d.ts.map +1 -1
  430. package/dist/types/api/firmwareUpdate.d.ts +8 -1
  431. package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
  432. package/dist/types/api/getDeviceState.d.ts +12 -0
  433. package/dist/types/api/getDeviceState.d.ts.map +1 -0
  434. package/dist/types/api/getFeatures.d.ts.map +1 -1
  435. package/dist/types/api/getOnekeyFeatures.d.ts.map +1 -1
  436. package/dist/types/api/getPassphraseState.d.ts +2 -10
  437. package/dist/types/api/getPassphraseState.d.ts.map +1 -1
  438. package/dist/types/api/index.d.ts +23 -30
  439. package/dist/types/api/index.d.ts.map +1 -1
  440. package/dist/types/api/kaspaSignTransaction.d.ts +42 -4
  441. package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
  442. package/dist/types/api/openWalletSession.d.ts +35 -0
  443. package/dist/types/api/openWalletSession.d.ts.map +1 -0
  444. package/dist/types/api/protocolV2.d.ts +18 -84
  445. package/dist/types/api/protocolV2.d.ts.map +1 -1
  446. package/dist/types/api/sessionCache.d.ts +13 -0
  447. package/dist/types/api/sessionCache.d.ts.map +1 -0
  448. package/dist/types/device.d.ts +134 -10
  449. package/dist/types/device.d.ts.map +1 -1
  450. package/dist/types/params.d.ts +1 -0
  451. package/dist/types/params.d.ts.map +1 -1
  452. package/dist/types/settings.d.ts +44 -21
  453. package/dist/types/settings.d.ts.map +1 -1
  454. package/dist/utils/assets.d.ts +2 -1
  455. package/dist/utils/assets.d.ts.map +1 -1
  456. package/dist/utils/deviceFeaturesCompat.d.ts +13 -0
  457. package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -0
  458. package/dist/utils/deviceFeaturesUtils.d.ts +10 -3
  459. package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
  460. package/dist/utils/deviceInfoUtils.d.ts +9 -9
  461. package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
  462. package/dist/utils/deviceSettings.d.ts +38 -7
  463. package/dist/utils/deviceSettings.d.ts.map +1 -1
  464. package/dist/utils/deviceVersionUtils.d.ts +7 -5
  465. package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
  466. package/dist/utils/homescreen.d.ts +4 -0
  467. package/dist/utils/homescreen.d.ts.map +1 -1
  468. package/dist/utils/index.d.ts +6 -3
  469. package/dist/utils/index.d.ts.map +1 -1
  470. package/dist/utils/networkUtils.d.ts +10 -1
  471. package/dist/utils/networkUtils.d.ts.map +1 -1
  472. package/dist/utils/patch.d.ts +1 -1
  473. package/dist/utils/patch.d.ts.map +1 -1
  474. package/dist/utils/pro2Nft.d.ts +31 -0
  475. package/dist/utils/pro2Nft.d.ts.map +1 -0
  476. package/dist/utils/pro2Wallpaper.d.ts +22 -0
  477. package/dist/utils/pro2Wallpaper.d.ts.map +1 -0
  478. package/dist/utils/tracing.d.ts.map +1 -1
  479. package/dist/utils/uiProgressThrottle.d.ts +3 -0
  480. package/dist/utils/uiProgressThrottle.d.ts.map +1 -0
  481. package/package.json +4 -4
  482. package/src/api/BaseMethod.ts +53 -20
  483. package/src/api/CheckAllFirmwareRelease.ts +340 -1
  484. package/src/api/CheckBootloaderRelease.ts +1 -2
  485. package/src/api/CheckFirmwareRelease.ts +1 -2
  486. package/src/api/CipherKeyValue.ts +4 -0
  487. package/src/api/ClearSessionCache.ts +32 -0
  488. package/src/api/DetectDeviceConnectProtocol.ts +18 -0
  489. package/src/api/DirList.ts +9 -4
  490. package/src/api/DirMake.ts +7 -4
  491. package/src/api/DirRemove.ts +7 -4
  492. package/src/api/FileDelete.ts +7 -4
  493. package/src/api/FileRead.ts +15 -9
  494. package/src/api/FileWrite.ts +26 -181
  495. package/src/api/FirmwareUpdate.ts +17 -14
  496. package/src/api/FirmwareUpdateV2.ts +137 -54
  497. package/src/api/FirmwareUpdateV3.ts +9 -13
  498. package/src/api/FirmwareUpdateV4.ts +805 -626
  499. package/src/api/GetDeviceState.ts +59 -0
  500. package/src/api/GetFeatures.ts +6 -4
  501. package/src/api/GetOnekeyFeatures.ts +1 -75
  502. package/src/api/GetPassphraseState.ts +36 -21
  503. package/src/api/OpenWalletSession.ts +268 -0
  504. package/src/api/PathInfo.ts +9 -4
  505. package/src/api/PromptWebDeviceAccess.ts +2 -7
  506. package/src/api/SearchDevices.ts +31 -4
  507. package/src/api/UploadPortfolio.ts +40 -0
  508. package/src/api/alephium/AlephiumGetAddress.ts +0 -4
  509. package/src/api/alephium/AlephiumSignMessage.ts +0 -4
  510. package/src/api/alephium/AlephiumSignTransaction.ts +2 -6
  511. package/src/api/algo/AlgoGetAddress.ts +4 -0
  512. package/src/api/algo/AlgoSignTransaction.ts +4 -0
  513. package/src/api/allnetwork/AllNetworkGetAddress.ts +21 -21
  514. package/src/api/allnetwork/AllNetworkGetAddressBase.ts +45 -32
  515. package/src/api/aptos/AptosGetAddress.ts +4 -0
  516. package/src/api/aptos/AptosGetPublicKey.ts +4 -0
  517. package/src/api/aptos/AptosSignInMessage.ts +4 -0
  518. package/src/api/aptos/AptosSignMessage.ts +4 -0
  519. package/src/api/aptos/AptosSignTransaction.ts +4 -0
  520. package/src/api/benfen/BenfenGetAddress.ts +11 -7
  521. package/src/api/benfen/BenfenGetPublicKey.ts +0 -4
  522. package/src/api/benfen/BenfenSignMessage.ts +0 -4
  523. package/src/api/benfen/BenfenSignTransaction.ts +0 -4
  524. package/src/api/btc/BTCGetAddress.ts +8 -1
  525. package/src/api/btc/BTCGetPublicKey.ts +9 -2
  526. package/src/api/btc/BTCSignMessage.ts +8 -1
  527. package/src/api/btc/BTCSignPsbt.ts +4 -0
  528. package/src/api/btc/BTCSignTransaction.ts +8 -1
  529. package/src/api/btc/BTCVerifyMessage.ts +8 -1
  530. package/src/api/btc/helpers/versionLimit.ts +7 -4
  531. package/src/api/cardano/CardanoGetAddress.ts +4 -0
  532. package/src/api/cardano/CardanoGetPublicKey.ts +4 -0
  533. package/src/api/cardano/CardanoSignMessage.ts +5 -1
  534. package/src/api/cardano/CardanoSignTransaction.ts +5 -1
  535. package/src/api/conflux/ConfluxGetAddress.ts +6 -0
  536. package/src/api/conflux/ConfluxSignMessage.ts +6 -0
  537. package/src/api/conflux/ConfluxSignMessageCIP23.ts +6 -0
  538. package/src/api/conflux/ConfluxSignTransaction.ts +8 -5
  539. package/src/api/cosmos/CosmosGetAddress.ts +4 -0
  540. package/src/api/cosmos/CosmosGetPublicKey.ts +4 -0
  541. package/src/api/cosmos/CosmosSignTransaction.ts +4 -0
  542. package/src/api/device/DeviceCancel.ts +5 -0
  543. package/src/api/device/DeviceChangePin.ts +28 -0
  544. package/src/api/device/DeviceFullyUploadResource.ts +4 -5
  545. package/src/api/device/DeviceLock.ts +5 -0
  546. package/src/api/device/DeviceRebootToBoardloader.ts +5 -0
  547. package/src/api/device/DeviceRebootToBootloader.ts +5 -0
  548. package/src/api/device/DeviceSettings.ts +195 -1
  549. package/src/api/device/DeviceSupportFeatures.ts +4 -0
  550. package/src/api/device/DeviceUnlock.ts +21 -3
  551. package/src/api/device/DeviceUpdateBootloader.ts +1 -2
  552. package/src/api/device/DeviceWipe.ts +25 -0
  553. package/src/api/device/PreInitialize.ts +4 -0
  554. package/src/api/dynex/DnxGetAddress.ts +0 -6
  555. package/src/api/dynex/DnxSignTransaction.ts +0 -6
  556. package/src/api/evm/EVMGetAddress.ts +6 -2
  557. package/src/api/evm/EVMGetPublicKey.ts +6 -2
  558. package/src/api/evm/EVMSignMessage.ts +6 -2
  559. package/src/api/evm/EVMSignMessageEIP712.ts +1 -11
  560. package/src/api/evm/EVMSignTransaction.ts +6 -2
  561. package/src/api/evm/EVMSignTypedData.ts +42 -50
  562. package/src/api/evm/EVMVerifyMessage.ts +6 -2
  563. package/src/api/evm/legacyV1/getAddress.ts +2 -2
  564. package/src/api/evm/legacyV1/getPublicKey.ts +2 -2
  565. package/src/api/evm/legacyV1/signMessage.ts +2 -2
  566. package/src/api/evm/legacyV1/signTypedData.ts +2 -2
  567. package/src/api/evm/legacyV1/signTypedHash.ts +2 -2
  568. package/src/api/evm/legacyV1/verifyMessage.ts +2 -2
  569. package/src/api/evm/protocol.ts +6 -0
  570. package/src/api/filecoin/FilecoinGetAddress.ts +4 -0
  571. package/src/api/filecoin/FilecoinSignTransaction.ts +4 -0
  572. package/src/api/firmware/FirmwareUpdateBaseMethod.ts +30 -15
  573. package/src/api/firmware/getBinary.ts +8 -3
  574. package/src/api/firmware/uploadFirmware.ts +17 -4
  575. package/src/api/helpers/batchGetPublickeys.ts +2 -2
  576. package/src/api/helpers/filesystemValidation.ts +61 -0
  577. package/src/api/helpers/paramsValidator.ts +1 -1
  578. package/src/api/helpers/protocolV2FileWrite.ts +338 -0
  579. package/src/api/index.ts +10 -26
  580. package/src/api/kaspa/KaspaGetAddress.ts +7 -0
  581. package/src/api/kaspa/KaspaSignTransaction.ts +369 -29
  582. package/src/api/kaspa/helpers/TransferSerialize.ts +17 -7
  583. package/src/api/lightning/LnurlAuth.ts +0 -4
  584. package/src/api/near/NearGetAddress.ts +4 -0
  585. package/src/api/near/NearSignTransaction.ts +4 -0
  586. package/src/api/nem/NEMGetAddress.ts +4 -0
  587. package/src/api/nem/NEMSignTransaction.ts +4 -0
  588. package/src/api/neo/NeoGetAddress.ts +0 -4
  589. package/src/api/neo/NeoSignTransaction.ts +0 -4
  590. package/src/api/nervos/NervosGetAddress.ts +0 -4
  591. package/src/api/nervos/NervosSignTransaction.ts +2 -6
  592. package/src/api/nexa/NexaGetAddress.ts +0 -4
  593. package/src/api/nexa/NexaSignTransaction.ts +3 -5
  594. package/src/api/nostr/NostrDecryptMessage.ts +4 -0
  595. package/src/api/nostr/NostrEncryptMessage.ts +4 -0
  596. package/src/api/nostr/NostrGetPublicKey.ts +4 -0
  597. package/src/api/nostr/NostrSignEvent.ts +4 -0
  598. package/src/api/nostr/NostrSignSchnorr.ts +4 -0
  599. package/src/api/polkadot/PolkadotGetAddress.ts +4 -0
  600. package/src/api/polkadot/PolkadotSignTransaction.ts +4 -0
  601. package/src/api/polkadot/networks.ts +3 -3
  602. package/src/api/protocol-v2/DeviceFactoryInfoGet.ts +5 -2
  603. package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +5 -2
  604. package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +8 -5
  605. package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +10 -6
  606. package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +21 -0
  607. package/src/api/protocol-v2/DeviceInfoGet.ts +8 -15
  608. package/src/api/protocol-v2/DeviceReboot.ts +7 -3
  609. package/src/api/protocol-v2/DeviceStatusGet.ts +19 -0
  610. package/src/api/protocol-v2/DeviceUploadNft.ts +197 -0
  611. package/src/api/protocol-v2/DeviceUploadWallpaper.ts +134 -0
  612. package/src/api/protocol-v2/FilesystemFormat.ts +9 -3
  613. package/src/api/protocol-v2/FilesystemPermissionFix.ts +5 -2
  614. package/src/api/protocol-v2/Ping.ts +37 -3
  615. package/src/api/protocol-v2/ProtocolInfoRequest.ts +8 -3
  616. package/src/api/protocol-v2/helpers.ts +17 -17
  617. package/src/api/scdo/ScdoGetAddress.ts +0 -4
  618. package/src/api/scdo/ScdoSignMessage.ts +0 -4
  619. package/src/api/scdo/ScdoSignTransaction.ts +0 -4
  620. package/src/api/solana/SolGetAddress.ts +4 -0
  621. package/src/api/solana/SolSignMessage.ts +5 -1
  622. package/src/api/solana/SolSignOffchainMessage.ts +5 -1
  623. package/src/api/solana/SolSignTransaction.ts +6 -2
  624. package/src/api/starcoin/StarcoinGetAddress.ts +4 -0
  625. package/src/api/starcoin/StarcoinGetPublicKey.ts +4 -0
  626. package/src/api/starcoin/StarcoinSignMessage.ts +4 -0
  627. package/src/api/starcoin/StarcoinSignTransaction.ts +4 -0
  628. package/src/api/starcoin/StarcoinVerifyMessage.ts +4 -0
  629. package/src/api/stellar/StellarGetAddress.ts +1 -10
  630. package/src/api/stellar/StellarSignTransaction.ts +1 -14
  631. package/src/api/sui/SuiGetAddress.ts +5 -1
  632. package/src/api/sui/SuiGetPublicKey.ts +5 -1
  633. package/src/api/sui/SuiSignMessage.ts +5 -1
  634. package/src/api/sui/SuiSignTransaction.ts +5 -1
  635. package/src/api/ton/TonGetAddress.ts +5 -1
  636. package/src/api/ton/TonSignData.ts +5 -1
  637. package/src/api/ton/TonSignMessage.ts +5 -1
  638. package/src/api/ton/TonSignProof.ts +5 -1
  639. package/src/api/tron/TronGetAddress.ts +4 -0
  640. package/src/api/tron/TronSignMessage.ts +19 -8
  641. package/src/api/tron/TronSignTransaction.ts +5 -1
  642. package/src/api/utils.ts +7 -3
  643. package/src/api/xrp/XrpGetAddress.ts +4 -0
  644. package/src/api/xrp/XrpSignTransaction.ts +5 -1
  645. package/src/constants/index.ts +1 -4
  646. package/src/core/RequestQueue.ts +1 -0
  647. package/src/core/deviceEventRegistration.ts +27 -0
  648. package/src/core/index.ts +365 -152
  649. package/src/core/uiPromiseRegistry.ts +63 -0
  650. package/src/data/messages/messages-protocol-v2.json +1138 -441
  651. package/src/data/messages/messages.json +286 -1
  652. package/src/data-manager/DataManager.ts +88 -16
  653. package/src/data-manager/TransportManager.ts +7 -1
  654. package/src/data-manager/connectSettings.ts +4 -0
  655. package/src/device/Device.ts +891 -295
  656. package/src/device/DeviceCommands.ts +193 -158
  657. package/src/device/DeviceConnector.ts +43 -20
  658. package/src/device/DeviceFeaturesState.ts +25 -0
  659. package/src/device/DevicePool.ts +86 -22
  660. package/src/device/DeviceStateMapper.ts +374 -0
  661. package/src/device/DeviceStateProjector.ts +94 -0
  662. package/src/device/DeviceStateStore.ts +201 -0
  663. package/src/device/DeviceWalletSessionStore.ts +144 -0
  664. package/src/device/cloneDeviceState.ts +39 -0
  665. package/src/device/deviceIdentity.ts +18 -0
  666. package/src/deviceProfile/buildDeviceFeatures.ts +223 -189
  667. package/src/deviceProfile/index.ts +0 -1
  668. package/src/deviceProfile/protocolV2DeviceIdentity.ts +35 -0
  669. package/src/events/device.ts +22 -1
  670. package/src/events/logBlockEvent.ts +80 -2
  671. package/src/events/ui-promise.ts +4 -2
  672. package/src/events/ui-request.ts +61 -4
  673. package/src/events/ui-response.ts +12 -2
  674. package/src/inject.ts +73 -43
  675. package/src/lowLevelInject.ts +6 -3
  676. package/src/protocols/protocol-v2/deviceSession.ts +24 -0
  677. package/src/protocols/protocol-v2/features.ts +100 -33
  678. package/src/protocols/protocol-v2/firmware.ts +3 -1
  679. package/src/protocols/protocol-v2/index.ts +8 -1
  680. package/src/protocols/protocol-v2/resources.ts +390 -0
  681. package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +65 -0
  682. package/src/protocols/protocol-v2/uiInteraction.ts +250 -0
  683. package/src/protocols/protocol-v2/unlockPolicy.ts +1 -0
  684. package/src/protocols/protocol-v2/unlockPolicyRunner.ts +118 -0
  685. package/src/protocols/protocol-v2/walletSession.ts +463 -0
  686. package/src/topLevelInject.ts +6 -3
  687. package/src/types/api/checkAllFirmwareRelease.ts +48 -4
  688. package/src/types/api/detectDeviceConnectProtocol.ts +6 -0
  689. package/src/types/api/deviceSettings.ts +26 -2
  690. package/src/types/api/deviceUnlock.ts +13 -2
  691. package/src/types/api/export.ts +9 -0
  692. package/src/types/api/firmwareUpdate.ts +26 -5
  693. package/src/types/api/getDeviceState.ts +19 -0
  694. package/src/types/api/getFeatures.ts +3 -0
  695. package/src/types/api/getOnekeyFeatures.ts +3 -0
  696. package/src/types/api/getPassphraseState.ts +9 -11
  697. package/src/types/api/index.ts +38 -64
  698. package/src/types/api/kaspaSignTransaction.ts +60 -4
  699. package/src/types/api/openWalletSession.ts +54 -0
  700. package/src/types/api/protocolV2.ts +33 -141
  701. package/src/types/api/sessionCache.ts +19 -0
  702. package/src/types/device.ts +200 -10
  703. package/src/types/params.ts +9 -2
  704. package/src/types/settings.ts +76 -24
  705. package/src/utils/assets.ts +4 -1
  706. package/src/utils/deviceFeaturesCompat.ts +185 -0
  707. package/src/utils/deviceFeaturesUtils.ts +65 -47
  708. package/src/utils/deviceInfoUtils.ts +29 -69
  709. package/src/utils/deviceSettings.ts +174 -39
  710. package/src/utils/deviceVersionUtils.ts +25 -44
  711. package/src/utils/findDefectiveBatchDevice.ts +3 -3
  712. package/src/utils/homescreen.ts +36 -0
  713. package/src/utils/index.ts +27 -3
  714. package/src/utils/networkUtils.ts +274 -16
  715. package/src/utils/pro2Nft.ts +142 -0
  716. package/src/utils/pro2Wallpaper.ts +130 -0
  717. package/src/utils/tracing.ts +3 -1
  718. package/src/utils/uiProgressThrottle.ts +63 -0
  719. package/tsconfig.type-tests.json +12 -0
  720. package/dist/api/GetDeviceInfo.d.ts +0 -9
  721. package/dist/api/GetDeviceInfo.d.ts.map +0 -1
  722. package/dist/api/firmware/progressThrottle.d.ts +0 -3
  723. package/dist/api/firmware/progressThrottle.d.ts.map +0 -1
  724. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +0 -13
  725. package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +0 -1
  726. package/dist/deviceProfile/buildDeviceProfile.d.ts +0 -21
  727. package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
  728. package/dist/types/api/getDeviceInfo.d.ts +0 -87
  729. package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
  730. package/src/api/GetDeviceInfo.ts +0 -145
  731. package/src/api/firmware/progressThrottle.ts +0 -44
  732. package/src/api/protocol-v2/FilesystemDiskControl.ts +0 -50
  733. package/src/deviceProfile/buildDeviceProfile.ts +0 -352
  734. package/src/types/api/getDeviceInfo.ts +0 -101
package/dist/index.d.ts CHANGED
@@ -1,25 +1,71 @@
1
1
  import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
2
- import { DeviceFirmwareTargetType, DeviceFirmwareUpdateRecordFields, DeviceRebootType, DeviceFirmwareTarget, Messages, Transport, TransportCallOptions, OneKeyDeviceInfo, ProtocolV2DeviceInfo, Success as Success$1, LowlevelTransportSharedPlugin, ProtocolInfo, DeviceFirmwareUpdateStatus, DeviceFactoryInfo, OneKeyDeviceCommType, Features as Features$1, ProtocolType, 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';
2
+ import * as _onekeyfe_hd_transport from '@onekeyfe/hd-transport';
3
+ import { DeviceRebootType, Messages, Transport, TransportCallOptions, OneKeyDeviceCommType, ProtocolInfo, ProtocolV2DeviceInfo, DeviceStatus as DeviceStatus$1, Enum_SafetyCheckLevel, OneKeyDeviceInfo, Success as Success$1, DeviceSessionPinType, LowlevelTransportSharedPlugin, OnboardingStatus, RecoveryDeviceType, 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, SafetyCheckLevel, ChangeOutputScriptType } from '@onekeyfe/hd-transport';
3
4
  export { Success as DeviceSuccess, HDNodeType, Messages as PROTO, ResourceType, TonSignDataType, TonWalletVersion } from '@onekeyfe/hd-transport';
4
5
  import * as _onekeyfe_hd_shared from '@onekeyfe/hd-shared';
5
- import { HardwareConnectProtocol, Deferred, EFirmwareType, EDeviceType } from '@onekeyfe/hd-shared';
6
+ import { HardwareConnectProtocol, EFirmwareType, EDeviceType, Deferred } from '@onekeyfe/hd-shared';
6
7
 
7
8
  interface CommonParams {
8
9
  keepSession?: boolean;
10
+ /**
11
+ * polling connect max retry count
12
+ */
9
13
  retryCount?: number;
14
+ /**
15
+ * polling interval time
16
+ */
10
17
  pollIntervalTime?: number;
18
+ /**
19
+ * Timeout time for single polling
20
+ */
11
21
  timeout?: number;
22
+ /**
23
+ * DeviceInfoGet timeout during Protocol V2 initialization.
24
+ */
12
25
  protocolV2DeviceInfoTimeoutMs?: number;
26
+ /**
27
+ * passphrase state
28
+ */
13
29
  passphraseState?: string;
30
+ /**
31
+ * Use empty passphrase
32
+ */
14
33
  useEmptyPassphrase?: boolean;
34
+ /**
35
+ * Every init session
36
+ */
15
37
  initSession?: boolean;
38
+ /**
39
+ * Use derive cardano
40
+ */
16
41
  deriveCardano?: boolean;
17
42
  detectBootloaderDevice?: boolean;
43
+ /**
44
+ * Skip web device prompt
45
+ */
18
46
  skipWebDevicePrompt?: boolean;
47
+ /**
48
+ * Skip passphrase check
49
+ */
19
50
  skipPassphraseCheck?: boolean;
51
+ /**
52
+ * Only connect device, not initialize device, only ble connect
53
+ */
20
54
  onlyConnectBleDevice?: boolean;
55
+ /**
56
+ * Use pre-initialized device state (BLE only)
57
+ */
21
58
  usePreInitialize?: boolean;
59
+ /**
60
+ * Strictly expected transport protocol. The SDK actively verifies this value and
61
+ * rejects a mismatch. After a successful probe, the cached protocol is also strict.
62
+ */
22
63
  connectProtocol?: HardwareConnectProtocol;
64
+ /**
65
+ * Ignore a previously bound protocol for this call and actively detect the
66
+ * protocol again. Intended for the first verified connection or explicit recovery.
67
+ */
68
+ forceProtocolDetection?: boolean;
23
69
  }
24
70
  type Params<T> = CommonParams & T & {
25
71
  bundle?: undefined;
@@ -44,34 +90,6 @@ type DeviceRebootParams = {
44
90
  rebootType?: RebootTypeInput;
45
91
  reboot_type?: RebootTypeInput;
46
92
  };
47
- type DeviceFirmwareTargetInput = DeviceFirmwareTarget | {
48
- targetId?: DeviceFirmwareTargetType | string | number;
49
- target_id?: DeviceFirmwareTargetType | string | number;
50
- path: string;
51
- };
52
- type DeviceFirmwareUpdateParams = {
53
- targets?: DeviceFirmwareTargetInput[];
54
- targetId?: DeviceFirmwareTargetType | string | number;
55
- target_id?: DeviceFirmwareTargetType | string | number;
56
- path?: string;
57
- };
58
- type DeviceFirmwareUpdateStatusGetParams = {
59
- fields?: DeviceFirmwareUpdateRecordFields;
60
- };
61
- type DeviceFactoryInfoSetParams = {
62
- version?: number;
63
- serial_number?: string;
64
- burn_in_completed?: boolean;
65
- factory_test_completed?: boolean;
66
- manufacture_time?: {
67
- year: number;
68
- month: number;
69
- day: number;
70
- hour: number;
71
- minute: number;
72
- second: number;
73
- };
74
- };
75
93
 
76
94
  type PassphrasePromptResponse = {
77
95
  passphrase?: string;
@@ -89,15 +107,19 @@ type TypedCallResponseMap = {
89
107
  [K in MessageKey]: TypedResponseMessage<K>;
90
108
  };
91
109
  type DefaultMessageResponse = TypedCallResponseMap[MessageKey];
110
+ /**
111
+ * The life cycle begins with the acquisition of the device and ends with the disposal device commands
112
+ * acquire device -> create DeviceCommands -> release device -> dispose DeviceCommands
113
+ */
92
114
  declare class DeviceCommands {
93
115
  instanceId: string;
94
116
  currentResponseID?: number;
95
- device: Device$1;
117
+ device: Device;
96
118
  transport: Transport;
97
119
  mainId: string;
98
120
  disposed: boolean;
99
121
  callPromise?: Promise<DefaultMessageResponse>;
100
- constructor(device: Device$1, mainId: string);
122
+ constructor(device: Device, mainId: string);
101
123
  dispose(_cancelRequest: boolean): Promise<void>;
102
124
  checkDisposed(): void;
103
125
  cancelDeviceOnOneKeyDevice(): Promise<{
@@ -114,7 +136,7 @@ declare class DeviceCommands {
114
136
  };
115
137
  } | {
116
138
  success: boolean;
117
- 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 | 900 | 901 | 902;
139
+ 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 | 830 | 831 | 832 | 900 | 901 | 902;
118
140
  payload: {
119
141
  message: string;
120
142
  };
@@ -133,7 +155,7 @@ declare class DeviceCommands {
133
155
  };
134
156
  } | {
135
157
  success: boolean;
136
- 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 | 900 | 901 | 902;
158
+ 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 | 830 | 831 | 832 | 900 | 901 | 902;
137
159
  payload: {
138
160
  message: string;
139
161
  };
@@ -145,363 +167,177 @@ declare class DeviceCommands {
145
167
  _commonCall(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
146
168
  _filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey, options?: TransportCallOptions): Promise<DefaultMessageResponse>;
147
169
  _promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
148
- _promptPassphrase(options: PassphraseRequestPayload): Promise<PassphrasePromptResponse>;
149
- }
150
-
151
- type DeviceDescriptorDiff = {
152
- didUpdate: boolean;
153
- connected: OneKeyDeviceInfo[];
154
- disconnected: OneKeyDeviceInfo[];
155
- changedSessions: OneKeyDeviceInfo[];
156
- changedDebugSessions: OneKeyDeviceInfo[];
157
- acquired: OneKeyDeviceInfo[];
158
- debugAcquired: OneKeyDeviceInfo[];
159
- released: OneKeyDeviceInfo[];
160
- debugReleased: OneKeyDeviceInfo[];
161
- descriptors: OneKeyDeviceInfo[];
162
- };
163
-
164
- declare class DeviceConnector {
165
- transport: Transport;
166
- listenTimestamp: number;
167
- current: OneKeyDeviceInfo[] | null;
168
- upcoming: OneKeyDeviceInfo[];
169
- listening: boolean;
170
- constructor();
171
- enumerate(): Promise<DeviceDescriptorDiff | undefined>;
172
- listen(): Promise<void>;
173
- stop(): void;
174
- acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
175
- release(session: string, onclose: boolean): Promise<void>;
176
- disconnect(session: string | undefined | null): Promise<void>;
177
- promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
178
- _reportDevicesChange(): void;
179
- }
180
-
181
- type InitOptions = {
182
- initSession?: boolean;
183
- deviceId?: string;
184
- passphraseState?: string;
185
- deriveCardano?: boolean;
186
- connectProtocol?: HardwareConnectProtocol;
187
- protocolV2DeviceInfoTimeoutMs?: number;
188
- };
189
- type RunOptions = {
190
- keepSession?: boolean;
191
- skipInitialize?: boolean;
192
- } & InitOptions;
193
- interface DeviceEvents {
194
- [DEVICE.PIN]: [Device$1, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
195
- [DEVICE.PASSPHRASE_ON_DEVICE]: [Device$1, ((response: any) => void)?];
196
- [DEVICE.BUTTON]: [Device$1, DeviceButtonRequestPayload];
197
- [DEVICE.FEATURES]: [Device$1, DeviceFeaturesPayload];
198
- [DEVICE.PASSPHRASE]: [
199
- Device$1,
200
- PassphraseRequestPayload,
201
- (response: PassphrasePromptResponse, error?: Error) => void
202
- ];
203
- [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
204
- Device$1,
205
- (err: any, deviceId: string) => void
206
- ];
207
- [DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
208
- Device$1,
209
- (err: any, deviceId: string) => void
210
- ];
211
- }
212
- declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
213
- interface Device$1 {
214
- on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
215
- off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
216
- emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
217
- }
218
- declare class Device$1 extends EventEmitter {
219
- originalDescriptor: OneKeyDeviceInfo;
220
- sdkInstanceId?: string;
221
- instanceId: string;
222
- createdAt: number;
223
- mainId?: string | null;
224
- deviceConnector?: DeviceConnector | null;
225
- commands: DeviceCommands;
226
- private cancelableAction?;
227
- private deviceAcquired;
228
- features: Features | undefined;
229
- featuresNeedsReload: boolean;
230
- runPromise?: Deferred<void> | null;
231
- externalState: string[];
232
- unavailableCapabilities: UnavailableCapabilities;
233
- instance: number;
234
- internalState: string[];
235
- needReloadDevice: boolean;
236
- keepSession: boolean;
237
- passphraseState: string | undefined;
238
- pendingCallbackPromise?: Deferred<void>;
239
- private preInitializedAt?;
240
- private preInitializeMeta?;
241
- private lastInitializeDurationMs?;
242
- constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
243
- static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device$1;
244
- toMessageObject(): Device | null;
245
- connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
246
- acquire(connectProtocol?: HardwareConnectProtocol, options?: {
247
- throwOnRunPromiseError?: boolean;
248
- }): Promise<void>;
249
- release(): Promise<void>;
250
- preInitialize(initOptions?: InitOptions): Promise<void>;
251
- markPreInitialized(meta?: {
252
- passphraseState?: string;
253
- }): void;
254
- clearPreInitialized(): void;
255
- isPreInitializeMetaMatch(payload?: {
256
- passphraseState?: string;
257
- }): boolean;
258
- isPreInitializedValid(ttlMs: number): boolean;
259
- setLastInitializeDuration(durationMs: number): void;
260
- getLastInitializeDuration(): number | undefined;
261
- getCommands(): DeviceCommands;
262
- getProtocol(): 'V1' | 'V2';
263
- isProtocolV2(): boolean;
264
- getCurrentDeviceType(): IDeviceType;
265
- getCurrentDeviceId(): string | undefined;
266
- getCurrentSerialNo(): string;
267
- getConnectId(): string;
268
- getCurrentBleName(): string | null;
269
- getCurrentLabel(): string | null;
270
- getCurrentPassphraseProtection(): boolean | null | undefined;
271
- getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
272
- getCurrentFirmwareVersionString(): string;
273
- getCurrentBLEFirmwareVersionString(): string | undefined;
274
- getCurrentSafetyChecks(): string | null | undefined;
275
- getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
276
- supportNewPassphrase(): SupportFeatureType;
277
- supportInputPinOnSoftware(): SupportFeatureType;
278
- supportModifyHomescreen(): SupportFeatureType;
279
- private generateStateKey;
280
- private getSessionCacheDeviceKey;
281
- getInternalState(_deviceId?: string): string | undefined;
282
- updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
283
- private setInternalState;
284
- clearInternalState(_deviceId?: string): void;
285
- initialize(options?: InitOptions): Promise<void>;
286
- private _initializeProtocolV2;
287
- private _refreshProtocolV2Status;
288
- getFeatures(): Promise<Features | undefined>;
289
- _updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
290
- updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo): Features;
291
- updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
292
- updateFromCache(device: Device$1): void;
293
- run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
294
- _runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
295
- interruptionFromOutside(): Promise<void>;
296
- interruptionFromUser(): Promise<void>;
297
- setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
298
- clearCancelableAction(): void;
299
- getMode(): EOneKeyDeviceMode;
300
- getFirmwareVersion(): IVersionArray | null;
301
- getBLEFirmwareVersion(): IVersionArray | null;
302
- isUsed(): boolean;
303
- hasDeviceAcquire(): boolean;
304
- isUsedHere(): boolean;
305
- isUsedElsewhere(): boolean;
306
- isBootloader(): boolean | undefined;
307
- isInitialized(): boolean | undefined;
308
- isSeedless(): boolean | undefined;
309
- isUnacquired(): boolean;
310
- hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
311
- hasUsePassphrase(): boolean;
312
- checkDeviceId(deviceId: string): boolean;
313
- lockDevice(): Promise<Success$1>;
314
- supportUnlockVersionRange(): DeviceFirmwareRange;
315
- unlockDevice(): Promise<Features | undefined>;
316
- checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
317
- }
318
-
319
- declare function generateSdkInstanceId(): string;
320
- declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
321
- interface RequestContext {
322
- responseID: number;
323
- sdkInstanceId?: string;
324
- methodName: string;
325
- connectId?: string;
326
- deviceInstanceId?: string;
327
- commandsInstanceId?: string;
328
- parentResponseID?: number;
329
- startTime: number;
330
- endTime?: number;
331
- status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
332
- error?: string;
333
- }
334
- interface SdkTracingContext {
335
- sdkInstanceId: string;
336
- createdAt: number;
337
- activeRequests: Map<number, RequestContext>;
338
- }
339
- declare function createSdkTracingContext(): SdkTracingContext;
340
- declare function createRequestContext(responseID: number, methodName: string, options?: {
341
- sdkInstanceId?: string;
342
- connectId?: string;
343
- deviceInstanceId?: string;
344
- commandsInstanceId?: string;
345
- parentResponseID?: number;
346
- }): RequestContext;
347
- declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
348
- declare function completeRequestContext(responseID: number, error?: Error): void;
349
- declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
350
- declare function formatRequestContext(context: RequestContext): string;
351
- declare function cleanupSdkInstance(sdkInstanceId: string): void;
352
-
353
- declare class Core extends EventEmitter {
354
- private tracingContext;
355
- readonly sdkInstanceId: string;
356
- private requestQueue;
357
- private prePendingCallPromise;
358
- private methodSynchronize;
359
- constructor();
360
- private getCoreContext;
361
- handleMessage(message: CoreMessage): Promise<any>;
362
- dispose(): void;
170
+ promptPassphrase(options: PassphraseRequestPayload, promptOptions?: {
171
+ cancelDeviceOnReject?: boolean;
172
+ }): Promise<PassphrasePromptResponse>;
363
173
  }
364
- declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
365
- declare const switchTransport: ({ env, Transport, plugin, }: {
366
- env: ConnectSettings['env'];
367
- Transport: any;
368
- plugin?: LowlevelTransportSharedPlugin | undefined;
369
- }) => void;
370
174
 
371
- type DeviceInfoGetTargets = {
372
- hw?: boolean;
373
- fw?: boolean;
374
- coprocessor?: boolean;
375
- se1?: boolean;
376
- se2?: boolean;
377
- se3?: boolean;
378
- se4?: boolean;
379
- status?: boolean;
380
- };
381
- type DeviceInfoGetTypes = {
382
- version?: boolean;
383
- build_id?: boolean;
384
- hash?: boolean;
385
- specific?: boolean;
386
- };
387
- type DeviceInfoGetParams = {
388
- targets?: DeviceInfoGetTargets;
389
- types?: DeviceInfoGetTypes;
390
- };
175
+ type ProtocolV2RuntimeMode = 'normal' | 'bootloader' | 'romloader';
391
176
 
392
- type FileOpSuccess = {
393
- message?: string;
177
+ type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
178
+ type ConnectSettings = {
179
+ connectSrc?: string;
180
+ debug?: boolean;
181
+ transportReconnect?: boolean;
182
+ lazyLoad?: boolean;
183
+ origin?: string;
184
+ parentOrigin?: string;
185
+ configSrc: string;
186
+ iframeSrc: string;
187
+ version: string;
188
+ priority: number;
189
+ trustedHost: boolean;
190
+ supportedBrowser?: boolean;
191
+ env: transportEnv;
192
+ timestamp: number;
193
+ isFrame?: boolean;
194
+ preRelease?: boolean;
195
+ fetchConfig?: boolean;
196
+ extension?: string;
197
+ configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
394
198
  };
395
- type FileInfo = {
396
- path: string;
397
- offset: number;
398
- total_size: number;
399
- data?: Uint8Array;
400
- data_hash?: number;
401
- processed_byte?: number;
402
- chunks?: number;
199
+ type IVersionArray = [number, number, number];
200
+ type ILocale = 'zh-CN' | 'en-US';
201
+ type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04';
202
+ type IProtocolV2FirmwareComponent = {
203
+ target: IProtocolV2FirmwareComponentTarget;
204
+ url: string;
205
+ /** SHA-256 of the complete okpkg, used after downloading the package. */
206
+ fingerprint?: string;
207
+ /** OKPP payload hash, used to detect same-version package changes. */
208
+ payloadHash?: string;
209
+ version?: IVersionArray;
403
210
  };
404
- type DirInfo = {
405
- path: string;
406
- child_dirs?: string;
407
- child_files?: string;
211
+ type IProtocolV2ResourceType = 'images' | 'animation' | 'wallpaper' | 'translations' | 'roobert' | 'noto';
212
+ /** Pro2 RES package descriptor. Hashes identify content without a human-managed version. */
213
+ type IProtocolV2Resource = {
214
+ type: IProtocolV2ResourceType;
215
+ url: string;
216
+ /** Complete okpkg file size in bytes. */
217
+ size: number;
218
+ /** SHA-256 of the complete okpkg file. */
219
+ fileHash: string;
220
+ /** SHA3-512 header_hash from the signed okpkg header. */
221
+ headerHash: string;
408
222
  };
409
- type PathInfoResult = {
410
- exist: boolean;
223
+ /** A file from the Protocol V2 resource manifest, written directly with FileWrite. */
224
+ type IProtocolV2ResourceFile = {
225
+ name?: string;
226
+ url: string;
227
+ devicePath: string;
411
228
  size: number;
412
- year: number;
413
- month: number;
414
- day: number;
415
- hour: number;
416
- minute: number;
417
- second: number;
418
- readonly: boolean;
419
- hidden: boolean;
420
- system: boolean;
421
- archive: boolean;
422
- directory: boolean;
423
- };
424
- declare function protocolInfoRequest(connectId: string, params?: CommonParams): Response<ProtocolInfo>;
425
- declare function ping(connectId: string, params?: CommonParams & {
426
- message?: string;
427
- }): Response<Success$1>;
428
- declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
429
- declare function deviceInfoGet(connectId: string, params?: CommonParams & DeviceInfoGetParams): Response<ProtocolV2DeviceInfo>;
430
- declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DeviceFirmwareUpdateStatus>;
431
- declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams & DeviceFirmwareUpdateStatusGetParams): Response<DeviceFirmwareUpdateStatus>;
432
- declare function deviceFactoryInfoSet(connectId: string, params: CommonParams & DeviceFactoryInfoSetParams): Response<Success$1>;
433
- declare function deviceFactoryInfoGet(connectId: string, params?: CommonParams): Response<DeviceFactoryInfo>;
434
- declare function filesystemPermissionFix(connectId: string, params?: CommonParams): Response<Success$1>;
435
- declare function fileRead(connectId: string, params: {
436
- path: string;
437
- offset?: number;
438
- totalSize?: number;
439
- chunkLen?: number;
440
- uiPercentage?: number;
441
- }): Response<FileInfo>;
442
- declare function fileWrite(connectId: string, params: {
443
- path: string;
444
- offset?: number;
445
- totalSize?: number;
446
- chunkSize?: number;
447
- chunkLen?: number;
448
- data: ArrayBuffer | Uint8Array | Blob | string;
449
- overwrite?: boolean;
450
- append?: boolean;
451
- uiPercentage?: number;
452
- timeoutMs?: number | string;
453
- }): Response<FileInfo>;
454
- declare function fileDelete(connectId: string, params: {
455
- path: string;
456
- }): Response<FileOpSuccess>;
457
- declare function dirList(connectId: string, params: {
458
- path: string;
459
- depth?: number;
460
- }): Response<DirInfo>;
461
- declare function dirMake(connectId: string, params: {
462
- path: string;
463
- }): Response<FileOpSuccess>;
464
- declare function dirRemove(connectId: string, params: {
465
- path: string;
466
- }): Response<FileOpSuccess>;
467
- declare function pathInfo(connectId: string, params: {
468
- path: string;
469
- timeoutMs?: number | string;
470
- }): Response<PathInfoResult>;
471
- declare const filesystemFileRead: typeof fileRead;
472
- declare const filesystemFileWrite: typeof fileWrite;
473
- declare const filesystemFileDelete: typeof fileDelete;
474
- declare const filesystemDirList: typeof dirList;
475
- declare const filesystemDirMake: typeof dirMake;
476
- declare const filesystemDirRemove: typeof dirRemove;
477
- declare const filesystemPathInfoQuery: typeof pathInfo;
478
- declare function filesystemFormat(connectId: string): Response<Success$1>;
479
- declare function filesystemDiskControl(connectId: string, params: CommonParams & {
480
- enable: boolean | 0 | 1;
481
- timeoutMs?: number | string;
482
- }): Response<Success$1>;
483
-
484
- declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
485
- declare const off: (type: any, fn: any) => void;
486
- declare const removeAllListeners: (type: any) => void;
487
-
488
- declare function uiResponse(response: UiResponseEvent): void;
489
-
490
- type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
491
- interface LowLevelInjectApi {
492
- call: CallMethod;
493
- eventEmitter: EventEmitter$1;
494
- init: CoreApi['init'];
495
- dispose: CoreApi['dispose'];
496
- uiResponse: CoreApi['uiResponse'];
497
- cancel: CoreApi['cancel'];
498
- updateSettings: CoreApi['updateSettings'];
499
- switchTransport: CoreApi['switchTransport'];
500
- addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
501
- }
502
- type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
503
- addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
229
+ /** SHA-256 of the complete file. */
230
+ fileHash: string;
231
+ };
232
+ /** Optional Protocol V2 boot resources restored as individual files. */
233
+ type IProtocolV2BootResources = {
234
+ required: false;
235
+ target: 'RES';
236
+ manifestUrl?: string;
237
+ files: IProtocolV2ResourceFile[];
238
+ };
239
+ type IProtocolV2Resources = {
240
+ stable: IProtocolV2Resource[];
241
+ boot?: IProtocolV2BootResources;
242
+ };
243
+ /** Pro2 RESC bundle okpkg descriptor for incremental FileWrite synchronization. */
244
+ type IProtocolV2ResourceBundle = {
245
+ /** Bundle name, such as images, animation, translations, or fonts_roobert. */
246
+ name: string;
247
+ /** Download URL. */
248
+ url: string;
249
+ /** Device target path, such as vol0:/bundles/images/images.okpkg. */
250
+ devicePath: string;
251
+ /** okpkg payload_version used to skip matching content after FileRead. */
252
+ version?: IVersionArray;
253
+ /** okpkg payload_hash used for SHA3-512 comparison after FileRead. */
254
+ payloadHash?: string;
255
+ /** okpkg header_hash used for SHA3-512 comparison after FileRead. */
256
+ headerHash?: string;
257
+ };
258
+ /** STM32 firmware config */
259
+ type IFirmwareReleaseInfo = {
260
+ required: boolean;
261
+ url: string;
262
+ /**
263
+ * Firmware type (bitcoinonly or universal)
264
+ * This field is not present in the remote config, but will be inferred from the firmware field name
265
+ */
266
+ firmwareType?: EFirmwareType;
267
+ /** Firmware UI resource */
268
+ resource?: string;
269
+ /** Firmware full UI resource */
270
+ fullResource?: string;
271
+ fullResourceRange?: string[];
272
+ bootloaderResource?: string;
273
+ bootloaderVersion?: IVersionArray;
274
+ displayBootloaderVersion?: IVersionArray;
275
+ bootloaderRelatedFirmwareVersion?: IVersionArray;
276
+ upgradeType?: 'payload-package-set' | string;
277
+ components?: Record<string, IProtocolV2FirmwareComponent>;
278
+ installOrder?: string[];
279
+ /** Pro2 RESC bundles for incremental direct FileWrite synchronization. */
280
+ resourceBundles?: IProtocolV2ResourceBundle[];
281
+ bootloaderChangelog?: {
282
+ [k in ILocale]: string;
283
+ };
284
+ fingerprint: string;
285
+ version: IVersionArray;
286
+ changelog: {
287
+ [k in ILocale]: string;
288
+ };
289
+ };
290
+ /** BLE firmware config */
291
+ type IBLEFirmwareReleaseInfo = {
292
+ required: boolean;
293
+ /** bluetooth dfu version */
294
+ url: string;
295
+ /** stm bluetooth update version */
296
+ webUpdate: string;
297
+ fingerprint: string;
298
+ fingerprintWeb: string;
299
+ version: IVersionArray;
300
+ changelog: {
301
+ [k in ILocale]: string;
302
+ };
303
+ };
304
+ type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
305
+ type ILegacyKnownDevice = Exclude<IKnownDevice, 'neo'>;
306
+ type IDeviceReleaseInfo = {
307
+ firmware: IFirmwareReleaseInfo[];
308
+ /** Protocol V2 payload package set */
309
+ 'firmware-v1'?: IFirmwareReleaseInfo[];
310
+ 'firmware-v2'?: IFirmwareReleaseInfo[];
311
+ 'firmware-v8'?: IFirmwareReleaseInfo[];
312
+ 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
313
+ ble: IBLEFirmwareReleaseInfo[];
314
+ /** Independent Protocol V2 resource release configuration. */
315
+ resources?: IProtocolV2Resources;
316
+ };
317
+ type DeviceTypeMap = {
318
+ [k in ILegacyKnownDevice]: IDeviceReleaseInfo;
319
+ } & {
320
+ /** Optional until every remote-config producer publishes a Neo entry. */
321
+ neo?: IDeviceReleaseInfo;
322
+ };
323
+ type AssetsMap = {
324
+ bridge: {
325
+ version: IVersionArray;
326
+ linux32Rpm: string;
327
+ linux64Rpm: string;
328
+ linux32Deb: string;
329
+ linux64Deb: string;
330
+ win: string;
331
+ mac: string;
332
+ sha256sumAsc: string;
333
+ changelog: {
334
+ [k in ILocale]: string;
335
+ };
336
+ };
504
337
  };
338
+ type RemoteConfigResponse = {
339
+ bridge: AssetsMap['bridge'];
340
+ } & DeviceTypeMap;
505
341
 
506
342
  type DeviceStatus = 'available' | 'occupied' | 'used';
507
343
  declare enum EOneKeyDeviceMode {
@@ -516,6 +352,14 @@ type UnavailableCapabilities = {
516
352
  };
517
353
  type KnownDevice = {
518
354
  connectId: string | null;
355
+ /** Protocol family confirmed by the transport's active probe. */
356
+ connectProtocol?: HardwareConnectProtocol;
357
+ /**
358
+ * Stable physical-device identity. Current SDK responses always include this
359
+ * value; it remains optional in the type during the uuid compatibility window.
360
+ */
361
+ serialNo?: string;
362
+ /** @deprecated Use serialNo instead. */
519
363
  uuid: string;
520
364
  deviceId: string | null;
521
365
  deviceType: IDeviceType | null;
@@ -525,9 +369,12 @@ type KnownDevice = {
525
369
  bleName: string | null;
526
370
  name: string;
527
371
  error?: typeof undefined;
372
+ /** Current SDK/transport usage state for connection indicators. */
373
+ status?: DeviceStatus;
528
374
  mode: EOneKeyDeviceMode;
529
- features?: Features;
530
- sessionId?: string | null;
375
+ features: Features;
376
+ /** Unified SDK device-state snapshot; features remains a legacy projection. */
377
+ state?: DeviceState;
531
378
  unavailableCapabilities: UnavailableCapabilities;
532
379
  bleFirmwareVersion: IVersionArray | null;
533
380
  firmwareVersion: IVersionArray | null;
@@ -537,18 +384,35 @@ type KnownDevice = {
537
384
  };
538
385
  type SearchDevice = {
539
386
  connectId: string | null;
387
+ /** Protocol family confirmed by the transport's active probe. */
388
+ connectProtocol?: HardwareConnectProtocol;
389
+ /**
390
+ * Available after device initialization. BLE discovery does not connect to the
391
+ * device, so it returns null until a later initialized device response. Current
392
+ * SDK responses always include the field; it remains optional in the type during
393
+ * the uuid compatibility window.
394
+ */
395
+ serialNo?: string | null;
396
+ /**
397
+ * @deprecated Ambiguous legacy identifier. Use serialNo for hardware identity
398
+ * and connectId for transport routing.
399
+ */
540
400
  uuid: string;
541
401
  deviceId: string | null;
542
402
  deviceType: IDeviceType;
543
403
  name: string;
544
404
  commType: OneKeyDeviceCommType;
545
405
  };
546
- type Device = KnownDevice;
406
+ type Device$1 = KnownDevice;
547
407
  type DeviceFeaturesProtocol = 'V1' | 'V2' | 'unknown';
548
- type DeviceFeaturesMode = 'normal' | 'bootloader' | 'notInitialized' | 'backupMode' | 'unknown';
408
+ type DeviceFeaturesMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'backupMode' | 'unknown';
549
409
  type DeviceFeaturesVerify = {
550
410
  firmwareBuildId?: string;
551
411
  firmwareHash?: string;
412
+ applicationP1BuildId?: string;
413
+ applicationP1Hash?: string;
414
+ applicationP2BuildId?: string;
415
+ applicationP2Hash?: string;
552
416
  bootloaderBuildId?: string;
553
417
  bootloaderHash?: string;
554
418
  boardBuildId?: string;
@@ -575,9 +439,117 @@ type DeviceFeaturesVerify = {
575
439
  type DeviceFeaturesRaw = {
576
440
  protocolV1Features?: Messages.Features;
577
441
  protocolV1OneKeyFeatures?: OnekeyFeatures;
442
+ protocolV2ProtocolInfo?: ProtocolInfo;
578
443
  protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
444
+ protocolV2DeviceStatus?: DeviceStatus$1;
445
+ };
446
+ type DeviceFeaturesRawPatch = {
447
+ [Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
448
+ };
449
+ type DeviceStateProtocol = DeviceFeaturesProtocol;
450
+ type DeviceStateMode = DeviceFeaturesMode;
451
+ type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
452
+ type DeviceStateUpdateSource = 'initialize' | 'device-info' | 'device-status' | 'settings-read' | 'settings-write' | 'change-pin' | 'lock' | 'unlock' | 'passphrase' | 'session-clear' | 'firmware-update' | 'transport-reconnect' | 'compatibility';
453
+ type DeviceStateIdentity = {
454
+ deviceType: IDeviceType;
455
+ firmwareType: EFirmwareType;
456
+ model: string | null;
457
+ vendor: string | null;
458
+ deviceId: string | null;
459
+ serialNo: string;
460
+ label: string | null;
461
+ bleName: string | null;
462
+ };
463
+ type DeviceStateStatus = {
464
+ mode: DeviceStateMode;
465
+ initialized: boolean | null;
466
+ unlocked: boolean | null;
467
+ firmwarePresent: boolean | null;
468
+ backupRequired: boolean | null;
469
+ noBackup: boolean | null;
470
+ unfinishedBackup: boolean | null;
471
+ recoveryMode: boolean | null;
472
+ passphraseProtection: boolean | null;
473
+ pinProtection: boolean | null;
474
+ /** `attach_to_pin_enabled`:是否至少存在一个 Attach PIN 绑定。 */
475
+ attachToPinEnabled: boolean | null;
476
+ /** `unlocked_by_attach_to_pin`:本次解锁是否由 Attach PIN 完成。 */
477
+ unlockedAttachPin: boolean | null;
478
+ };
479
+ type DeviceStateSettings = {
480
+ language: string | null;
481
+ bleEnabled: boolean | null;
482
+ sdCardPresent: boolean | null;
483
+ sdProtection: boolean | null;
484
+ wipeCodeProtection: boolean | null;
485
+ passphraseAlwaysOnDevice: boolean | null;
486
+ safetyChecks: Enum_SafetyCheckLevel | null;
487
+ autoLockDelayMs: number | null;
488
+ autoShutdownDelayMs: number | null;
489
+ displayRotation: number | null;
490
+ experimentalFeatures: boolean | null;
491
+ wallpaperPath: string | null;
492
+ brightness: number | null;
493
+ animationEnabled: boolean | null;
494
+ tapToWake: boolean | null;
495
+ hapticFeedback: boolean | null;
496
+ deviceNameDisplayEnabled: boolean | null;
497
+ airgapMode: boolean | null;
498
+ fidoEnabled: boolean | null;
499
+ usbLockEnabled: boolean | null;
500
+ randomKeypad: boolean | null;
501
+ };
502
+ type DeviceStateVersions = {
503
+ firmware: string | null;
504
+ applicationP1?: string | null;
505
+ applicationP2?: string | null;
506
+ bootloader: string | null;
507
+ board: string | null;
508
+ ble: string | null;
509
+ /** @deprecated Kept for legacy consumers; new code should read se01. */
510
+ se?: string | null;
511
+ se01?: string | null;
512
+ se02?: string | null;
513
+ se03?: string | null;
514
+ se04?: string | null;
515
+ se01Boot?: string | null;
516
+ se02Boot?: string | null;
517
+ se03Boot?: string | null;
518
+ se04Boot?: string | null;
519
+ };
520
+ type DeviceState = {
521
+ schemaVersion: 1;
522
+ revision: number;
523
+ updatedAt: number;
524
+ protocol: DeviceStateProtocol;
525
+ /** Device-message protocol version, independent of the SDK V1/V2 protocol family. */
526
+ protocolVersion: number | null;
527
+ identity: DeviceStateIdentity;
528
+ status: DeviceStateStatus;
529
+ settings: DeviceStateSettings;
530
+ versions: DeviceStateVersions;
531
+ capabilities: Array<number | string>;
532
+ verification?: Partial<DeviceFeaturesVerify>;
579
533
  };
580
- type Features = {
534
+ type DeviceStatePatch = {
535
+ protocol?: DeviceStateProtocol;
536
+ protocolVersion?: number | null;
537
+ identity?: Partial<DeviceStateIdentity>;
538
+ status?: Partial<DeviceStateStatus>;
539
+ settings?: Partial<DeviceStateSettings>;
540
+ versions?: Partial<DeviceStateVersions>;
541
+ capabilities?: Array<number | string>;
542
+ verification?: DeviceFeaturesVerify;
543
+ raw?: DeviceFeaturesRawPatch;
544
+ };
545
+ type DeviceStateEvent = {
546
+ connectId: string | null;
547
+ state: DeviceState;
548
+ revision: number;
549
+ source: DeviceStateUpdateSource;
550
+ changedKeys: string[];
551
+ };
552
+ type NormalizedFeatures = {
581
553
  protocol: DeviceFeaturesProtocol;
582
554
  protocolVersion?: number | null;
583
555
  deviceType: IDeviceType;
@@ -606,11 +578,23 @@ type Features = {
606
578
  sdProtection: boolean | null;
607
579
  wipeCodeProtection: boolean | null;
608
580
  passphraseAlwaysOnDevice: boolean | null;
581
+ /** `attach_to_pin_enabled`:是否至少存在一个 Attach PIN 绑定。 */
609
582
  attachToPinEnabled?: boolean | null;
610
- safetyChecks: string | null;
583
+ safetyChecks: Enum_SafetyCheckLevel | null;
611
584
  autoLockDelayMs: number | null;
585
+ autoShutdownDelayMs: number | null;
612
586
  displayRotation: number | null;
613
587
  experimentalFeatures: boolean | null;
588
+ wallpaperPath: string | null;
589
+ brightness: number | null;
590
+ animationEnabled: boolean | null;
591
+ tapToWake: boolean | null;
592
+ hapticFeedback: boolean | null;
593
+ deviceNameDisplayEnabled: boolean | null;
594
+ airgapMode: boolean | null;
595
+ fidoEnabled: boolean | null;
596
+ usbLockEnabled: boolean | null;
597
+ randomKeypad: boolean | null;
614
598
  firmwareVersion: string | null;
615
599
  bootloaderVersion: string | null;
616
600
  boardVersion: string | null;
@@ -630,9 +614,16 @@ type Features = {
630
614
  unlockedAttachPin?: boolean;
631
615
  raw?: DeviceFeaturesRaw;
632
616
  };
617
+ type Features = NormalizedFeatures & Partial<Omit<Messages.Features, keyof NormalizedFeatures>> & Partial<Omit<Messages.OnekeyFeatures, keyof NormalizedFeatures | keyof Messages.Features>>;
633
618
  type OnekeyFeatures = Messages.OnekeyFeatures;
634
- type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
635
- type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
619
+ type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2 | EDeviceType.Neo;
620
+ /**
621
+ * model_classic: 'classic' | 'classic1s' | 'classicpure'
622
+ * model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
623
+ * model_touch: 'touch' | 'pro'
624
+ * model_pro2: 'pro2' | 'neo'
625
+ */
626
+ type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s' | 'model_pro2';
636
627
  declare const DeviceModelToTypes: {
637
628
  [deviceModel in IDeviceModel]: IDeviceType[];
638
629
  };
@@ -645,7 +636,6 @@ type ITransportStatus = 'valid' | 'outdated';
645
636
  type IVersionRange = {
646
637
  min: string;
647
638
  max?: string;
648
- unsupported?: boolean;
649
639
  };
650
640
  type DeviceFirmwareRange = {
651
641
  [deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
@@ -696,303 +686,565 @@ type SupportFeatures = {
696
686
  modifyHomescreen: SupportFeatureType;
697
687
  };
698
688
 
699
- type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
700
- type ConnectSettings = {
701
- connectSrc?: string;
702
- debug?: boolean;
703
- transportReconnect?: boolean;
704
- lazyLoad?: boolean;
705
- origin?: string;
706
- parentOrigin?: string;
707
- configSrc: string;
708
- iframeSrc: string;
709
- version: string;
710
- priority: number;
711
- trustedHost: boolean;
712
- supportedBrowser?: boolean;
713
- env: transportEnv;
714
- timestamp: number;
715
- isFrame?: boolean;
716
- preRelease?: boolean;
717
- fetchConfig?: boolean;
718
- extension?: string;
719
- configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
720
- };
721
- type IVersionArray = [number, number, number];
722
- type ILocale = 'zh-CN' | 'en-US';
723
- type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04' | 'CRATE';
724
- type IProtocolV2FirmwareComponent = {
725
- target: IProtocolV2FirmwareComponentTarget;
726
- url: string;
727
- fingerprint?: string;
728
- version?: IVersionArray;
729
- resourceManifest?: IProtocolV2ResourceManifest;
730
- };
731
- type IProtocolV2ResourceManifestPackage = {
732
- name?: string;
733
- path: string;
734
- type?: string;
735
- version?: IVersionArray;
736
- sha256?: string;
737
- payloadHash?: string;
738
- headerHash?: string;
739
- };
740
- type IProtocolV2ResourceManifest = {
741
- format?: 'okpkg-crate' | string;
742
- target?: 'CRATE' | string;
743
- version?: IVersionArray;
744
- packages: IProtocolV2ResourceManifestPackage[];
745
- };
746
- type IFirmwareReleaseInfo = {
747
- required: boolean;
748
- url: string;
749
- firmwareType?: EFirmwareType;
750
- resource?: string;
751
- fullResource?: string;
752
- fullResourceRange?: string[];
753
- bootloaderResource?: string;
754
- bootloaderVersion?: IVersionArray;
755
- displayBootloaderVersion?: IVersionArray;
756
- bootloaderRelatedFirmwareVersion?: IVersionArray;
757
- upgradeType?: 'payload-package-set' | string;
758
- components?: Record<string, IProtocolV2FirmwareComponent>;
759
- installOrder?: string[];
760
- resourceManifest?: IProtocolV2ResourceManifest;
761
- bootloaderChangelog?: {
762
- [k in ILocale]: string;
763
- };
764
- fingerprint: string;
765
- version: IVersionArray;
766
- changelog: {
767
- [k in ILocale]: string;
768
- };
769
- };
770
- type IBLEFirmwareReleaseInfo = {
771
- required: boolean;
772
- url: string;
773
- webUpdate: string;
774
- fingerprint: string;
775
- fingerprintWeb: string;
776
- version: IVersionArray;
777
- changelog: {
778
- [k in ILocale]: string;
779
- };
780
- };
781
- type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
782
- type DeviceTypeMap = {
783
- [k in IKnownDevice]: {
784
- firmware: IFirmwareReleaseInfo[];
785
- 'firmware-v1'?: IFirmwareReleaseInfo[];
786
- 'firmware-v2'?: IFirmwareReleaseInfo[];
787
- 'firmware-v8'?: IFirmwareReleaseInfo[];
788
- 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
789
- ble: IBLEFirmwareReleaseInfo[];
790
- };
689
+ type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
690
+ type GetDeviceStateParams = CommonParams & {
691
+ scope?: DeviceStateScope;
791
692
  };
792
- type AssetsMap = {
793
- bridge: {
794
- version: IVersionArray;
795
- linux32Rpm: string;
796
- linux64Rpm: string;
797
- linux32Deb: string;
798
- linux64Deb: string;
799
- win: string;
800
- mac: string;
801
- sha256sumAsc: string;
802
- changelog: {
803
- [k in ILocale]: string;
804
- };
805
- };
693
+ /** Internal state-read options, not part of the public CoreApi. */
694
+ type DeviceStateReadOptions = {
695
+ refreshSections?: DeviceStateSection[];
696
+ includeRaw?: boolean;
806
697
  };
807
- type RemoteConfigResponse = {
808
- bridge: AssetsMap['bridge'];
809
- } & DeviceTypeMap;
810
-
811
- declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
812
- declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
813
-
814
- declare function testInitializeDeviceDuration(connectId?: string, params?: CommonParams): Response<number>;
815
-
816
- declare function preInitialize(connectId: string, params?: CommonParams): Response<boolean>;
817
-
818
- declare function getLogs(): Response<string[]>;
698
+ declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
819
699
 
820
- declare function checkBridgeStatus(): Response<boolean>;
700
+ type DeviceDescriptorDiff = {
701
+ didUpdate: boolean;
702
+ connected: OneKeyDeviceInfo[];
703
+ disconnected: OneKeyDeviceInfo[];
704
+ changedSessions: OneKeyDeviceInfo[];
705
+ changedDebugSessions: OneKeyDeviceInfo[];
706
+ acquired: OneKeyDeviceInfo[];
707
+ debugAcquired: OneKeyDeviceInfo[];
708
+ released: OneKeyDeviceInfo[];
709
+ debugReleased: OneKeyDeviceInfo[];
710
+ descriptors: OneKeyDeviceInfo[];
711
+ };
821
712
 
822
- type CheckBridgeReleaseResponse = {
823
- shouldUpdate: boolean;
824
- status: 'outdated' | 'valid';
825
- releaseVersion: string;
826
- } | null;
827
- declare function checkBridgeRelease(connectId?: string, params?: CommonParams & {
828
- willUpdateFirmwareVersion?: string;
829
- }): Response<CheckBridgeReleaseResponse>;
713
+ declare class DeviceConnector {
714
+ transport?: Transport;
715
+ listenTimestamp: number;
716
+ current: OneKeyDeviceInfo[] | null;
717
+ upcoming: OneKeyDeviceInfo[];
718
+ listening: boolean;
719
+ constructor();
720
+ private getActiveTransport;
721
+ enumerate(): Promise<DeviceDescriptorDiff | undefined>;
722
+ listen(): Promise<void>;
723
+ stop(): void;
724
+ acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, expectedProtocol?: HardwareConnectProtocol, protocolHint?: HardwareConnectProtocol): Promise<string | undefined>;
725
+ release(session: string, onclose: boolean): Promise<void>;
726
+ disconnect(session: string | undefined | null): Promise<void>;
727
+ promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
728
+ _reportDevicesChange(): void;
729
+ }
830
730
 
831
- type CheckBootloaderReleaseResponse = {
832
- shouldUpdate: boolean;
833
- status: 'outdated' | 'valid';
834
- release: string | undefined;
835
- bootloaderMode: boolean;
836
- } | null;
837
- type CheckBootloaderReleaseParams = {
838
- willUpdateFirmwareVersion?: string;
839
- firmwareType?: EFirmwareType;
731
+ type InitOptions = {
732
+ initSession?: boolean;
733
+ deviceId?: string;
734
+ passphraseState?: string;
735
+ deriveCardano?: boolean;
736
+ connectProtocol?: HardwareConnectProtocol;
737
+ forceProtocolDetection?: boolean;
738
+ protocolV2DeviceInfoTimeoutMs?: number;
739
+ /** Refresh Protocol V2 runtime state before returning discovery results. */
740
+ refreshRuntimeState?: boolean;
840
741
  };
841
- declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
742
+ type RunOptions = {
743
+ keepSession?: boolean;
744
+ skipInitialize?: boolean;
745
+ } & InitOptions;
746
+ interface DeviceEvents {
747
+ [DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
748
+ [DEVICE.PIN_ON_DEVICE]: [Device, DeviceSessionPinType, ProtocolV2UiEventMetadata?];
749
+ [DEVICE.PIN_ON_DEVICE_COMPLETE]: [Device, HardwareUiInteractionMeta];
750
+ [DEVICE.PASSPHRASE_ON_DEVICE]: [Device, PassphraseRequestPayload?];
751
+ [DEVICE.ATTACH_PIN_ON_DEVICE]: [Device, PassphraseRequestPayload?];
752
+ [DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
753
+ [DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
754
+ [DEVICE.STATE]: [Device, DeviceStateEvent];
755
+ [DEVICE.PASSPHRASE]: [
756
+ Device,
757
+ PassphraseRequestPayload,
758
+ (response: PassphrasePromptResponse, error?: Error) => void
759
+ ];
760
+ [DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
761
+ Device,
762
+ (err: any, deviceId: string) => void
763
+ ];
764
+ [DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
765
+ Device,
766
+ (err: any, deviceId: string) => void
767
+ ];
768
+ }
769
+ /**
770
+ * Pre-populate the device session cache with a known session ID.
771
+ *
772
+ * This allows short-lived processes (e.g. CLI) to restore a previously
773
+ * obtained session, avoiding the need to re-enter passphrase on every
774
+ * invocation. The session must have been obtained from a prior
775
+ * wallet-session call on the same device. This compatibility hook is intended
776
+ * for a trusted CLI process restoring its own OS-keychain entry.
777
+ *
778
+ * @param deviceId - The device's device_id (from features)
779
+ * @param passphraseState - The passphrase state token
780
+ * @param sessionId - The session_id to cache (from features.session_id)
781
+ */
782
+ declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
783
+ interface Device {
784
+ on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
785
+ off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
786
+ emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
787
+ }
788
+ declare class Device extends EventEmitter {
789
+ /**
790
+ * 设备标识对象
791
+ */
792
+ originalDescriptor: OneKeyDeviceInfo;
793
+ sdkInstanceId?: string;
794
+ /**
795
+ * 设备实例唯一标识
796
+ */
797
+ instanceId: string;
798
+ createdAt: number;
799
+ /**
800
+ * 设备主 ID
801
+ * 蓝牙连接时是设备的 UUID
802
+ * USB连接时是设备的 sessionID
803
+ */
804
+ mainId?: string | null;
805
+ /**
806
+ * 通信管道,向设备发送请求
807
+ */
808
+ deviceConnector?: DeviceConnector | null;
809
+ /**
810
+ * 固件命令
811
+ */
812
+ commands: DeviceCommands;
813
+ /**
814
+ * 可取消的操作
815
+ */
816
+ private cancelableAction?;
817
+ /**
818
+ * 设备是否被占用
819
+ */
820
+ private deviceAcquired;
821
+ /** Canonical device-state cache; legacy Features is a compatibility projection. */
822
+ private stateStore;
823
+ /** Force the next initialization to reload DeviceInfo after reconnect or reboot. */
824
+ private protocolV2StateNeedsReload;
825
+ /** Runtime context negotiated once per active Protocol V2 link. */
826
+ private protocolV2RuntimeContext?;
827
+ /** Coalesces concurrent first-use runtime negotiation on the same active link. */
828
+ private protocolV2RuntimeContextPromise?;
829
+ /** Invalidates an in-flight runtime-context response without adding a transport epoch. */
830
+ private protocolV2RuntimeContextRequestToken?;
831
+ private protocolV2UiInteraction?;
832
+ private protocolV2UiInteractionCounter;
833
+ get state(): (DeviceState & {
834
+ raw?: DeviceFeaturesRaw | undefined;
835
+ }) | undefined;
836
+ get features(): Features | undefined;
837
+ set features(features: Features | undefined);
838
+ runPromise?: Deferred<void> | null;
839
+ externalState: string[];
840
+ unavailableCapabilities: UnavailableCapabilities;
841
+ instance: number;
842
+ internalState: string[];
843
+ needReloadDevice: boolean;
844
+ /**
845
+ * 执行 API 方法后是否保留 SessionID
846
+ */
847
+ keepSession: boolean;
848
+ passphraseState: string | undefined;
849
+ pendingCallbackPromise?: Deferred<void>;
850
+ /** Pre-initialize timestamp (ms) */
851
+ private preInitializedAt?;
852
+ /** Pre-initialize context, used to verify state consistency before skipping */
853
+ private preInitializeMeta?;
854
+ /** Last Initialize duration (ms), reported as "saved" when a skip happens */
855
+ private lastInitializeDurationMs?;
856
+ constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
857
+ static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
858
+ toMessageObject(): Device$1 | null;
859
+ /**
860
+ * Device connect
861
+ * @returns {Promise<boolean>}
862
+ */
863
+ connect(connectProtocol?: HardwareConnectProtocol, options?: {
864
+ forceProtocolDetection?: boolean;
865
+ }): Promise<boolean>;
866
+ acquire(expectedProtocol?: HardwareConnectProtocol, options?: {
867
+ throwOnRunPromiseError?: boolean;
868
+ forceProtocolDetection?: boolean;
869
+ }): Promise<void>;
870
+ release(): Promise<void>;
871
+ /**
872
+ * Pre-initialize: connect + Initialize ahead of the sign.
873
+ */
874
+ preInitialize(initOptions?: InitOptions): Promise<void>;
875
+ markPreInitialized(meta?: {
876
+ passphraseState?: string;
877
+ }): void;
878
+ clearPreInitialized(): void;
879
+ isPreInitializeMetaMatch(payload?: {
880
+ passphraseState?: string;
881
+ }): boolean;
882
+ isPreInitializedValid(ttlMs: number): boolean;
883
+ setLastInitializeDuration(durationMs: number): void;
884
+ getLastInitializeDuration(): number | undefined;
885
+ getCommands(): DeviceCommands;
886
+ /**
887
+ * Canonical protocol discriminator.
888
+ *
889
+ * descriptor.protocolType is established by active probing; V2 features are mapped
890
+ * from DeviceInfoGet. All protocol branches must use this method instead of reading
891
+ * originalDescriptor.protocolType directly or inferring a protocol from features.
892
+ */
893
+ getProtocol(): 'V1' | 'V2';
894
+ isProtocolV2(): boolean;
895
+ getCurrentDeviceType(): IDeviceType;
896
+ getCurrentDeviceId(): string | undefined;
897
+ getCurrentSerialNo(): string;
898
+ getConnectId(): string;
899
+ getCurrentBleName(): string | null;
900
+ getCurrentLabel(): string | null;
901
+ getCurrentDisplayName(): string | null;
902
+ getCurrentPassphraseProtection(): boolean | null | undefined;
903
+ getCurrentFirmwareType(): EFirmwareType;
904
+ getCurrentFirmwareVersionString(): string;
905
+ getCurrentBLEFirmwareVersionString(): string | undefined;
906
+ getCurrentBootloaderVersionString(): string | undefined;
907
+ getCurrentSafetyChecks(): _onekeyfe_hd_transport.Enum_SafetyCheckLevel | null | undefined;
908
+ getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
909
+ supportNewPassphrase(): SupportFeatureType;
910
+ supportInputPinOnSoftware(): SupportFeatureType;
911
+ supportModifyHomescreen(): SupportFeatureType;
912
+ private getSessionCacheDeviceKey;
913
+ private reconcileSessionCacheDeviceIdentity;
914
+ getInternalState(_deviceId?: string): string | undefined;
915
+ getStandardInternalState(_deviceId?: string): {
916
+ passphraseState: string;
917
+ sessionId: string;
918
+ } | undefined;
919
+ updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null, walletType?: 'standard' | 'hidden'): void;
920
+ private setInternalState;
921
+ clearInternalState(_deviceId?: string): void;
922
+ clearStandardInternalState(_deviceId?: string): void;
923
+ initialize(options?: InitOptions): Promise<void>;
924
+ /**
925
+ * Device initialization over Protocol V2.
926
+ *
927
+ * Protocol V2 bypasses legacy Initialize/GetFeatures and builds its canonical
928
+ * features state directly from DeviceInfoGet.
929
+ */
930
+ private _initializeProtocolV2;
931
+ getFeatures(): Promise<Features | undefined>;
932
+ getDeviceState(params?: DeviceStateReadOptions): Promise<DeviceState>;
933
+ _updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
934
+ updateState(patch: DeviceStatePatch, source: DeviceStateUpdateSource): DeviceState & {
935
+ raw?: DeviceFeaturesRaw | undefined;
936
+ };
937
+ updateFeaturesPatch(patch: Partial<Features>, source: DeviceStateUpdateSource): Features | undefined;
938
+ ensureProtocolV2RuntimeContext(timeoutMs?: number): Promise<ProtocolInfo>;
939
+ probeProtocolV2RuntimeState(deviceInfo?: ProtocolV2DeviceInfo, timeoutMs?: number): Promise<Features>;
940
+ updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo, deviceStatus?: DeviceStatus$1 | null, runtimeMode?: ProtocolV2RuntimeMode, protocolInfo?: ProtocolInfo): Features;
941
+ updateProtocolV2Status(status: DeviceStatus$1): Features;
942
+ markTransportDisconnected(): void;
943
+ invalidateAfterWipe(): void;
944
+ markProtocolV2Reboot(rebootType: DeviceRebootType): void;
945
+ /**
946
+ * 暂时只在 acquire 后更新 Session ID
947
+ * 后续看是否有需要依据 listen 返回结果更新
948
+ * @param descriptor
949
+ */
950
+ updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
951
+ updateFromCache(device: Device): void;
952
+ run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
953
+ _runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions, runPromise: Deferred<void>): Promise<void>;
954
+ interruptionFromOutside(): Promise<void>;
955
+ interruptionFromUser(): Promise<void>;
956
+ setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
957
+ clearCancelableAction(): void;
958
+ getMode(): EOneKeyDeviceMode;
959
+ getStatus(): "available" | "occupied" | "used";
960
+ getFirmwareVersion(): IVersionArray | null;
961
+ getBLEFirmwareVersion(): IVersionArray | null;
962
+ isUsed(): boolean;
963
+ hasDeviceAcquire(): boolean;
964
+ isUsedHere(): boolean;
965
+ isUsedElsewhere(): boolean;
966
+ isBootloader(): boolean | undefined;
967
+ isRomloader(): boolean | undefined;
968
+ isInitialized(): boolean | undefined;
969
+ isSeedless(): boolean | undefined;
970
+ isUnacquired(): boolean;
971
+ hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
972
+ hasUsePassphrase(): boolean;
973
+ checkDeviceId(deviceId: string): boolean;
974
+ lockDevice(): Promise<Success$1>;
975
+ beginProtocolV2UiInteraction(): void;
976
+ createProtocolV2UiPhaseMetadata(phase: HardwareUiInteractionMeta['phase'], transition: HardwareUiInteractionMeta['transition'], options?: {
977
+ phaseId?: string;
978
+ outcome?: HardwareUiInteractionMeta['outcome'];
979
+ }): HardwareUiInteractionMeta | undefined;
980
+ completeProtocolV2UiPhase(phase: HardwareUiInteractionMeta, outcome?: HardwareUiInteractionMeta['outcome']): HardwareUiInteractionMeta | undefined;
981
+ finishProtocolV2UiInteraction(outcome?: HardwareUiInteractionMeta['outcome'], options?: {
982
+ ensureMetadata?: boolean;
983
+ }): HardwareUiInteractionMeta | undefined;
984
+ hasOpenProtocolV2UiInteraction(): boolean;
985
+ supportUnlockVersionRange(): DeviceFirmwareRange;
986
+ unlockDevice(pinType?: DeviceSessionPinType, options?: ProtocolV2UiEventMetadata & {
987
+ emitUiEvent?: boolean;
988
+ }): Promise<Features | undefined>;
989
+ checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean, deriveCardano?: boolean): Promise<boolean>;
990
+ }
842
991
 
843
- type FirmwareRelease$2 = {
844
- shouldUpdate?: boolean;
845
- status: IDeviceFirmwareStatus;
846
- changelog?: {
847
- 'zh-CN': string;
848
- 'en-US': string;
849
- }[];
850
- release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo;
851
- bootloaderMode?: boolean;
992
+ /**
993
+ * SDK Tracing Utilities
994
+ * Tracks object instances and request call chains across multiple SDK instances
995
+ */
996
+ /**
997
+ * Generate SDK instance ID
998
+ * @returns Format: "SDK-<number>-<timestamp>"
999
+ * @example "SDK-1-123456"
1000
+ */
1001
+ declare function generateSdkInstanceId(): string;
1002
+ /**
1003
+ * Generate globally unique instance ID
1004
+ * @param type Instance type (Device, DeviceCommands, BaseMethod, etc.)
1005
+ * @param sdkInstanceId SDK instance ID (optional)
1006
+ * @returns Format: <SDK>.<type>-<number>-<timestamp>
1007
+ * @example "SDK-1.Device-1-123456" or "Device-1-123456"
1008
+ */
1009
+ declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
1010
+ /**
1011
+ * Request context information
1012
+ */
1013
+ interface RequestContext {
1014
+ /** Request unique ID (reuses BaseMethod.responseID) */
1015
+ responseID: number;
1016
+ /** SDK instance ID */
1017
+ sdkInstanceId?: string;
1018
+ /** API method name */
1019
+ methodName: string;
1020
+ /** Device connection ID */
1021
+ connectId?: string;
1022
+ /** Device instance ID */
1023
+ deviceInstanceId?: string;
1024
+ /** DeviceCommands instance ID */
1025
+ commandsInstanceId?: string;
1026
+ /** Parent request ID (for nested calls like allNetworkGetAddress) */
1027
+ parentResponseID?: number;
1028
+ /** Request start time */
1029
+ startTime: number;
1030
+ /** Request end time */
1031
+ endTime?: number;
1032
+ /** Request status */
1033
+ status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
1034
+ /** Error message */
1035
+ error?: string;
1036
+ }
1037
+ /**
1038
+ * SDK instance tracing context
1039
+ */
1040
+ interface SdkTracingContext {
1041
+ /** SDK instance ID */
1042
+ sdkInstanceId: string;
1043
+ /** Creation timestamp */
1044
+ createdAt: number;
1045
+ /** Active requests */
1046
+ activeRequests: Map<number, RequestContext>;
1047
+ }
1048
+ /**
1049
+ * Create SDK instance tracing context
1050
+ */
1051
+ declare function createSdkTracingContext(): SdkTracingContext;
1052
+ /**
1053
+ * Create and register request context
1054
+ * @param responseID Request ID (reuses BaseMethod.responseID)
1055
+ * @param methodName API method name
1056
+ * @param options Additional options
1057
+ */
1058
+ declare function createRequestContext(responseID: number, methodName: string, options?: {
1059
+ sdkInstanceId?: string;
1060
+ connectId?: string;
1061
+ deviceInstanceId?: string;
1062
+ commandsInstanceId?: string;
1063
+ parentResponseID?: number;
1064
+ }): RequestContext;
1065
+ /**
1066
+ * Update request context
1067
+ */
1068
+ declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
1069
+ /**
1070
+ * Complete request context
1071
+ */
1072
+ declare function completeRequestContext(responseID: number, error?: Error): void;
1073
+ /**
1074
+ * Get active requests for specific Device instance
1075
+ */
1076
+ declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
1077
+ /**
1078
+ * Format request context for logging
1079
+ */
1080
+ declare function formatRequestContext(context: RequestContext): string;
1081
+ /**
1082
+ * Cleanup specific SDK instance
1083
+ */
1084
+ declare function cleanupSdkInstance(sdkInstanceId: string): void;
1085
+
1086
+ declare class Core extends EventEmitter {
1087
+ private tracingContext;
1088
+ readonly sdkInstanceId: string;
1089
+ private requestQueue;
1090
+ private disposePromise?;
1091
+ private prePendingCallPromise;
1092
+ private methodSynchronize;
1093
+ constructor();
1094
+ private getCoreContext;
1095
+ handleMessage(message: CoreMessage): Promise<any>;
1096
+ dispose(): Promise<void>;
1097
+ private disposeResources;
1098
+ }
1099
+ declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
1100
+ declare const switchTransport: ({ env, Transport, plugin, }: {
1101
+ env: ConnectSettings['env'];
1102
+ Transport: any;
1103
+ plugin?: LowlevelTransportSharedPlugin | undefined;
1104
+ }) => void;
1105
+
1106
+ declare const PRO2_WALLPAPER_WIDTH = 604;
1107
+ declare const PRO2_WALLPAPER_HEIGHT = 1024;
1108
+ type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
1109
+ declare function encodePro2Wallpaper(options: {
1110
+ width: number;
1111
+ height: number;
1112
+ rgba: Uint8Array | ArrayBuffer;
1113
+ }): {
1114
+ data: Uint8Array;
1115
+ colorFormat: Pro2WallpaperColorFormat;
852
1116
  };
853
- type AllFirmwareRelease = {
854
- firmware: FirmwareRelease$2;
855
- ble: FirmwareRelease$2;
856
- bootloader?: FirmwareRelease$2;
857
- bridge?: FirmwareRelease$2;
858
- features?: Features$1;
1117
+
1118
+ type DeviceUploadWallpaperParams = {
1119
+ width: number;
1120
+ height: number;
1121
+ rgba: Uint8Array | ArrayBuffer;
1122
+ fileName?: string;
1123
+ chunkSize?: number;
859
1124
  };
860
- type CheckAllFirmwareReleaseParams = {
861
- checkBridgeRelease?: boolean;
862
- firmwareType?: EFirmwareType;
1125
+ type DeviceUploadWallpaperResponse = {
1126
+ path: string;
1127
+ size: number;
1128
+ colorFormat: Pro2WallpaperColorFormat;
1129
+ message?: string;
863
1130
  };
864
- declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
865
1131
 
866
- type CheckFirmwareTypeAvailableParams = {
867
- deviceType: EDeviceType;
868
- firmwareType: EFirmwareType;
1132
+ type Pro2NftImage = {
1133
+ width: number;
1134
+ height: number;
1135
+ rgba: Uint8Array | ArrayBuffer;
869
1136
  };
870
- declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
871
-
872
- declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
873
-
874
- declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
875
1137
 
876
- type DeviceInfoProtocol = ProtocolType | 'unknown';
877
- type DeviceInfoSource = 'features' | 'protocolV1OneKeyFeatures' | 'deviceInfo';
878
- type DeviceInfoScope = 'basic' | 'versions' | 'verify' | 'full';
879
- type GetDeviceInfoParams = {
880
- scope?: DeviceInfoScope;
881
- refresh?: boolean;
882
- includeRaw?: boolean;
883
- };
884
- type DeviceInfoMode = 'normal' | 'bootloader' | 'notInitialized' | 'unknown';
885
- type DeviceInfoStatus = {
886
- mode: DeviceInfoMode;
887
- initialized: boolean | null;
888
- bootloaderMode: boolean | null;
889
- unlocked: boolean | null;
890
- passphraseProtection: boolean | null;
891
- attachToPinEnabled?: boolean | null;
892
- unlockedAttachPin?: boolean | null;
893
- backupRequired: boolean | null;
894
- noBackup: boolean | null;
895
- language: string | null;
896
- bleEnabled: boolean | null;
897
- };
898
- type DeviceProfileVersions = {
899
- firmware: string | null;
900
- bootloader: string | null;
901
- board: string | null;
902
- ble: string | null;
903
- se01?: string | null;
904
- se02?: string | null;
905
- se03?: string | null;
906
- se04?: string | null;
907
- se01Boot?: string | null;
908
- se02Boot?: string | null;
909
- se03Boot?: string | null;
910
- se04Boot?: string | null;
1138
+ type DeviceUploadNftParams = {
1139
+ image: Pro2NftImage;
1140
+ thumbnail: Pro2NftImage;
1141
+ title: string;
1142
+ subtitle: string;
1143
+ timestampMs?: number;
1144
+ chunkSize?: number;
1145
+ paceMs?: number;
1146
+ timeoutMs?: number;
1147
+ };
1148
+ type DeviceUploadNftResponse = {
1149
+ basename: string;
1150
+ imagePath: string;
1151
+ thumbnailPath: string;
1152
+ metadataPath: string;
1153
+ totalSize: number;
1154
+ nftUpdated: true;
1155
+ message?: string;
911
1156
  };
912
- type DeviceProfileVerify = {
913
- firmwareBuildId?: string;
914
- firmwareHash?: string;
915
- bootloaderBuildId?: string;
916
- bootloaderHash?: string;
917
- boardBuildId?: string;
918
- boardHash?: string;
919
- bleBuildId?: string;
920
- bleHash?: string;
921
- se01BuildId?: string;
922
- se01Hash?: string;
923
- se02BuildId?: string;
924
- se02Hash?: string;
925
- se03BuildId?: string;
926
- se03Hash?: string;
927
- se04BuildId?: string;
928
- se04Hash?: string;
929
- se01BootBuildId?: string;
930
- se01BootHash?: string;
931
- se02BootBuildId?: string;
932
- se02BootHash?: string;
933
- se03BootBuildId?: string;
934
- se03BootHash?: string;
935
- se04BootBuildId?: string;
936
- se04BootHash?: string;
1157
+
1158
+ type FileInfo = {
1159
+ path: string;
1160
+ offset: number;
1161
+ total_size: number;
1162
+ data?: Uint8Array;
1163
+ data_hash?: number;
1164
+ processed_byte?: number;
1165
+ chunks?: number;
937
1166
  };
938
- type DeviceProfileRaw = {
939
- features?: Features;
940
- protocolV1OneKeyFeatures?: OnekeyFeatures;
941
- protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
1167
+ type TestProtocolV2PingParams = CommonParams & {
1168
+ /** Firmware diagnostic echo payload, limited to 63 UTF-8 bytes. */
1169
+ message?: string;
942
1170
  };
943
- type DeviceProfile = {
944
- protocol: DeviceInfoProtocol;
945
- sources: DeviceInfoSource[];
946
- deviceType: IDeviceType;
947
- firmwareType: EFirmwareType;
948
- deviceId: string;
949
- serialNo: string;
950
- label: string | null;
951
- bleName: string | null;
952
- status: DeviceInfoStatus;
953
- versions: DeviceProfileVersions;
954
- verify?: DeviceProfileVerify;
955
- raw?: DeviceProfileRaw;
1171
+ declare function testProtocolV2Ping(connectId: string, params?: TestProtocolV2PingParams): Response<Success$1>;
1172
+ declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
1173
+ declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<OnboardingStatus>;
1174
+ declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
1175
+ declare function deviceUploadNft(connectId: string, params: CommonParams & DeviceUploadNftParams): Response<DeviceUploadNftResponse>;
1176
+ declare function uploadPortfolio(connectId: string, params: {
1177
+ packageBytes: ArrayBuffer | Uint8Array | Blob;
1178
+ timeoutMs?: number | string;
1179
+ }): Response<FileInfo & {
1180
+ portfolioUpdated: true;
1181
+ }>;
1182
+
1183
+ declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
1184
+ declare const off: (type: any, fn: any) => void;
1185
+ declare const removeAllListeners: (type: any) => void;
1186
+
1187
+ declare function uiResponse(response: UiResponseEvent): void;
1188
+
1189
+ type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
1190
+ interface LowLevelInjectApi {
1191
+ call: CallMethod;
1192
+ eventEmitter: EventEmitter$1;
1193
+ init: CoreApi['init'];
1194
+ dispose: CoreApi['dispose'];
1195
+ uiResponse: CoreApi['uiResponse'];
1196
+ cancel: CoreApi['cancel'];
1197
+ updateSettings: CoreApi['updateSettings'];
1198
+ switchTransport: CoreApi['switchTransport'];
1199
+ addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
1200
+ }
1201
+ type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
1202
+ addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
956
1203
  };
957
- declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
958
1204
 
959
- declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
1205
+ declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
1206
+ declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
1207
+
1208
+ declare function testInitializeDeviceDuration(connectId?: string, params?: CommonParams): Response<number>;
1209
+
1210
+ declare function preInitialize(connectId: string, params?: CommonParams): Response<boolean>;
960
1211
 
961
- type GetPassphraseStatePayload = {
1212
+ declare function getLogs(): Response<string[]>;
1213
+
1214
+ type ClearSessionCacheParams = {
1215
+ deviceId?: never;
1216
+ passphraseState?: never;
1217
+ } | {
1218
+ deviceId: string;
962
1219
  passphraseState?: string;
963
- sessionId?: string;
964
- unlockedAttachPin?: boolean;
965
- passphraseProtection?: boolean | null;
966
1220
  };
967
- type GetPassphraseStateParams = CommonParams & {
968
- allowCreateAttachPin?: boolean;
1221
+ type ClearSessionCachePayload = {
1222
+ cleared: true;
969
1223
  };
970
- declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<GetPassphraseStatePayload>;
1224
+ declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
971
1225
 
972
- type FirmwareRelease$1 = {
973
- status: IDeviceFirmwareStatus;
974
- changelog: {
975
- 'en-US': string;
976
- 'zh-CN': string;
977
- }[];
978
- release: IFirmwareReleaseInfo;
979
- bootloaderMode: boolean;
980
- };
981
- type CheckFirmwareReleaseParams = {
982
- firmwareType?: EFirmwareType;
983
- };
984
- declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
1226
+ declare function checkBridgeStatus(): Response<boolean>;
985
1227
 
986
- type BleFirmwareRelease = {
987
- status: IDeviceBLEFirmwareStatus;
988
- changelog: {
989
- 'zh-CN': string;
990
- 'en-US': string;
991
- }[];
992
- release: IBLEFirmwareReleaseInfo;
1228
+ type CheckBridgeReleaseResponse = {
1229
+ shouldUpdate: boolean;
1230
+ status: 'outdated' | 'valid';
1231
+ releaseVersion: string;
1232
+ } | null;
1233
+ declare function checkBridgeRelease(connectId?: string, params?: CommonParams & {
1234
+ willUpdateFirmwareVersion?: string;
1235
+ }): Response<CheckBridgeReleaseResponse>;
1236
+
1237
+ type CheckBootloaderReleaseResponse = {
1238
+ shouldUpdate: boolean;
1239
+ status: 'outdated' | 'valid';
1240
+ release: string | undefined;
993
1241
  bootloaderMode: boolean;
1242
+ } | null;
1243
+ type CheckBootloaderReleaseParams = {
1244
+ willUpdateFirmwareVersion?: string;
1245
+ firmwareType?: EFirmwareType;
994
1246
  };
995
- declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
1247
+ declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
996
1248
 
997
1249
  type IUpdateType = 'firmware' | 'ble';
998
1250
  interface FirmwareUpdateBinaryParams {
@@ -1031,21 +1283,42 @@ interface FirmwareUpdateV3Params {
1031
1283
  firmwareType?: EFirmwareType;
1032
1284
  platform: IPlatform;
1033
1285
  }
1286
+ /**
1287
+ * firmwareUpdateV4 target binaries grouped by DeviceFirmwareTargetType.
1288
+ * Except for romloader, each field maps to a target accepted by bootloader.
1289
+ */
1290
+ type FirmwareUpdateV4Target = 'boot' | 'boot_resources' | 'app_v1' | 'app_v2' | 'coprocessor' | 'resource' | 'se01' | 'se02' | 'se03' | 'se04';
1034
1291
  interface FirmwareUpdateV4Params {
1035
1292
  platform: IPlatform;
1036
1293
  chunkSize?: number;
1037
1294
  firmwareType?: EFirmwareType;
1295
+ targetsToUpdate?: FirmwareUpdateV4Target[];
1296
+ /** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
1038
1297
  romloaderBinary?: ArrayBuffer;
1298
+ /** FW_MGMT_TARGET_BOOTLOADER = 3 */
1039
1299
  bootloaderBinary?: ArrayBuffer;
1300
+ /** FW_MGMT_TARGET_APPLICATION_P1 = 4 */
1040
1301
  applicationP1Binary?: ArrayBuffer;
1302
+ /** FW_MGMT_TARGET_APPLICATION_P2 = 5 */
1041
1303
  applicationP2Binary?: ArrayBuffer;
1304
+ /** FW_MGMT_TARGET_COPROCESSOR = 6 */
1042
1305
  coprocessorBinary?: ArrayBuffer;
1306
+ /** FW_MGMT_TARGET_SE01-04 = 7-10 */
1043
1307
  se01Binary?: ArrayBuffer;
1044
1308
  se02Binary?: ArrayBuffer;
1045
1309
  se03Binary?: ArrayBuffer;
1046
1310
  se04Binary?: ArrayBuffer;
1047
- resourceBinaries?: ArrayBuffer[];
1048
1311
  forcedUpdateRes?: boolean;
1312
+ /**
1313
+ * Arbitrary Protocol V2 resource files written directly with FilesystemFileWrite.
1314
+ * Use this for manifest-driven boot resources and other non-RESC files.
1315
+ */
1316
+ resourceFiles?: Array<{
1317
+ binary: ArrayBuffer;
1318
+ devicePath: string;
1319
+ size?: number;
1320
+ fileHash?: string;
1321
+ }>;
1049
1322
  }
1050
1323
  declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
1051
1324
  bleVersion: string;
@@ -1058,6 +1331,144 @@ declare function firmwareUpdateV4(connectId: string | undefined, params: Params<
1058
1331
  bootloaderVersion: string;
1059
1332
  }>;
1060
1333
 
1334
+ type FirmwareRelease$2 = {
1335
+ shouldUpdate?: boolean;
1336
+ status: IDeviceFirmwareStatus;
1337
+ changelog?: {
1338
+ 'zh-CN': string;
1339
+ 'en-US': string;
1340
+ }[];
1341
+ release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo | IFirmwareReleaseInfo;
1342
+ bootloaderMode?: boolean;
1343
+ };
1344
+ type ProtocolV2FirmwareComponentReleaseStatus = 'valid' | 'outdated' | 'unknown' | 'unsupported';
1345
+ type ProtocolV2FirmwareReleaseStatus = 'unavailable' | 'valid' | 'unknown' | 'outdated' | 'required';
1346
+ type ProtocolV2FirmwareComponentRelease = {
1347
+ configKey: string;
1348
+ componentTarget: IProtocolV2FirmwareComponentTarget;
1349
+ updateTarget: FirmwareUpdateV4Target | null;
1350
+ currentVersion: string | null;
1351
+ targetVersion: string | null;
1352
+ status: ProtocolV2FirmwareComponentReleaseStatus;
1353
+ required: boolean;
1354
+ };
1355
+ type AllFirmwareRelease = {
1356
+ firmware: FirmwareRelease$2;
1357
+ ble: FirmwareRelease$2;
1358
+ bootloader?: FirmwareRelease$2;
1359
+ bridge?: FirmwareRelease$2;
1360
+ features?: Features;
1361
+ protocol?: 'V1' | 'V2';
1362
+ deviceType?: 'pro2' | 'neo';
1363
+ firmwareType?: EFirmwareType;
1364
+ status?: ProtocolV2FirmwareReleaseStatus;
1365
+ hasUpgrade?: boolean;
1366
+ required?: boolean;
1367
+ resourceStatus?: 'valid' | 'outdated' | 'unknown';
1368
+ currentVersions?: DeviceStateVersions;
1369
+ components?: ProtocolV2FirmwareComponentRelease[];
1370
+ targetsToUpdate?: FirmwareUpdateV4Target[];
1371
+ release?: IFirmwareReleaseInfo;
1372
+ };
1373
+ type CheckAllFirmwareReleaseParams = {
1374
+ checkBridgeRelease?: boolean;
1375
+ checkFirmwareHash?: boolean;
1376
+ firmwareType?: EFirmwareType;
1377
+ };
1378
+ declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
1379
+
1380
+ type CheckFirmwareTypeAvailableParams = {
1381
+ deviceType: EDeviceType;
1382
+ firmwareType: EFirmwareType;
1383
+ };
1384
+ declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
1385
+
1386
+ declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
1387
+
1388
+ declare function detectDeviceConnectProtocol(connectId: string): Response<HardwareConnectProtocol>;
1389
+
1390
+ /**
1391
+ * @deprecated Use `getDeviceState` for both Protocol V1 and Protocol V2 devices.
1392
+ */
1393
+ declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
1394
+
1395
+ /**
1396
+ * @deprecated Use `getDeviceState(connectId, { scope: 'firmware' })`.
1397
+ */
1398
+ declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
1399
+
1400
+ type GetPassphraseStateParams = CommonParams;
1401
+ /**
1402
+ * Compatibility wallet-state API for existing App integrations.
1403
+ *
1404
+ * Protocol V1 keeps its parameterless firmware flow. Protocol V2 maps the existing
1405
+ * `useEmptyPassphrase` and `initSession` intent to the device-only wallet-session flow.
1406
+ * New integrations should prefer `openWalletSession` for explicit wallet intent.
1407
+ */
1408
+ declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
1409
+
1410
+ declare const OpenWalletSessionMode: {
1411
+ readonly Standard: "standard";
1412
+ readonly SelectHidden: "select-hidden";
1413
+ readonly ResumeHidden: "resume-hidden";
1414
+ };
1415
+ type OpenWalletSessionModeValue = (typeof OpenWalletSessionMode)[keyof typeof OpenWalletSessionMode];
1416
+ type OpenWalletSessionParams = {
1417
+ mode: typeof OpenWalletSessionMode.Standard;
1418
+ deviceId?: never;
1419
+ passphraseState?: never;
1420
+ } | {
1421
+ mode: typeof OpenWalletSessionMode.SelectHidden;
1422
+ deviceId?: never;
1423
+ passphraseState?: never;
1424
+ } | {
1425
+ mode: typeof OpenWalletSessionMode.ResumeHidden;
1426
+ deviceId: string;
1427
+ passphraseState: string;
1428
+ };
1429
+ type OpenWalletSessionPayloadBase = {
1430
+ protocol: 'V1' | 'V2';
1431
+ deviceId: string;
1432
+ resumed: boolean;
1433
+ };
1434
+ type OpenWalletSessionPayload = OpenWalletSessionPayloadBase & ({
1435
+ walletType: 'standard';
1436
+ passphraseState: null;
1437
+ } | {
1438
+ walletType: 'hidden';
1439
+ passphraseState: string;
1440
+ });
1441
+ /**
1442
+ * Opens the standard, hidden, or Attach-to-PIN wallet flow through a unified
1443
+ * Protocol V1/V2 API.
1444
+ */
1445
+ declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
1446
+
1447
+ type FirmwareRelease$1 = {
1448
+ status: IDeviceFirmwareStatus;
1449
+ changelog: {
1450
+ 'en-US': string;
1451
+ 'zh-CN': string;
1452
+ }[];
1453
+ release: IFirmwareReleaseInfo;
1454
+ bootloaderMode: boolean;
1455
+ };
1456
+ type CheckFirmwareReleaseParams = {
1457
+ firmwareType?: EFirmwareType;
1458
+ };
1459
+ declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
1460
+
1461
+ type BleFirmwareRelease = {
1462
+ status: IDeviceBLEFirmwareStatus;
1463
+ changelog: {
1464
+ 'zh-CN': string;
1465
+ 'en-US': string;
1466
+ }[];
1467
+ release: IBLEFirmwareReleaseInfo;
1468
+ bootloaderMode: boolean;
1469
+ };
1470
+ declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
1471
+
1061
1472
  declare function promptWebDeviceAccess(options?: {
1062
1473
  deviceSerialNumberFromUI?: string;
1063
1474
  }): Response<{
@@ -1117,16 +1528,40 @@ type DeviceSettingsParams = {
1117
1528
  language?: string;
1118
1529
  label?: string;
1119
1530
  usePassphrase?: boolean;
1531
+ /** Protocol V1 only. */
1120
1532
  homescreen?: string;
1533
+ /** Protocol V1 only. */
1121
1534
  passphraseSource?: number;
1122
1535
  autoLockDelayMs?: number;
1536
+ /** Protocol V1 only. */
1123
1537
  displayRotation?: number;
1538
+ /** Protocol V1 only. */
1124
1539
  passphraseAlwaysOnDevice?: boolean;
1125
- safetyChecks?: SafetyCheckLevel;
1540
+ /** Protocol V1 only. Uses Enum_SafetyCheckLevel numeric values. */
1541
+ safetyChecks?: Enum_SafetyCheckLevel;
1542
+ /** Protocol V1 only; the current Protocol V2 schema has no matching field. */
1126
1543
  experimentalFeatures?: boolean;
1127
1544
  autoShutdownDelayMs?: number;
1545
+ /** Protocol V1 only; opens the legacy device-side brightness flow. */
1128
1546
  changeBrightness?: boolean;
1547
+ /** Protocol V2 only. */
1548
+ brightness?: number;
1129
1549
  hapticFeedback?: boolean;
1550
+ bluetoothEnabled?: boolean;
1551
+ /** Protocol V2 only; changed through an on-device confirmation page. */
1552
+ airgapMode?: boolean;
1553
+ /** Protocol V2 only. */
1554
+ animationEnabled?: boolean;
1555
+ /** Protocol V2 only. */
1556
+ tapToWake?: boolean;
1557
+ /** Protocol V2 only. */
1558
+ deviceNameDisplayEnabled?: boolean;
1559
+ /** Protocol V2 only. */
1560
+ fidoEnabled?: boolean;
1561
+ /** Protocol V2 only. */
1562
+ usbLockEnabled?: boolean;
1563
+ /** Protocol V2 only. */
1564
+ randomKeypad?: boolean;
1130
1565
  };
1131
1566
  declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
1132
1567
 
@@ -1152,7 +1587,7 @@ type DeviceUploadResourceResponse = Success$1 & {
1152
1587
  declare function deviceUploadResource(connectId: string, params: CommonParams & DeviceUploadResourceParams): Response<DeviceUploadResourceResponse>;
1153
1588
 
1154
1589
  type DeviceSupportFeatures = SupportFeatures & {
1155
- device: Device | null;
1590
+ device: Device$1 | null;
1156
1591
  };
1157
1592
  declare function deviceSupportFeatures(connectId?: string): Response<DeviceSupportFeatures>;
1158
1593
 
@@ -1168,7 +1603,13 @@ declare function deviceUpdateBootloader(connectId: string, params?: DeviceUpdate
1168
1603
 
1169
1604
  declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
1170
1605
 
1171
- declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features$1>;
1606
+ type DeviceUnlockParams = {
1607
+ /**
1608
+ * 限定本次解锁允许使用的 PIN 类型。省略时保持兼容行为,仅允许主 PIN。
1609
+ */
1610
+ pinType?: DeviceSessionPinType;
1611
+ };
1612
+ declare function deviceUnlock(connectId: string, params?: CommonParams & DeviceUnlockParams): Response<Features>;
1172
1613
 
1173
1614
  declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
1174
1615
 
@@ -1372,6 +1813,9 @@ type AllNetworkAddressParams = {
1372
1813
  type AllNetworkAddressPayload = {
1373
1814
  address: string;
1374
1815
  pub?: string;
1816
+ /**
1817
+ * @deprecated Use `pub` instead.
1818
+ */
1375
1819
  publicKey?: string;
1376
1820
  npub?: string;
1377
1821
  } | {
@@ -1437,6 +1881,9 @@ declare function evmGetAddress(connectId: string, deviceId: string, params: Comm
1437
1881
  type EVMPublicKey = {
1438
1882
  path: string;
1439
1883
  pub: string;
1884
+ /**
1885
+ * @deprecated Use `pub` instead.
1886
+ */
1440
1887
  publicKey?: string;
1441
1888
  } & EthereumPublicKey;
1442
1889
  type EVMGetPublicKeyParams = {
@@ -2220,6 +2667,9 @@ declare function nearSignTransaction(connectId: string, deviceId: string, params
2220
2667
  type AptosAddress = {
2221
2668
  path: string;
2222
2669
  pub?: string;
2670
+ /**
2671
+ * @deprecated Use `pub` instead.
2672
+ */
2223
2673
  publicKey?: string;
2224
2674
  } & AptosAddress$1;
2225
2675
  type AptosGetAddressParams = {
@@ -2234,6 +2684,9 @@ declare function aptosGetAddress(connectId: string, deviceId: string, params: Co
2234
2684
  type AptosPublicKey = {
2235
2685
  path: string;
2236
2686
  pub: string;
2687
+ /**
2688
+ * @deprecated Use `pub` instead.
2689
+ */
2237
2690
  publicKey?: string;
2238
2691
  };
2239
2692
  type AptosGetPublicKeyParams = {
@@ -2318,6 +2771,9 @@ declare function cosmosGetAddress(connectId: string, deviceId: string, params: C
2318
2771
  type CosmosPublicKey = {
2319
2772
  path: string;
2320
2773
  pub: string;
2774
+ /**
2775
+ * @deprecated Use `pub` instead.
2776
+ */
2321
2777
  publicKey?: string;
2322
2778
  };
2323
2779
  type CosmosGetPublicKeyParams = {
@@ -2342,6 +2798,9 @@ declare function cosmosSignTransaction(connectId: string, deviceId: string, para
2342
2798
  type XrpAddress = {
2343
2799
  path: string;
2344
2800
  pub?: string;
2801
+ /**
2802
+ * @deprecated Use `pub` instead.
2803
+ */
2345
2804
  publicKey?: string;
2346
2805
  address: string;
2347
2806
  };
@@ -2375,6 +2834,9 @@ declare function xrpSignTransaction(connectId: string, deviceId: string, params:
2375
2834
  type SuiAddress = {
2376
2835
  path: string;
2377
2836
  pub?: string;
2837
+ /**
2838
+ * @deprecated Use `pub` instead.
2839
+ */
2378
2840
  publicKey?: string;
2379
2841
  } & SuiAddress$1;
2380
2842
  type SuiGetAddressParams = {
@@ -2389,6 +2851,9 @@ declare function suiGetAddress(connectId: string, deviceId: string, params: Comm
2389
2851
  type SuiPublicKey = {
2390
2852
  path: string;
2391
2853
  pub: string;
2854
+ /**
2855
+ * @deprecated Use `pub` instead.
2856
+ */
2392
2857
  publicKey?: string;
2393
2858
  };
2394
2859
  type SuiGetPublicKeyParams = {
@@ -2418,6 +2883,10 @@ declare function suiSignTransaction(connectId: string, deviceId: string, params:
2418
2883
  type CardanoGetAddressMethodParams = {
2419
2884
  addressParameters: CardanoAddressParameters;
2420
2885
  networkId: number;
2886
+ /**
2887
+ * Testnet cip34:0-1097911063
2888
+ * Mainnet cip34:1-764824073
2889
+ */
2421
2890
  protocolMagic: number;
2422
2891
  derivationType: number;
2423
2892
  address?: string;
@@ -2479,6 +2948,10 @@ type CardanoSignMessageMethodParams = {
2479
2948
  derivationType: number;
2480
2949
  networkId: number;
2481
2950
  addressType?: Messages.CardanoAddressType;
2951
+ /**
2952
+ * Testnet cip34:0-1097911063
2953
+ * Mainnet cip34:1-764824073
2954
+ */
2482
2955
  protocolMagic?: number;
2483
2956
  };
2484
2957
  declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
@@ -2512,6 +2985,9 @@ declare function filecoinSignTransaction(connectId: string, deviceId: string, pa
2512
2985
  type PolkadotAddress = {
2513
2986
  path: string;
2514
2987
  pub: string;
2988
+ /**
2989
+ * @deprecated Use `pub` instead.
2990
+ */
2515
2991
  publicKey?: string;
2516
2992
  } & PolkadotAddress$1;
2517
2993
  type PolkadotGetAddressParams = {
@@ -2570,23 +3046,61 @@ type KaspaSignInputParams = {
2570
3046
  sequenceNumber: number | string;
2571
3047
  output: {
2572
3048
  satoshis: number | string;
2573
- script: string;
3049
+ script?: string;
2574
3050
  };
2575
3051
  sigOpCount?: number;
2576
3052
  };
2577
3053
  type KaspaSignOutputParams = {
2578
3054
  satoshis: number | string;
3055
+ address?: string;
3056
+ addressN?: string | number[];
3057
+ script?: string;
3058
+ scriptVersion?: number;
3059
+ };
3060
+ type KaspaStreamingSignInputParams = Omit<KaspaSignInputParams, 'output'> & {
3061
+ output: {
3062
+ satoshis: number | string;
3063
+ script?: string;
3064
+ };
3065
+ };
3066
+ type KaspaStreamingSignOutputParams = {
3067
+ satoshis: number | string;
3068
+ address?: string;
3069
+ addressN?: string | number[];
3070
+ script?: string;
3071
+ scriptVersion?: number;
3072
+ };
3073
+ type KaspaRefTransactionInput = {
3074
+ prevTxId: string;
3075
+ outputIndex: number;
3076
+ sequenceNumber: number | string;
3077
+ };
3078
+ type KaspaRefTransactionOutput = {
3079
+ satoshis: number | string;
3080
+ scriptVersion?: number;
2579
3081
  script: string;
2580
- scriptVersion: number;
3082
+ };
3083
+ type KaspaRefTransaction = {
3084
+ txId: string;
3085
+ version: number;
3086
+ inputs: KaspaRefTransactionInput[];
3087
+ outputs: KaspaRefTransactionOutput[];
3088
+ lockTime?: number | string;
3089
+ subNetworkID?: string;
3090
+ gas?: number | string;
3091
+ payload?: string;
2581
3092
  };
2582
3093
  type KaspaSignTransactionParams = {
2583
3094
  version: number;
2584
- inputs: KaspaSignInputParams[];
2585
- outputs: KaspaSignOutputParams[];
3095
+ inputs: Array<KaspaSignInputParams | KaspaStreamingSignInputParams>;
3096
+ outputs: Array<KaspaSignOutputParams | KaspaStreamingSignOutputParams>;
2586
3097
  lockTime: number | string;
2587
3098
  sigHashType?: SignatureType;
2588
3099
  sigOpCount?: number;
2589
3100
  subNetworkID?: string;
3101
+ payload?: string;
3102
+ gas?: number | string;
3103
+ refTxs?: KaspaRefTransaction[];
2590
3104
  scheme?: string;
2591
3105
  prefix?: string;
2592
3106
  useTweak?: boolean;
@@ -2631,6 +3145,9 @@ declare function nexaSignTransaction(connectId: string, deviceId: string, params
2631
3145
  type NostrPublicKey = {
2632
3146
  npub?: string;
2633
3147
  pub?: string;
3148
+ /**
3149
+ * @deprecated Use `pub` instead.
3150
+ */
2634
3151
  publicKey?: string;
2635
3152
  path: string;
2636
3153
  };
@@ -2727,6 +3244,9 @@ declare function nostrSignSchnorr(connectId: string, deviceId: string, params: C
2727
3244
 
2728
3245
  interface LnurlAuth {
2729
3246
  pub?: string;
3247
+ /**
3248
+ * @deprecated Use `pub` instead.
3249
+ */
2730
3250
  publickey?: string;
2731
3251
  path?: string;
2732
3252
  signature?: string;
@@ -2803,6 +3323,9 @@ declare function dnxSignTransaction(connectId: string, deviceId: string, params:
2803
3323
  type TonAddress = {
2804
3324
  path: string;
2805
3325
  pub: string;
3326
+ /**
3327
+ * @deprecated Use `pub` instead.
3328
+ */
2806
3329
  publicKey?: string;
2807
3330
  address: string;
2808
3331
  };
@@ -2914,6 +3437,9 @@ declare function scdoSignTransaction(connectId: string, deviceId: string, params
2914
3437
 
2915
3438
  type AlephiumAddress = {
2916
3439
  path: string;
3440
+ /**
3441
+ * @deprecated Use `pub` instead.
3442
+ */
2917
3443
  publicKey?: string;
2918
3444
  pub?: string;
2919
3445
  address: string;
@@ -3016,13 +3542,21 @@ type NeoSignedTx = {
3016
3542
  declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
3017
3543
 
3018
3544
  type CoreApi = {
3545
+ /**
3546
+ * Inject function
3547
+ */
3019
3548
  init: typeof init;
3020
3549
  on: typeof on;
3021
3550
  off: typeof off;
3022
3551
  emit: (event: string, ...args: any[]) => void;
3023
3552
  removeAllListeners: typeof removeAllListeners;
3024
- dispose: () => void;
3553
+ dispose: () => void | Promise<void>;
3025
3554
  call: (params: any) => Promise<any>;
3555
+ /**
3556
+ * Bind a protocol that has already been verified for one transport endpoint.
3557
+ * Every later SDK call for the same connectId uses it as a strict expectation.
3558
+ */
3559
+ setDeviceConnectProtocol: (connectId: string, connectProtocol: HardwareConnectProtocol | undefined) => void;
3026
3560
  uiResponse: typeof uiResponse;
3027
3561
  cancel: (connectId?: string) => void;
3028
3562
  updateSettings: typeof updateSettings;
@@ -3030,19 +3564,32 @@ type CoreApi = {
3030
3564
  success: boolean;
3031
3565
  }>;
3032
3566
  getLogs: typeof getLogs;
3567
+ clearSessionCache: typeof clearSessionCache;
3568
+ /**
3569
+ * Test function
3570
+ */
3033
3571
  testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
3572
+ testProtocolV2Ping: typeof testProtocolV2Ping;
3034
3573
  preInitialize: typeof preInitialize;
3574
+ /**
3575
+ * Core function
3576
+ */
3035
3577
  checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
3036
3578
  checkBridgeStatus: typeof checkBridgeStatus;
3037
3579
  checkBridgeRelease: typeof checkBridgeRelease;
3038
3580
  checkBootloaderRelease: typeof checkBootloaderRelease;
3039
3581
  checkFirmwareTypeAvailable: typeof checkFirmwareTypeAvailable;
3582
+ /**
3583
+ * Device function
3584
+ */
3040
3585
  searchDevices: typeof searchDevices;
3586
+ detectDeviceConnectProtocol: typeof detectDeviceConnectProtocol;
3041
3587
  promptWebDeviceAccess: typeof promptWebDeviceAccess;
3042
3588
  getFeatures: typeof getFeatures;
3043
- getDeviceInfo: typeof getDeviceInfo;
3589
+ getDeviceState: typeof getDeviceState;
3044
3590
  getOnekeyFeatures: typeof getOnekeyFeatures;
3045
3591
  getPassphraseState: typeof getPassphraseState;
3592
+ openWalletSession: typeof openWalletSession;
3046
3593
  deviceBackup: typeof deviceBackup;
3047
3594
  deviceChangePin: typeof deviceChangePin;
3048
3595
  deviceFlags: typeof deviceFlags;
@@ -3070,33 +3617,22 @@ type CoreApi = {
3070
3617
  firmwareUpdateV3: typeof firmwareUpdateV3;
3071
3618
  firmwareUpdateV4: typeof firmwareUpdateV4;
3072
3619
  cipherKeyValue: typeof cipherKeyValue;
3073
- protocolInfoRequest: typeof protocolInfoRequest;
3074
- ping: typeof ping;
3620
+ /**
3621
+ * Pro2 business API
3622
+ */
3075
3623
  deviceReboot: typeof deviceReboot;
3076
- deviceInfoGet: typeof deviceInfoGet;
3077
- deviceFirmwareUpdate: typeof deviceFirmwareUpdate;
3078
- deviceGetFirmwareUpdateStatus: typeof deviceGetFirmwareUpdateStatus;
3079
- deviceFactoryInfoSet: typeof deviceFactoryInfoSet;
3080
- deviceFactoryInfoGet: typeof deviceFactoryInfoGet;
3081
- filesystemPermissionFix: typeof filesystemPermissionFix;
3082
- fileRead: typeof fileRead;
3083
- fileWrite: typeof fileWrite;
3084
- fileDelete: typeof fileDelete;
3085
- dirList: typeof dirList;
3086
- dirMake: typeof dirMake;
3087
- dirRemove: typeof dirRemove;
3088
- pathInfo: typeof pathInfo;
3089
- filesystemFileRead: typeof filesystemFileRead;
3090
- filesystemFileWrite: typeof filesystemFileWrite;
3091
- filesystemFileDelete: typeof filesystemFileDelete;
3092
- filesystemDirList: typeof filesystemDirList;
3093
- filesystemDirMake: typeof filesystemDirMake;
3094
- filesystemDirRemove: typeof filesystemDirRemove;
3095
- filesystemPathInfoQuery: typeof filesystemPathInfoQuery;
3096
- filesystemFormat: typeof filesystemFormat;
3097
- filesystemDiskControl: typeof filesystemDiskControl;
3624
+ deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
3625
+ deviceUploadNft: typeof deviceUploadNft;
3626
+ deviceUploadWallpaper: typeof deviceUploadWallpaper;
3627
+ uploadPortfolio: typeof uploadPortfolio;
3628
+ /**
3629
+ * All network function
3630
+ */
3098
3631
  allNetworkGetAddress: typeof allNetworkGetAddress;
3099
3632
  allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
3633
+ /**
3634
+ * EVM function
3635
+ */
3100
3636
  evmGetAddress: typeof evmGetAddress;
3101
3637
  evmGetPublicKey: typeof evmGetPublicKey;
3102
3638
  evmSignMessage: typeof evmSignMessage;
@@ -3104,86 +3640,167 @@ type CoreApi = {
3104
3640
  evmSignTransaction: typeof evmSignTransaction;
3105
3641
  evmSignTypedData: typeof evmSignTypedData;
3106
3642
  evmVerifyMessage: typeof evmVerifyMessage;
3643
+ /**
3644
+ * BTC function
3645
+ */
3107
3646
  btcGetAddress: typeof btcGetAddress;
3108
3647
  btcGetPublicKey: typeof btcGetPublicKey;
3109
3648
  btcSignMessage: typeof btcSignMessage;
3110
3649
  btcSignPsbt: typeof btcSignPsbt;
3111
3650
  btcSignTransaction: typeof btcSignTransaction;
3112
3651
  btcVerifyMessage: typeof btcVerifyMessage;
3652
+ /**
3653
+ * Starcoin function
3654
+ */
3113
3655
  starcoinGetAddress: typeof starcoinGetAddress;
3114
3656
  starcoinGetPublicKey: typeof starcoinGetPublicKey;
3115
3657
  starcoinSignMessage: typeof starcoinSignMessage;
3116
3658
  starcoinSignTransaction: typeof starcoinSignTransaction;
3117
3659
  starcoinVerifyMessage: typeof starcoinVerifyMessage;
3660
+ /**
3661
+ * Nem function
3662
+ */
3118
3663
  nemGetAddress: typeof nemGetAddress;
3119
3664
  nemSignTransaction: typeof nemSignTransaction;
3665
+ /**
3666
+ * Solana function
3667
+ */
3120
3668
  solGetAddress: typeof solGetAddress;
3121
3669
  solSignTransaction: typeof solSignTransaction;
3122
3670
  solSignOffchainMessage: typeof solSignOffchainMessage;
3123
3671
  solSignMessage: typeof solSignMessage;
3672
+ /**
3673
+ * Stellar function
3674
+ */
3124
3675
  stellarGetAddress: typeof stellarGetAddress;
3125
3676
  stellarSignTransaction: typeof stellarSignTransaction;
3677
+ /**
3678
+ * Tron function
3679
+ */
3126
3680
  tronGetAddress: typeof tronGetAddress;
3127
3681
  tronSignMessage: typeof tronSignMessage;
3128
3682
  tronSignTransaction: typeof tronSignTransaction;
3683
+ /**
3684
+ * Conflux function
3685
+ */
3129
3686
  confluxGetAddress: typeof confluxGetAddress;
3130
3687
  confluxSignMessage: typeof confluxSignMessage;
3131
3688
  confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
3132
3689
  confluxSignTransaction: typeof confluxSignTransaction;
3690
+ /**
3691
+ * Near function
3692
+ */
3133
3693
  nearGetAddress: typeof nearGetAddress;
3134
3694
  nearSignTransaction: typeof nearSignTransaction;
3695
+ /**
3696
+ * Aptos function
3697
+ */
3135
3698
  aptosGetAddress: typeof aptosGetAddress;
3136
3699
  aptosGetPublicKey: typeof aptosGetPublicKey;
3137
3700
  aptosSignMessage: typeof aptosSignMessage;
3138
3701
  aptosSignInMessage: typeof aptosSignInMessage;
3139
3702
  aptosSignTransaction: typeof aptosSignTransaction;
3703
+ /**
3704
+ * Algo function
3705
+ */
3140
3706
  algoGetAddress: typeof algoGetAddress;
3141
3707
  algoSignTransaction: typeof algoSignTransaction;
3708
+ /**
3709
+ * Cosmos function
3710
+ */
3142
3711
  cosmosGetAddress: typeof cosmosGetAddress;
3143
3712
  cosmosGetPublicKey: typeof cosmosGetPublicKey;
3144
3713
  cosmosSignTransaction: typeof cosmosSignTransaction;
3714
+ /**
3715
+ * XRP function
3716
+ */
3145
3717
  xrpGetAddress: typeof xrpGetAddress;
3146
3718
  xrpSignTransaction: typeof xrpSignTransaction;
3719
+ /**
3720
+ * SUI function
3721
+ */
3147
3722
  suiGetAddress: typeof suiGetAddress;
3148
3723
  suiGetPublicKey: typeof suiGetPublicKey;
3149
3724
  suiSignMessage: typeof suiSignMessage;
3150
3725
  suiSignTransaction: typeof suiSignTransaction;
3726
+ /**
3727
+ * Cardano function
3728
+ */
3151
3729
  cardanoGetAddress: typeof cardanoGetAddress;
3152
3730
  cardanoGetPublicKey: typeof cardanoGetPublicKey;
3153
3731
  cardanoSignTransaction: typeof cardanoSignTransaction;
3154
3732
  cardanoSignMessage: typeof cardanoSignMessage;
3733
+ /**
3734
+ * Filecoin function
3735
+ */
3155
3736
  filecoinGetAddress: typeof filecoinGetAddress;
3156
3737
  filecoinSignTransaction: typeof filecoinSignTransaction;
3738
+ /**
3739
+ * Polkadot function
3740
+ */
3157
3741
  polkadotGetAddress: typeof polkadotGetAddress;
3158
3742
  polkadotSignTransaction: typeof polkadotSignTransaction;
3743
+ /**
3744
+ * Kaspa function
3745
+ */
3159
3746
  kaspaGetAddress: typeof kaspaGetAddress;
3160
3747
  kaspaSignTransaction: typeof kaspaSignTransaction;
3748
+ /**
3749
+ * nexa function
3750
+ */
3161
3751
  nexaGetAddress: typeof nexaGetAddress;
3162
3752
  nexaSignTransaction: typeof nexaSignTransaction;
3753
+ /**
3754
+ * Nostr function
3755
+ */
3163
3756
  nostrGetPublicKey: typeof nostrGetPublicKey;
3164
3757
  nostrSignEvent: typeof nostrSignEvent;
3165
3758
  nostrEncryptMessage: typeof nostrEncryptMessage;
3166
3759
  nostrDecryptMessage: typeof nostrDecryptMessage;
3167
3760
  nostrSignSchnorr: typeof nostrSignSchnorr;
3761
+ /**
3762
+ * Lightning Network
3763
+ */
3168
3764
  lnurlAuth: typeof lnurlAuth;
3765
+ /**
3766
+ * Nervos Network
3767
+ */
3169
3768
  nervosGetAddress: typeof nervosGetAddress;
3170
3769
  nervosSignTransaction: typeof nervosSignTransaction;
3770
+ /**
3771
+ * Dnx Network
3772
+ */
3171
3773
  dnxGetAddress: typeof dnxGetAddress;
3172
3774
  dnxSignTransaction: typeof dnxSignTransaction;
3775
+ /**
3776
+ * TON Network
3777
+ */
3173
3778
  tonGetAddress: typeof tonGetAddress;
3174
3779
  tonSignMessage: typeof tonSignMessage;
3175
3780
  tonSignProof: typeof tonSignProof;
3176
3781
  tonSignData: typeof tonSignData;
3782
+ /**
3783
+ * SCDO Network
3784
+ */
3177
3785
  scdoGetAddress: typeof scdoGetAddress;
3178
3786
  scdoSignMessage: typeof scdoSignMessage;
3179
3787
  scdoSignTransaction: typeof scdoSignTransaction;
3788
+ /**
3789
+ * Alephium Network
3790
+ */
3180
3791
  alephiumGetAddress: typeof alephiumGetAddress;
3181
3792
  alephiumSignMessage: typeof alephiumSignMessage;
3182
3793
  alephiumSignTransaction: typeof alephiumSignTransaction;
3794
+ /**
3795
+ * Benfen Network
3796
+ */
3183
3797
  benfenGetAddress: typeof benfenGetAddress;
3184
3798
  benfenGetPublicKey: typeof benfenGetPublicKey;
3185
3799
  benfenSignTransaction: typeof benfenSignTransaction;
3186
3800
  benfenSignMessage: typeof benfenSignMessage;
3801
+ /**
3802
+ * Neo Network
3803
+ */
3187
3804
  neoGetAddress: typeof neoGetAddress;
3188
3805
  neoSignTransaction: typeof neoSignTransaction;
3189
3806
  };
@@ -3256,13 +3873,17 @@ declare const DEVICE: {
3256
3873
  readonly LOADING: "device-loading";
3257
3874
  readonly BUTTON: "button";
3258
3875
  readonly PIN: "pin";
3876
+ readonly PIN_ON_DEVICE: "pin_on_device";
3877
+ readonly PIN_ON_DEVICE_COMPLETE: "pin_on_device_complete";
3259
3878
  readonly PASSPHRASE: "passphrase";
3260
3879
  readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
3880
+ readonly ATTACH_PIN_ON_DEVICE: "attach_pin_on_device";
3261
3881
  readonly WORD: "word";
3262
3882
  readonly SUPPORT_FEATURES: "support_features";
3263
3883
  readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
3264
3884
  readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "select_device_for_switch_firmware_web_device";
3265
3885
  readonly FEATURES: "features";
3886
+ readonly STATE: "state";
3266
3887
  };
3267
3888
  interface DeviceConnnectRequest {
3268
3889
  type: typeof DEVICE.CONNECT;
@@ -3281,6 +3902,11 @@ interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'
3281
3902
  }
3282
3903
  type PassphraseRequestPayload = {
3283
3904
  existsAttachPinUser?: boolean;
3905
+ deviceOnly?: boolean;
3906
+ source?: 'wallet-session-coordinator';
3907
+ reason?: 'open-wallet' | 'session-recovery';
3908
+ expectedPassphraseState?: string;
3909
+ interaction?: HardwareUiInteractionMeta;
3284
3910
  };
3285
3911
  interface DeviceButtonRequest {
3286
3912
  type: typeof DEVICE.BUTTON;
@@ -3293,6 +3919,10 @@ interface DeviceSendFeatures {
3293
3919
  type: typeof DEVICE.FEATURES;
3294
3920
  payload: DeviceFeaturesPayload;
3295
3921
  }
3922
+ interface DeviceSendState {
3923
+ type: typeof DEVICE.STATE;
3924
+ payload: DeviceStateEvent;
3925
+ }
3296
3926
  type DeviceSupportFeaturesPayload = SupportFeatures & {
3297
3927
  device: KnownDevice | null;
3298
3928
  };
@@ -3300,13 +3930,58 @@ interface DeviceSendSupportFeatures {
3300
3930
  type: typeof DEVICE.SUPPORT_FEATURES;
3301
3931
  payload: DeviceSupportFeaturesPayload;
3302
3932
  }
3303
- type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
3933
+ type DeviceEvent = DeviceButtonRequest | DeviceSendState | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
3304
3934
  type DeviceEventMessage = DeviceEvent & {
3305
3935
  event: typeof DEVICE_EVENT;
3306
3936
  };
3307
3937
  type DeviceEventListenerFn = (type: typeof DEVICE_EVENT, cb: (event: DeviceEventMessage) => void) => void;
3308
3938
  declare const createDeviceMessage: MessageFactoryFn<typeof DEVICE_EVENT, DeviceEvent>;
3309
3939
 
3940
+ declare const UI_RESPONSE: {
3941
+ readonly RECEIVE_PIN: "ui-receive_pin";
3942
+ readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
3943
+ readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
3944
+ readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "ui-receive_select-device-for-switch-firmware-web-device";
3945
+ };
3946
+ interface UiResponseCorrelation {
3947
+ interactionId: string;
3948
+ deviceId: string;
3949
+ }
3950
+ interface UiResponseCorrelationFields {
3951
+ interactionId?: string;
3952
+ deviceId?: string;
3953
+ }
3954
+ interface UiResponsePin extends UiResponseCorrelationFields {
3955
+ type: typeof UI_RESPONSE.RECEIVE_PIN;
3956
+ payload: string;
3957
+ }
3958
+ interface UiResponsePassphrase extends UiResponseCorrelationFields {
3959
+ type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
3960
+ payload: {
3961
+ value: string;
3962
+ passphraseOnDevice?: boolean;
3963
+ attachPinOnDevice?: boolean;
3964
+ save?: boolean;
3965
+ };
3966
+ }
3967
+ interface UiResponseSelectDeviceInBootloaderForWebDevice {
3968
+ type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
3969
+ payload: {
3970
+ deviceId: string;
3971
+ };
3972
+ }
3973
+ interface UiResponseSelectDeviceForSwitchFirmwareWebDevice {
3974
+ type: typeof UI_RESPONSE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
3975
+ payload: {
3976
+ deviceId: string;
3977
+ };
3978
+ }
3979
+ type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice | UiResponseSelectDeviceForSwitchFirmwareWebDevice;
3980
+ type UiResponseMessage = UiResponseEvent & {
3981
+ event: typeof UI_EVENT;
3982
+ };
3983
+ declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
3984
+
3310
3985
  declare const UI_EVENT = "UI_EVENT";
3311
3986
  declare const UI_REQUEST: {
3312
3987
  readonly REQUEST_PIN: "ui-request_pin";
@@ -3341,8 +4016,43 @@ declare const UI_REQUEST: {
3341
4016
  readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
3342
4017
  readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
3343
4018
  };
4019
+ type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
4020
+ type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
4021
+ type HardwareUiInteractionMeta = {
4022
+ interactionId: string;
4023
+ phaseId: string;
4024
+ sequence: number;
4025
+ phase: 'pin' | 'passphrase' | 'passphrase-on-device' | 'button' | 'processing';
4026
+ transition: 'start' | 'complete' | 'finish';
4027
+ outcome?: 'submitted' | 'succeeded' | 'failed' | 'cancelled' | 'disconnected';
4028
+ protocol: 'V2';
4029
+ device?: Device$1;
4030
+ };
4031
+ type ProtocolV2UiEventMetadata = {
4032
+ source?: ProtocolV2UiEventSource;
4033
+ reason?: string;
4034
+ deviceOnly?: boolean;
4035
+ completion?: ProtocolV2UiCompletion;
4036
+ method?: string;
4037
+ page?: string | number;
4038
+ operation?: string;
4039
+ interaction?: HardwareUiInteractionMeta;
4040
+ };
4041
+ type UiRequestWindowClose = {
4042
+ type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
4043
+ payload: HardwareUiInteractionMeta;
4044
+ } | {
4045
+ type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
4046
+ payload: HardwareUiInteractionMeta;
4047
+ } | {
4048
+ type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
4049
+ payload?: undefined;
4050
+ } | {
4051
+ type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
4052
+ payload?: undefined;
4053
+ };
3344
4054
  interface UiRequestWithoutPayload {
3345
- 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;
4055
+ type: 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;
3346
4056
  payload?: typeof undefined;
3347
4057
  }
3348
4058
  interface UiRequestFirmwareProgressing {
@@ -3353,40 +4063,50 @@ interface UiRequestFirmwareProgressing {
3353
4063
  }
3354
4064
  type UiRequestDeviceAction = {
3355
4065
  type: typeof UI_REQUEST.REQUEST_PIN;
3356
- payload: {
3357
- device: Device;
4066
+ payload: ProtocolV2UiEventMetadata & {
4067
+ device: Device$1;
3358
4068
  type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
4069
+ responseCorrelation?: UiResponseCorrelation;
3359
4070
  };
3360
4071
  };
3361
4072
  interface UiRequestButton {
3362
4073
  type: typeof UI_REQUEST.REQUEST_BUTTON;
3363
- payload: DeviceButtonRequest['payload'];
4074
+ payload: DeviceButtonRequest['payload'] & ProtocolV2UiEventMetadata;
3364
4075
  }
3365
4076
  interface UiRequestPassphrase {
3366
4077
  type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
3367
4078
  payload: {
3368
- device: Device;
4079
+ device: Device$1;
3369
4080
  passphraseState?: string;
3370
4081
  existsAttachPinUser?: boolean;
4082
+ deviceOnly?: boolean;
4083
+ source?: 'wallet-session-coordinator';
4084
+ reason?: 'open-wallet' | 'session-recovery';
4085
+ expectedPassphraseState?: string;
4086
+ interaction?: HardwareUiInteractionMeta;
4087
+ responseCorrelation?: UiResponseCorrelation;
3371
4088
  };
3372
4089
  }
3373
4090
  interface UiRequestPassphraseOnDevice {
3374
4091
  type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
3375
4092
  payload: {
3376
- device: Device;
4093
+ device: Device$1;
3377
4094
  passphraseState?: string;
4095
+ source?: 'wallet-session-coordinator';
4096
+ reason?: 'open-wallet' | 'session-recovery';
4097
+ interaction?: HardwareUiInteractionMeta;
3378
4098
  };
3379
4099
  }
3380
4100
  interface UiRequestSelectDeviceInBootloaderForWebDevice {
3381
4101
  type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
3382
4102
  payload: {
3383
- device: Device;
4103
+ device: Device$1;
3384
4104
  };
3385
4105
  }
3386
4106
  interface UiRequestSelectDeviceForSwitchFirmwareWebDevice {
3387
4107
  type: typeof UI_REQUEST.REQUEST_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
3388
4108
  payload: {
3389
- device: Device;
4109
+ device: Device$1;
3390
4110
  };
3391
4111
  }
3392
4112
  interface FirmwareProcessing {
@@ -3399,7 +4119,7 @@ type IFirmwareUpdateProgressType = 'transferData' | 'installingFirmware';
3399
4119
  interface FirmwareProgress {
3400
4120
  type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
3401
4121
  payload: {
3402
- device: Device;
4122
+ device: Device$1;
3403
4123
  progress: number;
3404
4124
  progressType: IFirmwareUpdateProgressType;
3405
4125
  transferredBytes?: number;
@@ -3411,7 +4131,7 @@ interface FirmwareProgress {
3411
4131
  interface FirmwareTip {
3412
4132
  type: typeof UI_REQUEST.FIRMWARE_TIP;
3413
4133
  payload: {
3414
- device: Device;
4134
+ device: Device$1;
3415
4135
  data: {
3416
4136
  message: string;
3417
4137
  };
@@ -3430,14 +4150,14 @@ interface DeviceProgress {
3430
4150
  interface PreviousAddressResult {
3431
4151
  type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
3432
4152
  payload: {
3433
- device: Device;
4153
+ device: Device$1;
3434
4154
  data: {
3435
4155
  address?: string;
3436
4156
  path?: string;
3437
4157
  };
3438
4158
  };
3439
4159
  }
3440
- type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
4160
+ type UiEvent = UiRequestWithoutPayload | UiRequestWindowClose | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
3441
4161
  declare enum FirmwareUpdateTipMessage {
3442
4162
  CheckLatestUiResource = "CheckLatestUiResource",
3443
4163
  StartDownloadFirmware = "StartDownloadFirmware",
@@ -3571,43 +4291,6 @@ interface MethodResponseMessage {
3571
4291
  declare const createResponseMessage: (id: number, success: boolean, payload: any) => MethodResponseMessage;
3572
4292
  type CallMethodKeys = keyof CoreApi;
3573
4293
 
3574
- declare const UI_RESPONSE: {
3575
- readonly RECEIVE_PIN: "ui-receive_pin";
3576
- readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
3577
- readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
3578
- readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "ui-receive_select-device-for-switch-firmware-web-device";
3579
- };
3580
- interface UiResponsePin {
3581
- type: typeof UI_RESPONSE.RECEIVE_PIN;
3582
- payload: string;
3583
- }
3584
- interface UiResponsePassphrase {
3585
- type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
3586
- payload: {
3587
- value: string;
3588
- passphraseOnDevice?: boolean;
3589
- attachPinOnDevice?: boolean;
3590
- save?: boolean;
3591
- };
3592
- }
3593
- interface UiResponseSelectDeviceInBootloaderForWebDevice {
3594
- type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
3595
- payload: {
3596
- deviceId: string;
3597
- };
3598
- }
3599
- interface UiResponseSelectDeviceForSwitchFirmwareWebDevice {
3600
- type: typeof UI_RESPONSE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
3601
- payload: {
3602
- deviceId: string;
3603
- };
3604
- }
3605
- type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice | UiResponseSelectDeviceForSwitchFirmwareWebDevice;
3606
- type UiResponseMessage = UiResponseEvent & {
3607
- event: typeof UI_EVENT;
3608
- };
3609
- declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
3610
-
3611
4294
  declare const LOG_EVENT = "LOG_EVENT";
3612
4295
  declare const LOG: {
3613
4296
  readonly OUTPUT: "log-output";
@@ -3683,10 +4366,14 @@ type UiPromiseResponse = UiResponseEvent | {
3683
4366
  };
3684
4367
  type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
3685
4368
  type: T;
3686
- }>, T, Device$1>;
4369
+ }>, T, Device> & {
4370
+ responseCorrelation?: UiResponseCorrelation;
4371
+ };
3687
4372
 
3688
4373
  declare const LogBlockEvent: Set<string>;
3689
4374
  declare function getLogBlockLabel(message: unknown): string | undefined;
4375
+ declare function getSafeLogPayload(value: unknown, blockLabel?: string): unknown;
4376
+ declare function formatLogMethodLabel(label: string, methodName?: string): string;
3690
4377
 
3691
4378
  declare const executeCallback: (id: string, ...args: any[]) => void;
3692
4379
  declare const cleanupCallback: (id: string) => void;
@@ -3750,30 +4437,109 @@ declare enum LoggerNames {
3750
4437
  }
3751
4438
  declare const getLogger: (key: LoggerNames) => Log;
3752
4439
 
3753
- declare const httpRequest: (url: string, type: string) => any;
4440
+ type HttpRequestOptions = {
4441
+ /** Additional request headers, such as a byte range for package metadata reads. */
4442
+ headers?: Record<string, string>;
4443
+ /** Axios adapter-defined request timeout retained for existing opt-in callers. */
4444
+ timeoutMs?: number;
4445
+ /** Deadline for DNS, connection, TLS, redirects, and the first response-body progress. */
4446
+ connectTimeoutMs?: number;
4447
+ /** Maximum idle interval between response-body progress events. */
4448
+ readTimeoutMs?: number;
4449
+ /** Wall-clock deadline across all attempts and retry backoff. */
4450
+ overallTimeoutMs?: number;
4451
+ maxRetries?: number;
4452
+ retryDelayMs?: number;
4453
+ };
4454
+
4455
+ declare const httpRequest: (url: string, type: string, options?: HttpRequestOptions) => any;
3754
4456
  declare const getTimeStamp: () => number;
3755
4457
 
4458
+ /**
4459
+ * Validates version string
4460
+ * @param {string} version Version string
4461
+ * @returns {boolean} True if version string is valid, false if not
4462
+ */
3756
4463
  declare const isValidVersionString: (version: string) => boolean;
4464
+ /**
4465
+ * Validates a version array
4466
+ * @param {number[]} version Version array
4467
+ * @returns {boolean} True if version array is valid, false if not
4468
+ */
3757
4469
  declare const isValidVersionArray: (version: number[]) => boolean;
4470
+ /**
4471
+ * Fills the missing version numbers with zeros (ie: [1, 2] will become [1, 2, 0])
4472
+ * @param {number[]} version Version array
4473
+ * @returns {number[]} Version array with all positions filled
4474
+ */
3758
4475
  declare const normalizeVersionArray: (version: number[]) => number[];
4476
+ /**
4477
+ * Returns a valid version array from a version string
4478
+ * @param {string} version Version string
4479
+ * @returns {number[]} Version array
4480
+ */
3759
4481
  declare const versionSplit: (version: string) => number[];
4482
+ /**
4483
+ * Compares two versions and returns if the version is newer (1), older (-1) or equal (0).
4484
+ * @param {string | number[]} a Version to compare from
4485
+ * @param {string | number[]} b Version to compare with
4486
+ * @returns {number} Returns 1 if newer, -1 if older and 0 if equal
4487
+ */
3760
4488
  declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
3761
4489
 
3762
- declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | 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<"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<"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<"DeviceStatus"> | 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<"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"> | TypedResponseMessage<"experimental_message"> | TypedResponseMessage<"experimental_field"> | TypedResponseMessage<"TxAckPaymentRequest"> | 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<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionGet"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat">;
4490
+ declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceStatus"> | TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"ProtocolInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"DeviceFirmwareUpdateStatus"> | 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<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"OnboardingSetupStatus"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"ViewRawData"> | 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<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"UiAnimationRequest"> | TypedResponseMessage<"ProtocolInfoRequest"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DeviceSettingsGet"> | TypedResponseMessage<"DeviceSettingsSet"> | TypedResponseMessage<"DeviceSettingsPageShow"> | TypedResponseMessage<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceMiscUsbMscControl"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionGet"> | TypedResponseMessage<"DeviceSessionAskPin"> | TypedResponseMessage<"DeviceSessionAskPassphrase"> | TypedResponseMessage<"DeviceStatusGet"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"InternalMyAddressRequest"> | TypedResponseMessage<"NftUpdate"> | TypedResponseMessage<"OnboardingStatusGet"> | TypedResponseMessage<"OnboardingStatus"> | TypedResponseMessage<"PortfolioUpdate"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage">;
3763
4491
 
3764
- declare const getDeviceType: (features?: Features) => IDeviceType;
4492
+ type DeviceFeaturesInput = Features | Messages.Features;
4493
+
4494
+ /**
4495
+ * get device type by features
4496
+ */
4497
+ declare const getDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
4498
+ /**
4499
+ * get device type by ble name
4500
+ * @param name Ble name
4501
+ */
3765
4502
  declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
3766
- declare const getDeviceBleName: (features?: Features) => string | null;
3767
- declare const getDeviceUUID: (features: Features) => string;
3768
- declare const getDeviceLabel: (features?: Features) => string | null;
3769
- declare const getMethodVersionRange: (features: Features | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
3770
- declare const isMethodVersionRangeUnsupported: (versionRange?: IVersionRange) => boolean;
3771
- declare const getFirmwareType: (features: Features | undefined) => EFirmwareType;
3772
-
3773
- declare const getDeviceFirmwareVersion: (features: Features | undefined) => IVersionArray;
3774
- declare const getDeviceBLEFirmwareVersion: (features: Features) => IVersionArray;
3775
- declare const getDeviceBootloaderVersion: (features: Features | undefined) => IVersionArray;
3776
- declare const getDeviceBoardloaderVersion: (features: Features) => IVersionArray;
4503
+ /**
4504
+ * Get Connected Device ble name by features
4505
+ * @returns
4506
+ */
4507
+ declare const getDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
4508
+ /**
4509
+ * Get Connected Device serial number by features
4510
+ */
4511
+ declare const getDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
4512
+ /**
4513
+ * @deprecated Use getDeviceSerialNo instead.
4514
+ */
4515
+ declare const getDeviceUUID: (features?: DeviceFeaturesInput) => string;
4516
+ /**
4517
+ * Get Connected Device label by features
4518
+ */
4519
+ declare const getDeviceLabel: (features?: DeviceFeaturesInput) => string | null;
4520
+ /**
4521
+ * Get firmware version range by features
4522
+ * Type has a higher priority than Model
4523
+ */
4524
+ declare const getMethodVersionRange: (features: DeviceFeaturesInput | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
4525
+ declare const getFirmwareType: (features?: DeviceFeaturesInput) => _onekeyfe_hd_shared.EFirmwareType;
4526
+
4527
+ /**
4528
+ * Get Connected Device version by features
4529
+ */
4530
+ declare const getDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4531
+ /**
4532
+ * Get Connected Device bootloader version by features
4533
+ */
4534
+ declare const getDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4535
+ /**
4536
+ * Get Connected Device boardloader/romloader version by features
4537
+ */
4538
+ declare const getDeviceBoardloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
4539
+ /**
4540
+ * Get Connected Device bluetooth firmware version by features
4541
+ */
4542
+ declare const getDeviceBLEFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
3777
4543
 
3778
4544
  declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v1", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
3779
4545
  type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
@@ -3781,7 +4547,7 @@ type ProtocolV1MessageSchema = 'v1CurrentSchema' | 'v1LegacySchema';
3781
4547
  type ProtobufMessageSchema = ProtocolV1MessageSchema | 'v2Schema';
3782
4548
  declare class DataManager {
3783
4549
  static deviceMap: DeviceTypeMap & {
3784
- [k: string]: DeviceTypeMap[keyof DeviceTypeMap] | undefined;
4550
+ [k: string]: NonNullable<DeviceTypeMap[keyof DeviceTypeMap]> | undefined;
3785
4551
  };
3786
4552
  static assets: AssetsMap | null;
3787
4553
  static settings: ConnectSettings;
@@ -3789,12 +4555,21 @@ declare class DataManager {
3789
4555
  [schema in ProtobufMessageSchema]: JSON;
3790
4556
  };
3791
4557
  static lastCheckTimestamp: number;
4558
+ static protocolV2ResourcesConfigError: Error | undefined;
3792
4559
  static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
4560
+ /**
4561
+ * Touch、Pro System UI Resource Update
4562
+ * ** Interval upgrade is not considered **
4563
+ */
3793
4564
  static getSysResourcesLatestRelease: ({ features, forcedUpdateRes, firmwareType, }: {
3794
4565
  features: Features;
3795
4566
  forcedUpdateRes?: boolean | undefined;
3796
4567
  firmwareType: EFirmwareType;
3797
4568
  }) => string | undefined;
4569
+ /**
4570
+ * Touch、Pro System full UI Resource Update
4571
+ * ** Interval upgrade is not considered **
4572
+ */
3798
4573
  static getSysFullResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
3799
4574
  static getBootloaderResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
3800
4575
  static getBootloaderTargetVersion: (features: Features, firmwareType: EFirmwareType) => IVersionArray | undefined;
@@ -3816,24 +4591,40 @@ declare class DataManager {
3816
4591
  "en-US": string;
3817
4592
  } | undefined;
3818
4593
  private static enrichFirmwareReleaseInfo;
3819
- static load(settings: ConnectSettings): Promise<void>;
4594
+ static load(settings: ConnectSettings): Promise<boolean>;
3820
4595
  static updateEnv(newEnv: ConnectSettings['env']): void;
3821
4596
  static checkAndReloadData(): Promise<void>;
4597
+ /** Force a fresh remote config before an update is allowed to mutate the device. */
4598
+ static forceReloadData({ requireResources, }?: {
4599
+ requireResources?: boolean;
4600
+ }): Promise<void>;
4601
+ static getProtocolV2Resources(deviceType?: EDeviceType.Pro2 | EDeviceType.Neo): IProtocolV2Resource[] | undefined;
4602
+ static getProtocolV2BootResources(deviceType?: EDeviceType.Pro2 | EDeviceType.Neo): IProtocolV2BootResources | undefined;
3822
4603
  static getProtobufMessages(schema?: ProtobufMessageSchema): JSON;
3823
4604
  static getSettings(key?: undefined): ConnectSettings;
3824
4605
  static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
3825
4606
  static isBleConnect: (env: ConnectSettings['env']) => boolean;
4607
+ /** Desktop WebUSB doesn't need browser permission prompt */
3826
4608
  static isDesktopWebUsb: (env: ConnectSettings['env']) => boolean;
4609
+ /** Browser WebUSB needs permission prompt */
3827
4610
  static isBrowserWebUsb: (env: ConnectSettings['env']) => boolean;
3828
4611
  }
3829
4612
 
3830
- declare const supportInputPinOnSoftware: (features: Features) => SupportFeatureType;
4613
+ declare const supportInputPinOnSoftware: (features?: Features) => SupportFeatureType;
4614
+ /**
4615
+ * Since 3.5.0, Touch uses the firmware-v3 field to get firmware release info
4616
+ */
3831
4617
  declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, firmwareType, }: {
3832
4618
  features: Features;
3833
4619
  updateType: 'firmware' | 'ble';
3834
4620
  targetVersion?: string | undefined;
3835
4621
  firmwareType: EFirmwareType;
3836
4622
  }) => 'ble' | IFirmwareField;
4623
+ /**
4624
+ * Returns the optional firmware version
4625
+ * Used in firmware web update
4626
+ * https://firmware.onekey.so/
4627
+ */
3837
4628
  declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('ble' | IFirmwareField)[];
3838
4629
 
3839
4630
  declare function checkNeedUpdateBootForTouch(features: Features, firmwareType: EFirmwareType): boolean;
@@ -3843,15 +4634,40 @@ declare function checkNeedUpdateBootForClassicAndMini({ features, willUpdateFirm
3843
4634
  firmwareType: EFirmwareType;
3844
4635
  }): boolean;
3845
4636
 
4637
+ type DeviceSettingsProtocol = 'V1' | 'V2';
4638
+ type DeviceSettingsField = keyof DeviceSettingsParams;
4639
+ declare const DEVICE_SETTINGS_SHARED_FIELDS: readonly ["language", "label", "usePassphrase", "autoLockDelayMs", "autoShutdownDelayMs", "hapticFeedback", "bluetoothEnabled"];
4640
+ declare const DEVICE_SETTINGS_V1_ONLY_FIELDS: readonly ["homescreen", "passphraseSource", "displayRotation", "passphraseAlwaysOnDevice", "safetyChecks", "experimentalFeatures", "changeBrightness"];
4641
+ declare const DEVICE_SETTINGS_V2_ONLY_FIELDS: readonly ["brightness", "airgapMode", "animationEnabled", "tapToWake", "deviceNameDisplayEnabled", "fidoEnabled", "usbLockEnabled", "randomKeypad"];
4642
+ declare const PROTOCOL_V2_NEVER_TIMEOUT_MS = 268435456;
4643
+ declare const normalizeSafetyCheckLevel: (value: SafetyCheckLevel | null | undefined) => Enum_SafetyCheckLevel | null | undefined;
3846
4644
  declare const getLanguageConfig: (deviceType: IDeviceType) => Record<string, string>[];
3847
- type DurationParts = {
3848
- seconds: number;
3849
- minute: number;
3850
- hour: number;
3851
- day: number;
4645
+ type DeviceSettingsDurationOption = {
4646
+ label: string;
4647
+ valueMs: number;
4648
+ };
4649
+ type DeviceSettingsValueOption<T> = {
4650
+ label: string;
4651
+ value: T;
4652
+ };
4653
+ declare const getAutoLockOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
4654
+ declare const getAutoShutDownOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
4655
+ type DeviceSettingsCapabilities = {
4656
+ protocol: DeviceSettingsProtocol;
4657
+ supportedFields: readonly DeviceSettingsField[];
4658
+ languageOptions: ReadonlyArray<Record<string, string>>;
4659
+ autoLockDelayOptions: readonly DeviceSettingsDurationOption[];
4660
+ autoShutdownDelayOptions: readonly DeviceSettingsDurationOption[];
4661
+ ranges: {
4662
+ brightness?: {
4663
+ min: number;
4664
+ max: number;
4665
+ };
4666
+ };
4667
+ safetyCheckOptions: ReadonlyArray<DeviceSettingsValueOption<Enum_SafetyCheckLevel>>;
4668
+ onDeviceConfirmationFields: readonly DeviceSettingsField[];
3852
4669
  };
3853
- declare const getAutoLockOptions: (_deviceType: IDeviceType) => DurationParts[];
3854
- declare const getAutoShutDownOptions: (_deviceType: IDeviceType) => DurationParts[];
4670
+ declare const getDeviceSettingsCapabilities: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsCapabilities;
3855
4671
 
3856
4672
  declare const getHDPath: (path: string) => Array<number>;
3857
4673
  declare const getScriptType: (path: Array<number>) => InputScriptType;
@@ -3864,6 +4680,10 @@ type SizeConfig = {
3864
4680
  height: number;
3865
4681
  radius?: number;
3866
4682
  };
4683
+ declare const getNftSize: ({ deviceType, thumbnail, }: {
4684
+ deviceType: IDeviceType;
4685
+ thumbnail?: boolean | undefined;
4686
+ }) => SizeConfig | undefined;
3867
4687
  declare const getHomeScreenSize: ({ deviceType, homeScreenType, thumbnail, }: {
3868
4688
  deviceType: IDeviceType;
3869
4689
  homeScreenType: 'WallPaper' | 'Nft';
@@ -3892,4 +4712,4 @@ declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, can
3892
4712
  declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
3893
4713
  declare const HardwareTopLevelSdk: () => CoreApi;
3894
4714
 
3895
- 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, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceInfoMode, DeviceInfoProtocol, DeviceInfoScope, DeviceInfoSource, DeviceInfoStatus, DeviceModelToTypes, DeviceProfile, DeviceProfileRaw, DeviceProfileVerify, DeviceProfileVersions, 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, FirmwareUpdateV4Params, GetDeviceInfoParams, GetPassphraseStateParams, GetPassphraseStatePayload, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceManifest, IProtocolV2ResourceManifestPackage, 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, getLogBlockLabel, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init$1 as initCore, isBleConnect, isMethodVersionRangeUnsupported, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
4715
+ 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, DEVICE_SETTINGS_SHARED_FIELDS, DEVICE_SETTINGS_V1_ONLY_FIELDS, DEVICE_SETTINGS_V2_ONLY_FIELDS, 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, DeviceSettingsCapabilities, DeviceSettingsDurationOption, DeviceSettingsField, DeviceSettingsParams, DeviceSettingsProtocol, DeviceSettingsValueOption, DeviceState, DeviceStateEvent, DeviceStateIdentity, DeviceStateMode, DeviceStatePatch, DeviceStateProtocol, DeviceStateScope, DeviceStateSection, DeviceStateSettings, DeviceStateStatus, DeviceStateUpdateSource, DeviceStateVersions, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUnlockParams, 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, FirmwareUpdateV4Params, FirmwareUpdateV4Target, GetDeviceStateParams, GetPassphraseStateParams, HardwareSDKLowLevel, HardwareTopLevelSdk, HardwareUiInteractionMeta, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2BootResources, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2Resource, IProtocolV2ResourceBundle, IProtocolV2ResourceFile, IProtocolV2ResourceType, IProtocolV2Resources, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KaspaStreamingSignInputParams, KaspaStreamingSignOutputParams, 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, OpenWalletSessionMode, OpenWalletSessionModeValue, OpenWalletSessionParams, OpenWalletSessionPayload, PRO2_WALLPAPER_HEIGHT, PRO2_WALLPAPER_WIDTH, PROTOCOL_V2_NEVER_TIMEOUT_MS, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, Pro2WallpaperColorFormat, ProtocolV2FirmwareComponentRelease, ProtocolV2FirmwareComponentReleaseStatus, ProtocolV2FirmwareReleaseStatus, 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, TestProtocolV2PingParams, 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, UiRequestWindowClose, UiRequestWithoutPayload, UiResponseCorrelation, UiResponseCorrelationFields, 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, formatLogMethodLabel, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceSerialNo, getDeviceSettingsCapabilities, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogBlockLabel, getLogger, getMethodVersionRange, getNftSize, getOutputScriptType, getSDKVersion, getSafeLogPayload, getScriptType, getTimeStamp, httpRequest, init$1 as initCore, isBleConnect, isValidVersionArray, isValidVersionString, normalizeSafetyCheckLevel, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };