@onekeyfe/hd-core 1.2.0-alpha.11 → 1.2.0-alpha.110
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 +390 -0
- package/__tests__/DeviceCommands.test.ts +652 -0
- package/__tests__/DeviceEventRegistration.test.ts +49 -0
- package/__tests__/base64Data.test.ts +70 -0
- package/__tests__/chain-params-onekey-compatibility.test.ts +229 -0
- package/__tests__/check-all-firmware-release-protocol-v2.test.ts +830 -0
- package/__tests__/check-firmware-release-protocol-v2.test.ts +270 -0
- package/__tests__/connectSettings.test.ts +45 -5
- package/__tests__/core-dispose.test.ts +34 -0
- package/__tests__/core-error-output.test.ts +39 -0
- package/__tests__/core-initialization.test.ts +23 -0
- package/__tests__/device-connector-protocol.test.ts +81 -0
- package/__tests__/device-features-state.test.ts +78 -0
- package/__tests__/device-identity.test.ts +52 -0
- package/__tests__/device-initialize-timeout.test.ts +56 -0
- package/__tests__/device-lifecycle-events.test.ts +462 -0
- package/__tests__/device-pool-state.test.ts +191 -0
- package/__tests__/device-settings.test.ts +437 -0
- package/__tests__/device-state-contract.test.ts +28 -0
- package/__tests__/device-state-events.test.ts +286 -0
- package/__tests__/device-state-mapper.test.ts +288 -0
- package/__tests__/device-state-projector.test.ts +114 -0
- package/__tests__/device-state-store.test.ts +109 -0
- package/__tests__/device-utils.test.ts +154 -0
- package/__tests__/device-wallet-session-store.test.ts +348 -1
- package/__tests__/deviceFeaturesUtils.test.ts +39 -0
- package/__tests__/devicePoolBootloaderPath.test.ts +64 -0
- package/__tests__/deviceSettings.test.ts +112 -0
- package/__tests__/deviceUploadNft.test.ts +345 -0
- package/__tests__/evmLedgerLegacySafety.test.ts +12 -6
- package/__tests__/evmSignTransaction.test.ts +69 -0
- package/__tests__/evmSignTypedData.test.ts +80 -0
- package/__tests__/filesystemValidation.test.ts +53 -0
- package/__tests__/firmware-memory-host.test.ts +126 -0
- package/__tests__/firmware-update/check-all-firmware-release.test.ts +175 -0
- package/__tests__/firmware-update/device-update-bootloader.test.ts +109 -0
- package/__tests__/firmware-update/firmware-artifact-source.test.ts +171 -0
- package/__tests__/firmware-update/firmware-host-binding.test.ts +79 -0
- package/__tests__/firmware-update/firmware-preparation-error.test.ts +27 -0
- package/__tests__/firmware-update/firmware-prepared-host-digest.test.ts +583 -0
- package/__tests__/firmware-update/firmware-prepared-resource-archive.test.ts +150 -0
- package/__tests__/firmware-update/firmware-update-bootloader-poll.test.ts +375 -0
- package/__tests__/firmware-update/firmware-update-capabilities.test.ts +13 -0
- package/__tests__/firmware-update/firmware-update-plan-bootloader-identity.test.ts +474 -0
- package/__tests__/firmware-update/firmware-update-plan.test.ts +819 -0
- package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +283 -0
- package/__tests__/firmware-update/firmware-update-prepared-resource-executors.test.ts +326 -0
- package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +457 -0
- package/__tests__/firmware-update/firmware-update-v3-reconnect.test.ts +175 -0
- package/__tests__/firmware-update/firmware-update-v4-install-poll.test.ts +178 -0
- package/__tests__/firmware-update/firmware-update-v4-parameters.test.ts +85 -0
- package/__tests__/firmware-update/firmware-upload-source.test.ts +70 -0
- package/__tests__/get-device-state.test.ts +617 -0
- package/__tests__/homescreen.test.ts +81 -0
- package/__tests__/kaspa-public-types.type-test.ts +16 -0
- package/__tests__/kaspa-use-tweak-pro2.test.ts +20 -0
- package/__tests__/kaspaSignTransaction.test.ts +578 -0
- package/__tests__/known-device-public-types.type-test.ts +3 -0
- package/__tests__/logBlockEvent.test.ts +140 -1
- package/__tests__/method-protocol-support.test.ts +144 -0
- package/__tests__/networkUtils.test.ts +406 -0
- package/__tests__/open-wallet-session-error-response.test.ts +43 -0
- package/__tests__/open-wallet-session.test.ts +1899 -0
- package/__tests__/pro2Nft.test.ts +108 -0
- package/__tests__/pro2Wallpaper.test.ts +8 -19
- package/__tests__/protocol-binding.test.ts +89 -0
- package/__tests__/protocol-v2-bootloader-mode.test.ts +37 -0
- package/__tests__/protocol-v2-firmware-targets.test.ts +105 -0
- package/__tests__/protocol-v2-ping.test.ts +28 -0
- package/__tests__/protocol-v2-resources.test.ts +270 -0
- package/__tests__/protocol-v2-ui-lifecycle.test.ts +91 -0
- package/__tests__/protocol-v2-unlock-policy.test.ts +308 -0
- package/__tests__/protocol-v2.test.ts +7490 -2020
- package/__tests__/protocolV2FileWrite.test.ts +285 -0
- package/__tests__/protocolV2UiInteraction.test.ts +329 -0
- package/__tests__/public-device-state-api.test.ts +275 -0
- package/__tests__/public-pro2-api-boundary.test.ts +107 -0
- package/__tests__/refresh-device-state.test.ts +103 -0
- package/__tests__/request-context-logging.test.ts +16 -0
- package/__tests__/resourceBase64Boundary.test.ts +48 -0
- package/__tests__/search-devices.test.ts +151 -0
- package/__tests__/ton-sign-message.test.ts +84 -0
- package/__tests__/tron-sign-message-init.test.ts +74 -0
- package/__tests__/uiProgressThrottle.test.ts +74 -0
- package/__tests__/uiPromiseRegistry.test.ts +115 -0
- package/dist/api/BaseMethod.d.ts +13 -2
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/CheckAllFirmwareRelease.d.ts +25 -1
- package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CheckBLEFirmwareRelease.d.ts +3 -2
- package/dist/api/CheckBLEFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CheckBootloaderRelease.d.ts +2 -1
- package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
- package/dist/api/CheckFirmwareRelease.d.ts +3 -2
- package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CipherKeyValue.d.ts +1 -0
- package/dist/api/CipherKeyValue.d.ts.map +1 -1
- package/dist/api/ClearSessionCache.d.ts.map +1 -1
- package/dist/api/DetectDeviceConnectProtocol.d.ts +7 -0
- package/dist/api/DetectDeviceConnectProtocol.d.ts.map +1 -0
- package/dist/api/DirList.d.ts +1 -0
- package/dist/api/DirList.d.ts.map +1 -1
- package/dist/api/DirMake.d.ts +1 -0
- package/dist/api/DirMake.d.ts.map +1 -1
- package/dist/api/DirRemove.d.ts +1 -0
- package/dist/api/DirRemove.d.ts.map +1 -1
- package/dist/api/FileDelete.d.ts +1 -0
- package/dist/api/FileDelete.d.ts.map +1 -1
- package/dist/api/FileRead.d.ts +1 -0
- package/dist/api/FileRead.d.ts.map +1 -1
- package/dist/api/FileWrite.d.ts +2 -0
- package/dist/api/FileWrite.d.ts.map +1 -1
- package/dist/api/FirmwareUpdate.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV2.d.ts +13 -2
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV3.d.ts +7 -3
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +59 -12
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/GetDeviceState.d.ts +8 -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 -0
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/OpenWalletSession.d.ts +8 -0
- package/dist/api/OpenWalletSession.d.ts.map +1 -0
- package/dist/api/PathInfo.d.ts +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 +1 -2
- package/dist/api/UploadPortfolio.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
- package/dist/api/algo/AlgoGetAddress.d.ts +1 -0
- package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -1
- package/dist/api/algo/AlgoSignTransaction.d.ts +1 -0
- package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -1
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +1 -0
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetAddress.d.ts +1 -0
- package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetPublicKey.d.ts +1 -0
- package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignInMessage.d.ts +1 -0
- package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignMessage.d.ts +1 -0
- package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignTransaction.d.ts +1 -0
- package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCGetAddress.d.ts +1 -0
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts +1 -0
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts +1 -0
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
- package/dist/api/btc/BTCSignPsbt.d.ts +1 -0
- package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
- package/dist/api/btc/BTCSignTransaction.d.ts +1 -0
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts +1 -0
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
- package/dist/api/btc/helpers/versionLimit.d.ts +2 -0
- package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
- package/dist/api/cardano/CardanoGetAddress.d.ts +1 -0
- package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
- package/dist/api/cardano/CardanoGetPublicKey.d.ts +1 -0
- package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignMessage.d.ts +1 -0
- package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignTransaction.d.ts +1 -0
- package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxGetAddress.d.ts +2 -0
- package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignMessage.d.ts +2 -0
- package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +2 -0
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignTransaction.d.ts +2 -0
- package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
- package/dist/api/cosmos/CosmosGetAddress.d.ts +1 -0
- package/dist/api/cosmos/CosmosGetAddress.d.ts.map +1 -1
- package/dist/api/cosmos/CosmosGetPublicKey.d.ts +1 -0
- package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -1
- package/dist/api/cosmos/CosmosSignTransaction.d.ts +1 -0
- package/dist/api/cosmos/CosmosSignTransaction.d.ts.map +1 -1
- package/dist/api/device/DeviceCancel.d.ts +1 -0
- package/dist/api/device/DeviceCancel.d.ts.map +1 -1
- package/dist/api/device/DeviceChangePin.d.ts +1 -0
- 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 +1 -0
- package/dist/api/device/DeviceLock.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -0
- package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts +1 -0
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
- package/dist/api/device/DeviceSettings.d.ts +1 -0
- package/dist/api/device/DeviceSettings.d.ts.map +1 -1
- package/dist/api/device/DeviceSupportFeatures.d.ts +1 -0
- package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
- package/dist/api/device/DeviceUnlock.d.ts +3 -2
- package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
- package/dist/api/device/DeviceUpdateBootloader.d.ts +5 -1
- package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
- package/dist/api/device/DeviceWipe.d.ts +1 -0
- package/dist/api/device/DeviceWipe.d.ts.map +1 -1
- package/dist/api/device/PreInitialize.d.ts +1 -0
- package/dist/api/device/PreInitialize.d.ts.map +1 -1
- package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -1
- package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -1
- package/dist/api/evm/EVMGetAddress.d.ts +1 -0
- package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
- package/dist/api/evm/EVMGetPublicKey.d.ts +1 -0
- package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessage.d.ts +1 -0
- package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTransaction.d.ts +1 -0
- package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTypedData.d.ts +1 -0
- package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
- package/dist/api/evm/EVMVerifyMessage.d.ts +1 -0
- package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
- package/dist/api/evm/protocol.d.ts +3 -0
- package/dist/api/evm/protocol.d.ts.map +1 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts +1 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -1
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts +1 -0
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareArtifactSource.d.ts +29 -0
- package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareHostBinding.d.ts +6 -0
- package/dist/api/firmware/FirmwareHostBinding.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareMemoryHost.d.ts +22 -0
- package/dist/api/firmware/FirmwareMemoryHost.d.ts.map +1 -0
- package/dist/api/firmware/FirmwarePreparationError.d.ts +3 -0
- package/dist/api/firmware/FirmwarePreparationError.d.ts.map +1 -0
- package/dist/api/firmware/FirmwarePreparedResourceArchive.d.ts +11 -0
- package/dist/api/firmware/FirmwarePreparedResourceArchive.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +12 -3
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts +3 -0
- package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts +72 -0
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +38 -0
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -0
- package/dist/api/firmware/getBinary.d.ts +14 -4
- package/dist/api/firmware/getBinary.d.ts.map +1 -1
- package/dist/api/firmware/protocolV2Release.d.ts +33 -0
- package/dist/api/firmware/protocolV2Release.d.ts.map +1 -0
- package/dist/api/firmware/updateBootloader.d.ts +2 -0
- package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
- package/dist/api/firmware/uploadFirmware.d.ts +9 -1
- package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
- package/dist/api/helpers/base64Data.d.ts +16 -0
- package/dist/api/helpers/base64Data.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 +43 -0
- package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -0
- package/dist/api/index.d.ts +6 -30
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaGetAddress.d.ts +4 -0
- package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts +9 -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/lightning/LnurlAuth.d.ts +0 -4
- package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
- package/dist/api/near/NearGetAddress.d.ts +1 -0
- package/dist/api/near/NearGetAddress.d.ts.map +1 -1
- package/dist/api/near/NearSignTransaction.d.ts +1 -0
- package/dist/api/near/NearSignTransaction.d.ts.map +1 -1
- package/dist/api/nem/NEMGetAddress.d.ts +1 -0
- package/dist/api/nem/NEMGetAddress.d.ts.map +1 -1
- package/dist/api/nem/NEMSignTransaction.d.ts +1 -0
- package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -1
- package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
- package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
- package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
- package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
- package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
- package/dist/api/nexa/NexaSignTransaction.d.ts +1 -0
- package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
- package/dist/api/nostr/NostrDecryptMessage.d.ts +1 -0
- package/dist/api/nostr/NostrDecryptMessage.d.ts.map +1 -1
- package/dist/api/nostr/NostrEncryptMessage.d.ts +1 -0
- package/dist/api/nostr/NostrEncryptMessage.d.ts.map +1 -1
- package/dist/api/nostr/NostrGetPublicKey.d.ts +1 -0
- package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -1
- package/dist/api/nostr/NostrSignEvent.d.ts +1 -0
- package/dist/api/nostr/NostrSignEvent.d.ts.map +1 -1
- package/dist/api/nostr/NostrSignSchnorr.d.ts +1 -0
- package/dist/api/nostr/NostrSignSchnorr.d.ts.map +1 -1
- package/dist/api/polkadot/PolkadotGetAddress.d.ts +2 -1
- package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
- package/dist/api/polkadot/PolkadotSignTransaction.d.ts +1 -0
- package/dist/api/polkadot/PolkadotSignTransaction.d.ts.map +1 -1
- package/dist/api/polkadot/networks.d.ts +1 -1
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts +1 -1
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceReboot.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceUploadNft.d.ts +30 -0
- package/dist/api/protocol-v2/DeviceUploadNft.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +3 -3
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -1
- package/dist/api/protocol-v2/FilesystemFormat.d.ts +1 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +1 -0
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -1
- package/dist/api/protocol-v2/Ping.d.ts +3 -0
- package/dist/api/protocol-v2/Ping.d.ts.map +1 -1
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +1 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -1
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
- package/dist/api/solana/SolGetAddress.d.ts +1 -0
- package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
- package/dist/api/solana/SolSignMessage.d.ts +2 -1
- package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts +2 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignTransaction.d.ts +3 -2
- package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinGetAddress.d.ts +1 -0
- package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +1 -0
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinSignMessage.d.ts +1 -0
- package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts +1 -0
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +1 -0
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -1
- package/dist/api/stellar/StellarGetAddress.d.ts +1 -2
- package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts +2 -3
- package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
- package/dist/api/sui/SuiGetAddress.d.ts +2 -1
- package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
- package/dist/api/sui/SuiGetPublicKey.d.ts +2 -1
- package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
- package/dist/api/sui/SuiSignMessage.d.ts +2 -1
- package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
- package/dist/api/sui/SuiSignTransaction.d.ts +2 -1
- package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
- package/dist/api/ton/TonGetAddress.d.ts +2 -1
- package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
- package/dist/api/ton/TonSignData.d.ts +1 -0
- package/dist/api/ton/TonSignData.d.ts.map +1 -1
- package/dist/api/ton/TonSignMessage.d.ts +2 -1
- package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
- package/dist/api/ton/TonSignProof.d.ts +2 -1
- package/dist/api/ton/TonSignProof.d.ts.map +1 -1
- package/dist/api/tron/TronGetAddress.d.ts +1 -0
- package/dist/api/tron/TronGetAddress.d.ts.map +1 -1
- package/dist/api/tron/TronSignMessage.d.ts +6 -1
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts +2 -1
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
- package/dist/api/utils.d.ts +4 -1
- package/dist/api/utils.d.ts.map +1 -1
- package/dist/api/xrp/XrpGetAddress.d.ts +1 -0
- package/dist/api/xrp/XrpGetAddress.d.ts.map +1 -1
- package/dist/api/xrp/XrpSignTransaction.d.ts +1 -0
- package/dist/api/xrp/XrpSignTransaction.d.ts.map +1 -1
- package/dist/constants/index.d.ts +1 -1
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/core/RequestQueue.d.ts +0 -2
- package/dist/core/RequestQueue.d.ts.map +1 -1
- package/dist/core/deviceEventRegistration.d.ts +13 -0
- package/dist/core/deviceEventRegistration.d.ts.map +1 -0
- package/dist/core/index.d.ts +3 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/uiPromiseRegistry.d.ts +6 -0
- package/dist/core/uiPromiseRegistry.d.ts.map +1 -0
- package/dist/data-manager/DataManager.d.ts +11 -3
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/data-manager/TransportManager.d.ts.map +1 -1
- package/dist/data-manager/connectSettings.d.ts.map +1 -1
- package/dist/device/Device.d.ts +76 -16
- 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/DeviceConnector.d.ts +4 -3
- package/dist/device/DeviceConnector.d.ts.map +1 -1
- package/dist/device/DeviceFeaturesState.d.ts +3 -0
- package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
- package/dist/device/DevicePool.d.ts +6 -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 +13 -1
- package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -1
- 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/deviceProfile/protocolV2DeviceIdentity.d.ts +7 -0
- package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts.map +1 -0
- package/dist/events/call.d.ts +0 -7
- 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 +16 -2
- package/dist/events/device.d.ts.map +1 -1
- package/dist/events/iframe.d.ts +0 -1
- package/dist/events/iframe.d.ts.map +1 -1
- package/dist/events/logBlockEvent.d.ts +2 -0
- package/dist/events/logBlockEvent.d.ts.map +1 -1
- package/dist/events/ui-promise.d.ts +4 -2
- package/dist/events/ui-promise.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +50 -4
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/events/ui-response.d.ts +10 -2
- package/dist/events/ui-response.d.ts.map +1 -1
- package/dist/index.d.ts +1779 -835
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12334 -5037
- package/dist/inject.d.ts +7 -3
- package/dist/inject.d.ts.map +1 -1
- package/dist/lowLevelInject.d.ts +1 -2
- 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 +29 -17
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/index.d.ts +2 -2
- package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/resources.d.ts +12 -0
- package/dist/protocols/protocol-v2/resources.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +17 -0
- package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/uiInteraction.d.ts +42 -0
- package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/unlockPolicy.d.ts +2 -0
- package/dist/protocols/protocol-v2/unlockPolicy.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/unlockPolicyRunner.d.ts +22 -0
- package/dist/protocols/protocol-v2/unlockPolicyRunner.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/walletSession.d.ts +18 -4
- package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -1
- package/dist/topLevelInject.d.ts.map +1 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts +48 -9
- package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/checkBLEFirmwareRelease.d.ts +2 -13
- package/dist/types/api/checkBLEFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/checkBootloaderRelease.d.ts +2 -6
- package/dist/types/api/checkBootloaderRelease.d.ts.map +1 -1
- package/dist/types/api/checkFirmwareRelease.d.ts +2 -13
- package/dist/types/api/checkFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/checkFirmwareTypeAvailable.d.ts +2 -2
- package/dist/types/api/checkFirmwareTypeAvailable.d.ts.map +1 -1
- package/dist/types/api/detectDeviceConnectProtocol.d.ts +4 -0
- package/dist/types/api/detectDeviceConnectProtocol.d.ts.map +1 -0
- package/dist/types/api/deviceSettings.d.ts +11 -2
- package/dist/types/api/deviceSettings.d.ts.map +1 -1
- package/dist/types/api/deviceUnlock.d.ts +6 -2
- package/dist/types/api/deviceUnlock.d.ts.map +1 -1
- package/dist/types/api/deviceUpdateBootloader.d.ts +6 -0
- package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +8 -3
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +67 -5
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdateCapabilities.d.ts +9 -0
- package/dist/types/api/firmwareUpdateCapabilities.d.ts.map +1 -0
- package/dist/types/api/firmwareUpdatePlan.d.ts +28 -0
- package/dist/types/api/firmwareUpdatePlan.d.ts.map +1 -0
- package/dist/types/api/firmwareUpdatePreparedPlan.d.ts +42 -0
- package/dist/types/api/firmwareUpdatePreparedPlan.d.ts.map +1 -0
- 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.map +1 -1
- package/dist/types/api/index.d.ts +26 -36
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/kaspaSignTransaction.d.ts +42 -4
- package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
- package/dist/types/api/openWalletSession.d.ts +35 -0
- package/dist/types/api/openWalletSession.d.ts.map +1 -0
- package/dist/types/api/protocolV2.d.ts +11 -96
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/api/sessionCache.d.ts +4 -1
- package/dist/types/api/sessionCache.d.ts.map +1 -1
- package/dist/types/device.d.ts +142 -10
- 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 +59 -16
- 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 +14 -0
- package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -0
- package/dist/utils/deviceFeaturesUtils.d.ts +10 -1
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts +9 -9
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/deviceSettings.d.ts +38 -7
- package/dist/utils/deviceSettings.d.ts.map +1 -1
- package/dist/utils/deviceVersionUtils.d.ts +7 -5
- package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
- package/dist/utils/homescreen.d.ts +4 -0
- package/dist/utils/homescreen.d.ts.map +1 -1
- package/dist/utils/index.d.ts +5 -4
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/networkUtils.d.ts +10 -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/pro2Nft.d.ts +38 -0
- package/dist/utils/pro2Nft.d.ts.map +1 -0
- package/dist/utils/pro2Wallpaper.d.ts +10 -0
- package/dist/utils/pro2Wallpaper.d.ts.map +1 -1
- package/dist/utils/tracing.d.ts.map +1 -1
- package/dist/utils/uiProgressThrottle.d.ts +3 -0
- package/dist/utils/uiProgressThrottle.d.ts.map +1 -0
- package/package.json +6 -4
- package/src/api/BaseMethod.ts +38 -23
- package/src/api/CheckAllFirmwareRelease.ts +442 -4
- package/src/api/CheckBLEFirmwareRelease.ts +37 -5
- package/src/api/CheckBootloaderRelease.ts +37 -5
- package/src/api/CheckFirmwareRelease.ts +36 -9
- package/src/api/CipherKeyValue.ts +4 -0
- package/src/api/ClearSessionCache.ts +4 -0
- package/src/api/DetectDeviceConnectProtocol.ts +18 -0
- package/src/api/DirList.ts +9 -4
- package/src/api/DirMake.ts +7 -4
- package/src/api/DirRemove.ts +7 -4
- package/src/api/FileDelete.ts +7 -4
- package/src/api/FileRead.ts +13 -7
- package/src/api/FileWrite.ts +26 -189
- package/src/api/FirmwareUpdate.ts +30 -15
- package/src/api/FirmwareUpdateV2.ts +532 -169
- package/src/api/FirmwareUpdateV3.ts +343 -88
- package/src/api/FirmwareUpdateV4.ts +2331 -657
- package/src/api/GetDeviceState.ts +59 -0
- package/src/api/GetFeatures.ts +6 -4
- package/src/api/GetOnekeyFeatures.ts +1 -75
- package/src/api/GetPassphraseState.ts +36 -12
- package/src/api/OpenWalletSession.ts +268 -0
- package/src/api/PathInfo.ts +9 -4
- package/src/api/PromptWebDeviceAccess.ts +2 -7
- package/src/api/SearchDevices.ts +31 -4
- package/src/api/UploadPortfolio.ts +32 -4
- package/src/api/alephium/AlephiumGetAddress.ts +0 -4
- package/src/api/alephium/AlephiumSignMessage.ts +0 -4
- package/src/api/alephium/AlephiumSignTransaction.ts +2 -6
- package/src/api/algo/AlgoGetAddress.ts +4 -0
- package/src/api/algo/AlgoSignTransaction.ts +4 -0
- package/src/api/allnetwork/AllNetworkGetAddress.ts +21 -21
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +45 -32
- package/src/api/aptos/AptosGetAddress.ts +4 -0
- package/src/api/aptos/AptosGetPublicKey.ts +4 -0
- package/src/api/aptos/AptosSignInMessage.ts +4 -0
- package/src/api/aptos/AptosSignMessage.ts +4 -0
- package/src/api/aptos/AptosSignTransaction.ts +4 -0
- package/src/api/benfen/BenfenGetAddress.ts +11 -7
- package/src/api/benfen/BenfenGetPublicKey.ts +0 -4
- package/src/api/benfen/BenfenSignMessage.ts +0 -4
- package/src/api/benfen/BenfenSignTransaction.ts +0 -4
- package/src/api/btc/BTCGetAddress.ts +8 -1
- package/src/api/btc/BTCGetPublicKey.ts +9 -2
- package/src/api/btc/BTCSignMessage.ts +8 -1
- package/src/api/btc/BTCSignPsbt.ts +4 -0
- package/src/api/btc/BTCSignTransaction.ts +8 -1
- package/src/api/btc/BTCVerifyMessage.ts +8 -1
- package/src/api/btc/helpers/versionLimit.ts +7 -4
- package/src/api/cardano/CardanoGetAddress.ts +4 -0
- package/src/api/cardano/CardanoGetPublicKey.ts +4 -0
- package/src/api/cardano/CardanoSignMessage.ts +5 -1
- package/src/api/cardano/CardanoSignTransaction.ts +5 -1
- package/src/api/conflux/ConfluxGetAddress.ts +6 -0
- package/src/api/conflux/ConfluxSignMessage.ts +6 -0
- package/src/api/conflux/ConfluxSignMessageCIP23.ts +6 -0
- package/src/api/conflux/ConfluxSignTransaction.ts +8 -5
- package/src/api/cosmos/CosmosGetAddress.ts +4 -0
- package/src/api/cosmos/CosmosGetPublicKey.ts +4 -0
- package/src/api/cosmos/CosmosSignTransaction.ts +4 -0
- package/src/api/device/DeviceCancel.ts +5 -0
- package/src/api/device/DeviceChangePin.ts +28 -0
- package/src/api/device/DeviceFullyUploadResource.ts +4 -5
- package/src/api/device/DeviceLock.ts +5 -0
- package/src/api/device/DeviceRebootToBoardloader.ts +5 -0
- package/src/api/device/DeviceRebootToBootloader.ts +5 -0
- package/src/api/device/DeviceSettings.ts +195 -1
- package/src/api/device/DeviceSupportFeatures.ts +4 -0
- package/src/api/device/DeviceUnlock.ts +21 -3
- package/src/api/device/DeviceUpdateBootloader.ts +152 -8
- package/src/api/device/DeviceWipe.ts +25 -0
- package/src/api/device/PreInitialize.ts +4 -0
- package/src/api/dynex/DnxGetAddress.ts +0 -6
- package/src/api/dynex/DnxSignTransaction.ts +0 -6
- package/src/api/evm/EVMGetAddress.ts +6 -2
- package/src/api/evm/EVMGetPublicKey.ts +6 -2
- package/src/api/evm/EVMSignMessage.ts +6 -2
- package/src/api/evm/EVMSignMessageEIP712.ts +1 -11
- package/src/api/evm/EVMSignTransaction.ts +6 -2
- package/src/api/evm/EVMSignTypedData.ts +42 -50
- package/src/api/evm/EVMVerifyMessage.ts +6 -2
- 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/evm/protocol.ts +6 -0
- package/src/api/filecoin/FilecoinGetAddress.ts +4 -0
- package/src/api/filecoin/FilecoinSignTransaction.ts +4 -0
- package/src/api/firmware/FirmwareArtifactSource.ts +305 -0
- package/src/api/firmware/FirmwareHostBinding.ts +123 -0
- package/src/api/firmware/FirmwareMemoryHost.ts +143 -0
- package/src/api/firmware/FirmwarePreparationError.ts +12 -0
- package/src/api/firmware/FirmwarePreparedResourceArchive.ts +187 -0
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +214 -77
- package/src/api/firmware/FirmwareUpdateCapabilities.ts +9 -0
- package/src/api/firmware/FirmwareUpdatePlan.ts +946 -0
- package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +486 -0
- package/src/api/firmware/getBinary.ts +8 -3
- package/src/api/firmware/protocolV2Release.ts +168 -0
- package/src/api/firmware/updateBootloader.ts +19 -4
- package/src/api/firmware/uploadFirmware.ts +157 -26
- package/src/api/helpers/base64Data.ts +85 -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 +392 -0
- package/src/api/index.ts +7 -31
- package/src/api/kaspa/KaspaGetAddress.ts +7 -0
- package/src/api/kaspa/KaspaSignTransaction.ts +369 -29
- package/src/api/kaspa/helpers/TransferSerialize.ts +17 -7
- package/src/api/lightning/LnurlAuth.ts +0 -4
- package/src/api/near/NearGetAddress.ts +4 -0
- package/src/api/near/NearSignTransaction.ts +4 -0
- package/src/api/nem/NEMGetAddress.ts +4 -0
- package/src/api/nem/NEMSignTransaction.ts +4 -0
- package/src/api/neo/NeoGetAddress.ts +0 -4
- package/src/api/neo/NeoSignTransaction.ts +0 -4
- package/src/api/nervos/NervosGetAddress.ts +0 -4
- package/src/api/nervos/NervosSignTransaction.ts +2 -6
- package/src/api/nexa/NexaGetAddress.ts +0 -4
- package/src/api/nexa/NexaSignTransaction.ts +3 -5
- package/src/api/nostr/NostrDecryptMessage.ts +4 -0
- package/src/api/nostr/NostrEncryptMessage.ts +4 -0
- package/src/api/nostr/NostrGetPublicKey.ts +4 -0
- package/src/api/nostr/NostrSignEvent.ts +4 -0
- package/src/api/nostr/NostrSignSchnorr.ts +4 -0
- package/src/api/polkadot/PolkadotGetAddress.ts +4 -0
- package/src/api/polkadot/PolkadotSignTransaction.ts +4 -0
- package/src/api/polkadot/networks.ts +3 -3
- package/src/api/protocol-v2/DeviceFactoryInfoGet.ts +5 -2
- package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +5 -2
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +8 -5
- package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +10 -6
- package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +21 -0
- package/src/api/protocol-v2/DeviceInfoGet.ts +8 -15
- package/src/api/protocol-v2/DeviceReboot.ts +7 -3
- package/src/api/protocol-v2/DeviceStatusGet.ts +6 -1
- package/src/api/protocol-v2/DeviceUploadNft.ts +245 -0
- package/src/api/protocol-v2/DeviceUploadWallpaper.ts +66 -73
- package/src/api/protocol-v2/FilesystemFormat.ts +5 -2
- package/src/api/protocol-v2/FilesystemPermissionFix.ts +5 -2
- package/src/api/protocol-v2/Ping.ts +37 -3
- package/src/api/protocol-v2/ProtocolInfoRequest.ts +8 -3
- package/src/api/protocol-v2/helpers.ts +1 -4
- package/src/api/scdo/ScdoGetAddress.ts +0 -4
- package/src/api/scdo/ScdoSignMessage.ts +0 -4
- package/src/api/scdo/ScdoSignTransaction.ts +0 -4
- package/src/api/solana/SolGetAddress.ts +4 -0
- package/src/api/solana/SolSignMessage.ts +5 -1
- package/src/api/solana/SolSignOffchainMessage.ts +5 -1
- package/src/api/solana/SolSignTransaction.ts +6 -2
- package/src/api/starcoin/StarcoinGetAddress.ts +4 -0
- package/src/api/starcoin/StarcoinGetPublicKey.ts +4 -0
- package/src/api/starcoin/StarcoinSignMessage.ts +4 -0
- package/src/api/starcoin/StarcoinSignTransaction.ts +4 -0
- package/src/api/starcoin/StarcoinVerifyMessage.ts +4 -0
- package/src/api/stellar/StellarGetAddress.ts +1 -10
- package/src/api/stellar/StellarSignTransaction.ts +1 -14
- package/src/api/sui/SuiGetAddress.ts +5 -1
- package/src/api/sui/SuiGetPublicKey.ts +5 -1
- package/src/api/sui/SuiSignMessage.ts +5 -1
- package/src/api/sui/SuiSignTransaction.ts +5 -1
- package/src/api/ton/TonGetAddress.ts +5 -1
- package/src/api/ton/TonSignData.ts +5 -1
- package/src/api/ton/TonSignMessage.ts +10 -4
- package/src/api/ton/TonSignProof.ts +5 -1
- package/src/api/tron/TronGetAddress.ts +4 -0
- package/src/api/tron/TronSignMessage.ts +19 -8
- package/src/api/tron/TronSignTransaction.ts +5 -1
- package/src/api/utils.ts +32 -3
- package/src/api/xrp/XrpGetAddress.ts +4 -0
- package/src/api/xrp/XrpSignTransaction.ts +5 -1
- package/src/constants/index.ts +1 -4
- package/src/core/RequestQueue.ts +0 -18
- package/src/core/deviceEventRegistration.ts +27 -0
- package/src/core/index.ts +387 -163
- package/src/core/uiPromiseRegistry.ts +63 -0
- package/src/data/messages/messages-protocol-v2.json +1030 -567
- package/src/data/messages/messages.json +286 -9
- package/src/data-manager/DataManager.ts +154 -43
- package/src/data-manager/TransportManager.ts +7 -1
- package/src/data-manager/connectSettings.ts +11 -0
- package/src/device/Device.ts +880 -278
- package/src/device/DeviceCommands.ts +177 -158
- package/src/device/DeviceConnector.ts +44 -21
- package/src/device/DeviceFeaturesState.ts +25 -0
- package/src/device/DevicePool.ts +105 -23
- package/src/device/DeviceStateMapper.ts +416 -0
- package/src/device/DeviceStateProjector.ts +152 -0
- package/src/device/DeviceStateStore.ts +232 -0
- package/src/device/DeviceWalletSessionStore.ts +72 -6
- package/src/device/cloneDeviceState.ts +39 -0
- package/src/device/deviceIdentity.ts +18 -0
- package/src/deviceProfile/buildDeviceFeatures.ts +223 -189
- package/src/deviceProfile/index.ts +0 -1
- package/src/deviceProfile/protocolV2DeviceIdentity.ts +35 -0
- package/src/events/call.ts +0 -6
- package/src/events/core.ts +0 -2
- package/src/events/device.ts +22 -1
- package/src/events/iframe.ts +0 -1
- package/src/events/logBlockEvent.ts +93 -2
- package/src/events/ui-promise.ts +4 -2
- package/src/events/ui-request.ts +61 -4
- package/src/events/ui-response.ts +12 -2
- package/src/index.ts +17 -4
- package/src/inject.ts +91 -57
- package/src/lowLevelInject.ts +11 -7
- package/src/protocols/protocol-v2/deviceSession.ts +24 -0
- package/src/protocols/protocol-v2/features.ts +117 -33
- package/src/protocols/protocol-v2/firmware.ts +3 -1
- package/src/protocols/protocol-v2/index.ts +9 -1
- package/src/protocols/protocol-v2/resources.ts +210 -0
- package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +65 -0
- package/src/protocols/protocol-v2/uiInteraction.ts +250 -0
- package/src/protocols/protocol-v2/unlockPolicy.ts +1 -0
- package/src/protocols/protocol-v2/unlockPolicyRunner.ts +131 -0
- package/src/protocols/protocol-v2/walletSession.ts +420 -49
- package/src/topLevelInject.ts +11 -6
- package/src/types/api/checkAllFirmwareRelease.ts +72 -9
- package/src/types/api/checkBLEFirmwareRelease.ts +4 -13
- package/src/types/api/checkBootloaderRelease.ts +2 -6
- package/src/types/api/checkFirmwareRelease.ts +2 -13
- package/src/types/api/checkFirmwareTypeAvailable.ts +2 -2
- package/src/types/api/detectDeviceConnectProtocol.ts +6 -0
- package/src/types/api/deviceSettings.ts +26 -2
- package/src/types/api/deviceUnlock.ts +13 -2
- package/src/types/api/deviceUpdateBootloader.ts +7 -0
- package/src/types/api/export.ts +33 -1
- package/src/types/api/firmwareUpdate.ts +85 -11
- package/src/types/api/firmwareUpdateCapabilities.ts +9 -0
- package/src/types/api/firmwareUpdatePlan.ts +38 -0
- package/src/types/api/firmwareUpdatePreparedPlan.ts +53 -0
- 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 +7 -0
- package/src/types/api/index.ts +45 -75
- package/src/types/api/kaspaSignTransaction.ts +60 -4
- package/src/types/api/openWalletSession.ts +54 -0
- package/src/types/api/protocolV2.ts +24 -189
- package/src/types/api/sessionCache.ts +9 -4
- package/src/types/device.ts +217 -10
- package/src/types/params.ts +9 -2
- package/src/types/settings.ts +67 -25
- package/src/utils/assets.ts +4 -1
- package/src/utils/deviceFeaturesCompat.ts +191 -0
- package/src/utils/deviceFeaturesUtils.ts +42 -9
- package/src/utils/deviceInfoUtils.ts +29 -69
- package/src/utils/deviceSettings.ts +174 -39
- package/src/utils/deviceVersionUtils.ts +25 -44
- package/src/utils/findDefectiveBatchDevice.ts +3 -3
- package/src/utils/homescreen.ts +40 -0
- package/src/utils/index.ts +25 -7
- package/src/utils/networkUtils.ts +274 -16
- package/src/utils/pro2Nft.ts +165 -0
- package/src/utils/pro2Wallpaper.ts +44 -25
- package/src/utils/tracing.ts +3 -1
- package/src/utils/uiProgressThrottle.ts +63 -0
- package/tsconfig.type-tests.json +12 -0
- package/__tests__/RequestQueue.test.ts +0 -34
- package/dist/api/GetDeviceInfo.d.ts +0 -9
- package/dist/api/GetDeviceInfo.d.ts.map +0 -1
- package/dist/api/firmware/progressThrottle.d.ts +0 -3
- package/dist/api/firmware/progressThrottle.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceSessionGet.d.ts +0 -6
- package/dist/api/protocol-v2/DeviceSessionGet.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceSettingsGet.d.ts +0 -6
- package/dist/api/protocol-v2/DeviceSettingsGet.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts +0 -16
- package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceSettingsSet.d.ts +0 -12
- package/dist/api/protocol-v2/DeviceSettingsSet.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/deviceProfile/buildDeviceProfile.d.ts +0 -21
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/unlockRetry.d.ts +0 -9
- package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +0 -1
- package/dist/types/api/getDeviceInfo.d.ts +0 -87
- package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
- package/src/api/GetDeviceInfo.ts +0 -145
- package/src/api/firmware/progressThrottle.ts +0 -44
- package/src/api/protocol-v2/DeviceSessionGet.ts +0 -15
- package/src/api/protocol-v2/DeviceSettingsGet.ts +0 -16
- package/src/api/protocol-v2/DeviceSettingsPageShow.ts +0 -59
- package/src/api/protocol-v2/DeviceSettingsSet.ts +0 -39
- package/src/api/protocol-v2/FilesystemDiskControl.ts +0 -50
- package/src/deviceProfile/buildDeviceProfile.ts +0 -352
- package/src/protocols/protocol-v2/unlockRetry.ts +0 -46
- package/src/types/api/getDeviceInfo.ts +0 -101
package/dist/index.d.ts
CHANGED
|
@@ -1,25 +1,71 @@
|
|
|
1
1
|
import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
|
|
2
|
-
import
|
|
2
|
+
import * as _onekeyfe_hd_transport from '@onekeyfe/hd-transport';
|
|
3
|
+
import { DeviceRebootType, Messages, Transport, TransportCallOptions, OneKeyDeviceCommType, ProtocolInfo, ProtocolV2DeviceInfo, DeviceStatus as DeviceStatus$1, Enum_SafetyCheckLevel, OneKeyDeviceInfo, Success as Success$1, DeviceSessionPinType, LowlevelTransportSharedPlugin, OnboardingStatus, RecoveryDeviceType, ResourceType, NextU2FCounter, SetU2FCounter, CipheredKeyValue as CipheredKeyValue$1, UintType, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, SignedPsbt, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, SolanaTxExtraInfo, SolanaOffChainMessageVersion, SolanaOffChainMessageFormat, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, TronResourceCode, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, SuiMessageSignature, CardanoAddressParametersType, CardanoMessageSignature, FilecoinAddress as FilecoinAddress$1, FilecoinSignedTx as FilecoinSignedTx$1, PolkadotAddress as PolkadotAddress$1, PolkadotSignedTx as PolkadotSignedTx$1, KaspaAddress as KaspaAddress$1, NervosAddress as NervosAddress$1, NervosSignedTx as NervosSignedTx$1, DnxAddress as DnxAddress$1, TonWalletVersion, TonWorkChain, TonSignedMessage, TonSignedProof, TonSignDataType, TonSignedData, ScdoAddress as ScdoAddress$1, ScdoSignedMessage, ScdoSignedTx as ScdoSignedTx$1, AlephiumMessageSignature, AlephiumSignedTx as AlephiumSignedTx$1, BenfenAddress as BenfenAddress$1, BenfenMessageSignature, SafetyCheckLevel, ChangeOutputScriptType, ProtocolType } from '@onekeyfe/hd-transport';
|
|
3
4
|
export { Success as DeviceSuccess, HDNodeType, Messages as PROTO, ResourceType, TonSignDataType, TonWalletVersion } from '@onekeyfe/hd-transport';
|
|
4
5
|
import * as _onekeyfe_hd_shared from '@onekeyfe/hd-shared';
|
|
5
|
-
import { HardwareConnectProtocol,
|
|
6
|
+
import { HardwareConnectProtocol, EFirmwareType, EDeviceType, Deferred } from '@onekeyfe/hd-shared';
|
|
6
7
|
|
|
7
8
|
interface CommonParams {
|
|
8
9
|
keepSession?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* polling connect max retry count
|
|
12
|
+
*/
|
|
9
13
|
retryCount?: number;
|
|
14
|
+
/**
|
|
15
|
+
* polling interval time
|
|
16
|
+
*/
|
|
10
17
|
pollIntervalTime?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Timeout time for single polling
|
|
20
|
+
*/
|
|
11
21
|
timeout?: number;
|
|
22
|
+
/**
|
|
23
|
+
* DeviceInfoGet timeout during Protocol V2 initialization.
|
|
24
|
+
*/
|
|
12
25
|
protocolV2DeviceInfoTimeoutMs?: number;
|
|
26
|
+
/**
|
|
27
|
+
* passphrase state
|
|
28
|
+
*/
|
|
13
29
|
passphraseState?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Use empty passphrase
|
|
32
|
+
*/
|
|
14
33
|
useEmptyPassphrase?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Every init session
|
|
36
|
+
*/
|
|
15
37
|
initSession?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Use derive cardano
|
|
40
|
+
*/
|
|
16
41
|
deriveCardano?: boolean;
|
|
17
42
|
detectBootloaderDevice?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Skip web device prompt
|
|
45
|
+
*/
|
|
18
46
|
skipWebDevicePrompt?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Skip passphrase check
|
|
49
|
+
*/
|
|
19
50
|
skipPassphraseCheck?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Only connect device, not initialize device, only ble connect
|
|
53
|
+
*/
|
|
20
54
|
onlyConnectBleDevice?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Use pre-initialized device state (BLE only)
|
|
57
|
+
*/
|
|
21
58
|
usePreInitialize?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Strictly expected transport protocol. The SDK actively verifies this value and
|
|
61
|
+
* rejects a mismatch. After a successful probe, the cached protocol is also strict.
|
|
62
|
+
*/
|
|
22
63
|
connectProtocol?: HardwareConnectProtocol;
|
|
64
|
+
/**
|
|
65
|
+
* Ignore a previously bound protocol for this call and actively detect the
|
|
66
|
+
* protocol again. Intended for the first verified connection or explicit recovery.
|
|
67
|
+
*/
|
|
68
|
+
forceProtocolDetection?: boolean;
|
|
23
69
|
}
|
|
24
70
|
type Params<T> = CommonParams & T & {
|
|
25
71
|
bundle?: undefined;
|
|
@@ -44,34 +90,6 @@ type DeviceRebootParams = {
|
|
|
44
90
|
rebootType?: RebootTypeInput;
|
|
45
91
|
reboot_type?: RebootTypeInput;
|
|
46
92
|
};
|
|
47
|
-
type DeviceFirmwareTargetInput = DeviceFirmwareTarget | {
|
|
48
|
-
targetId?: DeviceFirmwareTargetType | string | number;
|
|
49
|
-
target_id?: DeviceFirmwareTargetType | string | number;
|
|
50
|
-
path: string;
|
|
51
|
-
};
|
|
52
|
-
type DeviceFirmwareUpdateParams = {
|
|
53
|
-
targets?: DeviceFirmwareTargetInput[];
|
|
54
|
-
targetId?: DeviceFirmwareTargetType | string | number;
|
|
55
|
-
target_id?: DeviceFirmwareTargetType | string | number;
|
|
56
|
-
path?: string;
|
|
57
|
-
};
|
|
58
|
-
type DeviceFirmwareUpdateStatusGetParams = {
|
|
59
|
-
fields?: DeviceFirmwareUpdateRecordFields;
|
|
60
|
-
};
|
|
61
|
-
type DeviceFactoryInfoSetParams = {
|
|
62
|
-
version?: number;
|
|
63
|
-
serial_number?: string;
|
|
64
|
-
burn_in_completed?: boolean;
|
|
65
|
-
factory_test_completed?: boolean;
|
|
66
|
-
manufacture_time?: {
|
|
67
|
-
year: number;
|
|
68
|
-
month: number;
|
|
69
|
-
day: number;
|
|
70
|
-
hour: number;
|
|
71
|
-
minute: number;
|
|
72
|
-
second: number;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
93
|
|
|
76
94
|
type PassphrasePromptResponse = {
|
|
77
95
|
passphrase?: string;
|
|
@@ -89,15 +107,19 @@ type TypedCallResponseMap = {
|
|
|
89
107
|
[K in MessageKey]: TypedResponseMessage<K>;
|
|
90
108
|
};
|
|
91
109
|
type DefaultMessageResponse = TypedCallResponseMap[MessageKey];
|
|
110
|
+
/**
|
|
111
|
+
* The life cycle begins with the acquisition of the device and ends with the disposal device commands
|
|
112
|
+
* acquire device -> create DeviceCommands -> release device -> dispose DeviceCommands
|
|
113
|
+
*/
|
|
92
114
|
declare class DeviceCommands {
|
|
93
115
|
instanceId: string;
|
|
94
116
|
currentResponseID?: number;
|
|
95
|
-
device: Device
|
|
117
|
+
device: Device;
|
|
96
118
|
transport: Transport;
|
|
97
119
|
mainId: string;
|
|
98
120
|
disposed: boolean;
|
|
99
121
|
callPromise?: Promise<DefaultMessageResponse>;
|
|
100
|
-
constructor(device: Device
|
|
122
|
+
constructor(device: Device, mainId: string);
|
|
101
123
|
dispose(_cancelRequest: boolean): Promise<void>;
|
|
102
124
|
checkDisposed(): void;
|
|
103
125
|
cancelDeviceOnOneKeyDevice(): Promise<{
|
|
@@ -114,7 +136,7 @@ declare class DeviceCommands {
|
|
|
114
136
|
};
|
|
115
137
|
} | {
|
|
116
138
|
success: boolean;
|
|
117
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 |
|
|
139
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 830 | 831 | 832 | 900 | 901 | 902;
|
|
118
140
|
payload: {
|
|
119
141
|
message: string;
|
|
120
142
|
};
|
|
@@ -133,7 +155,7 @@ declare class DeviceCommands {
|
|
|
133
155
|
};
|
|
134
156
|
} | {
|
|
135
157
|
success: boolean;
|
|
136
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 |
|
|
158
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 830 | 831 | 832 | 900 | 901 | 902;
|
|
137
159
|
payload: {
|
|
138
160
|
message: string;
|
|
139
161
|
};
|
|
@@ -145,415 +167,174 @@ declare class DeviceCommands {
|
|
|
145
167
|
_commonCall(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
146
168
|
_filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey, options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
147
169
|
_promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
|
|
148
|
-
|
|
170
|
+
promptPassphrase(options: PassphraseRequestPayload, promptOptions?: {
|
|
171
|
+
cancelDeviceOnReject?: boolean;
|
|
172
|
+
}): Promise<PassphrasePromptResponse>;
|
|
149
173
|
}
|
|
150
174
|
|
|
151
|
-
type
|
|
152
|
-
didUpdate: boolean;
|
|
153
|
-
connected: OneKeyDeviceInfo[];
|
|
154
|
-
disconnected: OneKeyDeviceInfo[];
|
|
155
|
-
changedSessions: OneKeyDeviceInfo[];
|
|
156
|
-
changedDebugSessions: OneKeyDeviceInfo[];
|
|
157
|
-
acquired: OneKeyDeviceInfo[];
|
|
158
|
-
debugAcquired: OneKeyDeviceInfo[];
|
|
159
|
-
released: OneKeyDeviceInfo[];
|
|
160
|
-
debugReleased: OneKeyDeviceInfo[];
|
|
161
|
-
descriptors: OneKeyDeviceInfo[];
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
declare class DeviceConnector {
|
|
165
|
-
transport: Transport;
|
|
166
|
-
listenTimestamp: number;
|
|
167
|
-
current: OneKeyDeviceInfo[] | null;
|
|
168
|
-
upcoming: OneKeyDeviceInfo[];
|
|
169
|
-
listening: boolean;
|
|
170
|
-
constructor();
|
|
171
|
-
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
172
|
-
listen(): Promise<void>;
|
|
173
|
-
stop(): void;
|
|
174
|
-
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
175
|
-
release(session: string, onclose: boolean): Promise<void>;
|
|
176
|
-
disconnect(session: string | undefined | null): Promise<void>;
|
|
177
|
-
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
178
|
-
_reportDevicesChange(): void;
|
|
179
|
-
}
|
|
175
|
+
type ProtocolV2RuntimeMode = 'normal' | 'bootloader' | 'romloader';
|
|
180
176
|
|
|
181
|
-
type
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
177
|
+
type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
|
|
178
|
+
type ConnectSettings = {
|
|
179
|
+
connectSrc?: string;
|
|
180
|
+
debug?: boolean;
|
|
181
|
+
transportReconnect?: boolean;
|
|
182
|
+
lazyLoad?: boolean;
|
|
183
|
+
origin?: string;
|
|
184
|
+
parentOrigin?: string;
|
|
185
|
+
configSrc: string;
|
|
186
|
+
iframeSrc: string;
|
|
187
|
+
version: string;
|
|
188
|
+
priority: number;
|
|
189
|
+
trustedHost: boolean;
|
|
190
|
+
supportedBrowser?: boolean;
|
|
191
|
+
env: transportEnv;
|
|
192
|
+
timestamp: number;
|
|
193
|
+
isFrame?: boolean;
|
|
194
|
+
preRelease?: boolean;
|
|
195
|
+
firmwareManifestMode?: 'sdk-managed' | 'external-only';
|
|
196
|
+
preloadedConfig?: RemoteConfigResponse;
|
|
197
|
+
fetchConfig?: boolean;
|
|
198
|
+
extension?: string;
|
|
199
|
+
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
188
200
|
};
|
|
189
|
-
type
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
(response: PassphrasePromptResponse, error?: Error) => void
|
|
202
|
-
];
|
|
203
|
-
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
204
|
-
Device$1,
|
|
205
|
-
(err: any, deviceId: string) => void
|
|
206
|
-
];
|
|
207
|
-
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
208
|
-
Device$1,
|
|
209
|
-
(err: any, deviceId: string) => void
|
|
210
|
-
];
|
|
211
|
-
}
|
|
212
|
-
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
213
|
-
interface Device$1 {
|
|
214
|
-
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
215
|
-
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
216
|
-
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
217
|
-
}
|
|
218
|
-
declare class Device$1 extends EventEmitter {
|
|
219
|
-
originalDescriptor: OneKeyDeviceInfo;
|
|
220
|
-
sdkInstanceId?: string;
|
|
221
|
-
instanceId: string;
|
|
222
|
-
createdAt: number;
|
|
223
|
-
mainId?: string | null;
|
|
224
|
-
deviceConnector?: DeviceConnector | null;
|
|
225
|
-
commands: DeviceCommands;
|
|
226
|
-
private cancelableAction?;
|
|
227
|
-
private deviceAcquired;
|
|
228
|
-
features: Features | undefined;
|
|
229
|
-
featuresNeedsReload: boolean;
|
|
230
|
-
runPromise?: Deferred<void> | null;
|
|
231
|
-
externalState: string[];
|
|
232
|
-
unavailableCapabilities: UnavailableCapabilities;
|
|
233
|
-
instance: number;
|
|
234
|
-
internalState: string[];
|
|
235
|
-
needReloadDevice: boolean;
|
|
236
|
-
keepSession: boolean;
|
|
237
|
-
passphraseState: string | undefined;
|
|
238
|
-
pendingCallbackPromise?: Deferred<void>;
|
|
239
|
-
private preInitializedAt?;
|
|
240
|
-
private preInitializeMeta?;
|
|
241
|
-
private lastInitializeDurationMs?;
|
|
242
|
-
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
243
|
-
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device$1;
|
|
244
|
-
toMessageObject(): Device | null;
|
|
245
|
-
connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
|
|
246
|
-
acquire(connectProtocol?: HardwareConnectProtocol, options?: {
|
|
247
|
-
throwOnRunPromiseError?: boolean;
|
|
248
|
-
}): Promise<void>;
|
|
249
|
-
release(): Promise<void>;
|
|
250
|
-
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
251
|
-
markPreInitialized(meta?: {
|
|
252
|
-
passphraseState?: string;
|
|
253
|
-
}): void;
|
|
254
|
-
clearPreInitialized(): void;
|
|
255
|
-
isPreInitializeMetaMatch(payload?: {
|
|
256
|
-
passphraseState?: string;
|
|
257
|
-
}): boolean;
|
|
258
|
-
isPreInitializedValid(ttlMs: number): boolean;
|
|
259
|
-
setLastInitializeDuration(durationMs: number): void;
|
|
260
|
-
getLastInitializeDuration(): number | undefined;
|
|
261
|
-
getCommands(): DeviceCommands;
|
|
262
|
-
getProtocol(): 'V1' | 'V2';
|
|
263
|
-
isProtocolV2(): boolean;
|
|
264
|
-
getCurrentDeviceType(): IDeviceType;
|
|
265
|
-
getCurrentDeviceId(): string | undefined;
|
|
266
|
-
getCurrentSerialNo(): string;
|
|
267
|
-
getConnectId(): string;
|
|
268
|
-
getCurrentBleName(): string | null;
|
|
269
|
-
getCurrentLabel(): string | null;
|
|
270
|
-
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
271
|
-
getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
|
|
272
|
-
getCurrentFirmwareVersionString(): string;
|
|
273
|
-
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
274
|
-
getCurrentSafetyChecks(): string | null | undefined;
|
|
275
|
-
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
276
|
-
supportNewPassphrase(): SupportFeatureType;
|
|
277
|
-
supportInputPinOnSoftware(): SupportFeatureType;
|
|
278
|
-
supportModifyHomescreen(): SupportFeatureType;
|
|
279
|
-
private getSessionCacheDeviceKey;
|
|
280
|
-
getInternalState(_deviceId?: string): string | undefined;
|
|
281
|
-
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
282
|
-
private setInternalState;
|
|
283
|
-
clearInternalState(_deviceId?: string): void;
|
|
284
|
-
initialize(options?: InitOptions): Promise<void>;
|
|
285
|
-
private _initializeProtocolV2;
|
|
286
|
-
private _refreshProtocolV2Status;
|
|
287
|
-
getFeatures(): Promise<Features | undefined>;
|
|
288
|
-
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
289
|
-
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo): Features;
|
|
290
|
-
updateProtocolV2Status(status: DeviceStatus$1): Features;
|
|
291
|
-
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
292
|
-
updateFromCache(device: Device$1): void;
|
|
293
|
-
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
294
|
-
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
|
|
295
|
-
interruptionFromOutside(): Promise<void>;
|
|
296
|
-
interruptionFromUser(): Promise<void>;
|
|
297
|
-
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
298
|
-
clearCancelableAction(): void;
|
|
299
|
-
getMode(): EOneKeyDeviceMode;
|
|
300
|
-
getFirmwareVersion(): IVersionArray | null;
|
|
301
|
-
getBLEFirmwareVersion(): IVersionArray | null;
|
|
302
|
-
isUsed(): boolean;
|
|
303
|
-
hasDeviceAcquire(): boolean;
|
|
304
|
-
isUsedHere(): boolean;
|
|
305
|
-
isUsedElsewhere(): boolean;
|
|
306
|
-
isBootloader(): boolean | undefined;
|
|
307
|
-
isInitialized(): boolean | undefined;
|
|
308
|
-
isSeedless(): boolean | undefined;
|
|
309
|
-
isUnacquired(): boolean;
|
|
310
|
-
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
311
|
-
hasUsePassphrase(): boolean;
|
|
312
|
-
checkDeviceId(deviceId: string): boolean;
|
|
313
|
-
lockDevice(): Promise<Success$1>;
|
|
314
|
-
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
315
|
-
unlockDevice(): Promise<Features | undefined>;
|
|
316
|
-
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
declare function generateSdkInstanceId(): string;
|
|
320
|
-
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
321
|
-
interface RequestContext {
|
|
322
|
-
responseID: number;
|
|
323
|
-
sdkInstanceId?: string;
|
|
324
|
-
methodName: string;
|
|
325
|
-
connectId?: string;
|
|
326
|
-
deviceInstanceId?: string;
|
|
327
|
-
commandsInstanceId?: string;
|
|
328
|
-
parentResponseID?: number;
|
|
329
|
-
startTime: number;
|
|
330
|
-
endTime?: number;
|
|
331
|
-
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
332
|
-
error?: string;
|
|
333
|
-
}
|
|
334
|
-
interface SdkTracingContext {
|
|
335
|
-
sdkInstanceId: string;
|
|
336
|
-
createdAt: number;
|
|
337
|
-
activeRequests: Map<number, RequestContext>;
|
|
338
|
-
}
|
|
339
|
-
declare function createSdkTracingContext(): SdkTracingContext;
|
|
340
|
-
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
341
|
-
sdkInstanceId?: string;
|
|
342
|
-
connectId?: string;
|
|
343
|
-
deviceInstanceId?: string;
|
|
344
|
-
commandsInstanceId?: string;
|
|
345
|
-
parentResponseID?: number;
|
|
346
|
-
}): RequestContext;
|
|
347
|
-
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
348
|
-
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
349
|
-
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
350
|
-
declare function formatRequestContext(context: RequestContext): string;
|
|
351
|
-
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
352
|
-
|
|
353
|
-
declare class Core extends EventEmitter {
|
|
354
|
-
private tracingContext;
|
|
355
|
-
readonly sdkInstanceId: string;
|
|
356
|
-
private requestQueue;
|
|
357
|
-
private prePendingCallPromise;
|
|
358
|
-
private methodSynchronize;
|
|
359
|
-
constructor();
|
|
360
|
-
cancelOperation(operationId: string): void;
|
|
361
|
-
private getCoreContext;
|
|
362
|
-
handleMessage(message: CoreMessage): Promise<any>;
|
|
363
|
-
dispose(): void;
|
|
364
|
-
}
|
|
365
|
-
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
366
|
-
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
367
|
-
env: ConnectSettings['env'];
|
|
368
|
-
Transport: any;
|
|
369
|
-
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
370
|
-
}) => void;
|
|
371
|
-
|
|
372
|
-
type DeviceInfoGetTargets = {
|
|
373
|
-
hw?: boolean;
|
|
374
|
-
fw?: boolean;
|
|
375
|
-
coprocessor?: boolean;
|
|
376
|
-
se1?: boolean;
|
|
377
|
-
se2?: boolean;
|
|
378
|
-
se3?: boolean;
|
|
379
|
-
se4?: boolean;
|
|
380
|
-
status?: boolean;
|
|
201
|
+
type IVersionArray = [number, number, number];
|
|
202
|
+
type ILocale = 'zh-CN' | 'en-US';
|
|
203
|
+
type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04';
|
|
204
|
+
type IProtocolV2FirmwareComponent = {
|
|
205
|
+
target: IProtocolV2FirmwareComponentTarget;
|
|
206
|
+
url: string;
|
|
207
|
+
/** SHA-256 of the complete okpkg, used after downloading the package. */
|
|
208
|
+
fingerprint?: string;
|
|
209
|
+
/** OKPP payload hash, used to detect same-version package changes. */
|
|
210
|
+
payloadHash?: string;
|
|
211
|
+
expectedSize?: number;
|
|
212
|
+
version?: IVersionArray;
|
|
381
213
|
};
|
|
382
|
-
type
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
specific?: boolean;
|
|
214
|
+
type IProtocolV2ResourceSource = {
|
|
215
|
+
archiveUrl: string;
|
|
216
|
+
archiveSha256: string;
|
|
217
|
+
archiveSize: number;
|
|
387
218
|
};
|
|
388
|
-
type
|
|
389
|
-
|
|
390
|
-
types?: DeviceInfoGetTypes;
|
|
219
|
+
type IProtocolV2Resources = {
|
|
220
|
+
source: IProtocolV2ResourceSource;
|
|
391
221
|
};
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
222
|
+
type IProtocolV2ResourceManifestFile = {
|
|
223
|
+
archive_path: string;
|
|
224
|
+
original_name: string;
|
|
225
|
+
device_path: string;
|
|
226
|
+
size: number;
|
|
227
|
+
sha256: string;
|
|
228
|
+
signed: true;
|
|
229
|
+
sig_algo: 'ed25519' | 'mldsa65';
|
|
230
|
+
payload_version: string | null;
|
|
231
|
+
};
|
|
232
|
+
type IProtocolV2ResourceManifest = {
|
|
233
|
+
schema: 1;
|
|
234
|
+
artifact_name: string;
|
|
235
|
+
release_name: string;
|
|
236
|
+
variant: 'resource';
|
|
237
|
+
commit: string;
|
|
238
|
+
short_sha: string;
|
|
239
|
+
timestamp_utc: string;
|
|
240
|
+
core_version: string;
|
|
241
|
+
key_set: string;
|
|
242
|
+
device_root: 'vol0:';
|
|
243
|
+
restore_mode: 'bootloader_update';
|
|
244
|
+
trees: Array<{
|
|
245
|
+
path: string;
|
|
246
|
+
device: string;
|
|
247
|
+
}>;
|
|
248
|
+
files: IProtocolV2ResourceManifestFile[];
|
|
395
249
|
};
|
|
396
|
-
|
|
397
|
-
type
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
250
|
+
/** STM32 firmware config */
|
|
251
|
+
type IFirmwareReleaseInfo = {
|
|
252
|
+
required: boolean;
|
|
253
|
+
url: string;
|
|
254
|
+
/**
|
|
255
|
+
* Firmware type (bitcoinonly or universal)
|
|
256
|
+
* This field is not present in the remote config, but will be inferred from the firmware field name
|
|
257
|
+
*/
|
|
258
|
+
firmwareType?: EFirmwareType;
|
|
259
|
+
/** Firmware UI resource */
|
|
260
|
+
resource?: string;
|
|
261
|
+
resourceFingerprint?: string;
|
|
262
|
+
resourceExpectedSize?: number;
|
|
263
|
+
/** Firmware full UI resource */
|
|
264
|
+
fullResource?: string;
|
|
265
|
+
fullResourceFingerprint?: string;
|
|
266
|
+
fullResourceExpectedSize?: number;
|
|
267
|
+
fullResourceRange?: string[];
|
|
268
|
+
bootloaderResource?: string;
|
|
269
|
+
bootloaderFingerprint?: string;
|
|
270
|
+
bootloaderExpectedSize?: number;
|
|
271
|
+
bootloaderVersion?: IVersionArray;
|
|
272
|
+
displayBootloaderVersion?: IVersionArray;
|
|
273
|
+
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
274
|
+
upgradeType?: 'payload-package-set' | string;
|
|
275
|
+
components?: Record<string, IProtocolV2FirmwareComponent>;
|
|
276
|
+
installOrder?: string[];
|
|
277
|
+
bootloaderChangelog?: {
|
|
278
|
+
[k in ILocale]: string;
|
|
279
|
+
};
|
|
280
|
+
fingerprint: string;
|
|
281
|
+
expectedSize?: number;
|
|
282
|
+
version: IVersionArray;
|
|
283
|
+
changelog: {
|
|
284
|
+
[k in ILocale]: string;
|
|
285
|
+
};
|
|
402
286
|
};
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
width: number;
|
|
418
|
-
height: number;
|
|
419
|
-
rgba: Uint8Array | ArrayBuffer;
|
|
420
|
-
fileName?: string;
|
|
421
|
-
chunkSize?: number;
|
|
422
|
-
};
|
|
423
|
-
type DeviceUploadWallpaperResponse = {
|
|
424
|
-
path: string;
|
|
425
|
-
size: number;
|
|
426
|
-
colorFormat: Pro2WallpaperColorFormat;
|
|
427
|
-
message?: string;
|
|
428
|
-
};
|
|
429
|
-
|
|
430
|
-
type FileOpSuccess = {
|
|
431
|
-
message?: string;
|
|
287
|
+
/** BLE firmware config */
|
|
288
|
+
type IBLEFirmwareReleaseInfo = {
|
|
289
|
+
required: boolean;
|
|
290
|
+
/** bluetooth dfu version */
|
|
291
|
+
url: string;
|
|
292
|
+
/** stm bluetooth update version */
|
|
293
|
+
webUpdate: string;
|
|
294
|
+
fingerprint: string;
|
|
295
|
+
fingerprintWeb: string;
|
|
296
|
+
expectedSize?: number;
|
|
297
|
+
version: IVersionArray;
|
|
298
|
+
changelog: {
|
|
299
|
+
[k in ILocale]: string;
|
|
300
|
+
};
|
|
432
301
|
};
|
|
433
|
-
type
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
302
|
+
type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
|
|
303
|
+
type IDeviceReleaseInfo = {
|
|
304
|
+
firmware?: IFirmwareReleaseInfo[];
|
|
305
|
+
/** Protocol V2 payload package set */
|
|
306
|
+
'firmware-v1'?: IFirmwareReleaseInfo[];
|
|
307
|
+
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
308
|
+
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
309
|
+
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
310
|
+
ble?: IBLEFirmwareReleaseInfo[];
|
|
311
|
+
/** Independent Protocol V2 resource release configuration. */
|
|
312
|
+
resources?: IProtocolV2Resources;
|
|
441
313
|
};
|
|
442
|
-
type
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
314
|
+
type DeviceTypeMap = {
|
|
315
|
+
[k in Exclude<IKnownDevice, 'neo'>]: IDeviceReleaseInfo;
|
|
316
|
+
} & {
|
|
317
|
+
/** Optional until every remote-config producer publishes a Neo entry. */
|
|
318
|
+
neo?: IDeviceReleaseInfo;
|
|
446
319
|
};
|
|
447
|
-
type
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
};
|
|
462
|
-
declare function protocolInfoRequest(connectId: string, params?: CommonParams): Response<ProtocolInfo>;
|
|
463
|
-
declare function ping(connectId: string, params?: CommonParams & {
|
|
464
|
-
message?: string;
|
|
465
|
-
}): Response<Success$1>;
|
|
466
|
-
declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
467
|
-
declare function deviceInfoGet(connectId: string, params?: CommonParams & DeviceInfoGetParams): Response<ProtocolV2DeviceInfo>;
|
|
468
|
-
declare function deviceStatusGet(connectId: string, params?: CommonParams): Response<DeviceStatus$1>;
|
|
469
|
-
declare function deviceSessionGet(connectId: string, params?: CommonParams): Response<DeviceSession>;
|
|
470
|
-
declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DeviceFirmwareUpdateStatus>;
|
|
471
|
-
declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams & DeviceFirmwareUpdateStatusGetParams): Response<DeviceFirmwareUpdateStatus>;
|
|
472
|
-
declare function deviceFactoryInfoSet(connectId: string, params: CommonParams & DeviceFactoryInfoSetParams): Response<Success$1>;
|
|
473
|
-
declare function deviceFactoryInfoGet(connectId: string, params?: CommonParams): Response<DeviceFactoryInfo>;
|
|
474
|
-
declare function deviceSettingsGet(connectId: string, params?: CommonParams): Response<DeviceSettings>;
|
|
475
|
-
declare function deviceSettingsSet(connectId: string, params: CommonParams & DeviceSettingsSetParams): Response<Success$1>;
|
|
476
|
-
declare function deviceSettingsPageShow(connectId: string, params: CommonParams & DeviceSettingsPageShowParams): Response<Success$1>;
|
|
477
|
-
declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
|
|
478
|
-
declare function filesystemPermissionFix(connectId: string, params?: CommonParams): Response<Success$1>;
|
|
479
|
-
declare function fileRead(connectId: string, params: {
|
|
480
|
-
path: string;
|
|
481
|
-
offset?: number;
|
|
482
|
-
totalSize?: number;
|
|
483
|
-
chunkLen?: number;
|
|
484
|
-
uiPercentage?: number;
|
|
485
|
-
}): Response<FileInfo>;
|
|
486
|
-
declare function fileWrite(connectId: string, params: {
|
|
487
|
-
path: string;
|
|
488
|
-
offset?: number;
|
|
489
|
-
totalSize?: number;
|
|
490
|
-
chunkSize?: number;
|
|
491
|
-
chunkLen?: number;
|
|
492
|
-
data: ArrayBuffer | Uint8Array | Blob | string;
|
|
493
|
-
overwrite?: boolean;
|
|
494
|
-
append?: boolean;
|
|
495
|
-
uiPercentage?: number;
|
|
496
|
-
timeoutMs?: number | string;
|
|
497
|
-
}): Response<FileInfo>;
|
|
498
|
-
declare function fileDelete(connectId: string, params: {
|
|
499
|
-
path: string;
|
|
500
|
-
}): Response<FileOpSuccess>;
|
|
501
|
-
declare function dirList(connectId: string, params: {
|
|
502
|
-
path: string;
|
|
503
|
-
depth?: number;
|
|
504
|
-
}): Response<DirInfo>;
|
|
505
|
-
declare function dirMake(connectId: string, params: {
|
|
506
|
-
path: string;
|
|
507
|
-
}): Response<FileOpSuccess>;
|
|
508
|
-
declare function dirRemove(connectId: string, params: {
|
|
509
|
-
path: string;
|
|
510
|
-
}): Response<FileOpSuccess>;
|
|
511
|
-
declare function pathInfo(connectId: string, params: {
|
|
512
|
-
path: string;
|
|
513
|
-
timeoutMs?: number | string;
|
|
514
|
-
}): Response<PathInfoResult>;
|
|
515
|
-
declare const filesystemFileRead: typeof fileRead;
|
|
516
|
-
declare const filesystemFileWrite: typeof fileWrite;
|
|
517
|
-
declare function uploadPortfolio(connectId: string, params: {
|
|
518
|
-
operationId?: string;
|
|
519
|
-
packageBytes: ArrayBuffer | Uint8Array | Blob;
|
|
520
|
-
timeoutMs?: number | string;
|
|
521
|
-
}): Response<FileInfo & {
|
|
522
|
-
portfolioUpdated: true;
|
|
523
|
-
}>;
|
|
524
|
-
declare const filesystemFileDelete: typeof fileDelete;
|
|
525
|
-
declare const filesystemDirList: typeof dirList;
|
|
526
|
-
declare const filesystemDirMake: typeof dirMake;
|
|
527
|
-
declare const filesystemDirRemove: typeof dirRemove;
|
|
528
|
-
declare const filesystemPathInfoQuery: typeof pathInfo;
|
|
529
|
-
declare function filesystemFormat(connectId: string): Response<Success$1>;
|
|
530
|
-
declare function filesystemDiskControl(connectId: string, params: CommonParams & {
|
|
531
|
-
enable: boolean | 0 | 1;
|
|
532
|
-
timeoutMs?: number | string;
|
|
533
|
-
}): Response<Success$1>;
|
|
534
|
-
|
|
535
|
-
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
536
|
-
declare const off: (type: any, fn: any) => void;
|
|
537
|
-
declare const removeAllListeners: (type: any) => void;
|
|
538
|
-
|
|
539
|
-
declare function uiResponse(response: UiResponseEvent): void;
|
|
540
|
-
|
|
541
|
-
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
542
|
-
interface LowLevelInjectApi {
|
|
543
|
-
call: CallMethod;
|
|
544
|
-
eventEmitter: EventEmitter$1;
|
|
545
|
-
init: CoreApi['init'];
|
|
546
|
-
dispose: CoreApi['dispose'];
|
|
547
|
-
uiResponse: CoreApi['uiResponse'];
|
|
548
|
-
cancel: CoreApi['cancel'];
|
|
549
|
-
cancelOperation: CoreApi['cancelOperation'];
|
|
550
|
-
updateSettings: CoreApi['updateSettings'];
|
|
551
|
-
switchTransport: CoreApi['switchTransport'];
|
|
552
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
553
|
-
}
|
|
554
|
-
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
555
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
320
|
+
type AssetsMap = {
|
|
321
|
+
bridge: {
|
|
322
|
+
version: IVersionArray;
|
|
323
|
+
linux32Rpm: string;
|
|
324
|
+
linux64Rpm: string;
|
|
325
|
+
linux32Deb: string;
|
|
326
|
+
linux64Deb: string;
|
|
327
|
+
win: string;
|
|
328
|
+
mac: string;
|
|
329
|
+
sha256sumAsc: string;
|
|
330
|
+
changelog: {
|
|
331
|
+
[k in ILocale]: string;
|
|
332
|
+
};
|
|
333
|
+
};
|
|
556
334
|
};
|
|
335
|
+
type RemoteConfigResponse = {
|
|
336
|
+
bridge: AssetsMap['bridge'];
|
|
337
|
+
} & DeviceTypeMap;
|
|
557
338
|
|
|
558
339
|
type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
559
340
|
declare enum EOneKeyDeviceMode {
|
|
@@ -568,6 +349,14 @@ type UnavailableCapabilities = {
|
|
|
568
349
|
};
|
|
569
350
|
type KnownDevice = {
|
|
570
351
|
connectId: string | null;
|
|
352
|
+
/** Protocol family confirmed by the transport's active probe. */
|
|
353
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
354
|
+
/**
|
|
355
|
+
* Stable physical-device identity. Current SDK responses always include this
|
|
356
|
+
* value; it remains optional in the type during the uuid compatibility window.
|
|
357
|
+
*/
|
|
358
|
+
serialNo?: string;
|
|
359
|
+
/** @deprecated Use serialNo instead. */
|
|
571
360
|
uuid: string;
|
|
572
361
|
deviceId: string | null;
|
|
573
362
|
deviceType: IDeviceType | null;
|
|
@@ -577,9 +366,12 @@ type KnownDevice = {
|
|
|
577
366
|
bleName: string | null;
|
|
578
367
|
name: string;
|
|
579
368
|
error?: typeof undefined;
|
|
369
|
+
/** Current SDK/transport usage state for connection indicators. */
|
|
370
|
+
status?: DeviceStatus;
|
|
580
371
|
mode: EOneKeyDeviceMode;
|
|
581
|
-
features
|
|
582
|
-
|
|
372
|
+
features: Features;
|
|
373
|
+
/** Unified SDK device-state snapshot; features remains a legacy projection. */
|
|
374
|
+
state?: DeviceState;
|
|
583
375
|
unavailableCapabilities: UnavailableCapabilities;
|
|
584
376
|
bleFirmwareVersion: IVersionArray | null;
|
|
585
377
|
firmwareVersion: IVersionArray | null;
|
|
@@ -589,18 +381,36 @@ type KnownDevice = {
|
|
|
589
381
|
};
|
|
590
382
|
type SearchDevice = {
|
|
591
383
|
connectId: string | null;
|
|
384
|
+
/** Protocol family confirmed by the transport's active probe. */
|
|
385
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
386
|
+
/**
|
|
387
|
+
* Available after device initialization. BLE discovery does not connect to the
|
|
388
|
+
* device, so it returns null until a later initialized device response. Current
|
|
389
|
+
* SDK responses always include the field; it remains optional in the type during
|
|
390
|
+
* the uuid compatibility window.
|
|
391
|
+
*/
|
|
392
|
+
serialNo?: string | null;
|
|
393
|
+
/**
|
|
394
|
+
* @deprecated Ambiguous legacy identifier. Use serialNo for hardware identity
|
|
395
|
+
* and connectId for transport routing. Empty during BLE discovery until the
|
|
396
|
+
* physical serial number is available after initialization.
|
|
397
|
+
*/
|
|
592
398
|
uuid: string;
|
|
593
399
|
deviceId: string | null;
|
|
594
400
|
deviceType: IDeviceType;
|
|
595
401
|
name: string;
|
|
596
402
|
commType: OneKeyDeviceCommType;
|
|
597
403
|
};
|
|
598
|
-
type Device = KnownDevice;
|
|
404
|
+
type Device$1 = KnownDevice;
|
|
599
405
|
type DeviceFeaturesProtocol = 'V1' | 'V2' | 'unknown';
|
|
600
|
-
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
406
|
+
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
601
407
|
type DeviceFeaturesVerify = {
|
|
602
408
|
firmwareBuildId?: string;
|
|
603
409
|
firmwareHash?: string;
|
|
410
|
+
applicationP1BuildId?: string;
|
|
411
|
+
applicationP1Hash?: string;
|
|
412
|
+
applicationP2BuildId?: string;
|
|
413
|
+
applicationP2Hash?: string;
|
|
604
414
|
bootloaderBuildId?: string;
|
|
605
415
|
bootloaderHash?: string;
|
|
606
416
|
boardBuildId?: string;
|
|
@@ -627,9 +437,126 @@ type DeviceFeaturesVerify = {
|
|
|
627
437
|
type DeviceFeaturesRaw = {
|
|
628
438
|
protocolV1Features?: Messages.Features;
|
|
629
439
|
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
440
|
+
protocolV2ProtocolInfo?: ProtocolInfo;
|
|
630
441
|
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
442
|
+
protocolV2DeviceStatus?: DeviceStatus$1;
|
|
443
|
+
};
|
|
444
|
+
type DeviceFeaturesRawPatch = {
|
|
445
|
+
[Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
|
|
446
|
+
};
|
|
447
|
+
type DeviceStateProtocol = DeviceFeaturesProtocol;
|
|
448
|
+
type DeviceStateMode = DeviceFeaturesMode;
|
|
449
|
+
type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
|
|
450
|
+
type DeviceStateUpdateSource = 'initialize' | 'device-info' | 'device-status' | 'settings-read' | 'settings-write' | 'change-pin' | 'lock' | 'unlock' | 'passphrase' | 'session-clear' | 'firmware-update' | 'transport-reconnect' | 'compatibility';
|
|
451
|
+
type DeviceStateIdentity = {
|
|
452
|
+
deviceType: IDeviceType;
|
|
453
|
+
firmwareType: EFirmwareType;
|
|
454
|
+
model: string | null;
|
|
455
|
+
vendor: string | null;
|
|
456
|
+
deviceId: string | null;
|
|
457
|
+
serialNo: string;
|
|
458
|
+
label: string | null;
|
|
459
|
+
bleName: string | null;
|
|
460
|
+
};
|
|
461
|
+
type DeviceStateStatus = {
|
|
462
|
+
mode: DeviceStateMode;
|
|
463
|
+
initialized: boolean | null;
|
|
464
|
+
unlocked: boolean | null;
|
|
465
|
+
firmwarePresent: boolean | null;
|
|
466
|
+
backupRequired: boolean | null;
|
|
467
|
+
noBackup: boolean | null;
|
|
468
|
+
unfinishedBackup: boolean | null;
|
|
469
|
+
recoveryMode: boolean | null;
|
|
470
|
+
passphraseProtection: boolean | null;
|
|
471
|
+
pinProtection: boolean | null;
|
|
472
|
+
/** `attach_to_pin_enabled`:是否至少存在一个 Attach PIN 绑定。 */
|
|
473
|
+
attachToPinEnabled: boolean | null;
|
|
474
|
+
/** `unlocked_by_attach_to_pin`:本次解锁是否由 Attach PIN 完成。 */
|
|
475
|
+
unlockedAttachPin: boolean | null;
|
|
476
|
+
};
|
|
477
|
+
type DeviceStateSettings = {
|
|
478
|
+
language: string | null;
|
|
479
|
+
bleEnabled: boolean | null;
|
|
480
|
+
sdCardPresent: boolean | null;
|
|
481
|
+
sdProtection: boolean | null;
|
|
482
|
+
wipeCodeProtection: boolean | null;
|
|
483
|
+
passphraseAlwaysOnDevice: boolean | null;
|
|
484
|
+
safetyChecks: Enum_SafetyCheckLevel | null;
|
|
485
|
+
autoLockDelayMs: number | null;
|
|
486
|
+
autoShutdownDelayMs: number | null;
|
|
487
|
+
displayRotation: number | null;
|
|
488
|
+
experimentalFeatures: boolean | null;
|
|
489
|
+
wallpaperPath: string | null;
|
|
490
|
+
brightness: number | null;
|
|
491
|
+
animationEnabled: boolean | null;
|
|
492
|
+
tapToWake: boolean | null;
|
|
493
|
+
hapticFeedback: boolean | null;
|
|
494
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
495
|
+
airgapMode: boolean | null;
|
|
496
|
+
fidoEnabled: boolean | null;
|
|
497
|
+
usbLockEnabled: boolean | null;
|
|
498
|
+
randomKeypad: boolean | null;
|
|
499
|
+
};
|
|
500
|
+
type DeviceStateVersions = {
|
|
501
|
+
firmware: string | null;
|
|
502
|
+
applicationP1?: string | null;
|
|
503
|
+
applicationP2?: string | null;
|
|
504
|
+
bootloader: string | null;
|
|
505
|
+
board: string | null;
|
|
506
|
+
ble: string | null;
|
|
507
|
+
/** @deprecated Kept for legacy consumers; new code should read se01. */
|
|
508
|
+
se?: string | null;
|
|
509
|
+
se01?: string | null;
|
|
510
|
+
se02?: string | null;
|
|
511
|
+
se03?: string | null;
|
|
512
|
+
se04?: string | null;
|
|
513
|
+
se01Boot?: string | null;
|
|
514
|
+
se02Boot?: string | null;
|
|
515
|
+
se03Boot?: string | null;
|
|
516
|
+
se04Boot?: string | null;
|
|
517
|
+
};
|
|
518
|
+
type DeviceStateSecurityElement = {
|
|
519
|
+
type: string | null;
|
|
520
|
+
state: string | null;
|
|
521
|
+
};
|
|
522
|
+
type DeviceStateSecurityElements = Partial<Record<'se01' | 'se02' | 'se03' | 'se04', DeviceStateSecurityElement>>;
|
|
523
|
+
type DeviceStateSecurityElementsPatch = Partial<Record<keyof DeviceStateSecurityElements, Partial<DeviceStateSecurityElement>>>;
|
|
524
|
+
type DeviceState = {
|
|
525
|
+
schemaVersion: 1;
|
|
526
|
+
revision: number;
|
|
527
|
+
updatedAt: number;
|
|
528
|
+
protocol: DeviceStateProtocol;
|
|
529
|
+
/** Device-message protocol version, independent of the SDK V1/V2 protocol family. */
|
|
530
|
+
protocolVersion: number | null;
|
|
531
|
+
identity: DeviceStateIdentity;
|
|
532
|
+
status: DeviceStateStatus;
|
|
533
|
+
settings: DeviceStateSettings;
|
|
534
|
+
versions: DeviceStateVersions;
|
|
535
|
+
/** Secure-element metadata exposed by the unified firmware information read. */
|
|
536
|
+
securityElements?: DeviceStateSecurityElements;
|
|
537
|
+
capabilities: Array<number | string>;
|
|
538
|
+
verification?: Partial<DeviceFeaturesVerify>;
|
|
631
539
|
};
|
|
632
|
-
type
|
|
540
|
+
type DeviceStatePatch = {
|
|
541
|
+
protocol?: DeviceStateProtocol;
|
|
542
|
+
protocolVersion?: number | null;
|
|
543
|
+
identity?: Partial<DeviceStateIdentity>;
|
|
544
|
+
status?: Partial<DeviceStateStatus>;
|
|
545
|
+
settings?: Partial<DeviceStateSettings>;
|
|
546
|
+
versions?: Partial<DeviceStateVersions>;
|
|
547
|
+
securityElements?: DeviceStateSecurityElementsPatch;
|
|
548
|
+
capabilities?: Array<number | string>;
|
|
549
|
+
verification?: DeviceFeaturesVerify;
|
|
550
|
+
raw?: DeviceFeaturesRawPatch;
|
|
551
|
+
};
|
|
552
|
+
type DeviceStateEvent = {
|
|
553
|
+
connectId: string | null;
|
|
554
|
+
state: DeviceState;
|
|
555
|
+
revision: number;
|
|
556
|
+
source: DeviceStateUpdateSource;
|
|
557
|
+
changedKeys: string[];
|
|
558
|
+
};
|
|
559
|
+
type NormalizedFeatures = {
|
|
633
560
|
protocol: DeviceFeaturesProtocol;
|
|
634
561
|
protocolVersion?: number | null;
|
|
635
562
|
deviceType: IDeviceType;
|
|
@@ -658,11 +585,23 @@ type Features = {
|
|
|
658
585
|
sdProtection: boolean | null;
|
|
659
586
|
wipeCodeProtection: boolean | null;
|
|
660
587
|
passphraseAlwaysOnDevice: boolean | null;
|
|
588
|
+
/** `attach_to_pin_enabled`:是否至少存在一个 Attach PIN 绑定。 */
|
|
661
589
|
attachToPinEnabled?: boolean | null;
|
|
662
|
-
safetyChecks:
|
|
590
|
+
safetyChecks: Enum_SafetyCheckLevel | null;
|
|
663
591
|
autoLockDelayMs: number | null;
|
|
592
|
+
autoShutdownDelayMs: number | null;
|
|
664
593
|
displayRotation: number | null;
|
|
665
594
|
experimentalFeatures: boolean | null;
|
|
595
|
+
wallpaperPath: string | null;
|
|
596
|
+
brightness: number | null;
|
|
597
|
+
animationEnabled: boolean | null;
|
|
598
|
+
tapToWake: boolean | null;
|
|
599
|
+
hapticFeedback: boolean | null;
|
|
600
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
601
|
+
airgapMode: boolean | null;
|
|
602
|
+
fidoEnabled: boolean | null;
|
|
603
|
+
usbLockEnabled: boolean | null;
|
|
604
|
+
randomKeypad: boolean | null;
|
|
666
605
|
firmwareVersion: string | null;
|
|
667
606
|
bootloaderVersion: string | null;
|
|
668
607
|
boardVersion: string | null;
|
|
@@ -682,9 +621,16 @@ type Features = {
|
|
|
682
621
|
unlockedAttachPin?: boolean;
|
|
683
622
|
raw?: DeviceFeaturesRaw;
|
|
684
623
|
};
|
|
624
|
+
type Features = NormalizedFeatures & Partial<Omit<Messages.Features, keyof NormalizedFeatures>> & Partial<Omit<Messages.OnekeyFeatures, keyof NormalizedFeatures | keyof Messages.Features>>;
|
|
685
625
|
type OnekeyFeatures = Messages.OnekeyFeatures;
|
|
686
|
-
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
|
|
687
|
-
|
|
626
|
+
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2 | EDeviceType.Neo;
|
|
627
|
+
/**
|
|
628
|
+
* model_classic: 'classic' | 'classic1s' | 'classicpure'
|
|
629
|
+
* model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
|
|
630
|
+
* model_touch: 'touch' | 'pro'
|
|
631
|
+
* model_pro2: 'pro2' | 'neo'
|
|
632
|
+
*/
|
|
633
|
+
type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s' | 'model_pro2';
|
|
688
634
|
declare const DeviceModelToTypes: {
|
|
689
635
|
[deviceModel in IDeviceModel]: IDeviceType[];
|
|
690
636
|
};
|
|
@@ -697,7 +643,6 @@ type ITransportStatus = 'valid' | 'outdated';
|
|
|
697
643
|
type IVersionRange = {
|
|
698
644
|
min: string;
|
|
699
645
|
max?: string;
|
|
700
|
-
unsupported?: boolean;
|
|
701
646
|
};
|
|
702
647
|
type DeviceFirmwareRange = {
|
|
703
648
|
[deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
|
|
@@ -748,302 +693,671 @@ type SupportFeatures = {
|
|
|
748
693
|
modifyHomescreen: SupportFeatureType;
|
|
749
694
|
};
|
|
750
695
|
|
|
751
|
-
type
|
|
752
|
-
type
|
|
753
|
-
|
|
754
|
-
debug?: boolean;
|
|
755
|
-
transportReconnect?: boolean;
|
|
756
|
-
lazyLoad?: boolean;
|
|
757
|
-
origin?: string;
|
|
758
|
-
parentOrigin?: string;
|
|
759
|
-
configSrc: string;
|
|
760
|
-
iframeSrc: string;
|
|
761
|
-
version: string;
|
|
762
|
-
priority: number;
|
|
763
|
-
trustedHost: boolean;
|
|
764
|
-
supportedBrowser?: boolean;
|
|
765
|
-
env: transportEnv;
|
|
766
|
-
timestamp: number;
|
|
767
|
-
isFrame?: boolean;
|
|
768
|
-
preRelease?: boolean;
|
|
769
|
-
fetchConfig?: boolean;
|
|
770
|
-
extension?: string;
|
|
771
|
-
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
696
|
+
type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
|
|
697
|
+
type GetDeviceStateParams = CommonParams & {
|
|
698
|
+
scope?: DeviceStateScope;
|
|
772
699
|
};
|
|
773
|
-
|
|
774
|
-
type
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
target: IProtocolV2FirmwareComponentTarget;
|
|
778
|
-
url: string;
|
|
779
|
-
fingerprint?: string;
|
|
780
|
-
version?: IVersionArray;
|
|
700
|
+
/** Internal state-read options, not part of the public CoreApi. */
|
|
701
|
+
type DeviceStateReadOptions = {
|
|
702
|
+
refreshSections?: DeviceStateSection[];
|
|
703
|
+
includeRaw?: boolean;
|
|
781
704
|
};
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
705
|
+
declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
|
|
706
|
+
|
|
707
|
+
type DeviceDescriptorDiff = {
|
|
708
|
+
didUpdate: boolean;
|
|
709
|
+
connected: OneKeyDeviceInfo[];
|
|
710
|
+
disconnected: OneKeyDeviceInfo[];
|
|
711
|
+
changedSessions: OneKeyDeviceInfo[];
|
|
712
|
+
changedDebugSessions: OneKeyDeviceInfo[];
|
|
713
|
+
acquired: OneKeyDeviceInfo[];
|
|
714
|
+
debugAcquired: OneKeyDeviceInfo[];
|
|
715
|
+
released: OneKeyDeviceInfo[];
|
|
716
|
+
debugReleased: OneKeyDeviceInfo[];
|
|
717
|
+
descriptors: OneKeyDeviceInfo[];
|
|
789
718
|
};
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
719
|
+
|
|
720
|
+
declare class DeviceConnector {
|
|
721
|
+
transport?: Transport;
|
|
722
|
+
listenTimestamp: number;
|
|
723
|
+
current: OneKeyDeviceInfo[] | null;
|
|
724
|
+
upcoming: OneKeyDeviceInfo[];
|
|
725
|
+
listening: boolean;
|
|
726
|
+
constructor();
|
|
727
|
+
private getActiveTransport;
|
|
728
|
+
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
729
|
+
listen(): Promise<void>;
|
|
730
|
+
stop(): void;
|
|
731
|
+
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, expectedProtocol?: HardwareConnectProtocol, protocolHint?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
732
|
+
release(session: string, onclose: boolean, keepSession?: boolean): Promise<void>;
|
|
733
|
+
disconnect(session: string | undefined | null): Promise<void>;
|
|
734
|
+
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
735
|
+
_reportDevicesChange(): void;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
type InitOptions = {
|
|
739
|
+
initSession?: boolean;
|
|
740
|
+
deviceId?: string;
|
|
741
|
+
passphraseState?: string;
|
|
742
|
+
deriveCardano?: boolean;
|
|
743
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
744
|
+
forceProtocolDetection?: boolean;
|
|
745
|
+
protocolV2DeviceInfoTimeoutMs?: number;
|
|
746
|
+
/** Refresh Protocol V2 runtime state before returning discovery results. */
|
|
747
|
+
refreshRuntimeState?: boolean;
|
|
748
|
+
/**
|
|
749
|
+
* Protocol V1 Initialize response timeout override. Reboot-wait polling passes a
|
|
750
|
+
* short value so an unanswered probe settles before the next poll tick.
|
|
751
|
+
*/
|
|
752
|
+
timeoutMs?: number;
|
|
813
753
|
};
|
|
814
|
-
type
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
[
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
754
|
+
type RunOptions = {
|
|
755
|
+
keepSession?: boolean;
|
|
756
|
+
skipInitialize?: boolean;
|
|
757
|
+
} & InitOptions;
|
|
758
|
+
interface DeviceEvents {
|
|
759
|
+
[DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
760
|
+
[DEVICE.PIN_ON_DEVICE]: [Device, DeviceSessionPinType, ProtocolV2UiEventMetadata?];
|
|
761
|
+
[DEVICE.PIN_ON_DEVICE_COMPLETE]: [Device, HardwareUiInteractionMeta];
|
|
762
|
+
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
763
|
+
[DEVICE.ATTACH_PIN_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
764
|
+
[DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
|
|
765
|
+
[DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
|
|
766
|
+
[DEVICE.STATE]: [Device, DeviceStateEvent];
|
|
767
|
+
[DEVICE.PASSPHRASE]: [
|
|
768
|
+
Device,
|
|
769
|
+
PassphraseRequestPayload,
|
|
770
|
+
(response: PassphrasePromptResponse, error?: Error) => void
|
|
771
|
+
];
|
|
772
|
+
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
773
|
+
Device,
|
|
774
|
+
(err: any, deviceId: string) => void
|
|
775
|
+
];
|
|
776
|
+
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
777
|
+
Device,
|
|
778
|
+
(err: any, deviceId: string) => void
|
|
779
|
+
];
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Pre-populate the device session cache with a known session ID.
|
|
783
|
+
*
|
|
784
|
+
* This allows short-lived processes (e.g. CLI) to restore a previously
|
|
785
|
+
* obtained session, avoiding the need to re-enter passphrase on every
|
|
786
|
+
* invocation. The session must have been obtained from a prior
|
|
787
|
+
* wallet-session call on the same device. This compatibility hook is intended
|
|
788
|
+
* for a trusted CLI process restoring its own OS-keychain entry.
|
|
789
|
+
*
|
|
790
|
+
* @param deviceId - The device's device_id (from features)
|
|
791
|
+
* @param passphraseState - The passphrase state token
|
|
792
|
+
* @param sessionId - The session_id to cache (from features.session_id)
|
|
793
|
+
*/
|
|
794
|
+
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
795
|
+
interface Device {
|
|
796
|
+
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
797
|
+
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
798
|
+
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
799
|
+
}
|
|
800
|
+
declare class Device extends EventEmitter {
|
|
801
|
+
/**
|
|
802
|
+
* 设备标识对象
|
|
803
|
+
*/
|
|
804
|
+
originalDescriptor: OneKeyDeviceInfo;
|
|
805
|
+
sdkInstanceId?: string;
|
|
806
|
+
/**
|
|
807
|
+
* 设备实例唯一标识
|
|
808
|
+
*/
|
|
809
|
+
instanceId: string;
|
|
810
|
+
createdAt: number;
|
|
811
|
+
/**
|
|
812
|
+
* 设备主 ID
|
|
813
|
+
* 蓝牙连接时是设备的 UUID
|
|
814
|
+
* USB连接时是设备的 sessionID
|
|
815
|
+
*/
|
|
816
|
+
mainId?: string | null;
|
|
817
|
+
/**
|
|
818
|
+
* 通信管道,向设备发送请求
|
|
819
|
+
*/
|
|
820
|
+
deviceConnector?: DeviceConnector | null;
|
|
821
|
+
/**
|
|
822
|
+
* 固件命令
|
|
823
|
+
*/
|
|
824
|
+
commands: DeviceCommands;
|
|
825
|
+
/**
|
|
826
|
+
* 可取消的操作
|
|
827
|
+
*/
|
|
828
|
+
private cancelableAction?;
|
|
829
|
+
/**
|
|
830
|
+
* 设备是否被占用
|
|
831
|
+
*/
|
|
832
|
+
private deviceAcquired;
|
|
833
|
+
/** Canonical device-state cache; legacy Features is a compatibility projection. */
|
|
834
|
+
private stateStore;
|
|
835
|
+
/** Force the next initialization to reload DeviceInfo after reconnect or reboot. */
|
|
836
|
+
private protocolV2StateNeedsReload;
|
|
837
|
+
/** Runtime context negotiated once per active Protocol V2 link. */
|
|
838
|
+
private protocolV2RuntimeContext?;
|
|
839
|
+
/** Coalesces concurrent first-use runtime negotiation on the same active link. */
|
|
840
|
+
private protocolV2RuntimeContextPromise?;
|
|
841
|
+
/** Invalidates an in-flight runtime-context response without adding a transport epoch. */
|
|
842
|
+
private protocolV2RuntimeContextRequestToken?;
|
|
843
|
+
private protocolV2UiInteraction?;
|
|
844
|
+
private protocolV2UiInteractionCounter;
|
|
845
|
+
get state(): (DeviceState & {
|
|
846
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
847
|
+
}) | undefined;
|
|
848
|
+
get features(): Features | undefined;
|
|
849
|
+
set features(features: Features | undefined);
|
|
850
|
+
runPromise?: Deferred<void> | null;
|
|
851
|
+
externalState: string[];
|
|
852
|
+
unavailableCapabilities: UnavailableCapabilities;
|
|
853
|
+
instance: number;
|
|
854
|
+
internalState: string[];
|
|
855
|
+
needReloadDevice: boolean;
|
|
856
|
+
/**
|
|
857
|
+
* 执行 API 方法后是否保留 SessionID
|
|
858
|
+
*/
|
|
859
|
+
keepSession: boolean;
|
|
860
|
+
passphraseState: string | undefined;
|
|
861
|
+
pendingCallbackPromise?: Deferred<void>;
|
|
862
|
+
/** Pre-initialize timestamp (ms) */
|
|
863
|
+
private preInitializedAt?;
|
|
864
|
+
/** Pre-initialize context, used to verify state consistency before skipping */
|
|
865
|
+
private preInitializeMeta?;
|
|
866
|
+
/** Last Initialize duration (ms), reported as "saved" when a skip happens */
|
|
867
|
+
private lastInitializeDurationMs?;
|
|
868
|
+
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
869
|
+
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
|
|
870
|
+
toMessageObject(): Device$1 | null;
|
|
871
|
+
/**
|
|
872
|
+
* Device connect
|
|
873
|
+
* @returns {Promise<boolean>}
|
|
874
|
+
*/
|
|
875
|
+
connect(connectProtocol?: HardwareConnectProtocol, options?: {
|
|
876
|
+
forceProtocolDetection?: boolean;
|
|
877
|
+
}): Promise<boolean>;
|
|
878
|
+
acquire(expectedProtocol?: HardwareConnectProtocol, options?: {
|
|
879
|
+
throwOnRunPromiseError?: boolean;
|
|
880
|
+
forceProtocolDetection?: boolean;
|
|
881
|
+
}): Promise<void>;
|
|
882
|
+
release(): Promise<void>;
|
|
883
|
+
/**
|
|
884
|
+
* Pre-initialize: connect + Initialize ahead of the sign.
|
|
885
|
+
*/
|
|
886
|
+
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
887
|
+
markPreInitialized(meta?: {
|
|
888
|
+
passphraseState?: string;
|
|
889
|
+
}): void;
|
|
890
|
+
clearPreInitialized(): void;
|
|
891
|
+
isPreInitializeMetaMatch(payload?: {
|
|
892
|
+
passphraseState?: string;
|
|
893
|
+
}): boolean;
|
|
894
|
+
isPreInitializedValid(ttlMs: number): boolean;
|
|
895
|
+
setLastInitializeDuration(durationMs: number): void;
|
|
896
|
+
getLastInitializeDuration(): number | undefined;
|
|
897
|
+
getCommands(): DeviceCommands;
|
|
898
|
+
/**
|
|
899
|
+
* Canonical protocol discriminator.
|
|
900
|
+
*
|
|
901
|
+
* descriptor.protocolType is established by active probing; V2 features are mapped
|
|
902
|
+
* from DeviceInfoGet. All protocol branches must use this method instead of reading
|
|
903
|
+
* originalDescriptor.protocolType directly or inferring a protocol from features.
|
|
904
|
+
*/
|
|
905
|
+
getProtocol(): 'V1' | 'V2';
|
|
906
|
+
isProtocolV2(): boolean;
|
|
907
|
+
getCurrentDeviceType(): IDeviceType;
|
|
908
|
+
getCurrentDeviceId(): string | undefined;
|
|
909
|
+
getCurrentSerialNo(): string;
|
|
910
|
+
getConnectId(): string;
|
|
911
|
+
getCurrentBleName(): string | null;
|
|
912
|
+
getCurrentLabel(): string | null;
|
|
913
|
+
getCurrentDisplayName(): string | null;
|
|
914
|
+
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
915
|
+
getCurrentFirmwareType(): EFirmwareType;
|
|
916
|
+
getCurrentFirmwareVersionString(): string;
|
|
917
|
+
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
918
|
+
getCurrentBootloaderVersionString(): string | undefined;
|
|
919
|
+
getCurrentSafetyChecks(): _onekeyfe_hd_transport.Enum_SafetyCheckLevel | null | undefined;
|
|
920
|
+
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
921
|
+
supportNewPassphrase(): SupportFeatureType;
|
|
922
|
+
supportInputPinOnSoftware(): SupportFeatureType;
|
|
923
|
+
supportModifyHomescreen(): SupportFeatureType;
|
|
924
|
+
private getSessionCacheDeviceKey;
|
|
925
|
+
private reconcileSessionCacheDeviceIdentity;
|
|
926
|
+
getInternalState(_deviceId?: string): string | undefined;
|
|
927
|
+
getStandardInternalState(_deviceId?: string): {
|
|
928
|
+
passphraseState: string;
|
|
929
|
+
sessionId: string;
|
|
930
|
+
} | undefined;
|
|
931
|
+
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null, walletType?: 'standard' | 'hidden'): void;
|
|
932
|
+
private setInternalState;
|
|
933
|
+
clearInternalState(_deviceId?: string): void;
|
|
934
|
+
clearStandardInternalState(_deviceId?: string): void;
|
|
935
|
+
initialize(options?: InitOptions): Promise<void>;
|
|
936
|
+
/**
|
|
937
|
+
* Device initialization over Protocol V2.
|
|
938
|
+
*
|
|
939
|
+
* Protocol V2 bypasses legacy Initialize/GetFeatures and builds its canonical
|
|
940
|
+
* features state directly from DeviceInfoGet.
|
|
941
|
+
*/
|
|
942
|
+
private _initializeProtocolV2;
|
|
943
|
+
getFeatures(): Promise<Features | undefined>;
|
|
944
|
+
getDeviceState(params?: DeviceStateReadOptions): Promise<DeviceState>;
|
|
945
|
+
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
946
|
+
updateState(patch: DeviceStatePatch, source: DeviceStateUpdateSource): DeviceState & {
|
|
947
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
849
948
|
};
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
}
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
949
|
+
updateFeaturesPatch(patch: Partial<Features>, source: DeviceStateUpdateSource): Features | undefined;
|
|
950
|
+
ensureProtocolV2RuntimeContext(timeoutMs?: number, options?: {
|
|
951
|
+
forceRefresh?: boolean;
|
|
952
|
+
}): Promise<ProtocolInfo>;
|
|
953
|
+
probeProtocolV2RuntimeState(deviceInfo?: ProtocolV2DeviceInfo, timeoutMs?: number, options?: {
|
|
954
|
+
forceRuntimeContextRefresh?: boolean;
|
|
955
|
+
}): Promise<Features>;
|
|
956
|
+
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo, deviceStatus?: DeviceStatus$1 | null, runtimeMode?: ProtocolV2RuntimeMode, protocolInfo?: ProtocolInfo): Features;
|
|
957
|
+
updateProtocolV2Status(status: DeviceStatus$1): Features;
|
|
958
|
+
private invalidateProtocolV2RuntimeState;
|
|
959
|
+
markTransportDisconnected(): void;
|
|
960
|
+
invalidateAfterWipe(): void;
|
|
961
|
+
markProtocolV2Reboot(rebootType: DeviceRebootType): void;
|
|
962
|
+
/**
|
|
963
|
+
* 暂时只在 acquire 后更新 Session ID
|
|
964
|
+
* 后续看是否有需要依据 listen 返回结果更新
|
|
965
|
+
* @param descriptor
|
|
966
|
+
*/
|
|
967
|
+
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
968
|
+
updateFromCache(device: Device): void;
|
|
969
|
+
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
970
|
+
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions, runPromise: Deferred<void>): Promise<void>;
|
|
971
|
+
interruptionFromOutside(): Promise<void>;
|
|
972
|
+
interruptionFromUser(): Promise<void>;
|
|
973
|
+
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
974
|
+
clearCancelableAction(): void;
|
|
975
|
+
getMode(): EOneKeyDeviceMode;
|
|
976
|
+
getStatus(): "available" | "occupied" | "used";
|
|
977
|
+
getFirmwareVersion(): IVersionArray | null;
|
|
978
|
+
getBLEFirmwareVersion(): IVersionArray | null;
|
|
979
|
+
isUsed(): boolean;
|
|
980
|
+
hasDeviceAcquire(): boolean;
|
|
981
|
+
isUsedHere(): boolean;
|
|
982
|
+
isUsedElsewhere(): boolean;
|
|
983
|
+
isBootloader(): boolean | undefined;
|
|
984
|
+
isRomloader(): boolean | undefined;
|
|
985
|
+
isInitialized(): boolean | undefined;
|
|
986
|
+
isSeedless(): boolean | undefined;
|
|
987
|
+
isUnacquired(): boolean;
|
|
988
|
+
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
989
|
+
hasUsePassphrase(): boolean;
|
|
990
|
+
checkDeviceId(deviceId: string): boolean;
|
|
991
|
+
lockDevice(): Promise<Success$1>;
|
|
992
|
+
beginProtocolV2UiInteraction(): void;
|
|
993
|
+
createProtocolV2UiPhaseMetadata(phase: HardwareUiInteractionMeta['phase'], transition: HardwareUiInteractionMeta['transition'], options?: {
|
|
994
|
+
phaseId?: string;
|
|
995
|
+
outcome?: HardwareUiInteractionMeta['outcome'];
|
|
996
|
+
}): HardwareUiInteractionMeta | undefined;
|
|
997
|
+
completeProtocolV2UiPhase(phase: HardwareUiInteractionMeta, outcome?: HardwareUiInteractionMeta['outcome']): HardwareUiInteractionMeta | undefined;
|
|
998
|
+
finishProtocolV2UiInteraction(outcome?: HardwareUiInteractionMeta['outcome'], options?: {
|
|
999
|
+
ensureMetadata?: boolean;
|
|
1000
|
+
}): HardwareUiInteractionMeta | undefined;
|
|
1001
|
+
hasOpenProtocolV2UiInteraction(): boolean;
|
|
1002
|
+
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
1003
|
+
unlockDevice(pinType?: DeviceSessionPinType, options?: ProtocolV2UiEventMetadata & {
|
|
1004
|
+
emitUiEvent?: boolean;
|
|
1005
|
+
}): Promise<Features | undefined>;
|
|
1006
|
+
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean, deriveCardano?: boolean): Promise<boolean>;
|
|
1007
|
+
}
|
|
857
1008
|
|
|
858
|
-
|
|
1009
|
+
/**
|
|
1010
|
+
* SDK Tracing Utilities
|
|
1011
|
+
* Tracks object instances and request call chains across multiple SDK instances
|
|
1012
|
+
*/
|
|
1013
|
+
/**
|
|
1014
|
+
* Generate SDK instance ID
|
|
1015
|
+
* @returns Format: "SDK-<number>-<timestamp>"
|
|
1016
|
+
* @example "SDK-1-123456"
|
|
1017
|
+
*/
|
|
1018
|
+
declare function generateSdkInstanceId(): string;
|
|
1019
|
+
/**
|
|
1020
|
+
* Generate globally unique instance ID
|
|
1021
|
+
* @param type Instance type (Device, DeviceCommands, BaseMethod, etc.)
|
|
1022
|
+
* @param sdkInstanceId SDK instance ID (optional)
|
|
1023
|
+
* @returns Format: <SDK>.<type>-<number>-<timestamp>
|
|
1024
|
+
* @example "SDK-1.Device-1-123456" or "Device-1-123456"
|
|
1025
|
+
*/
|
|
1026
|
+
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
1027
|
+
/**
|
|
1028
|
+
* Request context information
|
|
1029
|
+
*/
|
|
1030
|
+
interface RequestContext {
|
|
1031
|
+
/** Request unique ID (reuses BaseMethod.responseID) */
|
|
1032
|
+
responseID: number;
|
|
1033
|
+
/** SDK instance ID */
|
|
1034
|
+
sdkInstanceId?: string;
|
|
1035
|
+
/** API method name */
|
|
1036
|
+
methodName: string;
|
|
1037
|
+
/** Device connection ID */
|
|
1038
|
+
connectId?: string;
|
|
1039
|
+
/** Device instance ID */
|
|
1040
|
+
deviceInstanceId?: string;
|
|
1041
|
+
/** DeviceCommands instance ID */
|
|
1042
|
+
commandsInstanceId?: string;
|
|
1043
|
+
/** Parent request ID (for nested calls like allNetworkGetAddress) */
|
|
1044
|
+
parentResponseID?: number;
|
|
1045
|
+
/** Request start time */
|
|
1046
|
+
startTime: number;
|
|
1047
|
+
/** Request end time */
|
|
1048
|
+
endTime?: number;
|
|
1049
|
+
/** Request status */
|
|
1050
|
+
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
1051
|
+
/** Error message */
|
|
1052
|
+
error?: string;
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* SDK instance tracing context
|
|
1056
|
+
*/
|
|
1057
|
+
interface SdkTracingContext {
|
|
1058
|
+
/** SDK instance ID */
|
|
1059
|
+
sdkInstanceId: string;
|
|
1060
|
+
/** Creation timestamp */
|
|
1061
|
+
createdAt: number;
|
|
1062
|
+
/** Active requests */
|
|
1063
|
+
activeRequests: Map<number, RequestContext>;
|
|
1064
|
+
}
|
|
1065
|
+
/**
|
|
1066
|
+
* Create SDK instance tracing context
|
|
1067
|
+
*/
|
|
1068
|
+
declare function createSdkTracingContext(): SdkTracingContext;
|
|
1069
|
+
/**
|
|
1070
|
+
* Create and register request context
|
|
1071
|
+
* @param responseID Request ID (reuses BaseMethod.responseID)
|
|
1072
|
+
* @param methodName API method name
|
|
1073
|
+
* @param options Additional options
|
|
1074
|
+
*/
|
|
1075
|
+
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
1076
|
+
sdkInstanceId?: string;
|
|
1077
|
+
connectId?: string;
|
|
1078
|
+
deviceInstanceId?: string;
|
|
1079
|
+
commandsInstanceId?: string;
|
|
1080
|
+
parentResponseID?: number;
|
|
1081
|
+
}): RequestContext;
|
|
1082
|
+
/**
|
|
1083
|
+
* Update request context
|
|
1084
|
+
*/
|
|
1085
|
+
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
1086
|
+
/**
|
|
1087
|
+
* Complete request context
|
|
1088
|
+
*/
|
|
1089
|
+
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
1090
|
+
/**
|
|
1091
|
+
* Get active requests for specific Device instance
|
|
1092
|
+
*/
|
|
1093
|
+
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
1094
|
+
/**
|
|
1095
|
+
* Format request context for logging
|
|
1096
|
+
*/
|
|
1097
|
+
declare function formatRequestContext(context: RequestContext): string;
|
|
1098
|
+
/**
|
|
1099
|
+
* Cleanup specific SDK instance
|
|
1100
|
+
*/
|
|
1101
|
+
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
859
1102
|
|
|
860
|
-
declare
|
|
1103
|
+
declare class Core extends EventEmitter {
|
|
1104
|
+
private tracingContext;
|
|
1105
|
+
readonly sdkInstanceId: string;
|
|
1106
|
+
private requestQueue;
|
|
1107
|
+
private disposePromise?;
|
|
1108
|
+
private prePendingCallPromise;
|
|
1109
|
+
private methodSynchronize;
|
|
1110
|
+
constructor();
|
|
1111
|
+
private getCoreContext;
|
|
1112
|
+
handleMessage(message: CoreMessage): Promise<any>;
|
|
1113
|
+
dispose(): Promise<void>;
|
|
1114
|
+
private disposeResources;
|
|
1115
|
+
}
|
|
1116
|
+
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
1117
|
+
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
1118
|
+
env: ConnectSettings['env'];
|
|
1119
|
+
Transport: any;
|
|
1120
|
+
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
1121
|
+
}) => void;
|
|
861
1122
|
|
|
862
|
-
declare
|
|
1123
|
+
declare const PRO2_WALLPAPER_WIDTH = 604;
|
|
1124
|
+
declare const PRO2_WALLPAPER_HEIGHT = 1024;
|
|
1125
|
+
type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
|
|
1126
|
+
declare function encodePro2Wallpaper(options: {
|
|
1127
|
+
width: number;
|
|
1128
|
+
height: number;
|
|
1129
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
1130
|
+
}): {
|
|
1131
|
+
data: Uint8Array;
|
|
1132
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
1133
|
+
};
|
|
863
1134
|
|
|
864
|
-
type
|
|
865
|
-
|
|
866
|
-
|
|
1135
|
+
type DeviceUploadWallpaperParams = {
|
|
1136
|
+
jpegBase64: string;
|
|
1137
|
+
fileName?: string;
|
|
1138
|
+
chunkSize?: number;
|
|
867
1139
|
};
|
|
868
|
-
type
|
|
869
|
-
|
|
1140
|
+
type DeviceUploadWallpaperResponse = {
|
|
1141
|
+
path: string;
|
|
1142
|
+
size: number;
|
|
1143
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
1144
|
+
message?: string;
|
|
870
1145
|
};
|
|
871
|
-
declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
|
|
872
|
-
|
|
873
|
-
declare function checkBridgeStatus(): Response<boolean>;
|
|
874
|
-
|
|
875
|
-
type CheckBridgeReleaseResponse = {
|
|
876
|
-
shouldUpdate: boolean;
|
|
877
|
-
status: 'outdated' | 'valid';
|
|
878
|
-
releaseVersion: string;
|
|
879
|
-
} | null;
|
|
880
|
-
declare function checkBridgeRelease(connectId?: string, params?: CommonParams & {
|
|
881
|
-
willUpdateFirmwareVersion?: string;
|
|
882
|
-
}): Response<CheckBridgeReleaseResponse>;
|
|
883
1146
|
|
|
884
|
-
type
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
1147
|
+
type DeviceUploadNftParams = {
|
|
1148
|
+
imageJpegBase64: string;
|
|
1149
|
+
thumbnailJpegBase64: string;
|
|
1150
|
+
title: string;
|
|
1151
|
+
subtitle: string;
|
|
1152
|
+
timestampMs?: number;
|
|
1153
|
+
chunkSize?: number;
|
|
1154
|
+
paceMs?: number;
|
|
1155
|
+
timeoutMs?: number;
|
|
1156
|
+
};
|
|
1157
|
+
type DeviceUploadNftResponse = {
|
|
1158
|
+
basename: string;
|
|
1159
|
+
imagePath: string;
|
|
1160
|
+
thumbnailPath: string;
|
|
1161
|
+
metadataPath: string;
|
|
1162
|
+
totalSize: number;
|
|
1163
|
+
nftUpdated: true;
|
|
1164
|
+
message?: string;
|
|
893
1165
|
};
|
|
894
|
-
declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
|
|
895
1166
|
|
|
896
|
-
type
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
bootloaderMode?: boolean;
|
|
905
|
-
};
|
|
906
|
-
type AllFirmwareRelease = {
|
|
907
|
-
firmware: FirmwareRelease$2;
|
|
908
|
-
ble: FirmwareRelease$2;
|
|
909
|
-
bootloader?: FirmwareRelease$2;
|
|
910
|
-
bridge?: FirmwareRelease$2;
|
|
911
|
-
features?: Features$1;
|
|
912
|
-
};
|
|
913
|
-
type CheckAllFirmwareReleaseParams = {
|
|
914
|
-
checkBridgeRelease?: boolean;
|
|
915
|
-
firmwareType?: EFirmwareType;
|
|
1167
|
+
type FileInfo = {
|
|
1168
|
+
path: string;
|
|
1169
|
+
offset: number;
|
|
1170
|
+
total_size: number;
|
|
1171
|
+
data?: Uint8Array;
|
|
1172
|
+
data_hash?: number;
|
|
1173
|
+
processed_byte?: number;
|
|
1174
|
+
chunks?: number;
|
|
916
1175
|
};
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
deviceType: EDeviceType;
|
|
921
|
-
firmwareType: EFirmwareType;
|
|
1176
|
+
type TestProtocolV2PingParams = CommonParams & {
|
|
1177
|
+
/** Firmware diagnostic echo payload, limited to 63 UTF-8 bytes. */
|
|
1178
|
+
message?: string;
|
|
922
1179
|
};
|
|
923
|
-
declare function
|
|
1180
|
+
declare function testProtocolV2Ping(connectId: string, params?: TestProtocolV2PingParams): Response<Success$1>;
|
|
1181
|
+
declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
1182
|
+
declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<OnboardingStatus>;
|
|
1183
|
+
declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
|
|
1184
|
+
declare function deviceUploadNft(connectId: string, params: CommonParams & DeviceUploadNftParams): Response<DeviceUploadNftResponse>;
|
|
1185
|
+
declare function uploadPortfolio(connectId: string, params: {
|
|
1186
|
+
packageBase64: string;
|
|
1187
|
+
timeoutMs?: number | string;
|
|
1188
|
+
}): Response<FileInfo & {
|
|
1189
|
+
portfolioUpdated: true;
|
|
1190
|
+
}>;
|
|
924
1191
|
|
|
925
|
-
declare
|
|
1192
|
+
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
1193
|
+
declare const off: (type: any, fn: any) => void;
|
|
1194
|
+
declare const removeAllListeners: (type: any) => void;
|
|
926
1195
|
|
|
927
|
-
declare function
|
|
1196
|
+
declare function uiResponse(response: UiResponseEvent): void;
|
|
928
1197
|
|
|
929
|
-
type
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
passphraseProtection: boolean | null;
|
|
944
|
-
attachToPinEnabled?: boolean | null;
|
|
945
|
-
unlockedAttachPin?: boolean | null;
|
|
946
|
-
backupRequired: boolean | null;
|
|
947
|
-
noBackup: boolean | null;
|
|
948
|
-
language: string | null;
|
|
949
|
-
bleEnabled: boolean | null;
|
|
950
|
-
};
|
|
951
|
-
type DeviceProfileVersions = {
|
|
952
|
-
firmware: string | null;
|
|
953
|
-
bootloader: string | null;
|
|
954
|
-
board: string | null;
|
|
955
|
-
ble: string | null;
|
|
956
|
-
se01?: string | null;
|
|
957
|
-
se02?: string | null;
|
|
958
|
-
se03?: string | null;
|
|
959
|
-
se04?: string | null;
|
|
960
|
-
se01Boot?: string | null;
|
|
961
|
-
se02Boot?: string | null;
|
|
962
|
-
se03Boot?: string | null;
|
|
963
|
-
se04Boot?: string | null;
|
|
964
|
-
};
|
|
965
|
-
type DeviceProfileVerify = {
|
|
966
|
-
firmwareBuildId?: string;
|
|
967
|
-
firmwareHash?: string;
|
|
968
|
-
bootloaderBuildId?: string;
|
|
969
|
-
bootloaderHash?: string;
|
|
970
|
-
boardBuildId?: string;
|
|
971
|
-
boardHash?: string;
|
|
972
|
-
bleBuildId?: string;
|
|
973
|
-
bleHash?: string;
|
|
974
|
-
se01BuildId?: string;
|
|
975
|
-
se01Hash?: string;
|
|
976
|
-
se02BuildId?: string;
|
|
977
|
-
se02Hash?: string;
|
|
978
|
-
se03BuildId?: string;
|
|
979
|
-
se03Hash?: string;
|
|
980
|
-
se04BuildId?: string;
|
|
981
|
-
se04Hash?: string;
|
|
982
|
-
se01BootBuildId?: string;
|
|
983
|
-
se01BootHash?: string;
|
|
984
|
-
se02BootBuildId?: string;
|
|
985
|
-
se02BootHash?: string;
|
|
986
|
-
se03BootBuildId?: string;
|
|
987
|
-
se03BootHash?: string;
|
|
988
|
-
se04BootBuildId?: string;
|
|
989
|
-
se04BootHash?: string;
|
|
990
|
-
};
|
|
991
|
-
type DeviceProfileRaw = {
|
|
992
|
-
features?: Features;
|
|
993
|
-
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
994
|
-
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
995
|
-
};
|
|
996
|
-
type DeviceProfile = {
|
|
997
|
-
protocol: DeviceInfoProtocol;
|
|
998
|
-
sources: DeviceInfoSource[];
|
|
999
|
-
deviceType: IDeviceType;
|
|
1000
|
-
firmwareType: EFirmwareType;
|
|
1001
|
-
deviceId: string;
|
|
1002
|
-
serialNo: string;
|
|
1003
|
-
label: string | null;
|
|
1004
|
-
bleName: string | null;
|
|
1005
|
-
status: DeviceInfoStatus;
|
|
1006
|
-
versions: DeviceProfileVersions;
|
|
1007
|
-
verify?: DeviceProfileVerify;
|
|
1008
|
-
raw?: DeviceProfileRaw;
|
|
1198
|
+
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
1199
|
+
interface LowLevelInjectApi {
|
|
1200
|
+
call: CallMethod;
|
|
1201
|
+
eventEmitter: EventEmitter$1;
|
|
1202
|
+
init: CoreApi['init'];
|
|
1203
|
+
dispose: CoreApi['dispose'];
|
|
1204
|
+
uiResponse: CoreApi['uiResponse'];
|
|
1205
|
+
cancel: CoreApi['cancel'];
|
|
1206
|
+
updateSettings: CoreApi['updateSettings'];
|
|
1207
|
+
switchTransport: CoreApi['switchTransport'];
|
|
1208
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
1209
|
+
}
|
|
1210
|
+
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
1211
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
1009
1212
|
};
|
|
1010
|
-
declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
|
|
1011
1213
|
|
|
1012
|
-
declare function
|
|
1214
|
+
declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
|
|
1215
|
+
declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
|
|
1216
|
+
|
|
1217
|
+
declare function testInitializeDeviceDuration(connectId?: string, params?: CommonParams): Response<number>;
|
|
1013
1218
|
|
|
1014
|
-
|
|
1015
|
-
declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
|
|
1219
|
+
declare function preInitialize(connectId: string, params?: CommonParams): Response<boolean>;
|
|
1016
1220
|
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1221
|
+
declare function getLogs(): Response<string[]>;
|
|
1222
|
+
|
|
1223
|
+
type ClearSessionCacheParams = {
|
|
1224
|
+
deviceId?: never;
|
|
1225
|
+
passphraseState?: never;
|
|
1226
|
+
} | {
|
|
1227
|
+
deviceId: string;
|
|
1228
|
+
passphraseState?: string;
|
|
1025
1229
|
};
|
|
1026
|
-
type
|
|
1027
|
-
|
|
1230
|
+
type ClearSessionCachePayload = {
|
|
1231
|
+
cleared: true;
|
|
1028
1232
|
};
|
|
1029
|
-
declare function
|
|
1233
|
+
declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
|
|
1030
1234
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1235
|
+
declare function checkBridgeStatus(): Response<boolean>;
|
|
1236
|
+
|
|
1237
|
+
type CheckBridgeReleaseResponse = {
|
|
1238
|
+
shouldUpdate: boolean;
|
|
1239
|
+
status: 'outdated' | 'valid';
|
|
1240
|
+
releaseVersion: string;
|
|
1241
|
+
} | null;
|
|
1242
|
+
declare function checkBridgeRelease(connectId?: string, params?: CommonParams & {
|
|
1243
|
+
willUpdateFirmwareVersion?: string;
|
|
1244
|
+
}): Response<CheckBridgeReleaseResponse>;
|
|
1245
|
+
|
|
1246
|
+
type FirmwareUpdatePlanArtifactRole = 'firmware' | 'ble' | 'bootloader' | 'resource' | 'component' | 'resourceBundle';
|
|
1247
|
+
type FirmwareUpdatePlanTarget = 'firmware' | 'ble' | 'bootloader' | FirmwareUpdateV4Target;
|
|
1248
|
+
type FirmwareUpdatePlanForceTarget = 'firmware' | 'ble' | 'bootloader' | 'resource';
|
|
1249
|
+
interface FirmwareUpdatePlanArtifact {
|
|
1250
|
+
artifactId: string;
|
|
1251
|
+
role: FirmwareUpdatePlanArtifactRole;
|
|
1252
|
+
target: FirmwareUpdatePlanTarget;
|
|
1253
|
+
url: string;
|
|
1254
|
+
container: 'raw' | 'zip';
|
|
1255
|
+
logicalName?: string;
|
|
1256
|
+
expectedSize?: number;
|
|
1257
|
+
expectedSha256?: string;
|
|
1258
|
+
targetVersion?: string;
|
|
1259
|
+
}
|
|
1260
|
+
interface FirmwareUpdatePlan {
|
|
1261
|
+
schemaVersion: 2;
|
|
1262
|
+
planDigest: string;
|
|
1263
|
+
executor: 'v2' | 'v3' | 'v4';
|
|
1264
|
+
deviceIdentity: string;
|
|
1265
|
+
deviceModel: string;
|
|
1266
|
+
firmwareType: EFirmwareType;
|
|
1267
|
+
platform: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
1268
|
+
artifacts: FirmwareUpdatePlanArtifact[];
|
|
1269
|
+
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
interface FirmwareUpdatePreparedEntry {
|
|
1273
|
+
entryName: string;
|
|
1274
|
+
artifact: FirmwareArtifactReference;
|
|
1275
|
+
}
|
|
1276
|
+
interface FirmwareUpdatePreparedArtifactInput {
|
|
1277
|
+
artifactId: string;
|
|
1278
|
+
artifact: FirmwareArtifactReference;
|
|
1279
|
+
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
1280
|
+
}
|
|
1281
|
+
interface FirmwareUpdatePreparedArtifact {
|
|
1282
|
+
artifactId: string;
|
|
1283
|
+
role: FirmwareUpdatePlanArtifactRole;
|
|
1284
|
+
target: FirmwareUpdatePlanTarget;
|
|
1285
|
+
container: 'raw' | 'zip';
|
|
1286
|
+
logicalName?: string;
|
|
1287
|
+
targetVersion?: string;
|
|
1288
|
+
artifact: FirmwareArtifactReference;
|
|
1289
|
+
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
1290
|
+
}
|
|
1291
|
+
interface FirmwareUpdatePreparedPlan {
|
|
1292
|
+
schemaVersion: 2;
|
|
1293
|
+
preparedPlanDigest: string;
|
|
1294
|
+
planDigest: string;
|
|
1295
|
+
networkPolicy: 'forbid';
|
|
1296
|
+
executor: FirmwareUpdatePlan['executor'];
|
|
1297
|
+
deviceIdentity: string;
|
|
1298
|
+
deviceModel: string;
|
|
1299
|
+
firmwareType: FirmwareUpdatePlan['firmwareType'];
|
|
1300
|
+
platform: FirmwareUpdatePlan['platform'];
|
|
1301
|
+
leaseRef: string;
|
|
1302
|
+
artifacts: FirmwareUpdatePreparedArtifact[];
|
|
1303
|
+
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
1304
|
+
}
|
|
1305
|
+
declare function prepareFirmwareUpdatePlan(input: {
|
|
1306
|
+
plan: FirmwareUpdatePlan;
|
|
1307
|
+
leaseRef: string;
|
|
1308
|
+
artifacts: FirmwareUpdatePreparedArtifactInput[];
|
|
1309
|
+
}): FirmwareUpdatePreparedPlan;
|
|
1310
|
+
declare function validateFirmwareUpdatePreparedPlan(value: unknown): FirmwareUpdatePreparedPlan;
|
|
1041
1311
|
|
|
1042
1312
|
type IUpdateType = 'firmware' | 'ble';
|
|
1313
|
+
interface FirmwareArtifactReference {
|
|
1314
|
+
artifactRef: string;
|
|
1315
|
+
size: number;
|
|
1316
|
+
sha256: string;
|
|
1317
|
+
}
|
|
1318
|
+
interface FirmwareArtifactReader {
|
|
1319
|
+
open(input: {
|
|
1320
|
+
artifactRef: string;
|
|
1321
|
+
}): Promise<{
|
|
1322
|
+
readerId: string;
|
|
1323
|
+
size: number;
|
|
1324
|
+
}>;
|
|
1325
|
+
read(input: {
|
|
1326
|
+
readerId: string;
|
|
1327
|
+
offset: number;
|
|
1328
|
+
length: number;
|
|
1329
|
+
}): Promise<{
|
|
1330
|
+
data: ArrayBuffer;
|
|
1331
|
+
bytesRead: number;
|
|
1332
|
+
eof: boolean;
|
|
1333
|
+
}>;
|
|
1334
|
+
close(input: {
|
|
1335
|
+
readerId: string;
|
|
1336
|
+
}): Promise<void>;
|
|
1337
|
+
}
|
|
1338
|
+
interface FirmwareUpdateHostBinding {
|
|
1339
|
+
artifactReader: FirmwareArtifactReader;
|
|
1340
|
+
/** 将读取器 generation 绑定到包含 ZIP 条目的完整 PreparedPlan。 */
|
|
1341
|
+
preparedPlanDigest: string;
|
|
1342
|
+
}
|
|
1043
1343
|
interface FirmwareUpdateBinaryParams {
|
|
1044
1344
|
binary: ArrayBuffer;
|
|
1045
1345
|
updateType: IUpdateType;
|
|
1046
1346
|
}
|
|
1347
|
+
interface FirmwareUpdateArtifactParams {
|
|
1348
|
+
preparedPlan: FirmwareUpdatePreparedPlan;
|
|
1349
|
+
hostBindingGeneration: number;
|
|
1350
|
+
/** @deprecated Core derives the component artifact from preparedPlan. */
|
|
1351
|
+
artifact?: FirmwareArtifactReference;
|
|
1352
|
+
resourceEntries?: Array<{
|
|
1353
|
+
entryName: string;
|
|
1354
|
+
artifact: FirmwareArtifactReference;
|
|
1355
|
+
}>;
|
|
1356
|
+
updateType: IUpdateType;
|
|
1357
|
+
forcedUpdateRes?: boolean;
|
|
1358
|
+
isUpdateBootloader?: boolean;
|
|
1359
|
+
firmwareType?: EFirmwareType;
|
|
1360
|
+
}
|
|
1047
1361
|
interface FirmwareUpdateParams {
|
|
1048
1362
|
version?: number[];
|
|
1049
1363
|
updateType: IUpdateType;
|
|
@@ -1063,7 +1377,10 @@ type Platform = {
|
|
|
1063
1377
|
};
|
|
1064
1378
|
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateParams & Platform>): Response<Messages.Success>;
|
|
1065
1379
|
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams & Platform>): Response<Messages.Success>;
|
|
1380
|
+
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateArtifactParams & Platform>): Response<Messages.Success>;
|
|
1066
1381
|
interface FirmwareUpdateV3Params {
|
|
1382
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1383
|
+
hostBindingGeneration?: number;
|
|
1067
1384
|
bleVersion?: number[];
|
|
1068
1385
|
bleBinary?: ArrayBuffer;
|
|
1069
1386
|
chunkSize?: number;
|
|
@@ -1075,28 +1392,58 @@ interface FirmwareUpdateV3Params {
|
|
|
1075
1392
|
forcedUpdateRes?: boolean;
|
|
1076
1393
|
firmwareType?: EFirmwareType;
|
|
1077
1394
|
platform: IPlatform;
|
|
1395
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1396
|
+
artifacts?: {
|
|
1397
|
+
ble?: FirmwareArtifactReference;
|
|
1398
|
+
firmware?: FirmwareArtifactReference;
|
|
1399
|
+
bootloader?: FirmwareArtifactReference;
|
|
1400
|
+
resourceEntries?: Array<{
|
|
1401
|
+
entryName: string;
|
|
1402
|
+
artifact: FirmwareArtifactReference;
|
|
1403
|
+
}>;
|
|
1404
|
+
};
|
|
1078
1405
|
}
|
|
1079
|
-
|
|
1406
|
+
/**
|
|
1407
|
+
* firmwareUpdateV4 target binaries grouped by DeviceFirmwareTargetType.
|
|
1408
|
+
* Except for romloader, each field maps to a target accepted by bootloader.
|
|
1409
|
+
*/
|
|
1410
|
+
type FirmwareUpdateV4Target = 'boot'
|
|
1411
|
+
/** @deprecated Use resource with resourceArchiveBinary. */
|
|
1412
|
+
| 'boot_resources' | 'app_v1' | 'app_v2' | 'coprocessor' | 'resource' | 'se01' | 'se02' | 'se03' | 'se04';
|
|
1080
1413
|
interface FirmwareUpdateV4Params {
|
|
1414
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1415
|
+
/** Required whenever preparedPlan is present; Core resolves the reader from this digest-bound host. */
|
|
1416
|
+
hostBindingGeneration?: number;
|
|
1081
1417
|
platform: IPlatform;
|
|
1418
|
+
expectedDeviceId?: string;
|
|
1082
1419
|
chunkSize?: number;
|
|
1083
1420
|
firmwareType?: EFirmwareType;
|
|
1084
1421
|
targetsToUpdate?: FirmwareUpdateV4Target[];
|
|
1422
|
+
expectedTargetVersions?: Partial<Record<FirmwareUpdateV4Target, string>>;
|
|
1423
|
+
/** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
|
|
1085
1424
|
romloaderBinary?: ArrayBuffer;
|
|
1425
|
+
/** FW_MGMT_TARGET_BOOTLOADER = 3 */
|
|
1086
1426
|
bootloaderBinary?: ArrayBuffer;
|
|
1427
|
+
/** FW_MGMT_TARGET_APPLICATION_P1 = 4 */
|
|
1087
1428
|
applicationP1Binary?: ArrayBuffer;
|
|
1429
|
+
/** FW_MGMT_TARGET_APPLICATION_P2 = 5 */
|
|
1088
1430
|
applicationP2Binary?: ArrayBuffer;
|
|
1431
|
+
/** FW_MGMT_TARGET_COPROCESSOR = 6 */
|
|
1089
1432
|
coprocessorBinary?: ArrayBuffer;
|
|
1433
|
+
/** FW_MGMT_TARGET_SE01-04 = 7-10 */
|
|
1090
1434
|
se01Binary?: ArrayBuffer;
|
|
1091
1435
|
se02Binary?: ArrayBuffer;
|
|
1092
1436
|
se03Binary?: ArrayBuffer;
|
|
1093
1437
|
se04Binary?: ArrayBuffer;
|
|
1438
|
+
/** Complete Protocol V2 resource ZIP for local development; Core converts it to a local PreparedPlan. */
|
|
1439
|
+
resourceArchiveBinary?: ArrayBuffer;
|
|
1094
1440
|
forcedUpdateRes?: boolean;
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
devicePath: string;
|
|
1098
|
-
}>;
|
|
1441
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1442
|
+
componentArtifacts?: Partial<Record<Exclude<FirmwareUpdateV4Target, 'resource' | 'boot_resources'>, FirmwareArtifactReference>>;
|
|
1099
1443
|
}
|
|
1444
|
+
declare function registerFirmwareUpdateHostBinding$1(binding: FirmwareUpdateHostBinding): number;
|
|
1445
|
+
declare function unregisterFirmwareUpdateHostBinding$1(generation?: number): boolean;
|
|
1446
|
+
declare function getFirmwareUpdateHostBindingGeneration$1(): number;
|
|
1100
1447
|
declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
|
|
1101
1448
|
bleVersion: string;
|
|
1102
1449
|
firmwareVersion: string;
|
|
@@ -1108,6 +1455,157 @@ declare function firmwareUpdateV4(connectId: string | undefined, params: Params<
|
|
|
1108
1455
|
bootloaderVersion: string;
|
|
1109
1456
|
}>;
|
|
1110
1457
|
|
|
1458
|
+
type ProtocolV2ComponentReleaseInfo = IProtocolV2FirmwareComponent & {
|
|
1459
|
+
protocol: 'V2';
|
|
1460
|
+
configKey: string;
|
|
1461
|
+
componentTarget: IProtocolV2FirmwareComponentTarget;
|
|
1462
|
+
required: boolean;
|
|
1463
|
+
changelog: IFirmwareReleaseInfo['changelog'];
|
|
1464
|
+
};
|
|
1465
|
+
type FirmwareReleaseCheckResult = {
|
|
1466
|
+
shouldUpdate?: boolean;
|
|
1467
|
+
status: IDeviceFirmwareStatus;
|
|
1468
|
+
changelog?: {
|
|
1469
|
+
'zh-CN': string;
|
|
1470
|
+
'en-US': string;
|
|
1471
|
+
}[];
|
|
1472
|
+
release: IBLEFirmwareReleaseInfo | IFirmwareReleaseInfo | ProtocolV2ComponentReleaseInfo | undefined;
|
|
1473
|
+
bootloaderMode?: boolean;
|
|
1474
|
+
};
|
|
1475
|
+
type BridgeReleaseCheckResult = Omit<FirmwareReleaseCheckResult, 'release'> & {
|
|
1476
|
+
release: string | undefined;
|
|
1477
|
+
};
|
|
1478
|
+
type ProtocolV2FirmwareComponentReleaseStatus = 'valid' | 'outdated' | 'unknown' | 'unsupported';
|
|
1479
|
+
type ProtocolV2FirmwareReleaseStatus = 'unavailable' | 'valid' | 'unknown' | 'outdated' | 'required';
|
|
1480
|
+
type ProtocolV2FirmwareComponentRelease = {
|
|
1481
|
+
configKey: string;
|
|
1482
|
+
componentTarget: IProtocolV2FirmwareComponentTarget;
|
|
1483
|
+
updateTarget: FirmwareUpdateV4Target | null;
|
|
1484
|
+
currentVersion: string | null;
|
|
1485
|
+
targetVersion: string | null;
|
|
1486
|
+
status: ProtocolV2FirmwareComponentReleaseStatus;
|
|
1487
|
+
required: boolean;
|
|
1488
|
+
};
|
|
1489
|
+
type AllFirmwareRelease = {
|
|
1490
|
+
firmware: FirmwareReleaseCheckResult;
|
|
1491
|
+
ble: FirmwareReleaseCheckResult;
|
|
1492
|
+
bootloader?: FirmwareReleaseCheckResult;
|
|
1493
|
+
bridge?: BridgeReleaseCheckResult;
|
|
1494
|
+
features?: Features;
|
|
1495
|
+
protocol?: 'V1' | 'V2';
|
|
1496
|
+
deviceType?: 'pro2' | 'neo';
|
|
1497
|
+
firmwareType?: EFirmwareType;
|
|
1498
|
+
status?: ProtocolV2FirmwareReleaseStatus;
|
|
1499
|
+
hasUpgrade?: boolean;
|
|
1500
|
+
required?: boolean;
|
|
1501
|
+
resourceStatus?: 'valid' | 'outdated' | 'unknown';
|
|
1502
|
+
resourceArchive?: IProtocolV2ResourceSource;
|
|
1503
|
+
currentVersions?: DeviceStateVersions;
|
|
1504
|
+
components?: ProtocolV2FirmwareComponentRelease[];
|
|
1505
|
+
targetsToUpdate?: FirmwareUpdateV4Target[];
|
|
1506
|
+
release?: IFirmwareReleaseInfo;
|
|
1507
|
+
firmwareUpdatePlan?: FirmwareUpdatePlan;
|
|
1508
|
+
};
|
|
1509
|
+
type CheckAllFirmwareReleaseParams = {
|
|
1510
|
+
checkBridgeRelease?: boolean;
|
|
1511
|
+
checkFirmwareHash?: boolean;
|
|
1512
|
+
firmwareType?: EFirmwareType;
|
|
1513
|
+
platform?: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
1514
|
+
forceUpdateTargets?: FirmwareUpdatePlanForceTarget[];
|
|
1515
|
+
protocolV2ForceUpdateTargets?: FirmwareUpdateV4Target[];
|
|
1516
|
+
};
|
|
1517
|
+
declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
|
|
1518
|
+
|
|
1519
|
+
type CheckBootloaderReleaseResponse = FirmwareReleaseCheckResult | null;
|
|
1520
|
+
type CheckBootloaderReleaseParams = {
|
|
1521
|
+
willUpdateFirmwareVersion?: string;
|
|
1522
|
+
firmwareType?: EFirmwareType;
|
|
1523
|
+
};
|
|
1524
|
+
declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
|
|
1525
|
+
|
|
1526
|
+
type CheckFirmwareTypeAvailableParams = {
|
|
1527
|
+
deviceType: EDeviceType;
|
|
1528
|
+
firmwareType: EFirmwareType;
|
|
1529
|
+
};
|
|
1530
|
+
declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareReleaseCheckResult | undefined>;
|
|
1531
|
+
|
|
1532
|
+
declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
|
|
1533
|
+
|
|
1534
|
+
declare function detectDeviceConnectProtocol(connectId: string): Response<HardwareConnectProtocol>;
|
|
1535
|
+
|
|
1536
|
+
/**
|
|
1537
|
+
* @deprecated Use `getDeviceState` for both Protocol V1 and Protocol V2 devices.
|
|
1538
|
+
*/
|
|
1539
|
+
declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* @deprecated Use `getDeviceState(connectId, { scope: 'firmware' })`.
|
|
1543
|
+
*/
|
|
1544
|
+
declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
|
|
1545
|
+
|
|
1546
|
+
type GetPassphraseStateParams = CommonParams;
|
|
1547
|
+
/**
|
|
1548
|
+
* Compatibility wallet-state API for existing App integrations.
|
|
1549
|
+
*
|
|
1550
|
+
* Protocol V1 keeps its parameterless firmware flow. Protocol V2 maps the existing
|
|
1551
|
+
* `useEmptyPassphrase` and `initSession` intent to the device-only wallet-session flow.
|
|
1552
|
+
* New integrations should prefer `openWalletSession` for explicit wallet intent.
|
|
1553
|
+
*/
|
|
1554
|
+
declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
|
|
1555
|
+
|
|
1556
|
+
declare const OpenWalletSessionMode: {
|
|
1557
|
+
readonly Standard: "standard";
|
|
1558
|
+
readonly SelectHidden: "select-hidden";
|
|
1559
|
+
readonly ResumeHidden: "resume-hidden";
|
|
1560
|
+
};
|
|
1561
|
+
type OpenWalletSessionModeValue = (typeof OpenWalletSessionMode)[keyof typeof OpenWalletSessionMode];
|
|
1562
|
+
type OpenWalletSessionParams = {
|
|
1563
|
+
mode: typeof OpenWalletSessionMode.Standard;
|
|
1564
|
+
deviceId?: never;
|
|
1565
|
+
passphraseState?: never;
|
|
1566
|
+
} | {
|
|
1567
|
+
mode: typeof OpenWalletSessionMode.SelectHidden;
|
|
1568
|
+
deviceId?: never;
|
|
1569
|
+
passphraseState?: never;
|
|
1570
|
+
} | {
|
|
1571
|
+
mode: typeof OpenWalletSessionMode.ResumeHidden;
|
|
1572
|
+
deviceId: string;
|
|
1573
|
+
passphraseState: string;
|
|
1574
|
+
};
|
|
1575
|
+
type OpenWalletSessionPayloadBase = {
|
|
1576
|
+
protocol: 'V1' | 'V2';
|
|
1577
|
+
deviceId: string;
|
|
1578
|
+
resumed: boolean;
|
|
1579
|
+
};
|
|
1580
|
+
type OpenWalletSessionPayload = OpenWalletSessionPayloadBase & ({
|
|
1581
|
+
walletType: 'standard';
|
|
1582
|
+
passphraseState: null;
|
|
1583
|
+
} | {
|
|
1584
|
+
walletType: 'hidden';
|
|
1585
|
+
passphraseState: string;
|
|
1586
|
+
});
|
|
1587
|
+
/**
|
|
1588
|
+
* Opens the standard, hidden, or Attach-to-PIN wallet flow through a unified
|
|
1589
|
+
* Protocol V1/V2 API.
|
|
1590
|
+
*/
|
|
1591
|
+
declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
|
|
1592
|
+
|
|
1593
|
+
type CheckFirmwareReleaseParams = {
|
|
1594
|
+
firmwareType?: EFirmwareType;
|
|
1595
|
+
};
|
|
1596
|
+
declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareReleaseCheckResult | null>;
|
|
1597
|
+
|
|
1598
|
+
declare function checkBLEFirmwareRelease(connectId?: string): Response<FirmwareReleaseCheckResult | null>;
|
|
1599
|
+
|
|
1600
|
+
interface FirmwareUpdateCapabilities {
|
|
1601
|
+
planSchemaVersion: 2;
|
|
1602
|
+
preparedPlanSchemaVersion: 2;
|
|
1603
|
+
hostBindingProtocolVersion: 2;
|
|
1604
|
+
manifestModes: Array<'external-only' | 'sdk-managed'>;
|
|
1605
|
+
supportsArtifactReader: true;
|
|
1606
|
+
}
|
|
1607
|
+
declare function getFirmwareUpdateCapabilities(): FirmwareUpdateCapabilities;
|
|
1608
|
+
|
|
1111
1609
|
declare function promptWebDeviceAccess(options?: {
|
|
1112
1610
|
deviceSerialNumberFromUI?: string;
|
|
1113
1611
|
}): Response<{
|
|
@@ -1167,16 +1665,40 @@ type DeviceSettingsParams = {
|
|
|
1167
1665
|
language?: string;
|
|
1168
1666
|
label?: string;
|
|
1169
1667
|
usePassphrase?: boolean;
|
|
1668
|
+
/** Protocol V1 only. */
|
|
1170
1669
|
homescreen?: string;
|
|
1670
|
+
/** Protocol V1 only. */
|
|
1171
1671
|
passphraseSource?: number;
|
|
1172
1672
|
autoLockDelayMs?: number;
|
|
1673
|
+
/** Protocol V1 only. */
|
|
1173
1674
|
displayRotation?: number;
|
|
1675
|
+
/** Protocol V1 only. */
|
|
1174
1676
|
passphraseAlwaysOnDevice?: boolean;
|
|
1175
|
-
|
|
1677
|
+
/** Protocol V1 only. Uses Enum_SafetyCheckLevel numeric values. */
|
|
1678
|
+
safetyChecks?: Enum_SafetyCheckLevel;
|
|
1679
|
+
/** Protocol V1 only; the current Protocol V2 schema has no matching field. */
|
|
1176
1680
|
experimentalFeatures?: boolean;
|
|
1177
1681
|
autoShutdownDelayMs?: number;
|
|
1682
|
+
/** Protocol V1 only; opens the legacy device-side brightness flow. */
|
|
1178
1683
|
changeBrightness?: boolean;
|
|
1684
|
+
/** Protocol V2 only. */
|
|
1685
|
+
brightness?: number;
|
|
1179
1686
|
hapticFeedback?: boolean;
|
|
1687
|
+
bluetoothEnabled?: boolean;
|
|
1688
|
+
/** Protocol V2 only; changed through an on-device confirmation page. */
|
|
1689
|
+
airgapMode?: boolean;
|
|
1690
|
+
/** Protocol V2 only. */
|
|
1691
|
+
animationEnabled?: boolean;
|
|
1692
|
+
/** Protocol V2 only. */
|
|
1693
|
+
tapToWake?: boolean;
|
|
1694
|
+
/** Protocol V2 only. */
|
|
1695
|
+
deviceNameDisplayEnabled?: boolean;
|
|
1696
|
+
/** Protocol V2 only. */
|
|
1697
|
+
fidoEnabled?: boolean;
|
|
1698
|
+
/** Protocol V2 only. */
|
|
1699
|
+
usbLockEnabled?: boolean;
|
|
1700
|
+
/** Protocol V2 only. */
|
|
1701
|
+
randomKeypad?: boolean;
|
|
1180
1702
|
};
|
|
1181
1703
|
declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
|
|
1182
1704
|
|
|
@@ -1202,7 +1724,7 @@ type DeviceUploadResourceResponse = Success$1 & {
|
|
|
1202
1724
|
declare function deviceUploadResource(connectId: string, params: CommonParams & DeviceUploadResourceParams): Response<DeviceUploadResourceResponse>;
|
|
1203
1725
|
|
|
1204
1726
|
type DeviceSupportFeatures = SupportFeatures & {
|
|
1205
|
-
device: Device | null;
|
|
1727
|
+
device: Device$1 | null;
|
|
1206
1728
|
};
|
|
1207
1729
|
declare function deviceSupportFeatures(connectId?: string): Response<DeviceSupportFeatures>;
|
|
1208
1730
|
|
|
@@ -1211,14 +1733,25 @@ declare function deviceFullyUploadResource(connectId: string, params: CommonPara
|
|
|
1211
1733
|
}): Response<Success$1>;
|
|
1212
1734
|
|
|
1213
1735
|
type DeviceUpdateBootloaderParams = {
|
|
1736
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1737
|
+
hostBindingGeneration?: number;
|
|
1214
1738
|
binary?: ArrayBuffer;
|
|
1739
|
+
/** @deprecated Core derives the bootloader artifact from preparedPlan. */
|
|
1740
|
+
artifact?: FirmwareArtifactReference;
|
|
1741
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1215
1742
|
firmwareType?: EFirmwareType;
|
|
1216
1743
|
};
|
|
1217
1744
|
declare function deviceUpdateBootloader(connectId: string, params?: DeviceUpdateBootloaderParams): Response<Success$1>;
|
|
1218
1745
|
|
|
1219
1746
|
declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1220
1747
|
|
|
1221
|
-
|
|
1748
|
+
type DeviceUnlockParams = {
|
|
1749
|
+
/**
|
|
1750
|
+
* 限定本次解锁允许使用的 PIN 类型。省略时保持兼容行为,仅允许主 PIN。
|
|
1751
|
+
*/
|
|
1752
|
+
pinType?: DeviceSessionPinType;
|
|
1753
|
+
};
|
|
1754
|
+
declare function deviceUnlock(connectId: string, params?: CommonParams & DeviceUnlockParams): Response<Features>;
|
|
1222
1755
|
|
|
1223
1756
|
declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1224
1757
|
|
|
@@ -1422,6 +1955,9 @@ type AllNetworkAddressParams = {
|
|
|
1422
1955
|
type AllNetworkAddressPayload = {
|
|
1423
1956
|
address: string;
|
|
1424
1957
|
pub?: string;
|
|
1958
|
+
/**
|
|
1959
|
+
* @deprecated Use `pub` instead.
|
|
1960
|
+
*/
|
|
1425
1961
|
publicKey?: string;
|
|
1426
1962
|
npub?: string;
|
|
1427
1963
|
} | {
|
|
@@ -1487,6 +2023,9 @@ declare function evmGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
1487
2023
|
type EVMPublicKey = {
|
|
1488
2024
|
path: string;
|
|
1489
2025
|
pub: string;
|
|
2026
|
+
/**
|
|
2027
|
+
* @deprecated Use `pub` instead.
|
|
2028
|
+
*/
|
|
1490
2029
|
publicKey?: string;
|
|
1491
2030
|
} & EthereumPublicKey;
|
|
1492
2031
|
type EVMGetPublicKeyParams = {
|
|
@@ -2270,6 +2809,9 @@ declare function nearSignTransaction(connectId: string, deviceId: string, params
|
|
|
2270
2809
|
type AptosAddress = {
|
|
2271
2810
|
path: string;
|
|
2272
2811
|
pub?: string;
|
|
2812
|
+
/**
|
|
2813
|
+
* @deprecated Use `pub` instead.
|
|
2814
|
+
*/
|
|
2273
2815
|
publicKey?: string;
|
|
2274
2816
|
} & AptosAddress$1;
|
|
2275
2817
|
type AptosGetAddressParams = {
|
|
@@ -2284,6 +2826,9 @@ declare function aptosGetAddress(connectId: string, deviceId: string, params: Co
|
|
|
2284
2826
|
type AptosPublicKey = {
|
|
2285
2827
|
path: string;
|
|
2286
2828
|
pub: string;
|
|
2829
|
+
/**
|
|
2830
|
+
* @deprecated Use `pub` instead.
|
|
2831
|
+
*/
|
|
2287
2832
|
publicKey?: string;
|
|
2288
2833
|
};
|
|
2289
2834
|
type AptosGetPublicKeyParams = {
|
|
@@ -2368,6 +2913,9 @@ declare function cosmosGetAddress(connectId: string, deviceId: string, params: C
|
|
|
2368
2913
|
type CosmosPublicKey = {
|
|
2369
2914
|
path: string;
|
|
2370
2915
|
pub: string;
|
|
2916
|
+
/**
|
|
2917
|
+
* @deprecated Use `pub` instead.
|
|
2918
|
+
*/
|
|
2371
2919
|
publicKey?: string;
|
|
2372
2920
|
};
|
|
2373
2921
|
type CosmosGetPublicKeyParams = {
|
|
@@ -2392,6 +2940,9 @@ declare function cosmosSignTransaction(connectId: string, deviceId: string, para
|
|
|
2392
2940
|
type XrpAddress = {
|
|
2393
2941
|
path: string;
|
|
2394
2942
|
pub?: string;
|
|
2943
|
+
/**
|
|
2944
|
+
* @deprecated Use `pub` instead.
|
|
2945
|
+
*/
|
|
2395
2946
|
publicKey?: string;
|
|
2396
2947
|
address: string;
|
|
2397
2948
|
};
|
|
@@ -2425,6 +2976,9 @@ declare function xrpSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2425
2976
|
type SuiAddress = {
|
|
2426
2977
|
path: string;
|
|
2427
2978
|
pub?: string;
|
|
2979
|
+
/**
|
|
2980
|
+
* @deprecated Use `pub` instead.
|
|
2981
|
+
*/
|
|
2428
2982
|
publicKey?: string;
|
|
2429
2983
|
} & SuiAddress$1;
|
|
2430
2984
|
type SuiGetAddressParams = {
|
|
@@ -2439,6 +2993,9 @@ declare function suiGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
2439
2993
|
type SuiPublicKey = {
|
|
2440
2994
|
path: string;
|
|
2441
2995
|
pub: string;
|
|
2996
|
+
/**
|
|
2997
|
+
* @deprecated Use `pub` instead.
|
|
2998
|
+
*/
|
|
2442
2999
|
publicKey?: string;
|
|
2443
3000
|
};
|
|
2444
3001
|
type SuiGetPublicKeyParams = {
|
|
@@ -2468,6 +3025,10 @@ declare function suiSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2468
3025
|
type CardanoGetAddressMethodParams = {
|
|
2469
3026
|
addressParameters: CardanoAddressParameters;
|
|
2470
3027
|
networkId: number;
|
|
3028
|
+
/**
|
|
3029
|
+
* Testnet cip34:0-1097911063
|
|
3030
|
+
* Mainnet cip34:1-764824073
|
|
3031
|
+
*/
|
|
2471
3032
|
protocolMagic: number;
|
|
2472
3033
|
derivationType: number;
|
|
2473
3034
|
address?: string;
|
|
@@ -2529,6 +3090,10 @@ type CardanoSignMessageMethodParams = {
|
|
|
2529
3090
|
derivationType: number;
|
|
2530
3091
|
networkId: number;
|
|
2531
3092
|
addressType?: Messages.CardanoAddressType;
|
|
3093
|
+
/**
|
|
3094
|
+
* Testnet cip34:0-1097911063
|
|
3095
|
+
* Mainnet cip34:1-764824073
|
|
3096
|
+
*/
|
|
2532
3097
|
protocolMagic?: number;
|
|
2533
3098
|
};
|
|
2534
3099
|
declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
|
|
@@ -2562,6 +3127,9 @@ declare function filecoinSignTransaction(connectId: string, deviceId: string, pa
|
|
|
2562
3127
|
type PolkadotAddress = {
|
|
2563
3128
|
path: string;
|
|
2564
3129
|
pub: string;
|
|
3130
|
+
/**
|
|
3131
|
+
* @deprecated Use `pub` instead.
|
|
3132
|
+
*/
|
|
2565
3133
|
publicKey?: string;
|
|
2566
3134
|
} & PolkadotAddress$1;
|
|
2567
3135
|
type PolkadotGetAddressParams = {
|
|
@@ -2620,23 +3188,61 @@ type KaspaSignInputParams = {
|
|
|
2620
3188
|
sequenceNumber: number | string;
|
|
2621
3189
|
output: {
|
|
2622
3190
|
satoshis: number | string;
|
|
2623
|
-
script
|
|
3191
|
+
script?: string;
|
|
2624
3192
|
};
|
|
2625
3193
|
sigOpCount?: number;
|
|
2626
3194
|
};
|
|
2627
3195
|
type KaspaSignOutputParams = {
|
|
2628
3196
|
satoshis: number | string;
|
|
3197
|
+
address?: string;
|
|
3198
|
+
addressN?: string | number[];
|
|
3199
|
+
script?: string;
|
|
3200
|
+
scriptVersion?: number;
|
|
3201
|
+
};
|
|
3202
|
+
type KaspaStreamingSignInputParams = Omit<KaspaSignInputParams, 'output'> & {
|
|
3203
|
+
output: {
|
|
3204
|
+
satoshis: number | string;
|
|
3205
|
+
script?: string;
|
|
3206
|
+
};
|
|
3207
|
+
};
|
|
3208
|
+
type KaspaStreamingSignOutputParams = {
|
|
3209
|
+
satoshis: number | string;
|
|
3210
|
+
address?: string;
|
|
3211
|
+
addressN?: string | number[];
|
|
3212
|
+
script?: string;
|
|
3213
|
+
scriptVersion?: number;
|
|
3214
|
+
};
|
|
3215
|
+
type KaspaRefTransactionInput = {
|
|
3216
|
+
prevTxId: string;
|
|
3217
|
+
outputIndex: number;
|
|
3218
|
+
sequenceNumber: number | string;
|
|
3219
|
+
};
|
|
3220
|
+
type KaspaRefTransactionOutput = {
|
|
3221
|
+
satoshis: number | string;
|
|
3222
|
+
scriptVersion?: number;
|
|
2629
3223
|
script: string;
|
|
2630
|
-
|
|
3224
|
+
};
|
|
3225
|
+
type KaspaRefTransaction = {
|
|
3226
|
+
txId: string;
|
|
3227
|
+
version: number;
|
|
3228
|
+
inputs: KaspaRefTransactionInput[];
|
|
3229
|
+
outputs: KaspaRefTransactionOutput[];
|
|
3230
|
+
lockTime?: number | string;
|
|
3231
|
+
subNetworkID?: string;
|
|
3232
|
+
gas?: number | string;
|
|
3233
|
+
payload?: string;
|
|
2631
3234
|
};
|
|
2632
3235
|
type KaspaSignTransactionParams = {
|
|
2633
3236
|
version: number;
|
|
2634
|
-
inputs: KaspaSignInputParams
|
|
2635
|
-
outputs: KaspaSignOutputParams
|
|
3237
|
+
inputs: Array<KaspaSignInputParams | KaspaStreamingSignInputParams>;
|
|
3238
|
+
outputs: Array<KaspaSignOutputParams | KaspaStreamingSignOutputParams>;
|
|
2636
3239
|
lockTime: number | string;
|
|
2637
3240
|
sigHashType?: SignatureType;
|
|
2638
3241
|
sigOpCount?: number;
|
|
2639
3242
|
subNetworkID?: string;
|
|
3243
|
+
payload?: string;
|
|
3244
|
+
gas?: number | string;
|
|
3245
|
+
refTxs?: KaspaRefTransaction[];
|
|
2640
3246
|
scheme?: string;
|
|
2641
3247
|
prefix?: string;
|
|
2642
3248
|
useTweak?: boolean;
|
|
@@ -2681,6 +3287,9 @@ declare function nexaSignTransaction(connectId: string, deviceId: string, params
|
|
|
2681
3287
|
type NostrPublicKey = {
|
|
2682
3288
|
npub?: string;
|
|
2683
3289
|
pub?: string;
|
|
3290
|
+
/**
|
|
3291
|
+
* @deprecated Use `pub` instead.
|
|
3292
|
+
*/
|
|
2684
3293
|
publicKey?: string;
|
|
2685
3294
|
path: string;
|
|
2686
3295
|
};
|
|
@@ -2777,6 +3386,9 @@ declare function nostrSignSchnorr(connectId: string, deviceId: string, params: C
|
|
|
2777
3386
|
|
|
2778
3387
|
interface LnurlAuth {
|
|
2779
3388
|
pub?: string;
|
|
3389
|
+
/**
|
|
3390
|
+
* @deprecated Use `pub` instead.
|
|
3391
|
+
*/
|
|
2780
3392
|
publickey?: string;
|
|
2781
3393
|
path?: string;
|
|
2782
3394
|
signature?: string;
|
|
@@ -2853,6 +3465,9 @@ declare function dnxSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2853
3465
|
type TonAddress = {
|
|
2854
3466
|
path: string;
|
|
2855
3467
|
pub: string;
|
|
3468
|
+
/**
|
|
3469
|
+
* @deprecated Use `pub` instead.
|
|
3470
|
+
*/
|
|
2856
3471
|
publicKey?: string;
|
|
2857
3472
|
address: string;
|
|
2858
3473
|
};
|
|
@@ -2964,6 +3579,9 @@ declare function scdoSignTransaction(connectId: string, deviceId: string, params
|
|
|
2964
3579
|
|
|
2965
3580
|
type AlephiumAddress = {
|
|
2966
3581
|
path: string;
|
|
3582
|
+
/**
|
|
3583
|
+
* @deprecated Use `pub` instead.
|
|
3584
|
+
*/
|
|
2967
3585
|
publicKey?: string;
|
|
2968
3586
|
pub?: string;
|
|
2969
3587
|
address: string;
|
|
@@ -3066,35 +3684,54 @@ type NeoSignedTx = {
|
|
|
3066
3684
|
declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
|
|
3067
3685
|
|
|
3068
3686
|
type CoreApi = {
|
|
3687
|
+
/**
|
|
3688
|
+
* Inject function
|
|
3689
|
+
*/
|
|
3069
3690
|
init: typeof init;
|
|
3070
3691
|
on: typeof on;
|
|
3071
3692
|
off: typeof off;
|
|
3072
3693
|
emit: (event: string, ...args: any[]) => void;
|
|
3073
3694
|
removeAllListeners: typeof removeAllListeners;
|
|
3074
|
-
dispose: () => void
|
|
3695
|
+
dispose: () => void | Promise<void>;
|
|
3075
3696
|
call: (params: any) => Promise<any>;
|
|
3697
|
+
/**
|
|
3698
|
+
* Bind a protocol that has already been verified for one transport endpoint.
|
|
3699
|
+
* Every later SDK call for the same connectId uses it as a strict expectation.
|
|
3700
|
+
*/
|
|
3701
|
+
setDeviceConnectProtocol: (connectId: string, connectProtocol: HardwareConnectProtocol | undefined) => void;
|
|
3076
3702
|
uiResponse: typeof uiResponse;
|
|
3077
3703
|
cancel: (connectId?: string) => void;
|
|
3078
|
-
cancelOperation: (operationId: string) => void;
|
|
3079
3704
|
updateSettings: typeof updateSettings;
|
|
3080
3705
|
switchTransport: (env: ConnectSettings['env']) => Promise<{
|
|
3081
3706
|
success: boolean;
|
|
3082
3707
|
}>;
|
|
3083
3708
|
getLogs: typeof getLogs;
|
|
3084
3709
|
clearSessionCache: typeof clearSessionCache;
|
|
3710
|
+
/**
|
|
3711
|
+
* Test function
|
|
3712
|
+
*/
|
|
3085
3713
|
testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
|
|
3714
|
+
testProtocolV2Ping: typeof testProtocolV2Ping;
|
|
3086
3715
|
preInitialize: typeof preInitialize;
|
|
3716
|
+
/**
|
|
3717
|
+
* Core function
|
|
3718
|
+
*/
|
|
3087
3719
|
checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
|
|
3088
3720
|
checkBridgeStatus: typeof checkBridgeStatus;
|
|
3089
3721
|
checkBridgeRelease: typeof checkBridgeRelease;
|
|
3090
3722
|
checkBootloaderRelease: typeof checkBootloaderRelease;
|
|
3091
3723
|
checkFirmwareTypeAvailable: typeof checkFirmwareTypeAvailable;
|
|
3724
|
+
/**
|
|
3725
|
+
* Device function
|
|
3726
|
+
*/
|
|
3092
3727
|
searchDevices: typeof searchDevices;
|
|
3728
|
+
detectDeviceConnectProtocol: typeof detectDeviceConnectProtocol;
|
|
3093
3729
|
promptWebDeviceAccess: typeof promptWebDeviceAccess;
|
|
3094
3730
|
getFeatures: typeof getFeatures;
|
|
3095
|
-
|
|
3731
|
+
getDeviceState: typeof getDeviceState;
|
|
3096
3732
|
getOnekeyFeatures: typeof getOnekeyFeatures;
|
|
3097
3733
|
getPassphraseState: typeof getPassphraseState;
|
|
3734
|
+
openWalletSession: typeof openWalletSession;
|
|
3098
3735
|
deviceBackup: typeof deviceBackup;
|
|
3099
3736
|
deviceChangePin: typeof deviceChangePin;
|
|
3100
3737
|
deviceFlags: typeof deviceFlags;
|
|
@@ -3121,41 +3758,29 @@ type CoreApi = {
|
|
|
3121
3758
|
firmwareUpdateV2: typeof firmwareUpdateV2;
|
|
3122
3759
|
firmwareUpdateV3: typeof firmwareUpdateV3;
|
|
3123
3760
|
firmwareUpdateV4: typeof firmwareUpdateV4;
|
|
3761
|
+
registerFirmwareUpdateHostBinding: typeof registerFirmwareUpdateHostBinding$1;
|
|
3762
|
+
unregisterFirmwareUpdateHostBinding: typeof unregisterFirmwareUpdateHostBinding$1;
|
|
3763
|
+
getFirmwareUpdateHostBindingGeneration: typeof getFirmwareUpdateHostBindingGeneration$1;
|
|
3764
|
+
getFirmwareUpdateCapabilities: typeof getFirmwareUpdateCapabilities;
|
|
3765
|
+
prepareFirmwareUpdatePlan: typeof prepareFirmwareUpdatePlan;
|
|
3766
|
+
validateFirmwareUpdatePreparedPlan: typeof validateFirmwareUpdatePreparedPlan;
|
|
3124
3767
|
cipherKeyValue: typeof cipherKeyValue;
|
|
3125
|
-
|
|
3126
|
-
|
|
3768
|
+
/**
|
|
3769
|
+
* Pro2 business API
|
|
3770
|
+
*/
|
|
3127
3771
|
deviceReboot: typeof deviceReboot;
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
deviceSessionGet: typeof deviceSessionGet;
|
|
3131
|
-
deviceFirmwareUpdate: typeof deviceFirmwareUpdate;
|
|
3132
|
-
deviceGetFirmwareUpdateStatus: typeof deviceGetFirmwareUpdateStatus;
|
|
3133
|
-
deviceFactoryInfoSet: typeof deviceFactoryInfoSet;
|
|
3134
|
-
deviceFactoryInfoGet: typeof deviceFactoryInfoGet;
|
|
3135
|
-
deviceSettingsGet: typeof deviceSettingsGet;
|
|
3136
|
-
deviceSettingsSet: typeof deviceSettingsSet;
|
|
3137
|
-
deviceSettingsPageShow: typeof deviceSettingsPageShow;
|
|
3772
|
+
deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
|
|
3773
|
+
deviceUploadNft: typeof deviceUploadNft;
|
|
3138
3774
|
deviceUploadWallpaper: typeof deviceUploadWallpaper;
|
|
3139
|
-
filesystemPermissionFix: typeof filesystemPermissionFix;
|
|
3140
|
-
fileRead: typeof fileRead;
|
|
3141
|
-
fileWrite: typeof fileWrite;
|
|
3142
|
-
fileDelete: typeof fileDelete;
|
|
3143
|
-
dirList: typeof dirList;
|
|
3144
|
-
dirMake: typeof dirMake;
|
|
3145
|
-
dirRemove: typeof dirRemove;
|
|
3146
|
-
pathInfo: typeof pathInfo;
|
|
3147
|
-
filesystemFileRead: typeof filesystemFileRead;
|
|
3148
|
-
filesystemFileWrite: typeof filesystemFileWrite;
|
|
3149
3775
|
uploadPortfolio: typeof uploadPortfolio;
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
filesystemDirRemove: typeof filesystemDirRemove;
|
|
3154
|
-
filesystemPathInfoQuery: typeof filesystemPathInfoQuery;
|
|
3155
|
-
filesystemFormat: typeof filesystemFormat;
|
|
3156
|
-
filesystemDiskControl: typeof filesystemDiskControl;
|
|
3776
|
+
/**
|
|
3777
|
+
* All network function
|
|
3778
|
+
*/
|
|
3157
3779
|
allNetworkGetAddress: typeof allNetworkGetAddress;
|
|
3158
3780
|
allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
|
|
3781
|
+
/**
|
|
3782
|
+
* EVM function
|
|
3783
|
+
*/
|
|
3159
3784
|
evmGetAddress: typeof evmGetAddress;
|
|
3160
3785
|
evmGetPublicKey: typeof evmGetPublicKey;
|
|
3161
3786
|
evmSignMessage: typeof evmSignMessage;
|
|
@@ -3163,86 +3788,167 @@ type CoreApi = {
|
|
|
3163
3788
|
evmSignTransaction: typeof evmSignTransaction;
|
|
3164
3789
|
evmSignTypedData: typeof evmSignTypedData;
|
|
3165
3790
|
evmVerifyMessage: typeof evmVerifyMessage;
|
|
3791
|
+
/**
|
|
3792
|
+
* BTC function
|
|
3793
|
+
*/
|
|
3166
3794
|
btcGetAddress: typeof btcGetAddress;
|
|
3167
3795
|
btcGetPublicKey: typeof btcGetPublicKey;
|
|
3168
3796
|
btcSignMessage: typeof btcSignMessage;
|
|
3169
3797
|
btcSignPsbt: typeof btcSignPsbt;
|
|
3170
3798
|
btcSignTransaction: typeof btcSignTransaction;
|
|
3171
3799
|
btcVerifyMessage: typeof btcVerifyMessage;
|
|
3800
|
+
/**
|
|
3801
|
+
* Starcoin function
|
|
3802
|
+
*/
|
|
3172
3803
|
starcoinGetAddress: typeof starcoinGetAddress;
|
|
3173
3804
|
starcoinGetPublicKey: typeof starcoinGetPublicKey;
|
|
3174
3805
|
starcoinSignMessage: typeof starcoinSignMessage;
|
|
3175
3806
|
starcoinSignTransaction: typeof starcoinSignTransaction;
|
|
3176
3807
|
starcoinVerifyMessage: typeof starcoinVerifyMessage;
|
|
3808
|
+
/**
|
|
3809
|
+
* Nem function
|
|
3810
|
+
*/
|
|
3177
3811
|
nemGetAddress: typeof nemGetAddress;
|
|
3178
3812
|
nemSignTransaction: typeof nemSignTransaction;
|
|
3813
|
+
/**
|
|
3814
|
+
* Solana function
|
|
3815
|
+
*/
|
|
3179
3816
|
solGetAddress: typeof solGetAddress;
|
|
3180
3817
|
solSignTransaction: typeof solSignTransaction;
|
|
3181
3818
|
solSignOffchainMessage: typeof solSignOffchainMessage;
|
|
3182
3819
|
solSignMessage: typeof solSignMessage;
|
|
3820
|
+
/**
|
|
3821
|
+
* Stellar function
|
|
3822
|
+
*/
|
|
3183
3823
|
stellarGetAddress: typeof stellarGetAddress;
|
|
3184
3824
|
stellarSignTransaction: typeof stellarSignTransaction;
|
|
3825
|
+
/**
|
|
3826
|
+
* Tron function
|
|
3827
|
+
*/
|
|
3185
3828
|
tronGetAddress: typeof tronGetAddress;
|
|
3186
3829
|
tronSignMessage: typeof tronSignMessage;
|
|
3187
3830
|
tronSignTransaction: typeof tronSignTransaction;
|
|
3831
|
+
/**
|
|
3832
|
+
* Conflux function
|
|
3833
|
+
*/
|
|
3188
3834
|
confluxGetAddress: typeof confluxGetAddress;
|
|
3189
3835
|
confluxSignMessage: typeof confluxSignMessage;
|
|
3190
3836
|
confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
|
|
3191
3837
|
confluxSignTransaction: typeof confluxSignTransaction;
|
|
3838
|
+
/**
|
|
3839
|
+
* Near function
|
|
3840
|
+
*/
|
|
3192
3841
|
nearGetAddress: typeof nearGetAddress;
|
|
3193
3842
|
nearSignTransaction: typeof nearSignTransaction;
|
|
3843
|
+
/**
|
|
3844
|
+
* Aptos function
|
|
3845
|
+
*/
|
|
3194
3846
|
aptosGetAddress: typeof aptosGetAddress;
|
|
3195
3847
|
aptosGetPublicKey: typeof aptosGetPublicKey;
|
|
3196
3848
|
aptosSignMessage: typeof aptosSignMessage;
|
|
3197
3849
|
aptosSignInMessage: typeof aptosSignInMessage;
|
|
3198
3850
|
aptosSignTransaction: typeof aptosSignTransaction;
|
|
3851
|
+
/**
|
|
3852
|
+
* Algo function
|
|
3853
|
+
*/
|
|
3199
3854
|
algoGetAddress: typeof algoGetAddress;
|
|
3200
3855
|
algoSignTransaction: typeof algoSignTransaction;
|
|
3856
|
+
/**
|
|
3857
|
+
* Cosmos function
|
|
3858
|
+
*/
|
|
3201
3859
|
cosmosGetAddress: typeof cosmosGetAddress;
|
|
3202
3860
|
cosmosGetPublicKey: typeof cosmosGetPublicKey;
|
|
3203
3861
|
cosmosSignTransaction: typeof cosmosSignTransaction;
|
|
3862
|
+
/**
|
|
3863
|
+
* XRP function
|
|
3864
|
+
*/
|
|
3204
3865
|
xrpGetAddress: typeof xrpGetAddress;
|
|
3205
3866
|
xrpSignTransaction: typeof xrpSignTransaction;
|
|
3867
|
+
/**
|
|
3868
|
+
* SUI function
|
|
3869
|
+
*/
|
|
3206
3870
|
suiGetAddress: typeof suiGetAddress;
|
|
3207
3871
|
suiGetPublicKey: typeof suiGetPublicKey;
|
|
3208
3872
|
suiSignMessage: typeof suiSignMessage;
|
|
3209
3873
|
suiSignTransaction: typeof suiSignTransaction;
|
|
3874
|
+
/**
|
|
3875
|
+
* Cardano function
|
|
3876
|
+
*/
|
|
3210
3877
|
cardanoGetAddress: typeof cardanoGetAddress;
|
|
3211
3878
|
cardanoGetPublicKey: typeof cardanoGetPublicKey;
|
|
3212
3879
|
cardanoSignTransaction: typeof cardanoSignTransaction;
|
|
3213
3880
|
cardanoSignMessage: typeof cardanoSignMessage;
|
|
3881
|
+
/**
|
|
3882
|
+
* Filecoin function
|
|
3883
|
+
*/
|
|
3214
3884
|
filecoinGetAddress: typeof filecoinGetAddress;
|
|
3215
3885
|
filecoinSignTransaction: typeof filecoinSignTransaction;
|
|
3886
|
+
/**
|
|
3887
|
+
* Polkadot function
|
|
3888
|
+
*/
|
|
3216
3889
|
polkadotGetAddress: typeof polkadotGetAddress;
|
|
3217
3890
|
polkadotSignTransaction: typeof polkadotSignTransaction;
|
|
3891
|
+
/**
|
|
3892
|
+
* Kaspa function
|
|
3893
|
+
*/
|
|
3218
3894
|
kaspaGetAddress: typeof kaspaGetAddress;
|
|
3219
3895
|
kaspaSignTransaction: typeof kaspaSignTransaction;
|
|
3896
|
+
/**
|
|
3897
|
+
* nexa function
|
|
3898
|
+
*/
|
|
3220
3899
|
nexaGetAddress: typeof nexaGetAddress;
|
|
3221
3900
|
nexaSignTransaction: typeof nexaSignTransaction;
|
|
3901
|
+
/**
|
|
3902
|
+
* Nostr function
|
|
3903
|
+
*/
|
|
3222
3904
|
nostrGetPublicKey: typeof nostrGetPublicKey;
|
|
3223
3905
|
nostrSignEvent: typeof nostrSignEvent;
|
|
3224
3906
|
nostrEncryptMessage: typeof nostrEncryptMessage;
|
|
3225
3907
|
nostrDecryptMessage: typeof nostrDecryptMessage;
|
|
3226
3908
|
nostrSignSchnorr: typeof nostrSignSchnorr;
|
|
3909
|
+
/**
|
|
3910
|
+
* Lightning Network
|
|
3911
|
+
*/
|
|
3227
3912
|
lnurlAuth: typeof lnurlAuth;
|
|
3913
|
+
/**
|
|
3914
|
+
* Nervos Network
|
|
3915
|
+
*/
|
|
3228
3916
|
nervosGetAddress: typeof nervosGetAddress;
|
|
3229
3917
|
nervosSignTransaction: typeof nervosSignTransaction;
|
|
3918
|
+
/**
|
|
3919
|
+
* Dnx Network
|
|
3920
|
+
*/
|
|
3230
3921
|
dnxGetAddress: typeof dnxGetAddress;
|
|
3231
3922
|
dnxSignTransaction: typeof dnxSignTransaction;
|
|
3923
|
+
/**
|
|
3924
|
+
* TON Network
|
|
3925
|
+
*/
|
|
3232
3926
|
tonGetAddress: typeof tonGetAddress;
|
|
3233
3927
|
tonSignMessage: typeof tonSignMessage;
|
|
3234
3928
|
tonSignProof: typeof tonSignProof;
|
|
3235
3929
|
tonSignData: typeof tonSignData;
|
|
3930
|
+
/**
|
|
3931
|
+
* SCDO Network
|
|
3932
|
+
*/
|
|
3236
3933
|
scdoGetAddress: typeof scdoGetAddress;
|
|
3237
3934
|
scdoSignMessage: typeof scdoSignMessage;
|
|
3238
3935
|
scdoSignTransaction: typeof scdoSignTransaction;
|
|
3936
|
+
/**
|
|
3937
|
+
* Alephium Network
|
|
3938
|
+
*/
|
|
3239
3939
|
alephiumGetAddress: typeof alephiumGetAddress;
|
|
3240
3940
|
alephiumSignMessage: typeof alephiumSignMessage;
|
|
3241
3941
|
alephiumSignTransaction: typeof alephiumSignTransaction;
|
|
3942
|
+
/**
|
|
3943
|
+
* Benfen Network
|
|
3944
|
+
*/
|
|
3242
3945
|
benfenGetAddress: typeof benfenGetAddress;
|
|
3243
3946
|
benfenGetPublicKey: typeof benfenGetPublicKey;
|
|
3244
3947
|
benfenSignTransaction: typeof benfenSignTransaction;
|
|
3245
3948
|
benfenSignMessage: typeof benfenSignMessage;
|
|
3949
|
+
/**
|
|
3950
|
+
* Neo Network
|
|
3951
|
+
*/
|
|
3246
3952
|
neoGetAddress: typeof neoGetAddress;
|
|
3247
3953
|
neoSignTransaction: typeof neoSignTransaction;
|
|
3248
3954
|
};
|
|
@@ -3315,13 +4021,17 @@ declare const DEVICE: {
|
|
|
3315
4021
|
readonly LOADING: "device-loading";
|
|
3316
4022
|
readonly BUTTON: "button";
|
|
3317
4023
|
readonly PIN: "pin";
|
|
4024
|
+
readonly PIN_ON_DEVICE: "pin_on_device";
|
|
4025
|
+
readonly PIN_ON_DEVICE_COMPLETE: "pin_on_device_complete";
|
|
3318
4026
|
readonly PASSPHRASE: "passphrase";
|
|
3319
4027
|
readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
|
|
4028
|
+
readonly ATTACH_PIN_ON_DEVICE: "attach_pin_on_device";
|
|
3320
4029
|
readonly WORD: "word";
|
|
3321
4030
|
readonly SUPPORT_FEATURES: "support_features";
|
|
3322
4031
|
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
|
|
3323
4032
|
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "select_device_for_switch_firmware_web_device";
|
|
3324
4033
|
readonly FEATURES: "features";
|
|
4034
|
+
readonly STATE: "state";
|
|
3325
4035
|
};
|
|
3326
4036
|
interface DeviceConnnectRequest {
|
|
3327
4037
|
type: typeof DEVICE.CONNECT;
|
|
@@ -3340,6 +4050,11 @@ interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'
|
|
|
3340
4050
|
}
|
|
3341
4051
|
type PassphraseRequestPayload = {
|
|
3342
4052
|
existsAttachPinUser?: boolean;
|
|
4053
|
+
deviceOnly?: boolean;
|
|
4054
|
+
source?: 'wallet-session-coordinator';
|
|
4055
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
4056
|
+
expectedPassphraseState?: string;
|
|
4057
|
+
interaction?: HardwareUiInteractionMeta;
|
|
3343
4058
|
};
|
|
3344
4059
|
interface DeviceButtonRequest {
|
|
3345
4060
|
type: typeof DEVICE.BUTTON;
|
|
@@ -3352,6 +4067,10 @@ interface DeviceSendFeatures {
|
|
|
3352
4067
|
type: typeof DEVICE.FEATURES;
|
|
3353
4068
|
payload: DeviceFeaturesPayload;
|
|
3354
4069
|
}
|
|
4070
|
+
interface DeviceSendState {
|
|
4071
|
+
type: typeof DEVICE.STATE;
|
|
4072
|
+
payload: DeviceStateEvent;
|
|
4073
|
+
}
|
|
3355
4074
|
type DeviceSupportFeaturesPayload = SupportFeatures & {
|
|
3356
4075
|
device: KnownDevice | null;
|
|
3357
4076
|
};
|
|
@@ -3359,13 +4078,58 @@ interface DeviceSendSupportFeatures {
|
|
|
3359
4078
|
type: typeof DEVICE.SUPPORT_FEATURES;
|
|
3360
4079
|
payload: DeviceSupportFeaturesPayload;
|
|
3361
4080
|
}
|
|
3362
|
-
type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
4081
|
+
type DeviceEvent = DeviceButtonRequest | DeviceSendState | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
3363
4082
|
type DeviceEventMessage = DeviceEvent & {
|
|
3364
4083
|
event: typeof DEVICE_EVENT;
|
|
3365
4084
|
};
|
|
3366
4085
|
type DeviceEventListenerFn = (type: typeof DEVICE_EVENT, cb: (event: DeviceEventMessage) => void) => void;
|
|
3367
4086
|
declare const createDeviceMessage: MessageFactoryFn<typeof DEVICE_EVENT, DeviceEvent>;
|
|
3368
4087
|
|
|
4088
|
+
declare const UI_RESPONSE: {
|
|
4089
|
+
readonly RECEIVE_PIN: "ui-receive_pin";
|
|
4090
|
+
readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
|
|
4091
|
+
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
|
|
4092
|
+
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "ui-receive_select-device-for-switch-firmware-web-device";
|
|
4093
|
+
};
|
|
4094
|
+
interface UiResponseCorrelation {
|
|
4095
|
+
interactionId: string;
|
|
4096
|
+
deviceId: string;
|
|
4097
|
+
}
|
|
4098
|
+
interface UiResponseCorrelationFields {
|
|
4099
|
+
interactionId?: string;
|
|
4100
|
+
deviceId?: string;
|
|
4101
|
+
}
|
|
4102
|
+
interface UiResponsePin extends UiResponseCorrelationFields {
|
|
4103
|
+
type: typeof UI_RESPONSE.RECEIVE_PIN;
|
|
4104
|
+
payload: string;
|
|
4105
|
+
}
|
|
4106
|
+
interface UiResponsePassphrase extends UiResponseCorrelationFields {
|
|
4107
|
+
type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
|
|
4108
|
+
payload: {
|
|
4109
|
+
value: string;
|
|
4110
|
+
passphraseOnDevice?: boolean;
|
|
4111
|
+
attachPinOnDevice?: boolean;
|
|
4112
|
+
save?: boolean;
|
|
4113
|
+
};
|
|
4114
|
+
}
|
|
4115
|
+
interface UiResponseSelectDeviceInBootloaderForWebDevice {
|
|
4116
|
+
type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
4117
|
+
payload: {
|
|
4118
|
+
deviceId: string;
|
|
4119
|
+
};
|
|
4120
|
+
}
|
|
4121
|
+
interface UiResponseSelectDeviceForSwitchFirmwareWebDevice {
|
|
4122
|
+
type: typeof UI_RESPONSE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
|
|
4123
|
+
payload: {
|
|
4124
|
+
deviceId: string;
|
|
4125
|
+
};
|
|
4126
|
+
}
|
|
4127
|
+
type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice | UiResponseSelectDeviceForSwitchFirmwareWebDevice;
|
|
4128
|
+
type UiResponseMessage = UiResponseEvent & {
|
|
4129
|
+
event: typeof UI_EVENT;
|
|
4130
|
+
};
|
|
4131
|
+
declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
|
|
4132
|
+
|
|
3369
4133
|
declare const UI_EVENT = "UI_EVENT";
|
|
3370
4134
|
declare const UI_REQUEST: {
|
|
3371
4135
|
readonly REQUEST_PIN: "ui-request_pin";
|
|
@@ -3400,8 +4164,43 @@ declare const UI_REQUEST: {
|
|
|
3400
4164
|
readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
|
|
3401
4165
|
readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
|
|
3402
4166
|
};
|
|
4167
|
+
type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
|
|
4168
|
+
type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
|
|
4169
|
+
type HardwareUiInteractionMeta = {
|
|
4170
|
+
interactionId: string;
|
|
4171
|
+
phaseId: string;
|
|
4172
|
+
sequence: number;
|
|
4173
|
+
phase: 'pin' | 'passphrase' | 'passphrase-on-device' | 'button' | 'processing';
|
|
4174
|
+
transition: 'start' | 'complete' | 'finish';
|
|
4175
|
+
outcome?: 'submitted' | 'succeeded' | 'failed' | 'cancelled' | 'disconnected';
|
|
4176
|
+
protocol: 'V2';
|
|
4177
|
+
device?: Device$1;
|
|
4178
|
+
};
|
|
4179
|
+
type ProtocolV2UiEventMetadata = {
|
|
4180
|
+
source?: ProtocolV2UiEventSource;
|
|
4181
|
+
reason?: string;
|
|
4182
|
+
deviceOnly?: boolean;
|
|
4183
|
+
completion?: ProtocolV2UiCompletion;
|
|
4184
|
+
method?: string;
|
|
4185
|
+
page?: string | number;
|
|
4186
|
+
operation?: string;
|
|
4187
|
+
interaction?: HardwareUiInteractionMeta;
|
|
4188
|
+
};
|
|
4189
|
+
type UiRequestWindowClose = {
|
|
4190
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
|
|
4191
|
+
payload: HardwareUiInteractionMeta;
|
|
4192
|
+
} | {
|
|
4193
|
+
type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
|
|
4194
|
+
payload: HardwareUiInteractionMeta;
|
|
4195
|
+
} | {
|
|
4196
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
|
|
4197
|
+
payload?: undefined;
|
|
4198
|
+
} | {
|
|
4199
|
+
type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
|
|
4200
|
+
payload?: undefined;
|
|
4201
|
+
};
|
|
3403
4202
|
interface UiRequestWithoutPayload {
|
|
3404
|
-
type: typeof UI_REQUEST.
|
|
4203
|
+
type: typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.BLUETOOTH_UNSUPPORTED | typeof UI_REQUEST.BLUETOOTH_POWERED_OFF | typeof UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE | typeof UI_REQUEST.LOCATION_PERMISSION | typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION | typeof UI_REQUEST.FIRMWARE_PROCESSING | typeof UI_REQUEST.WEB_DEVICE_PROMPT_ACCESS_PERMISSION;
|
|
3405
4204
|
payload?: typeof undefined;
|
|
3406
4205
|
}
|
|
3407
4206
|
interface UiRequestFirmwareProgressing {
|
|
@@ -3412,40 +4211,50 @@ interface UiRequestFirmwareProgressing {
|
|
|
3412
4211
|
}
|
|
3413
4212
|
type UiRequestDeviceAction = {
|
|
3414
4213
|
type: typeof UI_REQUEST.REQUEST_PIN;
|
|
3415
|
-
payload: {
|
|
3416
|
-
device: Device;
|
|
4214
|
+
payload: ProtocolV2UiEventMetadata & {
|
|
4215
|
+
device: Device$1;
|
|
3417
4216
|
type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
|
|
4217
|
+
responseCorrelation?: UiResponseCorrelation;
|
|
3418
4218
|
};
|
|
3419
4219
|
};
|
|
3420
4220
|
interface UiRequestButton {
|
|
3421
4221
|
type: typeof UI_REQUEST.REQUEST_BUTTON;
|
|
3422
|
-
payload: DeviceButtonRequest['payload'];
|
|
4222
|
+
payload: DeviceButtonRequest['payload'] & ProtocolV2UiEventMetadata;
|
|
3423
4223
|
}
|
|
3424
4224
|
interface UiRequestPassphrase {
|
|
3425
4225
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
|
|
3426
4226
|
payload: {
|
|
3427
|
-
device: Device;
|
|
4227
|
+
device: Device$1;
|
|
3428
4228
|
passphraseState?: string;
|
|
3429
4229
|
existsAttachPinUser?: boolean;
|
|
4230
|
+
deviceOnly?: boolean;
|
|
4231
|
+
source?: 'wallet-session-coordinator';
|
|
4232
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
4233
|
+
expectedPassphraseState?: string;
|
|
4234
|
+
interaction?: HardwareUiInteractionMeta;
|
|
4235
|
+
responseCorrelation?: UiResponseCorrelation;
|
|
3430
4236
|
};
|
|
3431
4237
|
}
|
|
3432
4238
|
interface UiRequestPassphraseOnDevice {
|
|
3433
4239
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
|
|
3434
4240
|
payload: {
|
|
3435
|
-
device: Device;
|
|
4241
|
+
device: Device$1;
|
|
3436
4242
|
passphraseState?: string;
|
|
4243
|
+
source?: 'wallet-session-coordinator';
|
|
4244
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
4245
|
+
interaction?: HardwareUiInteractionMeta;
|
|
3437
4246
|
};
|
|
3438
4247
|
}
|
|
3439
4248
|
interface UiRequestSelectDeviceInBootloaderForWebDevice {
|
|
3440
4249
|
type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
3441
4250
|
payload: {
|
|
3442
|
-
device: Device;
|
|
4251
|
+
device: Device$1;
|
|
3443
4252
|
};
|
|
3444
4253
|
}
|
|
3445
4254
|
interface UiRequestSelectDeviceForSwitchFirmwareWebDevice {
|
|
3446
4255
|
type: typeof UI_REQUEST.REQUEST_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
|
|
3447
4256
|
payload: {
|
|
3448
|
-
device: Device;
|
|
4257
|
+
device: Device$1;
|
|
3449
4258
|
};
|
|
3450
4259
|
}
|
|
3451
4260
|
interface FirmwareProcessing {
|
|
@@ -3458,7 +4267,7 @@ type IFirmwareUpdateProgressType = 'transferData' | 'installingFirmware';
|
|
|
3458
4267
|
interface FirmwareProgress {
|
|
3459
4268
|
type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
|
|
3460
4269
|
payload: {
|
|
3461
|
-
device: Device;
|
|
4270
|
+
device: Device$1;
|
|
3462
4271
|
progress: number;
|
|
3463
4272
|
progressType: IFirmwareUpdateProgressType;
|
|
3464
4273
|
transferredBytes?: number;
|
|
@@ -3470,7 +4279,7 @@ interface FirmwareProgress {
|
|
|
3470
4279
|
interface FirmwareTip {
|
|
3471
4280
|
type: typeof UI_REQUEST.FIRMWARE_TIP;
|
|
3472
4281
|
payload: {
|
|
3473
|
-
device: Device;
|
|
4282
|
+
device: Device$1;
|
|
3474
4283
|
data: {
|
|
3475
4284
|
message: string;
|
|
3476
4285
|
};
|
|
@@ -3489,14 +4298,14 @@ interface DeviceProgress {
|
|
|
3489
4298
|
interface PreviousAddressResult {
|
|
3490
4299
|
type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
|
|
3491
4300
|
payload: {
|
|
3492
|
-
device: Device;
|
|
4301
|
+
device: Device$1;
|
|
3493
4302
|
data: {
|
|
3494
4303
|
address?: string;
|
|
3495
4304
|
path?: string;
|
|
3496
4305
|
};
|
|
3497
4306
|
};
|
|
3498
4307
|
}
|
|
3499
|
-
type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
|
|
4308
|
+
type UiEvent = UiRequestWithoutPayload | UiRequestWindowClose | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
|
|
3500
4309
|
declare enum FirmwareUpdateTipMessage {
|
|
3501
4310
|
CheckLatestUiResource = "CheckLatestUiResource",
|
|
3502
4311
|
StartDownloadFirmware = "StartDownloadFirmware",
|
|
@@ -3535,7 +4344,6 @@ declare const IFRAME: {
|
|
|
3535
4344
|
readonly INIT_BRIDGE: "iframe-init-bridge";
|
|
3536
4345
|
readonly CALL: "iframe-call";
|
|
3537
4346
|
readonly CANCEL: "iframe-cancel";
|
|
3538
|
-
readonly CANCEL_OPERATION: "iframe-cancel-operation";
|
|
3539
4347
|
readonly SWITCH_TRANSPORT: "iframe-switch-transport";
|
|
3540
4348
|
readonly CALLBACK: "iframe-callback";
|
|
3541
4349
|
};
|
|
@@ -3604,13 +4412,6 @@ interface IFrameCancelMessage {
|
|
|
3604
4412
|
connectId?: string;
|
|
3605
4413
|
};
|
|
3606
4414
|
}
|
|
3607
|
-
interface IFrameCancelOperationMessage {
|
|
3608
|
-
event: typeof IFRAME.CANCEL_OPERATION;
|
|
3609
|
-
type: typeof IFRAME.CANCEL_OPERATION;
|
|
3610
|
-
payload: {
|
|
3611
|
-
operationId: string;
|
|
3612
|
-
};
|
|
3613
|
-
}
|
|
3614
4415
|
interface IFrameSwitchTransportMessage {
|
|
3615
4416
|
event: typeof IFRAME.SWITCH_TRANSPORT;
|
|
3616
4417
|
type: typeof IFRAME.SWITCH_TRANSPORT;
|
|
@@ -3638,43 +4439,6 @@ interface MethodResponseMessage {
|
|
|
3638
4439
|
declare const createResponseMessage: (id: number, success: boolean, payload: any) => MethodResponseMessage;
|
|
3639
4440
|
type CallMethodKeys = keyof CoreApi;
|
|
3640
4441
|
|
|
3641
|
-
declare const UI_RESPONSE: {
|
|
3642
|
-
readonly RECEIVE_PIN: "ui-receive_pin";
|
|
3643
|
-
readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
|
|
3644
|
-
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
|
|
3645
|
-
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "ui-receive_select-device-for-switch-firmware-web-device";
|
|
3646
|
-
};
|
|
3647
|
-
interface UiResponsePin {
|
|
3648
|
-
type: typeof UI_RESPONSE.RECEIVE_PIN;
|
|
3649
|
-
payload: string;
|
|
3650
|
-
}
|
|
3651
|
-
interface UiResponsePassphrase {
|
|
3652
|
-
type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
|
|
3653
|
-
payload: {
|
|
3654
|
-
value: string;
|
|
3655
|
-
passphraseOnDevice?: boolean;
|
|
3656
|
-
attachPinOnDevice?: boolean;
|
|
3657
|
-
save?: boolean;
|
|
3658
|
-
};
|
|
3659
|
-
}
|
|
3660
|
-
interface UiResponseSelectDeviceInBootloaderForWebDevice {
|
|
3661
|
-
type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
3662
|
-
payload: {
|
|
3663
|
-
deviceId: string;
|
|
3664
|
-
};
|
|
3665
|
-
}
|
|
3666
|
-
interface UiResponseSelectDeviceForSwitchFirmwareWebDevice {
|
|
3667
|
-
type: typeof UI_RESPONSE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
|
|
3668
|
-
payload: {
|
|
3669
|
-
deviceId: string;
|
|
3670
|
-
};
|
|
3671
|
-
}
|
|
3672
|
-
type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice | UiResponseSelectDeviceForSwitchFirmwareWebDevice;
|
|
3673
|
-
type UiResponseMessage = UiResponseEvent & {
|
|
3674
|
-
event: typeof UI_EVENT;
|
|
3675
|
-
};
|
|
3676
|
-
declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
|
|
3677
|
-
|
|
3678
4442
|
declare const LOG_EVENT = "LOG_EVENT";
|
|
3679
4443
|
declare const LOG: {
|
|
3680
4444
|
readonly OUTPUT: "log-output";
|
|
@@ -3737,7 +4501,7 @@ declare const CORE_EVENT = "CORE_EVENT";
|
|
|
3737
4501
|
type CoreMessage = {
|
|
3738
4502
|
id?: string;
|
|
3739
4503
|
success?: true | false;
|
|
3740
|
-
} & (IFrameEventMessage | IFrameCallMessage | IFrameCancelMessage |
|
|
4504
|
+
} & (IFrameEventMessage | IFrameCallMessage | IFrameCancelMessage | IFrameSwitchTransportMessage | IFrameCallbackMessage | UiResponseMessage | UiEventMessage | DeviceEventMessage | LogEventMessage | FirmwareMessage);
|
|
3741
4505
|
type PostMessageEvent = MessageEvent<any>;
|
|
3742
4506
|
declare const parseMessage: (messageData: any) => CoreMessage;
|
|
3743
4507
|
declare const createErrorMessage: (error: Error & {
|
|
@@ -3750,10 +4514,14 @@ type UiPromiseResponse = UiResponseEvent | {
|
|
|
3750
4514
|
};
|
|
3751
4515
|
type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
|
|
3752
4516
|
type: T;
|
|
3753
|
-
}>, T, Device
|
|
4517
|
+
}>, T, Device> & {
|
|
4518
|
+
responseCorrelation?: UiResponseCorrelation;
|
|
4519
|
+
};
|
|
3754
4520
|
|
|
3755
4521
|
declare const LogBlockEvent: Set<string>;
|
|
3756
4522
|
declare function getLogBlockLabel(message: unknown): string | undefined;
|
|
4523
|
+
declare function getSafeLogPayload(value: unknown, blockLabel?: string): unknown;
|
|
4524
|
+
declare function formatLogMethodLabel(label: string, methodName?: string): string;
|
|
3757
4525
|
|
|
3758
4526
|
declare const executeCallback: (id: string, ...args: any[]) => void;
|
|
3759
4527
|
declare const cleanupCallback: (id: string) => void;
|
|
@@ -3766,7 +4534,6 @@ interface InjectApi {
|
|
|
3766
4534
|
dispose: CoreApi['dispose'];
|
|
3767
4535
|
uiResponse: CoreApi['uiResponse'];
|
|
3768
4536
|
cancel: CoreApi['cancel'];
|
|
3769
|
-
cancelOperation: CoreApi['cancelOperation'];
|
|
3770
4537
|
switchTransport: CoreApi['switchTransport'];
|
|
3771
4538
|
}
|
|
3772
4539
|
|
|
@@ -3818,30 +4585,109 @@ declare enum LoggerNames {
|
|
|
3818
4585
|
}
|
|
3819
4586
|
declare const getLogger: (key: LoggerNames) => Log;
|
|
3820
4587
|
|
|
3821
|
-
|
|
4588
|
+
type HttpRequestOptions = {
|
|
4589
|
+
/** Additional request headers, such as a byte range for package metadata reads. */
|
|
4590
|
+
headers?: Record<string, string>;
|
|
4591
|
+
/** Axios adapter-defined request timeout retained for existing opt-in callers. */
|
|
4592
|
+
timeoutMs?: number;
|
|
4593
|
+
/** Deadline for DNS, connection, TLS, redirects, and the first response-body progress. */
|
|
4594
|
+
connectTimeoutMs?: number;
|
|
4595
|
+
/** Maximum idle interval between response-body progress events. */
|
|
4596
|
+
readTimeoutMs?: number;
|
|
4597
|
+
/** Wall-clock deadline across all attempts and retry backoff. */
|
|
4598
|
+
overallTimeoutMs?: number;
|
|
4599
|
+
maxRetries?: number;
|
|
4600
|
+
retryDelayMs?: number;
|
|
4601
|
+
};
|
|
4602
|
+
|
|
4603
|
+
declare const httpRequest: (url: string, type: string, options?: HttpRequestOptions) => any;
|
|
3822
4604
|
declare const getTimeStamp: () => number;
|
|
3823
4605
|
|
|
4606
|
+
/**
|
|
4607
|
+
* Validates version string
|
|
4608
|
+
* @param {string} version Version string
|
|
4609
|
+
* @returns {boolean} True if version string is valid, false if not
|
|
4610
|
+
*/
|
|
3824
4611
|
declare const isValidVersionString: (version: string) => boolean;
|
|
4612
|
+
/**
|
|
4613
|
+
* Validates a version array
|
|
4614
|
+
* @param {number[]} version Version array
|
|
4615
|
+
* @returns {boolean} True if version array is valid, false if not
|
|
4616
|
+
*/
|
|
3825
4617
|
declare const isValidVersionArray: (version: number[]) => boolean;
|
|
4618
|
+
/**
|
|
4619
|
+
* Fills the missing version numbers with zeros (ie: [1, 2] will become [1, 2, 0])
|
|
4620
|
+
* @param {number[]} version Version array
|
|
4621
|
+
* @returns {number[]} Version array with all positions filled
|
|
4622
|
+
*/
|
|
3826
4623
|
declare const normalizeVersionArray: (version: number[]) => number[];
|
|
4624
|
+
/**
|
|
4625
|
+
* Returns a valid version array from a version string
|
|
4626
|
+
* @param {string} version Version string
|
|
4627
|
+
* @returns {number[]} Version array
|
|
4628
|
+
*/
|
|
3827
4629
|
declare const versionSplit: (version: string) => number[];
|
|
4630
|
+
/**
|
|
4631
|
+
* Compares two versions and returns if the version is newer (1), older (-1) or equal (0).
|
|
4632
|
+
* @param {string | number[]} a Version to compare from
|
|
4633
|
+
* @param {string | number[]} b Version to compare with
|
|
4634
|
+
* @returns {number} Returns 1 if newer, -1 if older and 0 if equal
|
|
4635
|
+
*/
|
|
3828
4636
|
declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
|
|
3829
4637
|
|
|
3830
|
-
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<"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<"FilesystemFile"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"BlurRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarInvokeHostFunctionOp"> | TypedResponseMessage<"StellarSorobanDataRequest"> | TypedResponseMessage<"StellarSorobanDataAck"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TonSignData"> | TypedResponseMessage<"TonSignedData"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry"> | TypedResponseMessage<"experimental_message"> | TypedResponseMessage<"experimental_field"> | TypedResponseMessage<"TxAckPaymentRequest"> | TypedResponseMessage<"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<"DeviceSessionPinResult"> | TypedResponseMessage<"DeviceStatusGet"> | TypedResponseMessage<"DevGetOnboardingStatus"> | TypedResponseMessage<"DevOnboardingStatus"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"PortfolioUpdate">;
|
|
4638
|
+
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceStatus"> | TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"ProtocolInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"DeviceFirmwareUpdateStatus"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoDRep"> | TypedResponseMessage<"CardanoCVoteRegistrationDelegation"> | TypedResponseMessage<"CardanoCVoteRegistrationParametersType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"DnxTxKey"> | TypedResponseMessage<"DnxComputedKeyImage"> | TypedResponseMessage<"EmmcFile"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMemberOneKey"> | TypedResponseMessage<"EthereumFieldTypeOneKey"> | TypedResponseMessage<"EthereumDefinitions"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessListOneKey"> | TypedResponseMessage<"EthereumAuthorizationOneKey"> | TypedResponseMessage<"EthereumAuthorizationSignature"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"KaspaTxRequestSignature"> | TypedResponseMessage<"KaspaOutpoint"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"SolanaTxATADetails"> | TypedResponseMessage<"SolanaTxExtraInfo"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"CoinJoinRequest"> | TypedResponseMessage<"PaymentRequestMemo"> | TypedResponseMessage<"TextMemo"> | TypedResponseMessage<"RefundMemo"> | TypedResponseMessage<"CoinPurchaseMemo"> | TypedResponseMessage<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"OnboardingSetupStatus"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"ViewRawData"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaTxRequest"> | TypedResponseMessage<"KaspaTxAckInput"> | TypedResponseMessage<"KaspaTxAckOutput"> | TypedResponseMessage<"KaspaTxAckPayloadChunk"> | TypedResponseMessage<"KaspaTxAckPrevMeta"> | TypedResponseMessage<"KaspaTxAckPrevInput"> | TypedResponseMessage<"KaspaTxAckPrevOutput"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"BlurRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarInvokeHostFunctionOp"> | TypedResponseMessage<"StellarSorobanDataRequest"> | TypedResponseMessage<"StellarSorobanDataAck"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TonSignData"> | TypedResponseMessage<"TonSignedData"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry"> | TypedResponseMessage<"experimental_message"> | TypedResponseMessage<"experimental_field"> | TypedResponseMessage<"TxAckPaymentRequest"> | TypedResponseMessage<"EthereumSignTypedDataQR"> | TypedResponseMessage<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"UiAnimationRequest"> | TypedResponseMessage<"ProtocolInfoRequest"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DeviceSettingsGet"> | TypedResponseMessage<"DeviceSettingsSet"> | TypedResponseMessage<"DeviceSettingsPageShow"> | TypedResponseMessage<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceMiscUsbMscControl"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionGet"> | TypedResponseMessage<"DeviceSessionAskPin"> | TypedResponseMessage<"DeviceSessionAskPassphrase"> | TypedResponseMessage<"DeviceStatusGet"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"InternalMyAddressRequest"> | TypedResponseMessage<"NftUpdate"> | TypedResponseMessage<"OnboardingStatusGet"> | TypedResponseMessage<"OnboardingStatus"> | TypedResponseMessage<"PortfolioUpdate"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage">;
|
|
3831
4639
|
|
|
3832
|
-
|
|
4640
|
+
type DeviceFeaturesInput = Features | Messages.Features;
|
|
4641
|
+
|
|
4642
|
+
/**
|
|
4643
|
+
* get device type by features
|
|
4644
|
+
*/
|
|
4645
|
+
declare const getDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
|
|
4646
|
+
/**
|
|
4647
|
+
* get device type by ble name
|
|
4648
|
+
* @param name Ble name
|
|
4649
|
+
*/
|
|
3833
4650
|
declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3838
|
-
declare const
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
declare const
|
|
3843
|
-
|
|
3844
|
-
|
|
4651
|
+
/**
|
|
4652
|
+
* Get Connected Device ble name by features
|
|
4653
|
+
* @returns
|
|
4654
|
+
*/
|
|
4655
|
+
declare const getDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
|
|
4656
|
+
/**
|
|
4657
|
+
* Get Connected Device serial number by features
|
|
4658
|
+
*/
|
|
4659
|
+
declare const getDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
|
|
4660
|
+
/**
|
|
4661
|
+
* @deprecated Use getDeviceSerialNo instead.
|
|
4662
|
+
*/
|
|
4663
|
+
declare const getDeviceUUID: (features?: DeviceFeaturesInput) => string;
|
|
4664
|
+
/**
|
|
4665
|
+
* Get Connected Device label by features
|
|
4666
|
+
*/
|
|
4667
|
+
declare const getDeviceLabel: (features?: DeviceFeaturesInput) => string | null;
|
|
4668
|
+
/**
|
|
4669
|
+
* Get firmware version range by features
|
|
4670
|
+
* Type has a higher priority than Model
|
|
4671
|
+
*/
|
|
4672
|
+
declare const getMethodVersionRange: (features: DeviceFeaturesInput | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
|
|
4673
|
+
declare const getFirmwareType: (features?: DeviceFeaturesInput) => _onekeyfe_hd_shared.EFirmwareType;
|
|
4674
|
+
|
|
4675
|
+
/**
|
|
4676
|
+
* Get Connected Device version by features
|
|
4677
|
+
*/
|
|
4678
|
+
declare const getDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4679
|
+
/**
|
|
4680
|
+
* Get Connected Device bootloader version by features
|
|
4681
|
+
*/
|
|
4682
|
+
declare const getDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4683
|
+
/**
|
|
4684
|
+
* Get Connected Device boardloader/romloader version by features
|
|
4685
|
+
*/
|
|
4686
|
+
declare const getDeviceBoardloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4687
|
+
/**
|
|
4688
|
+
* Get Connected Device bluetooth firmware version by features
|
|
4689
|
+
*/
|
|
4690
|
+
declare const getDeviceBLEFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
3845
4691
|
|
|
3846
4692
|
declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v1", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
|
|
3847
4693
|
type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
|
|
@@ -3849,7 +4695,7 @@ type ProtocolV1MessageSchema = 'v1CurrentSchema' | 'v1LegacySchema';
|
|
|
3849
4695
|
type ProtobufMessageSchema = ProtocolV1MessageSchema | 'v2Schema';
|
|
3850
4696
|
declare class DataManager {
|
|
3851
4697
|
static deviceMap: DeviceTypeMap & {
|
|
3852
|
-
[k: string]: DeviceTypeMap[keyof DeviceTypeMap] | undefined;
|
|
4698
|
+
[k: string]: NonNullable<DeviceTypeMap[keyof DeviceTypeMap]> | undefined;
|
|
3853
4699
|
};
|
|
3854
4700
|
static assets: AssetsMap | null;
|
|
3855
4701
|
static settings: ConnectSettings;
|
|
@@ -3857,12 +4703,22 @@ declare class DataManager {
|
|
|
3857
4703
|
[schema in ProtobufMessageSchema]: JSON;
|
|
3858
4704
|
};
|
|
3859
4705
|
static lastCheckTimestamp: number;
|
|
4706
|
+
static protocolV2ResourcesConfigError: Error | undefined;
|
|
4707
|
+
private static protocolV2NeoResourcesConfigError;
|
|
3860
4708
|
static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
|
|
4709
|
+
/**
|
|
4710
|
+
* Touch、Pro System UI Resource Update
|
|
4711
|
+
* ** Interval upgrade is not considered **
|
|
4712
|
+
*/
|
|
3861
4713
|
static getSysResourcesLatestRelease: ({ features, forcedUpdateRes, firmwareType, }: {
|
|
3862
4714
|
features: Features;
|
|
3863
4715
|
forcedUpdateRes?: boolean | undefined;
|
|
3864
4716
|
firmwareType: EFirmwareType;
|
|
3865
4717
|
}) => string | undefined;
|
|
4718
|
+
/**
|
|
4719
|
+
* Touch、Pro System full UI Resource Update
|
|
4720
|
+
* ** Interval upgrade is not considered **
|
|
4721
|
+
*/
|
|
3866
4722
|
static getSysFullResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3867
4723
|
static getBootloaderResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3868
4724
|
static getBootloaderTargetVersion: (features: Features, firmwareType: EFirmwareType) => IVersionArray | undefined;
|
|
@@ -3884,24 +4740,41 @@ declare class DataManager {
|
|
|
3884
4740
|
"en-US": string;
|
|
3885
4741
|
} | undefined;
|
|
3886
4742
|
private static enrichFirmwareReleaseInfo;
|
|
3887
|
-
static load(settings: ConnectSettings): Promise<
|
|
4743
|
+
static load(settings: ConnectSettings): Promise<boolean>;
|
|
4744
|
+
private static applyRemoteConfig;
|
|
3888
4745
|
static updateEnv(newEnv: ConnectSettings['env']): void;
|
|
3889
4746
|
static checkAndReloadData(): Promise<void>;
|
|
4747
|
+
/** Force a fresh remote config before an update is allowed to mutate the device. */
|
|
4748
|
+
static forceReloadData({ requireResources, resourceDeviceType, }?: {
|
|
4749
|
+
requireResources?: boolean;
|
|
4750
|
+
resourceDeviceType?: EDeviceType.Pro2 | EDeviceType.Neo;
|
|
4751
|
+
}): Promise<void>;
|
|
4752
|
+
static getProtocolV2ResourceSource(deviceType?: EDeviceType.Pro2 | EDeviceType.Neo): IProtocolV2ResourceSource | undefined;
|
|
3890
4753
|
static getProtobufMessages(schema?: ProtobufMessageSchema): JSON;
|
|
3891
4754
|
static getSettings(key?: undefined): ConnectSettings;
|
|
3892
4755
|
static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
|
|
3893
4756
|
static isBleConnect: (env: ConnectSettings['env']) => boolean;
|
|
4757
|
+
/** Desktop WebUSB doesn't need browser permission prompt */
|
|
3894
4758
|
static isDesktopWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
4759
|
+
/** Browser WebUSB needs permission prompt */
|
|
3895
4760
|
static isBrowserWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
3896
4761
|
}
|
|
3897
4762
|
|
|
3898
|
-
declare const supportInputPinOnSoftware: (features
|
|
4763
|
+
declare const supportInputPinOnSoftware: (features?: Features) => SupportFeatureType;
|
|
4764
|
+
/**
|
|
4765
|
+
* Since 3.5.0, Touch uses the firmware-v3 field to get firmware release info
|
|
4766
|
+
*/
|
|
3899
4767
|
declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, firmwareType, }: {
|
|
3900
4768
|
features: Features;
|
|
3901
4769
|
updateType: 'firmware' | 'ble';
|
|
3902
4770
|
targetVersion?: string | undefined;
|
|
3903
4771
|
firmwareType: EFirmwareType;
|
|
3904
4772
|
}) => 'ble' | IFirmwareField;
|
|
4773
|
+
/**
|
|
4774
|
+
* Returns the optional firmware version
|
|
4775
|
+
* Used in firmware web update
|
|
4776
|
+
* https://firmware.onekey.so/
|
|
4777
|
+
*/
|
|
3905
4778
|
declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('ble' | IFirmwareField)[];
|
|
3906
4779
|
|
|
3907
4780
|
declare function checkNeedUpdateBootForTouch(features: Features, firmwareType: EFirmwareType): boolean;
|
|
@@ -3911,15 +4784,40 @@ declare function checkNeedUpdateBootForClassicAndMini({ features, willUpdateFirm
|
|
|
3911
4784
|
firmwareType: EFirmwareType;
|
|
3912
4785
|
}): boolean;
|
|
3913
4786
|
|
|
4787
|
+
type DeviceSettingsProtocol = 'V1' | 'V2';
|
|
4788
|
+
type DeviceSettingsField = keyof DeviceSettingsParams;
|
|
4789
|
+
declare const DEVICE_SETTINGS_SHARED_FIELDS: readonly ["language", "label", "usePassphrase", "autoLockDelayMs", "autoShutdownDelayMs", "hapticFeedback", "bluetoothEnabled"];
|
|
4790
|
+
declare const DEVICE_SETTINGS_V1_ONLY_FIELDS: readonly ["homescreen", "passphraseSource", "displayRotation", "passphraseAlwaysOnDevice", "safetyChecks", "experimentalFeatures", "changeBrightness"];
|
|
4791
|
+
declare const DEVICE_SETTINGS_V2_ONLY_FIELDS: readonly ["brightness", "airgapMode", "animationEnabled", "tapToWake", "deviceNameDisplayEnabled", "fidoEnabled", "usbLockEnabled", "randomKeypad"];
|
|
4792
|
+
declare const PROTOCOL_V2_NEVER_TIMEOUT_MS = 268435456;
|
|
4793
|
+
declare const normalizeSafetyCheckLevel: (value: SafetyCheckLevel | null | undefined) => Enum_SafetyCheckLevel | null | undefined;
|
|
3914
4794
|
declare const getLanguageConfig: (deviceType: IDeviceType) => Record<string, string>[];
|
|
3915
|
-
type
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
4795
|
+
type DeviceSettingsDurationOption = {
|
|
4796
|
+
label: string;
|
|
4797
|
+
valueMs: number;
|
|
4798
|
+
};
|
|
4799
|
+
type DeviceSettingsValueOption<T> = {
|
|
4800
|
+
label: string;
|
|
4801
|
+
value: T;
|
|
4802
|
+
};
|
|
4803
|
+
declare const getAutoLockOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
|
|
4804
|
+
declare const getAutoShutDownOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
|
|
4805
|
+
type DeviceSettingsCapabilities = {
|
|
4806
|
+
protocol: DeviceSettingsProtocol;
|
|
4807
|
+
supportedFields: readonly DeviceSettingsField[];
|
|
4808
|
+
languageOptions: ReadonlyArray<Record<string, string>>;
|
|
4809
|
+
autoLockDelayOptions: readonly DeviceSettingsDurationOption[];
|
|
4810
|
+
autoShutdownDelayOptions: readonly DeviceSettingsDurationOption[];
|
|
4811
|
+
ranges: {
|
|
4812
|
+
brightness?: {
|
|
4813
|
+
min: number;
|
|
4814
|
+
max: number;
|
|
4815
|
+
};
|
|
4816
|
+
};
|
|
4817
|
+
safetyCheckOptions: ReadonlyArray<DeviceSettingsValueOption<Enum_SafetyCheckLevel>>;
|
|
4818
|
+
onDeviceConfirmationFields: readonly DeviceSettingsField[];
|
|
3920
4819
|
};
|
|
3921
|
-
declare const
|
|
3922
|
-
declare const getAutoShutDownOptions: (_deviceType: IDeviceType) => DurationParts[];
|
|
4820
|
+
declare const getDeviceSettingsCapabilities: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsCapabilities;
|
|
3923
4821
|
|
|
3924
4822
|
declare const getHDPath: (path: string) => Array<number>;
|
|
3925
4823
|
declare const getScriptType: (path: Array<number>) => InputScriptType;
|
|
@@ -3932,6 +4830,10 @@ type SizeConfig = {
|
|
|
3932
4830
|
height: number;
|
|
3933
4831
|
radius?: number;
|
|
3934
4832
|
};
|
|
4833
|
+
declare const getNftSize: ({ deviceType, thumbnail, }: {
|
|
4834
|
+
deviceType: IDeviceType;
|
|
4835
|
+
thumbnail?: boolean | undefined;
|
|
4836
|
+
}) => SizeConfig | undefined;
|
|
3935
4837
|
declare const getHomeScreenSize: ({ deviceType, homeScreenType, thumbnail, }: {
|
|
3936
4838
|
deviceType: IDeviceType;
|
|
3937
4839
|
homeScreenType: 'WallPaper' | 'Nft';
|
|
@@ -3956,8 +4858,50 @@ declare const getEnv: () => "web" | "webextension" | "electron" | "react-native"
|
|
|
3956
4858
|
declare const corsValidator: (url?: string) => string | undefined;
|
|
3957
4859
|
declare const parseConnectSettings: (input?: Partial<ConnectSettings>) => ConnectSettings;
|
|
3958
4860
|
|
|
3959
|
-
|
|
3960
|
-
|
|
4861
|
+
type StoredDeviceState = DeviceState & {
|
|
4862
|
+
raw?: DeviceFeaturesRaw;
|
|
4863
|
+
};
|
|
4864
|
+
declare const projectFeatures: (state: StoredDeviceState) => Features;
|
|
4865
|
+
|
|
4866
|
+
/**
|
|
4867
|
+
* Read the protocol contract from the same method instance used by the Core dispatcher.
|
|
4868
|
+
* Passing a payload initializes the method first so parameter-dependent contracts, such
|
|
4869
|
+
* as Bitcoin fork support, are evaluated with the actual request.
|
|
4870
|
+
*/
|
|
4871
|
+
declare function getMethodSupportedProtocols(method: string, payload?: Record<string, unknown>): readonly ProtocolType[];
|
|
4872
|
+
|
|
4873
|
+
declare function parseProtocolV2ResourceManifest(value: unknown): IProtocolV2ResourceManifest;
|
|
4874
|
+
declare function selectProtocolV2ResourceManifestFiles({ manifest, targetsToUpdate, }: {
|
|
4875
|
+
manifest: IProtocolV2ResourceManifest;
|
|
4876
|
+
targetsToUpdate: readonly FirmwareUpdateV4Target[];
|
|
4877
|
+
}): IProtocolV2ResourceManifestFile[];
|
|
4878
|
+
|
|
4879
|
+
type FirmwareMemoryArtifactEntry = {
|
|
4880
|
+
entryName: string;
|
|
4881
|
+
binary: ArrayBuffer;
|
|
4882
|
+
};
|
|
4883
|
+
type FirmwareMemoryArtifact = {
|
|
4884
|
+
artifactId: string;
|
|
4885
|
+
binary: ArrayBuffer;
|
|
4886
|
+
materializedEntries?: FirmwareMemoryArtifactEntry[];
|
|
4887
|
+
};
|
|
4888
|
+
type FirmwareUpdateV4MemoryHost = {
|
|
4889
|
+
preparedPlan: ReturnType<CoreApi['prepareFirmwareUpdatePlan']>;
|
|
4890
|
+
hostBindingGeneration: number;
|
|
4891
|
+
release: () => void;
|
|
4892
|
+
};
|
|
4893
|
+
declare function prepareFirmwareUpdateV4MemoryHost({ sdk, plan, artifacts, }: {
|
|
4894
|
+
sdk: Pick<CoreApi, 'prepareFirmwareUpdatePlan' | 'registerFirmwareUpdateHostBinding' | 'unregisterFirmwareUpdateHostBinding'>;
|
|
4895
|
+
plan: FirmwareUpdatePlan;
|
|
4896
|
+
artifacts: FirmwareMemoryArtifact[];
|
|
4897
|
+
}): FirmwareUpdateV4MemoryHost;
|
|
4898
|
+
|
|
4899
|
+
declare const registerFirmwareUpdateHostBinding: (binding: FirmwareUpdateHostBinding) => number;
|
|
4900
|
+
declare const unregisterFirmwareUpdateHostBinding: (generation?: number) => boolean;
|
|
4901
|
+
declare const getFirmwareUpdateHostBindingGeneration: () => number;
|
|
4902
|
+
|
|
4903
|
+
declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, updateSettings, switchTransport, }: InjectApi) => CoreApi;
|
|
4904
|
+
declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
|
|
3961
4905
|
declare const HardwareTopLevelSdk: () => CoreApi;
|
|
3962
4906
|
|
|
3963
|
-
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, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceInfoMode, DeviceInfoProtocol, DeviceInfoScope, DeviceInfoSource, DeviceInfoStatus, DeviceModelToTypes, DeviceProfile, DeviceProfileRaw, DeviceProfileVerify, DeviceProfileVersions, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4Params, GetDeviceInfoParams, GetPassphraseStateParams, 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, OnekeyFeatures, PRO2_WALLPAPER_HEIGHT, PRO2_WALLPAPER_WIDTH, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, Pro2WallpaperColorFormat, 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, 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 };
|
|
4907
|
+
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, BridgeReleaseCheckResult, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, ClearSessionCacheParams, ClearSessionCachePayload, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DEVICE_SETTINGS_SHARED_FIELDS, DEVICE_SETTINGS_V1_ONLY_FIELDS, DEVICE_SETTINGS_V2_ONLY_FIELDS, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesRawPatch, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendState, DeviceSendSupportFeatures, DeviceSettingsCapabilities, DeviceSettingsDurationOption, DeviceSettingsField, DeviceSettingsParams, DeviceSettingsProtocol, DeviceSettingsValueOption, DeviceState, DeviceStateEvent, DeviceStateIdentity, DeviceStateMode, DeviceStatePatch, DeviceStateProtocol, DeviceStateScope, DeviceStateSection, DeviceStateSecurityElement, DeviceStateSecurityElements, DeviceStateSecurityElementsPatch, DeviceStateSettings, DeviceStateStatus, DeviceStateUpdateSource, DeviceStateVersions, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUnlockParams, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareArtifactReader, FirmwareArtifactReference, FirmwareEvent, FirmwareMemoryArtifact, FirmwareMemoryArtifactEntry, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareReleaseCheckResult, FirmwareTip, FirmwareUpdateArtifactParams, FirmwareUpdateBinaryParams, FirmwareUpdateCapabilities, FirmwareUpdateHostBinding, FirmwareUpdateParams, FirmwareUpdatePlan, FirmwareUpdatePlanArtifact, FirmwareUpdatePlanArtifactRole, FirmwareUpdatePlanForceTarget, FirmwareUpdatePlanTarget, FirmwareUpdatePreparedArtifact, FirmwareUpdatePreparedArtifactInput, FirmwareUpdatePreparedEntry, FirmwareUpdatePreparedPlan, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4MemoryHost, FirmwareUpdateV4Params, FirmwareUpdateV4Target, GetDeviceStateParams, GetPassphraseStateParams, HardwareSDKLowLevel, HardwareTopLevelSdk, HardwareUiInteractionMeta, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceManifest, IProtocolV2ResourceManifestFile, IProtocolV2ResourceSource, IProtocolV2Resources, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KaspaStreamingSignInputParams, KaspaStreamingSignOutputParams, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, NormalizedFeatures, OnekeyFeatures, OpenWalletSessionMode, OpenWalletSessionModeValue, OpenWalletSessionParams, OpenWalletSessionPayload, PRO2_WALLPAPER_HEIGHT, PRO2_WALLPAPER_WIDTH, PROTOCOL_V2_NEVER_TIMEOUT_MS, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, Pro2WallpaperColorFormat, ProtocolV2ComponentReleaseInfo, ProtocolV2FirmwareComponentRelease, ProtocolV2FirmwareComponentReleaseStatus, ProtocolV2FirmwareReleaseStatus, ProtocolV2UiCompletion, ProtocolV2UiEventMetadata, ProtocolV2UiEventSource, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TestProtocolV2PingParams, TonAddress, TonGetAddressParams, TonSignDataParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceForSwitchFirmwareWebDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWindowClose, UiRequestWithoutPayload, UiResponseCorrelation, UiResponseCorrelationFields, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceForSwitchFirmwareWebDevice, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, cleanupSdkInstance, completeRequestContext, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createRequestContext, createResponseMessage, createSdkTracingContext, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, encodePro2Wallpaper, executeCallback, formatLogMethodLabel, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceSerialNo, getDeviceSettingsCapabilities, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getFirmwareUpdateHostBindingGeneration, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogBlockLabel, getLogger, getMethodSupportedProtocols, getMethodVersionRange, getNftSize, getOutputScriptType, getSDKVersion, getSafeLogPayload, getScriptType, getTimeStamp, httpRequest, init$1 as initCore, isBleConnect, isValidVersionArray, isValidVersionString, normalizeSafetyCheckLevel, normalizeVersionArray, parseConnectSettings, parseMessage, parseProtocolV2ResourceManifest, patchFeatures, preloadSessionCache, prepareFirmwareUpdateV4MemoryHost, projectFeatures as projectDeviceStateFeatures, registerFirmwareUpdateHostBinding, safeThrowError, selectProtocolV2ResourceManifestFiles, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, unregisterFirmwareUpdateHostBinding, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
|