@onekeyfe/hd-core 1.2.0-alpha.3 → 1.2.0-alpha.30
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 +77 -0
- package/__tests__/DeviceCommands.test.ts +433 -0
- package/__tests__/DeviceEventRegistration.test.ts +43 -0
- package/__tests__/chain-params-onekey-compatibility.test.ts +229 -0
- package/__tests__/connectSettings.test.ts +61 -0
- package/__tests__/core-dispose.test.ts +34 -0
- package/__tests__/core-error-output.test.ts +39 -0
- package/__tests__/device-features-state.test.ts +78 -0
- package/__tests__/device-identity.test.ts +52 -0
- package/__tests__/device-lifecycle-events.test.ts +197 -0
- package/__tests__/device-pool-state.test.ts +132 -0
- package/__tests__/device-settings.test.ts +391 -0
- package/__tests__/device-state-contract.test.ts +27 -0
- package/__tests__/device-state-events.test.ts +286 -0
- package/__tests__/device-state-mapper.test.ts +241 -0
- package/__tests__/device-state-projector.test.ts +94 -0
- package/__tests__/device-state-store.test.ts +82 -0
- package/__tests__/device-utils.test.ts +106 -0
- package/__tests__/device-wallet-session-store.test.ts +358 -0
- package/__tests__/deviceFeaturesUtils.test.ts +39 -0
- package/__tests__/deviceSettings.test.ts +103 -0
- package/__tests__/evmLedgerLegacySafety.test.ts +12 -6
- package/__tests__/evmSignTypedData.test.ts +80 -0
- package/__tests__/filesystemValidation.test.ts +53 -0
- package/__tests__/firmware-update/check-all-firmware-release.test.ts +174 -0
- package/__tests__/firmware-update/firmware-artifact-source.test.ts +119 -0
- package/__tests__/firmware-update/firmware-host-binding.test.ts +70 -0
- package/__tests__/firmware-update/firmware-preparation-error.test.ts +27 -0
- package/__tests__/firmware-update/firmware-update-capabilities.test.ts +13 -0
- package/__tests__/firmware-update/firmware-update-plan.test.ts +593 -0
- package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +213 -0
- package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +430 -0
- package/__tests__/firmware-update/firmware-upload-source.test.ts +70 -0
- package/__tests__/get-device-state.test.ts +410 -0
- package/__tests__/homescreen.test.ts +24 -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 +592 -0
- package/__tests__/logBlockEvent.test.ts +43 -0
- package/__tests__/method-protocol-support.test.ts +113 -0
- package/__tests__/networkUtils.test.ts +386 -0
- package/__tests__/open-wallet-session-error-response.test.ts +43 -0
- package/__tests__/open-wallet-session.test.ts +915 -0
- package/__tests__/preInitialize.test.ts +33 -0
- package/__tests__/pro2Wallpaper.test.ts +39 -0
- package/__tests__/protocol-v2-bootloader-mode.test.ts +37 -0
- package/__tests__/protocol-v2-firmware-targets.test.ts +19 -0
- package/__tests__/protocol-v2-ping.test.ts +28 -0
- package/__tests__/protocol-v2-unlock-policy.test.ts +45 -0
- package/__tests__/protocol-v2.test.ts +5310 -1856
- package/__tests__/protocolV2FileWrite.test.ts +92 -0
- package/__tests__/protocolV2UiInteraction.test.ts +266 -0
- package/__tests__/public-device-state-api.test.ts +266 -0
- package/__tests__/public-pro2-api-boundary.test.ts +106 -0
- package/__tests__/refresh-device-state.test.ts +101 -0
- package/__tests__/request-context-logging.test.ts +16 -0
- package/__tests__/search-devices.test.ts +136 -0
- package/__tests__/tron-sign-message-init.test.ts +74 -0
- package/dist/api/BaseMethod.d.ts +14 -1
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
- package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CipherKeyValue.d.ts +1 -0
- package/dist/api/CipherKeyValue.d.ts.map +1 -1
- package/dist/api/ClearSessionCache.d.ts +9 -0
- package/dist/api/ClearSessionCache.d.ts.map +1 -0
- package/dist/api/DirList.d.ts +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 +47 -6
- 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 +2 -6
- 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 +17 -0
- package/dist/api/UploadPortfolio.d.ts.map +1 -0
- 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 +1 -0
- 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/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 +25 -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/FirmwarePreparationError.d.ts +3 -0
- package/dist/api/firmware/FirmwarePreparationError.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +8 -0
- 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 +25 -0
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +30 -0
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -0
- package/dist/api/firmware/getBinary.d.ts +18 -3
- package/dist/api/firmware/getBinary.d.ts.map +1 -1
- package/dist/api/firmware/progressThrottle.d.ts +3 -0
- package/dist/api/firmware/progressThrottle.d.ts.map +1 -0
- package/dist/api/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/filesystemValidation.d.ts +3 -0
- package/dist/api/helpers/filesystemValidation.d.ts.map +1 -1
- package/dist/api/helpers/paramsValidator.d.ts +1 -0
- package/dist/api/helpers/paramsValidator.d.ts.map +1 -1
- package/dist/api/helpers/protocolV2FileWrite.d.ts +33 -0
- package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -0
- package/dist/api/index.d.ts +6 -29
- 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 +1 -0
- 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/protocol-v2/DeviceFactoryInfoGet.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +8 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +2 -1
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +4 -2
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +2 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts +29 -0
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -0
- 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 +7 -0
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +27 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -0
- 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 +7 -0
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -0
- 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 +7 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -0
- package/dist/api/protocol-v2/helpers.d.ts +27 -18
- 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 +1 -0
- package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts +1 -0
- package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignTransaction.d.ts +1 -0
- 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 +1 -0
- package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
- package/dist/api/sui/SuiGetPublicKey.d.ts +1 -0
- package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
- package/dist/api/sui/SuiSignMessage.d.ts +1 -0
- package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
- package/dist/api/sui/SuiSignTransaction.d.ts +1 -0
- package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
- package/dist/api/ton/TonGetAddress.d.ts +1 -0
- package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
- package/dist/api/ton/TonSignData.d.ts +2 -5
- package/dist/api/ton/TonSignData.d.ts.map +1 -1
- package/dist/api/ton/TonSignMessage.d.ts +1 -0
- package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
- package/dist/api/ton/TonSignProof.d.ts +1 -0
- 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 +5 -0
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts +1 -0
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
- package/dist/api/utils.d.ts +2 -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.map +1 -1
- package/dist/core/deviceEventRegistration.d.ts +11 -0
- package/dist/core/deviceEventRegistration.d.ts.map +1 -0
- package/dist/core/index.d.ts +3 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +2 -1
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/data-manager/connectSettings.d.ts.map +1 -1
- package/dist/device/Device.d.ts +40 -13
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +8 -6
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DeviceFeaturesState.d.ts +3 -0
- package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
- package/dist/device/DevicePool.d.ts +4 -2
- package/dist/device/DevicePool.d.ts.map +1 -1
- package/dist/device/DeviceStateMapper.d.ts +13 -0
- package/dist/device/DeviceStateMapper.d.ts.map +1 -0
- package/dist/device/DeviceStateProjector.d.ts +7 -0
- package/dist/device/DeviceStateProjector.d.ts.map +1 -0
- package/dist/device/DeviceStateStore.d.ts +21 -0
- package/dist/device/DeviceStateStore.d.ts.map +1 -0
- package/dist/device/DeviceWalletSessionStore.d.ts +20 -0
- package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -0
- package/dist/device/cloneDeviceState.d.ts +2 -0
- package/dist/device/cloneDeviceState.d.ts.map +1 -0
- package/dist/device/deviceIdentity.d.ts +5 -0
- package/dist/device/deviceIdentity.d.ts.map +1 -0
- package/dist/deviceProfile/buildDeviceFeatures.d.ts +9 -3
- package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
- package/dist/deviceProfile/index.d.ts +0 -1
- package/dist/deviceProfile/index.d.ts.map +1 -1
- package/dist/events/device.d.ts +12 -2
- package/dist/events/device.d.ts.map +1 -1
- package/dist/events/logBlockEvent.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +19 -2
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +1487 -691
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8828 -4013
- package/dist/inject.d.ts.map +1 -1
- package/dist/lowLevelInject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/deviceSession.d.ts +7 -0
- package/dist/protocols/protocol-v2/deviceSession.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/features.d.ts +23 -28
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/firmware.d.ts +11 -9
- package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/index.d.ts +3 -2
- package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/lockedError.d.ts +2 -0
- package/dist/protocols/protocol-v2/lockedError.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +16 -0
- package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/uiInteraction.d.ts +39 -0
- package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/unlockPolicy.d.ts +4 -0
- package/dist/protocols/protocol-v2/unlockPolicy.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/unlockRetry.d.ts +10 -0
- package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/walletSession.d.ts +31 -0
- package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -0
- package/dist/topLevelInject.d.ts.map +1 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts +5 -2
- package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
- 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 +1 -1
- 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 +5 -2
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +75 -6
- 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 +2 -10
- package/dist/types/api/getPassphraseState.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +25 -35
- 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 +29 -0
- package/dist/types/api/openWalletSession.d.ts.map +1 -0
- package/dist/types/api/protocolV2.d.ts +15 -89
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/api/sessionCache.d.ts +13 -0
- package/dist/types/api/sessionCache.d.ts.map +1 -0
- package/dist/types/device.d.ts +122 -6
- 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 +34 -2
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/assets.d.ts +2 -1
- package/dist/utils/assets.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesCompat.d.ts +13 -0
- package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -0
- package/dist/utils/deviceFeaturesUtils.d.ts +11 -3
- 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.map +1 -1
- package/dist/utils/index.d.ts +5 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/networkUtils.d.ts +9 -1
- package/dist/utils/networkUtils.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/dist/utils/pro2Wallpaper.d.ts +12 -0
- package/dist/utils/pro2Wallpaper.d.ts.map +1 -0
- package/dist/utils/tracing.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/BaseMethod.ts +52 -17
- package/src/api/CheckAllFirmwareRelease.ts +51 -4
- package/src/api/CheckBootloaderRelease.ts +1 -2
- package/src/api/CheckFirmwareRelease.ts +1 -2
- package/src/api/CipherKeyValue.ts +4 -0
- package/src/api/ClearSessionCache.ts +32 -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 +27 -8
- package/src/api/FileWrite.ts +26 -168
- package/src/api/FirmwareUpdate.ts +11 -12
- package/src/api/FirmwareUpdateV2.ts +370 -112
- package/src/api/FirmwareUpdateV3.ts +261 -67
- package/src/api/FirmwareUpdateV4.ts +1687 -397
- 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 +21 -21
- package/src/api/OpenWalletSession.ts +202 -0
- package/src/api/PathInfo.ts +9 -4
- package/src/api/PromptWebDeviceAccess.ts +2 -3
- package/src/api/SearchDevices.ts +29 -4
- package/src/api/UploadPortfolio.ts +40 -0
- 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/AllNetworkGetAddressBase.ts +9 -21
- 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 +9 -4
- package/src/api/device/DeviceRebootToBootloader.ts +9 -4
- package/src/api/device/DeviceSettings.ts +187 -1
- package/src/api/device/DeviceSupportFeatures.ts +4 -0
- package/src/api/device/DeviceUnlock.ts +13 -0
- package/src/api/device/DeviceUpdateBootloader.ts +123 -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 +4 -0
- package/src/api/evm/EVMGetPublicKey.ts +4 -0
- package/src/api/evm/EVMSignMessage.ts +4 -0
- package/src/api/evm/EVMSignMessageEIP712.ts +1 -11
- package/src/api/evm/EVMSignTransaction.ts +4 -0
- package/src/api/evm/EVMSignTypedData.ts +7 -5
- package/src/api/evm/EVMVerifyMessage.ts +4 -0
- 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/filecoin/FilecoinGetAddress.ts +4 -0
- package/src/api/filecoin/FilecoinSignTransaction.ts +4 -0
- package/src/api/firmware/FirmwareArtifactSource.ts +278 -0
- package/src/api/firmware/FirmwareHostBinding.ts +100 -0
- package/src/api/firmware/FirmwarePreparationError.ts +12 -0
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +71 -7
- package/src/api/firmware/FirmwareUpdateCapabilities.ts +9 -0
- package/src/api/firmware/FirmwareUpdatePlan.ts +745 -0
- package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +392 -0
- package/src/api/firmware/getBinary.ts +8 -3
- package/src/api/firmware/progressThrottle.ts +44 -0
- package/src/api/firmware/updateBootloader.ts +19 -4
- package/src/api/firmware/uploadFirmware.ts +140 -22
- 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 +199 -0
- package/src/api/index.ts +7 -30
- package/src/api/kaspa/KaspaGetAddress.ts +7 -0
- package/src/api/kaspa/KaspaSignTransaction.ts +373 -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/protocol-v2/{FactoryGetDeviceInfo.ts → DeviceFactoryInfoGet.ts} +8 -5
- package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +35 -0
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +11 -10
- package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +45 -7
- package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +10 -5
- package/src/api/protocol-v2/DeviceInfoGet.ts +141 -0
- package/src/api/protocol-v2/DeviceReboot.ts +8 -4
- package/src/api/protocol-v2/DeviceStatusGet.ts +19 -0
- package/src/api/protocol-v2/DeviceUploadWallpaper.ts +134 -0
- package/src/api/protocol-v2/FilesystemFormat.ts +9 -3
- package/src/api/protocol-v2/{FilesystemFixPermission.ts → FilesystemPermissionFix.ts} +7 -4
- package/src/api/protocol-v2/Ping.ts +37 -3
- package/src/api/protocol-v2/ProtocolInfoRequest.ts +19 -0
- package/src/api/protocol-v2/helpers.ts +71 -50
- 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 +4 -0
- package/src/api/solana/SolSignOffchainMessage.ts +4 -0
- package/src/api/solana/SolSignTransaction.ts +4 -0
- 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 +4 -0
- package/src/api/sui/SuiGetPublicKey.ts +4 -0
- package/src/api/sui/SuiSignMessage.ts +4 -0
- package/src/api/sui/SuiSignTransaction.ts +4 -0
- package/src/api/ton/TonGetAddress.ts +4 -0
- package/src/api/ton/TonSignData.ts +6 -6
- package/src/api/ton/TonSignMessage.ts +4 -0
- package/src/api/ton/TonSignProof.ts +4 -0
- package/src/api/tron/TronGetAddress.ts +4 -0
- package/src/api/tron/TronSignMessage.ts +18 -7
- package/src/api/tron/TronSignTransaction.ts +4 -0
- package/src/api/utils.ts +7 -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 +1 -0
- package/src/core/deviceEventRegistration.ts +23 -0
- package/src/core/index.ts +181 -58
- package/src/data/messages/messages-protocol-v2.json +796 -620
- package/src/data/messages/messages.json +286 -1
- package/src/data-manager/DataManager.ts +45 -38
- package/src/data-manager/TransportManager.ts +1 -1
- package/src/data-manager/connectSettings.ts +13 -4
- package/src/device/Device.ts +573 -278
- package/src/device/DeviceCommands.ts +154 -156
- package/src/device/DeviceFeaturesState.ts +25 -0
- package/src/device/DevicePool.ts +61 -13
- package/src/device/DeviceStateMapper.ts +366 -0
- package/src/device/DeviceStateProjector.ts +101 -0
- package/src/device/DeviceStateStore.ts +201 -0
- package/src/device/DeviceWalletSessionStore.ts +105 -0
- package/src/device/cloneDeviceState.ts +39 -0
- package/src/device/deviceIdentity.ts +18 -0
- package/src/deviceProfile/buildDeviceFeatures.ts +234 -210
- package/src/deviceProfile/index.ts +0 -1
- package/src/events/device.ts +18 -1
- package/src/events/logBlockEvent.ts +1 -7
- package/src/events/ui-request.ts +25 -2
- package/src/index.ts +5 -0
- package/src/inject.ts +35 -47
- package/src/lowLevelInject.ts +5 -1
- package/src/protocols/protocol-v2/deviceSession.ts +24 -0
- package/src/protocols/protocol-v2/features.ts +68 -83
- package/src/protocols/protocol-v2/firmware.ts +12 -36
- package/src/protocols/protocol-v2/index.ts +3 -1
- package/src/protocols/protocol-v2/lockedError.ts +10 -0
- package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +60 -0
- package/src/protocols/protocol-v2/uiInteraction.ts +210 -0
- package/src/protocols/protocol-v2/unlockPolicy.ts +105 -0
- package/src/protocols/protocol-v2/unlockRetry.ts +98 -0
- package/src/protocols/protocol-v2/walletSession.ts +202 -0
- package/src/topLevelInject.ts +5 -1
- package/src/types/api/checkAllFirmwareRelease.ts +5 -2
- package/src/types/api/deviceSettings.ts +26 -2
- package/src/types/api/deviceUnlock.ts +1 -1
- package/src/types/api/deviceUpdateBootloader.ts +6 -0
- package/src/types/api/export.ts +21 -0
- package/src/types/api/firmwareUpdate.ts +103 -19
- 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 +9 -11
- package/src/types/api/index.ts +33 -73
- package/src/types/api/kaspaSignTransaction.ts +60 -4
- package/src/types/api/openWalletSession.ts +45 -0
- package/src/types/api/protocolV2.ts +23 -162
- package/src/types/api/sessionCache.ts +19 -0
- package/src/types/device.ts +172 -5
- package/src/types/params.ts +4 -0
- package/src/types/settings.ts +55 -35
- package/src/utils/assets.ts +4 -1
- package/src/utils/deviceFeaturesCompat.ts +173 -0
- package/src/utils/deviceFeaturesUtils.ts +66 -24
- package/src/utils/deviceInfoUtils.ts +27 -69
- package/src/utils/deviceSettings.ts +171 -39
- package/src/utils/deviceVersionUtils.ts +25 -44
- package/src/utils/findDefectiveBatchDevice.ts +3 -3
- package/src/utils/homescreen.ts +10 -0
- package/src/utils/index.ts +21 -2
- package/src/utils/networkUtils.ts +270 -14
- package/src/utils/pro2Wallpaper.ts +109 -0
- package/src/utils/tracing.ts +3 -1
- package/tsconfig.type-tests.json +8 -0
- package/dist/api/GetDeviceInfo.d.ts +0 -9
- package/dist/api/GetDeviceInfo.d.ts.map +0 -1
- package/dist/api/protocol-v2/DevReboot.d.ts +0 -7
- package/dist/api/protocol-v2/DevReboot.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts +0 -29
- package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts.map +0 -1
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts +0 -7
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts.map +0 -1
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts +0 -6
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts.map +0 -1
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +0 -13
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +0 -1
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts +0 -6
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts.map +0 -1
- package/dist/api/protocol-v2/GetProtoVersion.d.ts +0 -6
- package/dist/api/protocol-v2/GetProtoVersion.d.ts.map +0 -1
- package/dist/deviceProfile/buildDeviceProfile.d.ts +0 -21
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
- package/dist/types/api/getDeviceInfo.d.ts +0 -85
- package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
- package/src/api/GetDeviceInfo.ts +0 -145
- package/src/api/protocol-v2/DevReboot.ts +0 -24
- package/src/api/protocol-v2/DeviceGetDeviceInfo.ts +0 -118
- package/src/api/protocol-v2/FactoryDeviceInfoSettings.ts +0 -29
- package/src/api/protocol-v2/FilesystemDiskControl.ts +0 -50
- package/src/api/protocol-v2/GetProtoVersion.ts +0 -16
- package/src/deviceProfile/buildDeviceProfile.ts +0 -333
- package/src/types/api/getDeviceInfo.ts +0 -99
package/dist/index.d.ts
CHANGED
|
@@ -1,23 +1,64 @@
|
|
|
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, ProtocolV2DeviceInfo, DeviceStatus as DeviceStatus$1, Enum_SafetyCheckLevel, OneKeyDeviceInfo, Success as Success$1, DeviceSessionPinType, LowlevelTransportSharedPlugin, DevOnboardingStatus, RecoveryDeviceType, ResourceType, NextU2FCounter, SetU2FCounter, CipheredKeyValue as CipheredKeyValue$1, UintType, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, SignedPsbt, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, SolanaTxExtraInfo, SolanaOffChainMessageVersion, SolanaOffChainMessageFormat, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, TronResourceCode, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, SuiMessageSignature, CardanoAddressParametersType, CardanoMessageSignature, FilecoinAddress as FilecoinAddress$1, FilecoinSignedTx as FilecoinSignedTx$1, PolkadotAddress as PolkadotAddress$1, PolkadotSignedTx as PolkadotSignedTx$1, KaspaAddress as KaspaAddress$1, NervosAddress as NervosAddress$1, NervosSignedTx as NervosSignedTx$1, DnxAddress as DnxAddress$1, TonWalletVersion, TonWorkChain, TonSignedMessage, TonSignedProof, TonSignDataType, TonSignedData, ScdoAddress as ScdoAddress$1, ScdoSignedMessage, ScdoSignedTx as ScdoSignedTx$1, AlephiumMessageSignature, AlephiumSignedTx as AlephiumSignedTx$1, BenfenAddress as BenfenAddress$1, BenfenMessageSignature, SafetyCheckLevel, ChangeOutputScriptType } from '@onekeyfe/hd-transport';
|
|
3
4
|
export { Success as DeviceSuccess, HDNodeType, Messages as PROTO, ResourceType, TonSignDataType, TonWalletVersion } from '@onekeyfe/hd-transport';
|
|
4
5
|
import * as _onekeyfe_hd_shared from '@onekeyfe/hd-shared';
|
|
5
|
-
import { HardwareConnectProtocol,
|
|
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
|
+
*/
|
|
25
|
+
protocolV2DeviceInfoTimeoutMs?: number;
|
|
26
|
+
/**
|
|
27
|
+
* passphrase state
|
|
28
|
+
*/
|
|
12
29
|
passphraseState?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Use empty passphrase
|
|
32
|
+
*/
|
|
13
33
|
useEmptyPassphrase?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Every init session
|
|
36
|
+
*/
|
|
14
37
|
initSession?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Use derive cardano
|
|
40
|
+
*/
|
|
15
41
|
deriveCardano?: boolean;
|
|
16
42
|
detectBootloaderDevice?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Skip web device prompt
|
|
45
|
+
*/
|
|
17
46
|
skipWebDevicePrompt?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Skip passphrase check
|
|
49
|
+
*/
|
|
18
50
|
skipPassphraseCheck?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Only connect device, not initialize device, only ble connect
|
|
53
|
+
*/
|
|
19
54
|
onlyConnectBleDevice?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Use pre-initialized device state (BLE only)
|
|
57
|
+
*/
|
|
20
58
|
usePreInitialize?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Expected transport protocol. If omitted, SDK probes Protocol V1 then Protocol V2.
|
|
61
|
+
*/
|
|
21
62
|
connectProtocol?: HardwareConnectProtocol;
|
|
22
63
|
}
|
|
23
64
|
type Params<T> = CommonParams & T & {
|
|
@@ -38,30 +79,11 @@ type Response<T> = Promise<Success<T> | Unsuccessful>;
|
|
|
38
79
|
|
|
39
80
|
declare const safeThrowError: (error: any) => never;
|
|
40
81
|
|
|
41
|
-
type RebootTypeInput =
|
|
82
|
+
type RebootTypeInput = DeviceRebootType | keyof typeof DeviceRebootType | string | number;
|
|
42
83
|
type DeviceRebootParams = {
|
|
43
84
|
rebootType?: RebootTypeInput;
|
|
44
85
|
reboot_type?: RebootTypeInput;
|
|
45
86
|
};
|
|
46
|
-
type DeviceFirmwareTargetInput = DevFirmwareTarget | {
|
|
47
|
-
targetId?: DevFirmwareTargetType | string | number;
|
|
48
|
-
target_id?: DevFirmwareTargetType | string | number;
|
|
49
|
-
path: string;
|
|
50
|
-
};
|
|
51
|
-
type DeviceFirmwareUpdateParams = {
|
|
52
|
-
targets?: DeviceFirmwareTargetInput[];
|
|
53
|
-
targetId?: DevFirmwareTargetType | string | number;
|
|
54
|
-
target_id?: DevFirmwareTargetType | string | number;
|
|
55
|
-
path?: string;
|
|
56
|
-
};
|
|
57
|
-
type FactoryDeviceInfoSettingsParams = {
|
|
58
|
-
serial_no?: string;
|
|
59
|
-
serialNo?: string;
|
|
60
|
-
cpu_info?: string;
|
|
61
|
-
cpuInfo?: string;
|
|
62
|
-
pre_firmware?: string;
|
|
63
|
-
preFirmware?: string;
|
|
64
|
-
};
|
|
65
87
|
|
|
66
88
|
type PassphrasePromptResponse = {
|
|
67
89
|
passphrase?: string;
|
|
@@ -79,15 +101,19 @@ type TypedCallResponseMap = {
|
|
|
79
101
|
[K in MessageKey]: TypedResponseMessage<K>;
|
|
80
102
|
};
|
|
81
103
|
type DefaultMessageResponse = TypedCallResponseMap[MessageKey];
|
|
104
|
+
/**
|
|
105
|
+
* The life cycle begins with the acquisition of the device and ends with the disposal device commands
|
|
106
|
+
* acquire device -> create DeviceCommands -> release device -> dispose DeviceCommands
|
|
107
|
+
*/
|
|
82
108
|
declare class DeviceCommands {
|
|
83
109
|
instanceId: string;
|
|
84
110
|
currentResponseID?: number;
|
|
85
|
-
device: Device
|
|
111
|
+
device: Device;
|
|
86
112
|
transport: Transport;
|
|
87
113
|
mainId: string;
|
|
88
114
|
disposed: boolean;
|
|
89
115
|
callPromise?: Promise<DefaultMessageResponse>;
|
|
90
|
-
constructor(device: Device
|
|
116
|
+
constructor(device: Device, mainId: string);
|
|
91
117
|
dispose(_cancelRequest: boolean): Promise<void>;
|
|
92
118
|
checkDisposed(): void;
|
|
93
119
|
cancelDeviceOnOneKeyDevice(): Promise<{
|
|
@@ -104,7 +130,7 @@ declare class DeviceCommands {
|
|
|
104
130
|
};
|
|
105
131
|
} | {
|
|
106
132
|
success: boolean;
|
|
107
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 900 | 901 | 902;
|
|
133
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 900 | 901 | 902;
|
|
108
134
|
payload: {
|
|
109
135
|
message: string;
|
|
110
136
|
};
|
|
@@ -123,7 +149,7 @@ declare class DeviceCommands {
|
|
|
123
149
|
};
|
|
124
150
|
} | {
|
|
125
151
|
success: boolean;
|
|
126
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 900 | 901 | 902;
|
|
152
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 829 | 830 | 831 | 900 | 901 | 902;
|
|
127
153
|
payload: {
|
|
128
154
|
message: string;
|
|
129
155
|
};
|
|
@@ -135,365 +161,148 @@ declare class DeviceCommands {
|
|
|
135
161
|
_commonCall(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
136
162
|
_filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey, options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
137
163
|
_promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
type DeviceDescriptorDiff = {
|
|
142
|
-
didUpdate: boolean;
|
|
143
|
-
connected: OneKeyDeviceInfo[];
|
|
144
|
-
disconnected: OneKeyDeviceInfo[];
|
|
145
|
-
changedSessions: OneKeyDeviceInfo[];
|
|
146
|
-
changedDebugSessions: OneKeyDeviceInfo[];
|
|
147
|
-
acquired: OneKeyDeviceInfo[];
|
|
148
|
-
debugAcquired: OneKeyDeviceInfo[];
|
|
149
|
-
released: OneKeyDeviceInfo[];
|
|
150
|
-
debugReleased: OneKeyDeviceInfo[];
|
|
151
|
-
descriptors: OneKeyDeviceInfo[];
|
|
152
|
-
};
|
|
153
|
-
|
|
154
|
-
declare class DeviceConnector {
|
|
155
|
-
transport: Transport;
|
|
156
|
-
listenTimestamp: number;
|
|
157
|
-
current: OneKeyDeviceInfo[] | null;
|
|
158
|
-
upcoming: OneKeyDeviceInfo[];
|
|
159
|
-
listening: boolean;
|
|
160
|
-
constructor();
|
|
161
|
-
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
162
|
-
listen(): Promise<void>;
|
|
163
|
-
stop(): void;
|
|
164
|
-
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
165
|
-
release(session: string, onclose: boolean): Promise<void>;
|
|
166
|
-
disconnect(session: string | undefined | null): Promise<void>;
|
|
167
|
-
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
168
|
-
_reportDevicesChange(): void;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
type InitOptions = {
|
|
172
|
-
initSession?: boolean;
|
|
173
|
-
deviceId?: string;
|
|
174
|
-
passphraseState?: string;
|
|
175
|
-
deriveCardano?: boolean;
|
|
176
|
-
connectProtocol?: HardwareConnectProtocol;
|
|
177
|
-
};
|
|
178
|
-
type RunOptions = {
|
|
179
|
-
keepSession?: boolean;
|
|
180
|
-
skipInitialize?: boolean;
|
|
181
|
-
} & InitOptions;
|
|
182
|
-
interface DeviceEvents {
|
|
183
|
-
[DEVICE.PIN]: [Device$1, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
184
|
-
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device$1, ((response: any) => void)?];
|
|
185
|
-
[DEVICE.BUTTON]: [Device$1, DeviceButtonRequestPayload];
|
|
186
|
-
[DEVICE.FEATURES]: [Device$1, DeviceFeaturesPayload];
|
|
187
|
-
[DEVICE.PASSPHRASE]: [
|
|
188
|
-
Device$1,
|
|
189
|
-
PassphraseRequestPayload,
|
|
190
|
-
(response: PassphrasePromptResponse, error?: Error) => void
|
|
191
|
-
];
|
|
192
|
-
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
193
|
-
Device$1,
|
|
194
|
-
(err: any, deviceId: string) => void
|
|
195
|
-
];
|
|
196
|
-
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
197
|
-
Device$1,
|
|
198
|
-
(err: any, deviceId: string) => void
|
|
199
|
-
];
|
|
200
|
-
}
|
|
201
|
-
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
202
|
-
interface Device$1 {
|
|
203
|
-
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
204
|
-
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
205
|
-
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
206
|
-
}
|
|
207
|
-
declare class Device$1 extends EventEmitter {
|
|
208
|
-
originalDescriptor: OneKeyDeviceInfo;
|
|
209
|
-
sdkInstanceId?: string;
|
|
210
|
-
instanceId: string;
|
|
211
|
-
createdAt: number;
|
|
212
|
-
mainId?: string | null;
|
|
213
|
-
deviceConnector?: DeviceConnector | null;
|
|
214
|
-
commands: DeviceCommands;
|
|
215
|
-
private cancelableAction?;
|
|
216
|
-
private deviceAcquired;
|
|
217
|
-
features: Features | undefined;
|
|
218
|
-
featuresNeedsReload: boolean;
|
|
219
|
-
runPromise?: Deferred<void> | null;
|
|
220
|
-
externalState: string[];
|
|
221
|
-
unavailableCapabilities: UnavailableCapabilities;
|
|
222
|
-
instance: number;
|
|
223
|
-
internalState: string[];
|
|
224
|
-
needReloadDevice: boolean;
|
|
225
|
-
keepSession: boolean;
|
|
226
|
-
passphraseState: string | undefined;
|
|
227
|
-
pendingCallbackPromise?: Deferred<void>;
|
|
228
|
-
private preInitializedAt?;
|
|
229
|
-
private preInitializeMeta?;
|
|
230
|
-
private lastInitializeDurationMs?;
|
|
231
|
-
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
232
|
-
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device$1;
|
|
233
|
-
toMessageObject(): Device | null;
|
|
234
|
-
connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
|
|
235
|
-
acquire(connectProtocol?: HardwareConnectProtocol): Promise<void>;
|
|
236
|
-
release(): Promise<void>;
|
|
237
|
-
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
238
|
-
markPreInitialized(meta?: {
|
|
239
|
-
passphraseState?: string;
|
|
240
|
-
}): void;
|
|
241
|
-
clearPreInitialized(): void;
|
|
242
|
-
isPreInitializeMetaMatch(payload?: {
|
|
243
|
-
passphraseState?: string;
|
|
244
|
-
}): boolean;
|
|
245
|
-
isPreInitializedValid(ttlMs: number): boolean;
|
|
246
|
-
setLastInitializeDuration(durationMs: number): void;
|
|
247
|
-
getLastInitializeDuration(): number | undefined;
|
|
248
|
-
getCommands(): DeviceCommands;
|
|
249
|
-
getProtocol(): 'V1' | 'V2';
|
|
250
|
-
isProtocolV2(): boolean;
|
|
251
|
-
getCurrentDeviceType(): IDeviceType;
|
|
252
|
-
getCurrentDeviceId(): string | undefined;
|
|
253
|
-
getCurrentSerialNo(): string;
|
|
254
|
-
getConnectId(): string;
|
|
255
|
-
getCurrentBleName(): string | null;
|
|
256
|
-
getCurrentLabel(): string | null;
|
|
257
|
-
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
258
|
-
getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
|
|
259
|
-
getCurrentFirmwareVersionString(): string;
|
|
260
|
-
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
261
|
-
getCurrentSafetyChecks(): string | null | undefined;
|
|
262
|
-
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
263
|
-
supportNewPassphrase(): SupportFeatureType;
|
|
264
|
-
supportInputPinOnSoftware(): SupportFeatureType;
|
|
265
|
-
supportModifyHomescreen(): SupportFeatureType;
|
|
266
|
-
private generateStateKey;
|
|
267
|
-
private getSessionCacheDeviceKey;
|
|
268
|
-
getInternalState(_deviceId?: string): string | undefined;
|
|
269
|
-
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
270
|
-
private setInternalState;
|
|
271
|
-
clearInternalState(_deviceId?: string): void;
|
|
272
|
-
initialize(options?: InitOptions): Promise<void>;
|
|
273
|
-
private _initializeProtocolV2;
|
|
274
|
-
private _refreshProtocolV2Status;
|
|
275
|
-
getFeatures(): Promise<Features | undefined>;
|
|
276
|
-
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
277
|
-
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo): Features;
|
|
278
|
-
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
279
|
-
updateFromCache(device: Device$1): void;
|
|
280
|
-
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
281
|
-
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
|
|
282
|
-
interruptionFromOutside(): Promise<void>;
|
|
283
|
-
interruptionFromUser(): Promise<void>;
|
|
284
|
-
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
285
|
-
clearCancelableAction(): void;
|
|
286
|
-
getMode(): EOneKeyDeviceMode;
|
|
287
|
-
getFirmwareVersion(): IVersionArray | null;
|
|
288
|
-
getBLEFirmwareVersion(): IVersionArray | null;
|
|
289
|
-
isUsed(): boolean;
|
|
290
|
-
hasDeviceAcquire(): boolean;
|
|
291
|
-
isUsedHere(): boolean;
|
|
292
|
-
isUsedElsewhere(): boolean;
|
|
293
|
-
isBootloader(): boolean | undefined;
|
|
294
|
-
isInitialized(): boolean | undefined;
|
|
295
|
-
isSeedless(): boolean | undefined;
|
|
296
|
-
isUnacquired(): boolean;
|
|
297
|
-
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
298
|
-
hasUsePassphrase(): boolean;
|
|
299
|
-
checkDeviceId(deviceId: string): boolean;
|
|
300
|
-
lockDevice(): Promise<Success$1>;
|
|
301
|
-
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
302
|
-
unlockDevice(): Promise<Features | undefined>;
|
|
303
|
-
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
declare function generateSdkInstanceId(): string;
|
|
307
|
-
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
308
|
-
interface RequestContext {
|
|
309
|
-
responseID: number;
|
|
310
|
-
sdkInstanceId?: string;
|
|
311
|
-
methodName: string;
|
|
312
|
-
connectId?: string;
|
|
313
|
-
deviceInstanceId?: string;
|
|
314
|
-
commandsInstanceId?: string;
|
|
315
|
-
parentResponseID?: number;
|
|
316
|
-
startTime: number;
|
|
317
|
-
endTime?: number;
|
|
318
|
-
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
319
|
-
error?: string;
|
|
320
|
-
}
|
|
321
|
-
interface SdkTracingContext {
|
|
322
|
-
sdkInstanceId: string;
|
|
323
|
-
createdAt: number;
|
|
324
|
-
activeRequests: Map<number, RequestContext>;
|
|
164
|
+
promptPassphrase(options: PassphraseRequestPayload, promptOptions?: {
|
|
165
|
+
cancelDeviceOnReject?: boolean;
|
|
166
|
+
}): Promise<PassphrasePromptResponse>;
|
|
325
167
|
}
|
|
326
|
-
declare function createSdkTracingContext(): SdkTracingContext;
|
|
327
|
-
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
328
|
-
sdkInstanceId?: string;
|
|
329
|
-
connectId?: string;
|
|
330
|
-
deviceInstanceId?: string;
|
|
331
|
-
commandsInstanceId?: string;
|
|
332
|
-
parentResponseID?: number;
|
|
333
|
-
}): RequestContext;
|
|
334
|
-
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
335
|
-
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
336
|
-
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
337
|
-
declare function formatRequestContext(context: RequestContext): string;
|
|
338
|
-
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
339
168
|
|
|
340
|
-
|
|
341
|
-
private tracingContext;
|
|
342
|
-
readonly sdkInstanceId: string;
|
|
343
|
-
private requestQueue;
|
|
344
|
-
private prePendingCallPromise;
|
|
345
|
-
private methodSynchronize;
|
|
346
|
-
constructor();
|
|
347
|
-
private getCoreContext;
|
|
348
|
-
handleMessage(message: CoreMessage): Promise<any>;
|
|
349
|
-
dispose(): void;
|
|
350
|
-
}
|
|
351
|
-
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
352
|
-
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
353
|
-
env: ConnectSettings['env'];
|
|
354
|
-
Transport: any;
|
|
355
|
-
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
356
|
-
}) => void;
|
|
169
|
+
type ProtocolV2RuntimeMode = 'normal' | 'bootloader';
|
|
357
170
|
|
|
358
|
-
type
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
171
|
+
type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
|
|
172
|
+
type ConnectSettings = {
|
|
173
|
+
connectSrc?: string;
|
|
174
|
+
debug?: boolean;
|
|
175
|
+
transportReconnect?: boolean;
|
|
176
|
+
lazyLoad?: boolean;
|
|
177
|
+
origin?: string;
|
|
178
|
+
parentOrigin?: string;
|
|
179
|
+
configSrc: string;
|
|
180
|
+
iframeSrc: string;
|
|
181
|
+
version: string;
|
|
182
|
+
priority: number;
|
|
183
|
+
trustedHost: boolean;
|
|
184
|
+
supportedBrowser?: boolean;
|
|
185
|
+
env: transportEnv;
|
|
186
|
+
timestamp: number;
|
|
187
|
+
isFrame?: boolean;
|
|
188
|
+
preRelease?: boolean;
|
|
189
|
+
firmwareManifestMode?: 'sdk-managed' | 'external-only';
|
|
190
|
+
preloadedConfig?: RemoteConfigResponse;
|
|
191
|
+
fetchConfig?: boolean;
|
|
192
|
+
extension?: string;
|
|
193
|
+
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
367
194
|
};
|
|
368
|
-
type
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
195
|
+
type IVersionArray = [number, number, number];
|
|
196
|
+
type ILocale = 'zh-CN' | 'en-US';
|
|
197
|
+
type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04';
|
|
198
|
+
type IProtocolV2FirmwareComponent = {
|
|
199
|
+
target: IProtocolV2FirmwareComponentTarget;
|
|
200
|
+
url: string;
|
|
201
|
+
fingerprint?: string;
|
|
202
|
+
expectedSize?: number;
|
|
203
|
+
version?: IVersionArray;
|
|
373
204
|
};
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
205
|
+
/** Pro2 RESC bundle okpkg descriptor for incremental FileWrite synchronization. */
|
|
206
|
+
type IProtocolV2ResourceBundle = {
|
|
207
|
+
/** Bundle name, such as images, animation, translations, or fonts_roobert. */
|
|
208
|
+
name: string;
|
|
209
|
+
/** Download URL. */
|
|
210
|
+
url: string;
|
|
211
|
+
fingerprint?: string;
|
|
212
|
+
expectedSize?: number;
|
|
213
|
+
/** Device target path, such as vol0:/bundles/images/images.okpkg. */
|
|
214
|
+
devicePath: string;
|
|
215
|
+
/** okpkg payload_version used to skip matching content after FileRead. */
|
|
216
|
+
version?: IVersionArray;
|
|
217
|
+
/** okpkg payload_hash used for SHA3-512 comparison after FileRead. */
|
|
218
|
+
payloadHash?: string;
|
|
219
|
+
/** okpkg header_hash used for SHA3-512 comparison after FileRead. */
|
|
220
|
+
headerHash?: string;
|
|
221
|
+
};
|
|
222
|
+
/** STM32 firmware config */
|
|
223
|
+
type IFirmwareReleaseInfo = {
|
|
224
|
+
required: boolean;
|
|
225
|
+
url: string;
|
|
226
|
+
/**
|
|
227
|
+
* Firmware type (bitcoinonly or universal)
|
|
228
|
+
* This field is not present in the remote config, but will be inferred from the firmware field name
|
|
229
|
+
*/
|
|
230
|
+
firmwareType?: EFirmwareType;
|
|
231
|
+
/** Firmware UI resource */
|
|
232
|
+
resource?: string;
|
|
233
|
+
resourceFingerprint?: string;
|
|
234
|
+
resourceExpectedSize?: number;
|
|
235
|
+
/** Firmware full UI resource */
|
|
236
|
+
fullResource?: string;
|
|
237
|
+
fullResourceFingerprint?: string;
|
|
238
|
+
fullResourceExpectedSize?: number;
|
|
239
|
+
fullResourceRange?: string[];
|
|
240
|
+
bootloaderResource?: string;
|
|
241
|
+
bootloaderFingerprint?: string;
|
|
242
|
+
bootloaderExpectedSize?: number;
|
|
243
|
+
bootloaderVersion?: IVersionArray;
|
|
244
|
+
displayBootloaderVersion?: IVersionArray;
|
|
245
|
+
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
246
|
+
upgradeType?: 'payload-package-set' | string;
|
|
247
|
+
components?: Record<string, IProtocolV2FirmwareComponent>;
|
|
248
|
+
installOrder?: string[];
|
|
249
|
+
/** Pro2 RESC bundles for incremental direct FileWrite synchronization. */
|
|
250
|
+
resourceBundles?: IProtocolV2ResourceBundle[];
|
|
251
|
+
bootloaderChangelog?: {
|
|
252
|
+
[k in ILocale]: string;
|
|
253
|
+
};
|
|
254
|
+
fingerprint: string;
|
|
255
|
+
expectedSize?: number;
|
|
256
|
+
version: IVersionArray;
|
|
257
|
+
changelog: {
|
|
258
|
+
[k in ILocale]: string;
|
|
259
|
+
};
|
|
377
260
|
};
|
|
378
|
-
|
|
379
|
-
type
|
|
380
|
-
|
|
261
|
+
/** BLE firmware config */
|
|
262
|
+
type IBLEFirmwareReleaseInfo = {
|
|
263
|
+
required: boolean;
|
|
264
|
+
/** bluetooth dfu version */
|
|
265
|
+
url: string;
|
|
266
|
+
/** stm bluetooth update version */
|
|
267
|
+
webUpdate: string;
|
|
268
|
+
fingerprint: string;
|
|
269
|
+
fingerprintWeb: string;
|
|
270
|
+
expectedSize?: number;
|
|
271
|
+
version: IVersionArray;
|
|
272
|
+
changelog: {
|
|
273
|
+
[k in ILocale]: string;
|
|
274
|
+
};
|
|
381
275
|
};
|
|
382
|
-
type
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
child_dirs?: string;
|
|
394
|
-
child_files?: string;
|
|
276
|
+
type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
|
|
277
|
+
type DeviceTypeMap = {
|
|
278
|
+
[k in IKnownDevice]: {
|
|
279
|
+
firmware: IFirmwareReleaseInfo[];
|
|
280
|
+
/** Pro2 Protocol V2 payload package set */
|
|
281
|
+
'firmware-v1'?: IFirmwareReleaseInfo[];
|
|
282
|
+
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
283
|
+
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
284
|
+
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
285
|
+
ble: IBLEFirmwareReleaseInfo[];
|
|
286
|
+
};
|
|
395
287
|
};
|
|
396
|
-
type
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
};
|
|
411
|
-
declare function getProtoVersion(connectId: string, params?: CommonParams): Response<ProtoVersion>;
|
|
412
|
-
declare function ping(connectId: string, params?: CommonParams & {
|
|
413
|
-
message?: string;
|
|
414
|
-
}): Response<Success$1>;
|
|
415
|
-
declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
416
|
-
declare function deviceGetDeviceInfo(connectId: string, params?: CommonParams & DeviceGetDeviceInfoParams): Response<ProtocolV2DeviceInfo>;
|
|
417
|
-
declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<OnboardingStatus>;
|
|
418
|
-
declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DevFirmwareUpdateStatus>;
|
|
419
|
-
declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams): Response<DevFirmwareUpdateStatus>;
|
|
420
|
-
declare function devReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
421
|
-
declare function devGetDeviceInfo(connectId: string, params?: CommonParams & DeviceGetDeviceInfoParams): Response<ProtocolV2DeviceInfo>;
|
|
422
|
-
declare function devFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DevFirmwareUpdateStatus>;
|
|
423
|
-
declare function devGetFirmwareUpdateStatus(connectId: string, params?: CommonParams): Response<DevFirmwareUpdateStatus>;
|
|
424
|
-
declare function factoryDeviceInfoSettings(connectId: string, params: FactoryDeviceInfoSettingsParams): Response<Success$1>;
|
|
425
|
-
declare function factoryGetDeviceInfo(connectId: string): Response<FactoryDeviceInfo>;
|
|
426
|
-
declare function filesystemFixPermission(connectId: string): Response<Success$1>;
|
|
427
|
-
declare function fileRead(connectId: string, params: {
|
|
428
|
-
path: string;
|
|
429
|
-
offset?: number;
|
|
430
|
-
totalSize?: number;
|
|
431
|
-
chunkLen?: number;
|
|
432
|
-
uiPercentage?: number;
|
|
433
|
-
}): Response<FileInfo>;
|
|
434
|
-
declare function fileWrite(connectId: string, params: {
|
|
435
|
-
path: string;
|
|
436
|
-
offset?: number;
|
|
437
|
-
totalSize?: number;
|
|
438
|
-
chunkSize?: number;
|
|
439
|
-
chunkLen?: number;
|
|
440
|
-
data: ArrayBuffer | Uint8Array | Blob | string;
|
|
441
|
-
overwrite?: boolean;
|
|
442
|
-
append?: boolean;
|
|
443
|
-
uiPercentage?: number;
|
|
444
|
-
timeoutMs?: number | string;
|
|
445
|
-
}): Response<FileInfo>;
|
|
446
|
-
declare function fileDelete(connectId: string, params: {
|
|
447
|
-
path: string;
|
|
448
|
-
}): Response<FileOpSuccess>;
|
|
449
|
-
declare function dirList(connectId: string, params: {
|
|
450
|
-
path: string;
|
|
451
|
-
depth?: number;
|
|
452
|
-
}): Response<DirInfo>;
|
|
453
|
-
declare function dirMake(connectId: string, params: {
|
|
454
|
-
path: string;
|
|
455
|
-
}): Response<FileOpSuccess>;
|
|
456
|
-
declare function dirRemove(connectId: string, params: {
|
|
457
|
-
path: string;
|
|
458
|
-
}): Response<FileOpSuccess>;
|
|
459
|
-
declare function pathInfo(connectId: string, params: {
|
|
460
|
-
path: string;
|
|
461
|
-
timeoutMs?: number | string;
|
|
462
|
-
}): Response<PathInfoResult>;
|
|
463
|
-
declare const filesystemFileRead: typeof fileRead;
|
|
464
|
-
declare const filesystemFileWrite: typeof fileWrite;
|
|
465
|
-
declare const filesystemFileDelete: typeof fileDelete;
|
|
466
|
-
declare const filesystemDirList: typeof dirList;
|
|
467
|
-
declare const filesystemDirMake: typeof dirMake;
|
|
468
|
-
declare const filesystemDirRemove: typeof dirRemove;
|
|
469
|
-
declare const filesystemPathInfoQuery: typeof pathInfo;
|
|
470
|
-
declare function filesystemFormat(connectId: string): Response<Success$1>;
|
|
471
|
-
declare function filesystemDiskControl(connectId: string, params: CommonParams & {
|
|
472
|
-
enable: boolean | 0 | 1;
|
|
473
|
-
timeoutMs?: number | string;
|
|
474
|
-
}): Response<Success$1>;
|
|
475
|
-
|
|
476
|
-
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
477
|
-
declare const off: (type: any, fn: any) => void;
|
|
478
|
-
declare const removeAllListeners: (type: any) => void;
|
|
479
|
-
|
|
480
|
-
declare function uiResponse(response: UiResponseEvent): void;
|
|
481
|
-
|
|
482
|
-
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
483
|
-
interface LowLevelInjectApi {
|
|
484
|
-
call: CallMethod;
|
|
485
|
-
eventEmitter: EventEmitter$1;
|
|
486
|
-
init: CoreApi['init'];
|
|
487
|
-
dispose: CoreApi['dispose'];
|
|
488
|
-
uiResponse: CoreApi['uiResponse'];
|
|
489
|
-
cancel: CoreApi['cancel'];
|
|
490
|
-
updateSettings: CoreApi['updateSettings'];
|
|
491
|
-
switchTransport: CoreApi['switchTransport'];
|
|
492
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
493
|
-
}
|
|
494
|
-
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
495
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
288
|
+
type AssetsMap = {
|
|
289
|
+
bridge: {
|
|
290
|
+
version: IVersionArray;
|
|
291
|
+
linux32Rpm: string;
|
|
292
|
+
linux64Rpm: string;
|
|
293
|
+
linux32Deb: string;
|
|
294
|
+
linux64Deb: string;
|
|
295
|
+
win: string;
|
|
296
|
+
mac: string;
|
|
297
|
+
sha256sumAsc: string;
|
|
298
|
+
changelog: {
|
|
299
|
+
[k in ILocale]: string;
|
|
300
|
+
};
|
|
301
|
+
};
|
|
496
302
|
};
|
|
303
|
+
type RemoteConfigResponse = {
|
|
304
|
+
bridge: AssetsMap['bridge'];
|
|
305
|
+
} & DeviceTypeMap;
|
|
497
306
|
|
|
498
307
|
type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
499
308
|
declare enum EOneKeyDeviceMode {
|
|
@@ -508,6 +317,12 @@ type UnavailableCapabilities = {
|
|
|
508
317
|
};
|
|
509
318
|
type KnownDevice = {
|
|
510
319
|
connectId: string | null;
|
|
320
|
+
/**
|
|
321
|
+
* Stable physical-device identity. Current SDK responses always include this
|
|
322
|
+
* value; it remains optional in the type during the uuid compatibility window.
|
|
323
|
+
*/
|
|
324
|
+
serialNo?: string;
|
|
325
|
+
/** @deprecated Use serialNo instead. */
|
|
511
326
|
uuid: string;
|
|
512
327
|
deviceId: string | null;
|
|
513
328
|
deviceType: IDeviceType | null;
|
|
@@ -517,9 +332,12 @@ type KnownDevice = {
|
|
|
517
332
|
bleName: string | null;
|
|
518
333
|
name: string;
|
|
519
334
|
error?: typeof undefined;
|
|
335
|
+
/** Current SDK/transport usage state for connection indicators. */
|
|
336
|
+
status?: DeviceStatus;
|
|
520
337
|
mode: EOneKeyDeviceMode;
|
|
521
338
|
features?: Features;
|
|
522
|
-
|
|
339
|
+
/** Unified SDK device-state snapshot; features remains a legacy projection. */
|
|
340
|
+
state?: DeviceState;
|
|
523
341
|
unavailableCapabilities: UnavailableCapabilities;
|
|
524
342
|
bleFirmwareVersion: IVersionArray | null;
|
|
525
343
|
firmwareVersion: IVersionArray | null;
|
|
@@ -529,15 +347,26 @@ type KnownDevice = {
|
|
|
529
347
|
};
|
|
530
348
|
type SearchDevice = {
|
|
531
349
|
connectId: string | null;
|
|
350
|
+
/**
|
|
351
|
+
* Available after device initialization. BLE discovery does not connect to the
|
|
352
|
+
* device, so it returns null until a later initialized device response. Current
|
|
353
|
+
* SDK responses always include the field; it remains optional in the type during
|
|
354
|
+
* the uuid compatibility window.
|
|
355
|
+
*/
|
|
356
|
+
serialNo?: string | null;
|
|
357
|
+
/**
|
|
358
|
+
* @deprecated Ambiguous legacy identifier. Use serialNo for hardware identity
|
|
359
|
+
* and connectId for transport routing.
|
|
360
|
+
*/
|
|
532
361
|
uuid: string;
|
|
533
362
|
deviceId: string | null;
|
|
534
363
|
deviceType: IDeviceType;
|
|
535
364
|
name: string;
|
|
536
365
|
commType: OneKeyDeviceCommType;
|
|
537
366
|
};
|
|
538
|
-
type Device = KnownDevice;
|
|
367
|
+
type Device$1 = KnownDevice;
|
|
539
368
|
type DeviceFeaturesProtocol = 'V1' | 'V2' | 'unknown';
|
|
540
|
-
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
369
|
+
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
541
370
|
type DeviceFeaturesVerify = {
|
|
542
371
|
firmwareBuildId?: string;
|
|
543
372
|
firmwareHash?: string;
|
|
@@ -568,8 +397,111 @@ type DeviceFeaturesRaw = {
|
|
|
568
397
|
protocolV1Features?: Messages.Features;
|
|
569
398
|
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
570
399
|
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
400
|
+
protocolV2DeviceStatus?: DeviceStatus$1;
|
|
401
|
+
};
|
|
402
|
+
type DeviceFeaturesRawPatch = {
|
|
403
|
+
[Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
|
|
404
|
+
};
|
|
405
|
+
type DeviceStateProtocol = DeviceFeaturesProtocol;
|
|
406
|
+
type DeviceStateMode = DeviceFeaturesMode;
|
|
407
|
+
type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
|
|
408
|
+
type DeviceStateUpdateSource = 'initialize' | 'device-info' | 'device-status' | 'settings-read' | 'settings-write' | 'change-pin' | 'lock' | 'unlock' | 'passphrase' | 'session-clear' | 'firmware-update' | 'transport-reconnect' | 'compatibility';
|
|
409
|
+
type DeviceStateIdentity = {
|
|
410
|
+
deviceType: IDeviceType;
|
|
411
|
+
firmwareType: EFirmwareType;
|
|
412
|
+
model: string | null;
|
|
413
|
+
vendor: string | null;
|
|
414
|
+
deviceId: string | null;
|
|
415
|
+
serialNo: string;
|
|
416
|
+
label: string | null;
|
|
417
|
+
bleName: string | null;
|
|
418
|
+
};
|
|
419
|
+
type DeviceStateStatus = {
|
|
420
|
+
mode: DeviceStateMode;
|
|
421
|
+
initialized: boolean | null;
|
|
422
|
+
unlocked: boolean | null;
|
|
423
|
+
firmwarePresent: boolean | null;
|
|
424
|
+
backupRequired: boolean | null;
|
|
425
|
+
noBackup: boolean | null;
|
|
426
|
+
unfinishedBackup: boolean | null;
|
|
427
|
+
recoveryMode: boolean | null;
|
|
428
|
+
passphraseProtection: boolean | null;
|
|
429
|
+
pinProtection: boolean | null;
|
|
430
|
+
attachToPinEnabled: boolean | null;
|
|
431
|
+
unlockedAttachPin: boolean | null;
|
|
432
|
+
};
|
|
433
|
+
type DeviceStateSettings = {
|
|
434
|
+
language: string | null;
|
|
435
|
+
bleEnabled: boolean | null;
|
|
436
|
+
sdCardPresent: boolean | null;
|
|
437
|
+
sdProtection: boolean | null;
|
|
438
|
+
wipeCodeProtection: boolean | null;
|
|
439
|
+
passphraseAlwaysOnDevice: boolean | null;
|
|
440
|
+
safetyChecks: Enum_SafetyCheckLevel | null;
|
|
441
|
+
autoLockDelayMs: number | null;
|
|
442
|
+
autoShutdownDelayMs: number | null;
|
|
443
|
+
displayRotation: number | null;
|
|
444
|
+
experimentalFeatures: boolean | null;
|
|
445
|
+
wallpaperPath: string | null;
|
|
446
|
+
brightness: number | null;
|
|
447
|
+
animationEnabled: boolean | null;
|
|
448
|
+
tapToWake: boolean | null;
|
|
449
|
+
hapticFeedback: boolean | null;
|
|
450
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
451
|
+
airgapMode: boolean | null;
|
|
452
|
+
fidoEnabled: boolean | null;
|
|
453
|
+
usbLockEnabled: boolean | null;
|
|
454
|
+
randomKeypad: boolean | null;
|
|
455
|
+
};
|
|
456
|
+
type DeviceStateVersions = {
|
|
457
|
+
firmware: string | null;
|
|
458
|
+
bootloader: string | null;
|
|
459
|
+
board: string | null;
|
|
460
|
+
ble: string | null;
|
|
461
|
+
/** @deprecated Kept for legacy consumers; new code should read se01. */
|
|
462
|
+
se?: string | null;
|
|
463
|
+
se01?: string | null;
|
|
464
|
+
se02?: string | null;
|
|
465
|
+
se03?: string | null;
|
|
466
|
+
se04?: string | null;
|
|
467
|
+
se01Boot?: string | null;
|
|
468
|
+
se02Boot?: string | null;
|
|
469
|
+
se03Boot?: string | null;
|
|
470
|
+
se04Boot?: string | null;
|
|
471
|
+
};
|
|
472
|
+
type DeviceState = {
|
|
473
|
+
schemaVersion: 1;
|
|
474
|
+
revision: number;
|
|
475
|
+
updatedAt: number;
|
|
476
|
+
protocol: DeviceStateProtocol;
|
|
477
|
+
/** Device-message protocol version, independent of the SDK V1/V2 protocol family. */
|
|
478
|
+
protocolVersion: number | null;
|
|
479
|
+
identity: DeviceStateIdentity;
|
|
480
|
+
status: DeviceStateStatus;
|
|
481
|
+
settings: DeviceStateSettings;
|
|
482
|
+
versions: DeviceStateVersions;
|
|
483
|
+
capabilities: Array<number | string>;
|
|
484
|
+
verification?: Partial<DeviceFeaturesVerify>;
|
|
485
|
+
};
|
|
486
|
+
type DeviceStatePatch = {
|
|
487
|
+
protocol?: DeviceStateProtocol;
|
|
488
|
+
protocolVersion?: number | null;
|
|
489
|
+
identity?: Partial<DeviceStateIdentity>;
|
|
490
|
+
status?: Partial<DeviceStateStatus>;
|
|
491
|
+
settings?: Partial<DeviceStateSettings>;
|
|
492
|
+
versions?: Partial<DeviceStateVersions>;
|
|
493
|
+
capabilities?: Array<number | string>;
|
|
494
|
+
verification?: DeviceFeaturesVerify;
|
|
495
|
+
raw?: DeviceFeaturesRawPatch;
|
|
496
|
+
};
|
|
497
|
+
type DeviceStateEvent = {
|
|
498
|
+
connectId: string | null;
|
|
499
|
+
state: DeviceState;
|
|
500
|
+
revision: number;
|
|
501
|
+
source: DeviceStateUpdateSource;
|
|
502
|
+
changedKeys: string[];
|
|
571
503
|
};
|
|
572
|
-
type
|
|
504
|
+
type NormalizedFeatures = {
|
|
573
505
|
protocol: DeviceFeaturesProtocol;
|
|
574
506
|
protocolVersion?: number | null;
|
|
575
507
|
deviceType: IDeviceType;
|
|
@@ -598,10 +530,22 @@ type Features = {
|
|
|
598
530
|
sdProtection: boolean | null;
|
|
599
531
|
wipeCodeProtection: boolean | null;
|
|
600
532
|
passphraseAlwaysOnDevice: boolean | null;
|
|
601
|
-
|
|
533
|
+
attachToPinEnabled?: boolean | null;
|
|
534
|
+
safetyChecks: Enum_SafetyCheckLevel | null;
|
|
602
535
|
autoLockDelayMs: number | null;
|
|
536
|
+
autoShutdownDelayMs: number | null;
|
|
603
537
|
displayRotation: number | null;
|
|
604
538
|
experimentalFeatures: boolean | null;
|
|
539
|
+
wallpaperPath: string | null;
|
|
540
|
+
brightness: number | null;
|
|
541
|
+
animationEnabled: boolean | null;
|
|
542
|
+
tapToWake: boolean | null;
|
|
543
|
+
hapticFeedback: boolean | null;
|
|
544
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
545
|
+
airgapMode: boolean | null;
|
|
546
|
+
fidoEnabled: boolean | null;
|
|
547
|
+
usbLockEnabled: boolean | null;
|
|
548
|
+
randomKeypad: boolean | null;
|
|
605
549
|
firmwareVersion: string | null;
|
|
606
550
|
bootloaderVersion: string | null;
|
|
607
551
|
boardVersion: string | null;
|
|
@@ -621,8 +565,14 @@ type Features = {
|
|
|
621
565
|
unlockedAttachPin?: boolean;
|
|
622
566
|
raw?: DeviceFeaturesRaw;
|
|
623
567
|
};
|
|
568
|
+
type Features = NormalizedFeatures & Partial<Omit<Messages.Features, keyof NormalizedFeatures>> & Partial<Omit<Messages.OnekeyFeatures, keyof NormalizedFeatures | keyof Messages.Features>>;
|
|
624
569
|
type OnekeyFeatures = Messages.OnekeyFeatures;
|
|
625
570
|
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
|
|
571
|
+
/**
|
|
572
|
+
* model_classic: 'classic' | 'classic1s' | 'classicpure'
|
|
573
|
+
* model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
|
|
574
|
+
* model_touch: 'touch' | 'pro'
|
|
575
|
+
*/
|
|
626
576
|
type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
|
|
627
577
|
declare const DeviceModelToTypes: {
|
|
628
578
|
[deviceModel in IDeviceModel]: IDeviceType[];
|
|
@@ -636,7 +586,6 @@ type ITransportStatus = 'valid' | 'outdated';
|
|
|
636
586
|
type IVersionRange = {
|
|
637
587
|
min: string;
|
|
638
588
|
max?: string;
|
|
639
|
-
unsupported?: boolean;
|
|
640
589
|
};
|
|
641
590
|
type DeviceFirmwareRange = {
|
|
642
591
|
[deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
|
|
@@ -687,90 +636,460 @@ type SupportFeatures = {
|
|
|
687
636
|
modifyHomescreen: SupportFeatureType;
|
|
688
637
|
};
|
|
689
638
|
|
|
690
|
-
type
|
|
691
|
-
type
|
|
692
|
-
|
|
693
|
-
debug?: boolean;
|
|
694
|
-
transportReconnect?: boolean;
|
|
695
|
-
lazyLoad?: boolean;
|
|
696
|
-
origin?: string;
|
|
697
|
-
parentOrigin?: string;
|
|
698
|
-
configSrc: string;
|
|
699
|
-
iframeSrc: string;
|
|
700
|
-
version: string;
|
|
701
|
-
priority: number;
|
|
702
|
-
trustedHost: boolean;
|
|
703
|
-
supportedBrowser?: boolean;
|
|
704
|
-
env: transportEnv;
|
|
705
|
-
timestamp: number;
|
|
706
|
-
isFrame?: boolean;
|
|
707
|
-
preRelease?: boolean;
|
|
708
|
-
fetchConfig?: boolean;
|
|
709
|
-
extension?: string;
|
|
710
|
-
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
711
|
-
protocolV2DeviceInfoMockEnabled?: boolean;
|
|
639
|
+
type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
|
|
640
|
+
type GetDeviceStateParams = CommonParams & {
|
|
641
|
+
scope?: DeviceStateScope;
|
|
712
642
|
};
|
|
713
|
-
|
|
714
|
-
type
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
url: string;
|
|
718
|
-
firmwareType?: EFirmwareType;
|
|
719
|
-
resource?: string;
|
|
720
|
-
fullResource?: string;
|
|
721
|
-
fullResourceRange?: string[];
|
|
722
|
-
bootloaderResource?: string;
|
|
723
|
-
bootloaderVersion?: IVersionArray;
|
|
724
|
-
displayBootloaderVersion?: IVersionArray;
|
|
725
|
-
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
726
|
-
bootloaderChangelog?: {
|
|
727
|
-
[k in ILocale]: string;
|
|
728
|
-
};
|
|
729
|
-
fingerprint: string;
|
|
730
|
-
version: IVersionArray;
|
|
731
|
-
changelog: {
|
|
732
|
-
[k in ILocale]: string;
|
|
733
|
-
};
|
|
643
|
+
/** Internal state-read options, not part of the public CoreApi. */
|
|
644
|
+
type DeviceStateReadOptions = {
|
|
645
|
+
refreshSections?: DeviceStateSection[];
|
|
646
|
+
includeRaw?: boolean;
|
|
734
647
|
};
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
648
|
+
declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
|
|
649
|
+
|
|
650
|
+
type DeviceDescriptorDiff = {
|
|
651
|
+
didUpdate: boolean;
|
|
652
|
+
connected: OneKeyDeviceInfo[];
|
|
653
|
+
disconnected: OneKeyDeviceInfo[];
|
|
654
|
+
changedSessions: OneKeyDeviceInfo[];
|
|
655
|
+
changedDebugSessions: OneKeyDeviceInfo[];
|
|
656
|
+
acquired: OneKeyDeviceInfo[];
|
|
657
|
+
debugAcquired: OneKeyDeviceInfo[];
|
|
658
|
+
released: OneKeyDeviceInfo[];
|
|
659
|
+
debugReleased: OneKeyDeviceInfo[];
|
|
660
|
+
descriptors: OneKeyDeviceInfo[];
|
|
745
661
|
};
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
662
|
+
|
|
663
|
+
declare class DeviceConnector {
|
|
664
|
+
transport: Transport;
|
|
665
|
+
listenTimestamp: number;
|
|
666
|
+
current: OneKeyDeviceInfo[] | null;
|
|
667
|
+
upcoming: OneKeyDeviceInfo[];
|
|
668
|
+
listening: boolean;
|
|
669
|
+
constructor();
|
|
670
|
+
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
671
|
+
listen(): Promise<void>;
|
|
672
|
+
stop(): void;
|
|
673
|
+
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
674
|
+
release(session: string, onclose: boolean): Promise<void>;
|
|
675
|
+
disconnect(session: string | undefined | null): Promise<void>;
|
|
676
|
+
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
677
|
+
_reportDevicesChange(): void;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
type InitOptions = {
|
|
681
|
+
initSession?: boolean;
|
|
682
|
+
deviceId?: string;
|
|
683
|
+
passphraseState?: string;
|
|
684
|
+
deriveCardano?: boolean;
|
|
685
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
686
|
+
protocolV2DeviceInfoTimeoutMs?: number;
|
|
687
|
+
/** Refresh Protocol V2 runtime state before returning discovery results. */
|
|
688
|
+
refreshRuntimeState?: boolean;
|
|
755
689
|
};
|
|
756
|
-
type
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
690
|
+
type RunOptions = {
|
|
691
|
+
keepSession?: boolean;
|
|
692
|
+
skipInitialize?: boolean;
|
|
693
|
+
} & InitOptions;
|
|
694
|
+
interface DeviceEvents {
|
|
695
|
+
[DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
696
|
+
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
697
|
+
[DEVICE.ATTACH_PIN_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
698
|
+
[DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
|
|
699
|
+
[DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
|
|
700
|
+
[DEVICE.STATE]: [Device, DeviceStateEvent];
|
|
701
|
+
[DEVICE.PASSPHRASE]: [
|
|
702
|
+
Device,
|
|
703
|
+
PassphraseRequestPayload,
|
|
704
|
+
(response: PassphrasePromptResponse, error?: Error) => void
|
|
705
|
+
];
|
|
706
|
+
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
707
|
+
Device,
|
|
708
|
+
(err: any, deviceId: string) => void
|
|
709
|
+
];
|
|
710
|
+
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
711
|
+
Device,
|
|
712
|
+
(err: any, deviceId: string) => void
|
|
713
|
+
];
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* Pre-populate the device session cache with a known session ID.
|
|
717
|
+
*
|
|
718
|
+
* This allows short-lived processes (e.g. CLI) to restore a previously
|
|
719
|
+
* obtained session, avoiding the need to re-enter passphrase on every
|
|
720
|
+
* invocation. The session must have been obtained from a prior
|
|
721
|
+
* wallet-session call on the same device. This compatibility hook is intended
|
|
722
|
+
* for a trusted CLI process restoring its own OS-keychain entry.
|
|
723
|
+
*
|
|
724
|
+
* @param deviceId - The device's device_id (from features)
|
|
725
|
+
* @param passphraseState - The passphrase state token
|
|
726
|
+
* @param sessionId - The session_id to cache (from features.session_id)
|
|
727
|
+
*/
|
|
728
|
+
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
729
|
+
interface Device {
|
|
730
|
+
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
731
|
+
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
732
|
+
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
733
|
+
}
|
|
734
|
+
declare class Device extends EventEmitter {
|
|
735
|
+
/**
|
|
736
|
+
* 设备标识对象
|
|
737
|
+
*/
|
|
738
|
+
originalDescriptor: OneKeyDeviceInfo;
|
|
739
|
+
sdkInstanceId?: string;
|
|
740
|
+
/**
|
|
741
|
+
* 设备实例唯一标识
|
|
742
|
+
*/
|
|
743
|
+
instanceId: string;
|
|
744
|
+
createdAt: number;
|
|
745
|
+
/**
|
|
746
|
+
* 设备主 ID
|
|
747
|
+
* 蓝牙连接时是设备的 UUID
|
|
748
|
+
* USB连接时是设备的 sessionID
|
|
749
|
+
*/
|
|
750
|
+
mainId?: string | null;
|
|
751
|
+
/**
|
|
752
|
+
* 通信管道,向设备发送请求
|
|
753
|
+
*/
|
|
754
|
+
deviceConnector?: DeviceConnector | null;
|
|
755
|
+
/**
|
|
756
|
+
* 固件命令
|
|
757
|
+
*/
|
|
758
|
+
commands: DeviceCommands;
|
|
759
|
+
/**
|
|
760
|
+
* 可取消的操作
|
|
761
|
+
*/
|
|
762
|
+
private cancelableAction?;
|
|
763
|
+
/**
|
|
764
|
+
* 设备是否被占用
|
|
765
|
+
*/
|
|
766
|
+
private deviceAcquired;
|
|
767
|
+
/** Canonical device-state cache; legacy Features is a compatibility projection. */
|
|
768
|
+
private stateStore;
|
|
769
|
+
/** Force the next initialization to reload DeviceInfo after reconnect or reboot. */
|
|
770
|
+
private protocolV2StateNeedsReload;
|
|
771
|
+
get state(): (DeviceState & {
|
|
772
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
773
|
+
}) | undefined;
|
|
774
|
+
get features(): Features | undefined;
|
|
775
|
+
set features(features: Features | undefined);
|
|
776
|
+
runPromise?: Deferred<void> | null;
|
|
777
|
+
externalState: string[];
|
|
778
|
+
unavailableCapabilities: UnavailableCapabilities;
|
|
779
|
+
instance: number;
|
|
780
|
+
internalState: string[];
|
|
781
|
+
needReloadDevice: boolean;
|
|
782
|
+
/**
|
|
783
|
+
* 执行 API 方法后是否保留 SessionID
|
|
784
|
+
*/
|
|
785
|
+
keepSession: boolean;
|
|
786
|
+
passphraseState: string | undefined;
|
|
787
|
+
pendingCallbackPromise?: Deferred<void>;
|
|
788
|
+
/** Pre-initialize timestamp (ms) */
|
|
789
|
+
private preInitializedAt?;
|
|
790
|
+
/** Pre-initialize context, used to verify state consistency before skipping */
|
|
791
|
+
private preInitializeMeta?;
|
|
792
|
+
/** Last Initialize duration (ms), reported as "saved" when a skip happens */
|
|
793
|
+
private lastInitializeDurationMs?;
|
|
794
|
+
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
795
|
+
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
|
|
796
|
+
toMessageObject(): Device$1 | null;
|
|
797
|
+
/**
|
|
798
|
+
* Device connect
|
|
799
|
+
* @returns {Promise<boolean>}
|
|
800
|
+
*/
|
|
801
|
+
connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
|
|
802
|
+
acquire(connectProtocol?: HardwareConnectProtocol, options?: {
|
|
803
|
+
throwOnRunPromiseError?: boolean;
|
|
804
|
+
}): Promise<void>;
|
|
805
|
+
release(): Promise<void>;
|
|
806
|
+
/**
|
|
807
|
+
* Pre-initialize: connect + Initialize ahead of the sign.
|
|
808
|
+
*/
|
|
809
|
+
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
810
|
+
markPreInitialized(meta?: {
|
|
811
|
+
passphraseState?: string;
|
|
812
|
+
}): void;
|
|
813
|
+
clearPreInitialized(): void;
|
|
814
|
+
isPreInitializeMetaMatch(payload?: {
|
|
815
|
+
passphraseState?: string;
|
|
816
|
+
}): boolean;
|
|
817
|
+
isPreInitializedValid(ttlMs: number): boolean;
|
|
818
|
+
setLastInitializeDuration(durationMs: number): void;
|
|
819
|
+
getLastInitializeDuration(): number | undefined;
|
|
820
|
+
getCommands(): DeviceCommands;
|
|
821
|
+
/**
|
|
822
|
+
* Canonical protocol discriminator.
|
|
823
|
+
*
|
|
824
|
+
* descriptor.protocolType is established by active probing; V2 features are mapped
|
|
825
|
+
* from DeviceInfoGet. All protocol branches must use this method instead of reading
|
|
826
|
+
* originalDescriptor.protocolType directly or inferring a protocol from features.
|
|
827
|
+
*/
|
|
828
|
+
getProtocol(): 'V1' | 'V2';
|
|
829
|
+
isProtocolV2(): boolean;
|
|
830
|
+
getCurrentDeviceType(): IDeviceType;
|
|
831
|
+
getCurrentDeviceId(): string | undefined;
|
|
832
|
+
getCurrentSerialNo(): string;
|
|
833
|
+
getConnectId(): string;
|
|
834
|
+
getCurrentBleName(): string | null;
|
|
835
|
+
getCurrentLabel(): string | null;
|
|
836
|
+
getCurrentDisplayName(): string | null;
|
|
837
|
+
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
838
|
+
getCurrentFirmwareType(): EFirmwareType;
|
|
839
|
+
getCurrentFirmwareVersionString(): string;
|
|
840
|
+
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
841
|
+
getCurrentBootloaderVersionString(): string | undefined;
|
|
842
|
+
getCurrentSafetyChecks(): _onekeyfe_hd_transport.Enum_SafetyCheckLevel | null | undefined;
|
|
843
|
+
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
844
|
+
supportNewPassphrase(): SupportFeatureType;
|
|
845
|
+
supportInputPinOnSoftware(): SupportFeatureType;
|
|
846
|
+
supportModifyHomescreen(): SupportFeatureType;
|
|
847
|
+
private getSessionCacheDeviceKey;
|
|
848
|
+
private reconcileSessionCacheDeviceIdentity;
|
|
849
|
+
getInternalState(_deviceId?: string): string | undefined;
|
|
850
|
+
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
851
|
+
private setInternalState;
|
|
852
|
+
clearInternalState(_deviceId?: string): void;
|
|
853
|
+
initialize(options?: InitOptions): Promise<void>;
|
|
854
|
+
/**
|
|
855
|
+
* Device initialization over Protocol V2.
|
|
856
|
+
*
|
|
857
|
+
* Protocol V2 bypasses legacy Initialize/GetFeatures and builds its canonical
|
|
858
|
+
* features state directly from DeviceInfoGet.
|
|
859
|
+
*/
|
|
860
|
+
private _initializeProtocolV2;
|
|
861
|
+
getFeatures(): Promise<Features | undefined>;
|
|
862
|
+
getDeviceState(params?: DeviceStateReadOptions): Promise<DeviceState>;
|
|
863
|
+
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
864
|
+
updateState(patch: DeviceStatePatch, source: DeviceStateUpdateSource): DeviceState & {
|
|
865
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
769
866
|
};
|
|
867
|
+
updateFeaturesPatch(patch: Partial<Features>, source: DeviceStateUpdateSource): Features | undefined;
|
|
868
|
+
probeProtocolV2RuntimeState(deviceInfo: ProtocolV2DeviceInfo, timeoutMs?: number): Promise<Features>;
|
|
869
|
+
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo, deviceStatus?: DeviceStatus$1 | null, runtimeMode?: ProtocolV2RuntimeMode): Features;
|
|
870
|
+
updateProtocolV2Status(status: DeviceStatus$1): Features;
|
|
871
|
+
markTransportDisconnected(): void;
|
|
872
|
+
invalidateAfterWipe(): void;
|
|
873
|
+
markProtocolV2Reboot(rebootType: DeviceRebootType): void;
|
|
874
|
+
/**
|
|
875
|
+
* 暂时只在 acquire 后更新 Session ID
|
|
876
|
+
* 后续看是否有需要依据 listen 返回结果更新
|
|
877
|
+
* @param descriptor
|
|
878
|
+
*/
|
|
879
|
+
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
880
|
+
updateFromCache(device: Device): void;
|
|
881
|
+
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
882
|
+
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions, runPromise: Deferred<void>): Promise<void>;
|
|
883
|
+
interruptionFromOutside(): Promise<void>;
|
|
884
|
+
interruptionFromUser(): Promise<void>;
|
|
885
|
+
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
886
|
+
clearCancelableAction(): void;
|
|
887
|
+
getMode(): EOneKeyDeviceMode;
|
|
888
|
+
getStatus(): "available" | "occupied" | "used";
|
|
889
|
+
getFirmwareVersion(): IVersionArray | null;
|
|
890
|
+
getBLEFirmwareVersion(): IVersionArray | null;
|
|
891
|
+
isUsed(): boolean;
|
|
892
|
+
hasDeviceAcquire(): boolean;
|
|
893
|
+
isUsedHere(): boolean;
|
|
894
|
+
isUsedElsewhere(): boolean;
|
|
895
|
+
isBootloader(): boolean | undefined;
|
|
896
|
+
isInitialized(): boolean | undefined;
|
|
897
|
+
isSeedless(): boolean | undefined;
|
|
898
|
+
isUnacquired(): boolean;
|
|
899
|
+
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
900
|
+
hasUsePassphrase(): boolean;
|
|
901
|
+
checkDeviceId(deviceId: string): boolean;
|
|
902
|
+
lockDevice(): Promise<Success$1>;
|
|
903
|
+
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
904
|
+
unlockDevice(pinType?: DeviceSessionPinType): Promise<Features | undefined>;
|
|
905
|
+
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
/**
|
|
909
|
+
* SDK Tracing Utilities
|
|
910
|
+
* Tracks object instances and request call chains across multiple SDK instances
|
|
911
|
+
*/
|
|
912
|
+
/**
|
|
913
|
+
* Generate SDK instance ID
|
|
914
|
+
* @returns Format: "SDK-<number>-<timestamp>"
|
|
915
|
+
* @example "SDK-1-123456"
|
|
916
|
+
*/
|
|
917
|
+
declare function generateSdkInstanceId(): string;
|
|
918
|
+
/**
|
|
919
|
+
* Generate globally unique instance ID
|
|
920
|
+
* @param type Instance type (Device, DeviceCommands, BaseMethod, etc.)
|
|
921
|
+
* @param sdkInstanceId SDK instance ID (optional)
|
|
922
|
+
* @returns Format: <SDK>.<type>-<number>-<timestamp>
|
|
923
|
+
* @example "SDK-1.Device-1-123456" or "Device-1-123456"
|
|
924
|
+
*/
|
|
925
|
+
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
926
|
+
/**
|
|
927
|
+
* Request context information
|
|
928
|
+
*/
|
|
929
|
+
interface RequestContext {
|
|
930
|
+
/** Request unique ID (reuses BaseMethod.responseID) */
|
|
931
|
+
responseID: number;
|
|
932
|
+
/** SDK instance ID */
|
|
933
|
+
sdkInstanceId?: string;
|
|
934
|
+
/** API method name */
|
|
935
|
+
methodName: string;
|
|
936
|
+
/** Device connection ID */
|
|
937
|
+
connectId?: string;
|
|
938
|
+
/** Device instance ID */
|
|
939
|
+
deviceInstanceId?: string;
|
|
940
|
+
/** DeviceCommands instance ID */
|
|
941
|
+
commandsInstanceId?: string;
|
|
942
|
+
/** Parent request ID (for nested calls like allNetworkGetAddress) */
|
|
943
|
+
parentResponseID?: number;
|
|
944
|
+
/** Request start time */
|
|
945
|
+
startTime: number;
|
|
946
|
+
/** Request end time */
|
|
947
|
+
endTime?: number;
|
|
948
|
+
/** Request status */
|
|
949
|
+
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
950
|
+
/** Error message */
|
|
951
|
+
error?: string;
|
|
952
|
+
}
|
|
953
|
+
/**
|
|
954
|
+
* SDK instance tracing context
|
|
955
|
+
*/
|
|
956
|
+
interface SdkTracingContext {
|
|
957
|
+
/** SDK instance ID */
|
|
958
|
+
sdkInstanceId: string;
|
|
959
|
+
/** Creation timestamp */
|
|
960
|
+
createdAt: number;
|
|
961
|
+
/** Active requests */
|
|
962
|
+
activeRequests: Map<number, RequestContext>;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* Create SDK instance tracing context
|
|
966
|
+
*/
|
|
967
|
+
declare function createSdkTracingContext(): SdkTracingContext;
|
|
968
|
+
/**
|
|
969
|
+
* Create and register request context
|
|
970
|
+
* @param responseID Request ID (reuses BaseMethod.responseID)
|
|
971
|
+
* @param methodName API method name
|
|
972
|
+
* @param options Additional options
|
|
973
|
+
*/
|
|
974
|
+
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
975
|
+
sdkInstanceId?: string;
|
|
976
|
+
connectId?: string;
|
|
977
|
+
deviceInstanceId?: string;
|
|
978
|
+
commandsInstanceId?: string;
|
|
979
|
+
parentResponseID?: number;
|
|
980
|
+
}): RequestContext;
|
|
981
|
+
/**
|
|
982
|
+
* Update request context
|
|
983
|
+
*/
|
|
984
|
+
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
985
|
+
/**
|
|
986
|
+
* Complete request context
|
|
987
|
+
*/
|
|
988
|
+
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
989
|
+
/**
|
|
990
|
+
* Get active requests for specific Device instance
|
|
991
|
+
*/
|
|
992
|
+
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
993
|
+
/**
|
|
994
|
+
* Format request context for logging
|
|
995
|
+
*/
|
|
996
|
+
declare function formatRequestContext(context: RequestContext): string;
|
|
997
|
+
/**
|
|
998
|
+
* Cleanup specific SDK instance
|
|
999
|
+
*/
|
|
1000
|
+
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
1001
|
+
|
|
1002
|
+
declare class Core extends EventEmitter {
|
|
1003
|
+
private tracingContext;
|
|
1004
|
+
readonly sdkInstanceId: string;
|
|
1005
|
+
private requestQueue;
|
|
1006
|
+
private disposePromise?;
|
|
1007
|
+
private prePendingCallPromise;
|
|
1008
|
+
private methodSynchronize;
|
|
1009
|
+
constructor();
|
|
1010
|
+
private getCoreContext;
|
|
1011
|
+
handleMessage(message: CoreMessage): Promise<any>;
|
|
1012
|
+
dispose(): Promise<void>;
|
|
1013
|
+
private disposeResources;
|
|
1014
|
+
}
|
|
1015
|
+
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
1016
|
+
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
1017
|
+
env: ConnectSettings['env'];
|
|
1018
|
+
Transport: any;
|
|
1019
|
+
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
1020
|
+
}) => void;
|
|
1021
|
+
|
|
1022
|
+
declare const PRO2_WALLPAPER_WIDTH = 604;
|
|
1023
|
+
declare const PRO2_WALLPAPER_HEIGHT = 1024;
|
|
1024
|
+
type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
|
|
1025
|
+
declare function encodePro2Wallpaper(options: {
|
|
1026
|
+
width: number;
|
|
1027
|
+
height: number;
|
|
1028
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
1029
|
+
}): {
|
|
1030
|
+
data: Uint8Array;
|
|
1031
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
1032
|
+
};
|
|
1033
|
+
|
|
1034
|
+
type DeviceUploadWallpaperParams = {
|
|
1035
|
+
width: number;
|
|
1036
|
+
height: number;
|
|
1037
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
1038
|
+
fileName?: string;
|
|
1039
|
+
chunkSize?: number;
|
|
1040
|
+
};
|
|
1041
|
+
type DeviceUploadWallpaperResponse = {
|
|
1042
|
+
path: string;
|
|
1043
|
+
size: number;
|
|
1044
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
1045
|
+
message?: string;
|
|
1046
|
+
};
|
|
1047
|
+
|
|
1048
|
+
type FileInfo = {
|
|
1049
|
+
path: string;
|
|
1050
|
+
offset: number;
|
|
1051
|
+
total_size: number;
|
|
1052
|
+
data?: Uint8Array;
|
|
1053
|
+
data_hash?: number;
|
|
1054
|
+
processed_byte?: number;
|
|
1055
|
+
chunks?: number;
|
|
1056
|
+
};
|
|
1057
|
+
type TestProtocolV2PingParams = CommonParams & {
|
|
1058
|
+
/** Firmware diagnostic echo payload, limited to 63 UTF-8 bytes. */
|
|
1059
|
+
message?: string;
|
|
1060
|
+
};
|
|
1061
|
+
declare function testProtocolV2Ping(connectId: string, params?: TestProtocolV2PingParams): Response<Success$1>;
|
|
1062
|
+
declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
1063
|
+
declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<DevOnboardingStatus>;
|
|
1064
|
+
declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
|
|
1065
|
+
declare function uploadPortfolio(connectId: string, params: {
|
|
1066
|
+
packageBytes: ArrayBuffer | Uint8Array | Blob;
|
|
1067
|
+
timeoutMs?: number | string;
|
|
1068
|
+
}): Response<FileInfo & {
|
|
1069
|
+
portfolioUpdated: true;
|
|
1070
|
+
}>;
|
|
1071
|
+
|
|
1072
|
+
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
1073
|
+
declare const off: (type: any, fn: any) => void;
|
|
1074
|
+
declare const removeAllListeners: (type: any) => void;
|
|
1075
|
+
|
|
1076
|
+
declare function uiResponse(response: UiResponseEvent): void;
|
|
1077
|
+
|
|
1078
|
+
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
1079
|
+
interface LowLevelInjectApi {
|
|
1080
|
+
call: CallMethod;
|
|
1081
|
+
eventEmitter: EventEmitter$1;
|
|
1082
|
+
init: CoreApi['init'];
|
|
1083
|
+
dispose: CoreApi['dispose'];
|
|
1084
|
+
uiResponse: CoreApi['uiResponse'];
|
|
1085
|
+
cancel: CoreApi['cancel'];
|
|
1086
|
+
updateSettings: CoreApi['updateSettings'];
|
|
1087
|
+
switchTransport: CoreApi['switchTransport'];
|
|
1088
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
1089
|
+
}
|
|
1090
|
+
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
1091
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
770
1092
|
};
|
|
771
|
-
type RemoteConfigResponse = {
|
|
772
|
-
bridge: AssetsMap['bridge'];
|
|
773
|
-
} & DeviceTypeMap;
|
|
774
1093
|
|
|
775
1094
|
declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
|
|
776
1095
|
declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
|
|
@@ -781,6 +1100,18 @@ declare function preInitialize(connectId: string, params?: CommonParams): Respon
|
|
|
781
1100
|
|
|
782
1101
|
declare function getLogs(): Response<string[]>;
|
|
783
1102
|
|
|
1103
|
+
type ClearSessionCacheParams = {
|
|
1104
|
+
deviceId?: never;
|
|
1105
|
+
passphraseState?: never;
|
|
1106
|
+
} | {
|
|
1107
|
+
deviceId: string;
|
|
1108
|
+
passphraseState?: string;
|
|
1109
|
+
};
|
|
1110
|
+
type ClearSessionCachePayload = {
|
|
1111
|
+
cleared: true;
|
|
1112
|
+
};
|
|
1113
|
+
declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
|
|
1114
|
+
|
|
784
1115
|
declare function checkBridgeStatus(): Response<boolean>;
|
|
785
1116
|
|
|
786
1117
|
type CheckBridgeReleaseResponse = {
|
|
@@ -804,163 +1135,93 @@ type CheckBootloaderReleaseParams = {
|
|
|
804
1135
|
};
|
|
805
1136
|
declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
|
|
806
1137
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
includeRaw?: boolean;
|
|
847
|
-
};
|
|
848
|
-
type DeviceInfoMode = 'normal' | 'bootloader' | 'notInitialized' | 'unknown';
|
|
849
|
-
type DeviceInfoStatus = {
|
|
850
|
-
mode: DeviceInfoMode;
|
|
851
|
-
initialized: boolean | null;
|
|
852
|
-
bootloaderMode: boolean | null;
|
|
853
|
-
unlocked: boolean | null;
|
|
854
|
-
passphraseProtection: boolean | null;
|
|
855
|
-
backupRequired: boolean | null;
|
|
856
|
-
noBackup: boolean | null;
|
|
857
|
-
language: string | null;
|
|
858
|
-
bleEnabled: boolean | null;
|
|
859
|
-
};
|
|
860
|
-
type DeviceProfileVersions = {
|
|
861
|
-
firmware: string | null;
|
|
862
|
-
bootloader: string | null;
|
|
863
|
-
board: string | null;
|
|
864
|
-
ble: string | null;
|
|
865
|
-
se01?: string | null;
|
|
866
|
-
se02?: string | null;
|
|
867
|
-
se03?: string | null;
|
|
868
|
-
se04?: string | null;
|
|
869
|
-
se01Boot?: string | null;
|
|
870
|
-
se02Boot?: string | null;
|
|
871
|
-
se03Boot?: string | null;
|
|
872
|
-
se04Boot?: string | null;
|
|
873
|
-
};
|
|
874
|
-
type DeviceProfileVerify = {
|
|
875
|
-
firmwareBuildId?: string;
|
|
876
|
-
firmwareHash?: string;
|
|
877
|
-
bootloaderBuildId?: string;
|
|
878
|
-
bootloaderHash?: string;
|
|
879
|
-
boardBuildId?: string;
|
|
880
|
-
boardHash?: string;
|
|
881
|
-
bleBuildId?: string;
|
|
882
|
-
bleHash?: string;
|
|
883
|
-
se01BuildId?: string;
|
|
884
|
-
se01Hash?: string;
|
|
885
|
-
se02BuildId?: string;
|
|
886
|
-
se02Hash?: string;
|
|
887
|
-
se03BuildId?: string;
|
|
888
|
-
se03Hash?: string;
|
|
889
|
-
se04BuildId?: string;
|
|
890
|
-
se04Hash?: string;
|
|
891
|
-
se01BootBuildId?: string;
|
|
892
|
-
se01BootHash?: string;
|
|
893
|
-
se02BootBuildId?: string;
|
|
894
|
-
se02BootHash?: string;
|
|
895
|
-
se03BootBuildId?: string;
|
|
896
|
-
se03BootHash?: string;
|
|
897
|
-
se04BootBuildId?: string;
|
|
898
|
-
se04BootHash?: string;
|
|
899
|
-
};
|
|
900
|
-
type DeviceProfileRaw = {
|
|
901
|
-
features?: Features;
|
|
902
|
-
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
903
|
-
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
904
|
-
};
|
|
905
|
-
type DeviceProfile = {
|
|
906
|
-
protocol: DeviceInfoProtocol;
|
|
907
|
-
sources: DeviceInfoSource[];
|
|
908
|
-
deviceType: IDeviceType;
|
|
909
|
-
firmwareType: EFirmwareType;
|
|
910
|
-
deviceId: string;
|
|
911
|
-
serialNo: string;
|
|
912
|
-
label: string | null;
|
|
913
|
-
bleName: string | null;
|
|
914
|
-
status: DeviceInfoStatus;
|
|
915
|
-
versions: DeviceProfileVersions;
|
|
916
|
-
verify?: DeviceProfileVerify;
|
|
917
|
-
raw?: DeviceProfileRaw;
|
|
918
|
-
};
|
|
919
|
-
declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
|
|
920
|
-
|
|
921
|
-
declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
|
|
922
|
-
|
|
923
|
-
type GetPassphraseStatePayload = {
|
|
924
|
-
passphraseState?: string;
|
|
925
|
-
sessionId?: string;
|
|
926
|
-
unlockedAttachPin?: boolean;
|
|
927
|
-
passphraseProtection?: boolean | null;
|
|
928
|
-
};
|
|
929
|
-
type GetPassphraseStateParams = CommonParams & {
|
|
930
|
-
allowCreateAttachPin?: boolean;
|
|
931
|
-
};
|
|
932
|
-
declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<GetPassphraseStatePayload>;
|
|
933
|
-
|
|
934
|
-
type FirmwareRelease$1 = {
|
|
935
|
-
status: IDeviceFirmwareStatus;
|
|
936
|
-
changelog: {
|
|
937
|
-
'en-US': string;
|
|
938
|
-
'zh-CN': string;
|
|
939
|
-
}[];
|
|
940
|
-
release: IFirmwareReleaseInfo;
|
|
941
|
-
bootloaderMode: boolean;
|
|
942
|
-
};
|
|
943
|
-
type CheckFirmwareReleaseParams = {
|
|
944
|
-
firmwareType?: EFirmwareType;
|
|
945
|
-
};
|
|
946
|
-
declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
|
|
947
|
-
|
|
948
|
-
type BleFirmwareRelease = {
|
|
949
|
-
status: IDeviceBLEFirmwareStatus;
|
|
950
|
-
changelog: {
|
|
951
|
-
'zh-CN': string;
|
|
952
|
-
'en-US': string;
|
|
953
|
-
}[];
|
|
954
|
-
release: IBLEFirmwareReleaseInfo;
|
|
955
|
-
bootloaderMode: boolean;
|
|
956
|
-
};
|
|
957
|
-
declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
|
|
1138
|
+
interface FirmwareUpdatePreparedEntry {
|
|
1139
|
+
entryName: string;
|
|
1140
|
+
artifact: FirmwareArtifactReference;
|
|
1141
|
+
}
|
|
1142
|
+
interface FirmwareUpdatePreparedArtifactInput {
|
|
1143
|
+
artifactId: string;
|
|
1144
|
+
artifact: FirmwareArtifactReference;
|
|
1145
|
+
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
1146
|
+
}
|
|
1147
|
+
interface FirmwareUpdatePreparedArtifact {
|
|
1148
|
+
artifactId: string;
|
|
1149
|
+
role: FirmwareUpdatePlanArtifactRole;
|
|
1150
|
+
target: FirmwareUpdatePlanTarget;
|
|
1151
|
+
container: 'raw' | 'zip';
|
|
1152
|
+
logicalName?: string;
|
|
1153
|
+
targetVersion?: string;
|
|
1154
|
+
artifact: FirmwareArtifactReference;
|
|
1155
|
+
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
1156
|
+
}
|
|
1157
|
+
interface FirmwareUpdatePreparedPlan {
|
|
1158
|
+
schemaVersion: 2;
|
|
1159
|
+
preparedPlanDigest: string;
|
|
1160
|
+
planDigest: string;
|
|
1161
|
+
networkPolicy: 'forbid';
|
|
1162
|
+
executor: FirmwareUpdatePlan['executor'];
|
|
1163
|
+
deviceIdentity: string;
|
|
1164
|
+
deviceModel: string;
|
|
1165
|
+
firmwareType: FirmwareUpdatePlan['firmwareType'];
|
|
1166
|
+
platform: FirmwareUpdatePlan['platform'];
|
|
1167
|
+
leaseRef: string;
|
|
1168
|
+
artifacts: FirmwareUpdatePreparedArtifact[];
|
|
1169
|
+
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
1170
|
+
}
|
|
1171
|
+
declare function prepareFirmwareUpdatePlan(input: {
|
|
1172
|
+
plan: FirmwareUpdatePlan;
|
|
1173
|
+
leaseRef: string;
|
|
1174
|
+
artifacts: FirmwareUpdatePreparedArtifactInput[];
|
|
1175
|
+
}): FirmwareUpdatePreparedPlan;
|
|
1176
|
+
declare function validateFirmwareUpdatePreparedPlan(value: unknown): FirmwareUpdatePreparedPlan;
|
|
958
1177
|
|
|
959
1178
|
type IUpdateType = 'firmware' | 'ble';
|
|
1179
|
+
interface FirmwareArtifactReference {
|
|
1180
|
+
artifactRef: string;
|
|
1181
|
+
size: number;
|
|
1182
|
+
sha256: string;
|
|
1183
|
+
}
|
|
1184
|
+
interface FirmwareArtifactReader {
|
|
1185
|
+
open(input: {
|
|
1186
|
+
artifactRef: string;
|
|
1187
|
+
}): Promise<{
|
|
1188
|
+
readerId: string;
|
|
1189
|
+
size: number;
|
|
1190
|
+
}>;
|
|
1191
|
+
read(input: {
|
|
1192
|
+
readerId: string;
|
|
1193
|
+
offset: number;
|
|
1194
|
+
length: number;
|
|
1195
|
+
}): Promise<{
|
|
1196
|
+
data: ArrayBuffer;
|
|
1197
|
+
bytesRead: number;
|
|
1198
|
+
eof: boolean;
|
|
1199
|
+
}>;
|
|
1200
|
+
close(input: {
|
|
1201
|
+
readerId: string;
|
|
1202
|
+
}): Promise<void>;
|
|
1203
|
+
}
|
|
1204
|
+
interface FirmwareUpdateHostBinding {
|
|
1205
|
+
artifactReader: FirmwareArtifactReader;
|
|
1206
|
+
}
|
|
960
1207
|
interface FirmwareUpdateBinaryParams {
|
|
961
1208
|
binary: ArrayBuffer;
|
|
962
1209
|
updateType: IUpdateType;
|
|
963
1210
|
}
|
|
1211
|
+
interface FirmwareUpdateArtifactParams {
|
|
1212
|
+
preparedPlan: FirmwareUpdatePreparedPlan;
|
|
1213
|
+
hostBindingGeneration: number;
|
|
1214
|
+
artifact: FirmwareArtifactReference;
|
|
1215
|
+
resourceArtifact?: FirmwareArtifactReference;
|
|
1216
|
+
resourceEntries?: Array<{
|
|
1217
|
+
entryName: string;
|
|
1218
|
+
artifact: FirmwareArtifactReference;
|
|
1219
|
+
}>;
|
|
1220
|
+
updateType: IUpdateType;
|
|
1221
|
+
forcedUpdateRes?: boolean;
|
|
1222
|
+
isUpdateBootloader?: boolean;
|
|
1223
|
+
firmwareType?: EFirmwareType;
|
|
1224
|
+
}
|
|
964
1225
|
interface FirmwareUpdateParams {
|
|
965
1226
|
version?: number[];
|
|
966
1227
|
updateType: IUpdateType;
|
|
@@ -980,7 +1241,10 @@ type Platform = {
|
|
|
980
1241
|
};
|
|
981
1242
|
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateParams & Platform>): Response<Messages.Success>;
|
|
982
1243
|
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams & Platform>): Response<Messages.Success>;
|
|
1244
|
+
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateArtifactParams & Platform>): Response<Messages.Success>;
|
|
983
1245
|
interface FirmwareUpdateV3Params {
|
|
1246
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1247
|
+
hostBindingGeneration?: number;
|
|
984
1248
|
bleVersion?: number[];
|
|
985
1249
|
bleBinary?: ArrayBuffer;
|
|
986
1250
|
chunkSize?: number;
|
|
@@ -992,28 +1256,65 @@ interface FirmwareUpdateV3Params {
|
|
|
992
1256
|
forcedUpdateRes?: boolean;
|
|
993
1257
|
firmwareType?: EFirmwareType;
|
|
994
1258
|
platform: IPlatform;
|
|
1259
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1260
|
+
artifacts?: {
|
|
1261
|
+
ble?: FirmwareArtifactReference;
|
|
1262
|
+
firmware?: FirmwareArtifactReference;
|
|
1263
|
+
bootloader?: FirmwareArtifactReference;
|
|
1264
|
+
resourceEntries?: Array<{
|
|
1265
|
+
entryName: string;
|
|
1266
|
+
artifact: FirmwareArtifactReference;
|
|
1267
|
+
}>;
|
|
1268
|
+
};
|
|
995
1269
|
}
|
|
1270
|
+
/**
|
|
1271
|
+
* firmwareUpdateV4 target binaries grouped by DeviceFirmwareTargetType.
|
|
1272
|
+
* Except for romloader, each field maps to a target accepted by bootloader.
|
|
1273
|
+
*/
|
|
1274
|
+
type FirmwareUpdateV4Target = 'boot' | 'app_v1' | 'app_v2' | 'coprocessor' | 'resource' | 'se01' | 'se02' | 'se03' | 'se04';
|
|
996
1275
|
interface FirmwareUpdateV4Params {
|
|
1276
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1277
|
+
hostBindingGeneration?: number;
|
|
997
1278
|
platform: IPlatform;
|
|
1279
|
+
expectedDeviceId?: string;
|
|
998
1280
|
chunkSize?: number;
|
|
999
1281
|
firmwareType?: EFirmwareType;
|
|
1282
|
+
targetsToUpdate?: FirmwareUpdateV4Target[];
|
|
1283
|
+
expectedTargetVersions?: Partial<Record<FirmwareUpdateV4Target, string>>;
|
|
1284
|
+
/** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
|
|
1000
1285
|
romloaderBinary?: ArrayBuffer;
|
|
1286
|
+
/** FW_MGMT_TARGET_BOOTLOADER = 3 */
|
|
1001
1287
|
bootloaderBinary?: ArrayBuffer;
|
|
1288
|
+
/** FW_MGMT_TARGET_APPLICATION_P1 = 4 */
|
|
1002
1289
|
applicationP1Binary?: ArrayBuffer;
|
|
1290
|
+
/** FW_MGMT_TARGET_APPLICATION_P2 = 5 */
|
|
1003
1291
|
applicationP2Binary?: ArrayBuffer;
|
|
1292
|
+
/** FW_MGMT_TARGET_COPROCESSOR = 6 */
|
|
1004
1293
|
coprocessorBinary?: ArrayBuffer;
|
|
1294
|
+
/** FW_MGMT_TARGET_SE01-04 = 7-10 */
|
|
1005
1295
|
se01Binary?: ArrayBuffer;
|
|
1006
1296
|
se02Binary?: ArrayBuffer;
|
|
1007
1297
|
se03Binary?: ArrayBuffer;
|
|
1008
1298
|
se04Binary?: ArrayBuffer;
|
|
1009
|
-
resourceBinary?: ArrayBuffer;
|
|
1010
1299
|
forcedUpdateRes?: boolean;
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1300
|
+
/**
|
|
1301
|
+
* RESC bundle okpkg files written directly to devicePath through FilesystemFileWrite.
|
|
1302
|
+
* Manual mode installs them without version comparison.
|
|
1303
|
+
*/
|
|
1304
|
+
resourceBundleFiles?: Array<{
|
|
1305
|
+
binary: ArrayBuffer;
|
|
1306
|
+
devicePath: string;
|
|
1307
|
+
}>;
|
|
1308
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1309
|
+
componentArtifacts?: Partial<Record<Exclude<FirmwareUpdateV4Target, 'resource'>, FirmwareArtifactReference>>;
|
|
1310
|
+
resourceBundleArtifacts?: Array<{
|
|
1311
|
+
name: string;
|
|
1312
|
+
artifact: FirmwareArtifactReference;
|
|
1313
|
+
}>;
|
|
1016
1314
|
}
|
|
1315
|
+
declare function registerFirmwareUpdateHostBinding$1(binding: FirmwareUpdateHostBinding): number;
|
|
1316
|
+
declare function unregisterFirmwareUpdateHostBinding$1(generation?: number): boolean;
|
|
1317
|
+
declare function getFirmwareUpdateHostBindingGeneration$1(): number;
|
|
1017
1318
|
declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
|
|
1018
1319
|
bleVersion: string;
|
|
1019
1320
|
firmwareVersion: string;
|
|
@@ -1025,6 +1326,151 @@ declare function firmwareUpdateV4(connectId: string | undefined, params: Params<
|
|
|
1025
1326
|
bootloaderVersion: string;
|
|
1026
1327
|
}>;
|
|
1027
1328
|
|
|
1329
|
+
type FirmwareUpdatePlanArtifactRole = 'firmware' | 'ble' | 'bootloader' | 'resource' | 'component' | 'resourceBundle';
|
|
1330
|
+
type FirmwareUpdatePlanTarget = 'firmware' | 'ble' | 'bootloader' | FirmwareUpdateV4Target;
|
|
1331
|
+
type FirmwareUpdatePlanForceTarget = 'firmware' | 'ble' | 'bootloader' | 'resource';
|
|
1332
|
+
interface FirmwareUpdatePlanArtifact {
|
|
1333
|
+
artifactId: string;
|
|
1334
|
+
role: FirmwareUpdatePlanArtifactRole;
|
|
1335
|
+
target: FirmwareUpdatePlanTarget;
|
|
1336
|
+
url: string;
|
|
1337
|
+
container: 'raw' | 'zip';
|
|
1338
|
+
logicalName?: string;
|
|
1339
|
+
expectedSize?: number;
|
|
1340
|
+
expectedSha256?: string;
|
|
1341
|
+
targetVersion?: string;
|
|
1342
|
+
}
|
|
1343
|
+
interface FirmwareUpdatePlan {
|
|
1344
|
+
schemaVersion: 2;
|
|
1345
|
+
planDigest: string;
|
|
1346
|
+
executor: 'v2' | 'v3' | 'v4';
|
|
1347
|
+
deviceIdentity: string;
|
|
1348
|
+
deviceModel: string;
|
|
1349
|
+
firmwareType: EFirmwareType;
|
|
1350
|
+
platform: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
1351
|
+
artifacts: FirmwareUpdatePlanArtifact[];
|
|
1352
|
+
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
type FirmwareRelease$2 = {
|
|
1356
|
+
shouldUpdate?: boolean;
|
|
1357
|
+
status: IDeviceFirmwareStatus;
|
|
1358
|
+
changelog?: {
|
|
1359
|
+
'zh-CN': string;
|
|
1360
|
+
'en-US': string;
|
|
1361
|
+
}[];
|
|
1362
|
+
release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo;
|
|
1363
|
+
bootloaderMode?: boolean;
|
|
1364
|
+
};
|
|
1365
|
+
type AllFirmwareRelease = {
|
|
1366
|
+
firmware: FirmwareRelease$2;
|
|
1367
|
+
ble: FirmwareRelease$2;
|
|
1368
|
+
bootloader?: FirmwareRelease$2;
|
|
1369
|
+
bridge?: FirmwareRelease$2;
|
|
1370
|
+
features?: Features;
|
|
1371
|
+
firmwareUpdatePlan?: FirmwareUpdatePlan;
|
|
1372
|
+
};
|
|
1373
|
+
type CheckAllFirmwareReleaseParams = {
|
|
1374
|
+
checkBridgeRelease?: boolean;
|
|
1375
|
+
firmwareType?: EFirmwareType;
|
|
1376
|
+
platform?: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
1377
|
+
forceUpdateTargets?: FirmwareUpdatePlanForceTarget[];
|
|
1378
|
+
};
|
|
1379
|
+
declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
|
|
1380
|
+
|
|
1381
|
+
type CheckFirmwareTypeAvailableParams = {
|
|
1382
|
+
deviceType: EDeviceType;
|
|
1383
|
+
firmwareType: EFirmwareType;
|
|
1384
|
+
};
|
|
1385
|
+
declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
|
|
1386
|
+
|
|
1387
|
+
declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
|
|
1388
|
+
|
|
1389
|
+
/**
|
|
1390
|
+
* @deprecated Use `getDeviceState` for both Protocol V1 and Protocol V2 devices.
|
|
1391
|
+
*/
|
|
1392
|
+
declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
|
|
1393
|
+
|
|
1394
|
+
/**
|
|
1395
|
+
* @deprecated Use `getDeviceState(connectId, { scope: 'firmware' })`.
|
|
1396
|
+
*/
|
|
1397
|
+
declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
|
|
1398
|
+
|
|
1399
|
+
type GetPassphraseStateParams = CommonParams;
|
|
1400
|
+
/**
|
|
1401
|
+
* Compatibility wallet-state API for existing App integrations.
|
|
1402
|
+
*
|
|
1403
|
+
* Protocol V1 keeps its parameterless firmware flow. Protocol V2 maps the existing
|
|
1404
|
+
* `useEmptyPassphrase` and `initSession` intent to the device-only wallet-session flow.
|
|
1405
|
+
* New integrations should prefer `openWalletSession` for explicit wallet intent.
|
|
1406
|
+
*/
|
|
1407
|
+
declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
|
|
1408
|
+
|
|
1409
|
+
type OpenWalletSessionParams = {
|
|
1410
|
+
mode: 'standard';
|
|
1411
|
+
deviceId?: never;
|
|
1412
|
+
passphraseState?: never;
|
|
1413
|
+
} | {
|
|
1414
|
+
mode: 'select-hidden';
|
|
1415
|
+
deviceId?: never;
|
|
1416
|
+
passphraseState?: never;
|
|
1417
|
+
} | {
|
|
1418
|
+
mode: 'resume-hidden';
|
|
1419
|
+
deviceId: string;
|
|
1420
|
+
passphraseState: string;
|
|
1421
|
+
};
|
|
1422
|
+
type OpenWalletSessionPayloadBase = {
|
|
1423
|
+
protocol: 'V1' | 'V2';
|
|
1424
|
+
deviceId: string;
|
|
1425
|
+
resumed: boolean;
|
|
1426
|
+
};
|
|
1427
|
+
type OpenWalletSessionPayload = OpenWalletSessionPayloadBase & ({
|
|
1428
|
+
walletType: 'standard';
|
|
1429
|
+
passphraseState: null;
|
|
1430
|
+
} | {
|
|
1431
|
+
walletType: 'hidden';
|
|
1432
|
+
passphraseState: string;
|
|
1433
|
+
});
|
|
1434
|
+
/**
|
|
1435
|
+
* Opens the standard, hidden, or Attach-to-PIN wallet flow through a unified
|
|
1436
|
+
* Protocol V1/V2 API.
|
|
1437
|
+
*/
|
|
1438
|
+
declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
|
|
1439
|
+
|
|
1440
|
+
type FirmwareRelease$1 = {
|
|
1441
|
+
status: IDeviceFirmwareStatus;
|
|
1442
|
+
changelog: {
|
|
1443
|
+
'en-US': string;
|
|
1444
|
+
'zh-CN': string;
|
|
1445
|
+
}[];
|
|
1446
|
+
release: IFirmwareReleaseInfo;
|
|
1447
|
+
bootloaderMode: boolean;
|
|
1448
|
+
};
|
|
1449
|
+
type CheckFirmwareReleaseParams = {
|
|
1450
|
+
firmwareType?: EFirmwareType;
|
|
1451
|
+
};
|
|
1452
|
+
declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
|
|
1453
|
+
|
|
1454
|
+
type BleFirmwareRelease = {
|
|
1455
|
+
status: IDeviceBLEFirmwareStatus;
|
|
1456
|
+
changelog: {
|
|
1457
|
+
'zh-CN': string;
|
|
1458
|
+
'en-US': string;
|
|
1459
|
+
}[];
|
|
1460
|
+
release: IBLEFirmwareReleaseInfo;
|
|
1461
|
+
bootloaderMode: boolean;
|
|
1462
|
+
};
|
|
1463
|
+
declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
|
|
1464
|
+
|
|
1465
|
+
interface FirmwareUpdateCapabilities {
|
|
1466
|
+
planSchemaVersion: 2;
|
|
1467
|
+
preparedPlanSchemaVersion: 2;
|
|
1468
|
+
hostBindingProtocolVersion: 2;
|
|
1469
|
+
manifestModes: Array<'external-only' | 'sdk-managed'>;
|
|
1470
|
+
supportsArtifactReader: true;
|
|
1471
|
+
}
|
|
1472
|
+
declare function getFirmwareUpdateCapabilities(): FirmwareUpdateCapabilities;
|
|
1473
|
+
|
|
1028
1474
|
declare function promptWebDeviceAccess(options?: {
|
|
1029
1475
|
deviceSerialNumberFromUI?: string;
|
|
1030
1476
|
}): Response<{
|
|
@@ -1084,16 +1530,40 @@ type DeviceSettingsParams = {
|
|
|
1084
1530
|
language?: string;
|
|
1085
1531
|
label?: string;
|
|
1086
1532
|
usePassphrase?: boolean;
|
|
1533
|
+
/** Protocol V1 only. */
|
|
1087
1534
|
homescreen?: string;
|
|
1535
|
+
/** Protocol V1 only. */
|
|
1088
1536
|
passphraseSource?: number;
|
|
1089
1537
|
autoLockDelayMs?: number;
|
|
1538
|
+
/** Protocol V1 only. */
|
|
1090
1539
|
displayRotation?: number;
|
|
1540
|
+
/** Protocol V1 only. */
|
|
1091
1541
|
passphraseAlwaysOnDevice?: boolean;
|
|
1092
|
-
|
|
1542
|
+
/** Protocol V1 only. Uses Enum_SafetyCheckLevel numeric values. */
|
|
1543
|
+
safetyChecks?: Enum_SafetyCheckLevel;
|
|
1544
|
+
/** Protocol V1 only; the current Protocol V2 schema has no matching field. */
|
|
1093
1545
|
experimentalFeatures?: boolean;
|
|
1094
1546
|
autoShutdownDelayMs?: number;
|
|
1547
|
+
/** Protocol V1 only; opens the legacy device-side brightness flow. */
|
|
1095
1548
|
changeBrightness?: boolean;
|
|
1549
|
+
/** Protocol V2 only. */
|
|
1550
|
+
brightness?: number;
|
|
1096
1551
|
hapticFeedback?: boolean;
|
|
1552
|
+
bluetoothEnabled?: boolean;
|
|
1553
|
+
/** Protocol V2 only; changed through an on-device confirmation page. */
|
|
1554
|
+
airgapMode?: boolean;
|
|
1555
|
+
/** Protocol V2 only. */
|
|
1556
|
+
animationEnabled?: boolean;
|
|
1557
|
+
/** Protocol V2 only. */
|
|
1558
|
+
tapToWake?: boolean;
|
|
1559
|
+
/** Protocol V2 only. */
|
|
1560
|
+
deviceNameDisplayEnabled?: boolean;
|
|
1561
|
+
/** Protocol V2 only. */
|
|
1562
|
+
fidoEnabled?: boolean;
|
|
1563
|
+
/** Protocol V2 only. */
|
|
1564
|
+
usbLockEnabled?: boolean;
|
|
1565
|
+
/** Protocol V2 only. */
|
|
1566
|
+
randomKeypad?: boolean;
|
|
1097
1567
|
};
|
|
1098
1568
|
declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
|
|
1099
1569
|
|
|
@@ -1119,7 +1589,7 @@ type DeviceUploadResourceResponse = Success$1 & {
|
|
|
1119
1589
|
declare function deviceUploadResource(connectId: string, params: CommonParams & DeviceUploadResourceParams): Response<DeviceUploadResourceResponse>;
|
|
1120
1590
|
|
|
1121
1591
|
type DeviceSupportFeatures = SupportFeatures & {
|
|
1122
|
-
device: Device | null;
|
|
1592
|
+
device: Device$1 | null;
|
|
1123
1593
|
};
|
|
1124
1594
|
declare function deviceSupportFeatures(connectId?: string): Response<DeviceSupportFeatures>;
|
|
1125
1595
|
|
|
@@ -1128,14 +1598,18 @@ declare function deviceFullyUploadResource(connectId: string, params: CommonPara
|
|
|
1128
1598
|
}): Response<Success$1>;
|
|
1129
1599
|
|
|
1130
1600
|
type DeviceUpdateBootloaderParams = {
|
|
1601
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1602
|
+
hostBindingGeneration?: number;
|
|
1131
1603
|
binary?: ArrayBuffer;
|
|
1604
|
+
artifact?: FirmwareArtifactReference;
|
|
1605
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1132
1606
|
firmwareType?: EFirmwareType;
|
|
1133
1607
|
};
|
|
1134
1608
|
declare function deviceUpdateBootloader(connectId: string, params?: DeviceUpdateBootloaderParams): Response<Success$1>;
|
|
1135
1609
|
|
|
1136
1610
|
declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1137
1611
|
|
|
1138
|
-
declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features
|
|
1612
|
+
declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features>;
|
|
1139
1613
|
|
|
1140
1614
|
declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1141
1615
|
|
|
@@ -1339,6 +1813,9 @@ type AllNetworkAddressParams = {
|
|
|
1339
1813
|
type AllNetworkAddressPayload = {
|
|
1340
1814
|
address: string;
|
|
1341
1815
|
pub?: string;
|
|
1816
|
+
/**
|
|
1817
|
+
* @deprecated Use `pub` instead.
|
|
1818
|
+
*/
|
|
1342
1819
|
publicKey?: string;
|
|
1343
1820
|
npub?: string;
|
|
1344
1821
|
} | {
|
|
@@ -1404,6 +1881,9 @@ declare function evmGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
1404
1881
|
type EVMPublicKey = {
|
|
1405
1882
|
path: string;
|
|
1406
1883
|
pub: string;
|
|
1884
|
+
/**
|
|
1885
|
+
* @deprecated Use `pub` instead.
|
|
1886
|
+
*/
|
|
1407
1887
|
publicKey?: string;
|
|
1408
1888
|
} & EthereumPublicKey;
|
|
1409
1889
|
type EVMGetPublicKeyParams = {
|
|
@@ -2187,6 +2667,9 @@ declare function nearSignTransaction(connectId: string, deviceId: string, params
|
|
|
2187
2667
|
type AptosAddress = {
|
|
2188
2668
|
path: string;
|
|
2189
2669
|
pub?: string;
|
|
2670
|
+
/**
|
|
2671
|
+
* @deprecated Use `pub` instead.
|
|
2672
|
+
*/
|
|
2190
2673
|
publicKey?: string;
|
|
2191
2674
|
} & AptosAddress$1;
|
|
2192
2675
|
type AptosGetAddressParams = {
|
|
@@ -2201,6 +2684,9 @@ declare function aptosGetAddress(connectId: string, deviceId: string, params: Co
|
|
|
2201
2684
|
type AptosPublicKey = {
|
|
2202
2685
|
path: string;
|
|
2203
2686
|
pub: string;
|
|
2687
|
+
/**
|
|
2688
|
+
* @deprecated Use `pub` instead.
|
|
2689
|
+
*/
|
|
2204
2690
|
publicKey?: string;
|
|
2205
2691
|
};
|
|
2206
2692
|
type AptosGetPublicKeyParams = {
|
|
@@ -2285,6 +2771,9 @@ declare function cosmosGetAddress(connectId: string, deviceId: string, params: C
|
|
|
2285
2771
|
type CosmosPublicKey = {
|
|
2286
2772
|
path: string;
|
|
2287
2773
|
pub: string;
|
|
2774
|
+
/**
|
|
2775
|
+
* @deprecated Use `pub` instead.
|
|
2776
|
+
*/
|
|
2288
2777
|
publicKey?: string;
|
|
2289
2778
|
};
|
|
2290
2779
|
type CosmosGetPublicKeyParams = {
|
|
@@ -2309,6 +2798,9 @@ declare function cosmosSignTransaction(connectId: string, deviceId: string, para
|
|
|
2309
2798
|
type XrpAddress = {
|
|
2310
2799
|
path: string;
|
|
2311
2800
|
pub?: string;
|
|
2801
|
+
/**
|
|
2802
|
+
* @deprecated Use `pub` instead.
|
|
2803
|
+
*/
|
|
2312
2804
|
publicKey?: string;
|
|
2313
2805
|
address: string;
|
|
2314
2806
|
};
|
|
@@ -2342,6 +2834,9 @@ declare function xrpSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2342
2834
|
type SuiAddress = {
|
|
2343
2835
|
path: string;
|
|
2344
2836
|
pub?: string;
|
|
2837
|
+
/**
|
|
2838
|
+
* @deprecated Use `pub` instead.
|
|
2839
|
+
*/
|
|
2345
2840
|
publicKey?: string;
|
|
2346
2841
|
} & SuiAddress$1;
|
|
2347
2842
|
type SuiGetAddressParams = {
|
|
@@ -2356,6 +2851,9 @@ declare function suiGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
2356
2851
|
type SuiPublicKey = {
|
|
2357
2852
|
path: string;
|
|
2358
2853
|
pub: string;
|
|
2854
|
+
/**
|
|
2855
|
+
* @deprecated Use `pub` instead.
|
|
2856
|
+
*/
|
|
2359
2857
|
publicKey?: string;
|
|
2360
2858
|
};
|
|
2361
2859
|
type SuiGetPublicKeyParams = {
|
|
@@ -2385,6 +2883,10 @@ declare function suiSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2385
2883
|
type CardanoGetAddressMethodParams = {
|
|
2386
2884
|
addressParameters: CardanoAddressParameters;
|
|
2387
2885
|
networkId: number;
|
|
2886
|
+
/**
|
|
2887
|
+
* Testnet cip34:0-1097911063
|
|
2888
|
+
* Mainnet cip34:1-764824073
|
|
2889
|
+
*/
|
|
2388
2890
|
protocolMagic: number;
|
|
2389
2891
|
derivationType: number;
|
|
2390
2892
|
address?: string;
|
|
@@ -2446,6 +2948,10 @@ type CardanoSignMessageMethodParams = {
|
|
|
2446
2948
|
derivationType: number;
|
|
2447
2949
|
networkId: number;
|
|
2448
2950
|
addressType?: Messages.CardanoAddressType;
|
|
2951
|
+
/**
|
|
2952
|
+
* Testnet cip34:0-1097911063
|
|
2953
|
+
* Mainnet cip34:1-764824073
|
|
2954
|
+
*/
|
|
2449
2955
|
protocolMagic?: number;
|
|
2450
2956
|
};
|
|
2451
2957
|
declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
|
|
@@ -2479,6 +2985,9 @@ declare function filecoinSignTransaction(connectId: string, deviceId: string, pa
|
|
|
2479
2985
|
type PolkadotAddress = {
|
|
2480
2986
|
path: string;
|
|
2481
2987
|
pub: string;
|
|
2988
|
+
/**
|
|
2989
|
+
* @deprecated Use `pub` instead.
|
|
2990
|
+
*/
|
|
2482
2991
|
publicKey?: string;
|
|
2483
2992
|
} & PolkadotAddress$1;
|
|
2484
2993
|
type PolkadotGetAddressParams = {
|
|
@@ -2537,23 +3046,61 @@ type KaspaSignInputParams = {
|
|
|
2537
3046
|
sequenceNumber: number | string;
|
|
2538
3047
|
output: {
|
|
2539
3048
|
satoshis: number | string;
|
|
2540
|
-
script
|
|
3049
|
+
script?: string;
|
|
2541
3050
|
};
|
|
2542
3051
|
sigOpCount?: number;
|
|
2543
3052
|
};
|
|
2544
3053
|
type KaspaSignOutputParams = {
|
|
2545
3054
|
satoshis: number | string;
|
|
3055
|
+
address?: string;
|
|
3056
|
+
addressN?: string | number[];
|
|
3057
|
+
script?: string;
|
|
3058
|
+
scriptVersion?: number;
|
|
3059
|
+
};
|
|
3060
|
+
type KaspaStreamingSignInputParams = Omit<KaspaSignInputParams, 'output'> & {
|
|
3061
|
+
output: {
|
|
3062
|
+
satoshis: number | string;
|
|
3063
|
+
script?: string;
|
|
3064
|
+
};
|
|
3065
|
+
};
|
|
3066
|
+
type KaspaStreamingSignOutputParams = {
|
|
3067
|
+
satoshis: number | string;
|
|
3068
|
+
address?: string;
|
|
3069
|
+
addressN?: string | number[];
|
|
3070
|
+
script?: string;
|
|
3071
|
+
scriptVersion?: number;
|
|
3072
|
+
};
|
|
3073
|
+
type KaspaRefTransactionInput = {
|
|
3074
|
+
prevTxId: string;
|
|
3075
|
+
outputIndex: number;
|
|
3076
|
+
sequenceNumber: number | string;
|
|
3077
|
+
};
|
|
3078
|
+
type KaspaRefTransactionOutput = {
|
|
3079
|
+
satoshis: number | string;
|
|
3080
|
+
scriptVersion?: number;
|
|
2546
3081
|
script: string;
|
|
2547
|
-
|
|
3082
|
+
};
|
|
3083
|
+
type KaspaRefTransaction = {
|
|
3084
|
+
txId: string;
|
|
3085
|
+
version: number;
|
|
3086
|
+
inputs: KaspaRefTransactionInput[];
|
|
3087
|
+
outputs: KaspaRefTransactionOutput[];
|
|
3088
|
+
lockTime?: number | string;
|
|
3089
|
+
subNetworkID?: string;
|
|
3090
|
+
gas?: number | string;
|
|
3091
|
+
payload?: string;
|
|
2548
3092
|
};
|
|
2549
3093
|
type KaspaSignTransactionParams = {
|
|
2550
3094
|
version: number;
|
|
2551
|
-
inputs: KaspaSignInputParams
|
|
2552
|
-
outputs: KaspaSignOutputParams
|
|
3095
|
+
inputs: Array<KaspaSignInputParams | KaspaStreamingSignInputParams>;
|
|
3096
|
+
outputs: Array<KaspaSignOutputParams | KaspaStreamingSignOutputParams>;
|
|
2553
3097
|
lockTime: number | string;
|
|
2554
3098
|
sigHashType?: SignatureType;
|
|
2555
3099
|
sigOpCount?: number;
|
|
2556
3100
|
subNetworkID?: string;
|
|
3101
|
+
payload?: string;
|
|
3102
|
+
gas?: number | string;
|
|
3103
|
+
refTxs?: KaspaRefTransaction[];
|
|
2557
3104
|
scheme?: string;
|
|
2558
3105
|
prefix?: string;
|
|
2559
3106
|
useTweak?: boolean;
|
|
@@ -2598,6 +3145,9 @@ declare function nexaSignTransaction(connectId: string, deviceId: string, params
|
|
|
2598
3145
|
type NostrPublicKey = {
|
|
2599
3146
|
npub?: string;
|
|
2600
3147
|
pub?: string;
|
|
3148
|
+
/**
|
|
3149
|
+
* @deprecated Use `pub` instead.
|
|
3150
|
+
*/
|
|
2601
3151
|
publicKey?: string;
|
|
2602
3152
|
path: string;
|
|
2603
3153
|
};
|
|
@@ -2694,6 +3244,9 @@ declare function nostrSignSchnorr(connectId: string, deviceId: string, params: C
|
|
|
2694
3244
|
|
|
2695
3245
|
interface LnurlAuth {
|
|
2696
3246
|
pub?: string;
|
|
3247
|
+
/**
|
|
3248
|
+
* @deprecated Use `pub` instead.
|
|
3249
|
+
*/
|
|
2697
3250
|
publickey?: string;
|
|
2698
3251
|
path?: string;
|
|
2699
3252
|
signature?: string;
|
|
@@ -2770,6 +3323,9 @@ declare function dnxSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2770
3323
|
type TonAddress = {
|
|
2771
3324
|
path: string;
|
|
2772
3325
|
pub: string;
|
|
3326
|
+
/**
|
|
3327
|
+
* @deprecated Use `pub` instead.
|
|
3328
|
+
*/
|
|
2773
3329
|
publicKey?: string;
|
|
2774
3330
|
address: string;
|
|
2775
3331
|
};
|
|
@@ -2881,6 +3437,9 @@ declare function scdoSignTransaction(connectId: string, deviceId: string, params
|
|
|
2881
3437
|
|
|
2882
3438
|
type AlephiumAddress = {
|
|
2883
3439
|
path: string;
|
|
3440
|
+
/**
|
|
3441
|
+
* @deprecated Use `pub` instead.
|
|
3442
|
+
*/
|
|
2884
3443
|
publicKey?: string;
|
|
2885
3444
|
pub?: string;
|
|
2886
3445
|
address: string;
|
|
@@ -2983,12 +3542,15 @@ type NeoSignedTx = {
|
|
|
2983
3542
|
declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
|
|
2984
3543
|
|
|
2985
3544
|
type CoreApi = {
|
|
3545
|
+
/**
|
|
3546
|
+
* Inject function
|
|
3547
|
+
*/
|
|
2986
3548
|
init: typeof init;
|
|
2987
3549
|
on: typeof on;
|
|
2988
3550
|
off: typeof off;
|
|
2989
3551
|
emit: (event: string, ...args: any[]) => void;
|
|
2990
3552
|
removeAllListeners: typeof removeAllListeners;
|
|
2991
|
-
dispose: () => void
|
|
3553
|
+
dispose: () => void | Promise<void>;
|
|
2992
3554
|
call: (params: any) => Promise<any>;
|
|
2993
3555
|
uiResponse: typeof uiResponse;
|
|
2994
3556
|
cancel: (connectId?: string) => void;
|
|
@@ -2997,19 +3559,31 @@ type CoreApi = {
|
|
|
2997
3559
|
success: boolean;
|
|
2998
3560
|
}>;
|
|
2999
3561
|
getLogs: typeof getLogs;
|
|
3562
|
+
clearSessionCache: typeof clearSessionCache;
|
|
3563
|
+
/**
|
|
3564
|
+
* Test function
|
|
3565
|
+
*/
|
|
3000
3566
|
testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
|
|
3567
|
+
testProtocolV2Ping: typeof testProtocolV2Ping;
|
|
3001
3568
|
preInitialize: typeof preInitialize;
|
|
3569
|
+
/**
|
|
3570
|
+
* Core function
|
|
3571
|
+
*/
|
|
3002
3572
|
checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
|
|
3003
3573
|
checkBridgeStatus: typeof checkBridgeStatus;
|
|
3004
3574
|
checkBridgeRelease: typeof checkBridgeRelease;
|
|
3005
3575
|
checkBootloaderRelease: typeof checkBootloaderRelease;
|
|
3006
3576
|
checkFirmwareTypeAvailable: typeof checkFirmwareTypeAvailable;
|
|
3577
|
+
/**
|
|
3578
|
+
* Device function
|
|
3579
|
+
*/
|
|
3007
3580
|
searchDevices: typeof searchDevices;
|
|
3008
3581
|
promptWebDeviceAccess: typeof promptWebDeviceAccess;
|
|
3009
3582
|
getFeatures: typeof getFeatures;
|
|
3010
|
-
|
|
3583
|
+
getDeviceState: typeof getDeviceState;
|
|
3011
3584
|
getOnekeyFeatures: typeof getOnekeyFeatures;
|
|
3012
3585
|
getPassphraseState: typeof getPassphraseState;
|
|
3586
|
+
openWalletSession: typeof openWalletSession;
|
|
3013
3587
|
deviceBackup: typeof deviceBackup;
|
|
3014
3588
|
deviceChangePin: typeof deviceChangePin;
|
|
3015
3589
|
deviceFlags: typeof deviceFlags;
|
|
@@ -3036,39 +3610,28 @@ type CoreApi = {
|
|
|
3036
3610
|
firmwareUpdateV2: typeof firmwareUpdateV2;
|
|
3037
3611
|
firmwareUpdateV3: typeof firmwareUpdateV3;
|
|
3038
3612
|
firmwareUpdateV4: typeof firmwareUpdateV4;
|
|
3613
|
+
registerFirmwareUpdateHostBinding: typeof registerFirmwareUpdateHostBinding$1;
|
|
3614
|
+
unregisterFirmwareUpdateHostBinding: typeof unregisterFirmwareUpdateHostBinding$1;
|
|
3615
|
+
getFirmwareUpdateHostBindingGeneration: typeof getFirmwareUpdateHostBindingGeneration$1;
|
|
3616
|
+
getFirmwareUpdateCapabilities: typeof getFirmwareUpdateCapabilities;
|
|
3617
|
+
prepareFirmwareUpdatePlan: typeof prepareFirmwareUpdatePlan;
|
|
3618
|
+
validateFirmwareUpdatePreparedPlan: typeof validateFirmwareUpdatePreparedPlan;
|
|
3039
3619
|
cipherKeyValue: typeof cipherKeyValue;
|
|
3040
|
-
|
|
3041
|
-
|
|
3620
|
+
/**
|
|
3621
|
+
* Pro2 business API
|
|
3622
|
+
*/
|
|
3042
3623
|
deviceReboot: typeof deviceReboot;
|
|
3043
|
-
deviceGetDeviceInfo: typeof deviceGetDeviceInfo;
|
|
3044
3624
|
deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
devGetFirmwareUpdateStatus: typeof devGetFirmwareUpdateStatus;
|
|
3051
|
-
factoryDeviceInfoSettings: typeof factoryDeviceInfoSettings;
|
|
3052
|
-
factoryGetDeviceInfo: typeof factoryGetDeviceInfo;
|
|
3053
|
-
filesystemFixPermission: typeof filesystemFixPermission;
|
|
3054
|
-
fileRead: typeof fileRead;
|
|
3055
|
-
fileWrite: typeof fileWrite;
|
|
3056
|
-
fileDelete: typeof fileDelete;
|
|
3057
|
-
dirList: typeof dirList;
|
|
3058
|
-
dirMake: typeof dirMake;
|
|
3059
|
-
dirRemove: typeof dirRemove;
|
|
3060
|
-
pathInfo: typeof pathInfo;
|
|
3061
|
-
filesystemFileRead: typeof filesystemFileRead;
|
|
3062
|
-
filesystemFileWrite: typeof filesystemFileWrite;
|
|
3063
|
-
filesystemFileDelete: typeof filesystemFileDelete;
|
|
3064
|
-
filesystemDirList: typeof filesystemDirList;
|
|
3065
|
-
filesystemDirMake: typeof filesystemDirMake;
|
|
3066
|
-
filesystemDirRemove: typeof filesystemDirRemove;
|
|
3067
|
-
filesystemPathInfoQuery: typeof filesystemPathInfoQuery;
|
|
3068
|
-
filesystemFormat: typeof filesystemFormat;
|
|
3069
|
-
filesystemDiskControl: typeof filesystemDiskControl;
|
|
3625
|
+
deviceUploadWallpaper: typeof deviceUploadWallpaper;
|
|
3626
|
+
uploadPortfolio: typeof uploadPortfolio;
|
|
3627
|
+
/**
|
|
3628
|
+
* All network function
|
|
3629
|
+
*/
|
|
3070
3630
|
allNetworkGetAddress: typeof allNetworkGetAddress;
|
|
3071
3631
|
allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
|
|
3632
|
+
/**
|
|
3633
|
+
* EVM function
|
|
3634
|
+
*/
|
|
3072
3635
|
evmGetAddress: typeof evmGetAddress;
|
|
3073
3636
|
evmGetPublicKey: typeof evmGetPublicKey;
|
|
3074
3637
|
evmSignMessage: typeof evmSignMessage;
|
|
@@ -3076,86 +3639,167 @@ type CoreApi = {
|
|
|
3076
3639
|
evmSignTransaction: typeof evmSignTransaction;
|
|
3077
3640
|
evmSignTypedData: typeof evmSignTypedData;
|
|
3078
3641
|
evmVerifyMessage: typeof evmVerifyMessage;
|
|
3642
|
+
/**
|
|
3643
|
+
* BTC function
|
|
3644
|
+
*/
|
|
3079
3645
|
btcGetAddress: typeof btcGetAddress;
|
|
3080
3646
|
btcGetPublicKey: typeof btcGetPublicKey;
|
|
3081
3647
|
btcSignMessage: typeof btcSignMessage;
|
|
3082
3648
|
btcSignPsbt: typeof btcSignPsbt;
|
|
3083
3649
|
btcSignTransaction: typeof btcSignTransaction;
|
|
3084
3650
|
btcVerifyMessage: typeof btcVerifyMessage;
|
|
3651
|
+
/**
|
|
3652
|
+
* Starcoin function
|
|
3653
|
+
*/
|
|
3085
3654
|
starcoinGetAddress: typeof starcoinGetAddress;
|
|
3086
3655
|
starcoinGetPublicKey: typeof starcoinGetPublicKey;
|
|
3087
3656
|
starcoinSignMessage: typeof starcoinSignMessage;
|
|
3088
3657
|
starcoinSignTransaction: typeof starcoinSignTransaction;
|
|
3089
3658
|
starcoinVerifyMessage: typeof starcoinVerifyMessage;
|
|
3659
|
+
/**
|
|
3660
|
+
* Nem function
|
|
3661
|
+
*/
|
|
3090
3662
|
nemGetAddress: typeof nemGetAddress;
|
|
3091
3663
|
nemSignTransaction: typeof nemSignTransaction;
|
|
3664
|
+
/**
|
|
3665
|
+
* Solana function
|
|
3666
|
+
*/
|
|
3092
3667
|
solGetAddress: typeof solGetAddress;
|
|
3093
3668
|
solSignTransaction: typeof solSignTransaction;
|
|
3094
3669
|
solSignOffchainMessage: typeof solSignOffchainMessage;
|
|
3095
3670
|
solSignMessage: typeof solSignMessage;
|
|
3671
|
+
/**
|
|
3672
|
+
* Stellar function
|
|
3673
|
+
*/
|
|
3096
3674
|
stellarGetAddress: typeof stellarGetAddress;
|
|
3097
3675
|
stellarSignTransaction: typeof stellarSignTransaction;
|
|
3676
|
+
/**
|
|
3677
|
+
* Tron function
|
|
3678
|
+
*/
|
|
3098
3679
|
tronGetAddress: typeof tronGetAddress;
|
|
3099
3680
|
tronSignMessage: typeof tronSignMessage;
|
|
3100
3681
|
tronSignTransaction: typeof tronSignTransaction;
|
|
3682
|
+
/**
|
|
3683
|
+
* Conflux function
|
|
3684
|
+
*/
|
|
3101
3685
|
confluxGetAddress: typeof confluxGetAddress;
|
|
3102
3686
|
confluxSignMessage: typeof confluxSignMessage;
|
|
3103
3687
|
confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
|
|
3104
3688
|
confluxSignTransaction: typeof confluxSignTransaction;
|
|
3689
|
+
/**
|
|
3690
|
+
* Near function
|
|
3691
|
+
*/
|
|
3105
3692
|
nearGetAddress: typeof nearGetAddress;
|
|
3106
3693
|
nearSignTransaction: typeof nearSignTransaction;
|
|
3694
|
+
/**
|
|
3695
|
+
* Aptos function
|
|
3696
|
+
*/
|
|
3107
3697
|
aptosGetAddress: typeof aptosGetAddress;
|
|
3108
3698
|
aptosGetPublicKey: typeof aptosGetPublicKey;
|
|
3109
3699
|
aptosSignMessage: typeof aptosSignMessage;
|
|
3110
3700
|
aptosSignInMessage: typeof aptosSignInMessage;
|
|
3111
3701
|
aptosSignTransaction: typeof aptosSignTransaction;
|
|
3702
|
+
/**
|
|
3703
|
+
* Algo function
|
|
3704
|
+
*/
|
|
3112
3705
|
algoGetAddress: typeof algoGetAddress;
|
|
3113
3706
|
algoSignTransaction: typeof algoSignTransaction;
|
|
3707
|
+
/**
|
|
3708
|
+
* Cosmos function
|
|
3709
|
+
*/
|
|
3114
3710
|
cosmosGetAddress: typeof cosmosGetAddress;
|
|
3115
3711
|
cosmosGetPublicKey: typeof cosmosGetPublicKey;
|
|
3116
3712
|
cosmosSignTransaction: typeof cosmosSignTransaction;
|
|
3713
|
+
/**
|
|
3714
|
+
* XRP function
|
|
3715
|
+
*/
|
|
3117
3716
|
xrpGetAddress: typeof xrpGetAddress;
|
|
3118
3717
|
xrpSignTransaction: typeof xrpSignTransaction;
|
|
3718
|
+
/**
|
|
3719
|
+
* SUI function
|
|
3720
|
+
*/
|
|
3119
3721
|
suiGetAddress: typeof suiGetAddress;
|
|
3120
3722
|
suiGetPublicKey: typeof suiGetPublicKey;
|
|
3121
3723
|
suiSignMessage: typeof suiSignMessage;
|
|
3122
3724
|
suiSignTransaction: typeof suiSignTransaction;
|
|
3725
|
+
/**
|
|
3726
|
+
* Cardano function
|
|
3727
|
+
*/
|
|
3123
3728
|
cardanoGetAddress: typeof cardanoGetAddress;
|
|
3124
3729
|
cardanoGetPublicKey: typeof cardanoGetPublicKey;
|
|
3125
3730
|
cardanoSignTransaction: typeof cardanoSignTransaction;
|
|
3126
3731
|
cardanoSignMessage: typeof cardanoSignMessage;
|
|
3732
|
+
/**
|
|
3733
|
+
* Filecoin function
|
|
3734
|
+
*/
|
|
3127
3735
|
filecoinGetAddress: typeof filecoinGetAddress;
|
|
3128
3736
|
filecoinSignTransaction: typeof filecoinSignTransaction;
|
|
3737
|
+
/**
|
|
3738
|
+
* Polkadot function
|
|
3739
|
+
*/
|
|
3129
3740
|
polkadotGetAddress: typeof polkadotGetAddress;
|
|
3130
3741
|
polkadotSignTransaction: typeof polkadotSignTransaction;
|
|
3742
|
+
/**
|
|
3743
|
+
* Kaspa function
|
|
3744
|
+
*/
|
|
3131
3745
|
kaspaGetAddress: typeof kaspaGetAddress;
|
|
3132
3746
|
kaspaSignTransaction: typeof kaspaSignTransaction;
|
|
3747
|
+
/**
|
|
3748
|
+
* nexa function
|
|
3749
|
+
*/
|
|
3133
3750
|
nexaGetAddress: typeof nexaGetAddress;
|
|
3134
3751
|
nexaSignTransaction: typeof nexaSignTransaction;
|
|
3752
|
+
/**
|
|
3753
|
+
* Nostr function
|
|
3754
|
+
*/
|
|
3135
3755
|
nostrGetPublicKey: typeof nostrGetPublicKey;
|
|
3136
3756
|
nostrSignEvent: typeof nostrSignEvent;
|
|
3137
3757
|
nostrEncryptMessage: typeof nostrEncryptMessage;
|
|
3138
3758
|
nostrDecryptMessage: typeof nostrDecryptMessage;
|
|
3139
3759
|
nostrSignSchnorr: typeof nostrSignSchnorr;
|
|
3760
|
+
/**
|
|
3761
|
+
* Lightning Network
|
|
3762
|
+
*/
|
|
3140
3763
|
lnurlAuth: typeof lnurlAuth;
|
|
3764
|
+
/**
|
|
3765
|
+
* Nervos Network
|
|
3766
|
+
*/
|
|
3141
3767
|
nervosGetAddress: typeof nervosGetAddress;
|
|
3142
3768
|
nervosSignTransaction: typeof nervosSignTransaction;
|
|
3769
|
+
/**
|
|
3770
|
+
* Dnx Network
|
|
3771
|
+
*/
|
|
3143
3772
|
dnxGetAddress: typeof dnxGetAddress;
|
|
3144
3773
|
dnxSignTransaction: typeof dnxSignTransaction;
|
|
3774
|
+
/**
|
|
3775
|
+
* TON Network
|
|
3776
|
+
*/
|
|
3145
3777
|
tonGetAddress: typeof tonGetAddress;
|
|
3146
3778
|
tonSignMessage: typeof tonSignMessage;
|
|
3147
3779
|
tonSignProof: typeof tonSignProof;
|
|
3148
3780
|
tonSignData: typeof tonSignData;
|
|
3781
|
+
/**
|
|
3782
|
+
* SCDO Network
|
|
3783
|
+
*/
|
|
3149
3784
|
scdoGetAddress: typeof scdoGetAddress;
|
|
3150
3785
|
scdoSignMessage: typeof scdoSignMessage;
|
|
3151
3786
|
scdoSignTransaction: typeof scdoSignTransaction;
|
|
3787
|
+
/**
|
|
3788
|
+
* Alephium Network
|
|
3789
|
+
*/
|
|
3152
3790
|
alephiumGetAddress: typeof alephiumGetAddress;
|
|
3153
3791
|
alephiumSignMessage: typeof alephiumSignMessage;
|
|
3154
3792
|
alephiumSignTransaction: typeof alephiumSignTransaction;
|
|
3793
|
+
/**
|
|
3794
|
+
* Benfen Network
|
|
3795
|
+
*/
|
|
3155
3796
|
benfenGetAddress: typeof benfenGetAddress;
|
|
3156
3797
|
benfenGetPublicKey: typeof benfenGetPublicKey;
|
|
3157
3798
|
benfenSignTransaction: typeof benfenSignTransaction;
|
|
3158
3799
|
benfenSignMessage: typeof benfenSignMessage;
|
|
3800
|
+
/**
|
|
3801
|
+
* Neo Network
|
|
3802
|
+
*/
|
|
3159
3803
|
neoGetAddress: typeof neoGetAddress;
|
|
3160
3804
|
neoSignTransaction: typeof neoSignTransaction;
|
|
3161
3805
|
};
|
|
@@ -3230,11 +3874,13 @@ declare const DEVICE: {
|
|
|
3230
3874
|
readonly PIN: "pin";
|
|
3231
3875
|
readonly PASSPHRASE: "passphrase";
|
|
3232
3876
|
readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
|
|
3877
|
+
readonly ATTACH_PIN_ON_DEVICE: "attach_pin_on_device";
|
|
3233
3878
|
readonly WORD: "word";
|
|
3234
3879
|
readonly SUPPORT_FEATURES: "support_features";
|
|
3235
3880
|
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
|
|
3236
3881
|
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "select_device_for_switch_firmware_web_device";
|
|
3237
3882
|
readonly FEATURES: "features";
|
|
3883
|
+
readonly STATE: "state";
|
|
3238
3884
|
};
|
|
3239
3885
|
interface DeviceConnnectRequest {
|
|
3240
3886
|
type: typeof DEVICE.CONNECT;
|
|
@@ -3253,6 +3899,10 @@ interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'
|
|
|
3253
3899
|
}
|
|
3254
3900
|
type PassphraseRequestPayload = {
|
|
3255
3901
|
existsAttachPinUser?: boolean;
|
|
3902
|
+
deviceOnly?: boolean;
|
|
3903
|
+
source?: 'wallet-session-coordinator';
|
|
3904
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
3905
|
+
expectedPassphraseState?: string;
|
|
3256
3906
|
};
|
|
3257
3907
|
interface DeviceButtonRequest {
|
|
3258
3908
|
type: typeof DEVICE.BUTTON;
|
|
@@ -3265,6 +3915,10 @@ interface DeviceSendFeatures {
|
|
|
3265
3915
|
type: typeof DEVICE.FEATURES;
|
|
3266
3916
|
payload: DeviceFeaturesPayload;
|
|
3267
3917
|
}
|
|
3918
|
+
interface DeviceSendState {
|
|
3919
|
+
type: typeof DEVICE.STATE;
|
|
3920
|
+
payload: DeviceStateEvent;
|
|
3921
|
+
}
|
|
3268
3922
|
type DeviceSupportFeaturesPayload = SupportFeatures & {
|
|
3269
3923
|
device: KnownDevice | null;
|
|
3270
3924
|
};
|
|
@@ -3272,7 +3926,7 @@ interface DeviceSendSupportFeatures {
|
|
|
3272
3926
|
type: typeof DEVICE.SUPPORT_FEATURES;
|
|
3273
3927
|
payload: DeviceSupportFeaturesPayload;
|
|
3274
3928
|
}
|
|
3275
|
-
type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
3929
|
+
type DeviceEvent = DeviceButtonRequest | DeviceSendState | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
3276
3930
|
type DeviceEventMessage = DeviceEvent & {
|
|
3277
3931
|
event: typeof DEVICE_EVENT;
|
|
3278
3932
|
};
|
|
@@ -3313,6 +3967,17 @@ declare const UI_REQUEST: {
|
|
|
3313
3967
|
readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
|
|
3314
3968
|
readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
|
|
3315
3969
|
};
|
|
3970
|
+
type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
|
|
3971
|
+
type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
|
|
3972
|
+
type ProtocolV2UiEventMetadata = {
|
|
3973
|
+
source?: ProtocolV2UiEventSource;
|
|
3974
|
+
reason?: string;
|
|
3975
|
+
deviceOnly?: boolean;
|
|
3976
|
+
completion?: ProtocolV2UiCompletion;
|
|
3977
|
+
method?: string;
|
|
3978
|
+
page?: string | number;
|
|
3979
|
+
operation?: string;
|
|
3980
|
+
};
|
|
3316
3981
|
interface UiRequestWithoutPayload {
|
|
3317
3982
|
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.BLUETOOTH_UNSUPPORTED | typeof UI_REQUEST.BLUETOOTH_POWERED_OFF | typeof UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE | typeof UI_REQUEST.LOCATION_PERMISSION | typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION | typeof UI_REQUEST.FIRMWARE_PROCESSING | typeof UI_REQUEST.WEB_DEVICE_PROMPT_ACCESS_PERMISSION;
|
|
3318
3983
|
payload?: typeof undefined;
|
|
@@ -3325,40 +3990,46 @@ interface UiRequestFirmwareProgressing {
|
|
|
3325
3990
|
}
|
|
3326
3991
|
type UiRequestDeviceAction = {
|
|
3327
3992
|
type: typeof UI_REQUEST.REQUEST_PIN;
|
|
3328
|
-
payload: {
|
|
3329
|
-
device: Device;
|
|
3993
|
+
payload: ProtocolV2UiEventMetadata & {
|
|
3994
|
+
device: Device$1;
|
|
3330
3995
|
type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
|
|
3331
3996
|
};
|
|
3332
3997
|
};
|
|
3333
3998
|
interface UiRequestButton {
|
|
3334
3999
|
type: typeof UI_REQUEST.REQUEST_BUTTON;
|
|
3335
|
-
payload: DeviceButtonRequest['payload'];
|
|
4000
|
+
payload: DeviceButtonRequest['payload'] & ProtocolV2UiEventMetadata;
|
|
3336
4001
|
}
|
|
3337
4002
|
interface UiRequestPassphrase {
|
|
3338
4003
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
|
|
3339
4004
|
payload: {
|
|
3340
|
-
device: Device;
|
|
4005
|
+
device: Device$1;
|
|
3341
4006
|
passphraseState?: string;
|
|
3342
4007
|
existsAttachPinUser?: boolean;
|
|
4008
|
+
deviceOnly?: boolean;
|
|
4009
|
+
source?: 'wallet-session-coordinator';
|
|
4010
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
4011
|
+
expectedPassphraseState?: string;
|
|
3343
4012
|
};
|
|
3344
4013
|
}
|
|
3345
4014
|
interface UiRequestPassphraseOnDevice {
|
|
3346
4015
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
|
|
3347
4016
|
payload: {
|
|
3348
|
-
device: Device;
|
|
4017
|
+
device: Device$1;
|
|
3349
4018
|
passphraseState?: string;
|
|
4019
|
+
source?: 'wallet-session-coordinator';
|
|
4020
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
3350
4021
|
};
|
|
3351
4022
|
}
|
|
3352
4023
|
interface UiRequestSelectDeviceInBootloaderForWebDevice {
|
|
3353
4024
|
type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
3354
4025
|
payload: {
|
|
3355
|
-
device: Device;
|
|
4026
|
+
device: Device$1;
|
|
3356
4027
|
};
|
|
3357
4028
|
}
|
|
3358
4029
|
interface UiRequestSelectDeviceForSwitchFirmwareWebDevice {
|
|
3359
4030
|
type: typeof UI_REQUEST.REQUEST_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
|
|
3360
4031
|
payload: {
|
|
3361
|
-
device: Device;
|
|
4032
|
+
device: Device$1;
|
|
3362
4033
|
};
|
|
3363
4034
|
}
|
|
3364
4035
|
interface FirmwareProcessing {
|
|
@@ -3371,7 +4042,7 @@ type IFirmwareUpdateProgressType = 'transferData' | 'installingFirmware';
|
|
|
3371
4042
|
interface FirmwareProgress {
|
|
3372
4043
|
type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
|
|
3373
4044
|
payload: {
|
|
3374
|
-
device: Device;
|
|
4045
|
+
device: Device$1;
|
|
3375
4046
|
progress: number;
|
|
3376
4047
|
progressType: IFirmwareUpdateProgressType;
|
|
3377
4048
|
transferredBytes?: number;
|
|
@@ -3383,7 +4054,7 @@ interface FirmwareProgress {
|
|
|
3383
4054
|
interface FirmwareTip {
|
|
3384
4055
|
type: typeof UI_REQUEST.FIRMWARE_TIP;
|
|
3385
4056
|
payload: {
|
|
3386
|
-
device: Device;
|
|
4057
|
+
device: Device$1;
|
|
3387
4058
|
data: {
|
|
3388
4059
|
message: string;
|
|
3389
4060
|
};
|
|
@@ -3402,7 +4073,7 @@ interface DeviceProgress {
|
|
|
3402
4073
|
interface PreviousAddressResult {
|
|
3403
4074
|
type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
|
|
3404
4075
|
payload: {
|
|
3405
|
-
device: Device;
|
|
4076
|
+
device: Device$1;
|
|
3406
4077
|
data: {
|
|
3407
4078
|
address?: string;
|
|
3408
4079
|
path?: string;
|
|
@@ -3655,7 +4326,7 @@ type UiPromiseResponse = UiResponseEvent | {
|
|
|
3655
4326
|
};
|
|
3656
4327
|
type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
|
|
3657
4328
|
type: T;
|
|
3658
|
-
}>, T, Device
|
|
4329
|
+
}>, T, Device>;
|
|
3659
4330
|
|
|
3660
4331
|
declare const LogBlockEvent: Set<string>;
|
|
3661
4332
|
declare function getLogBlockLabel(message: unknown): string | undefined;
|
|
@@ -3722,32 +4393,109 @@ declare enum LoggerNames {
|
|
|
3722
4393
|
}
|
|
3723
4394
|
declare const getLogger: (key: LoggerNames) => Log;
|
|
3724
4395
|
|
|
3725
|
-
|
|
4396
|
+
type HttpRequestOptions = {
|
|
4397
|
+
/** Axios adapter-defined request timeout retained for existing opt-in callers. */
|
|
4398
|
+
timeoutMs?: number;
|
|
4399
|
+
/** Deadline for DNS, connection, TLS, redirects, and the first response-body progress. */
|
|
4400
|
+
connectTimeoutMs?: number;
|
|
4401
|
+
/** Maximum idle interval between response-body progress events. */
|
|
4402
|
+
readTimeoutMs?: number;
|
|
4403
|
+
/** Wall-clock deadline across all attempts and retry backoff. */
|
|
4404
|
+
overallTimeoutMs?: number;
|
|
4405
|
+
maxRetries?: number;
|
|
4406
|
+
retryDelayMs?: number;
|
|
4407
|
+
};
|
|
4408
|
+
|
|
4409
|
+
declare const httpRequest: (url: string, type: string, options?: HttpRequestOptions) => any;
|
|
3726
4410
|
declare const getTimeStamp: () => number;
|
|
3727
4411
|
|
|
4412
|
+
/**
|
|
4413
|
+
* Validates version string
|
|
4414
|
+
* @param {string} version Version string
|
|
4415
|
+
* @returns {boolean} True if version string is valid, false if not
|
|
4416
|
+
*/
|
|
3728
4417
|
declare const isValidVersionString: (version: string) => boolean;
|
|
4418
|
+
/**
|
|
4419
|
+
* Validates a version array
|
|
4420
|
+
* @param {number[]} version Version array
|
|
4421
|
+
* @returns {boolean} True if version array is valid, false if not
|
|
4422
|
+
*/
|
|
3729
4423
|
declare const isValidVersionArray: (version: number[]) => boolean;
|
|
4424
|
+
/**
|
|
4425
|
+
* Fills the missing version numbers with zeros (ie: [1, 2] will become [1, 2, 0])
|
|
4426
|
+
* @param {number[]} version Version array
|
|
4427
|
+
* @returns {number[]} Version array with all positions filled
|
|
4428
|
+
*/
|
|
3730
4429
|
declare const normalizeVersionArray: (version: number[]) => number[];
|
|
4430
|
+
/**
|
|
4431
|
+
* Returns a valid version array from a version string
|
|
4432
|
+
* @param {string} version Version string
|
|
4433
|
+
* @returns {number[]} Version array
|
|
4434
|
+
*/
|
|
3731
4435
|
declare const versionSplit: (version: string) => number[];
|
|
4436
|
+
/**
|
|
4437
|
+
* Compares two versions and returns if the version is newer (1), older (-1) or equal (0).
|
|
4438
|
+
* @param {string | number[]} a Version to compare from
|
|
4439
|
+
* @param {string | number[]} b Version to compare with
|
|
4440
|
+
* @returns {number} Returns 1 if newer, -1 if older and 0 if equal
|
|
4441
|
+
*/
|
|
3732
4442
|
declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
|
|
3733
4443
|
|
|
3734
|
-
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"DevFirmwareInstallProgress"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"DevFirmwareUpdateStatus"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoDRep"> | TypedResponseMessage<"CardanoCVoteRegistrationDelegation"> | TypedResponseMessage<"CardanoCVoteRegistrationParametersType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"DnxTxKey"> | TypedResponseMessage<"DnxComputedKeyImage"> | TypedResponseMessage<"EmmcFile"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMemberOneKey"> | TypedResponseMessage<"EthereumFieldTypeOneKey"> | TypedResponseMessage<"EthereumDefinitions"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessListOneKey"> | TypedResponseMessage<"EthereumAuthorizationOneKey"> | TypedResponseMessage<"EthereumAuthorizationSignature"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"SolanaTxATADetails"> | TypedResponseMessage<"SolanaTxExtraInfo"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"CoinJoinRequest"> | TypedResponseMessage<"PaymentRequestMemo"> | TypedResponseMessage<"TextMemo"> | TypedResponseMessage<"RefundMemo"> | TypedResponseMessage<"CoinPurchaseMemo"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"DevFirmwareImageInfo"> | TypedResponseMessage<"DevInfoTargets"> | TypedResponseMessage<"DevInfoTypes"> | TypedResponseMessage<"DevHardwareInfo"> | TypedResponseMessage<"DevMainMcuInfo"> | TypedResponseMessage<"DevBluetoothInfo"> | TypedResponseMessage<"DevSEInfo"> | TypedResponseMessage<"DevStatus"> | TypedResponseMessage<"DevFirmwareTarget"> | TypedResponseMessage<"DevFirmwareUpdateStatusEntry"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"Setup"> | TypedResponseMessage<"NewDevice"> | TypedResponseMessage<"Restore"> | TypedResponseMessage<"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<"DebugLinkInput"> | TypedResponseMessage<"InternalMyAddressRequest"> | 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<"GetProtoVersion"> | TypedResponseMessage<"ProtoVersion"> | TypedResponseMessage<"DevReboot"> | TypedResponseMessage<"DevGetDeviceInfo"> | TypedResponseMessage<"DevFirmwareUpdate"> | TypedResponseMessage<"DevGetFirmwareUpdateStatus"> | TypedResponseMessage<"FactoryDeviceInfoSettings"> | TypedResponseMessage<"FactoryGetDeviceInfo"> | TypedResponseMessage<"FactoryDeviceInfo"> | TypedResponseMessage<"FilesystemFixPermission"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"GetOnboardingStatus"> | TypedResponseMessage<"OnboardingStatus">;
|
|
4444
|
+
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceStatus"> | TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"ProtocolInfo"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | 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<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"ViewRawData"> | TypedResponseMessage<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"DevOnboardingSetupStatus"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaTxRequest"> | TypedResponseMessage<"KaspaTxAckInput"> | TypedResponseMessage<"KaspaTxAckOutput"> | TypedResponseMessage<"KaspaTxAckPayloadChunk"> | TypedResponseMessage<"KaspaTxAckPrevMeta"> | TypedResponseMessage<"KaspaTxAckPrevInput"> | TypedResponseMessage<"KaspaTxAckPrevOutput"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"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<"UiAnimationRequest"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage"> | TypedResponseMessage<"ProtocolInfoRequest"> | 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<"DeviceSessionAskPassphrase"> | 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">;
|
|
4445
|
+
|
|
4446
|
+
type DeviceFeaturesInput = Features | Messages.Features;
|
|
3735
4447
|
|
|
3736
|
-
|
|
4448
|
+
/**
|
|
4449
|
+
* get device type by features
|
|
4450
|
+
*/
|
|
4451
|
+
declare const getDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
|
|
4452
|
+
/**
|
|
4453
|
+
* get device type by ble name
|
|
4454
|
+
* @param name Ble name
|
|
4455
|
+
*/
|
|
3737
4456
|
declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
declare const
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
declare const
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
declare const
|
|
4457
|
+
/**
|
|
4458
|
+
* Get Connected Device ble name by features
|
|
4459
|
+
* @returns
|
|
4460
|
+
*/
|
|
4461
|
+
declare const getDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
|
|
4462
|
+
/**
|
|
4463
|
+
* Get Connected Device serial number by features
|
|
4464
|
+
*/
|
|
4465
|
+
declare const getDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
|
|
4466
|
+
/**
|
|
4467
|
+
* @deprecated Use getDeviceSerialNo instead.
|
|
4468
|
+
*/
|
|
4469
|
+
declare const getDeviceUUID: (features?: DeviceFeaturesInput) => string;
|
|
4470
|
+
/**
|
|
4471
|
+
* Get Connected Device label by features
|
|
4472
|
+
*/
|
|
4473
|
+
declare const getDeviceLabel: (features?: DeviceFeaturesInput) => string | null;
|
|
4474
|
+
/**
|
|
4475
|
+
* Get firmware version range by features
|
|
4476
|
+
* Type has a higher priority than Model
|
|
4477
|
+
*/
|
|
4478
|
+
declare const getMethodVersionRange: (features: DeviceFeaturesInput | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
|
|
4479
|
+
declare const getFirmwareType: (features?: DeviceFeaturesInput) => _onekeyfe_hd_shared.EFirmwareType;
|
|
4480
|
+
|
|
4481
|
+
/**
|
|
4482
|
+
* Get Connected Device version by features
|
|
4483
|
+
*/
|
|
4484
|
+
declare const getDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4485
|
+
/**
|
|
4486
|
+
* Get Connected Device bootloader version by features
|
|
4487
|
+
*/
|
|
4488
|
+
declare const getDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4489
|
+
/**
|
|
4490
|
+
* Get Connected Device boardloader/romloader version by features
|
|
4491
|
+
*/
|
|
4492
|
+
declare const getDeviceBoardloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4493
|
+
/**
|
|
4494
|
+
* Get Connected Device bluetooth firmware version by features
|
|
4495
|
+
*/
|
|
4496
|
+
declare const getDeviceBLEFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4497
|
+
|
|
4498
|
+
declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v1", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
|
|
3751
4499
|
type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
|
|
3752
4500
|
type ProtocolV1MessageSchema = 'v1CurrentSchema' | 'v1LegacySchema';
|
|
3753
4501
|
type ProtobufMessageSchema = ProtocolV1MessageSchema | 'v2Schema';
|
|
@@ -3762,11 +4510,19 @@ declare class DataManager {
|
|
|
3762
4510
|
};
|
|
3763
4511
|
static lastCheckTimestamp: number;
|
|
3764
4512
|
static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
|
|
4513
|
+
/**
|
|
4514
|
+
* Touch、Pro System UI Resource Update
|
|
4515
|
+
* ** Interval upgrade is not considered **
|
|
4516
|
+
*/
|
|
3765
4517
|
static getSysResourcesLatestRelease: ({ features, forcedUpdateRes, firmwareType, }: {
|
|
3766
4518
|
features: Features;
|
|
3767
4519
|
forcedUpdateRes?: boolean | undefined;
|
|
3768
4520
|
firmwareType: EFirmwareType;
|
|
3769
4521
|
}) => string | undefined;
|
|
4522
|
+
/**
|
|
4523
|
+
* Touch、Pro System full UI Resource Update
|
|
4524
|
+
* ** Interval upgrade is not considered **
|
|
4525
|
+
*/
|
|
3770
4526
|
static getSysFullResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3771
4527
|
static getBootloaderResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3772
4528
|
static getBootloaderTargetVersion: (features: Features, firmwareType: EFirmwareType) => IVersionArray | undefined;
|
|
@@ -3789,23 +4545,34 @@ declare class DataManager {
|
|
|
3789
4545
|
} | undefined;
|
|
3790
4546
|
private static enrichFirmwareReleaseInfo;
|
|
3791
4547
|
static load(settings: ConnectSettings): Promise<void>;
|
|
4548
|
+
private static applyRemoteConfig;
|
|
3792
4549
|
static updateEnv(newEnv: ConnectSettings['env']): void;
|
|
3793
4550
|
static checkAndReloadData(): Promise<void>;
|
|
3794
4551
|
static getProtobufMessages(schema?: ProtobufMessageSchema): JSON;
|
|
3795
4552
|
static getSettings(key?: undefined): ConnectSettings;
|
|
3796
4553
|
static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
|
|
3797
4554
|
static isBleConnect: (env: ConnectSettings['env']) => boolean;
|
|
4555
|
+
/** Desktop WebUSB doesn't need browser permission prompt */
|
|
3798
4556
|
static isDesktopWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
4557
|
+
/** Browser WebUSB needs permission prompt */
|
|
3799
4558
|
static isBrowserWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
3800
4559
|
}
|
|
3801
4560
|
|
|
3802
|
-
declare const supportInputPinOnSoftware: (features
|
|
4561
|
+
declare const supportInputPinOnSoftware: (features?: Features) => SupportFeatureType;
|
|
4562
|
+
/**
|
|
4563
|
+
* Since 3.5.0, Touch uses the firmware-v3 field to get firmware release info
|
|
4564
|
+
*/
|
|
3803
4565
|
declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, firmwareType, }: {
|
|
3804
4566
|
features: Features;
|
|
3805
4567
|
updateType: 'firmware' | 'ble';
|
|
3806
4568
|
targetVersion?: string | undefined;
|
|
3807
4569
|
firmwareType: EFirmwareType;
|
|
3808
4570
|
}) => 'ble' | IFirmwareField;
|
|
4571
|
+
/**
|
|
4572
|
+
* Returns the optional firmware version
|
|
4573
|
+
* Used in firmware web update
|
|
4574
|
+
* https://firmware.onekey.so/
|
|
4575
|
+
*/
|
|
3809
4576
|
declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('ble' | IFirmwareField)[];
|
|
3810
4577
|
|
|
3811
4578
|
declare function checkNeedUpdateBootForTouch(features: Features, firmwareType: EFirmwareType): boolean;
|
|
@@ -3815,15 +4582,40 @@ declare function checkNeedUpdateBootForClassicAndMini({ features, willUpdateFirm
|
|
|
3815
4582
|
firmwareType: EFirmwareType;
|
|
3816
4583
|
}): boolean;
|
|
3817
4584
|
|
|
4585
|
+
type DeviceSettingsProtocol = 'V1' | 'V2';
|
|
4586
|
+
type DeviceSettingsField = keyof DeviceSettingsParams;
|
|
4587
|
+
declare const DEVICE_SETTINGS_SHARED_FIELDS: readonly ["language", "label", "usePassphrase", "autoLockDelayMs", "autoShutdownDelayMs", "hapticFeedback", "bluetoothEnabled"];
|
|
4588
|
+
declare const DEVICE_SETTINGS_V1_ONLY_FIELDS: readonly ["homescreen", "passphraseSource", "displayRotation", "passphraseAlwaysOnDevice", "safetyChecks", "experimentalFeatures", "changeBrightness"];
|
|
4589
|
+
declare const DEVICE_SETTINGS_V2_ONLY_FIELDS: readonly ["brightness", "airgapMode", "animationEnabled", "tapToWake", "deviceNameDisplayEnabled", "fidoEnabled", "usbLockEnabled", "randomKeypad"];
|
|
4590
|
+
declare const PROTOCOL_V2_NEVER_TIMEOUT_MS = 268435456;
|
|
4591
|
+
declare const normalizeSafetyCheckLevel: (value: SafetyCheckLevel | null | undefined) => Enum_SafetyCheckLevel | null | undefined;
|
|
3818
4592
|
declare const getLanguageConfig: (deviceType: IDeviceType) => Record<string, string>[];
|
|
3819
|
-
type
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
4593
|
+
type DeviceSettingsDurationOption = {
|
|
4594
|
+
label: string;
|
|
4595
|
+
valueMs: number;
|
|
4596
|
+
};
|
|
4597
|
+
type DeviceSettingsValueOption<T> = {
|
|
4598
|
+
label: string;
|
|
4599
|
+
value: T;
|
|
4600
|
+
};
|
|
4601
|
+
declare const getAutoLockOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
|
|
4602
|
+
declare const getAutoShutDownOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
|
|
4603
|
+
type DeviceSettingsCapabilities = {
|
|
4604
|
+
protocol: DeviceSettingsProtocol;
|
|
4605
|
+
supportedFields: readonly DeviceSettingsField[];
|
|
4606
|
+
languageOptions: ReadonlyArray<Record<string, string>>;
|
|
4607
|
+
autoLockDelayOptions: readonly DeviceSettingsDurationOption[];
|
|
4608
|
+
autoShutdownDelayOptions: readonly DeviceSettingsDurationOption[];
|
|
4609
|
+
ranges: {
|
|
4610
|
+
brightness?: {
|
|
4611
|
+
min: number;
|
|
4612
|
+
max: number;
|
|
4613
|
+
};
|
|
4614
|
+
};
|
|
4615
|
+
safetyCheckOptions: ReadonlyArray<DeviceSettingsValueOption<Enum_SafetyCheckLevel>>;
|
|
4616
|
+
onDeviceConfirmationFields: readonly DeviceSettingsField[];
|
|
3824
4617
|
};
|
|
3825
|
-
declare const
|
|
3826
|
-
declare const getAutoShutDownOptions: (_deviceType: IDeviceType) => DurationParts[];
|
|
4618
|
+
declare const getDeviceSettingsCapabilities: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsCapabilities;
|
|
3827
4619
|
|
|
3828
4620
|
declare const getHDPath: (path: string) => Array<number>;
|
|
3829
4621
|
declare const getScriptType: (path: Array<number>) => InputScriptType;
|
|
@@ -3860,8 +4652,12 @@ declare const getEnv: () => "web" | "webextension" | "electron" | "react-native"
|
|
|
3860
4652
|
declare const corsValidator: (url?: string) => string | undefined;
|
|
3861
4653
|
declare const parseConnectSettings: (input?: Partial<ConnectSettings>) => ConnectSettings;
|
|
3862
4654
|
|
|
4655
|
+
declare const registerFirmwareUpdateHostBinding: (binding: FirmwareUpdateHostBinding) => number;
|
|
4656
|
+
declare const unregisterFirmwareUpdateHostBinding: (generation?: number) => boolean;
|
|
4657
|
+
declare const getFirmwareUpdateHostBindingGeneration: () => number;
|
|
4658
|
+
|
|
3863
4659
|
declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, updateSettings, switchTransport, }: InjectApi) => CoreApi;
|
|
3864
4660
|
declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
|
|
3865
4661
|
declare const HardwareTopLevelSdk: () => CoreApi;
|
|
3866
4662
|
|
|
3867
|
-
export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllFirmwareRelease, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams,
|
|
4663
|
+
export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllFirmwareRelease, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, ClearSessionCacheParams, ClearSessionCachePayload, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DEVICE_SETTINGS_SHARED_FIELDS, DEVICE_SETTINGS_V1_ONLY_FIELDS, DEVICE_SETTINGS_V2_ONLY_FIELDS, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesRawPatch, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendState, DeviceSendSupportFeatures, DeviceSettingsCapabilities, DeviceSettingsDurationOption, DeviceSettingsField, DeviceSettingsParams, DeviceSettingsProtocol, DeviceSettingsValueOption, DeviceState, DeviceStateEvent, DeviceStateIdentity, DeviceStateMode, DeviceStatePatch, DeviceStateProtocol, DeviceStateScope, DeviceStateSection, DeviceStateSettings, DeviceStateStatus, DeviceStateUpdateSource, DeviceStateVersions, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, 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, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateArtifactParams, FirmwareUpdateBinaryParams, FirmwareUpdateCapabilities, FirmwareUpdateHostBinding, FirmwareUpdateParams, FirmwareUpdatePlan, FirmwareUpdatePlanArtifact, FirmwareUpdatePlanArtifactRole, FirmwareUpdatePlanForceTarget, FirmwareUpdatePlanTarget, FirmwareUpdatePreparedArtifact, FirmwareUpdatePreparedArtifactInput, FirmwareUpdatePreparedEntry, FirmwareUpdatePreparedPlan, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4Params, FirmwareUpdateV4Target, GetDeviceStateParams, GetPassphraseStateParams, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceBundle, 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, OpenWalletSessionParams, OpenWalletSessionPayload, PRO2_WALLPAPER_HEIGHT, PRO2_WALLPAPER_WIDTH, PROTOCOL_V2_NEVER_TIMEOUT_MS, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, Pro2WallpaperColorFormat, ProtocolV2UiCompletion, ProtocolV2UiEventMetadata, ProtocolV2UiEventSource, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, 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, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceForSwitchFirmwareWebDevice, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, cleanupSdkInstance, completeRequestContext, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createRequestContext, createResponseMessage, createSdkTracingContext, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, encodePro2Wallpaper, executeCallback, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceSerialNo, getDeviceSettingsCapabilities, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getFirmwareUpdateHostBindingGeneration, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogBlockLabel, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init$1 as initCore, isBleConnect, isValidVersionArray, isValidVersionString, normalizeSafetyCheckLevel, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, registerFirmwareUpdateHostBinding, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, unregisterFirmwareUpdateHostBinding, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
|