@onekeyfe/hd-core 1.2.0-alpha.2 → 1.2.0-alpha.20
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.
- package/__tests__/AllNetworkGetAddressBase.tracing.test.ts +75 -0
- package/__tests__/DeviceCommands.test.ts +285 -0
- package/__tests__/DeviceEventRegistration.test.ts +43 -0
- package/__tests__/RequestQueue.test.ts +140 -0
- package/__tests__/UploadPortfolio.test.ts +46 -0
- package/__tests__/connectSettings.test.ts +19 -0
- package/__tests__/core-dispose.test.ts +34 -0
- package/__tests__/core-error-output.test.ts +39 -0
- package/__tests__/device-features-state.test.ts +78 -0
- package/__tests__/device-identity.test.ts +30 -0
- package/__tests__/device-lifecycle-events.test.ts +117 -0
- package/__tests__/device-pool-state.test.ts +132 -0
- package/__tests__/device-settings.test.ts +286 -0
- package/__tests__/device-state-contract.test.ts +27 -0
- package/__tests__/device-state-events.test.ts +162 -0
- package/__tests__/device-state-mapper.test.ts +229 -0
- package/__tests__/device-state-projector.test.ts +94 -0
- package/__tests__/device-state-store.test.ts +82 -0
- package/__tests__/device-utils.test.ts +106 -0
- package/__tests__/device-wallet-session-store.test.ts +213 -0
- package/__tests__/deviceFeaturesUtils.test.ts +39 -0
- package/__tests__/deviceSettings.test.ts +63 -0
- package/__tests__/evmLedgerLegacySafety.test.ts +4 -1
- package/__tests__/evmSignTypedData.test.ts +80 -0
- package/__tests__/filesystemValidation.test.ts +53 -0
- package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +402 -0
- package/__tests__/get-device-state.test.ts +403 -0
- package/__tests__/homescreen.test.ts +24 -0
- package/__tests__/kaspaSignTransaction.test.ts +591 -0
- package/__tests__/logBlockEvent.test.ts +26 -0
- package/__tests__/networkUtils.test.ts +386 -0
- package/__tests__/open-wallet-session-error-response.test.ts +43 -0
- package/__tests__/open-wallet-session.test.ts +559 -0
- package/__tests__/preInitialize.test.ts +33 -0
- package/__tests__/pro2Wallpaper.test.ts +50 -0
- package/__tests__/protocol-v2-bootloader-mode.test.ts +37 -0
- package/__tests__/protocol-v2-firmware-targets.test.ts +19 -0
- package/__tests__/protocol-v2.test.ts +4054 -1178
- package/__tests__/protocolV2FileWrite.test.ts +92 -0
- package/__tests__/protocolV2UiInteraction.test.ts +266 -0
- package/__tests__/public-device-state-api.test.ts +253 -0
- package/__tests__/public-pro2-api-boundary.test.ts +91 -0
- package/__tests__/refresh-device-state.test.ts +101 -0
- package/__tests__/request-context-logging.test.ts +16 -0
- package/__tests__/search-devices.test.ts +136 -0
- package/dist/api/BaseMethod.d.ts +11 -0
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
- package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
- package/dist/api/ClearSessionCache.d.ts +9 -0
- package/dist/api/ClearSessionCache.d.ts.map +1 -0
- package/dist/api/DirList.d.ts.map +1 -1
- package/dist/api/FileRead.d.ts.map +1 -1
- package/dist/api/FileWrite.d.ts +1 -0
- package/dist/api/FileWrite.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV2.d.ts +2 -2
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +25 -5
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/GetDeviceState.d.ts +7 -0
- package/dist/api/GetDeviceState.d.ts.map +1 -0
- package/dist/api/GetFeatures.d.ts +1 -1
- package/dist/api/GetFeatures.d.ts.map +1 -1
- package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
- package/dist/api/GetPassphraseState.d.ts +1 -6
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/OpenWalletSession.d.ts +14 -0
- package/dist/api/OpenWalletSession.d.ts.map +1 -0
- package/dist/api/PathInfo.d.ts.map +1 -1
- package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
- package/dist/api/SearchDevices.d.ts +3 -0
- package/dist/api/SearchDevices.d.ts.map +1 -1
- package/dist/api/UploadPortfolio.d.ts +18 -0
- package/dist/api/UploadPortfolio.d.ts.map +1 -0
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
- package/dist/api/device/DeviceCancel.d.ts.map +1 -1
- package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
- package/dist/api/device/DeviceFullyUploadResource.d.ts +1 -2
- package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -1
- package/dist/api/device/DeviceLock.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
- package/dist/api/device/DeviceSettings.d.ts.map +1 -1
- package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
- package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
- package/dist/api/device/DeviceWipe.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +1 -0
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
- package/dist/api/firmware/getBinary.d.ts +11 -3
- package/dist/api/firmware/getBinary.d.ts.map +1 -1
- package/dist/api/firmware/progressThrottle.d.ts +3 -0
- package/dist/api/firmware/progressThrottle.d.ts.map +1 -0
- package/dist/api/helpers/filesystemValidation.d.ts +3 -0
- package/dist/api/helpers/filesystemValidation.d.ts.map +1 -1
- package/dist/api/helpers/paramsValidator.d.ts +1 -0
- package/dist/api/helpers/paramsValidator.d.ts.map +1 -1
- package/dist/api/helpers/protocolV2FileWrite.d.ts +33 -0
- package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -0
- package/dist/api/index.d.ts +15 -19
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts +5 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
- package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +6 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -1
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +3 -2
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +1 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts +28 -0
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceSettingsGet.d.ts +6 -0
- package/dist/api/protocol-v2/DeviceSettingsGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts +16 -0
- package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceSettingsSet.d.ts +12 -0
- package/dist/api/protocol-v2/DeviceSettingsSet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts +6 -0
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +26 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
- package/dist/api/protocol-v2/{FilesystemFixPermission.d.ts → FilesystemPermissionFix.d.ts} +2 -2
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +6 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -0
- package/dist/api/protocol-v2/helpers.d.ts +27 -19
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/api/ton/TonSignData.d.ts +1 -5
- package/dist/api/ton/TonSignData.d.ts.map +1 -1
- package/dist/api/utils.d.ts +2 -1
- package/dist/api/utils.d.ts.map +1 -1
- package/dist/constants/index.d.ts +2 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/core/RequestQueue.d.ts +19 -1
- package/dist/core/RequestQueue.d.ts.map +1 -1
- package/dist/core/deviceEventRegistration.d.ts +11 -0
- package/dist/core/deviceEventRegistration.d.ts.map +1 -0
- package/dist/core/index.d.ts +4 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +1 -1
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/data-manager/connectSettings.d.ts.map +1 -1
- package/dist/device/Device.d.ts +34 -10
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +8 -6
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DeviceFeaturesState.d.ts +4 -0
- package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
- package/dist/device/DevicePool.d.ts +4 -2
- package/dist/device/DevicePool.d.ts.map +1 -1
- package/dist/device/DeviceStateMapper.d.ts +13 -0
- package/dist/device/DeviceStateMapper.d.ts.map +1 -0
- package/dist/device/DeviceStateProjector.d.ts +7 -0
- package/dist/device/DeviceStateProjector.d.ts.map +1 -0
- package/dist/device/DeviceStateStore.d.ts +21 -0
- package/dist/device/DeviceStateStore.d.ts.map +1 -0
- package/dist/device/DeviceWalletSessionStore.d.ts +20 -0
- package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -0
- package/dist/device/cloneDeviceState.d.ts +2 -0
- package/dist/device/cloneDeviceState.d.ts.map +1 -0
- package/dist/device/deviceIdentity.d.ts +5 -0
- package/dist/device/deviceIdentity.d.ts.map +1 -0
- package/dist/deviceProfile/buildDeviceFeatures.d.ts +9 -3
- package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
- package/dist/deviceProfile/index.d.ts +0 -1
- package/dist/deviceProfile/index.d.ts.map +1 -1
- package/dist/events/call.d.ts +7 -0
- package/dist/events/call.d.ts.map +1 -1
- package/dist/events/core.d.ts +2 -2
- package/dist/events/core.d.ts.map +1 -1
- package/dist/events/device.d.ts +11 -2
- package/dist/events/device.d.ts.map +1 -1
- package/dist/events/iframe.d.ts +1 -0
- package/dist/events/iframe.d.ts.map +1 -1
- package/dist/events/logBlockEvent.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +18 -2
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +1351 -603
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5995 -2816
- package/dist/inject.d.ts +3 -2
- package/dist/inject.d.ts.map +1 -1
- package/dist/lowLevelInject.d.ts +2 -1
- package/dist/lowLevelInject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/deviceSession.d.ts +7 -0
- package/dist/protocols/protocol-v2/deviceSession.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/features.d.ts +23 -28
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/firmware.d.ts +11 -9
- package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/index.d.ts +3 -2
- package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/lockedError.d.ts +2 -0
- package/dist/protocols/protocol-v2/lockedError.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +16 -0
- package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/uiInteraction.d.ts +39 -0
- package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/unlockRetry.d.ts +11 -0
- package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/walletSession.d.ts +19 -0
- package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -0
- package/dist/topLevelInject.d.ts.map +1 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts +1 -2
- package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/deviceSettings.d.ts +9 -0
- package/dist/types/api/deviceSettings.d.ts.map +1 -1
- package/dist/types/api/deviceUnlock.d.ts +1 -1
- package/dist/types/api/deviceUnlock.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +6 -6
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/getDeviceState.d.ts +12 -0
- package/dist/types/api/getDeviceState.d.ts.map +1 -0
- package/dist/types/api/getFeatures.d.ts.map +1 -1
- package/dist/types/api/getOnekeyFeatures.d.ts.map +1 -1
- package/dist/types/api/getPassphraseState.d.ts +2 -10
- package/dist/types/api/getPassphraseState.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +26 -25
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/kaspaSignTransaction.d.ts +27 -2
- package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
- package/dist/types/api/openWalletSession.d.ts +41 -0
- package/dist/types/api/openWalletSession.d.ts.map +1 -0
- package/dist/types/api/protocolV2.d.ts +31 -28
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/api/sessionCache.d.ts +10 -0
- package/dist/types/api/sessionCache.d.ts.map +1 -0
- package/dist/types/device.d.ts +120 -4
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/params.d.ts +1 -0
- package/dist/types/params.d.ts.map +1 -1
- package/dist/types/settings.d.ts +21 -1
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/assets.d.ts +2 -1
- package/dist/utils/assets.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesCompat.d.ts +13 -0
- package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -0
- package/dist/utils/deviceFeaturesUtils.d.ts +13 -3
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts +9 -8
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/deviceSettings.d.ts +2 -0
- package/dist/utils/deviceSettings.d.ts.map +1 -1
- package/dist/utils/deviceVersionUtils.d.ts +6 -5
- package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
- package/dist/utils/homescreen.d.ts.map +1 -1
- package/dist/utils/index.d.ts +3 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/networkUtils.d.ts +9 -1
- package/dist/utils/networkUtils.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/dist/utils/pro2Wallpaper.d.ts +12 -0
- package/dist/utils/pro2Wallpaper.d.ts.map +1 -0
- package/dist/utils/tracing.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/BaseMethod.ts +40 -7
- package/src/api/CheckBootloaderRelease.ts +1 -2
- package/src/api/CheckFirmwareRelease.ts +1 -2
- package/src/api/ClearSessionCache.ts +28 -0
- package/src/api/DirList.ts +5 -3
- package/src/api/DirMake.ts +3 -3
- package/src/api/DirRemove.ts +3 -3
- package/src/api/FileDelete.ts +3 -3
- package/src/api/FileRead.ts +23 -7
- package/src/api/FileWrite.ts +23 -168
- package/src/api/FirmwareUpdate.ts +4 -4
- package/src/api/FirmwareUpdateV2.ts +133 -45
- package/src/api/FirmwareUpdateV3.ts +3 -5
- package/src/api/FirmwareUpdateV4.ts +1138 -357
- package/src/api/GetDeviceState.ts +55 -0
- package/src/api/GetFeatures.ts +8 -3
- package/src/api/GetOnekeyFeatures.ts +3 -72
- package/src/api/GetPassphraseState.ts +11 -18
- package/src/api/OpenWalletSession.ts +221 -0
- package/src/api/PathInfo.ts +5 -3
- package/src/api/PromptWebDeviceAccess.ts +2 -3
- package/src/api/SearchDevices.ts +29 -4
- package/src/api/UploadPortfolio.ts +50 -0
- package/src/api/alephium/AlephiumSignTransaction.ts +2 -2
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +4 -8
- package/src/api/benfen/BenfenGetAddress.ts +1 -1
- package/src/api/btc/BTCGetPublicKey.ts +1 -1
- package/src/api/cardano/CardanoSignMessage.ts +1 -1
- package/src/api/cardano/CardanoSignTransaction.ts +1 -1
- package/src/api/device/DeviceCancel.ts +1 -0
- package/src/api/device/DeviceChangePin.ts +24 -0
- package/src/api/device/DeviceFullyUploadResource.ts +4 -5
- package/src/api/device/DeviceLock.ts +1 -0
- package/src/api/device/DeviceRebootToBoardloader.ts +5 -4
- package/src/api/device/DeviceRebootToBootloader.ts +5 -4
- package/src/api/device/DeviceSettings.ts +121 -0
- package/src/api/device/DeviceUnlock.ts +9 -0
- package/src/api/device/DeviceUpdateBootloader.ts +1 -2
- package/src/api/device/DeviceWipe.ts +19 -0
- package/src/api/evm/EVMSignTypedData.ts +3 -5
- package/src/api/evm/legacyV1/getAddress.ts +2 -2
- package/src/api/evm/legacyV1/getPublicKey.ts +2 -2
- package/src/api/evm/legacyV1/signMessage.ts +2 -2
- package/src/api/evm/legacyV1/signTypedData.ts +2 -2
- package/src/api/evm/legacyV1/signTypedHash.ts +2 -2
- package/src/api/evm/legacyV1/verifyMessage.ts +2 -2
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +21 -7
- package/src/api/firmware/getBinary.ts +8 -3
- package/src/api/firmware/progressThrottle.ts +44 -0
- package/src/api/helpers/batchGetPublickeys.ts +2 -2
- package/src/api/helpers/filesystemValidation.ts +61 -0
- package/src/api/helpers/paramsValidator.ts +1 -1
- package/src/api/helpers/protocolV2FileWrite.ts +193 -0
- package/src/api/index.ts +17 -20
- package/src/api/kaspa/KaspaSignTransaction.ts +341 -22
- package/src/api/kaspa/helpers/TransferSerialize.ts +14 -0
- package/src/api/nervos/NervosSignTransaction.ts +2 -2
- package/src/api/nexa/NexaSignTransaction.ts +1 -1
- package/src/api/protocol-v2/{FactoryGetDeviceInfo.ts → DeviceFactoryInfoGet.ts} +4 -4
- package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +32 -0
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +7 -9
- package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +41 -6
- package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +6 -4
- package/src/api/protocol-v2/DeviceInfoGet.ts +145 -0
- package/src/api/protocol-v2/DeviceReboot.ts +5 -3
- package/src/api/protocol-v2/DeviceSettingsGet.ts +18 -0
- package/src/api/protocol-v2/DeviceSettingsPageShow.ts +70 -0
- package/src/api/protocol-v2/DeviceSettingsSet.ts +44 -0
- package/src/api/protocol-v2/DeviceStatusGet.ts +16 -0
- package/src/api/protocol-v2/DeviceUploadWallpaper.ts +131 -0
- package/src/api/protocol-v2/FilesystemFormat.ts +5 -2
- package/src/api/protocol-v2/{FilesystemFixPermission.ts → FilesystemPermissionFix.ts} +3 -3
- package/src/api/protocol-v2/Ping.ts +1 -1
- package/src/api/protocol-v2/{GetProtoVersion.ts → ProtocolInfoRequest.ts} +3 -3
- package/src/api/protocol-v2/helpers.ts +58 -62
- package/src/api/ton/TonSignData.ts +1 -5
- package/src/api/utils.ts +7 -3
- package/src/constants/index.ts +7 -1
- package/src/core/RequestQueue.ts +124 -4
- package/src/core/deviceEventRegistration.ts +23 -0
- package/src/core/index.ts +171 -60
- package/src/data/messages/messages-protocol-v2.json +825 -709
- package/src/data/messages/messages.json +286 -1
- package/src/data-manager/DataManager.ts +13 -6
- package/src/data-manager/connectSettings.ts +4 -0
- package/src/device/Device.ts +480 -192
- package/src/device/DeviceCommands.ts +81 -25
- package/src/device/DeviceFeaturesState.ts +34 -0
- package/src/device/DevicePool.ts +67 -19
- package/src/device/DeviceStateMapper.ts +348 -0
- package/src/device/DeviceStateProjector.ts +95 -0
- package/src/device/DeviceStateStore.ts +201 -0
- package/src/device/DeviceWalletSessionStore.ts +105 -0
- package/src/device/cloneDeviceState.ts +39 -0
- package/src/device/deviceIdentity.ts +18 -0
- package/src/deviceProfile/buildDeviceFeatures.ts +233 -209
- package/src/deviceProfile/index.ts +0 -1
- package/src/events/call.ts +6 -0
- package/src/events/core.ts +2 -0
- package/src/events/device.ts +17 -1
- package/src/events/iframe.ts +1 -0
- package/src/events/logBlockEvent.ts +8 -1
- package/src/events/ui-request.ts +24 -2
- package/src/index.ts +4 -0
- package/src/inject.ts +33 -34
- package/src/lowLevelInject.ts +3 -0
- package/src/protocols/protocol-v2/deviceSession.ts +24 -0
- package/src/protocols/protocol-v2/features.ts +68 -82
- package/src/protocols/protocol-v2/firmware.ts +12 -36
- package/src/protocols/protocol-v2/index.ts +3 -1
- package/src/protocols/protocol-v2/lockedError.ts +10 -0
- package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +61 -0
- package/src/protocols/protocol-v2/uiInteraction.ts +210 -0
- package/src/protocols/protocol-v2/unlockRetry.ts +76 -0
- package/src/protocols/protocol-v2/walletSession.ts +107 -0
- package/src/topLevelInject.ts +2 -0
- package/src/types/api/checkAllFirmwareRelease.ts +1 -2
- package/src/types/api/deviceSettings.ts +9 -0
- package/src/types/api/deviceUnlock.ts +1 -1
- package/src/types/api/firmwareUpdate.ts +28 -20
- package/src/types/api/getDeviceState.ts +19 -0
- package/src/types/api/getFeatures.ts +3 -0
- package/src/types/api/getOnekeyFeatures.ts +3 -0
- package/src/types/api/getPassphraseState.ts +8 -11
- package/src/types/api/index.ts +37 -53
- package/src/types/api/kaspaSignTransaction.ts +40 -2
- package/src/types/api/openWalletSession.ts +64 -0
- package/src/types/api/protocolV2.ts +88 -54
- package/src/types/api/sessionCache.ts +14 -0
- package/src/types/device.ts +167 -3
- package/src/types/params.ts +4 -0
- package/src/types/settings.ts +42 -30
- package/src/utils/assets.ts +4 -1
- package/src/utils/deviceFeaturesCompat.ts +173 -0
- package/src/utils/deviceFeaturesUtils.ts +68 -24
- package/src/utils/deviceInfoUtils.ts +26 -64
- package/src/utils/deviceSettings.ts +48 -0
- package/src/utils/deviceVersionUtils.ts +25 -44
- package/src/utils/findDefectiveBatchDevice.ts +3 -3
- package/src/utils/homescreen.ts +10 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/networkUtils.ts +270 -14
- package/src/utils/pro2Wallpaper.ts +109 -0
- package/src/utils/tracing.ts +3 -1
- package/dist/api/GetDeviceInfo.d.ts +0 -9
- package/dist/api/GetDeviceInfo.d.ts.map +0 -1
- package/dist/api/protocol-v2/DevReboot.d.ts +0 -7
- package/dist/api/protocol-v2/DevReboot.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts +0 -29
- package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts.map +0 -1
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts +0 -7
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts.map +0 -1
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts +0 -6
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts.map +0 -1
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +0 -13
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +0 -1
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts.map +0 -1
- package/dist/api/protocol-v2/GetProtoVersion.d.ts +0 -6
- package/dist/api/protocol-v2/GetProtoVersion.d.ts.map +0 -1
- package/dist/deviceProfile/buildDeviceProfile.d.ts +0 -21
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
- package/dist/types/api/getDeviceInfo.d.ts +0 -85
- package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
- package/src/api/GetDeviceInfo.ts +0 -145
- package/src/api/protocol-v2/DevReboot.ts +0 -24
- package/src/api/protocol-v2/DeviceGetDeviceInfo.ts +0 -118
- package/src/api/protocol-v2/FactoryDeviceInfoSettings.ts +0 -29
- package/src/api/protocol-v2/FilesystemDiskControl.ts +0 -50
- package/src/deviceProfile/buildDeviceProfile.ts +0 -334
- package/src/types/api/getDeviceInfo.ts +0 -99
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,63 @@
|
|
|
1
1
|
import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
|
|
2
|
-
import {
|
|
3
|
-
export { Messages as PROTO, TonSignDataType } from '@onekeyfe/hd-transport';
|
|
2
|
+
import { DeviceFirmwareTargetType, DeviceFirmwareUpdateRecordFields, DeviceRebootType, DeviceFirmwareTarget, Messages, Transport, TransportCallOptions, OneKeyDeviceCommType, ProtocolV2DeviceInfo, DeviceStatus as DeviceStatus$1, OneKeyDeviceInfo, Success as Success$1, LowlevelTransportSharedPlugin, DeviceSettings, DeviceSettingsPage, ProtocolInfo, DevOnboardingStatus, DeviceFirmwareUpdateStatus, DeviceFactoryInfo, RecoveryDeviceType, SafetyCheckLevel, ResourceType, NextU2FCounter, SetU2FCounter, CipheredKeyValue as CipheredKeyValue$1, UintType, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, SignedPsbt, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, SolanaTxExtraInfo, SolanaOffChainMessageVersion, SolanaOffChainMessageFormat, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, TronResourceCode, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, SuiMessageSignature, CardanoAddressParametersType, CardanoMessageSignature, FilecoinAddress as FilecoinAddress$1, FilecoinSignedTx as FilecoinSignedTx$1, PolkadotAddress as PolkadotAddress$1, PolkadotSignedTx as PolkadotSignedTx$1, KaspaAddress as KaspaAddress$1, NervosAddress as NervosAddress$1, NervosSignedTx as NervosSignedTx$1, DnxAddress as DnxAddress$1, TonWalletVersion, TonWorkChain, TonSignedMessage, TonSignedProof, TonSignDataType, TonSignedData, ScdoAddress as ScdoAddress$1, ScdoSignedMessage, ScdoSignedTx as ScdoSignedTx$1, AlephiumMessageSignature, AlephiumSignedTx as AlephiumSignedTx$1, BenfenAddress as BenfenAddress$1, BenfenMessageSignature, ChangeOutputScriptType } from '@onekeyfe/hd-transport';
|
|
3
|
+
export { Success as DeviceSuccess, HDNodeType, Messages as PROTO, ResourceType, TonSignDataType, TonWalletVersion } from '@onekeyfe/hd-transport';
|
|
4
4
|
import * as _onekeyfe_hd_shared from '@onekeyfe/hd-shared';
|
|
5
|
-
import { HardwareConnectProtocol,
|
|
5
|
+
import { HardwareConnectProtocol, EFirmwareType, EDeviceType, Deferred } from '@onekeyfe/hd-shared';
|
|
6
6
|
|
|
7
7
|
interface CommonParams {
|
|
8
8
|
keepSession?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* polling connect max retry count
|
|
11
|
+
*/
|
|
9
12
|
retryCount?: number;
|
|
13
|
+
/**
|
|
14
|
+
* polling interval time
|
|
15
|
+
*/
|
|
10
16
|
pollIntervalTime?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Timeout time for single polling
|
|
19
|
+
*/
|
|
11
20
|
timeout?: number;
|
|
21
|
+
/**
|
|
22
|
+
* DeviceInfoGet timeout during Protocol V2 initialization.
|
|
23
|
+
*/
|
|
24
|
+
protocolV2DeviceInfoTimeoutMs?: number;
|
|
25
|
+
/**
|
|
26
|
+
* passphrase state
|
|
27
|
+
*/
|
|
12
28
|
passphraseState?: string;
|
|
29
|
+
/**
|
|
30
|
+
* Use empty passphrase
|
|
31
|
+
*/
|
|
13
32
|
useEmptyPassphrase?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Every init session
|
|
35
|
+
*/
|
|
14
36
|
initSession?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Use derive cardano
|
|
39
|
+
*/
|
|
15
40
|
deriveCardano?: boolean;
|
|
16
41
|
detectBootloaderDevice?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Skip web device prompt
|
|
44
|
+
*/
|
|
17
45
|
skipWebDevicePrompt?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Skip passphrase check
|
|
48
|
+
*/
|
|
18
49
|
skipPassphraseCheck?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Only connect device, not initialize device, only ble connect
|
|
52
|
+
*/
|
|
19
53
|
onlyConnectBleDevice?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* Use pre-initialized device state (BLE only)
|
|
56
|
+
*/
|
|
20
57
|
usePreInitialize?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Expected transport protocol. If omitted, SDK probes Protocol V1 then Protocol V2.
|
|
60
|
+
*/
|
|
21
61
|
connectProtocol?: HardwareConnectProtocol;
|
|
22
62
|
}
|
|
23
63
|
type Params<T> = CommonParams & T & {
|
|
@@ -38,29 +78,38 @@ type Response<T> = Promise<Success<T> | Unsuccessful>;
|
|
|
38
78
|
|
|
39
79
|
declare const safeThrowError: (error: any) => never;
|
|
40
80
|
|
|
41
|
-
type RebootTypeInput =
|
|
81
|
+
type RebootTypeInput = DeviceRebootType | keyof typeof DeviceRebootType | string | number;
|
|
42
82
|
type DeviceRebootParams = {
|
|
43
83
|
rebootType?: RebootTypeInput;
|
|
44
84
|
reboot_type?: RebootTypeInput;
|
|
45
85
|
};
|
|
46
|
-
type DeviceFirmwareTargetInput =
|
|
47
|
-
targetId?:
|
|
48
|
-
target_id?:
|
|
86
|
+
type DeviceFirmwareTargetInput = DeviceFirmwareTarget | {
|
|
87
|
+
targetId?: DeviceFirmwareTargetType | string | number;
|
|
88
|
+
target_id?: DeviceFirmwareTargetType | string | number;
|
|
49
89
|
path: string;
|
|
50
90
|
};
|
|
51
91
|
type DeviceFirmwareUpdateParams = {
|
|
52
92
|
targets?: DeviceFirmwareTargetInput[];
|
|
53
|
-
targetId?:
|
|
54
|
-
target_id?:
|
|
93
|
+
targetId?: DeviceFirmwareTargetType | string | number;
|
|
94
|
+
target_id?: DeviceFirmwareTargetType | string | number;
|
|
55
95
|
path?: string;
|
|
56
96
|
};
|
|
57
|
-
type
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
97
|
+
type DeviceFirmwareUpdateStatusGetParams = {
|
|
98
|
+
fields?: DeviceFirmwareUpdateRecordFields;
|
|
99
|
+
};
|
|
100
|
+
type DeviceFactoryInfoSetParams = {
|
|
101
|
+
version?: number;
|
|
102
|
+
serial_number?: string;
|
|
103
|
+
burn_in_completed?: boolean;
|
|
104
|
+
factory_test_completed?: boolean;
|
|
105
|
+
manufacture_time?: {
|
|
106
|
+
year: number;
|
|
107
|
+
month: number;
|
|
108
|
+
day: number;
|
|
109
|
+
hour: number;
|
|
110
|
+
minute: number;
|
|
111
|
+
second: number;
|
|
112
|
+
};
|
|
64
113
|
};
|
|
65
114
|
|
|
66
115
|
type PassphrasePromptResponse = {
|
|
@@ -79,15 +128,19 @@ type TypedCallResponseMap = {
|
|
|
79
128
|
[K in MessageKey]: TypedResponseMessage<K>;
|
|
80
129
|
};
|
|
81
130
|
type DefaultMessageResponse = TypedCallResponseMap[MessageKey];
|
|
131
|
+
/**
|
|
132
|
+
* The life cycle begins with the acquisition of the device and ends with the disposal device commands
|
|
133
|
+
* acquire device -> create DeviceCommands -> release device -> dispose DeviceCommands
|
|
134
|
+
*/
|
|
82
135
|
declare class DeviceCommands {
|
|
83
136
|
instanceId: string;
|
|
84
137
|
currentResponseID?: number;
|
|
85
|
-
device: Device
|
|
138
|
+
device: Device;
|
|
86
139
|
transport: Transport;
|
|
87
140
|
mainId: string;
|
|
88
141
|
disposed: boolean;
|
|
89
142
|
callPromise?: Promise<DefaultMessageResponse>;
|
|
90
|
-
constructor(device: Device
|
|
143
|
+
constructor(device: Device, mainId: string);
|
|
91
144
|
dispose(_cancelRequest: boolean): Promise<void>;
|
|
92
145
|
checkDisposed(): void;
|
|
93
146
|
cancelDeviceOnOneKeyDevice(): Promise<{
|
|
@@ -104,7 +157,7 @@ declare class DeviceCommands {
|
|
|
104
157
|
};
|
|
105
158
|
} | {
|
|
106
159
|
success: boolean;
|
|
107
|
-
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;
|
|
160
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 900 | 901 | 902;
|
|
108
161
|
payload: {
|
|
109
162
|
message: string;
|
|
110
163
|
};
|
|
@@ -123,7 +176,7 @@ declare class DeviceCommands {
|
|
|
123
176
|
};
|
|
124
177
|
} | {
|
|
125
178
|
success: boolean;
|
|
126
|
-
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;
|
|
179
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 900 | 901 | 902;
|
|
127
180
|
payload: {
|
|
128
181
|
message: string;
|
|
129
182
|
};
|
|
@@ -135,364 +188,135 @@ declare class DeviceCommands {
|
|
|
135
188
|
_commonCall(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
136
189
|
_filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey, options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
137
190
|
_promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
type DeviceDescriptorDiff = {
|
|
142
|
-
didUpdate: boolean;
|
|
143
|
-
connected: OneKeyDeviceInfo[];
|
|
144
|
-
disconnected: OneKeyDeviceInfo[];
|
|
145
|
-
changedSessions: OneKeyDeviceInfo[];
|
|
146
|
-
changedDebugSessions: OneKeyDeviceInfo[];
|
|
147
|
-
acquired: OneKeyDeviceInfo[];
|
|
148
|
-
debugAcquired: OneKeyDeviceInfo[];
|
|
149
|
-
released: OneKeyDeviceInfo[];
|
|
150
|
-
debugReleased: OneKeyDeviceInfo[];
|
|
151
|
-
descriptors: OneKeyDeviceInfo[];
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
declare class DeviceConnector {
|
|
155
|
-
transport: Transport;
|
|
156
|
-
listenTimestamp: number;
|
|
157
|
-
current: OneKeyDeviceInfo[] | null;
|
|
158
|
-
upcoming: OneKeyDeviceInfo[];
|
|
159
|
-
listening: boolean;
|
|
160
|
-
constructor();
|
|
161
|
-
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
162
|
-
listen(): Promise<void>;
|
|
163
|
-
stop(): void;
|
|
164
|
-
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
165
|
-
release(session: string, onclose: boolean): Promise<void>;
|
|
166
|
-
disconnect(session: string | undefined | null): Promise<void>;
|
|
167
|
-
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
168
|
-
_reportDevicesChange(): void;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
type InitOptions = {
|
|
172
|
-
initSession?: boolean;
|
|
173
|
-
deviceId?: string;
|
|
174
|
-
passphraseState?: string;
|
|
175
|
-
deriveCardano?: boolean;
|
|
176
|
-
connectProtocol?: HardwareConnectProtocol;
|
|
177
|
-
};
|
|
178
|
-
type RunOptions = {
|
|
179
|
-
keepSession?: boolean;
|
|
180
|
-
skipInitialize?: boolean;
|
|
181
|
-
} & InitOptions;
|
|
182
|
-
interface DeviceEvents {
|
|
183
|
-
[DEVICE.PIN]: [Device$1, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
184
|
-
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device$1, ((response: any) => void)?];
|
|
185
|
-
[DEVICE.BUTTON]: [Device$1, DeviceButtonRequestPayload];
|
|
186
|
-
[DEVICE.FEATURES]: [Device$1, DeviceFeaturesPayload];
|
|
187
|
-
[DEVICE.PASSPHRASE]: [
|
|
188
|
-
Device$1,
|
|
189
|
-
PassphraseRequestPayload,
|
|
190
|
-
(response: PassphrasePromptResponse, error?: Error) => void
|
|
191
|
-
];
|
|
192
|
-
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
193
|
-
Device$1,
|
|
194
|
-
(err: any, deviceId: string) => void
|
|
195
|
-
];
|
|
196
|
-
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
197
|
-
Device$1,
|
|
198
|
-
(err: any, deviceId: string) => void
|
|
199
|
-
];
|
|
200
|
-
}
|
|
201
|
-
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
202
|
-
interface Device$1 {
|
|
203
|
-
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
204
|
-
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
205
|
-
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
206
|
-
}
|
|
207
|
-
declare class Device$1 extends EventEmitter {
|
|
208
|
-
originalDescriptor: OneKeyDeviceInfo;
|
|
209
|
-
sdkInstanceId?: string;
|
|
210
|
-
instanceId: string;
|
|
211
|
-
createdAt: number;
|
|
212
|
-
mainId?: string | null;
|
|
213
|
-
deviceConnector?: DeviceConnector | null;
|
|
214
|
-
commands: DeviceCommands;
|
|
215
|
-
private cancelableAction?;
|
|
216
|
-
private deviceAcquired;
|
|
217
|
-
features: Features | undefined;
|
|
218
|
-
featuresNeedsReload: boolean;
|
|
219
|
-
runPromise?: Deferred<void> | null;
|
|
220
|
-
externalState: string[];
|
|
221
|
-
unavailableCapabilities: UnavailableCapabilities;
|
|
222
|
-
instance: number;
|
|
223
|
-
internalState: string[];
|
|
224
|
-
needReloadDevice: boolean;
|
|
225
|
-
keepSession: boolean;
|
|
226
|
-
passphraseState: string | undefined;
|
|
227
|
-
pendingCallbackPromise?: Deferred<void>;
|
|
228
|
-
private preInitializedAt?;
|
|
229
|
-
private preInitializeMeta?;
|
|
230
|
-
private lastInitializeDurationMs?;
|
|
231
|
-
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
232
|
-
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device$1;
|
|
233
|
-
toMessageObject(): Device | null;
|
|
234
|
-
connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
|
|
235
|
-
acquire(connectProtocol?: HardwareConnectProtocol): Promise<void>;
|
|
236
|
-
release(): Promise<void>;
|
|
237
|
-
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
238
|
-
markPreInitialized(meta?: {
|
|
239
|
-
passphraseState?: string;
|
|
240
|
-
}): void;
|
|
241
|
-
clearPreInitialized(): void;
|
|
242
|
-
isPreInitializeMetaMatch(payload?: {
|
|
243
|
-
passphraseState?: string;
|
|
244
|
-
}): boolean;
|
|
245
|
-
isPreInitializedValid(ttlMs: number): boolean;
|
|
246
|
-
setLastInitializeDuration(durationMs: number): void;
|
|
247
|
-
getLastInitializeDuration(): number | undefined;
|
|
248
|
-
getCommands(): DeviceCommands;
|
|
249
|
-
getProtocol(): 'V1' | 'V2';
|
|
250
|
-
isProtocolV2(): boolean;
|
|
251
|
-
getCurrentDeviceType(): IDeviceType;
|
|
252
|
-
getCurrentDeviceId(): string | undefined;
|
|
253
|
-
getCurrentSerialNo(): string;
|
|
254
|
-
getCurrentBleName(): string | null;
|
|
255
|
-
getCurrentLabel(): string | null;
|
|
256
|
-
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
257
|
-
getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
|
|
258
|
-
getCurrentFirmwareVersionString(): string;
|
|
259
|
-
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
260
|
-
getCurrentSafetyChecks(): string | null | undefined;
|
|
261
|
-
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
262
|
-
supportNewPassphrase(): SupportFeatureType;
|
|
263
|
-
supportInputPinOnSoftware(): SupportFeatureType;
|
|
264
|
-
supportModifyHomescreen(): SupportFeatureType;
|
|
265
|
-
private generateStateKey;
|
|
266
|
-
private getSessionCacheDeviceKey;
|
|
267
|
-
getInternalState(_deviceId?: string): string | undefined;
|
|
268
|
-
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
269
|
-
private setInternalState;
|
|
270
|
-
clearInternalState(_deviceId?: string): void;
|
|
271
|
-
initialize(options?: InitOptions): Promise<void>;
|
|
272
|
-
private _initializeProtocolV2;
|
|
273
|
-
private _refreshProtocolV2Status;
|
|
274
|
-
getFeatures(): Promise<Features | undefined>;
|
|
275
|
-
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
276
|
-
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo): Features;
|
|
277
|
-
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
278
|
-
updateFromCache(device: Device$1): void;
|
|
279
|
-
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
280
|
-
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
|
|
281
|
-
interruptionFromOutside(): Promise<void>;
|
|
282
|
-
interruptionFromUser(): Promise<void>;
|
|
283
|
-
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
284
|
-
clearCancelableAction(): void;
|
|
285
|
-
getMode(): EOneKeyDeviceMode;
|
|
286
|
-
getFirmwareVersion(): IVersionArray | null;
|
|
287
|
-
getBLEFirmwareVersion(): IVersionArray | null;
|
|
288
|
-
isUsed(): boolean;
|
|
289
|
-
hasDeviceAcquire(): boolean;
|
|
290
|
-
isUsedHere(): boolean;
|
|
291
|
-
isUsedElsewhere(): boolean;
|
|
292
|
-
isBootloader(): boolean | undefined;
|
|
293
|
-
isInitialized(): boolean | undefined;
|
|
294
|
-
isSeedless(): boolean | undefined;
|
|
295
|
-
isUnacquired(): boolean;
|
|
296
|
-
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
297
|
-
hasUsePassphrase(): boolean;
|
|
298
|
-
checkDeviceId(deviceId: string): boolean;
|
|
299
|
-
lockDevice(): Promise<Success$1>;
|
|
300
|
-
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
301
|
-
unlockDevice(): Promise<Features | undefined>;
|
|
302
|
-
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
declare function generateSdkInstanceId(): string;
|
|
306
|
-
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
307
|
-
interface RequestContext {
|
|
308
|
-
responseID: number;
|
|
309
|
-
sdkInstanceId?: string;
|
|
310
|
-
methodName: string;
|
|
311
|
-
connectId?: string;
|
|
312
|
-
deviceInstanceId?: string;
|
|
313
|
-
commandsInstanceId?: string;
|
|
314
|
-
parentResponseID?: number;
|
|
315
|
-
startTime: number;
|
|
316
|
-
endTime?: number;
|
|
317
|
-
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
318
|
-
error?: string;
|
|
319
|
-
}
|
|
320
|
-
interface SdkTracingContext {
|
|
321
|
-
sdkInstanceId: string;
|
|
322
|
-
createdAt: number;
|
|
323
|
-
activeRequests: Map<number, RequestContext>;
|
|
191
|
+
promptPassphrase(options: PassphraseRequestPayload, promptOptions?: {
|
|
192
|
+
cancelDeviceOnReject?: boolean;
|
|
193
|
+
}): Promise<PassphrasePromptResponse>;
|
|
324
194
|
}
|
|
325
|
-
declare function createSdkTracingContext(): SdkTracingContext;
|
|
326
|
-
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
327
|
-
sdkInstanceId?: string;
|
|
328
|
-
connectId?: string;
|
|
329
|
-
deviceInstanceId?: string;
|
|
330
|
-
commandsInstanceId?: string;
|
|
331
|
-
parentResponseID?: number;
|
|
332
|
-
}): RequestContext;
|
|
333
|
-
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
334
|
-
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
335
|
-
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
336
|
-
declare function formatRequestContext(context: RequestContext): string;
|
|
337
|
-
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
338
195
|
|
|
339
|
-
|
|
340
|
-
private tracingContext;
|
|
341
|
-
readonly sdkInstanceId: string;
|
|
342
|
-
private requestQueue;
|
|
343
|
-
private prePendingCallPromise;
|
|
344
|
-
private methodSynchronize;
|
|
345
|
-
constructor();
|
|
346
|
-
private getCoreContext;
|
|
347
|
-
handleMessage(message: CoreMessage): Promise<any>;
|
|
348
|
-
dispose(): void;
|
|
349
|
-
}
|
|
350
|
-
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
351
|
-
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
352
|
-
env: ConnectSettings['env'];
|
|
353
|
-
Transport: any;
|
|
354
|
-
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
355
|
-
}) => void;
|
|
196
|
+
type ProtocolV2RuntimeMode = 'normal' | 'bootloader';
|
|
356
197
|
|
|
357
|
-
type
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
198
|
+
type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
|
|
199
|
+
type ConnectSettings = {
|
|
200
|
+
connectSrc?: string;
|
|
201
|
+
debug?: boolean;
|
|
202
|
+
transportReconnect?: boolean;
|
|
203
|
+
lazyLoad?: boolean;
|
|
204
|
+
origin?: string;
|
|
205
|
+
parentOrigin?: string;
|
|
206
|
+
configSrc: string;
|
|
207
|
+
iframeSrc: string;
|
|
208
|
+
version: string;
|
|
209
|
+
priority: number;
|
|
210
|
+
trustedHost: boolean;
|
|
211
|
+
supportedBrowser?: boolean;
|
|
212
|
+
env: transportEnv;
|
|
213
|
+
timestamp: number;
|
|
214
|
+
isFrame?: boolean;
|
|
215
|
+
preRelease?: boolean;
|
|
216
|
+
fetchConfig?: boolean;
|
|
217
|
+
extension?: string;
|
|
218
|
+
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
376
219
|
};
|
|
377
|
-
|
|
378
|
-
type
|
|
379
|
-
|
|
220
|
+
type IVersionArray = [number, number, number];
|
|
221
|
+
type ILocale = 'zh-CN' | 'en-US';
|
|
222
|
+
type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04';
|
|
223
|
+
type IProtocolV2FirmwareComponent = {
|
|
224
|
+
target: IProtocolV2FirmwareComponentTarget;
|
|
225
|
+
url: string;
|
|
226
|
+
fingerprint?: string;
|
|
227
|
+
version?: IVersionArray;
|
|
380
228
|
};
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
229
|
+
/** Pro2 RESC bundle okpkg descriptor for incremental FileWrite synchronization. */
|
|
230
|
+
type IProtocolV2ResourceBundle = {
|
|
231
|
+
/** Bundle name, such as images, animation, translations, or fonts_roobert. */
|
|
232
|
+
name: string;
|
|
233
|
+
/** Download URL. */
|
|
234
|
+
url: string;
|
|
235
|
+
/** Device target path, such as vol0:/bundles/images/images.okpkg. */
|
|
236
|
+
devicePath: string;
|
|
237
|
+
/** okpkg payload_version used to skip matching content after FileRead. */
|
|
238
|
+
version?: IVersionArray;
|
|
239
|
+
/** okpkg payload_hash used for SHA3-512 comparison after FileRead. */
|
|
240
|
+
payloadHash?: string;
|
|
241
|
+
/** okpkg header_hash used for SHA3-512 comparison after FileRead. */
|
|
242
|
+
headerHash?: string;
|
|
243
|
+
};
|
|
244
|
+
/** STM32 firmware config */
|
|
245
|
+
type IFirmwareReleaseInfo = {
|
|
246
|
+
required: boolean;
|
|
247
|
+
url: string;
|
|
248
|
+
/**
|
|
249
|
+
* Firmware type (bitcoinonly or universal)
|
|
250
|
+
* This field is not present in the remote config, but will be inferred from the firmware field name
|
|
251
|
+
*/
|
|
252
|
+
firmwareType?: EFirmwareType;
|
|
253
|
+
/** Firmware UI resource */
|
|
254
|
+
resource?: string;
|
|
255
|
+
/** Firmware full UI resource */
|
|
256
|
+
fullResource?: string;
|
|
257
|
+
fullResourceRange?: string[];
|
|
258
|
+
bootloaderResource?: string;
|
|
259
|
+
bootloaderVersion?: IVersionArray;
|
|
260
|
+
displayBootloaderVersion?: IVersionArray;
|
|
261
|
+
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
262
|
+
upgradeType?: 'payload-package-set' | string;
|
|
263
|
+
components?: Record<string, IProtocolV2FirmwareComponent>;
|
|
264
|
+
installOrder?: string[];
|
|
265
|
+
/** Pro2 RESC bundles for incremental direct FileWrite synchronization. */
|
|
266
|
+
resourceBundles?: IProtocolV2ResourceBundle[];
|
|
267
|
+
bootloaderChangelog?: {
|
|
268
|
+
[k in ILocale]: string;
|
|
269
|
+
};
|
|
270
|
+
fingerprint: string;
|
|
271
|
+
version: IVersionArray;
|
|
272
|
+
changelog: {
|
|
273
|
+
[k in ILocale]: string;
|
|
274
|
+
};
|
|
389
275
|
};
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
276
|
+
/** BLE firmware config */
|
|
277
|
+
type IBLEFirmwareReleaseInfo = {
|
|
278
|
+
required: boolean;
|
|
279
|
+
/** bluetooth dfu version */
|
|
280
|
+
url: string;
|
|
281
|
+
/** stm bluetooth update version */
|
|
282
|
+
webUpdate: string;
|
|
283
|
+
fingerprint: string;
|
|
284
|
+
fingerprintWeb: string;
|
|
285
|
+
version: IVersionArray;
|
|
286
|
+
changelog: {
|
|
287
|
+
[k in ILocale]: string;
|
|
288
|
+
};
|
|
394
289
|
};
|
|
395
|
-
type
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
system: boolean;
|
|
407
|
-
archive: boolean;
|
|
408
|
-
directory: boolean;
|
|
290
|
+
type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
|
|
291
|
+
type DeviceTypeMap = {
|
|
292
|
+
[k in IKnownDevice]: {
|
|
293
|
+
firmware: IFirmwareReleaseInfo[];
|
|
294
|
+
/** Pro2 Protocol V2 payload package set */
|
|
295
|
+
'firmware-v1'?: IFirmwareReleaseInfo[];
|
|
296
|
+
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
297
|
+
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
298
|
+
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
299
|
+
ble: IBLEFirmwareReleaseInfo[];
|
|
300
|
+
};
|
|
409
301
|
};
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
declare function factoryGetDeviceInfo(connectId: string): Response<FactoryDeviceInfo>;
|
|
425
|
-
declare function filesystemFixPermission(connectId: string): Response<Success$1>;
|
|
426
|
-
declare function fileRead(connectId: string, params: {
|
|
427
|
-
path: string;
|
|
428
|
-
offset?: number;
|
|
429
|
-
totalSize?: number;
|
|
430
|
-
chunkLen?: number;
|
|
431
|
-
uiPercentage?: number;
|
|
432
|
-
}): Response<FileInfo>;
|
|
433
|
-
declare function fileWrite(connectId: string, params: {
|
|
434
|
-
path: string;
|
|
435
|
-
offset?: number;
|
|
436
|
-
totalSize?: number;
|
|
437
|
-
chunkSize?: number;
|
|
438
|
-
chunkLen?: number;
|
|
439
|
-
data: ArrayBuffer | Uint8Array | Blob | string;
|
|
440
|
-
overwrite?: boolean;
|
|
441
|
-
append?: boolean;
|
|
442
|
-
uiPercentage?: number;
|
|
443
|
-
timeoutMs?: number | string;
|
|
444
|
-
}): Response<FileInfo>;
|
|
445
|
-
declare function fileDelete(connectId: string, params: {
|
|
446
|
-
path: string;
|
|
447
|
-
}): Response<FileOpSuccess>;
|
|
448
|
-
declare function dirList(connectId: string, params: {
|
|
449
|
-
path: string;
|
|
450
|
-
depth?: number;
|
|
451
|
-
}): Response<DirInfo>;
|
|
452
|
-
declare function dirMake(connectId: string, params: {
|
|
453
|
-
path: string;
|
|
454
|
-
}): Response<FileOpSuccess>;
|
|
455
|
-
declare function dirRemove(connectId: string, params: {
|
|
456
|
-
path: string;
|
|
457
|
-
}): Response<FileOpSuccess>;
|
|
458
|
-
declare function pathInfo(connectId: string, params: {
|
|
459
|
-
path: string;
|
|
460
|
-
timeoutMs?: number | string;
|
|
461
|
-
}): Response<PathInfoResult>;
|
|
462
|
-
declare const filesystemFileRead: typeof fileRead;
|
|
463
|
-
declare const filesystemFileWrite: typeof fileWrite;
|
|
464
|
-
declare const filesystemFileDelete: typeof fileDelete;
|
|
465
|
-
declare const filesystemDirList: typeof dirList;
|
|
466
|
-
declare const filesystemDirMake: typeof dirMake;
|
|
467
|
-
declare const filesystemDirRemove: typeof dirRemove;
|
|
468
|
-
declare const filesystemPathInfoQuery: typeof pathInfo;
|
|
469
|
-
declare function filesystemFormat(connectId: string): Response<Success$1>;
|
|
470
|
-
declare function filesystemDiskControl(connectId: string, params: CommonParams & {
|
|
471
|
-
enable: boolean | 0 | 1;
|
|
472
|
-
timeoutMs?: number | string;
|
|
473
|
-
}): Response<Success$1>;
|
|
474
|
-
|
|
475
|
-
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
476
|
-
declare const off: (type: any, fn: any) => void;
|
|
477
|
-
declare const removeAllListeners: (type: any) => void;
|
|
478
|
-
|
|
479
|
-
declare function uiResponse(response: UiResponseEvent): void;
|
|
480
|
-
|
|
481
|
-
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
482
|
-
interface LowLevelInjectApi {
|
|
483
|
-
call: CallMethod;
|
|
484
|
-
eventEmitter: EventEmitter$1;
|
|
485
|
-
init: CoreApi['init'];
|
|
486
|
-
dispose: CoreApi['dispose'];
|
|
487
|
-
uiResponse: CoreApi['uiResponse'];
|
|
488
|
-
cancel: CoreApi['cancel'];
|
|
489
|
-
updateSettings: CoreApi['updateSettings'];
|
|
490
|
-
switchTransport: CoreApi['switchTransport'];
|
|
491
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
492
|
-
}
|
|
493
|
-
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
494
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
302
|
+
type AssetsMap = {
|
|
303
|
+
bridge: {
|
|
304
|
+
version: IVersionArray;
|
|
305
|
+
linux32Rpm: string;
|
|
306
|
+
linux64Rpm: string;
|
|
307
|
+
linux32Deb: string;
|
|
308
|
+
linux64Deb: string;
|
|
309
|
+
win: string;
|
|
310
|
+
mac: string;
|
|
311
|
+
sha256sumAsc: string;
|
|
312
|
+
changelog: {
|
|
313
|
+
[k in ILocale]: string;
|
|
314
|
+
};
|
|
315
|
+
};
|
|
495
316
|
};
|
|
317
|
+
type RemoteConfigResponse = {
|
|
318
|
+
bridge: AssetsMap['bridge'];
|
|
319
|
+
} & DeviceTypeMap;
|
|
496
320
|
|
|
497
321
|
type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
498
322
|
declare enum EOneKeyDeviceMode {
|
|
@@ -507,6 +331,12 @@ type UnavailableCapabilities = {
|
|
|
507
331
|
};
|
|
508
332
|
type KnownDevice = {
|
|
509
333
|
connectId: string | null;
|
|
334
|
+
/**
|
|
335
|
+
* Stable physical-device identity. Current SDK responses always include this
|
|
336
|
+
* value; it remains optional in the type during the uuid compatibility window.
|
|
337
|
+
*/
|
|
338
|
+
serialNo?: string;
|
|
339
|
+
/** @deprecated Use serialNo instead. */
|
|
510
340
|
uuid: string;
|
|
511
341
|
deviceId: string | null;
|
|
512
342
|
deviceType: IDeviceType | null;
|
|
@@ -518,7 +348,8 @@ type KnownDevice = {
|
|
|
518
348
|
error?: typeof undefined;
|
|
519
349
|
mode: EOneKeyDeviceMode;
|
|
520
350
|
features?: Features;
|
|
521
|
-
|
|
351
|
+
/** Unified SDK device-state snapshot; features remains a legacy projection. */
|
|
352
|
+
state?: DeviceState;
|
|
522
353
|
unavailableCapabilities: UnavailableCapabilities;
|
|
523
354
|
bleFirmwareVersion: IVersionArray | null;
|
|
524
355
|
firmwareVersion: IVersionArray | null;
|
|
@@ -528,15 +359,26 @@ type KnownDevice = {
|
|
|
528
359
|
};
|
|
529
360
|
type SearchDevice = {
|
|
530
361
|
connectId: string | null;
|
|
362
|
+
/**
|
|
363
|
+
* Available after device initialization. BLE discovery does not connect to the
|
|
364
|
+
* device, so it returns null until a later initialized device response. Current
|
|
365
|
+
* SDK responses always include the field; it remains optional in the type during
|
|
366
|
+
* the uuid compatibility window.
|
|
367
|
+
*/
|
|
368
|
+
serialNo?: string | null;
|
|
369
|
+
/**
|
|
370
|
+
* @deprecated Ambiguous legacy identifier. Use serialNo for hardware identity
|
|
371
|
+
* and connectId for transport routing.
|
|
372
|
+
*/
|
|
531
373
|
uuid: string;
|
|
532
374
|
deviceId: string | null;
|
|
533
375
|
deviceType: IDeviceType;
|
|
534
376
|
name: string;
|
|
535
377
|
commType: OneKeyDeviceCommType;
|
|
536
378
|
};
|
|
537
|
-
type Device = KnownDevice;
|
|
379
|
+
type Device$1 = KnownDevice;
|
|
538
380
|
type DeviceFeaturesProtocol = 'V1' | 'V2' | 'unknown';
|
|
539
|
-
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
381
|
+
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
540
382
|
type DeviceFeaturesVerify = {
|
|
541
383
|
firmwareBuildId?: string;
|
|
542
384
|
firmwareHash?: string;
|
|
@@ -567,8 +409,111 @@ type DeviceFeaturesRaw = {
|
|
|
567
409
|
protocolV1Features?: Messages.Features;
|
|
568
410
|
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
569
411
|
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
412
|
+
protocolV2DeviceStatus?: DeviceStatus$1;
|
|
413
|
+
};
|
|
414
|
+
type DeviceFeaturesRawPatch = {
|
|
415
|
+
[Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
|
|
416
|
+
};
|
|
417
|
+
type DeviceStateProtocol = DeviceFeaturesProtocol;
|
|
418
|
+
type DeviceStateMode = DeviceFeaturesMode;
|
|
419
|
+
type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
|
|
420
|
+
type DeviceStateUpdateSource = 'initialize' | 'device-info' | 'device-status' | 'apply-settings' | 'change-pin' | 'lock' | 'unlock' | 'passphrase' | 'session-clear' | 'firmware-update' | 'transport-reconnect' | 'compatibility';
|
|
421
|
+
type DeviceStateIdentity = {
|
|
422
|
+
deviceType: IDeviceType;
|
|
423
|
+
firmwareType: EFirmwareType;
|
|
424
|
+
model: string | null;
|
|
425
|
+
vendor: string | null;
|
|
426
|
+
deviceId: string | null;
|
|
427
|
+
serialNo: string;
|
|
428
|
+
label: string | null;
|
|
429
|
+
bleName: string | null;
|
|
430
|
+
};
|
|
431
|
+
type DeviceStateStatus = {
|
|
432
|
+
mode: DeviceStateMode;
|
|
433
|
+
initialized: boolean | null;
|
|
434
|
+
unlocked: boolean | null;
|
|
435
|
+
firmwarePresent: boolean | null;
|
|
436
|
+
backupRequired: boolean | null;
|
|
437
|
+
noBackup: boolean | null;
|
|
438
|
+
unfinishedBackup: boolean | null;
|
|
439
|
+
recoveryMode: boolean | null;
|
|
440
|
+
passphraseProtection: boolean | null;
|
|
441
|
+
pinProtection: boolean | null;
|
|
442
|
+
attachToPinEnabled: boolean | null;
|
|
443
|
+
unlockedAttachPin: boolean | null;
|
|
444
|
+
};
|
|
445
|
+
type DeviceStateSettings = {
|
|
446
|
+
language: string | null;
|
|
447
|
+
bleEnabled: boolean | null;
|
|
448
|
+
sdCardPresent: boolean | null;
|
|
449
|
+
sdProtection: boolean | null;
|
|
450
|
+
wipeCodeProtection: boolean | null;
|
|
451
|
+
passphraseAlwaysOnDevice: boolean | null;
|
|
452
|
+
safetyChecks: string | null;
|
|
453
|
+
autoLockDelayMs: number | null;
|
|
454
|
+
autoShutdownDelayMs: number | null;
|
|
455
|
+
displayRotation: number | null;
|
|
456
|
+
experimentalFeatures: boolean | null;
|
|
457
|
+
wallpaperPath: string | null;
|
|
458
|
+
brightness: number | null;
|
|
459
|
+
animationEnabled: boolean | null;
|
|
460
|
+
tapToWake: boolean | null;
|
|
461
|
+
hapticFeedback: boolean | null;
|
|
462
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
463
|
+
airgapMode: boolean | null;
|
|
464
|
+
fidoEnabled: boolean | null;
|
|
465
|
+
usbLockEnabled: boolean | null;
|
|
466
|
+
randomKeypad: boolean | null;
|
|
467
|
+
};
|
|
468
|
+
type DeviceStateVersions = {
|
|
469
|
+
firmware: string | null;
|
|
470
|
+
bootloader: string | null;
|
|
471
|
+
board: string | null;
|
|
472
|
+
ble: string | null;
|
|
473
|
+
/** @deprecated Kept for legacy consumers; new code should read se01. */
|
|
474
|
+
se?: string | null;
|
|
475
|
+
se01?: string | null;
|
|
476
|
+
se02?: string | null;
|
|
477
|
+
se03?: string | null;
|
|
478
|
+
se04?: string | null;
|
|
479
|
+
se01Boot?: string | null;
|
|
480
|
+
se02Boot?: string | null;
|
|
481
|
+
se03Boot?: string | null;
|
|
482
|
+
se04Boot?: string | null;
|
|
483
|
+
};
|
|
484
|
+
type DeviceState = {
|
|
485
|
+
schemaVersion: 1;
|
|
486
|
+
revision: number;
|
|
487
|
+
updatedAt: number;
|
|
488
|
+
protocol: DeviceStateProtocol;
|
|
489
|
+
/** Device-message protocol version, independent of the SDK V1/V2 protocol family. */
|
|
490
|
+
protocolVersion: number | null;
|
|
491
|
+
identity: DeviceStateIdentity;
|
|
492
|
+
status: DeviceStateStatus;
|
|
493
|
+
settings: DeviceStateSettings;
|
|
494
|
+
versions: DeviceStateVersions;
|
|
495
|
+
capabilities: Array<number | string>;
|
|
496
|
+
verification?: Partial<DeviceFeaturesVerify>;
|
|
497
|
+
};
|
|
498
|
+
type DeviceStatePatch = {
|
|
499
|
+
protocol?: DeviceStateProtocol;
|
|
500
|
+
protocolVersion?: number | null;
|
|
501
|
+
identity?: Partial<DeviceStateIdentity>;
|
|
502
|
+
status?: Partial<DeviceStateStatus>;
|
|
503
|
+
settings?: Partial<DeviceStateSettings>;
|
|
504
|
+
versions?: Partial<DeviceStateVersions>;
|
|
505
|
+
capabilities?: Array<number | string>;
|
|
506
|
+
verification?: DeviceFeaturesVerify;
|
|
507
|
+
raw?: DeviceFeaturesRawPatch;
|
|
508
|
+
};
|
|
509
|
+
type DeviceStateEvent = {
|
|
510
|
+
connectId: string | null;
|
|
511
|
+
state: DeviceState;
|
|
512
|
+
revision: number;
|
|
513
|
+
source: DeviceStateUpdateSource;
|
|
514
|
+
changedKeys: string[];
|
|
570
515
|
};
|
|
571
|
-
type
|
|
516
|
+
type NormalizedFeatures = {
|
|
572
517
|
protocol: DeviceFeaturesProtocol;
|
|
573
518
|
protocolVersion?: number | null;
|
|
574
519
|
deviceType: IDeviceType;
|
|
@@ -597,10 +542,22 @@ type Features = {
|
|
|
597
542
|
sdProtection: boolean | null;
|
|
598
543
|
wipeCodeProtection: boolean | null;
|
|
599
544
|
passphraseAlwaysOnDevice: boolean | null;
|
|
545
|
+
attachToPinEnabled?: boolean | null;
|
|
600
546
|
safetyChecks: string | null;
|
|
601
547
|
autoLockDelayMs: number | null;
|
|
548
|
+
autoShutdownDelayMs: number | null;
|
|
602
549
|
displayRotation: number | null;
|
|
603
550
|
experimentalFeatures: boolean | null;
|
|
551
|
+
wallpaperPath: string | null;
|
|
552
|
+
brightness: number | null;
|
|
553
|
+
animationEnabled: boolean | null;
|
|
554
|
+
tapToWake: boolean | null;
|
|
555
|
+
hapticFeedback: boolean | null;
|
|
556
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
557
|
+
airgapMode: boolean | null;
|
|
558
|
+
fidoEnabled: boolean | null;
|
|
559
|
+
usbLockEnabled: boolean | null;
|
|
560
|
+
randomKeypad: boolean | null;
|
|
604
561
|
firmwareVersion: string | null;
|
|
605
562
|
bootloaderVersion: string | null;
|
|
606
563
|
boardVersion: string | null;
|
|
@@ -620,8 +577,14 @@ type Features = {
|
|
|
620
577
|
unlockedAttachPin?: boolean;
|
|
621
578
|
raw?: DeviceFeaturesRaw;
|
|
622
579
|
};
|
|
580
|
+
type Features = NormalizedFeatures & Partial<Omit<Messages.Features, keyof NormalizedFeatures>> & Partial<Omit<Messages.OnekeyFeatures, keyof NormalizedFeatures | keyof Messages.Features>>;
|
|
623
581
|
type OnekeyFeatures = Messages.OnekeyFeatures;
|
|
624
582
|
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
|
|
583
|
+
/**
|
|
584
|
+
* model_classic: 'classic' | 'classic1s' | 'classicpure'
|
|
585
|
+
* model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
|
|
586
|
+
* model_touch: 'touch' | 'pro'
|
|
587
|
+
*/
|
|
625
588
|
type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
|
|
626
589
|
declare const DeviceModelToTypes: {
|
|
627
590
|
[deviceModel in IDeviceModel]: IDeviceType[];
|
|
@@ -686,89 +649,569 @@ type SupportFeatures = {
|
|
|
686
649
|
modifyHomescreen: SupportFeatureType;
|
|
687
650
|
};
|
|
688
651
|
|
|
689
|
-
type
|
|
690
|
-
type
|
|
691
|
-
|
|
692
|
-
debug?: boolean;
|
|
693
|
-
transportReconnect?: boolean;
|
|
694
|
-
lazyLoad?: boolean;
|
|
695
|
-
origin?: string;
|
|
696
|
-
parentOrigin?: string;
|
|
697
|
-
configSrc: string;
|
|
698
|
-
iframeSrc: string;
|
|
699
|
-
version: string;
|
|
700
|
-
priority: number;
|
|
701
|
-
trustedHost: boolean;
|
|
702
|
-
supportedBrowser?: boolean;
|
|
703
|
-
env: transportEnv;
|
|
704
|
-
timestamp: number;
|
|
705
|
-
isFrame?: boolean;
|
|
706
|
-
preRelease?: boolean;
|
|
707
|
-
fetchConfig?: boolean;
|
|
708
|
-
extension?: string;
|
|
709
|
-
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
652
|
+
type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
|
|
653
|
+
type GetDeviceStateParams = CommonParams & {
|
|
654
|
+
scope?: DeviceStateScope;
|
|
710
655
|
};
|
|
711
|
-
|
|
712
|
-
type
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
656
|
+
/** Internal state-read options, not part of the public CoreApi. */
|
|
657
|
+
type DeviceStateReadOptions = {
|
|
658
|
+
refreshSections?: DeviceStateSection[];
|
|
659
|
+
includeRaw?: boolean;
|
|
660
|
+
};
|
|
661
|
+
declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
|
|
662
|
+
|
|
663
|
+
type DeviceDescriptorDiff = {
|
|
664
|
+
didUpdate: boolean;
|
|
665
|
+
connected: OneKeyDeviceInfo[];
|
|
666
|
+
disconnected: OneKeyDeviceInfo[];
|
|
667
|
+
changedSessions: OneKeyDeviceInfo[];
|
|
668
|
+
changedDebugSessions: OneKeyDeviceInfo[];
|
|
669
|
+
acquired: OneKeyDeviceInfo[];
|
|
670
|
+
debugAcquired: OneKeyDeviceInfo[];
|
|
671
|
+
released: OneKeyDeviceInfo[];
|
|
672
|
+
debugReleased: OneKeyDeviceInfo[];
|
|
673
|
+
descriptors: OneKeyDeviceInfo[];
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
declare class DeviceConnector {
|
|
677
|
+
transport: Transport;
|
|
678
|
+
listenTimestamp: number;
|
|
679
|
+
current: OneKeyDeviceInfo[] | null;
|
|
680
|
+
upcoming: OneKeyDeviceInfo[];
|
|
681
|
+
listening: boolean;
|
|
682
|
+
constructor();
|
|
683
|
+
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
684
|
+
listen(): Promise<void>;
|
|
685
|
+
stop(): void;
|
|
686
|
+
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
687
|
+
release(session: string, onclose: boolean): Promise<void>;
|
|
688
|
+
disconnect(session: string | undefined | null): Promise<void>;
|
|
689
|
+
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
690
|
+
_reportDevicesChange(): void;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
type InitOptions = {
|
|
694
|
+
initSession?: boolean;
|
|
695
|
+
deviceId?: string;
|
|
696
|
+
passphraseState?: string;
|
|
697
|
+
deriveCardano?: boolean;
|
|
698
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
699
|
+
protocolV2DeviceInfoTimeoutMs?: number;
|
|
700
|
+
/** Refresh Protocol V2 runtime state before returning discovery results. */
|
|
701
|
+
refreshRuntimeState?: boolean;
|
|
702
|
+
};
|
|
703
|
+
type RunOptions = {
|
|
704
|
+
keepSession?: boolean;
|
|
705
|
+
skipInitialize?: boolean;
|
|
706
|
+
} & InitOptions;
|
|
707
|
+
interface DeviceEvents {
|
|
708
|
+
[DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
709
|
+
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
710
|
+
[DEVICE.ATTACH_PIN_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
711
|
+
[DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
|
|
712
|
+
[DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
|
|
713
|
+
[DEVICE.STATE]: [Device, DeviceStateEvent];
|
|
714
|
+
[DEVICE.PASSPHRASE]: [
|
|
715
|
+
Device,
|
|
716
|
+
PassphraseRequestPayload,
|
|
717
|
+
(response: PassphrasePromptResponse, error?: Error) => void
|
|
718
|
+
];
|
|
719
|
+
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
720
|
+
Device,
|
|
721
|
+
(err: any, deviceId: string) => void
|
|
722
|
+
];
|
|
723
|
+
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
724
|
+
Device,
|
|
725
|
+
(err: any, deviceId: string) => void
|
|
726
|
+
];
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* Pre-populate the device session cache with a known session ID.
|
|
730
|
+
*
|
|
731
|
+
* This allows short-lived processes (e.g. CLI) to restore a previously
|
|
732
|
+
* obtained session, avoiding the need to re-enter passphrase on every
|
|
733
|
+
* invocation. The session must have been obtained from a prior
|
|
734
|
+
* getPassphraseState() call on the same device.
|
|
735
|
+
*
|
|
736
|
+
* @param deviceId - The device's device_id (from features)
|
|
737
|
+
* @param passphraseState - The passphrase state token
|
|
738
|
+
* @param sessionId - The session_id to cache (from features.session_id)
|
|
739
|
+
*/
|
|
740
|
+
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
741
|
+
interface Device {
|
|
742
|
+
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
743
|
+
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
744
|
+
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
745
|
+
}
|
|
746
|
+
declare class Device extends EventEmitter {
|
|
747
|
+
/**
|
|
748
|
+
* 设备标识对象
|
|
749
|
+
*/
|
|
750
|
+
originalDescriptor: OneKeyDeviceInfo;
|
|
751
|
+
sdkInstanceId?: string;
|
|
752
|
+
/**
|
|
753
|
+
* 设备实例唯一标识
|
|
754
|
+
*/
|
|
755
|
+
instanceId: string;
|
|
756
|
+
createdAt: number;
|
|
757
|
+
/**
|
|
758
|
+
* 设备主 ID
|
|
759
|
+
* 蓝牙连接时是设备的 UUID
|
|
760
|
+
* USB连接时是设备的 sessionID
|
|
761
|
+
*/
|
|
762
|
+
mainId?: string | null;
|
|
763
|
+
/**
|
|
764
|
+
* 通信管道,向设备发送请求
|
|
765
|
+
*/
|
|
766
|
+
deviceConnector?: DeviceConnector | null;
|
|
767
|
+
/**
|
|
768
|
+
* 固件命令
|
|
769
|
+
*/
|
|
770
|
+
commands: DeviceCommands;
|
|
771
|
+
/**
|
|
772
|
+
* 可取消的操作
|
|
773
|
+
*/
|
|
774
|
+
private cancelableAction?;
|
|
775
|
+
/**
|
|
776
|
+
* 设备是否被占用
|
|
777
|
+
*/
|
|
778
|
+
private deviceAcquired;
|
|
779
|
+
/** Canonical device-state cache; legacy Features is a compatibility projection. */
|
|
780
|
+
private stateStore;
|
|
781
|
+
/** Force the next initialization to reload DeviceInfo after reconnect or reboot. */
|
|
782
|
+
private protocolV2StateNeedsReload;
|
|
783
|
+
get state(): (DeviceState & {
|
|
784
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
785
|
+
}) | undefined;
|
|
786
|
+
get features(): Features | undefined;
|
|
787
|
+
set features(features: Features | undefined);
|
|
788
|
+
runPromise?: Deferred<void> | null;
|
|
789
|
+
externalState: string[];
|
|
790
|
+
unavailableCapabilities: UnavailableCapabilities;
|
|
791
|
+
instance: number;
|
|
792
|
+
internalState: string[];
|
|
793
|
+
needReloadDevice: boolean;
|
|
794
|
+
/**
|
|
795
|
+
* 执行 API 方法后是否保留 SessionID
|
|
796
|
+
*/
|
|
797
|
+
keepSession: boolean;
|
|
798
|
+
passphraseState: string | undefined;
|
|
799
|
+
pendingCallbackPromise?: Deferred<void>;
|
|
800
|
+
/** Pre-initialize timestamp (ms) */
|
|
801
|
+
private preInitializedAt?;
|
|
802
|
+
/** Pre-initialize context, used to verify state consistency before skipping */
|
|
803
|
+
private preInitializeMeta?;
|
|
804
|
+
/** Last Initialize duration (ms), reported as "saved" when a skip happens */
|
|
805
|
+
private lastInitializeDurationMs?;
|
|
806
|
+
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
807
|
+
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
|
|
808
|
+
toMessageObject(): Device$1 | null;
|
|
809
|
+
/**
|
|
810
|
+
* Device connect
|
|
811
|
+
* @returns {Promise<boolean>}
|
|
812
|
+
*/
|
|
813
|
+
connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
|
|
814
|
+
acquire(connectProtocol?: HardwareConnectProtocol, options?: {
|
|
815
|
+
throwOnRunPromiseError?: boolean;
|
|
816
|
+
}): Promise<void>;
|
|
817
|
+
release(): Promise<void>;
|
|
818
|
+
/**
|
|
819
|
+
* Pre-initialize: connect + Initialize ahead of the sign.
|
|
820
|
+
*/
|
|
821
|
+
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
822
|
+
markPreInitialized(meta?: {
|
|
823
|
+
passphraseState?: string;
|
|
824
|
+
}): void;
|
|
825
|
+
clearPreInitialized(): void;
|
|
826
|
+
isPreInitializeMetaMatch(payload?: {
|
|
827
|
+
passphraseState?: string;
|
|
828
|
+
}): boolean;
|
|
829
|
+
isPreInitializedValid(ttlMs: number): boolean;
|
|
830
|
+
setLastInitializeDuration(durationMs: number): void;
|
|
831
|
+
getLastInitializeDuration(): number | undefined;
|
|
832
|
+
getCommands(): DeviceCommands;
|
|
833
|
+
/**
|
|
834
|
+
* Canonical protocol discriminator.
|
|
835
|
+
*
|
|
836
|
+
* descriptor.protocolType is established by active probing; V2 features are mapped
|
|
837
|
+
* from DeviceInfoGet. All protocol branches must use this method instead of reading
|
|
838
|
+
* originalDescriptor.protocolType directly or inferring a protocol from features.
|
|
839
|
+
*/
|
|
840
|
+
getProtocol(): 'V1' | 'V2';
|
|
841
|
+
isProtocolV2(): boolean;
|
|
842
|
+
getCurrentDeviceType(): IDeviceType;
|
|
843
|
+
getCurrentDeviceId(): string | undefined;
|
|
844
|
+
getCurrentSerialNo(): string;
|
|
845
|
+
getConnectId(): string;
|
|
846
|
+
getCurrentBleName(): string | null;
|
|
847
|
+
getCurrentLabel(): string | null;
|
|
848
|
+
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
849
|
+
getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
|
|
850
|
+
getCurrentFirmwareVersionString(): string;
|
|
851
|
+
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
852
|
+
getCurrentBootloaderVersionString(): string | undefined;
|
|
853
|
+
getCurrentSafetyChecks(): string | null | undefined;
|
|
854
|
+
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
855
|
+
supportNewPassphrase(): SupportFeatureType;
|
|
856
|
+
supportInputPinOnSoftware(): SupportFeatureType;
|
|
857
|
+
supportModifyHomescreen(): SupportFeatureType;
|
|
858
|
+
private getSessionCacheDeviceKey;
|
|
859
|
+
private reconcileSessionCacheDeviceIdentity;
|
|
860
|
+
getInternalState(_deviceId?: string): string | undefined;
|
|
861
|
+
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
862
|
+
private setInternalState;
|
|
863
|
+
clearInternalState(_deviceId?: string): void;
|
|
864
|
+
initialize(options?: InitOptions): Promise<void>;
|
|
865
|
+
/**
|
|
866
|
+
* Device initialization over Protocol V2.
|
|
867
|
+
*
|
|
868
|
+
* Protocol V2 bypasses legacy Initialize/GetFeatures and builds its canonical
|
|
869
|
+
* features state directly from DeviceInfoGet.
|
|
870
|
+
*/
|
|
871
|
+
private _initializeProtocolV2;
|
|
872
|
+
getFeatures(): Promise<Features | undefined>;
|
|
873
|
+
getDeviceState(params?: DeviceStateReadOptions): Promise<DeviceState>;
|
|
874
|
+
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
875
|
+
updateState(patch: DeviceStatePatch, source: DeviceStateUpdateSource): DeviceState & {
|
|
876
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
731
877
|
};
|
|
878
|
+
updateFeaturesPatch(patch: Partial<Features>, source: DeviceStateUpdateSource): Features | undefined;
|
|
879
|
+
probeProtocolV2RuntimeState(deviceInfo: ProtocolV2DeviceInfo, timeoutMs?: number): Promise<Features>;
|
|
880
|
+
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo, deviceStatus?: DeviceStatus$1 | null, runtimeMode?: ProtocolV2RuntimeMode): Features;
|
|
881
|
+
updateProtocolV2Status(status: DeviceStatus$1): Features;
|
|
882
|
+
markTransportDisconnected(): void;
|
|
883
|
+
markProtocolV2Reboot(rebootType: DeviceRebootType): void;
|
|
884
|
+
/**
|
|
885
|
+
* 暂时只在 acquire 后更新 Session ID
|
|
886
|
+
* 后续看是否有需要依据 listen 返回结果更新
|
|
887
|
+
* @param descriptor
|
|
888
|
+
*/
|
|
889
|
+
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
890
|
+
updateFromCache(device: Device): void;
|
|
891
|
+
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
892
|
+
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions, runPromise: Deferred<void>): Promise<void>;
|
|
893
|
+
interruptionFromOutside(): Promise<void>;
|
|
894
|
+
interruptionFromUser(): Promise<void>;
|
|
895
|
+
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
896
|
+
clearCancelableAction(): void;
|
|
897
|
+
getMode(): EOneKeyDeviceMode;
|
|
898
|
+
getFirmwareVersion(): IVersionArray | null;
|
|
899
|
+
getBLEFirmwareVersion(): IVersionArray | null;
|
|
900
|
+
isUsed(): boolean;
|
|
901
|
+
hasDeviceAcquire(): boolean;
|
|
902
|
+
isUsedHere(): boolean;
|
|
903
|
+
isUsedElsewhere(): boolean;
|
|
904
|
+
isBootloader(): boolean | undefined;
|
|
905
|
+
isInitialized(): boolean | undefined;
|
|
906
|
+
isSeedless(): boolean | undefined;
|
|
907
|
+
isUnacquired(): boolean;
|
|
908
|
+
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
909
|
+
hasUsePassphrase(): boolean;
|
|
910
|
+
checkDeviceId(deviceId: string): boolean;
|
|
911
|
+
lockDevice(): Promise<Success$1>;
|
|
912
|
+
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
913
|
+
unlockDevice(): Promise<Features | undefined>;
|
|
914
|
+
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
/**
|
|
918
|
+
* SDK Tracing Utilities
|
|
919
|
+
* Tracks object instances and request call chains across multiple SDK instances
|
|
920
|
+
*/
|
|
921
|
+
/**
|
|
922
|
+
* Generate SDK instance ID
|
|
923
|
+
* @returns Format: "SDK-<number>-<timestamp>"
|
|
924
|
+
* @example "SDK-1-123456"
|
|
925
|
+
*/
|
|
926
|
+
declare function generateSdkInstanceId(): string;
|
|
927
|
+
/**
|
|
928
|
+
* Generate globally unique instance ID
|
|
929
|
+
* @param type Instance type (Device, DeviceCommands, BaseMethod, etc.)
|
|
930
|
+
* @param sdkInstanceId SDK instance ID (optional)
|
|
931
|
+
* @returns Format: <SDK>.<type>-<number>-<timestamp>
|
|
932
|
+
* @example "SDK-1.Device-1-123456" or "Device-1-123456"
|
|
933
|
+
*/
|
|
934
|
+
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
935
|
+
/**
|
|
936
|
+
* Request context information
|
|
937
|
+
*/
|
|
938
|
+
interface RequestContext {
|
|
939
|
+
/** Request unique ID (reuses BaseMethod.responseID) */
|
|
940
|
+
responseID: number;
|
|
941
|
+
/** SDK instance ID */
|
|
942
|
+
sdkInstanceId?: string;
|
|
943
|
+
/** API method name */
|
|
944
|
+
methodName: string;
|
|
945
|
+
/** Device connection ID */
|
|
946
|
+
connectId?: string;
|
|
947
|
+
/** Device instance ID */
|
|
948
|
+
deviceInstanceId?: string;
|
|
949
|
+
/** DeviceCommands instance ID */
|
|
950
|
+
commandsInstanceId?: string;
|
|
951
|
+
/** Parent request ID (for nested calls like allNetworkGetAddress) */
|
|
952
|
+
parentResponseID?: number;
|
|
953
|
+
/** Request start time */
|
|
954
|
+
startTime: number;
|
|
955
|
+
/** Request end time */
|
|
956
|
+
endTime?: number;
|
|
957
|
+
/** Request status */
|
|
958
|
+
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
959
|
+
/** Error message */
|
|
960
|
+
error?: string;
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* SDK instance tracing context
|
|
964
|
+
*/
|
|
965
|
+
interface SdkTracingContext {
|
|
966
|
+
/** SDK instance ID */
|
|
967
|
+
sdkInstanceId: string;
|
|
968
|
+
/** Creation timestamp */
|
|
969
|
+
createdAt: number;
|
|
970
|
+
/** Active requests */
|
|
971
|
+
activeRequests: Map<number, RequestContext>;
|
|
972
|
+
}
|
|
973
|
+
/**
|
|
974
|
+
* Create SDK instance tracing context
|
|
975
|
+
*/
|
|
976
|
+
declare function createSdkTracingContext(): SdkTracingContext;
|
|
977
|
+
/**
|
|
978
|
+
* Create and register request context
|
|
979
|
+
* @param responseID Request ID (reuses BaseMethod.responseID)
|
|
980
|
+
* @param methodName API method name
|
|
981
|
+
* @param options Additional options
|
|
982
|
+
*/
|
|
983
|
+
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
984
|
+
sdkInstanceId?: string;
|
|
985
|
+
connectId?: string;
|
|
986
|
+
deviceInstanceId?: string;
|
|
987
|
+
commandsInstanceId?: string;
|
|
988
|
+
parentResponseID?: number;
|
|
989
|
+
}): RequestContext;
|
|
990
|
+
/**
|
|
991
|
+
* Update request context
|
|
992
|
+
*/
|
|
993
|
+
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
994
|
+
/**
|
|
995
|
+
* Complete request context
|
|
996
|
+
*/
|
|
997
|
+
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
998
|
+
/**
|
|
999
|
+
* Get active requests for specific Device instance
|
|
1000
|
+
*/
|
|
1001
|
+
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
1002
|
+
/**
|
|
1003
|
+
* Format request context for logging
|
|
1004
|
+
*/
|
|
1005
|
+
declare function formatRequestContext(context: RequestContext): string;
|
|
1006
|
+
/**
|
|
1007
|
+
* Cleanup specific SDK instance
|
|
1008
|
+
*/
|
|
1009
|
+
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
1010
|
+
|
|
1011
|
+
declare class Core extends EventEmitter {
|
|
1012
|
+
private tracingContext;
|
|
1013
|
+
readonly sdkInstanceId: string;
|
|
1014
|
+
private requestQueue;
|
|
1015
|
+
private disposePromise?;
|
|
1016
|
+
private prePendingCallPromise;
|
|
1017
|
+
private methodSynchronize;
|
|
1018
|
+
constructor();
|
|
1019
|
+
cancelOperation(operationId: string): void;
|
|
1020
|
+
private getCoreContext;
|
|
1021
|
+
handleMessage(message: CoreMessage): Promise<any>;
|
|
1022
|
+
dispose(): Promise<void>;
|
|
1023
|
+
private disposeResources;
|
|
1024
|
+
}
|
|
1025
|
+
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
1026
|
+
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
1027
|
+
env: ConnectSettings['env'];
|
|
1028
|
+
Transport: any;
|
|
1029
|
+
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
1030
|
+
}) => void;
|
|
1031
|
+
|
|
1032
|
+
type DeviceInfoGetTargets = {
|
|
1033
|
+
hw?: boolean;
|
|
1034
|
+
fw?: boolean;
|
|
1035
|
+
coprocessor?: boolean;
|
|
1036
|
+
se1?: boolean;
|
|
1037
|
+
se2?: boolean;
|
|
1038
|
+
se3?: boolean;
|
|
1039
|
+
se4?: boolean;
|
|
1040
|
+
};
|
|
1041
|
+
type DeviceInfoGetTypes = {
|
|
1042
|
+
version?: boolean;
|
|
1043
|
+
build_id?: boolean;
|
|
1044
|
+
hash?: boolean;
|
|
1045
|
+
specific?: boolean;
|
|
1046
|
+
};
|
|
1047
|
+
type DeviceInfoGetParams = {
|
|
1048
|
+
targets?: DeviceInfoGetTargets;
|
|
1049
|
+
types?: DeviceInfoGetTypes;
|
|
1050
|
+
};
|
|
1051
|
+
|
|
1052
|
+
type DeviceSettingsSetParams = {
|
|
1053
|
+
settings?: Omit<DeviceSettings, 'passphrase_enable' | 'airgap_mode'>;
|
|
1054
|
+
};
|
|
1055
|
+
|
|
1056
|
+
type SupportedDeviceSettingsPage = DeviceSettingsPage;
|
|
1057
|
+
type DeviceSettingsPageShowParams = {
|
|
1058
|
+
page?: SupportedDeviceSettingsPage | 'DeviceReset' | 'DevicePinChange' | 'DevicePassphrase' | 'DeviceAirgap';
|
|
1059
|
+
fieldName?: string;
|
|
1060
|
+
field_name?: string;
|
|
732
1061
|
};
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
1062
|
+
|
|
1063
|
+
declare const PRO2_WALLPAPER_WIDTH = 604;
|
|
1064
|
+
declare const PRO2_WALLPAPER_HEIGHT = 1024;
|
|
1065
|
+
type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
|
|
1066
|
+
declare function encodePro2Wallpaper(options: {
|
|
1067
|
+
width: number;
|
|
1068
|
+
height: number;
|
|
1069
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
1070
|
+
}): {
|
|
1071
|
+
data: Uint8Array;
|
|
1072
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
743
1073
|
};
|
|
744
|
-
|
|
745
|
-
type
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
ble: IBLEFirmwareReleaseInfo[];
|
|
752
|
-
};
|
|
1074
|
+
|
|
1075
|
+
type DeviceUploadWallpaperParams = {
|
|
1076
|
+
width: number;
|
|
1077
|
+
height: number;
|
|
1078
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
1079
|
+
fileName?: string;
|
|
1080
|
+
chunkSize?: number;
|
|
753
1081
|
};
|
|
754
|
-
type
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
1082
|
+
type DeviceUploadWallpaperResponse = {
|
|
1083
|
+
path: string;
|
|
1084
|
+
size: number;
|
|
1085
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
1086
|
+
message?: string;
|
|
1087
|
+
};
|
|
1088
|
+
|
|
1089
|
+
type FileOpSuccess = {
|
|
1090
|
+
message?: string;
|
|
1091
|
+
};
|
|
1092
|
+
type FileInfo = {
|
|
1093
|
+
path: string;
|
|
1094
|
+
offset: number;
|
|
1095
|
+
total_size: number;
|
|
1096
|
+
data?: Uint8Array;
|
|
1097
|
+
data_hash?: number;
|
|
1098
|
+
processed_byte?: number;
|
|
1099
|
+
chunks?: number;
|
|
1100
|
+
};
|
|
1101
|
+
type DirInfo = {
|
|
1102
|
+
path: string;
|
|
1103
|
+
child_dirs?: string;
|
|
1104
|
+
child_files?: string;
|
|
1105
|
+
};
|
|
1106
|
+
type PathInfoResult = {
|
|
1107
|
+
exist: boolean;
|
|
1108
|
+
size: number;
|
|
1109
|
+
year: number;
|
|
1110
|
+
month: number;
|
|
1111
|
+
day: number;
|
|
1112
|
+
hour: number;
|
|
1113
|
+
minute: number;
|
|
1114
|
+
second: number;
|
|
1115
|
+
readonly: boolean;
|
|
1116
|
+
hidden: boolean;
|
|
1117
|
+
system: boolean;
|
|
1118
|
+
archive: boolean;
|
|
1119
|
+
directory: boolean;
|
|
1120
|
+
};
|
|
1121
|
+
/** @deprecated Development-only raw Protocol V2 command. Use `getDeviceState`. */
|
|
1122
|
+
declare function deviceInfoGet(connectId: string, params?: CommonParams & DeviceInfoGetParams): Response<ProtocolV2DeviceInfo>;
|
|
1123
|
+
/** @deprecated Development-only raw Protocol V2 command. Use `getDeviceState`. */
|
|
1124
|
+
declare function deviceStatusGet(connectId: string, params?: CommonParams): Response<DeviceStatus$1>;
|
|
1125
|
+
/** @deprecated Development-only raw Protocol V2 command. Use `getDeviceState`. */
|
|
1126
|
+
declare function deviceSettingsGet(connectId: string, params?: CommonParams): Response<DeviceSettings>;
|
|
1127
|
+
/** @deprecated Development-only raw Protocol V2 command. */
|
|
1128
|
+
declare function protocolInfoRequest(connectId: string, params?: CommonParams): Response<ProtocolInfo>;
|
|
1129
|
+
declare function ping(connectId: string, params?: CommonParams & {
|
|
1130
|
+
message?: string;
|
|
1131
|
+
}): Response<Success$1>;
|
|
1132
|
+
declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
1133
|
+
declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<DevOnboardingStatus>;
|
|
1134
|
+
declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DeviceFirmwareUpdateStatus>;
|
|
1135
|
+
declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams & DeviceFirmwareUpdateStatusGetParams): Response<DeviceFirmwareUpdateStatus>;
|
|
1136
|
+
declare function deviceFactoryInfoSet(connectId: string, params: CommonParams & DeviceFactoryInfoSetParams): Response<Success$1>;
|
|
1137
|
+
declare function deviceFactoryInfoGet(connectId: string, params?: CommonParams): Response<DeviceFactoryInfo>;
|
|
1138
|
+
/**
|
|
1139
|
+
* @deprecated Use the protocol-independent `deviceSettings`.
|
|
1140
|
+
*/
|
|
1141
|
+
declare function deviceSettingsSet(connectId: string, params: CommonParams & DeviceSettingsSetParams): Response<Success$1>;
|
|
1142
|
+
/**
|
|
1143
|
+
* @deprecated Use `deviceSettings`, `deviceChangePin`, or `deviceWipe`.
|
|
1144
|
+
*/
|
|
1145
|
+
declare function deviceSettingsPageShow(connectId: string, params: CommonParams & DeviceSettingsPageShowParams): Response<Success$1>;
|
|
1146
|
+
declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
|
|
1147
|
+
declare function filesystemPermissionFix(connectId: string, params?: CommonParams): Response<Success$1>;
|
|
1148
|
+
declare function fileRead(connectId: string, params: {
|
|
1149
|
+
path: string;
|
|
1150
|
+
offset?: number;
|
|
1151
|
+
totalSize?: number;
|
|
1152
|
+
chunkLen?: number;
|
|
1153
|
+
uiPercentage?: number;
|
|
1154
|
+
}): Response<FileInfo>;
|
|
1155
|
+
declare function fileWrite(connectId: string, params: {
|
|
1156
|
+
path: string;
|
|
1157
|
+
offset?: number;
|
|
1158
|
+
totalSize?: number;
|
|
1159
|
+
chunkSize?: number;
|
|
1160
|
+
chunkLen?: number;
|
|
1161
|
+
data: ArrayBuffer | Uint8Array | Blob | string;
|
|
1162
|
+
overwrite?: boolean;
|
|
1163
|
+
append?: boolean;
|
|
1164
|
+
uiPercentage?: number;
|
|
1165
|
+
timeoutMs?: number | string;
|
|
1166
|
+
}): Response<FileInfo>;
|
|
1167
|
+
declare function fileDelete(connectId: string, params: {
|
|
1168
|
+
path: string;
|
|
1169
|
+
}): Response<FileOpSuccess>;
|
|
1170
|
+
declare function dirList(connectId: string, params: {
|
|
1171
|
+
path: string;
|
|
1172
|
+
depth?: number;
|
|
1173
|
+
}): Response<DirInfo>;
|
|
1174
|
+
declare function dirMake(connectId: string, params: {
|
|
1175
|
+
path: string;
|
|
1176
|
+
}): Response<FileOpSuccess>;
|
|
1177
|
+
declare function dirRemove(connectId: string, params: {
|
|
1178
|
+
path: string;
|
|
1179
|
+
}): Response<FileOpSuccess>;
|
|
1180
|
+
declare function pathInfo(connectId: string, params: {
|
|
1181
|
+
path: string;
|
|
1182
|
+
timeoutMs?: number | string;
|
|
1183
|
+
}): Response<PathInfoResult>;
|
|
1184
|
+
declare function uploadPortfolio(connectId: string, params: {
|
|
1185
|
+
operationId?: string;
|
|
1186
|
+
packageBytes: ArrayBuffer | Uint8Array | Blob;
|
|
1187
|
+
timeoutMs?: number | string;
|
|
1188
|
+
}): Response<FileInfo & {
|
|
1189
|
+
portfolioUpdated: true;
|
|
1190
|
+
}>;
|
|
1191
|
+
declare function filesystemFormat(connectId: string): Response<Success$1>;
|
|
1192
|
+
|
|
1193
|
+
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
1194
|
+
declare const off: (type: any, fn: any) => void;
|
|
1195
|
+
declare const removeAllListeners: (type: any) => void;
|
|
1196
|
+
|
|
1197
|
+
declare function uiResponse(response: UiResponseEvent): void;
|
|
1198
|
+
|
|
1199
|
+
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
1200
|
+
interface LowLevelInjectApi {
|
|
1201
|
+
call: CallMethod;
|
|
1202
|
+
eventEmitter: EventEmitter$1;
|
|
1203
|
+
init: CoreApi['init'];
|
|
1204
|
+
dispose: CoreApi['dispose'];
|
|
1205
|
+
uiResponse: CoreApi['uiResponse'];
|
|
1206
|
+
cancel: CoreApi['cancel'];
|
|
1207
|
+
cancelOperation: CoreApi['cancelOperation'];
|
|
1208
|
+
updateSettings: CoreApi['updateSettings'];
|
|
1209
|
+
switchTransport: CoreApi['switchTransport'];
|
|
1210
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
1211
|
+
}
|
|
1212
|
+
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
1213
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
768
1214
|
};
|
|
769
|
-
type RemoteConfigResponse = {
|
|
770
|
-
bridge: AssetsMap['bridge'];
|
|
771
|
-
} & DeviceTypeMap;
|
|
772
1215
|
|
|
773
1216
|
declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
|
|
774
1217
|
declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
|
|
@@ -779,6 +1222,15 @@ declare function preInitialize(connectId: string, params?: CommonParams): Respon
|
|
|
779
1222
|
|
|
780
1223
|
declare function getLogs(): Response<string[]>;
|
|
781
1224
|
|
|
1225
|
+
type ClearSessionCacheParams = {
|
|
1226
|
+
deviceId?: string;
|
|
1227
|
+
passphraseState?: string;
|
|
1228
|
+
};
|
|
1229
|
+
type ClearSessionCachePayload = {
|
|
1230
|
+
cleared: true;
|
|
1231
|
+
};
|
|
1232
|
+
declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
|
|
1233
|
+
|
|
782
1234
|
declare function checkBridgeStatus(): Response<boolean>;
|
|
783
1235
|
|
|
784
1236
|
type CheckBridgeReleaseResponse = {
|
|
@@ -817,7 +1269,7 @@ type AllFirmwareRelease = {
|
|
|
817
1269
|
ble: FirmwareRelease$2;
|
|
818
1270
|
bootloader?: FirmwareRelease$2;
|
|
819
1271
|
bridge?: FirmwareRelease$2;
|
|
820
|
-
features?: Features
|
|
1272
|
+
features?: Features;
|
|
821
1273
|
};
|
|
822
1274
|
type CheckAllFirmwareReleaseParams = {
|
|
823
1275
|
checkBridgeRelease?: boolean;
|
|
@@ -833,101 +1285,73 @@ declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailablePa
|
|
|
833
1285
|
|
|
834
1286
|
declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
|
|
835
1287
|
|
|
1288
|
+
/**
|
|
1289
|
+
* @deprecated Use `getDeviceState` for both Protocol V1 and Protocol V2 devices.
|
|
1290
|
+
*/
|
|
836
1291
|
declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
|
|
837
1292
|
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
type GetDeviceInfoParams = {
|
|
842
|
-
scope?: DeviceInfoScope;
|
|
843
|
-
refresh?: boolean;
|
|
844
|
-
includeRaw?: boolean;
|
|
845
|
-
};
|
|
846
|
-
type DeviceInfoMode = 'normal' | 'bootloader' | 'notInitialized' | 'unknown';
|
|
847
|
-
type DeviceInfoStatus = {
|
|
848
|
-
mode: DeviceInfoMode;
|
|
849
|
-
initialized: boolean | null;
|
|
850
|
-
bootloaderMode: boolean | null;
|
|
851
|
-
unlocked: boolean | null;
|
|
852
|
-
passphraseProtection: boolean | null;
|
|
853
|
-
backupRequired: boolean | null;
|
|
854
|
-
noBackup: boolean | null;
|
|
855
|
-
language: string | null;
|
|
856
|
-
bleEnabled: boolean | null;
|
|
857
|
-
};
|
|
858
|
-
type DeviceProfileVersions = {
|
|
859
|
-
firmware: string | null;
|
|
860
|
-
bootloader: string | null;
|
|
861
|
-
board: string | null;
|
|
862
|
-
ble: string | null;
|
|
863
|
-
se01?: string | null;
|
|
864
|
-
se02?: string | null;
|
|
865
|
-
se03?: string | null;
|
|
866
|
-
se04?: string | null;
|
|
867
|
-
se01Boot?: string | null;
|
|
868
|
-
se02Boot?: string | null;
|
|
869
|
-
se03Boot?: string | null;
|
|
870
|
-
se04Boot?: string | null;
|
|
871
|
-
};
|
|
872
|
-
type DeviceProfileVerify = {
|
|
873
|
-
firmwareBuildId?: string;
|
|
874
|
-
firmwareHash?: string;
|
|
875
|
-
bootloaderBuildId?: string;
|
|
876
|
-
bootloaderHash?: string;
|
|
877
|
-
boardBuildId?: string;
|
|
878
|
-
boardHash?: string;
|
|
879
|
-
bleBuildId?: string;
|
|
880
|
-
bleHash?: string;
|
|
881
|
-
se01BuildId?: string;
|
|
882
|
-
se01Hash?: string;
|
|
883
|
-
se02BuildId?: string;
|
|
884
|
-
se02Hash?: string;
|
|
885
|
-
se03BuildId?: string;
|
|
886
|
-
se03Hash?: string;
|
|
887
|
-
se04BuildId?: string;
|
|
888
|
-
se04Hash?: string;
|
|
889
|
-
se01BootBuildId?: string;
|
|
890
|
-
se01BootHash?: string;
|
|
891
|
-
se02BootBuildId?: string;
|
|
892
|
-
se02BootHash?: string;
|
|
893
|
-
se03BootBuildId?: string;
|
|
894
|
-
se03BootHash?: string;
|
|
895
|
-
se04BootBuildId?: string;
|
|
896
|
-
se04BootHash?: string;
|
|
897
|
-
};
|
|
898
|
-
type DeviceProfileRaw = {
|
|
899
|
-
features?: Features;
|
|
900
|
-
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
901
|
-
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
902
|
-
};
|
|
903
|
-
type DeviceProfile = {
|
|
904
|
-
protocol: DeviceInfoProtocol;
|
|
905
|
-
sources: DeviceInfoSource[];
|
|
906
|
-
deviceType: IDeviceType;
|
|
907
|
-
firmwareType: EFirmwareType;
|
|
908
|
-
deviceId: string;
|
|
909
|
-
serialNo: string;
|
|
910
|
-
label: string | null;
|
|
911
|
-
bleName: string | null;
|
|
912
|
-
status: DeviceInfoStatus;
|
|
913
|
-
versions: DeviceProfileVersions;
|
|
914
|
-
verify?: DeviceProfileVerify;
|
|
915
|
-
raw?: DeviceProfileRaw;
|
|
916
|
-
};
|
|
917
|
-
declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
|
|
918
|
-
|
|
1293
|
+
/**
|
|
1294
|
+
* @deprecated Use `getDeviceState(connectId, { scope: 'firmware' })`.
|
|
1295
|
+
*/
|
|
919
1296
|
declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
|
|
920
1297
|
|
|
921
|
-
type
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
1298
|
+
type GetPassphraseStateParams = CommonParams;
|
|
1299
|
+
/**
|
|
1300
|
+
* Legacy Protocol V1 wallet API.
|
|
1301
|
+
*
|
|
1302
|
+
* This remains supported for Protocol V1 integrations. New cross-protocol integrations
|
|
1303
|
+
* and all Protocol V2 callers should use `openWalletSession`.
|
|
1304
|
+
*/
|
|
1305
|
+
declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
|
|
1306
|
+
|
|
1307
|
+
type OpenWalletSessionParams = {
|
|
1308
|
+
mode: 'standard';
|
|
1309
|
+
deviceId?: never;
|
|
1310
|
+
passphraseState?: never;
|
|
1311
|
+
useEmptyPassphrase?: never;
|
|
1312
|
+
initSession?: never;
|
|
1313
|
+
} | {
|
|
1314
|
+
mode: 'select-hidden';
|
|
1315
|
+
deviceId?: never;
|
|
1316
|
+
passphraseState?: never;
|
|
1317
|
+
useEmptyPassphrase?: never;
|
|
1318
|
+
initSession?: never;
|
|
1319
|
+
} | {
|
|
1320
|
+
mode: 'resume-hidden';
|
|
1321
|
+
deviceId: string;
|
|
1322
|
+
passphraseState: string;
|
|
1323
|
+
useEmptyPassphrase?: never;
|
|
1324
|
+
initSession?: never;
|
|
1325
|
+
} | {
|
|
1326
|
+
/**
|
|
1327
|
+
* Compatibility form. `useEmptyPassphrase: true` opens the standard wallet;
|
|
1328
|
+
* otherwise `initSession: true` starts a fresh hidden-wallet selection, a
|
|
1329
|
+
* complete wallet binding resumes a hidden wallet, and no binding starts the
|
|
1330
|
+
* hidden-wallet selection flow.
|
|
1331
|
+
*/
|
|
1332
|
+
mode?: undefined;
|
|
1333
|
+
useEmptyPassphrase?: boolean;
|
|
1334
|
+
initSession?: boolean;
|
|
1335
|
+
deviceId?: string;
|
|
1336
|
+
passphraseState?: string;
|
|
926
1337
|
};
|
|
927
|
-
type
|
|
928
|
-
|
|
1338
|
+
type OpenWalletSessionPayloadBase = {
|
|
1339
|
+
protocol: 'V1' | 'V2';
|
|
1340
|
+
deviceId: string;
|
|
1341
|
+
resumed: boolean;
|
|
929
1342
|
};
|
|
930
|
-
|
|
1343
|
+
type OpenWalletSessionPayload = OpenWalletSessionPayloadBase & ({
|
|
1344
|
+
walletType: 'standard';
|
|
1345
|
+
passphraseState: null;
|
|
1346
|
+
} | {
|
|
1347
|
+
walletType: 'hidden';
|
|
1348
|
+
passphraseState: string;
|
|
1349
|
+
});
|
|
1350
|
+
/**
|
|
1351
|
+
* Opens the standard, hidden, or Attach-to-PIN wallet flow through a unified
|
|
1352
|
+
* Protocol V1/V2 API.
|
|
1353
|
+
*/
|
|
1354
|
+
declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
|
|
931
1355
|
|
|
932
1356
|
type FirmwareRelease$1 = {
|
|
933
1357
|
status: IDeviceFirmwareStatus;
|
|
@@ -991,26 +1415,40 @@ interface FirmwareUpdateV3Params {
|
|
|
991
1415
|
firmwareType?: EFirmwareType;
|
|
992
1416
|
platform: IPlatform;
|
|
993
1417
|
}
|
|
1418
|
+
/**
|
|
1419
|
+
* firmwareUpdateV4 target binaries grouped by DeviceFirmwareTargetType.
|
|
1420
|
+
* Except for romloader, each field maps to a target accepted by bootloader.
|
|
1421
|
+
*/
|
|
1422
|
+
type FirmwareUpdateV4Target = 'boot' | 'app_v1' | 'app_v2' | 'coprocessor' | 'resource' | 'se01' | 'se02' | 'se03' | 'se04';
|
|
994
1423
|
interface FirmwareUpdateV4Params {
|
|
995
1424
|
platform: IPlatform;
|
|
996
1425
|
chunkSize?: number;
|
|
997
1426
|
firmwareType?: EFirmwareType;
|
|
1427
|
+
targetsToUpdate?: FirmwareUpdateV4Target[];
|
|
1428
|
+
/** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
|
|
998
1429
|
romloaderBinary?: ArrayBuffer;
|
|
1430
|
+
/** FW_MGMT_TARGET_BOOTLOADER = 3 */
|
|
999
1431
|
bootloaderBinary?: ArrayBuffer;
|
|
1432
|
+
/** FW_MGMT_TARGET_APPLICATION_P1 = 4 */
|
|
1000
1433
|
applicationP1Binary?: ArrayBuffer;
|
|
1434
|
+
/** FW_MGMT_TARGET_APPLICATION_P2 = 5 */
|
|
1001
1435
|
applicationP2Binary?: ArrayBuffer;
|
|
1436
|
+
/** FW_MGMT_TARGET_COPROCESSOR = 6 */
|
|
1002
1437
|
coprocessorBinary?: ArrayBuffer;
|
|
1438
|
+
/** FW_MGMT_TARGET_SE01-04 = 7-10 */
|
|
1003
1439
|
se01Binary?: ArrayBuffer;
|
|
1004
1440
|
se02Binary?: ArrayBuffer;
|
|
1005
1441
|
se03Binary?: ArrayBuffer;
|
|
1006
1442
|
se04Binary?: ArrayBuffer;
|
|
1007
|
-
resourceBinary?: ArrayBuffer;
|
|
1008
1443
|
forcedUpdateRes?: boolean;
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1444
|
+
/**
|
|
1445
|
+
* RESC bundle okpkg files written directly to devicePath through FilesystemFileWrite.
|
|
1446
|
+
* Manual mode installs them without version comparison.
|
|
1447
|
+
*/
|
|
1448
|
+
resourceBundleFiles?: Array<{
|
|
1449
|
+
binary: ArrayBuffer;
|
|
1450
|
+
devicePath: string;
|
|
1451
|
+
}>;
|
|
1014
1452
|
}
|
|
1015
1453
|
declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
|
|
1016
1454
|
bleVersion: string;
|
|
@@ -1091,7 +1529,16 @@ type DeviceSettingsParams = {
|
|
|
1091
1529
|
experimentalFeatures?: boolean;
|
|
1092
1530
|
autoShutdownDelayMs?: number;
|
|
1093
1531
|
changeBrightness?: boolean;
|
|
1532
|
+
brightness?: number;
|
|
1094
1533
|
hapticFeedback?: boolean;
|
|
1534
|
+
bluetoothEnabled?: boolean;
|
|
1535
|
+
airgapMode?: boolean;
|
|
1536
|
+
animationEnabled?: boolean;
|
|
1537
|
+
tapToWake?: boolean;
|
|
1538
|
+
deviceNameDisplayEnabled?: boolean;
|
|
1539
|
+
fidoEnabled?: boolean;
|
|
1540
|
+
usbLockEnabled?: boolean;
|
|
1541
|
+
randomKeypad?: boolean;
|
|
1095
1542
|
};
|
|
1096
1543
|
declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
|
|
1097
1544
|
|
|
@@ -1117,7 +1564,7 @@ type DeviceUploadResourceResponse = Success$1 & {
|
|
|
1117
1564
|
declare function deviceUploadResource(connectId: string, params: CommonParams & DeviceUploadResourceParams): Response<DeviceUploadResourceResponse>;
|
|
1118
1565
|
|
|
1119
1566
|
type DeviceSupportFeatures = SupportFeatures & {
|
|
1120
|
-
device: Device | null;
|
|
1567
|
+
device: Device$1 | null;
|
|
1121
1568
|
};
|
|
1122
1569
|
declare function deviceSupportFeatures(connectId?: string): Response<DeviceSupportFeatures>;
|
|
1123
1570
|
|
|
@@ -1133,7 +1580,7 @@ declare function deviceUpdateBootloader(connectId: string, params?: DeviceUpdate
|
|
|
1133
1580
|
|
|
1134
1581
|
declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1135
1582
|
|
|
1136
|
-
declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features
|
|
1583
|
+
declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features>;
|
|
1137
1584
|
|
|
1138
1585
|
declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1139
1586
|
|
|
@@ -1337,6 +1784,9 @@ type AllNetworkAddressParams = {
|
|
|
1337
1784
|
type AllNetworkAddressPayload = {
|
|
1338
1785
|
address: string;
|
|
1339
1786
|
pub?: string;
|
|
1787
|
+
/**
|
|
1788
|
+
* @deprecated Use `pub` instead.
|
|
1789
|
+
*/
|
|
1340
1790
|
publicKey?: string;
|
|
1341
1791
|
npub?: string;
|
|
1342
1792
|
} | {
|
|
@@ -1402,6 +1852,9 @@ declare function evmGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
1402
1852
|
type EVMPublicKey = {
|
|
1403
1853
|
path: string;
|
|
1404
1854
|
pub: string;
|
|
1855
|
+
/**
|
|
1856
|
+
* @deprecated Use `pub` instead.
|
|
1857
|
+
*/
|
|
1405
1858
|
publicKey?: string;
|
|
1406
1859
|
} & EthereumPublicKey;
|
|
1407
1860
|
type EVMGetPublicKeyParams = {
|
|
@@ -2185,6 +2638,9 @@ declare function nearSignTransaction(connectId: string, deviceId: string, params
|
|
|
2185
2638
|
type AptosAddress = {
|
|
2186
2639
|
path: string;
|
|
2187
2640
|
pub?: string;
|
|
2641
|
+
/**
|
|
2642
|
+
* @deprecated Use `pub` instead.
|
|
2643
|
+
*/
|
|
2188
2644
|
publicKey?: string;
|
|
2189
2645
|
} & AptosAddress$1;
|
|
2190
2646
|
type AptosGetAddressParams = {
|
|
@@ -2199,6 +2655,9 @@ declare function aptosGetAddress(connectId: string, deviceId: string, params: Co
|
|
|
2199
2655
|
type AptosPublicKey = {
|
|
2200
2656
|
path: string;
|
|
2201
2657
|
pub: string;
|
|
2658
|
+
/**
|
|
2659
|
+
* @deprecated Use `pub` instead.
|
|
2660
|
+
*/
|
|
2202
2661
|
publicKey?: string;
|
|
2203
2662
|
};
|
|
2204
2663
|
type AptosGetPublicKeyParams = {
|
|
@@ -2283,6 +2742,9 @@ declare function cosmosGetAddress(connectId: string, deviceId: string, params: C
|
|
|
2283
2742
|
type CosmosPublicKey = {
|
|
2284
2743
|
path: string;
|
|
2285
2744
|
pub: string;
|
|
2745
|
+
/**
|
|
2746
|
+
* @deprecated Use `pub` instead.
|
|
2747
|
+
*/
|
|
2286
2748
|
publicKey?: string;
|
|
2287
2749
|
};
|
|
2288
2750
|
type CosmosGetPublicKeyParams = {
|
|
@@ -2307,6 +2769,9 @@ declare function cosmosSignTransaction(connectId: string, deviceId: string, para
|
|
|
2307
2769
|
type XrpAddress = {
|
|
2308
2770
|
path: string;
|
|
2309
2771
|
pub?: string;
|
|
2772
|
+
/**
|
|
2773
|
+
* @deprecated Use `pub` instead.
|
|
2774
|
+
*/
|
|
2310
2775
|
publicKey?: string;
|
|
2311
2776
|
address: string;
|
|
2312
2777
|
};
|
|
@@ -2340,6 +2805,9 @@ declare function xrpSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2340
2805
|
type SuiAddress = {
|
|
2341
2806
|
path: string;
|
|
2342
2807
|
pub?: string;
|
|
2808
|
+
/**
|
|
2809
|
+
* @deprecated Use `pub` instead.
|
|
2810
|
+
*/
|
|
2343
2811
|
publicKey?: string;
|
|
2344
2812
|
} & SuiAddress$1;
|
|
2345
2813
|
type SuiGetAddressParams = {
|
|
@@ -2354,6 +2822,9 @@ declare function suiGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
2354
2822
|
type SuiPublicKey = {
|
|
2355
2823
|
path: string;
|
|
2356
2824
|
pub: string;
|
|
2825
|
+
/**
|
|
2826
|
+
* @deprecated Use `pub` instead.
|
|
2827
|
+
*/
|
|
2357
2828
|
publicKey?: string;
|
|
2358
2829
|
};
|
|
2359
2830
|
type SuiGetPublicKeyParams = {
|
|
@@ -2383,6 +2854,10 @@ declare function suiSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2383
2854
|
type CardanoGetAddressMethodParams = {
|
|
2384
2855
|
addressParameters: CardanoAddressParameters;
|
|
2385
2856
|
networkId: number;
|
|
2857
|
+
/**
|
|
2858
|
+
* Testnet cip34:0-1097911063
|
|
2859
|
+
* Mainnet cip34:1-764824073
|
|
2860
|
+
*/
|
|
2386
2861
|
protocolMagic: number;
|
|
2387
2862
|
derivationType: number;
|
|
2388
2863
|
address?: string;
|
|
@@ -2444,6 +2919,10 @@ type CardanoSignMessageMethodParams = {
|
|
|
2444
2919
|
derivationType: number;
|
|
2445
2920
|
networkId: number;
|
|
2446
2921
|
addressType?: Messages.CardanoAddressType;
|
|
2922
|
+
/**
|
|
2923
|
+
* Testnet cip34:0-1097911063
|
|
2924
|
+
* Mainnet cip34:1-764824073
|
|
2925
|
+
*/
|
|
2447
2926
|
protocolMagic?: number;
|
|
2448
2927
|
};
|
|
2449
2928
|
declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
|
|
@@ -2477,6 +2956,9 @@ declare function filecoinSignTransaction(connectId: string, deviceId: string, pa
|
|
|
2477
2956
|
type PolkadotAddress = {
|
|
2478
2957
|
path: string;
|
|
2479
2958
|
pub: string;
|
|
2959
|
+
/**
|
|
2960
|
+
* @deprecated Use `pub` instead.
|
|
2961
|
+
*/
|
|
2480
2962
|
publicKey?: string;
|
|
2481
2963
|
} & PolkadotAddress$1;
|
|
2482
2964
|
type PolkadotGetAddressParams = {
|
|
@@ -2535,14 +3017,36 @@ type KaspaSignInputParams = {
|
|
|
2535
3017
|
sequenceNumber: number | string;
|
|
2536
3018
|
output: {
|
|
2537
3019
|
satoshis: number | string;
|
|
2538
|
-
script
|
|
3020
|
+
script?: string;
|
|
2539
3021
|
};
|
|
2540
3022
|
sigOpCount?: number;
|
|
2541
3023
|
};
|
|
2542
3024
|
type KaspaSignOutputParams = {
|
|
2543
3025
|
satoshis: number | string;
|
|
3026
|
+
address?: string;
|
|
3027
|
+
addressN?: string | number[];
|
|
3028
|
+
script?: string;
|
|
3029
|
+
scriptVersion?: number;
|
|
3030
|
+
};
|
|
3031
|
+
type KaspaRefTransactionInput = {
|
|
3032
|
+
prevTxId: string;
|
|
3033
|
+
outputIndex: number;
|
|
3034
|
+
sequenceNumber: number | string;
|
|
3035
|
+
};
|
|
3036
|
+
type KaspaRefTransactionOutput = {
|
|
3037
|
+
satoshis: number | string;
|
|
3038
|
+
scriptVersion?: number;
|
|
2544
3039
|
script: string;
|
|
2545
|
-
|
|
3040
|
+
};
|
|
3041
|
+
type KaspaRefTransaction = {
|
|
3042
|
+
txId: string;
|
|
3043
|
+
version: number;
|
|
3044
|
+
inputs: KaspaRefTransactionInput[];
|
|
3045
|
+
outputs: KaspaRefTransactionOutput[];
|
|
3046
|
+
lockTime?: number | string;
|
|
3047
|
+
subNetworkID?: string;
|
|
3048
|
+
gas?: number | string;
|
|
3049
|
+
payload?: string;
|
|
2546
3050
|
};
|
|
2547
3051
|
type KaspaSignTransactionParams = {
|
|
2548
3052
|
version: number;
|
|
@@ -2552,6 +3056,9 @@ type KaspaSignTransactionParams = {
|
|
|
2552
3056
|
sigHashType?: SignatureType;
|
|
2553
3057
|
sigOpCount?: number;
|
|
2554
3058
|
subNetworkID?: string;
|
|
3059
|
+
payload?: string;
|
|
3060
|
+
gas?: number | string;
|
|
3061
|
+
refTxs?: KaspaRefTransaction[];
|
|
2555
3062
|
scheme?: string;
|
|
2556
3063
|
prefix?: string;
|
|
2557
3064
|
useTweak?: boolean;
|
|
@@ -2596,6 +3103,9 @@ declare function nexaSignTransaction(connectId: string, deviceId: string, params
|
|
|
2596
3103
|
type NostrPublicKey = {
|
|
2597
3104
|
npub?: string;
|
|
2598
3105
|
pub?: string;
|
|
3106
|
+
/**
|
|
3107
|
+
* @deprecated Use `pub` instead.
|
|
3108
|
+
*/
|
|
2599
3109
|
publicKey?: string;
|
|
2600
3110
|
path: string;
|
|
2601
3111
|
};
|
|
@@ -2692,6 +3202,9 @@ declare function nostrSignSchnorr(connectId: string, deviceId: string, params: C
|
|
|
2692
3202
|
|
|
2693
3203
|
interface LnurlAuth {
|
|
2694
3204
|
pub?: string;
|
|
3205
|
+
/**
|
|
3206
|
+
* @deprecated Use `pub` instead.
|
|
3207
|
+
*/
|
|
2695
3208
|
publickey?: string;
|
|
2696
3209
|
path?: string;
|
|
2697
3210
|
signature?: string;
|
|
@@ -2768,6 +3281,9 @@ declare function dnxSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2768
3281
|
type TonAddress = {
|
|
2769
3282
|
path: string;
|
|
2770
3283
|
pub: string;
|
|
3284
|
+
/**
|
|
3285
|
+
* @deprecated Use `pub` instead.
|
|
3286
|
+
*/
|
|
2771
3287
|
publicKey?: string;
|
|
2772
3288
|
address: string;
|
|
2773
3289
|
};
|
|
@@ -2879,6 +3395,9 @@ declare function scdoSignTransaction(connectId: string, deviceId: string, params
|
|
|
2879
3395
|
|
|
2880
3396
|
type AlephiumAddress = {
|
|
2881
3397
|
path: string;
|
|
3398
|
+
/**
|
|
3399
|
+
* @deprecated Use `pub` instead.
|
|
3400
|
+
*/
|
|
2882
3401
|
publicKey?: string;
|
|
2883
3402
|
pub?: string;
|
|
2884
3403
|
address: string;
|
|
@@ -2981,33 +3500,48 @@ type NeoSignedTx = {
|
|
|
2981
3500
|
declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
|
|
2982
3501
|
|
|
2983
3502
|
type CoreApi = {
|
|
3503
|
+
/**
|
|
3504
|
+
* Inject function
|
|
3505
|
+
*/
|
|
2984
3506
|
init: typeof init;
|
|
2985
3507
|
on: typeof on;
|
|
2986
3508
|
off: typeof off;
|
|
2987
3509
|
emit: (event: string, ...args: any[]) => void;
|
|
2988
3510
|
removeAllListeners: typeof removeAllListeners;
|
|
2989
|
-
dispose: () => void
|
|
3511
|
+
dispose: () => void | Promise<void>;
|
|
2990
3512
|
call: (params: any) => Promise<any>;
|
|
2991
3513
|
uiResponse: typeof uiResponse;
|
|
2992
3514
|
cancel: (connectId?: string) => void;
|
|
3515
|
+
cancelOperation: (operationId: string) => void;
|
|
2993
3516
|
updateSettings: typeof updateSettings;
|
|
2994
3517
|
switchTransport: (env: ConnectSettings['env']) => Promise<{
|
|
2995
3518
|
success: boolean;
|
|
2996
3519
|
}>;
|
|
2997
3520
|
getLogs: typeof getLogs;
|
|
3521
|
+
clearSessionCache: typeof clearSessionCache;
|
|
3522
|
+
/**
|
|
3523
|
+
* Test function
|
|
3524
|
+
*/
|
|
2998
3525
|
testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
|
|
2999
3526
|
preInitialize: typeof preInitialize;
|
|
3527
|
+
/**
|
|
3528
|
+
* Core function
|
|
3529
|
+
*/
|
|
3000
3530
|
checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
|
|
3001
3531
|
checkBridgeStatus: typeof checkBridgeStatus;
|
|
3002
3532
|
checkBridgeRelease: typeof checkBridgeRelease;
|
|
3003
3533
|
checkBootloaderRelease: typeof checkBootloaderRelease;
|
|
3004
3534
|
checkFirmwareTypeAvailable: typeof checkFirmwareTypeAvailable;
|
|
3535
|
+
/**
|
|
3536
|
+
* Device function
|
|
3537
|
+
*/
|
|
3005
3538
|
searchDevices: typeof searchDevices;
|
|
3006
3539
|
promptWebDeviceAccess: typeof promptWebDeviceAccess;
|
|
3007
3540
|
getFeatures: typeof getFeatures;
|
|
3008
|
-
|
|
3541
|
+
getDeviceState: typeof getDeviceState;
|
|
3009
3542
|
getOnekeyFeatures: typeof getOnekeyFeatures;
|
|
3010
3543
|
getPassphraseState: typeof getPassphraseState;
|
|
3544
|
+
openWalletSession: typeof openWalletSession;
|
|
3011
3545
|
deviceBackup: typeof deviceBackup;
|
|
3012
3546
|
deviceChangePin: typeof deviceChangePin;
|
|
3013
3547
|
deviceFlags: typeof deviceFlags;
|
|
@@ -3035,20 +3569,26 @@ type CoreApi = {
|
|
|
3035
3569
|
firmwareUpdateV3: typeof firmwareUpdateV3;
|
|
3036
3570
|
firmwareUpdateV4: typeof firmwareUpdateV4;
|
|
3037
3571
|
cipherKeyValue: typeof cipherKeyValue;
|
|
3038
|
-
|
|
3039
|
-
|
|
3572
|
+
/**
|
|
3573
|
+
* Pro2 business API
|
|
3574
|
+
*/
|
|
3040
3575
|
deviceReboot: typeof deviceReboot;
|
|
3041
|
-
deviceGetDeviceInfo: typeof deviceGetDeviceInfo;
|
|
3042
3576
|
deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
|
|
3577
|
+
deviceUploadWallpaper: typeof deviceUploadWallpaper;
|
|
3578
|
+
deviceInfoGet: typeof deviceInfoGet;
|
|
3579
|
+
deviceStatusGet: typeof deviceStatusGet;
|
|
3580
|
+
deviceSettingsGet: typeof deviceSettingsGet;
|
|
3581
|
+
protocolInfoRequest: typeof protocolInfoRequest;
|
|
3582
|
+
ping: typeof ping;
|
|
3043
3583
|
deviceFirmwareUpdate: typeof deviceFirmwareUpdate;
|
|
3044
3584
|
deviceGetFirmwareUpdateStatus: typeof deviceGetFirmwareUpdateStatus;
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3585
|
+
deviceFactoryInfoSet: typeof deviceFactoryInfoSet;
|
|
3586
|
+
deviceFactoryInfoGet: typeof deviceFactoryInfoGet;
|
|
3587
|
+
deviceSettingsSet: typeof deviceSettingsSet;
|
|
3588
|
+
deviceSettingsPageShow: typeof deviceSettingsPageShow;
|
|
3589
|
+
filesystemPermissionFix: typeof filesystemPermissionFix;
|
|
3590
|
+
filesystemFormat: typeof filesystemFormat;
|
|
3591
|
+
uploadPortfolio: typeof uploadPortfolio;
|
|
3052
3592
|
fileRead: typeof fileRead;
|
|
3053
3593
|
fileWrite: typeof fileWrite;
|
|
3054
3594
|
fileDelete: typeof fileDelete;
|
|
@@ -3056,17 +3596,14 @@ type CoreApi = {
|
|
|
3056
3596
|
dirMake: typeof dirMake;
|
|
3057
3597
|
dirRemove: typeof dirRemove;
|
|
3058
3598
|
pathInfo: typeof pathInfo;
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
filesystemDirList: typeof filesystemDirList;
|
|
3063
|
-
filesystemDirMake: typeof filesystemDirMake;
|
|
3064
|
-
filesystemDirRemove: typeof filesystemDirRemove;
|
|
3065
|
-
filesystemPathInfoQuery: typeof filesystemPathInfoQuery;
|
|
3066
|
-
filesystemFormat: typeof filesystemFormat;
|
|
3067
|
-
filesystemDiskControl: typeof filesystemDiskControl;
|
|
3599
|
+
/**
|
|
3600
|
+
* All network function
|
|
3601
|
+
*/
|
|
3068
3602
|
allNetworkGetAddress: typeof allNetworkGetAddress;
|
|
3069
3603
|
allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
|
|
3604
|
+
/**
|
|
3605
|
+
* EVM function
|
|
3606
|
+
*/
|
|
3070
3607
|
evmGetAddress: typeof evmGetAddress;
|
|
3071
3608
|
evmGetPublicKey: typeof evmGetPublicKey;
|
|
3072
3609
|
evmSignMessage: typeof evmSignMessage;
|
|
@@ -3074,86 +3611,167 @@ type CoreApi = {
|
|
|
3074
3611
|
evmSignTransaction: typeof evmSignTransaction;
|
|
3075
3612
|
evmSignTypedData: typeof evmSignTypedData;
|
|
3076
3613
|
evmVerifyMessage: typeof evmVerifyMessage;
|
|
3614
|
+
/**
|
|
3615
|
+
* BTC function
|
|
3616
|
+
*/
|
|
3077
3617
|
btcGetAddress: typeof btcGetAddress;
|
|
3078
3618
|
btcGetPublicKey: typeof btcGetPublicKey;
|
|
3079
3619
|
btcSignMessage: typeof btcSignMessage;
|
|
3080
3620
|
btcSignPsbt: typeof btcSignPsbt;
|
|
3081
3621
|
btcSignTransaction: typeof btcSignTransaction;
|
|
3082
3622
|
btcVerifyMessage: typeof btcVerifyMessage;
|
|
3623
|
+
/**
|
|
3624
|
+
* Starcoin function
|
|
3625
|
+
*/
|
|
3083
3626
|
starcoinGetAddress: typeof starcoinGetAddress;
|
|
3084
3627
|
starcoinGetPublicKey: typeof starcoinGetPublicKey;
|
|
3085
3628
|
starcoinSignMessage: typeof starcoinSignMessage;
|
|
3086
3629
|
starcoinSignTransaction: typeof starcoinSignTransaction;
|
|
3087
3630
|
starcoinVerifyMessage: typeof starcoinVerifyMessage;
|
|
3631
|
+
/**
|
|
3632
|
+
* Nem function
|
|
3633
|
+
*/
|
|
3088
3634
|
nemGetAddress: typeof nemGetAddress;
|
|
3089
3635
|
nemSignTransaction: typeof nemSignTransaction;
|
|
3636
|
+
/**
|
|
3637
|
+
* Solana function
|
|
3638
|
+
*/
|
|
3090
3639
|
solGetAddress: typeof solGetAddress;
|
|
3091
3640
|
solSignTransaction: typeof solSignTransaction;
|
|
3092
3641
|
solSignOffchainMessage: typeof solSignOffchainMessage;
|
|
3093
3642
|
solSignMessage: typeof solSignMessage;
|
|
3643
|
+
/**
|
|
3644
|
+
* Stellar function
|
|
3645
|
+
*/
|
|
3094
3646
|
stellarGetAddress: typeof stellarGetAddress;
|
|
3095
3647
|
stellarSignTransaction: typeof stellarSignTransaction;
|
|
3648
|
+
/**
|
|
3649
|
+
* Tron function
|
|
3650
|
+
*/
|
|
3096
3651
|
tronGetAddress: typeof tronGetAddress;
|
|
3097
3652
|
tronSignMessage: typeof tronSignMessage;
|
|
3098
3653
|
tronSignTransaction: typeof tronSignTransaction;
|
|
3654
|
+
/**
|
|
3655
|
+
* Conflux function
|
|
3656
|
+
*/
|
|
3099
3657
|
confluxGetAddress: typeof confluxGetAddress;
|
|
3100
3658
|
confluxSignMessage: typeof confluxSignMessage;
|
|
3101
3659
|
confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
|
|
3102
3660
|
confluxSignTransaction: typeof confluxSignTransaction;
|
|
3661
|
+
/**
|
|
3662
|
+
* Near function
|
|
3663
|
+
*/
|
|
3103
3664
|
nearGetAddress: typeof nearGetAddress;
|
|
3104
3665
|
nearSignTransaction: typeof nearSignTransaction;
|
|
3666
|
+
/**
|
|
3667
|
+
* Aptos function
|
|
3668
|
+
*/
|
|
3105
3669
|
aptosGetAddress: typeof aptosGetAddress;
|
|
3106
3670
|
aptosGetPublicKey: typeof aptosGetPublicKey;
|
|
3107
3671
|
aptosSignMessage: typeof aptosSignMessage;
|
|
3108
3672
|
aptosSignInMessage: typeof aptosSignInMessage;
|
|
3109
3673
|
aptosSignTransaction: typeof aptosSignTransaction;
|
|
3674
|
+
/**
|
|
3675
|
+
* Algo function
|
|
3676
|
+
*/
|
|
3110
3677
|
algoGetAddress: typeof algoGetAddress;
|
|
3111
3678
|
algoSignTransaction: typeof algoSignTransaction;
|
|
3679
|
+
/**
|
|
3680
|
+
* Cosmos function
|
|
3681
|
+
*/
|
|
3112
3682
|
cosmosGetAddress: typeof cosmosGetAddress;
|
|
3113
3683
|
cosmosGetPublicKey: typeof cosmosGetPublicKey;
|
|
3114
3684
|
cosmosSignTransaction: typeof cosmosSignTransaction;
|
|
3685
|
+
/**
|
|
3686
|
+
* XRP function
|
|
3687
|
+
*/
|
|
3115
3688
|
xrpGetAddress: typeof xrpGetAddress;
|
|
3116
3689
|
xrpSignTransaction: typeof xrpSignTransaction;
|
|
3690
|
+
/**
|
|
3691
|
+
* SUI function
|
|
3692
|
+
*/
|
|
3117
3693
|
suiGetAddress: typeof suiGetAddress;
|
|
3118
3694
|
suiGetPublicKey: typeof suiGetPublicKey;
|
|
3119
3695
|
suiSignMessage: typeof suiSignMessage;
|
|
3120
3696
|
suiSignTransaction: typeof suiSignTransaction;
|
|
3697
|
+
/**
|
|
3698
|
+
* Cardano function
|
|
3699
|
+
*/
|
|
3121
3700
|
cardanoGetAddress: typeof cardanoGetAddress;
|
|
3122
3701
|
cardanoGetPublicKey: typeof cardanoGetPublicKey;
|
|
3123
3702
|
cardanoSignTransaction: typeof cardanoSignTransaction;
|
|
3124
3703
|
cardanoSignMessage: typeof cardanoSignMessage;
|
|
3704
|
+
/**
|
|
3705
|
+
* Filecoin function
|
|
3706
|
+
*/
|
|
3125
3707
|
filecoinGetAddress: typeof filecoinGetAddress;
|
|
3126
3708
|
filecoinSignTransaction: typeof filecoinSignTransaction;
|
|
3709
|
+
/**
|
|
3710
|
+
* Polkadot function
|
|
3711
|
+
*/
|
|
3127
3712
|
polkadotGetAddress: typeof polkadotGetAddress;
|
|
3128
3713
|
polkadotSignTransaction: typeof polkadotSignTransaction;
|
|
3714
|
+
/**
|
|
3715
|
+
* Kaspa function
|
|
3716
|
+
*/
|
|
3129
3717
|
kaspaGetAddress: typeof kaspaGetAddress;
|
|
3130
3718
|
kaspaSignTransaction: typeof kaspaSignTransaction;
|
|
3719
|
+
/**
|
|
3720
|
+
* nexa function
|
|
3721
|
+
*/
|
|
3131
3722
|
nexaGetAddress: typeof nexaGetAddress;
|
|
3132
3723
|
nexaSignTransaction: typeof nexaSignTransaction;
|
|
3724
|
+
/**
|
|
3725
|
+
* Nostr function
|
|
3726
|
+
*/
|
|
3133
3727
|
nostrGetPublicKey: typeof nostrGetPublicKey;
|
|
3134
3728
|
nostrSignEvent: typeof nostrSignEvent;
|
|
3135
3729
|
nostrEncryptMessage: typeof nostrEncryptMessage;
|
|
3136
3730
|
nostrDecryptMessage: typeof nostrDecryptMessage;
|
|
3137
3731
|
nostrSignSchnorr: typeof nostrSignSchnorr;
|
|
3732
|
+
/**
|
|
3733
|
+
* Lightning Network
|
|
3734
|
+
*/
|
|
3138
3735
|
lnurlAuth: typeof lnurlAuth;
|
|
3736
|
+
/**
|
|
3737
|
+
* Nervos Network
|
|
3738
|
+
*/
|
|
3139
3739
|
nervosGetAddress: typeof nervosGetAddress;
|
|
3140
3740
|
nervosSignTransaction: typeof nervosSignTransaction;
|
|
3741
|
+
/**
|
|
3742
|
+
* Dnx Network
|
|
3743
|
+
*/
|
|
3141
3744
|
dnxGetAddress: typeof dnxGetAddress;
|
|
3142
3745
|
dnxSignTransaction: typeof dnxSignTransaction;
|
|
3746
|
+
/**
|
|
3747
|
+
* TON Network
|
|
3748
|
+
*/
|
|
3143
3749
|
tonGetAddress: typeof tonGetAddress;
|
|
3144
3750
|
tonSignMessage: typeof tonSignMessage;
|
|
3145
3751
|
tonSignProof: typeof tonSignProof;
|
|
3146
3752
|
tonSignData: typeof tonSignData;
|
|
3753
|
+
/**
|
|
3754
|
+
* SCDO Network
|
|
3755
|
+
*/
|
|
3147
3756
|
scdoGetAddress: typeof scdoGetAddress;
|
|
3148
3757
|
scdoSignMessage: typeof scdoSignMessage;
|
|
3149
3758
|
scdoSignTransaction: typeof scdoSignTransaction;
|
|
3759
|
+
/**
|
|
3760
|
+
* Alephium Network
|
|
3761
|
+
*/
|
|
3150
3762
|
alephiumGetAddress: typeof alephiumGetAddress;
|
|
3151
3763
|
alephiumSignMessage: typeof alephiumSignMessage;
|
|
3152
3764
|
alephiumSignTransaction: typeof alephiumSignTransaction;
|
|
3765
|
+
/**
|
|
3766
|
+
* Benfen Network
|
|
3767
|
+
*/
|
|
3153
3768
|
benfenGetAddress: typeof benfenGetAddress;
|
|
3154
3769
|
benfenGetPublicKey: typeof benfenGetPublicKey;
|
|
3155
3770
|
benfenSignTransaction: typeof benfenSignTransaction;
|
|
3156
3771
|
benfenSignMessage: typeof benfenSignMessage;
|
|
3772
|
+
/**
|
|
3773
|
+
* Neo Network
|
|
3774
|
+
*/
|
|
3157
3775
|
neoGetAddress: typeof neoGetAddress;
|
|
3158
3776
|
neoSignTransaction: typeof neoSignTransaction;
|
|
3159
3777
|
};
|
|
@@ -3228,11 +3846,13 @@ declare const DEVICE: {
|
|
|
3228
3846
|
readonly PIN: "pin";
|
|
3229
3847
|
readonly PASSPHRASE: "passphrase";
|
|
3230
3848
|
readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
|
|
3849
|
+
readonly ATTACH_PIN_ON_DEVICE: "attach_pin_on_device";
|
|
3231
3850
|
readonly WORD: "word";
|
|
3232
3851
|
readonly SUPPORT_FEATURES: "support_features";
|
|
3233
3852
|
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
|
|
3234
3853
|
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "select_device_for_switch_firmware_web_device";
|
|
3235
3854
|
readonly FEATURES: "features";
|
|
3855
|
+
readonly STATE: "state";
|
|
3236
3856
|
};
|
|
3237
3857
|
interface DeviceConnnectRequest {
|
|
3238
3858
|
type: typeof DEVICE.CONNECT;
|
|
@@ -3251,6 +3871,9 @@ interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'
|
|
|
3251
3871
|
}
|
|
3252
3872
|
type PassphraseRequestPayload = {
|
|
3253
3873
|
existsAttachPinUser?: boolean;
|
|
3874
|
+
source?: 'wallet-session-coordinator';
|
|
3875
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
3876
|
+
expectedPassphraseState?: string;
|
|
3254
3877
|
};
|
|
3255
3878
|
interface DeviceButtonRequest {
|
|
3256
3879
|
type: typeof DEVICE.BUTTON;
|
|
@@ -3263,6 +3886,10 @@ interface DeviceSendFeatures {
|
|
|
3263
3886
|
type: typeof DEVICE.FEATURES;
|
|
3264
3887
|
payload: DeviceFeaturesPayload;
|
|
3265
3888
|
}
|
|
3889
|
+
interface DeviceSendState {
|
|
3890
|
+
type: typeof DEVICE.STATE;
|
|
3891
|
+
payload: DeviceStateEvent;
|
|
3892
|
+
}
|
|
3266
3893
|
type DeviceSupportFeaturesPayload = SupportFeatures & {
|
|
3267
3894
|
device: KnownDevice | null;
|
|
3268
3895
|
};
|
|
@@ -3270,7 +3897,7 @@ interface DeviceSendSupportFeatures {
|
|
|
3270
3897
|
type: typeof DEVICE.SUPPORT_FEATURES;
|
|
3271
3898
|
payload: DeviceSupportFeaturesPayload;
|
|
3272
3899
|
}
|
|
3273
|
-
type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
3900
|
+
type DeviceEvent = DeviceButtonRequest | DeviceSendState | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
3274
3901
|
type DeviceEventMessage = DeviceEvent & {
|
|
3275
3902
|
event: typeof DEVICE_EVENT;
|
|
3276
3903
|
};
|
|
@@ -3311,6 +3938,17 @@ declare const UI_REQUEST: {
|
|
|
3311
3938
|
readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
|
|
3312
3939
|
readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
|
|
3313
3940
|
};
|
|
3941
|
+
type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
|
|
3942
|
+
type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
|
|
3943
|
+
type ProtocolV2UiEventMetadata = {
|
|
3944
|
+
source?: ProtocolV2UiEventSource;
|
|
3945
|
+
reason?: string;
|
|
3946
|
+
deviceOnly?: boolean;
|
|
3947
|
+
completion?: ProtocolV2UiCompletion;
|
|
3948
|
+
method?: string;
|
|
3949
|
+
page?: string | number;
|
|
3950
|
+
operation?: string;
|
|
3951
|
+
};
|
|
3314
3952
|
interface UiRequestWithoutPayload {
|
|
3315
3953
|
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;
|
|
3316
3954
|
payload?: typeof undefined;
|
|
@@ -3323,40 +3961,45 @@ interface UiRequestFirmwareProgressing {
|
|
|
3323
3961
|
}
|
|
3324
3962
|
type UiRequestDeviceAction = {
|
|
3325
3963
|
type: typeof UI_REQUEST.REQUEST_PIN;
|
|
3326
|
-
payload: {
|
|
3327
|
-
device: Device;
|
|
3964
|
+
payload: ProtocolV2UiEventMetadata & {
|
|
3965
|
+
device: Device$1;
|
|
3328
3966
|
type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
|
|
3329
3967
|
};
|
|
3330
3968
|
};
|
|
3331
3969
|
interface UiRequestButton {
|
|
3332
3970
|
type: typeof UI_REQUEST.REQUEST_BUTTON;
|
|
3333
|
-
payload: DeviceButtonRequest['payload'];
|
|
3971
|
+
payload: DeviceButtonRequest['payload'] & ProtocolV2UiEventMetadata;
|
|
3334
3972
|
}
|
|
3335
3973
|
interface UiRequestPassphrase {
|
|
3336
3974
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
|
|
3337
3975
|
payload: {
|
|
3338
|
-
device: Device;
|
|
3976
|
+
device: Device$1;
|
|
3339
3977
|
passphraseState?: string;
|
|
3340
3978
|
existsAttachPinUser?: boolean;
|
|
3979
|
+
source?: 'wallet-session-coordinator';
|
|
3980
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
3981
|
+
expectedPassphraseState?: string;
|
|
3341
3982
|
};
|
|
3342
3983
|
}
|
|
3343
3984
|
interface UiRequestPassphraseOnDevice {
|
|
3344
3985
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
|
|
3345
3986
|
payload: {
|
|
3346
|
-
device: Device;
|
|
3987
|
+
device: Device$1;
|
|
3347
3988
|
passphraseState?: string;
|
|
3989
|
+
source?: 'wallet-session-coordinator';
|
|
3990
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
3348
3991
|
};
|
|
3349
3992
|
}
|
|
3350
3993
|
interface UiRequestSelectDeviceInBootloaderForWebDevice {
|
|
3351
3994
|
type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
3352
3995
|
payload: {
|
|
3353
|
-
device: Device;
|
|
3996
|
+
device: Device$1;
|
|
3354
3997
|
};
|
|
3355
3998
|
}
|
|
3356
3999
|
interface UiRequestSelectDeviceForSwitchFirmwareWebDevice {
|
|
3357
4000
|
type: typeof UI_REQUEST.REQUEST_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
|
|
3358
4001
|
payload: {
|
|
3359
|
-
device: Device;
|
|
4002
|
+
device: Device$1;
|
|
3360
4003
|
};
|
|
3361
4004
|
}
|
|
3362
4005
|
interface FirmwareProcessing {
|
|
@@ -3369,7 +4012,7 @@ type IFirmwareUpdateProgressType = 'transferData' | 'installingFirmware';
|
|
|
3369
4012
|
interface FirmwareProgress {
|
|
3370
4013
|
type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
|
|
3371
4014
|
payload: {
|
|
3372
|
-
device: Device;
|
|
4015
|
+
device: Device$1;
|
|
3373
4016
|
progress: number;
|
|
3374
4017
|
progressType: IFirmwareUpdateProgressType;
|
|
3375
4018
|
transferredBytes?: number;
|
|
@@ -3381,7 +4024,7 @@ interface FirmwareProgress {
|
|
|
3381
4024
|
interface FirmwareTip {
|
|
3382
4025
|
type: typeof UI_REQUEST.FIRMWARE_TIP;
|
|
3383
4026
|
payload: {
|
|
3384
|
-
device: Device;
|
|
4027
|
+
device: Device$1;
|
|
3385
4028
|
data: {
|
|
3386
4029
|
message: string;
|
|
3387
4030
|
};
|
|
@@ -3400,7 +4043,7 @@ interface DeviceProgress {
|
|
|
3400
4043
|
interface PreviousAddressResult {
|
|
3401
4044
|
type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
|
|
3402
4045
|
payload: {
|
|
3403
|
-
device: Device;
|
|
4046
|
+
device: Device$1;
|
|
3404
4047
|
data: {
|
|
3405
4048
|
address?: string;
|
|
3406
4049
|
path?: string;
|
|
@@ -3446,6 +4089,7 @@ declare const IFRAME: {
|
|
|
3446
4089
|
readonly INIT_BRIDGE: "iframe-init-bridge";
|
|
3447
4090
|
readonly CALL: "iframe-call";
|
|
3448
4091
|
readonly CANCEL: "iframe-cancel";
|
|
4092
|
+
readonly CANCEL_OPERATION: "iframe-cancel-operation";
|
|
3449
4093
|
readonly SWITCH_TRANSPORT: "iframe-switch-transport";
|
|
3450
4094
|
readonly CALLBACK: "iframe-callback";
|
|
3451
4095
|
};
|
|
@@ -3514,6 +4158,13 @@ interface IFrameCancelMessage {
|
|
|
3514
4158
|
connectId?: string;
|
|
3515
4159
|
};
|
|
3516
4160
|
}
|
|
4161
|
+
interface IFrameCancelOperationMessage {
|
|
4162
|
+
event: typeof IFRAME.CANCEL_OPERATION;
|
|
4163
|
+
type: typeof IFRAME.CANCEL_OPERATION;
|
|
4164
|
+
payload: {
|
|
4165
|
+
operationId: string;
|
|
4166
|
+
};
|
|
4167
|
+
}
|
|
3517
4168
|
interface IFrameSwitchTransportMessage {
|
|
3518
4169
|
event: typeof IFRAME.SWITCH_TRANSPORT;
|
|
3519
4170
|
type: typeof IFRAME.SWITCH_TRANSPORT;
|
|
@@ -3640,7 +4291,7 @@ declare const CORE_EVENT = "CORE_EVENT";
|
|
|
3640
4291
|
type CoreMessage = {
|
|
3641
4292
|
id?: string;
|
|
3642
4293
|
success?: true | false;
|
|
3643
|
-
} & (IFrameEventMessage | IFrameCallMessage | IFrameCancelMessage | IFrameSwitchTransportMessage | IFrameCallbackMessage | UiResponseMessage | UiEventMessage | DeviceEventMessage | LogEventMessage | FirmwareMessage);
|
|
4294
|
+
} & (IFrameEventMessage | IFrameCallMessage | IFrameCancelMessage | IFrameCancelOperationMessage | IFrameSwitchTransportMessage | IFrameCallbackMessage | UiResponseMessage | UiEventMessage | DeviceEventMessage | LogEventMessage | FirmwareMessage);
|
|
3644
4295
|
type PostMessageEvent = MessageEvent<any>;
|
|
3645
4296
|
declare const parseMessage: (messageData: any) => CoreMessage;
|
|
3646
4297
|
declare const createErrorMessage: (error: Error & {
|
|
@@ -3653,7 +4304,7 @@ type UiPromiseResponse = UiResponseEvent | {
|
|
|
3653
4304
|
};
|
|
3654
4305
|
type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
|
|
3655
4306
|
type: T;
|
|
3656
|
-
}>, T, Device
|
|
4307
|
+
}>, T, Device>;
|
|
3657
4308
|
|
|
3658
4309
|
declare const LogBlockEvent: Set<string>;
|
|
3659
4310
|
declare function getLogBlockLabel(message: unknown): string | undefined;
|
|
@@ -3669,6 +4320,7 @@ interface InjectApi {
|
|
|
3669
4320
|
dispose: CoreApi['dispose'];
|
|
3670
4321
|
uiResponse: CoreApi['uiResponse'];
|
|
3671
4322
|
cancel: CoreApi['cancel'];
|
|
4323
|
+
cancelOperation: CoreApi['cancelOperation'];
|
|
3672
4324
|
switchTransport: CoreApi['switchTransport'];
|
|
3673
4325
|
}
|
|
3674
4326
|
|
|
@@ -3720,32 +4372,110 @@ declare enum LoggerNames {
|
|
|
3720
4372
|
}
|
|
3721
4373
|
declare const getLogger: (key: LoggerNames) => Log;
|
|
3722
4374
|
|
|
3723
|
-
|
|
4375
|
+
type HttpRequestOptions = {
|
|
4376
|
+
/** Axios adapter-defined request timeout retained for existing opt-in callers. */
|
|
4377
|
+
timeoutMs?: number;
|
|
4378
|
+
/** Deadline for DNS, connection, TLS, redirects, and the first response-body progress. */
|
|
4379
|
+
connectTimeoutMs?: number;
|
|
4380
|
+
/** Maximum idle interval between response-body progress events. */
|
|
4381
|
+
readTimeoutMs?: number;
|
|
4382
|
+
/** Wall-clock deadline across all attempts and retry backoff. */
|
|
4383
|
+
overallTimeoutMs?: number;
|
|
4384
|
+
maxRetries?: number;
|
|
4385
|
+
retryDelayMs?: number;
|
|
4386
|
+
};
|
|
4387
|
+
|
|
4388
|
+
declare const httpRequest: (url: string, type: string, options?: HttpRequestOptions) => any;
|
|
3724
4389
|
declare const getTimeStamp: () => number;
|
|
3725
4390
|
|
|
4391
|
+
/**
|
|
4392
|
+
* Validates version string
|
|
4393
|
+
* @param {string} version Version string
|
|
4394
|
+
* @returns {boolean} True if version string is valid, false if not
|
|
4395
|
+
*/
|
|
3726
4396
|
declare const isValidVersionString: (version: string) => boolean;
|
|
4397
|
+
/**
|
|
4398
|
+
* Validates a version array
|
|
4399
|
+
* @param {number[]} version Version array
|
|
4400
|
+
* @returns {boolean} True if version array is valid, false if not
|
|
4401
|
+
*/
|
|
3727
4402
|
declare const isValidVersionArray: (version: number[]) => boolean;
|
|
4403
|
+
/**
|
|
4404
|
+
* Fills the missing version numbers with zeros (ie: [1, 2] will become [1, 2, 0])
|
|
4405
|
+
* @param {number[]} version Version array
|
|
4406
|
+
* @returns {number[]} Version array with all positions filled
|
|
4407
|
+
*/
|
|
3728
4408
|
declare const normalizeVersionArray: (version: number[]) => number[];
|
|
4409
|
+
/**
|
|
4410
|
+
* Returns a valid version array from a version string
|
|
4411
|
+
* @param {string} version Version string
|
|
4412
|
+
* @returns {number[]} Version array
|
|
4413
|
+
*/
|
|
3729
4414
|
declare const versionSplit: (version: string) => number[];
|
|
4415
|
+
/**
|
|
4416
|
+
* Compares two versions and returns if the version is newer (1), older (-1) or equal (0).
|
|
4417
|
+
* @param {string | number[]} a Version to compare from
|
|
4418
|
+
* @param {string | number[]} b Version to compare with
|
|
4419
|
+
* @returns {number} Returns 1 if newer, -1 if older and 0 if equal
|
|
4420
|
+
*/
|
|
3730
4421
|
declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
|
|
3731
4422
|
|
|
3732
|
-
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"DevFirmwareInstallProgress"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"DevFirmwareUpdateStatus"> | 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<"TxDetailsAmount"> | TypedResponseMessage<"TxDetailsNetwork"> | TypedResponseMessage<"TxDetailsAddress"> | TypedResponseMessage<"TxDetailsGeneral"> | TypedResponseMessage<"DevFirmwareImageInfo"> | TypedResponseMessage<"DevInfoTargets"> | TypedResponseMessage<"DevInfoTypes"> | TypedResponseMessage<"DevHardwareInfo"> | TypedResponseMessage<"DevMainMcuInfo"> | TypedResponseMessage<"DevBluetoothInfo"> | TypedResponseMessage<"DevSEInfo"> | TypedResponseMessage<"DevStatus"> | TypedResponseMessage<"DevFirmwareTarget"> | TypedResponseMessage<"DevFirmwareUpdateStatusEntry"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"Setup"> | TypedResponseMessage<"NewDevice"> | TypedResponseMessage<"Restore"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusEntry"> | 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<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"TxDetailsPage"> | TypedResponseMessage<"GetProtoVersion"> | TypedResponseMessage<"ProtoVersion"> | TypedResponseMessage<"DevReboot"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DevGetDeviceInfo"> | TypedResponseMessage<"DeviceGetDeviceInfo"> | TypedResponseMessage<"DevFirmwareUpdate"> | TypedResponseMessage<"DeviceFirmwareUpdate"> | TypedResponseMessage<"DeviceFirmwareInstallProgress"> | TypedResponseMessage<"DevGetFirmwareUpdateStatus"> | TypedResponseMessage<"DeviceGetFirmwareUpdateStatus"> | TypedResponseMessage<"DeviceFirmwareUpdateStatus"> | TypedResponseMessage<"FactoryDeviceInfoSettings"> | TypedResponseMessage<"FactoryGetDeviceInfo"> | TypedResponseMessage<"FactoryDeviceInfo"> | TypedResponseMessage<"FilesystemFixPermission"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"GetOnboardingStatus"> | TypedResponseMessage<"OnboardingStatus">;
|
|
4423
|
+
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceStatus"> | 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<"KaspaTxRequestSignature"> | TypedResponseMessage<"KaspaOutpoint"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"SolanaTxATADetails"> | TypedResponseMessage<"SolanaTxExtraInfo"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"CoinJoinRequest"> | TypedResponseMessage<"PaymentRequestMemo"> | TypedResponseMessage<"TextMemo"> | TypedResponseMessage<"RefundMemo"> | TypedResponseMessage<"CoinPurchaseMemo"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"ViewRawData"> | TypedResponseMessage<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"DevOnboardingSetupStatus"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaTxRequest"> | TypedResponseMessage<"KaspaTxAckInput"> | TypedResponseMessage<"KaspaTxAckOutput"> | TypedResponseMessage<"KaspaTxAckPayloadChunk"> | TypedResponseMessage<"KaspaTxAckPrevMeta"> | TypedResponseMessage<"KaspaTxAckPrevInput"> | TypedResponseMessage<"KaspaTxAckPrevOutput"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"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<"EthereumSignTypedDataQR"> | TypedResponseMessage<"InternalMyAddressRequest"> | TypedResponseMessage<"StartSession"> | TypedResponseMessage<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"SetWallpaper"> | TypedResponseMessage<"GetWallpaper"> | TypedResponseMessage<"Wallpaper"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage"> | TypedResponseMessage<"ProtocolInfoRequest"> | TypedResponseMessage<"ProtocolInfo"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DeviceSettingsGet"> | TypedResponseMessage<"DeviceSettingsSet"> | TypedResponseMessage<"DeviceSettingsPageShow"> | TypedResponseMessage<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionGet"> | TypedResponseMessage<"DeviceSessionAskPin"> | TypedResponseMessage<"DeviceStatusGet"> | TypedResponseMessage<"DevGetOnboardingStatus"> | TypedResponseMessage<"DevOnboardingStatus"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"PortfolioUpdate">;
|
|
4424
|
+
|
|
4425
|
+
type DeviceFeaturesInput = Features | Messages.Features;
|
|
3733
4426
|
|
|
3734
|
-
|
|
4427
|
+
/**
|
|
4428
|
+
* get device type by features
|
|
4429
|
+
*/
|
|
4430
|
+
declare const getDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
|
|
4431
|
+
/**
|
|
4432
|
+
* get device type by ble name
|
|
4433
|
+
* @param name Ble name
|
|
4434
|
+
*/
|
|
3735
4435
|
declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
4436
|
+
/**
|
|
4437
|
+
* Get Connected Device ble name by features
|
|
4438
|
+
* @returns
|
|
4439
|
+
*/
|
|
4440
|
+
declare const getDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
|
|
4441
|
+
/**
|
|
4442
|
+
* Get Connected Device serial number by features
|
|
4443
|
+
*/
|
|
4444
|
+
declare const getDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
|
|
4445
|
+
/**
|
|
4446
|
+
* @deprecated Use getDeviceSerialNo instead.
|
|
4447
|
+
*/
|
|
4448
|
+
declare const getDeviceUUID: (features?: DeviceFeaturesInput) => string;
|
|
4449
|
+
/**
|
|
4450
|
+
* Get Connected Device label by features
|
|
4451
|
+
*/
|
|
4452
|
+
declare const getDeviceLabel: (features?: DeviceFeaturesInput) => string | null;
|
|
4453
|
+
/**
|
|
4454
|
+
* Get firmware version range by features
|
|
4455
|
+
* Type has a higher priority than Model
|
|
4456
|
+
*/
|
|
4457
|
+
declare const getMethodVersionRange: (features: DeviceFeaturesInput | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
|
|
3740
4458
|
declare const isMethodVersionRangeUnsupported: (versionRange?: IVersionRange) => boolean;
|
|
3741
|
-
declare const getFirmwareType: (features
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
declare const
|
|
3747
|
-
|
|
3748
|
-
|
|
4459
|
+
declare const getFirmwareType: (features?: DeviceFeaturesInput) => _onekeyfe_hd_shared.EFirmwareType;
|
|
4460
|
+
|
|
4461
|
+
/**
|
|
4462
|
+
* Get Connected Device version by features
|
|
4463
|
+
*/
|
|
4464
|
+
declare const getDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4465
|
+
/**
|
|
4466
|
+
* Get Connected Device bootloader version by features
|
|
4467
|
+
*/
|
|
4468
|
+
declare const getDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4469
|
+
/**
|
|
4470
|
+
* Get Connected Device boardloader/romloader version by features
|
|
4471
|
+
*/
|
|
4472
|
+
declare const getDeviceBoardloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4473
|
+
/**
|
|
4474
|
+
* Get Connected Device bluetooth firmware version by features
|
|
4475
|
+
*/
|
|
4476
|
+
declare const getDeviceBLEFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4477
|
+
|
|
4478
|
+
declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v1", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
|
|
3749
4479
|
type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
|
|
3750
4480
|
type ProtocolV1MessageSchema = 'v1CurrentSchema' | 'v1LegacySchema';
|
|
3751
4481
|
type ProtobufMessageSchema = ProtocolV1MessageSchema | 'v2Schema';
|
|
@@ -3760,11 +4490,19 @@ declare class DataManager {
|
|
|
3760
4490
|
};
|
|
3761
4491
|
static lastCheckTimestamp: number;
|
|
3762
4492
|
static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
|
|
4493
|
+
/**
|
|
4494
|
+
* Touch、Pro System UI Resource Update
|
|
4495
|
+
* ** Interval upgrade is not considered **
|
|
4496
|
+
*/
|
|
3763
4497
|
static getSysResourcesLatestRelease: ({ features, forcedUpdateRes, firmwareType, }: {
|
|
3764
4498
|
features: Features;
|
|
3765
4499
|
forcedUpdateRes?: boolean | undefined;
|
|
3766
4500
|
firmwareType: EFirmwareType;
|
|
3767
4501
|
}) => string | undefined;
|
|
4502
|
+
/**
|
|
4503
|
+
* Touch、Pro System full UI Resource Update
|
|
4504
|
+
* ** Interval upgrade is not considered **
|
|
4505
|
+
*/
|
|
3768
4506
|
static getSysFullResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3769
4507
|
static getBootloaderResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3770
4508
|
static getBootloaderTargetVersion: (features: Features, firmwareType: EFirmwareType) => IVersionArray | undefined;
|
|
@@ -3793,17 +4531,27 @@ declare class DataManager {
|
|
|
3793
4531
|
static getSettings(key?: undefined): ConnectSettings;
|
|
3794
4532
|
static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
|
|
3795
4533
|
static isBleConnect: (env: ConnectSettings['env']) => boolean;
|
|
4534
|
+
/** Desktop WebUSB doesn't need browser permission prompt */
|
|
3796
4535
|
static isDesktopWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
4536
|
+
/** Browser WebUSB needs permission prompt */
|
|
3797
4537
|
static isBrowserWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
3798
4538
|
}
|
|
3799
4539
|
|
|
3800
|
-
declare const supportInputPinOnSoftware: (features
|
|
4540
|
+
declare const supportInputPinOnSoftware: (features?: Features) => SupportFeatureType;
|
|
4541
|
+
/**
|
|
4542
|
+
* Since 3.5.0, Touch uses the firmware-v3 field to get firmware release info
|
|
4543
|
+
*/
|
|
3801
4544
|
declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, firmwareType, }: {
|
|
3802
4545
|
features: Features;
|
|
3803
4546
|
updateType: 'firmware' | 'ble';
|
|
3804
4547
|
targetVersion?: string | undefined;
|
|
3805
4548
|
firmwareType: EFirmwareType;
|
|
3806
4549
|
}) => 'ble' | IFirmwareField;
|
|
4550
|
+
/**
|
|
4551
|
+
* Returns the optional firmware version
|
|
4552
|
+
* Used in firmware web update
|
|
4553
|
+
* https://firmware.onekey.so/
|
|
4554
|
+
*/
|
|
3807
4555
|
declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('ble' | IFirmwareField)[];
|
|
3808
4556
|
|
|
3809
4557
|
declare function checkNeedUpdateBootForTouch(features: Features, firmwareType: EFirmwareType): boolean;
|
|
@@ -3858,8 +4606,8 @@ declare const getEnv: () => "web" | "webextension" | "electron" | "react-native"
|
|
|
3858
4606
|
declare const corsValidator: (url?: string) => string | undefined;
|
|
3859
4607
|
declare const parseConnectSettings: (input?: Partial<ConnectSettings>) => ConnectSettings;
|
|
3860
4608
|
|
|
3861
|
-
declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, updateSettings, switchTransport, }: InjectApi) => CoreApi;
|
|
3862
|
-
declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
|
|
4609
|
+
declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, cancelOperation, updateSettings, switchTransport, }: InjectApi) => CoreApi;
|
|
4610
|
+
declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, cancelOperation, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
|
|
3863
4611
|
declare const HardwareTopLevelSdk: () => CoreApi;
|
|
3864
4612
|
|
|
3865
|
-
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,
|
|
4613
|
+
export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllFirmwareRelease, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, ClearSessionCacheParams, ClearSessionCachePayload, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesRawPatch, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendState, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceState, DeviceStateEvent, DeviceStateIdentity, DeviceStateMode, DeviceStatePatch, DeviceStateProtocol, DeviceStateScope, DeviceStateSection, DeviceStateSettings, DeviceStateStatus, DeviceStateUpdateSource, DeviceStateVersions, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4Params, GetDeviceStateParams, GetPassphraseStateParams, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameCancelOperationMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceBundle, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, NormalizedFeatures, OnekeyFeatures, OpenWalletSessionParams, OpenWalletSessionPayload, PRO2_WALLPAPER_HEIGHT, PRO2_WALLPAPER_WIDTH, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, Pro2WallpaperColorFormat, ProtocolV2UiCompletion, ProtocolV2UiEventMetadata, ProtocolV2UiEventSource, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TonAddress, TonGetAddressParams, TonSignDataParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceForSwitchFirmwareWebDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceForSwitchFirmwareWebDevice, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, cleanupSdkInstance, completeRequestContext, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createRequestContext, createResponseMessage, createSdkTracingContext, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, encodePro2Wallpaper, executeCallback, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceSerialNo, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, 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 };
|