@onekeyfe/hd-core 1.2.0-alpha.24 → 1.2.0-alpha.26
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 +2 -0
- package/__tests__/chain-params-onekey-compatibility.test.ts +229 -0
- package/__tests__/connectSettings.test.ts +47 -5
- package/__tests__/device-state-events.test.ts +124 -0
- package/__tests__/evmLedgerLegacySafety.test.ts +3 -1
- package/__tests__/firmware-update/check-all-firmware-release.test.ts +127 -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-update-capabilities.test.ts +13 -0
- package/__tests__/firmware-update/firmware-update-plan.test.ts +354 -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 +39 -30
- package/__tests__/firmware-update/firmware-upload-source.test.ts +70 -0
- package/__tests__/kaspa-public-types.type-test.ts +16 -0
- package/__tests__/kaspaSignTransaction.test.ts +4 -3
- package/__tests__/method-protocol-support.test.ts +113 -0
- package/__tests__/protocol-v2.test.ts +400 -123
- package/__tests__/public-device-state-api.test.ts +10 -8
- package/__tests__/tron-sign-message-init.test.ts +74 -0
- package/dist/api/BaseMethod.d.ts +6 -2
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/CheckAllFirmwareRelease.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/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 +1 -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 +11 -0
- 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 +23 -5
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/GetDeviceState.d.ts +1 -0
- package/dist/api/GetDeviceState.d.ts.map +1 -1
- package/dist/api/GetFeatures.d.ts.map +1 -1
- package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
- package/dist/api/GetPassphraseState.d.ts +1 -0
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/OpenWalletSession.d.ts +1 -0
- package/dist/api/OpenWalletSession.d.ts.map +1 -1
- package/dist/api/PathInfo.d.ts +1 -0
- package/dist/api/PathInfo.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
- package/dist/api/algo/AlgoGetAddress.d.ts +1 -0
- package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -1
- package/dist/api/algo/AlgoSignTransaction.d.ts +1 -0
- package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -1
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +1 -0
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetAddress.d.ts +1 -0
- package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetPublicKey.d.ts +1 -0
- package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignInMessage.d.ts +1 -0
- package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignMessage.d.ts +1 -0
- package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignTransaction.d.ts +1 -0
- package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCGetAddress.d.ts +1 -0
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts +1 -0
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts +1 -0
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
- package/dist/api/btc/BTCSignPsbt.d.ts +1 -0
- package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
- package/dist/api/btc/BTCSignTransaction.d.ts +1 -0
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts +1 -0
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
- package/dist/api/btc/helpers/versionLimit.d.ts +2 -0
- package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
- package/dist/api/cardano/CardanoGetAddress.d.ts +1 -0
- package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
- package/dist/api/cardano/CardanoGetPublicKey.d.ts +1 -0
- package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignMessage.d.ts +1 -0
- package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignTransaction.d.ts +1 -0
- package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxGetAddress.d.ts +1 -0
- package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignMessage.d.ts +1 -0
- package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +1 -0
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignTransaction.d.ts +1 -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/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/FirmwareUpdateBaseMethod.d.ts +7 -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 +23 -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 +7 -0
- package/dist/api/firmware/getBinary.d.ts.map +1 -1
- 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/kaspa/KaspaGetAddress.d.ts +1 -0
- package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts +1 -0
- 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.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 +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceReboot.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -1
- package/dist/api/protocol-v2/FilesystemFormat.d.ts +1 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +1 -0
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -1
- package/dist/api/protocol-v2/Ping.d.ts +1 -0
- package/dist/api/protocol-v2/Ping.d.ts.map +1 -1
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +1 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -1
- package/dist/api/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 +1 -0
- 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/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/core/index.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +1 -0
- 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 +3 -1
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/index.d.ts +271 -87
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2864 -893
- package/dist/inject.d.ts.map +1 -1
- package/dist/lowLevelInject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +1 -1
- package/dist/topLevelInject.d.ts.map +1 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts +3 -0
- package/dist/types/api/checkAllFirmwareRelease.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 +69 -0
- 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 +27 -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/index.d.ts +9 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/kaspaSignTransaction.d.ts +15 -2
- package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
- package/dist/types/device.d.ts +0 -1
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/settings.d.ts +13 -0
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts +0 -1
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/deviceVersionUtils.d.ts +1 -0
- package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/BaseMethod.ts +21 -18
- package/src/api/CheckAllFirmwareRelease.ts +44 -4
- package/src/api/CipherKeyValue.ts +4 -0
- package/src/api/DirList.ts +4 -1
- package/src/api/DirMake.ts +4 -1
- package/src/api/DirRemove.ts +4 -1
- package/src/api/FileDelete.ts +4 -1
- package/src/api/FileRead.ts +4 -1
- package/src/api/FileWrite.ts +4 -1
- package/src/api/FirmwareUpdate.ts +0 -8
- package/src/api/FirmwareUpdateV2.ts +292 -120
- package/src/api/FirmwareUpdateV3.ts +256 -61
- package/src/api/FirmwareUpdateV4.ts +767 -289
- package/src/api/GetDeviceState.ts +4 -0
- package/src/api/GetFeatures.ts +1 -4
- package/src/api/GetOnekeyFeatures.ts +0 -5
- package/src/api/GetPassphraseState.ts +4 -0
- package/src/api/OpenWalletSession.ts +4 -0
- package/src/api/PathInfo.ts +4 -1
- package/src/api/UploadPortfolio.ts +1 -1
- package/src/api/alephium/AlephiumGetAddress.ts +0 -4
- package/src/api/alephium/AlephiumSignMessage.ts +0 -4
- package/src/api/alephium/AlephiumSignTransaction.ts +0 -4
- package/src/api/algo/AlgoGetAddress.ts +4 -0
- package/src/api/algo/AlgoSignTransaction.ts +4 -0
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +5 -13
- 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 +8 -1
- 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 +4 -0
- package/src/api/cardano/CardanoSignTransaction.ts +4 -0
- package/src/api/conflux/ConfluxGetAddress.ts +4 -0
- package/src/api/conflux/ConfluxSignMessage.ts +4 -0
- package/src/api/conflux/ConfluxSignMessageCIP23.ts +4 -0
- package/src/api/conflux/ConfluxSignTransaction.ts +6 -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 +4 -0
- package/src/api/device/DeviceChangePin.ts +4 -0
- package/src/api/device/DeviceLock.ts +4 -0
- package/src/api/device/DeviceRebootToBoardloader.ts +4 -0
- package/src/api/device/DeviceRebootToBootloader.ts +4 -0
- package/src/api/device/DeviceSettings.ts +4 -0
- package/src/api/device/DeviceSupportFeatures.ts +4 -0
- package/src/api/device/DeviceUnlock.ts +4 -0
- package/src/api/device/DeviceUpdateBootloader.ts +122 -6
- package/src/api/device/DeviceWipe.ts +4 -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 +4 -0
- package/src/api/evm/EVMVerifyMessage.ts +4 -0
- 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/FirmwareUpdateBaseMethod.ts +50 -0
- package/src/api/firmware/FirmwareUpdateCapabilities.ts +9 -0
- package/src/api/firmware/FirmwareUpdatePlan.ts +628 -0
- package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +392 -0
- package/src/api/firmware/updateBootloader.ts +19 -4
- package/src/api/firmware/uploadFirmware.ts +140 -22
- package/src/api/kaspa/KaspaGetAddress.ts +4 -0
- package/src/api/kaspa/KaspaSignTransaction.ts +37 -15
- package/src/api/kaspa/helpers/TransferSerialize.ts +3 -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 +0 -4
- package/src/api/nexa/NexaGetAddress.ts +0 -4
- package/src/api/nexa/NexaSignTransaction.ts +0 -4
- 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/DeviceFactoryInfoGet.ts +4 -1
- package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +4 -1
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +4 -1
- package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +4 -1
- package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +4 -1
- package/src/api/protocol-v2/DeviceInfoGet.ts +4 -8
- package/src/api/protocol-v2/DeviceReboot.ts +4 -2
- package/src/api/protocol-v2/DeviceStatusGet.ts +4 -1
- package/src/api/protocol-v2/DeviceUploadWallpaper.ts +4 -1
- package/src/api/protocol-v2/FilesystemFormat.ts +4 -1
- package/src/api/protocol-v2/FilesystemPermissionFix.ts +4 -1
- package/src/api/protocol-v2/Ping.ts +4 -1
- package/src/api/protocol-v2/ProtocolInfoRequest.ts +4 -1
- 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 +5 -1
- 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/xrp/XrpGetAddress.ts +4 -0
- package/src/api/xrp/XrpSignTransaction.ts +5 -1
- package/src/core/index.ts +4 -17
- package/src/data-manager/DataManager.ts +33 -33
- package/src/data-manager/connectSettings.ts +11 -0
- package/src/device/Device.ts +53 -53
- package/src/index.ts +5 -0
- package/src/inject.ts +22 -2
- package/src/lowLevelInject.ts +5 -1
- package/src/protocols/protocol-v2/unlockRetry.ts +18 -11
- package/src/topLevelInject.ts +5 -1
- package/src/types/api/checkAllFirmwareRelease.ts +3 -0
- package/src/types/api/deviceUpdateBootloader.ts +6 -0
- package/src/types/api/export.ts +20 -0
- package/src/types/api/firmwareUpdate.ts +76 -0
- package/src/types/api/firmwareUpdateCapabilities.ts +9 -0
- package/src/types/api/firmwareUpdatePlan.ts +36 -0
- package/src/types/api/firmwareUpdatePreparedPlan.ts +53 -0
- package/src/types/api/index.ts +14 -0
- package/src/types/api/kaspaSignTransaction.ts +20 -2
- package/src/types/device.ts +0 -1
- package/src/types/settings.ts +13 -0
- package/src/utils/deviceInfoUtils.ts +0 -3
- package/src/utils/deviceVersionUtils.ts +1 -1
- package/src/utils/index.ts +0 -1
- package/tsconfig.type-tests.json +8 -0
package/src/device/Device.ts
CHANGED
|
@@ -3,6 +3,7 @@ import semver from 'semver';
|
|
|
3
3
|
import { DeviceRebootType, DeviceSessionPinType, Enum_Capability } from '@onekeyfe/hd-transport';
|
|
4
4
|
import {
|
|
5
5
|
EDeviceType,
|
|
6
|
+
EFirmwareType,
|
|
6
7
|
ERRORS,
|
|
7
8
|
ERROR_CODES_REQUIRE_DISCONNECT,
|
|
8
9
|
ERROR_CODES_REQUIRE_RELEASE,
|
|
@@ -12,24 +13,12 @@ import {
|
|
|
12
13
|
createDeviceNotSupportMethodError,
|
|
13
14
|
} from '@onekeyfe/hd-shared';
|
|
14
15
|
|
|
15
|
-
import {
|
|
16
|
-
LoggerNames,
|
|
17
|
-
getDeviceBLEFirmwareVersion,
|
|
18
|
-
getDeviceBleName,
|
|
19
|
-
getDeviceBootloaderVersion,
|
|
20
|
-
getDeviceFirmwareVersion,
|
|
21
|
-
getDeviceLabel,
|
|
22
|
-
getDeviceSerialNo,
|
|
23
|
-
getDeviceType,
|
|
24
|
-
getFirmwareType,
|
|
25
|
-
getLogger,
|
|
26
|
-
} from '../utils';
|
|
16
|
+
import { LoggerNames, getLogger } from '../utils';
|
|
27
17
|
import {
|
|
28
18
|
fixFeaturesFirmwareVersion,
|
|
29
19
|
getPassphraseStateWithRefreshDeviceInfo,
|
|
30
|
-
supportInputPinOnSoftware,
|
|
31
|
-
supportModifyHomescreen,
|
|
32
20
|
} from '../utils/deviceFeaturesUtils';
|
|
21
|
+
import { parseDeviceVersion } from '../utils/deviceVersionUtils';
|
|
33
22
|
import { generateInstanceId } from '../utils/tracing';
|
|
34
23
|
// eslint-disable-next-line import/no-cycle
|
|
35
24
|
import { DeviceCommands } from './DeviceCommands';
|
|
@@ -65,7 +54,6 @@ import { DEVICE, UI_REQUEST } from '../events';
|
|
|
65
54
|
import { DataManager } from '../data-manager';
|
|
66
55
|
import TransportManager from '../data-manager/TransportManager';
|
|
67
56
|
import { toHardened } from '../api/helpers/pathUtils';
|
|
68
|
-
import { existCapability } from '../utils/capabilitieUtils';
|
|
69
57
|
import {
|
|
70
58
|
PROTOCOL_V2_FEATURES_DEVICE_INFO_REQUEST,
|
|
71
59
|
PROTOCOL_V2_FULL_DEVICE_INFO_REQUEST,
|
|
@@ -298,7 +286,7 @@ export class Device extends EventEmitter {
|
|
|
298
286
|
const deviceType = this.getCurrentDeviceType();
|
|
299
287
|
|
|
300
288
|
const bleName = this.getCurrentBleName();
|
|
301
|
-
const
|
|
289
|
+
const displayName = this.getCurrentDisplayName();
|
|
302
290
|
const serialNo = this.getCurrentSerialNo();
|
|
303
291
|
const connectId = this.getConnectId();
|
|
304
292
|
const deviceId = this.getCurrentDeviceId() || null;
|
|
@@ -322,10 +310,10 @@ export class Device extends EventEmitter {
|
|
|
322
310
|
deviceId,
|
|
323
311
|
path: this.originalDescriptor?.path,
|
|
324
312
|
bleName,
|
|
325
|
-
name:
|
|
313
|
+
name: displayName || bleName || `OneKey ${deviceType?.toUpperCase()}`,
|
|
326
314
|
// Keep the legacy top-level field string-compatible while preserving
|
|
327
315
|
// the canonical nullable value at state.identity.label.
|
|
328
|
-
label:
|
|
316
|
+
label: displayName ?? '',
|
|
329
317
|
mode: this.getMode(),
|
|
330
318
|
features,
|
|
331
319
|
state,
|
|
@@ -543,15 +531,15 @@ export class Device extends EventEmitter {
|
|
|
543
531
|
}
|
|
544
532
|
|
|
545
533
|
getCurrentDeviceType() {
|
|
546
|
-
return
|
|
534
|
+
return this.state?.identity.deviceType ?? EDeviceType.Unknown;
|
|
547
535
|
}
|
|
548
536
|
|
|
549
537
|
getCurrentDeviceId() {
|
|
550
|
-
return this.
|
|
538
|
+
return this.state?.identity.deviceId || undefined;
|
|
551
539
|
}
|
|
552
540
|
|
|
553
541
|
getCurrentSerialNo() {
|
|
554
|
-
return
|
|
542
|
+
return this.state?.identity.serialNo ?? '';
|
|
555
543
|
}
|
|
556
544
|
|
|
557
545
|
getConnectId() {
|
|
@@ -564,37 +552,54 @@ export class Device extends EventEmitter {
|
|
|
564
552
|
}
|
|
565
553
|
|
|
566
554
|
getCurrentBleName() {
|
|
567
|
-
return
|
|
555
|
+
return this.state?.identity.bleName ?? null;
|
|
568
556
|
}
|
|
569
557
|
|
|
570
558
|
getCurrentLabel() {
|
|
571
|
-
return
|
|
559
|
+
return this.state?.identity.label ?? null;
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
getCurrentDisplayName() {
|
|
563
|
+
if (!this.state) return null;
|
|
564
|
+
|
|
565
|
+
const label = this.getCurrentLabel();
|
|
566
|
+
if (label) return label;
|
|
567
|
+
|
|
568
|
+
const bleName = this.getCurrentBleName();
|
|
569
|
+
if (bleName) return bleName;
|
|
570
|
+
|
|
571
|
+
const deviceType = this.getCurrentDeviceType();
|
|
572
|
+
if (deviceType === EDeviceType.ClassicPure) {
|
|
573
|
+
return 'OneKey Classic 1S';
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
return `OneKey ${deviceType.charAt(0).toUpperCase() + deviceType.slice(1)}`;
|
|
572
577
|
}
|
|
573
578
|
|
|
574
579
|
getCurrentPassphraseProtection() {
|
|
575
|
-
return this.
|
|
580
|
+
return this.state?.status.passphraseProtection;
|
|
576
581
|
}
|
|
577
582
|
|
|
578
583
|
getCurrentFirmwareType() {
|
|
579
|
-
return
|
|
584
|
+
return this.state?.identity.firmwareType ?? EFirmwareType.Universal;
|
|
580
585
|
}
|
|
581
586
|
|
|
582
587
|
getCurrentFirmwareVersionString() {
|
|
583
|
-
return
|
|
588
|
+
return parseDeviceVersion(this.state?.versions.firmware).join('.');
|
|
584
589
|
}
|
|
585
590
|
|
|
586
591
|
getCurrentBLEFirmwareVersionString() {
|
|
587
|
-
if (!this.
|
|
588
|
-
return
|
|
592
|
+
if (!this.state) return undefined;
|
|
593
|
+
return parseDeviceVersion(this.state.versions.ble).join('.');
|
|
589
594
|
}
|
|
590
595
|
|
|
591
596
|
getCurrentBootloaderVersionString() {
|
|
592
|
-
if (!this.
|
|
593
|
-
return
|
|
597
|
+
if (!this.state) return undefined;
|
|
598
|
+
return parseDeviceVersion(this.state.versions.bootloader).join('.');
|
|
594
599
|
}
|
|
595
600
|
|
|
596
601
|
getCurrentSafetyChecks() {
|
|
597
|
-
return this.
|
|
602
|
+
return this.state?.settings.safetyChecks;
|
|
598
603
|
}
|
|
599
604
|
|
|
600
605
|
getCurrentMethodVersionRange(
|
|
@@ -639,8 +644,6 @@ export class Device extends EventEmitter {
|
|
|
639
644
|
}
|
|
640
645
|
|
|
641
646
|
supportInputPinOnSoftware(): SupportFeatureType {
|
|
642
|
-
if (this.features) return supportInputPinOnSoftware(this.features);
|
|
643
|
-
|
|
644
647
|
const deviceType = this.getCurrentDeviceType();
|
|
645
648
|
if (
|
|
646
649
|
deviceType === EDeviceType.Touch ||
|
|
@@ -664,8 +667,6 @@ export class Device extends EventEmitter {
|
|
|
664
667
|
return { support: true };
|
|
665
668
|
}
|
|
666
669
|
|
|
667
|
-
if (this.features) return supportModifyHomescreen(this.features);
|
|
668
|
-
|
|
669
670
|
const deviceType = this.getCurrentDeviceType();
|
|
670
671
|
if (DeviceModelToTypes.model_mini.includes(deviceType)) {
|
|
671
672
|
return { support: true };
|
|
@@ -698,7 +699,7 @@ export class Device extends EventEmitter {
|
|
|
698
699
|
Log.debug(
|
|
699
700
|
'getInternalState session param: ',
|
|
700
701
|
`device_id: ${_deviceId}`,
|
|
701
|
-
`
|
|
702
|
+
`currentDeviceId: ${this.getCurrentDeviceId()}`,
|
|
702
703
|
`hasPassphraseState: ${Boolean(this.passphraseState)}`
|
|
703
704
|
);
|
|
704
705
|
|
|
@@ -749,7 +750,7 @@ export class Device extends EventEmitter {
|
|
|
749
750
|
'setInternalState session param: ',
|
|
750
751
|
`hasState: ${Boolean(state)}`,
|
|
751
752
|
`initSession: ${initSession}`,
|
|
752
|
-
`deviceId: ${this.
|
|
753
|
+
`deviceId: ${this.getCurrentDeviceId()}`,
|
|
753
754
|
`hasPassphraseState: ${Boolean(this.passphraseState)}`
|
|
754
755
|
);
|
|
755
756
|
|
|
@@ -782,7 +783,7 @@ export class Device extends EventEmitter {
|
|
|
782
783
|
if (this.isProtocolV2()) {
|
|
783
784
|
this.passphraseState = options?.passphraseState;
|
|
784
785
|
if (this.state && !options?.initSession && !this.protocolV2StateNeedsReload) {
|
|
785
|
-
if (this.
|
|
786
|
+
if (this.state.status.mode === 'bootloader' || this.state.status.mode === 'romloader') {
|
|
786
787
|
return;
|
|
787
788
|
}
|
|
788
789
|
// Normal calls reuse the cache. Explicit getDeviceState refreshes, unlock flow,
|
|
@@ -1331,20 +1332,17 @@ export class Device extends EventEmitter {
|
|
|
1331
1332
|
break;
|
|
1332
1333
|
}
|
|
1333
1334
|
|
|
1334
|
-
if (this.features?.bootloaderMode) return EOneKeyDeviceMode.bootloader;
|
|
1335
|
-
if (this.features?.initialized === false) return EOneKeyDeviceMode.notInitialized;
|
|
1336
|
-
if (this.features?.noBackup) return EOneKeyDeviceMode.backupMode;
|
|
1337
1335
|
return EOneKeyDeviceMode.normal;
|
|
1338
1336
|
}
|
|
1339
1337
|
|
|
1340
1338
|
getFirmwareVersion() {
|
|
1341
|
-
if (!this.
|
|
1342
|
-
return
|
|
1339
|
+
if (!this.state) return null;
|
|
1340
|
+
return parseDeviceVersion(this.state.versions.firmware);
|
|
1343
1341
|
}
|
|
1344
1342
|
|
|
1345
1343
|
getBLEFirmwareVersion() {
|
|
1346
|
-
if (!this.
|
|
1347
|
-
return
|
|
1344
|
+
if (!this.state) return null;
|
|
1345
|
+
return parseDeviceVersion(this.state.versions.ble);
|
|
1348
1346
|
}
|
|
1349
1347
|
|
|
1350
1348
|
isUsed() {
|
|
@@ -1372,19 +1370,22 @@ export class Device extends EventEmitter {
|
|
|
1372
1370
|
}
|
|
1373
1371
|
|
|
1374
1372
|
isBootloader() {
|
|
1375
|
-
|
|
1373
|
+
if (!this.state) return undefined;
|
|
1374
|
+
return this.state.status.mode === 'bootloader' || this.state.status.mode === 'romloader';
|
|
1376
1375
|
}
|
|
1377
1376
|
|
|
1378
1377
|
isInitialized() {
|
|
1379
|
-
|
|
1378
|
+
if (!this.state) return undefined;
|
|
1379
|
+
return this.state.status.initialized === true;
|
|
1380
1380
|
}
|
|
1381
1381
|
|
|
1382
1382
|
isSeedless() {
|
|
1383
|
-
|
|
1383
|
+
if (!this.state) return undefined;
|
|
1384
|
+
return this.state.status.noBackup === true;
|
|
1384
1385
|
}
|
|
1385
1386
|
|
|
1386
1387
|
isUnacquired(): boolean {
|
|
1387
|
-
return this.
|
|
1388
|
+
return this.state === undefined;
|
|
1388
1389
|
}
|
|
1389
1390
|
|
|
1390
1391
|
hasUnexpectedMode(allow: string[], require: string[]) {
|
|
@@ -1415,7 +1416,7 @@ export class Device extends EventEmitter {
|
|
|
1415
1416
|
deviceType === EDeviceType.Touch ||
|
|
1416
1417
|
deviceType === EDeviceType.Pro ||
|
|
1417
1418
|
deviceType === EDeviceType.Pro2;
|
|
1418
|
-
const unlocked = this.
|
|
1419
|
+
const unlocked = this.state?.status.unlocked;
|
|
1419
1420
|
const preCheckTouch = isModeT && unlocked === false;
|
|
1420
1421
|
const passphraseProtection = this.getCurrentPassphraseProtection();
|
|
1421
1422
|
|
|
@@ -1465,8 +1466,7 @@ export class Device extends EventEmitter {
|
|
|
1465
1466
|
type => this.supportUnlockVersionRange()[type]
|
|
1466
1467
|
);
|
|
1467
1468
|
|
|
1468
|
-
const supportAttachPinCapability =
|
|
1469
|
-
this.features,
|
|
1469
|
+
const supportAttachPinCapability = this.state?.capabilities.includes(
|
|
1470
1470
|
Enum_Capability.Capability_AttachToPin
|
|
1471
1471
|
);
|
|
1472
1472
|
const supportUnlock =
|
|
@@ -1477,7 +1477,7 @@ export class Device extends EventEmitter {
|
|
|
1477
1477
|
|
|
1478
1478
|
if (supportUnlock) {
|
|
1479
1479
|
const res = await this.commands.typedCall('UnLockDevice', 'UnLockDeviceResponse');
|
|
1480
|
-
if (this.
|
|
1480
|
+
if (this.state) {
|
|
1481
1481
|
this.updateState(
|
|
1482
1482
|
{
|
|
1483
1483
|
status: {
|
package/src/index.ts
CHANGED
|
@@ -19,6 +19,11 @@ export * from './types';
|
|
|
19
19
|
export { whitelist, whitelistExtension } from './data/config';
|
|
20
20
|
export { executeCallback, cleanupCallback };
|
|
21
21
|
export { preloadSessionCache } from './device/Device';
|
|
22
|
+
export {
|
|
23
|
+
getFirmwareUpdateHostBindingGeneration,
|
|
24
|
+
registerFirmwareUpdateHostBinding,
|
|
25
|
+
unregisterFirmwareUpdateHostBinding,
|
|
26
|
+
} from './api/firmware/FirmwareHostBinding';
|
|
22
27
|
|
|
23
28
|
const HardwareSdk = ({
|
|
24
29
|
init,
|
package/src/inject.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { getFirmwareUpdateCapabilities } from './api/firmware/FirmwareUpdateCapabilities';
|
|
2
|
+
import {
|
|
3
|
+
prepareFirmwareUpdatePlan,
|
|
4
|
+
validateFirmwareUpdatePreparedPlan,
|
|
5
|
+
} from './api/firmware/FirmwareUpdatePreparedPlan';
|
|
6
|
+
import {
|
|
7
|
+
getFirmwareUpdateHostBindingGeneration,
|
|
8
|
+
registerFirmwareUpdateHostBinding,
|
|
9
|
+
unregisterFirmwareUpdateHostBinding,
|
|
10
|
+
} from './api/firmware/FirmwareHostBinding';
|
|
11
|
+
|
|
2
12
|
import type { EventEmitter } from 'events';
|
|
3
13
|
import type { CallMethod } from './events';
|
|
14
|
+
import type { Unsuccessful } from './types';
|
|
4
15
|
import type { CoreApi } from './types/api';
|
|
5
16
|
import type { AllNetworkAddress } from './types/api/allNetworkGetAddress';
|
|
6
17
|
|
|
@@ -68,7 +79,10 @@ export const inject = ({
|
|
|
68
79
|
|
|
69
80
|
call,
|
|
70
81
|
|
|
71
|
-
dispose
|
|
82
|
+
dispose: async () => {
|
|
83
|
+
unregisterFirmwareUpdateHostBinding();
|
|
84
|
+
await dispose();
|
|
85
|
+
},
|
|
72
86
|
|
|
73
87
|
uiResponse,
|
|
74
88
|
|
|
@@ -99,6 +113,12 @@ export const createCoreApi = (
|
|
|
99
113
|
| 'updateSettings'
|
|
100
114
|
| 'switchTransport'
|
|
101
115
|
> => ({
|
|
116
|
+
getFirmwareUpdateCapabilities,
|
|
117
|
+
registerFirmwareUpdateHostBinding,
|
|
118
|
+
unregisterFirmwareUpdateHostBinding,
|
|
119
|
+
getFirmwareUpdateHostBindingGeneration,
|
|
120
|
+
prepareFirmwareUpdatePlan,
|
|
121
|
+
validateFirmwareUpdatePreparedPlan,
|
|
102
122
|
getLogs: () => call({ method: 'getLogs' }),
|
|
103
123
|
clearSessionCache: params => call({ ...params, method: 'clearSessionCache' }),
|
|
104
124
|
/**
|
package/src/lowLevelInject.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createCoreApi } from './inject';
|
|
2
|
+
import { unregisterFirmwareUpdateHostBinding } from './api/firmware/FirmwareHostBinding';
|
|
2
3
|
|
|
3
4
|
import type { EventEmitter } from 'events';
|
|
4
5
|
import type { CallMethod, CoreMessage } from './events';
|
|
@@ -43,7 +44,10 @@ export const lowLevelInject = ({
|
|
|
43
44
|
|
|
44
45
|
call,
|
|
45
46
|
|
|
46
|
-
dispose
|
|
47
|
+
dispose: async () => {
|
|
48
|
+
unregisterFirmwareUpdateHostBinding();
|
|
49
|
+
await dispose();
|
|
50
|
+
},
|
|
47
51
|
|
|
48
52
|
uiResponse,
|
|
49
53
|
|
|
@@ -24,6 +24,22 @@ type UiInteractionCoordinator = Pick<
|
|
|
24
24
|
'enterMethodInteraction' | 'enterUnlockInteraction' | 'resumeMethodInteraction'
|
|
25
25
|
>;
|
|
26
26
|
|
|
27
|
+
const restoreExpectedWalletSessionAfterUnlock = async (method: RunnableMethod, device: Device) => {
|
|
28
|
+
const expectedPassphraseState = method.payload?.useEmptyPassphrase
|
|
29
|
+
? undefined
|
|
30
|
+
: method.payload?.passphraseState ?? device.passphraseState;
|
|
31
|
+
if (
|
|
32
|
+
!method.useDevicePassphraseState ||
|
|
33
|
+
typeof expectedPassphraseState !== 'string' ||
|
|
34
|
+
expectedPassphraseState.length === 0
|
|
35
|
+
) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
await restoreProtocolV2WalletSession(device, expectedPassphraseState);
|
|
40
|
+
Log.debug('Protocol V2 wallet session restored after unlock', { method: method.name });
|
|
41
|
+
};
|
|
42
|
+
|
|
27
43
|
export async function runMethodWithUnlockRetry(
|
|
28
44
|
method: RunnableMethod,
|
|
29
45
|
device: Device,
|
|
@@ -39,6 +55,7 @@ export async function runMethodWithUnlockRetry(
|
|
|
39
55
|
}
|
|
40
56
|
await device.unlockDevice();
|
|
41
57
|
Log.debug('Protocol V2 pre-unlock completed', { method: method.name });
|
|
58
|
+
await restoreExpectedWalletSessionAfterUnlock(method, device);
|
|
42
59
|
if (shouldEmitUi) {
|
|
43
60
|
uiCoordinator?.enterMethodInteraction(resolveProtocolV2UiInteraction(method));
|
|
44
61
|
}
|
|
@@ -65,17 +82,7 @@ export async function runMethodWithUnlockRetry(
|
|
|
65
82
|
}
|
|
66
83
|
await device.unlockDevice();
|
|
67
84
|
Log.debug('Protocol V2 unlock completed', { method: method.name });
|
|
68
|
-
|
|
69
|
-
? undefined
|
|
70
|
-
: method.payload?.passphraseState ?? device.passphraseState;
|
|
71
|
-
if (
|
|
72
|
-
method.useDevicePassphraseState &&
|
|
73
|
-
typeof expectedPassphraseState === 'string' &&
|
|
74
|
-
expectedPassphraseState.length > 0
|
|
75
|
-
) {
|
|
76
|
-
await restoreProtocolV2WalletSession(device, expectedPassphraseState);
|
|
77
|
-
Log.debug('Protocol V2 wallet session restored after unlock', { method: method.name });
|
|
78
|
-
}
|
|
85
|
+
await restoreExpectedWalletSessionAfterUnlock(method, device);
|
|
79
86
|
if (shouldEmitUi) {
|
|
80
87
|
uiCoordinator?.resumeMethodInteraction();
|
|
81
88
|
}
|
package/src/topLevelInject.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import EventEmitter from 'events';
|
|
2
2
|
|
|
3
3
|
import { createCoreApi } from './inject';
|
|
4
|
+
import { unregisterFirmwareUpdateHostBinding } from './api/firmware/FirmwareHostBinding';
|
|
4
5
|
|
|
5
6
|
import type { ConnectSettings } from './types/settings';
|
|
6
7
|
import type { CoreApi } from './types/api';
|
|
@@ -46,7 +47,10 @@ export const topLevelInject = () => {
|
|
|
46
47
|
lowLevelApi?.removeAllListeners(type);
|
|
47
48
|
},
|
|
48
49
|
|
|
49
|
-
dispose: () =>
|
|
50
|
+
dispose: async () => {
|
|
51
|
+
unregisterFirmwareUpdateHostBinding();
|
|
52
|
+
await lowLevelApi?.dispose();
|
|
53
|
+
},
|
|
50
54
|
|
|
51
55
|
uiResponse: response => lowLevelApi?.uiResponse(response),
|
|
52
56
|
|
|
@@ -2,6 +2,7 @@ import type { IBLEFirmwareReleaseInfo } from '../settings';
|
|
|
2
2
|
import type { EFirmwareType } from '@onekeyfe/hd-shared';
|
|
3
3
|
import type { CommonParams, Response } from '../params';
|
|
4
4
|
import type { Features, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus } from '../device';
|
|
5
|
+
import type { FirmwareUpdatePlan } from './firmwareUpdatePlan';
|
|
5
6
|
|
|
6
7
|
export type FirmwareRelease = {
|
|
7
8
|
shouldUpdate?: boolean;
|
|
@@ -20,11 +21,13 @@ export type AllFirmwareRelease = {
|
|
|
20
21
|
bootloader?: FirmwareRelease;
|
|
21
22
|
bridge?: FirmwareRelease;
|
|
22
23
|
features?: Features;
|
|
24
|
+
firmwareUpdatePlan?: FirmwareUpdatePlan;
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
export type CheckAllFirmwareReleaseParams = {
|
|
26
28
|
checkBridgeRelease?: boolean;
|
|
27
29
|
firmwareType?: EFirmwareType;
|
|
30
|
+
platform?: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
28
31
|
};
|
|
29
32
|
|
|
30
33
|
export declare function checkAllFirmwareRelease(
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import type { Success } from '@onekeyfe/hd-transport';
|
|
2
2
|
import type { EFirmwareType } from '@onekeyfe/hd-shared';
|
|
3
|
+
import type { FirmwareArtifactReader, FirmwareArtifactReference } from './firmwareUpdate';
|
|
4
|
+
import type { FirmwareUpdatePreparedPlan } from './firmwareUpdatePreparedPlan';
|
|
3
5
|
import type { Response } from '../params';
|
|
4
6
|
|
|
5
7
|
export type DeviceUpdateBootloaderParams = {
|
|
8
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
9
|
+
hostBindingGeneration?: number;
|
|
6
10
|
binary?: ArrayBuffer;
|
|
11
|
+
artifact?: FirmwareArtifactReference;
|
|
12
|
+
artifactReader?: FirmwareArtifactReader;
|
|
7
13
|
firmwareType?: EFirmwareType;
|
|
8
14
|
};
|
|
9
15
|
|
package/src/types/api/export.ts
CHANGED
|
@@ -25,11 +25,29 @@ export type {
|
|
|
25
25
|
DeviceUploadResourceResponse,
|
|
26
26
|
} from './deviceUploadResource';
|
|
27
27
|
export type {
|
|
28
|
+
FirmwareArtifactReader,
|
|
29
|
+
FirmwareArtifactReference,
|
|
30
|
+
FirmwareUpdateHostBinding,
|
|
31
|
+
FirmwareUpdateArtifactParams,
|
|
28
32
|
FirmwareUpdateParams,
|
|
29
33
|
FirmwareUpdateBinaryParams,
|
|
30
34
|
FirmwareUpdateV3Params,
|
|
31
35
|
FirmwareUpdateV4Params,
|
|
36
|
+
FirmwareUpdateV4Target,
|
|
32
37
|
} from './firmwareUpdate';
|
|
38
|
+
export type {
|
|
39
|
+
FirmwareUpdatePlan,
|
|
40
|
+
FirmwareUpdatePlanArtifact,
|
|
41
|
+
FirmwareUpdatePlanArtifactRole,
|
|
42
|
+
FirmwareUpdatePlanTarget,
|
|
43
|
+
} from './firmwareUpdatePlan';
|
|
44
|
+
export type {
|
|
45
|
+
FirmwareUpdatePreparedArtifact,
|
|
46
|
+
FirmwareUpdatePreparedArtifactInput,
|
|
47
|
+
FirmwareUpdatePreparedEntry,
|
|
48
|
+
FirmwareUpdatePreparedPlan,
|
|
49
|
+
} from './firmwareUpdatePreparedPlan';
|
|
50
|
+
export type { FirmwareUpdateCapabilities } from './firmwareUpdateCapabilities';
|
|
33
51
|
export type { AllFirmwareRelease } from './checkAllFirmwareRelease';
|
|
34
52
|
|
|
35
53
|
export type { AllNetworkAddressParams, AllNetworkGetAddressParams } from './allNetworkGetAddress';
|
|
@@ -161,6 +179,8 @@ export type {
|
|
|
161
179
|
KaspaSignTransactionParams,
|
|
162
180
|
KaspaSignInputParams,
|
|
163
181
|
KaspaSignOutputParams,
|
|
182
|
+
KaspaStreamingSignInputParams,
|
|
183
|
+
KaspaStreamingSignOutputParams,
|
|
164
184
|
} from './kaspaSignTransaction';
|
|
165
185
|
|
|
166
186
|
export type { NexaAddress, NexaGetAddressParams } from './nexaGetAddress';
|
|
@@ -1,14 +1,53 @@
|
|
|
1
1
|
import type { EFirmwareType } from '@onekeyfe/hd-shared';
|
|
2
2
|
import type { PROTO } from '../../constants';
|
|
3
3
|
import type { Params, Response } from '../params';
|
|
4
|
+
import type { FirmwareUpdatePreparedPlan } from './firmwareUpdatePreparedPlan';
|
|
4
5
|
|
|
5
6
|
type IUpdateType = 'firmware' | 'ble';
|
|
6
7
|
|
|
8
|
+
export interface FirmwareArtifactReference {
|
|
9
|
+
artifactRef: string;
|
|
10
|
+
size: number;
|
|
11
|
+
sha256: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface FirmwareArtifactReader {
|
|
15
|
+
open(input: { artifactRef: string }): Promise<{
|
|
16
|
+
readerId: string;
|
|
17
|
+
size: number;
|
|
18
|
+
}>;
|
|
19
|
+
read(input: { readerId: string; offset: number; length: number }): Promise<{
|
|
20
|
+
data: ArrayBuffer;
|
|
21
|
+
bytesRead: number;
|
|
22
|
+
eof: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
close(input: { readerId: string }): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface FirmwareUpdateHostBinding {
|
|
28
|
+
artifactReader: FirmwareArtifactReader;
|
|
29
|
+
}
|
|
30
|
+
|
|
7
31
|
export interface FirmwareUpdateBinaryParams {
|
|
8
32
|
binary: ArrayBuffer;
|
|
9
33
|
updateType: IUpdateType;
|
|
10
34
|
}
|
|
11
35
|
|
|
36
|
+
export interface FirmwareUpdateArtifactParams {
|
|
37
|
+
preparedPlan: FirmwareUpdatePreparedPlan;
|
|
38
|
+
hostBindingGeneration: number;
|
|
39
|
+
artifact: FirmwareArtifactReference;
|
|
40
|
+
resourceArtifact?: FirmwareArtifactReference;
|
|
41
|
+
resourceEntries?: Array<{
|
|
42
|
+
entryName: string;
|
|
43
|
+
artifact: FirmwareArtifactReference;
|
|
44
|
+
}>;
|
|
45
|
+
updateType: IUpdateType;
|
|
46
|
+
forcedUpdateRes?: boolean;
|
|
47
|
+
isUpdateBootloader?: boolean;
|
|
48
|
+
firmwareType?: EFirmwareType;
|
|
49
|
+
}
|
|
50
|
+
|
|
12
51
|
export interface FirmwareUpdateParams {
|
|
13
52
|
version?: number[];
|
|
14
53
|
updateType: IUpdateType;
|
|
@@ -37,8 +76,14 @@ export declare function firmwareUpdateV2(
|
|
|
37
76
|
connectId: string | undefined,
|
|
38
77
|
params: Params<FirmwareUpdateBinaryParams & Platform>
|
|
39
78
|
): Response<PROTO.Success>;
|
|
79
|
+
export declare function firmwareUpdateV2(
|
|
80
|
+
connectId: string | undefined,
|
|
81
|
+
params: Params<FirmwareUpdateArtifactParams & Platform>
|
|
82
|
+
): Response<PROTO.Success>;
|
|
40
83
|
|
|
41
84
|
export interface FirmwareUpdateV3Params {
|
|
85
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
86
|
+
hostBindingGeneration?: number;
|
|
42
87
|
bleVersion?: number[];
|
|
43
88
|
bleBinary?: ArrayBuffer;
|
|
44
89
|
chunkSize?: number;
|
|
@@ -55,6 +100,17 @@ export interface FirmwareUpdateV3Params {
|
|
|
55
100
|
firmwareType?: EFirmwareType;
|
|
56
101
|
|
|
57
102
|
platform: IPlatform;
|
|
103
|
+
|
|
104
|
+
artifactReader?: FirmwareArtifactReader;
|
|
105
|
+
artifacts?: {
|
|
106
|
+
ble?: FirmwareArtifactReference;
|
|
107
|
+
firmware?: FirmwareArtifactReference;
|
|
108
|
+
bootloader?: FirmwareArtifactReference;
|
|
109
|
+
resourceEntries?: Array<{
|
|
110
|
+
entryName: string;
|
|
111
|
+
artifact: FirmwareArtifactReference;
|
|
112
|
+
}>;
|
|
113
|
+
};
|
|
58
114
|
}
|
|
59
115
|
|
|
60
116
|
/**
|
|
@@ -73,10 +129,14 @@ export type FirmwareUpdateV4Target =
|
|
|
73
129
|
| 'se04';
|
|
74
130
|
|
|
75
131
|
export interface FirmwareUpdateV4Params {
|
|
132
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
133
|
+
hostBindingGeneration?: number;
|
|
76
134
|
platform: IPlatform;
|
|
135
|
+
expectedDeviceId?: string;
|
|
77
136
|
chunkSize?: number;
|
|
78
137
|
firmwareType?: EFirmwareType;
|
|
79
138
|
targetsToUpdate?: FirmwareUpdateV4Target[];
|
|
139
|
+
expectedTargetVersions?: Partial<Record<FirmwareUpdateV4Target, string>>;
|
|
80
140
|
|
|
81
141
|
/** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
|
|
82
142
|
romloaderBinary?: ArrayBuffer;
|
|
@@ -102,8 +162,24 @@ export interface FirmwareUpdateV4Params {
|
|
|
102
162
|
binary: ArrayBuffer;
|
|
103
163
|
devicePath: string;
|
|
104
164
|
}>;
|
|
165
|
+
artifactReader?: FirmwareArtifactReader;
|
|
166
|
+
componentArtifacts?: Partial<
|
|
167
|
+
Record<Exclude<FirmwareUpdateV4Target, 'resource'>, FirmwareArtifactReference>
|
|
168
|
+
>;
|
|
169
|
+
resourceBundleArtifacts?: Array<{
|
|
170
|
+
name: string;
|
|
171
|
+
artifact: FirmwareArtifactReference;
|
|
172
|
+
}>;
|
|
105
173
|
}
|
|
106
174
|
|
|
175
|
+
export declare function registerFirmwareUpdateHostBinding(
|
|
176
|
+
binding: FirmwareUpdateHostBinding
|
|
177
|
+
): number;
|
|
178
|
+
|
|
179
|
+
export declare function unregisterFirmwareUpdateHostBinding(generation?: number): boolean;
|
|
180
|
+
|
|
181
|
+
export declare function getFirmwareUpdateHostBindingGeneration(): number;
|
|
182
|
+
|
|
107
183
|
export declare function firmwareUpdateV3(
|
|
108
184
|
connectId: string | undefined,
|
|
109
185
|
params: Params<FirmwareUpdateV3Params>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface FirmwareUpdateCapabilities {
|
|
2
|
+
planSchemaVersion: 2;
|
|
3
|
+
preparedPlanSchemaVersion: 2;
|
|
4
|
+
hostBindingProtocolVersion: 2;
|
|
5
|
+
manifestModes: Array<'external-only' | 'sdk-managed'>;
|
|
6
|
+
supportsArtifactReader: true;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export declare function getFirmwareUpdateCapabilities(): FirmwareUpdateCapabilities;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { FirmwareUpdateV4Target } from './firmwareUpdate';
|
|
2
|
+
import type { EFirmwareType } from '@onekeyfe/hd-shared';
|
|
3
|
+
|
|
4
|
+
export type FirmwareUpdatePlanArtifactRole =
|
|
5
|
+
| 'firmware'
|
|
6
|
+
| 'ble'
|
|
7
|
+
| 'bootloader'
|
|
8
|
+
| 'resource'
|
|
9
|
+
| 'component'
|
|
10
|
+
| 'resourceBundle';
|
|
11
|
+
|
|
12
|
+
export type FirmwareUpdatePlanTarget = 'firmware' | 'ble' | 'bootloader' | FirmwareUpdateV4Target;
|
|
13
|
+
|
|
14
|
+
export interface FirmwareUpdatePlanArtifact {
|
|
15
|
+
artifactId: string;
|
|
16
|
+
role: FirmwareUpdatePlanArtifactRole;
|
|
17
|
+
target: FirmwareUpdatePlanTarget;
|
|
18
|
+
url: string;
|
|
19
|
+
container: 'raw' | 'zip';
|
|
20
|
+
logicalName?: string;
|
|
21
|
+
expectedSize?: number;
|
|
22
|
+
expectedSha256?: string;
|
|
23
|
+
targetVersion?: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface FirmwareUpdatePlan {
|
|
27
|
+
schemaVersion: 2;
|
|
28
|
+
planDigest: string;
|
|
29
|
+
executor: 'v2' | 'v3' | 'v4';
|
|
30
|
+
deviceIdentity: string;
|
|
31
|
+
deviceModel: string;
|
|
32
|
+
firmwareType: EFirmwareType;
|
|
33
|
+
platform: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
34
|
+
artifacts: FirmwareUpdatePlanArtifact[];
|
|
35
|
+
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
36
|
+
}
|