@onekeyfe/hd-core 1.2.0-alpha.6 → 1.2.0-alpha.63
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 +517 -0
- package/__tests__/DeviceEventRegistration.test.ts +43 -0
- package/__tests__/chain-params-onekey-compatibility.test.ts +229 -0
- package/__tests__/check-all-firmware-release-protocol-v2.test.ts +282 -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-initialize-timeout.test.ts +56 -0
- package/__tests__/device-lifecycle-events.test.ts +249 -0
- package/__tests__/device-pool-state.test.ts +144 -0
- package/__tests__/device-settings.test.ts +416 -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 +261 -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 +107 -0
- package/__tests__/device-wallet-session-store.test.ts +478 -0
- package/__tests__/deviceFeaturesUtils.test.ts +39 -0
- package/__tests__/deviceSettings.test.ts +103 -0
- package/__tests__/evmLedgerLegacySafety.test.ts +12 -6
- package/__tests__/evmSignTransaction.test.ts +69 -0
- package/__tests__/evmSignTypedData.test.ts +80 -0
- package/__tests__/filesystemValidation.test.ts +53 -0
- package/__tests__/firmware-update/check-all-firmware-release.test.ts +175 -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-bootloader-poll.test.ts +200 -0
- package/__tests__/firmware-update/firmware-update-capabilities.test.ts +13 -0
- package/__tests__/firmware-update/firmware-update-plan-bootloader-identity.test.ts +394 -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-update-v3-reconnect.test.ts +58 -0
- package/__tests__/firmware-update/firmware-upload-source.test.ts +70 -0
- package/__tests__/get-device-state.test.ts +458 -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 +601 -0
- package/__tests__/known-device-public-types.type-test.ts +3 -0
- package/__tests__/logBlockEvent.test.ts +128 -1
- package/__tests__/method-protocol-support.test.ts +113 -0
- package/__tests__/networkUtils.test.ts +406 -0
- package/__tests__/open-wallet-session-error-response.test.ts +43 -0
- package/__tests__/open-wallet-session.test.ts +1368 -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 +37 -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 +6058 -2525
- package/__tests__/protocolV2FileWrite.test.ts +92 -0
- package/__tests__/protocolV2UiInteraction.test.ts +266 -0
- package/__tests__/public-device-state-api.test.ts +275 -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 +24 -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 +40 -16
- 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/evm/protocol.d.ts +3 -0
- package/dist/api/evm/protocol.d.ts.map +1 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts +1 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -1
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts +1 -0
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareArtifactSource.d.ts +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 +32 -0
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -0
- package/dist/api/firmware/getBinary.d.ts +15 -4
- 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/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 +7 -25
- 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 +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts +1 -1
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceReboot.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts +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 +1 -0
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -1
- package/dist/api/protocol-v2/Ping.d.ts +3 -0
- package/dist/api/protocol-v2/Ping.d.ts.map +1 -1
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +1 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -1
- package/dist/api/protocol-v2/helpers.d.ts +1 -1
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
- package/dist/api/solana/SolGetAddress.d.ts +1 -0
- package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
- package/dist/api/solana/SolSignMessage.d.ts +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/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 +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 +45 -14
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +8 -6
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DeviceConnector.d.ts +1 -1
- package/dist/device/DeviceConnector.d.ts.map +1 -1
- package/dist/device/DeviceFeaturesState.d.ts +3 -0
- package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
- package/dist/device/DevicePool.d.ts +5 -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 +27 -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/deviceProfile/protocolV2DeviceIdentity.d.ts +7 -0
- package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts.map +1 -0
- package/dist/events/device.d.ts +12 -2
- package/dist/events/device.d.ts.map +1 -1
- package/dist/events/logBlockEvent.d.ts +2 -0
- package/dist/events/logBlockEvent.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +19 -2
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +1564 -739
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9262 -3918
- 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 +25 -17
- package/dist/protocols/protocol-v2/features.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 +17 -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 +22 -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 +29 -4
- 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 +6 -2
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +75 -1
- 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 +27 -31
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/kaspaSignTransaction.d.ts +42 -4
- package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
- package/dist/types/api/openWalletSession.d.ts +35 -0
- package/dist/types/api/openWalletSession.d.ts.map +1 -0
- package/dist/types/api/protocolV2.d.ts +15 -84
- 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 +132 -8
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/params.d.ts.map +1 -1
- package/dist/types/settings.d.ts +20 -14
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/assets.d.ts +2 -1
- package/dist/utils/assets.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesCompat.d.ts +14 -0
- package/dist/utils/deviceFeaturesCompat.d.ts.map +1 -0
- package/dist/utils/deviceFeaturesUtils.d.ts +6 -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 +10 -1
- package/dist/utils/networkUtils.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/dist/utils/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 +344 -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 +15 -9
- package/src/api/FileWrite.ts +26 -181
- package/src/api/FirmwareUpdate.ts +24 -13
- package/src/api/FirmwareUpdateV2.ts +386 -113
- package/src/api/FirmwareUpdateV3.ts +266 -68
- package/src/api/FirmwareUpdateV4.ts +1222 -635
- 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 +30 -21
- package/src/api/OpenWalletSession.ts +214 -0
- package/src/api/PathInfo.ts +9 -4
- package/src/api/PromptWebDeviceAccess.ts +2 -7
- 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 +5 -0
- package/src/api/device/DeviceRebootToBootloader.ts +5 -0
- package/src/api/device/DeviceSettings.ts +194 -1
- package/src/api/device/DeviceSupportFeatures.ts +4 -0
- package/src/api/device/DeviceUnlock.ts +13 -0
- package/src/api/device/DeviceUpdateBootloader.ts +126 -8
- package/src/api/device/DeviceWipe.ts +25 -0
- package/src/api/device/PreInitialize.ts +4 -0
- package/src/api/dynex/DnxGetAddress.ts +0 -6
- package/src/api/dynex/DnxSignTransaction.ts +0 -6
- package/src/api/evm/EVMGetAddress.ts +6 -2
- package/src/api/evm/EVMGetPublicKey.ts +6 -2
- package/src/api/evm/EVMSignMessage.ts +6 -2
- package/src/api/evm/EVMSignMessageEIP712.ts +1 -11
- package/src/api/evm/EVMSignTransaction.ts +6 -2
- package/src/api/evm/EVMSignTypedData.ts +42 -50
- package/src/api/evm/EVMVerifyMessage.ts +6 -2
- package/src/api/evm/legacyV1/getAddress.ts +2 -2
- package/src/api/evm/legacyV1/getPublicKey.ts +2 -2
- package/src/api/evm/legacyV1/signMessage.ts +2 -2
- package/src/api/evm/legacyV1/signTypedData.ts +2 -2
- package/src/api/evm/legacyV1/signTypedHash.ts +2 -2
- package/src/api/evm/legacyV1/verifyMessage.ts +2 -2
- package/src/api/evm/protocol.ts +6 -0
- package/src/api/filecoin/FilecoinGetAddress.ts +4 -0
- package/src/api/filecoin/FilecoinSignTransaction.ts +4 -0
- package/src/api/firmware/FirmwareArtifactSource.ts +278 -0
- package/src/api/firmware/FirmwareHostBinding.ts +100 -0
- package/src/api/firmware/FirmwarePreparationError.ts +12 -0
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +75 -4
- package/src/api/firmware/FirmwareUpdateCapabilities.ts +9 -0
- package/src/api/firmware/FirmwareUpdatePlan.ts +772 -0
- package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +449 -0
- package/src/api/firmware/getBinary.ts +8 -3
- 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 +8 -26
- package/src/api/kaspa/KaspaGetAddress.ts +7 -0
- package/src/api/kaspa/KaspaSignTransaction.ts +380 -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/DeviceFactoryInfoGet.ts +5 -2
- package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +5 -2
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +8 -5
- package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +10 -6
- package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +21 -0
- package/src/api/protocol-v2/DeviceInfoGet.ts +8 -15
- package/src/api/protocol-v2/DeviceReboot.ts +7 -3
- package/src/api/protocol-v2/DeviceStatusGet.ts +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/FilesystemPermissionFix.ts +5 -2
- package/src/api/protocol-v2/Ping.ts +37 -3
- package/src/api/protocol-v2/ProtocolInfoRequest.ts +5 -2
- package/src/api/protocol-v2/helpers.ts +17 -17
- 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/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 +164 -53
- package/src/data/messages/messages-protocol-v2.json +1155 -483
- package/src/data/messages/messages.json +286 -1
- package/src/data-manager/DataManager.ts +39 -39
- package/src/data-manager/TransportManager.ts +1 -1
- package/src/data-manager/connectSettings.ts +15 -0
- package/src/device/Device.ts +652 -281
- package/src/device/DeviceCommands.ts +166 -158
- package/src/device/DeviceConnector.ts +10 -7
- package/src/device/DeviceFeaturesState.ts +25 -0
- package/src/device/DevicePool.ts +66 -16
- package/src/device/DeviceStateMapper.ts +374 -0
- package/src/device/DeviceStateProjector.ts +94 -0
- package/src/device/DeviceStateStore.ts +201 -0
- package/src/device/DeviceWalletSessionStore.ts +144 -0
- package/src/device/cloneDeviceState.ts +39 -0
- package/src/device/deviceIdentity.ts +18 -0
- package/src/deviceProfile/buildDeviceFeatures.ts +224 -190
- package/src/deviceProfile/index.ts +0 -1
- package/src/deviceProfile/protocolV2DeviceIdentity.ts +32 -0
- package/src/events/device.ts +18 -1
- package/src/events/logBlockEvent.ts +79 -2
- package/src/events/ui-request.ts +25 -2
- package/src/index.ts +5 -0
- package/src/inject.ts +37 -43
- package/src/lowLevelInject.ts +5 -1
- package/src/protocols/protocol-v2/deviceSession.ts +24 -0
- package/src/protocols/protocol-v2/features.ts +96 -32
- package/src/protocols/protocol-v2/firmware.ts +1 -1
- package/src/protocols/protocol-v2/index.ts +8 -1
- package/src/protocols/protocol-v2/lockedError.ts +10 -0
- package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +65 -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 +109 -0
- package/src/protocols/protocol-v2/walletSession.ts +285 -0
- package/src/topLevelInject.ts +5 -1
- package/src/types/api/checkAllFirmwareRelease.ts +50 -4
- 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 +26 -0
- package/src/types/api/firmwareUpdate.ts +99 -5
- 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 +39 -64
- package/src/types/api/kaspaSignTransaction.ts +60 -4
- package/src/types/api/openWalletSession.ts +54 -0
- package/src/types/api/protocolV2.ts +24 -145
- package/src/types/api/sessionCache.ts +19 -0
- package/src/types/device.ts +185 -7
- package/src/types/params.ts +3 -2
- package/src/types/settings.ts +30 -16
- package/src/utils/assets.ts +4 -1
- package/src/utils/deviceFeaturesCompat.ts +186 -0
- package/src/utils/deviceFeaturesUtils.ts +52 -45
- 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 +274 -16
- package/src/utils/pro2Wallpaper.ts +103 -0
- package/src/utils/tracing.ts +3 -1
- package/tsconfig.type-tests.json +12 -0
- package/dist/api/GetDeviceInfo.d.ts +0 -9
- package/dist/api/GetDeviceInfo.d.ts.map +0 -1
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +0 -13
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +0 -1
- package/dist/deviceProfile/buildDeviceProfile.d.ts +0 -21
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
- package/dist/types/api/getDeviceInfo.d.ts +0 -87
- package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
- package/src/api/GetDeviceInfo.ts +0 -145
- package/src/api/protocol-v2/FilesystemDiskControl.ts +0 -50
- package/src/deviceProfile/buildDeviceProfile.ts +0 -352
- package/src/types/api/getDeviceInfo.ts +0 -101
package/dist/index.d.ts
CHANGED
|
@@ -1,24 +1,65 @@
|
|
|
1
1
|
import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
|
|
2
|
-
import
|
|
2
|
+
import * as _onekeyfe_hd_transport from '@onekeyfe/hd-transport';
|
|
3
|
+
import { DeviceRebootType, Messages, Transport, TransportCallOptions, OneKeyDeviceCommType, ProtocolInfo, ProtocolV2DeviceInfo, DeviceStatus as DeviceStatus$1, Enum_SafetyCheckLevel, OneKeyDeviceInfo, Success as Success$1, DeviceSessionPinType, LowlevelTransportSharedPlugin, OnboardingStatus, RecoveryDeviceType, ResourceType, NextU2FCounter, SetU2FCounter, CipheredKeyValue as CipheredKeyValue$1, UintType, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, SignedPsbt, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, SolanaTxExtraInfo, SolanaOffChainMessageVersion, SolanaOffChainMessageFormat, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, TronResourceCode, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, SuiMessageSignature, CardanoAddressParametersType, CardanoMessageSignature, FilecoinAddress as FilecoinAddress$1, FilecoinSignedTx as FilecoinSignedTx$1, PolkadotAddress as PolkadotAddress$1, PolkadotSignedTx as PolkadotSignedTx$1, KaspaAddress as KaspaAddress$1, NervosAddress as NervosAddress$1, NervosSignedTx as NervosSignedTx$1, DnxAddress as DnxAddress$1, TonWalletVersion, TonWorkChain, TonSignedMessage, TonSignedProof, TonSignDataType, TonSignedData, ScdoAddress as ScdoAddress$1, ScdoSignedMessage, ScdoSignedTx as ScdoSignedTx$1, AlephiumMessageSignature, AlephiumSignedTx as AlephiumSignedTx$1, BenfenAddress as BenfenAddress$1, BenfenMessageSignature, SafetyCheckLevel, ChangeOutputScriptType } from '@onekeyfe/hd-transport';
|
|
3
4
|
export { Success as DeviceSuccess, HDNodeType, Messages as PROTO, ResourceType, TonSignDataType, TonWalletVersion } from '@onekeyfe/hd-transport';
|
|
4
5
|
import * as _onekeyfe_hd_shared from '@onekeyfe/hd-shared';
|
|
5
|
-
import { HardwareConnectProtocol,
|
|
6
|
+
import { HardwareConnectProtocol, EFirmwareType, EDeviceType, Deferred } from '@onekeyfe/hd-shared';
|
|
6
7
|
|
|
7
8
|
interface CommonParams {
|
|
8
9
|
keepSession?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* polling connect max retry count
|
|
12
|
+
*/
|
|
9
13
|
retryCount?: number;
|
|
14
|
+
/**
|
|
15
|
+
* polling interval time
|
|
16
|
+
*/
|
|
10
17
|
pollIntervalTime?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Timeout time for single polling
|
|
20
|
+
*/
|
|
11
21
|
timeout?: number;
|
|
22
|
+
/**
|
|
23
|
+
* DeviceInfoGet timeout during Protocol V2 initialization.
|
|
24
|
+
*/
|
|
12
25
|
protocolV2DeviceInfoTimeoutMs?: number;
|
|
26
|
+
/**
|
|
27
|
+
* passphrase state
|
|
28
|
+
*/
|
|
13
29
|
passphraseState?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Use empty passphrase
|
|
32
|
+
*/
|
|
14
33
|
useEmptyPassphrase?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Every init session
|
|
36
|
+
*/
|
|
15
37
|
initSession?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Use derive cardano
|
|
40
|
+
*/
|
|
16
41
|
deriveCardano?: boolean;
|
|
17
42
|
detectBootloaderDevice?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Skip web device prompt
|
|
45
|
+
*/
|
|
18
46
|
skipWebDevicePrompt?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Skip passphrase check
|
|
49
|
+
*/
|
|
19
50
|
skipPassphraseCheck?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Only connect device, not initialize device, only ble connect
|
|
53
|
+
*/
|
|
20
54
|
onlyConnectBleDevice?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Use pre-initialized device state (BLE only)
|
|
57
|
+
*/
|
|
21
58
|
usePreInitialize?: boolean;
|
|
59
|
+
/**
|
|
60
|
+
* Strictly expected transport protocol. The SDK actively verifies this value and
|
|
61
|
+
* rejects a mismatch. If omitted, a cached protocol only influences probe order.
|
|
62
|
+
*/
|
|
22
63
|
connectProtocol?: HardwareConnectProtocol;
|
|
23
64
|
}
|
|
24
65
|
type Params<T> = CommonParams & T & {
|
|
@@ -44,34 +85,6 @@ type DeviceRebootParams = {
|
|
|
44
85
|
rebootType?: RebootTypeInput;
|
|
45
86
|
reboot_type?: RebootTypeInput;
|
|
46
87
|
};
|
|
47
|
-
type DeviceFirmwareTargetInput = DeviceFirmwareTarget | {
|
|
48
|
-
targetId?: DeviceFirmwareTargetType | string | number;
|
|
49
|
-
target_id?: DeviceFirmwareTargetType | string | number;
|
|
50
|
-
path: string;
|
|
51
|
-
};
|
|
52
|
-
type DeviceFirmwareUpdateParams = {
|
|
53
|
-
targets?: DeviceFirmwareTargetInput[];
|
|
54
|
-
targetId?: DeviceFirmwareTargetType | string | number;
|
|
55
|
-
target_id?: DeviceFirmwareTargetType | string | number;
|
|
56
|
-
path?: string;
|
|
57
|
-
};
|
|
58
|
-
type DeviceFirmwareUpdateStatusGetParams = {
|
|
59
|
-
fields?: DeviceFirmwareUpdateRecordFields;
|
|
60
|
-
};
|
|
61
|
-
type DeviceFactoryInfoSetParams = {
|
|
62
|
-
version?: number;
|
|
63
|
-
serial_number?: string;
|
|
64
|
-
burn_in_completed?: boolean;
|
|
65
|
-
factory_test_completed?: boolean;
|
|
66
|
-
manufacture_time?: {
|
|
67
|
-
year: number;
|
|
68
|
-
month: number;
|
|
69
|
-
day: number;
|
|
70
|
-
hour: number;
|
|
71
|
-
minute: number;
|
|
72
|
-
second: number;
|
|
73
|
-
};
|
|
74
|
-
};
|
|
75
88
|
|
|
76
89
|
type PassphrasePromptResponse = {
|
|
77
90
|
passphrase?: string;
|
|
@@ -89,15 +102,19 @@ type TypedCallResponseMap = {
|
|
|
89
102
|
[K in MessageKey]: TypedResponseMessage<K>;
|
|
90
103
|
};
|
|
91
104
|
type DefaultMessageResponse = TypedCallResponseMap[MessageKey];
|
|
105
|
+
/**
|
|
106
|
+
* The life cycle begins with the acquisition of the device and ends with the disposal device commands
|
|
107
|
+
* acquire device -> create DeviceCommands -> release device -> dispose DeviceCommands
|
|
108
|
+
*/
|
|
92
109
|
declare class DeviceCommands {
|
|
93
110
|
instanceId: string;
|
|
94
111
|
currentResponseID?: number;
|
|
95
|
-
device: Device
|
|
112
|
+
device: Device;
|
|
96
113
|
transport: Transport;
|
|
97
114
|
mainId: string;
|
|
98
115
|
disposed: boolean;
|
|
99
116
|
callPromise?: Promise<DefaultMessageResponse>;
|
|
100
|
-
constructor(device: Device
|
|
117
|
+
constructor(device: Device, mainId: string);
|
|
101
118
|
dispose(_cancelRequest: boolean): Promise<void>;
|
|
102
119
|
checkDisposed(): void;
|
|
103
120
|
cancelDeviceOnOneKeyDevice(): Promise<{
|
|
@@ -114,7 +131,7 @@ declare class DeviceCommands {
|
|
|
114
131
|
};
|
|
115
132
|
} | {
|
|
116
133
|
success: boolean;
|
|
117
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 900 | 901 | 902;
|
|
134
|
+
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;
|
|
118
135
|
payload: {
|
|
119
136
|
message: string;
|
|
120
137
|
};
|
|
@@ -133,7 +150,7 @@ declare class DeviceCommands {
|
|
|
133
150
|
};
|
|
134
151
|
} | {
|
|
135
152
|
success: boolean;
|
|
136
|
-
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 822 | 823 | 824 | 825 | 826 | 827 | 828 | 900 | 901 | 902;
|
|
153
|
+
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;
|
|
137
154
|
payload: {
|
|
138
155
|
message: string;
|
|
139
156
|
};
|
|
@@ -145,389 +162,188 @@ declare class DeviceCommands {
|
|
|
145
162
|
_commonCall(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
146
163
|
_filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey, options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
147
164
|
_promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
|
|
148
|
-
|
|
165
|
+
promptPassphrase(options: PassphraseRequestPayload, promptOptions?: {
|
|
166
|
+
cancelDeviceOnReject?: boolean;
|
|
167
|
+
}): Promise<PassphrasePromptResponse>;
|
|
149
168
|
}
|
|
150
169
|
|
|
151
|
-
type
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
170
|
+
type ProtocolV2RuntimeMode = 'normal' | 'bootloader' | 'romloader';
|
|
171
|
+
|
|
172
|
+
type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
|
|
173
|
+
type ConnectSettings = {
|
|
174
|
+
connectSrc?: string;
|
|
175
|
+
debug?: boolean;
|
|
176
|
+
transportReconnect?: boolean;
|
|
177
|
+
lazyLoad?: boolean;
|
|
178
|
+
origin?: string;
|
|
179
|
+
parentOrigin?: string;
|
|
180
|
+
configSrc: string;
|
|
181
|
+
iframeSrc: string;
|
|
182
|
+
version: string;
|
|
183
|
+
priority: number;
|
|
184
|
+
trustedHost: boolean;
|
|
185
|
+
supportedBrowser?: boolean;
|
|
186
|
+
env: transportEnv;
|
|
187
|
+
timestamp: number;
|
|
188
|
+
isFrame?: boolean;
|
|
189
|
+
preRelease?: boolean;
|
|
190
|
+
firmwareManifestMode?: 'sdk-managed' | 'external-only';
|
|
191
|
+
preloadedConfig?: RemoteConfigResponse;
|
|
192
|
+
fetchConfig?: boolean;
|
|
193
|
+
extension?: string;
|
|
194
|
+
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
195
|
+
};
|
|
196
|
+
type IVersionArray = [number, number, number];
|
|
197
|
+
type ILocale = 'zh-CN' | 'en-US';
|
|
198
|
+
type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04';
|
|
199
|
+
type IProtocolV2FirmwareComponent = {
|
|
200
|
+
target: IProtocolV2FirmwareComponentTarget;
|
|
201
|
+
url: string;
|
|
202
|
+
/** SHA-256 of the complete okpkg, used after downloading the package. */
|
|
203
|
+
fingerprint?: string;
|
|
204
|
+
/** OKPP payload hash, used to detect same-version package changes. */
|
|
205
|
+
payloadHash?: string;
|
|
206
|
+
expectedSize?: number;
|
|
207
|
+
version?: IVersionArray;
|
|
208
|
+
};
|
|
209
|
+
/** Pro2 RESC bundle okpkg descriptor for incremental FileWrite synchronization. */
|
|
210
|
+
type IProtocolV2ResourceBundle = {
|
|
211
|
+
/** Bundle name, such as images, animation, translations, or fonts_roobert. */
|
|
212
|
+
name: string;
|
|
213
|
+
/** Download URL. */
|
|
214
|
+
url: string;
|
|
215
|
+
fingerprint?: string;
|
|
216
|
+
expectedSize?: number;
|
|
217
|
+
/** Device target path, such as vol0:/bundles/images/images.okpkg. */
|
|
218
|
+
devicePath: string;
|
|
219
|
+
/** okpkg payload_version used to skip matching content after FileRead. */
|
|
220
|
+
version?: IVersionArray;
|
|
221
|
+
/** okpkg payload_hash used for SHA3-512 comparison after FileRead. */
|
|
222
|
+
payloadHash?: string;
|
|
223
|
+
/** okpkg header_hash used for SHA3-512 comparison after FileRead. */
|
|
224
|
+
headerHash?: string;
|
|
225
|
+
};
|
|
226
|
+
/** STM32 firmware config */
|
|
227
|
+
type IFirmwareReleaseInfo = {
|
|
228
|
+
required: boolean;
|
|
229
|
+
url: string;
|
|
230
|
+
/**
|
|
231
|
+
* Firmware type (bitcoinonly or universal)
|
|
232
|
+
* This field is not present in the remote config, but will be inferred from the firmware field name
|
|
233
|
+
*/
|
|
234
|
+
firmwareType?: EFirmwareType;
|
|
235
|
+
/** Firmware UI resource */
|
|
236
|
+
resource?: string;
|
|
237
|
+
resourceFingerprint?: string;
|
|
238
|
+
resourceExpectedSize?: number;
|
|
239
|
+
/** Firmware full UI resource */
|
|
240
|
+
fullResource?: string;
|
|
241
|
+
fullResourceFingerprint?: string;
|
|
242
|
+
fullResourceExpectedSize?: number;
|
|
243
|
+
fullResourceRange?: string[];
|
|
244
|
+
bootloaderResource?: string;
|
|
245
|
+
bootloaderFingerprint?: string;
|
|
246
|
+
bootloaderExpectedSize?: number;
|
|
247
|
+
bootloaderVersion?: IVersionArray;
|
|
248
|
+
displayBootloaderVersion?: IVersionArray;
|
|
249
|
+
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
250
|
+
upgradeType?: 'payload-package-set' | string;
|
|
251
|
+
components?: Record<string, IProtocolV2FirmwareComponent>;
|
|
252
|
+
installOrder?: string[];
|
|
253
|
+
/** Pro2 RESC bundles for incremental direct FileWrite synchronization. */
|
|
254
|
+
resourceBundles?: IProtocolV2ResourceBundle[];
|
|
255
|
+
bootloaderChangelog?: {
|
|
256
|
+
[k in ILocale]: string;
|
|
257
|
+
};
|
|
258
|
+
fingerprint: string;
|
|
259
|
+
expectedSize?: number;
|
|
260
|
+
version: IVersionArray;
|
|
261
|
+
changelog: {
|
|
262
|
+
[k in ILocale]: string;
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
/** BLE firmware config */
|
|
266
|
+
type IBLEFirmwareReleaseInfo = {
|
|
267
|
+
required: boolean;
|
|
268
|
+
/** bluetooth dfu version */
|
|
269
|
+
url: string;
|
|
270
|
+
/** stm bluetooth update version */
|
|
271
|
+
webUpdate: string;
|
|
272
|
+
fingerprint: string;
|
|
273
|
+
fingerprintWeb: string;
|
|
274
|
+
expectedSize?: number;
|
|
275
|
+
version: IVersionArray;
|
|
276
|
+
changelog: {
|
|
277
|
+
[k in ILocale]: string;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
|
|
281
|
+
type DeviceTypeMap = {
|
|
282
|
+
[k in IKnownDevice]: {
|
|
283
|
+
firmware: IFirmwareReleaseInfo[];
|
|
284
|
+
/** Pro2 Protocol V2 payload package set */
|
|
285
|
+
'firmware-v1'?: IFirmwareReleaseInfo[];
|
|
286
|
+
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
287
|
+
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
288
|
+
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
289
|
+
ble: IBLEFirmwareReleaseInfo[];
|
|
290
|
+
};
|
|
291
|
+
};
|
|
292
|
+
type AssetsMap = {
|
|
293
|
+
bridge: {
|
|
294
|
+
version: IVersionArray;
|
|
295
|
+
linux32Rpm: string;
|
|
296
|
+
linux64Rpm: string;
|
|
297
|
+
linux32Deb: string;
|
|
298
|
+
linux64Deb: string;
|
|
299
|
+
win: string;
|
|
300
|
+
mac: string;
|
|
301
|
+
sha256sumAsc: string;
|
|
302
|
+
changelog: {
|
|
303
|
+
[k in ILocale]: string;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
162
306
|
};
|
|
307
|
+
type RemoteConfigResponse = {
|
|
308
|
+
bridge: AssetsMap['bridge'];
|
|
309
|
+
} & DeviceTypeMap;
|
|
163
310
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
constructor();
|
|
171
|
-
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
172
|
-
listen(): Promise<void>;
|
|
173
|
-
stop(): void;
|
|
174
|
-
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
175
|
-
release(session: string, onclose: boolean): Promise<void>;
|
|
176
|
-
disconnect(session: string | undefined | null): Promise<void>;
|
|
177
|
-
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
178
|
-
_reportDevicesChange(): void;
|
|
311
|
+
type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
312
|
+
declare enum EOneKeyDeviceMode {
|
|
313
|
+
bootloader = "bootloader",
|
|
314
|
+
normal = "normal",
|
|
315
|
+
notInitialized = "notInitialized",
|
|
316
|
+
backupMode = "backupMode"
|
|
179
317
|
}
|
|
180
|
-
|
|
181
|
-
type
|
|
182
|
-
|
|
183
|
-
deviceId?: string;
|
|
184
|
-
passphraseState?: string;
|
|
185
|
-
deriveCardano?: boolean;
|
|
186
|
-
connectProtocol?: HardwareConnectProtocol;
|
|
187
|
-
protocolV2DeviceInfoTimeoutMs?: number;
|
|
318
|
+
type UnavailableCapability = 'no-capability' | 'no-support' | 'update-required' | 'trezor-connect-outdated';
|
|
319
|
+
type UnavailableCapabilities = {
|
|
320
|
+
[key: string]: UnavailableCapability;
|
|
188
321
|
};
|
|
189
|
-
type
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
215
|
-
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
216
|
-
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
217
|
-
}
|
|
218
|
-
declare class Device$1 extends EventEmitter {
|
|
219
|
-
originalDescriptor: OneKeyDeviceInfo;
|
|
220
|
-
sdkInstanceId?: string;
|
|
221
|
-
instanceId: string;
|
|
222
|
-
createdAt: number;
|
|
223
|
-
mainId?: string | null;
|
|
224
|
-
deviceConnector?: DeviceConnector | null;
|
|
225
|
-
commands: DeviceCommands;
|
|
226
|
-
private cancelableAction?;
|
|
227
|
-
private deviceAcquired;
|
|
228
|
-
features: Features | undefined;
|
|
229
|
-
featuresNeedsReload: boolean;
|
|
230
|
-
runPromise?: Deferred<void> | null;
|
|
231
|
-
externalState: string[];
|
|
232
|
-
unavailableCapabilities: UnavailableCapabilities;
|
|
233
|
-
instance: number;
|
|
234
|
-
internalState: string[];
|
|
235
|
-
needReloadDevice: boolean;
|
|
236
|
-
keepSession: boolean;
|
|
237
|
-
passphraseState: string | undefined;
|
|
238
|
-
pendingCallbackPromise?: Deferred<void>;
|
|
239
|
-
private preInitializedAt?;
|
|
240
|
-
private preInitializeMeta?;
|
|
241
|
-
private lastInitializeDurationMs?;
|
|
242
|
-
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
243
|
-
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device$1;
|
|
244
|
-
toMessageObject(): Device | null;
|
|
245
|
-
connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
|
|
246
|
-
acquire(connectProtocol?: HardwareConnectProtocol, options?: {
|
|
247
|
-
throwOnRunPromiseError?: boolean;
|
|
248
|
-
}): Promise<void>;
|
|
249
|
-
release(): Promise<void>;
|
|
250
|
-
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
251
|
-
markPreInitialized(meta?: {
|
|
252
|
-
passphraseState?: string;
|
|
253
|
-
}): void;
|
|
254
|
-
clearPreInitialized(): void;
|
|
255
|
-
isPreInitializeMetaMatch(payload?: {
|
|
256
|
-
passphraseState?: string;
|
|
257
|
-
}): boolean;
|
|
258
|
-
isPreInitializedValid(ttlMs: number): boolean;
|
|
259
|
-
setLastInitializeDuration(durationMs: number): void;
|
|
260
|
-
getLastInitializeDuration(): number | undefined;
|
|
261
|
-
getCommands(): DeviceCommands;
|
|
262
|
-
getProtocol(): 'V1' | 'V2';
|
|
263
|
-
isProtocolV2(): boolean;
|
|
264
|
-
getCurrentDeviceType(): IDeviceType;
|
|
265
|
-
getCurrentDeviceId(): string | undefined;
|
|
266
|
-
getCurrentSerialNo(): string;
|
|
267
|
-
getConnectId(): string;
|
|
268
|
-
getCurrentBleName(): string | null;
|
|
269
|
-
getCurrentLabel(): string | null;
|
|
270
|
-
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
271
|
-
getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
|
|
272
|
-
getCurrentFirmwareVersionString(): string;
|
|
273
|
-
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
274
|
-
getCurrentSafetyChecks(): string | null | undefined;
|
|
275
|
-
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
276
|
-
supportNewPassphrase(): SupportFeatureType;
|
|
277
|
-
supportInputPinOnSoftware(): SupportFeatureType;
|
|
278
|
-
supportModifyHomescreen(): SupportFeatureType;
|
|
279
|
-
private generateStateKey;
|
|
280
|
-
private getSessionCacheDeviceKey;
|
|
281
|
-
getInternalState(_deviceId?: string): string | undefined;
|
|
282
|
-
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
283
|
-
private setInternalState;
|
|
284
|
-
clearInternalState(_deviceId?: string): void;
|
|
285
|
-
initialize(options?: InitOptions): Promise<void>;
|
|
286
|
-
private _initializeProtocolV2;
|
|
287
|
-
private _refreshProtocolV2Status;
|
|
288
|
-
getFeatures(): Promise<Features | undefined>;
|
|
289
|
-
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
290
|
-
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo): Features;
|
|
291
|
-
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
292
|
-
updateFromCache(device: Device$1): void;
|
|
293
|
-
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
294
|
-
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
|
|
295
|
-
interruptionFromOutside(): Promise<void>;
|
|
296
|
-
interruptionFromUser(): Promise<void>;
|
|
297
|
-
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
298
|
-
clearCancelableAction(): void;
|
|
299
|
-
getMode(): EOneKeyDeviceMode;
|
|
300
|
-
getFirmwareVersion(): IVersionArray | null;
|
|
301
|
-
getBLEFirmwareVersion(): IVersionArray | null;
|
|
302
|
-
isUsed(): boolean;
|
|
303
|
-
hasDeviceAcquire(): boolean;
|
|
304
|
-
isUsedHere(): boolean;
|
|
305
|
-
isUsedElsewhere(): boolean;
|
|
306
|
-
isBootloader(): boolean | undefined;
|
|
307
|
-
isInitialized(): boolean | undefined;
|
|
308
|
-
isSeedless(): boolean | undefined;
|
|
309
|
-
isUnacquired(): boolean;
|
|
310
|
-
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
311
|
-
hasUsePassphrase(): boolean;
|
|
312
|
-
checkDeviceId(deviceId: string): boolean;
|
|
313
|
-
lockDevice(): Promise<Success$1>;
|
|
314
|
-
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
315
|
-
unlockDevice(): Promise<Features | undefined>;
|
|
316
|
-
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
declare function generateSdkInstanceId(): string;
|
|
320
|
-
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
321
|
-
interface RequestContext {
|
|
322
|
-
responseID: number;
|
|
323
|
-
sdkInstanceId?: string;
|
|
324
|
-
methodName: string;
|
|
325
|
-
connectId?: string;
|
|
326
|
-
deviceInstanceId?: string;
|
|
327
|
-
commandsInstanceId?: string;
|
|
328
|
-
parentResponseID?: number;
|
|
329
|
-
startTime: number;
|
|
330
|
-
endTime?: number;
|
|
331
|
-
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
332
|
-
error?: string;
|
|
333
|
-
}
|
|
334
|
-
interface SdkTracingContext {
|
|
335
|
-
sdkInstanceId: string;
|
|
336
|
-
createdAt: number;
|
|
337
|
-
activeRequests: Map<number, RequestContext>;
|
|
338
|
-
}
|
|
339
|
-
declare function createSdkTracingContext(): SdkTracingContext;
|
|
340
|
-
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
341
|
-
sdkInstanceId?: string;
|
|
342
|
-
connectId?: string;
|
|
343
|
-
deviceInstanceId?: string;
|
|
344
|
-
commandsInstanceId?: string;
|
|
345
|
-
parentResponseID?: number;
|
|
346
|
-
}): RequestContext;
|
|
347
|
-
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
348
|
-
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
349
|
-
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
350
|
-
declare function formatRequestContext(context: RequestContext): string;
|
|
351
|
-
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
352
|
-
|
|
353
|
-
declare class Core extends EventEmitter {
|
|
354
|
-
private tracingContext;
|
|
355
|
-
readonly sdkInstanceId: string;
|
|
356
|
-
private requestQueue;
|
|
357
|
-
private prePendingCallPromise;
|
|
358
|
-
private methodSynchronize;
|
|
359
|
-
constructor();
|
|
360
|
-
private getCoreContext;
|
|
361
|
-
handleMessage(message: CoreMessage): Promise<any>;
|
|
362
|
-
dispose(): void;
|
|
363
|
-
}
|
|
364
|
-
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
365
|
-
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
366
|
-
env: ConnectSettings['env'];
|
|
367
|
-
Transport: any;
|
|
368
|
-
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
369
|
-
}) => void;
|
|
370
|
-
|
|
371
|
-
type DeviceInfoGetTargets = {
|
|
372
|
-
hw?: boolean;
|
|
373
|
-
fw?: boolean;
|
|
374
|
-
coprocessor?: boolean;
|
|
375
|
-
se1?: boolean;
|
|
376
|
-
se2?: boolean;
|
|
377
|
-
se3?: boolean;
|
|
378
|
-
se4?: boolean;
|
|
379
|
-
status?: boolean;
|
|
380
|
-
};
|
|
381
|
-
type DeviceInfoGetTypes = {
|
|
382
|
-
version?: boolean;
|
|
383
|
-
build_id?: boolean;
|
|
384
|
-
hash?: boolean;
|
|
385
|
-
specific?: boolean;
|
|
386
|
-
};
|
|
387
|
-
type DeviceInfoGetParams = {
|
|
388
|
-
targets?: DeviceInfoGetTargets;
|
|
389
|
-
types?: DeviceInfoGetTypes;
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
type FileOpSuccess = {
|
|
393
|
-
message?: string;
|
|
394
|
-
};
|
|
395
|
-
type FileInfo = {
|
|
396
|
-
path: string;
|
|
397
|
-
offset: number;
|
|
398
|
-
total_size: number;
|
|
399
|
-
data?: Uint8Array;
|
|
400
|
-
data_hash?: number;
|
|
401
|
-
processed_byte?: number;
|
|
402
|
-
chunks?: number;
|
|
403
|
-
};
|
|
404
|
-
type DirInfo = {
|
|
405
|
-
path: string;
|
|
406
|
-
child_dirs?: string;
|
|
407
|
-
child_files?: string;
|
|
408
|
-
};
|
|
409
|
-
type PathInfoResult = {
|
|
410
|
-
exist: boolean;
|
|
411
|
-
size: number;
|
|
412
|
-
year: number;
|
|
413
|
-
month: number;
|
|
414
|
-
day: number;
|
|
415
|
-
hour: number;
|
|
416
|
-
minute: number;
|
|
417
|
-
second: number;
|
|
418
|
-
readonly: boolean;
|
|
419
|
-
hidden: boolean;
|
|
420
|
-
system: boolean;
|
|
421
|
-
archive: boolean;
|
|
422
|
-
directory: boolean;
|
|
423
|
-
};
|
|
424
|
-
declare function protocolInfoRequest(connectId: string, params?: CommonParams): Response<ProtocolInfo>;
|
|
425
|
-
declare function ping(connectId: string, params?: CommonParams & {
|
|
426
|
-
message?: string;
|
|
427
|
-
}): Response<Success$1>;
|
|
428
|
-
declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
429
|
-
declare function deviceInfoGet(connectId: string, params?: CommonParams & DeviceInfoGetParams): Response<ProtocolV2DeviceInfo>;
|
|
430
|
-
declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DeviceFirmwareUpdateStatus>;
|
|
431
|
-
declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams & DeviceFirmwareUpdateStatusGetParams): Response<DeviceFirmwareUpdateStatus>;
|
|
432
|
-
declare function deviceFactoryInfoSet(connectId: string, params: CommonParams & DeviceFactoryInfoSetParams): Response<Success$1>;
|
|
433
|
-
declare function deviceFactoryInfoGet(connectId: string, params?: CommonParams): Response<DeviceFactoryInfo>;
|
|
434
|
-
declare function filesystemPermissionFix(connectId: string, params?: CommonParams): Response<Success$1>;
|
|
435
|
-
declare function fileRead(connectId: string, params: {
|
|
436
|
-
path: string;
|
|
437
|
-
offset?: number;
|
|
438
|
-
totalSize?: number;
|
|
439
|
-
chunkLen?: number;
|
|
440
|
-
uiPercentage?: number;
|
|
441
|
-
}): Response<FileInfo>;
|
|
442
|
-
declare function fileWrite(connectId: string, params: {
|
|
443
|
-
path: string;
|
|
444
|
-
offset?: number;
|
|
445
|
-
totalSize?: number;
|
|
446
|
-
chunkSize?: number;
|
|
447
|
-
chunkLen?: number;
|
|
448
|
-
data: ArrayBuffer | Uint8Array | Blob | string;
|
|
449
|
-
overwrite?: boolean;
|
|
450
|
-
append?: boolean;
|
|
451
|
-
uiPercentage?: number;
|
|
452
|
-
timeoutMs?: number | string;
|
|
453
|
-
}): Response<FileInfo>;
|
|
454
|
-
declare function fileDelete(connectId: string, params: {
|
|
455
|
-
path: string;
|
|
456
|
-
}): Response<FileOpSuccess>;
|
|
457
|
-
declare function dirList(connectId: string, params: {
|
|
458
|
-
path: string;
|
|
459
|
-
depth?: number;
|
|
460
|
-
}): Response<DirInfo>;
|
|
461
|
-
declare function dirMake(connectId: string, params: {
|
|
462
|
-
path: string;
|
|
463
|
-
}): Response<FileOpSuccess>;
|
|
464
|
-
declare function dirRemove(connectId: string, params: {
|
|
465
|
-
path: string;
|
|
466
|
-
}): Response<FileOpSuccess>;
|
|
467
|
-
declare function pathInfo(connectId: string, params: {
|
|
468
|
-
path: string;
|
|
469
|
-
timeoutMs?: number | string;
|
|
470
|
-
}): Response<PathInfoResult>;
|
|
471
|
-
declare const filesystemFileRead: typeof fileRead;
|
|
472
|
-
declare const filesystemFileWrite: typeof fileWrite;
|
|
473
|
-
declare const filesystemFileDelete: typeof fileDelete;
|
|
474
|
-
declare const filesystemDirList: typeof dirList;
|
|
475
|
-
declare const filesystemDirMake: typeof dirMake;
|
|
476
|
-
declare const filesystemDirRemove: typeof dirRemove;
|
|
477
|
-
declare const filesystemPathInfoQuery: typeof pathInfo;
|
|
478
|
-
declare function filesystemFormat(connectId: string): Response<Success$1>;
|
|
479
|
-
declare function filesystemDiskControl(connectId: string, params: CommonParams & {
|
|
480
|
-
enable: boolean | 0 | 1;
|
|
481
|
-
timeoutMs?: number | string;
|
|
482
|
-
}): Response<Success$1>;
|
|
483
|
-
|
|
484
|
-
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
485
|
-
declare const off: (type: any, fn: any) => void;
|
|
486
|
-
declare const removeAllListeners: (type: any) => void;
|
|
487
|
-
|
|
488
|
-
declare function uiResponse(response: UiResponseEvent): void;
|
|
489
|
-
|
|
490
|
-
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
491
|
-
interface LowLevelInjectApi {
|
|
492
|
-
call: CallMethod;
|
|
493
|
-
eventEmitter: EventEmitter$1;
|
|
494
|
-
init: CoreApi['init'];
|
|
495
|
-
dispose: CoreApi['dispose'];
|
|
496
|
-
uiResponse: CoreApi['uiResponse'];
|
|
497
|
-
cancel: CoreApi['cancel'];
|
|
498
|
-
updateSettings: CoreApi['updateSettings'];
|
|
499
|
-
switchTransport: CoreApi['switchTransport'];
|
|
500
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
501
|
-
}
|
|
502
|
-
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
503
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
504
|
-
};
|
|
505
|
-
|
|
506
|
-
type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
507
|
-
declare enum EOneKeyDeviceMode {
|
|
508
|
-
bootloader = "bootloader",
|
|
509
|
-
normal = "normal",
|
|
510
|
-
notInitialized = "notInitialized",
|
|
511
|
-
backupMode = "backupMode"
|
|
512
|
-
}
|
|
513
|
-
type UnavailableCapability = 'no-capability' | 'no-support' | 'update-required' | 'trezor-connect-outdated';
|
|
514
|
-
type UnavailableCapabilities = {
|
|
515
|
-
[key: string]: UnavailableCapability;
|
|
516
|
-
};
|
|
517
|
-
type KnownDevice = {
|
|
518
|
-
connectId: string | null;
|
|
519
|
-
uuid: string;
|
|
520
|
-
deviceId: string | null;
|
|
521
|
-
deviceType: IDeviceType | null;
|
|
522
|
-
commType: OneKeyDeviceCommType | null;
|
|
523
|
-
path: string;
|
|
524
|
-
label: string;
|
|
525
|
-
bleName: string | null;
|
|
526
|
-
name: string;
|
|
527
|
-
error?: typeof undefined;
|
|
528
|
-
mode: EOneKeyDeviceMode;
|
|
529
|
-
features?: Features;
|
|
530
|
-
sessionId?: string | null;
|
|
322
|
+
type KnownDevice = {
|
|
323
|
+
connectId: string | null;
|
|
324
|
+
/** Protocol family confirmed by the transport's active probe. */
|
|
325
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
326
|
+
/**
|
|
327
|
+
* Stable physical-device identity. Current SDK responses always include this
|
|
328
|
+
* value; it remains optional in the type during the uuid compatibility window.
|
|
329
|
+
*/
|
|
330
|
+
serialNo?: string;
|
|
331
|
+
/** @deprecated Use serialNo instead. */
|
|
332
|
+
uuid: string;
|
|
333
|
+
deviceId: string | null;
|
|
334
|
+
deviceType: IDeviceType | null;
|
|
335
|
+
commType: OneKeyDeviceCommType | null;
|
|
336
|
+
path: string;
|
|
337
|
+
label: string;
|
|
338
|
+
bleName: string | null;
|
|
339
|
+
name: string;
|
|
340
|
+
error?: typeof undefined;
|
|
341
|
+
/** Current SDK/transport usage state for connection indicators. */
|
|
342
|
+
status?: DeviceStatus;
|
|
343
|
+
mode: EOneKeyDeviceMode;
|
|
344
|
+
features: Features;
|
|
345
|
+
/** Unified SDK device-state snapshot; features remains a legacy projection. */
|
|
346
|
+
state?: DeviceState;
|
|
531
347
|
unavailableCapabilities: UnavailableCapabilities;
|
|
532
348
|
bleFirmwareVersion: IVersionArray | null;
|
|
533
349
|
firmwareVersion: IVersionArray | null;
|
|
@@ -537,18 +353,35 @@ type KnownDevice = {
|
|
|
537
353
|
};
|
|
538
354
|
type SearchDevice = {
|
|
539
355
|
connectId: string | null;
|
|
356
|
+
/** Protocol family confirmed by the transport's active probe. */
|
|
357
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
358
|
+
/**
|
|
359
|
+
* Available after device initialization. BLE discovery does not connect to the
|
|
360
|
+
* device, so it returns null until a later initialized device response. Current
|
|
361
|
+
* SDK responses always include the field; it remains optional in the type during
|
|
362
|
+
* the uuid compatibility window.
|
|
363
|
+
*/
|
|
364
|
+
serialNo?: string | null;
|
|
365
|
+
/**
|
|
366
|
+
* @deprecated Ambiguous legacy identifier. Use serialNo for hardware identity
|
|
367
|
+
* and connectId for transport routing.
|
|
368
|
+
*/
|
|
540
369
|
uuid: string;
|
|
541
370
|
deviceId: string | null;
|
|
542
371
|
deviceType: IDeviceType;
|
|
543
372
|
name: string;
|
|
544
373
|
commType: OneKeyDeviceCommType;
|
|
545
374
|
};
|
|
546
|
-
type Device = KnownDevice;
|
|
375
|
+
type Device$1 = KnownDevice;
|
|
547
376
|
type DeviceFeaturesProtocol = 'V1' | 'V2' | 'unknown';
|
|
548
|
-
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
377
|
+
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
549
378
|
type DeviceFeaturesVerify = {
|
|
550
379
|
firmwareBuildId?: string;
|
|
551
380
|
firmwareHash?: string;
|
|
381
|
+
applicationP1BuildId?: string;
|
|
382
|
+
applicationP1Hash?: string;
|
|
383
|
+
applicationP2BuildId?: string;
|
|
384
|
+
applicationP2Hash?: string;
|
|
552
385
|
bootloaderBuildId?: string;
|
|
553
386
|
bootloaderHash?: string;
|
|
554
387
|
boardBuildId?: string;
|
|
@@ -575,9 +408,115 @@ type DeviceFeaturesVerify = {
|
|
|
575
408
|
type DeviceFeaturesRaw = {
|
|
576
409
|
protocolV1Features?: Messages.Features;
|
|
577
410
|
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
411
|
+
protocolV2ProtocolInfo?: ProtocolInfo;
|
|
578
412
|
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
413
|
+
protocolV2DeviceStatus?: DeviceStatus$1;
|
|
414
|
+
};
|
|
415
|
+
type DeviceFeaturesRawPatch = {
|
|
416
|
+
[Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
|
|
417
|
+
};
|
|
418
|
+
type DeviceStateProtocol = DeviceFeaturesProtocol;
|
|
419
|
+
type DeviceStateMode = DeviceFeaturesMode;
|
|
420
|
+
type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
|
|
421
|
+
type DeviceStateUpdateSource = 'initialize' | 'device-info' | 'device-status' | 'settings-read' | 'settings-write' | 'change-pin' | 'lock' | 'unlock' | 'passphrase' | 'session-clear' | 'firmware-update' | 'transport-reconnect' | 'compatibility';
|
|
422
|
+
type DeviceStateIdentity = {
|
|
423
|
+
deviceType: IDeviceType;
|
|
424
|
+
firmwareType: EFirmwareType;
|
|
425
|
+
model: string | null;
|
|
426
|
+
vendor: string | null;
|
|
427
|
+
deviceId: string | null;
|
|
428
|
+
serialNo: string;
|
|
429
|
+
label: string | null;
|
|
430
|
+
bleName: string | null;
|
|
431
|
+
};
|
|
432
|
+
type DeviceStateStatus = {
|
|
433
|
+
mode: DeviceStateMode;
|
|
434
|
+
initialized: boolean | null;
|
|
435
|
+
unlocked: boolean | null;
|
|
436
|
+
firmwarePresent: boolean | null;
|
|
437
|
+
backupRequired: boolean | null;
|
|
438
|
+
noBackup: boolean | null;
|
|
439
|
+
unfinishedBackup: boolean | null;
|
|
440
|
+
recoveryMode: boolean | null;
|
|
441
|
+
passphraseProtection: boolean | null;
|
|
442
|
+
pinProtection: boolean | null;
|
|
443
|
+
attachToPinEnabled: boolean | null;
|
|
444
|
+
unlockedAttachPin: boolean | null;
|
|
445
|
+
};
|
|
446
|
+
type DeviceStateSettings = {
|
|
447
|
+
language: string | null;
|
|
448
|
+
bleEnabled: boolean | null;
|
|
449
|
+
sdCardPresent: boolean | null;
|
|
450
|
+
sdProtection: boolean | null;
|
|
451
|
+
wipeCodeProtection: boolean | null;
|
|
452
|
+
passphraseAlwaysOnDevice: boolean | null;
|
|
453
|
+
safetyChecks: Enum_SafetyCheckLevel | null;
|
|
454
|
+
autoLockDelayMs: number | null;
|
|
455
|
+
autoShutdownDelayMs: number | null;
|
|
456
|
+
displayRotation: number | null;
|
|
457
|
+
experimentalFeatures: boolean | null;
|
|
458
|
+
wallpaperPath: string | null;
|
|
459
|
+
brightness: number | null;
|
|
460
|
+
animationEnabled: boolean | null;
|
|
461
|
+
tapToWake: boolean | null;
|
|
462
|
+
hapticFeedback: boolean | null;
|
|
463
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
464
|
+
airgapMode: boolean | null;
|
|
465
|
+
fidoEnabled: boolean | null;
|
|
466
|
+
usbLockEnabled: boolean | null;
|
|
467
|
+
randomKeypad: boolean | null;
|
|
468
|
+
};
|
|
469
|
+
type DeviceStateVersions = {
|
|
470
|
+
firmware: string | null;
|
|
471
|
+
applicationP1?: string | null;
|
|
472
|
+
applicationP2?: string | null;
|
|
473
|
+
bootloader: string | null;
|
|
474
|
+
board: string | null;
|
|
475
|
+
ble: string | null;
|
|
476
|
+
/** @deprecated Kept for legacy consumers; new code should read se01. */
|
|
477
|
+
se?: string | null;
|
|
478
|
+
se01?: string | null;
|
|
479
|
+
se02?: string | null;
|
|
480
|
+
se03?: string | null;
|
|
481
|
+
se04?: string | null;
|
|
482
|
+
se01Boot?: string | null;
|
|
483
|
+
se02Boot?: string | null;
|
|
484
|
+
se03Boot?: string | null;
|
|
485
|
+
se04Boot?: string | null;
|
|
486
|
+
};
|
|
487
|
+
type DeviceState = {
|
|
488
|
+
schemaVersion: 1;
|
|
489
|
+
revision: number;
|
|
490
|
+
updatedAt: number;
|
|
491
|
+
protocol: DeviceStateProtocol;
|
|
492
|
+
/** Device-message protocol version, independent of the SDK V1/V2 protocol family. */
|
|
493
|
+
protocolVersion: number | null;
|
|
494
|
+
identity: DeviceStateIdentity;
|
|
495
|
+
status: DeviceStateStatus;
|
|
496
|
+
settings: DeviceStateSettings;
|
|
497
|
+
versions: DeviceStateVersions;
|
|
498
|
+
capabilities: Array<number | string>;
|
|
499
|
+
verification?: Partial<DeviceFeaturesVerify>;
|
|
579
500
|
};
|
|
580
|
-
type
|
|
501
|
+
type DeviceStatePatch = {
|
|
502
|
+
protocol?: DeviceStateProtocol;
|
|
503
|
+
protocolVersion?: number | null;
|
|
504
|
+
identity?: Partial<DeviceStateIdentity>;
|
|
505
|
+
status?: Partial<DeviceStateStatus>;
|
|
506
|
+
settings?: Partial<DeviceStateSettings>;
|
|
507
|
+
versions?: Partial<DeviceStateVersions>;
|
|
508
|
+
capabilities?: Array<number | string>;
|
|
509
|
+
verification?: DeviceFeaturesVerify;
|
|
510
|
+
raw?: DeviceFeaturesRawPatch;
|
|
511
|
+
};
|
|
512
|
+
type DeviceStateEvent = {
|
|
513
|
+
connectId: string | null;
|
|
514
|
+
state: DeviceState;
|
|
515
|
+
revision: number;
|
|
516
|
+
source: DeviceStateUpdateSource;
|
|
517
|
+
changedKeys: string[];
|
|
518
|
+
};
|
|
519
|
+
type NormalizedFeatures = {
|
|
581
520
|
protocol: DeviceFeaturesProtocol;
|
|
582
521
|
protocolVersion?: number | null;
|
|
583
522
|
deviceType: IDeviceType;
|
|
@@ -607,10 +546,21 @@ type Features = {
|
|
|
607
546
|
wipeCodeProtection: boolean | null;
|
|
608
547
|
passphraseAlwaysOnDevice: boolean | null;
|
|
609
548
|
attachToPinEnabled?: boolean | null;
|
|
610
|
-
safetyChecks:
|
|
549
|
+
safetyChecks: Enum_SafetyCheckLevel | null;
|
|
611
550
|
autoLockDelayMs: number | null;
|
|
551
|
+
autoShutdownDelayMs: number | null;
|
|
612
552
|
displayRotation: number | null;
|
|
613
553
|
experimentalFeatures: boolean | null;
|
|
554
|
+
wallpaperPath: string | null;
|
|
555
|
+
brightness: number | null;
|
|
556
|
+
animationEnabled: boolean | null;
|
|
557
|
+
tapToWake: boolean | null;
|
|
558
|
+
hapticFeedback: boolean | null;
|
|
559
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
560
|
+
airgapMode: boolean | null;
|
|
561
|
+
fidoEnabled: boolean | null;
|
|
562
|
+
usbLockEnabled: boolean | null;
|
|
563
|
+
randomKeypad: boolean | null;
|
|
614
564
|
firmwareVersion: string | null;
|
|
615
565
|
bootloaderVersion: string | null;
|
|
616
566
|
boardVersion: string | null;
|
|
@@ -630,8 +580,14 @@ type Features = {
|
|
|
630
580
|
unlockedAttachPin?: boolean;
|
|
631
581
|
raw?: DeviceFeaturesRaw;
|
|
632
582
|
};
|
|
583
|
+
type Features = NormalizedFeatures & Partial<Omit<Messages.Features, keyof NormalizedFeatures>> & Partial<Omit<Messages.OnekeyFeatures, keyof NormalizedFeatures | keyof Messages.Features>>;
|
|
633
584
|
type OnekeyFeatures = Messages.OnekeyFeatures;
|
|
634
585
|
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
|
|
586
|
+
/**
|
|
587
|
+
* model_classic: 'classic' | 'classic1s' | 'classicpure'
|
|
588
|
+
* model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
|
|
589
|
+
* model_touch: 'touch' | 'pro'
|
|
590
|
+
*/
|
|
635
591
|
type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
|
|
636
592
|
declare const DeviceModelToTypes: {
|
|
637
593
|
[deviceModel in IDeviceModel]: IDeviceType[];
|
|
@@ -645,7 +601,6 @@ type ITransportStatus = 'valid' | 'outdated';
|
|
|
645
601
|
type IVersionRange = {
|
|
646
602
|
min: string;
|
|
647
603
|
max?: string;
|
|
648
|
-
unsupported?: boolean;
|
|
649
604
|
};
|
|
650
605
|
type DeviceFirmwareRange = {
|
|
651
606
|
[deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
|
|
@@ -696,117 +651,471 @@ type SupportFeatures = {
|
|
|
696
651
|
modifyHomescreen: SupportFeatureType;
|
|
697
652
|
};
|
|
698
653
|
|
|
699
|
-
type
|
|
700
|
-
type
|
|
701
|
-
|
|
702
|
-
debug?: boolean;
|
|
703
|
-
transportReconnect?: boolean;
|
|
704
|
-
lazyLoad?: boolean;
|
|
705
|
-
origin?: string;
|
|
706
|
-
parentOrigin?: string;
|
|
707
|
-
configSrc: string;
|
|
708
|
-
iframeSrc: string;
|
|
709
|
-
version: string;
|
|
710
|
-
priority: number;
|
|
711
|
-
trustedHost: boolean;
|
|
712
|
-
supportedBrowser?: boolean;
|
|
713
|
-
env: transportEnv;
|
|
714
|
-
timestamp: number;
|
|
715
|
-
isFrame?: boolean;
|
|
716
|
-
preRelease?: boolean;
|
|
717
|
-
fetchConfig?: boolean;
|
|
718
|
-
extension?: string;
|
|
719
|
-
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
720
|
-
};
|
|
721
|
-
type IVersionArray = [number, number, number];
|
|
722
|
-
type ILocale = 'zh-CN' | 'en-US';
|
|
723
|
-
type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04' | 'CRATE';
|
|
724
|
-
type IProtocolV2FirmwareComponent = {
|
|
725
|
-
target: IProtocolV2FirmwareComponentTarget;
|
|
726
|
-
url: string;
|
|
727
|
-
fingerprint?: string;
|
|
728
|
-
version?: IVersionArray;
|
|
729
|
-
resourceManifest?: IProtocolV2ResourceManifest;
|
|
654
|
+
type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
|
|
655
|
+
type GetDeviceStateParams = CommonParams & {
|
|
656
|
+
scope?: DeviceStateScope;
|
|
730
657
|
};
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
version?: IVersionArray;
|
|
736
|
-
sha256?: string;
|
|
737
|
-
payloadHash?: string;
|
|
738
|
-
headerHash?: string;
|
|
658
|
+
/** Internal state-read options, not part of the public CoreApi. */
|
|
659
|
+
type DeviceStateReadOptions = {
|
|
660
|
+
refreshSections?: DeviceStateSection[];
|
|
661
|
+
includeRaw?: boolean;
|
|
739
662
|
};
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
663
|
+
declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
|
|
664
|
+
|
|
665
|
+
type DeviceDescriptorDiff = {
|
|
666
|
+
didUpdate: boolean;
|
|
667
|
+
connected: OneKeyDeviceInfo[];
|
|
668
|
+
disconnected: OneKeyDeviceInfo[];
|
|
669
|
+
changedSessions: OneKeyDeviceInfo[];
|
|
670
|
+
changedDebugSessions: OneKeyDeviceInfo[];
|
|
671
|
+
acquired: OneKeyDeviceInfo[];
|
|
672
|
+
debugAcquired: OneKeyDeviceInfo[];
|
|
673
|
+
released: OneKeyDeviceInfo[];
|
|
674
|
+
debugReleased: OneKeyDeviceInfo[];
|
|
675
|
+
descriptors: OneKeyDeviceInfo[];
|
|
745
676
|
};
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
677
|
+
|
|
678
|
+
declare class DeviceConnector {
|
|
679
|
+
transport: Transport;
|
|
680
|
+
listenTimestamp: number;
|
|
681
|
+
current: OneKeyDeviceInfo[] | null;
|
|
682
|
+
upcoming: OneKeyDeviceInfo[];
|
|
683
|
+
listening: boolean;
|
|
684
|
+
constructor();
|
|
685
|
+
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
686
|
+
listen(): Promise<void>;
|
|
687
|
+
stop(): void;
|
|
688
|
+
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, expectedProtocol?: HardwareConnectProtocol, protocolHint?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
689
|
+
release(session: string, onclose: boolean): Promise<void>;
|
|
690
|
+
disconnect(session: string | undefined | null): Promise<void>;
|
|
691
|
+
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
692
|
+
_reportDevicesChange(): void;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
type InitOptions = {
|
|
696
|
+
initSession?: boolean;
|
|
697
|
+
deviceId?: string;
|
|
698
|
+
passphraseState?: string;
|
|
699
|
+
deriveCardano?: boolean;
|
|
700
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
701
|
+
protocolV2DeviceInfoTimeoutMs?: number;
|
|
702
|
+
/** Refresh Protocol V2 runtime state before returning discovery results. */
|
|
703
|
+
refreshRuntimeState?: boolean;
|
|
704
|
+
/**
|
|
705
|
+
* Protocol V1 Initialize response timeout override. Reboot-wait polling passes a
|
|
706
|
+
* short value so an unanswered probe settles before the next poll tick.
|
|
707
|
+
*/
|
|
708
|
+
timeoutMs?: number;
|
|
769
709
|
};
|
|
770
|
-
type
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
710
|
+
type RunOptions = {
|
|
711
|
+
keepSession?: boolean;
|
|
712
|
+
skipInitialize?: boolean;
|
|
713
|
+
} & InitOptions;
|
|
714
|
+
interface DeviceEvents {
|
|
715
|
+
[DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
716
|
+
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
717
|
+
[DEVICE.ATTACH_PIN_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
718
|
+
[DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
|
|
719
|
+
[DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
|
|
720
|
+
[DEVICE.STATE]: [Device, DeviceStateEvent];
|
|
721
|
+
[DEVICE.PASSPHRASE]: [
|
|
722
|
+
Device,
|
|
723
|
+
PassphraseRequestPayload,
|
|
724
|
+
(response: PassphrasePromptResponse, error?: Error) => void
|
|
725
|
+
];
|
|
726
|
+
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
727
|
+
Device,
|
|
728
|
+
(err: any, deviceId: string) => void
|
|
729
|
+
];
|
|
730
|
+
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
731
|
+
Device,
|
|
732
|
+
(err: any, deviceId: string) => void
|
|
733
|
+
];
|
|
734
|
+
}
|
|
735
|
+
/**
|
|
736
|
+
* Pre-populate the device session cache with a known session ID.
|
|
737
|
+
*
|
|
738
|
+
* This allows short-lived processes (e.g. CLI) to restore a previously
|
|
739
|
+
* obtained session, avoiding the need to re-enter passphrase on every
|
|
740
|
+
* invocation. The session must have been obtained from a prior
|
|
741
|
+
* wallet-session call on the same device. This compatibility hook is intended
|
|
742
|
+
* for a trusted CLI process restoring its own OS-keychain entry.
|
|
743
|
+
*
|
|
744
|
+
* @param deviceId - The device's device_id (from features)
|
|
745
|
+
* @param passphraseState - The passphrase state token
|
|
746
|
+
* @param sessionId - The session_id to cache (from features.session_id)
|
|
747
|
+
*/
|
|
748
|
+
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
749
|
+
interface Device {
|
|
750
|
+
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
751
|
+
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
752
|
+
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
753
|
+
}
|
|
754
|
+
declare class Device extends EventEmitter {
|
|
755
|
+
/**
|
|
756
|
+
* 设备标识对象
|
|
757
|
+
*/
|
|
758
|
+
originalDescriptor: OneKeyDeviceInfo;
|
|
759
|
+
sdkInstanceId?: string;
|
|
760
|
+
/**
|
|
761
|
+
* 设备实例唯一标识
|
|
762
|
+
*/
|
|
763
|
+
instanceId: string;
|
|
764
|
+
createdAt: number;
|
|
765
|
+
/**
|
|
766
|
+
* 设备主 ID
|
|
767
|
+
* 蓝牙连接时是设备的 UUID
|
|
768
|
+
* USB连接时是设备的 sessionID
|
|
769
|
+
*/
|
|
770
|
+
mainId?: string | null;
|
|
771
|
+
/**
|
|
772
|
+
* 通信管道,向设备发送请求
|
|
773
|
+
*/
|
|
774
|
+
deviceConnector?: DeviceConnector | null;
|
|
775
|
+
/**
|
|
776
|
+
* 固件命令
|
|
777
|
+
*/
|
|
778
|
+
commands: DeviceCommands;
|
|
779
|
+
/**
|
|
780
|
+
* 可取消的操作
|
|
781
|
+
*/
|
|
782
|
+
private cancelableAction?;
|
|
783
|
+
/**
|
|
784
|
+
* 设备是否被占用
|
|
785
|
+
*/
|
|
786
|
+
private deviceAcquired;
|
|
787
|
+
/** Canonical device-state cache; legacy Features is a compatibility projection. */
|
|
788
|
+
private stateStore;
|
|
789
|
+
/** Force the next initialization to reload DeviceInfo after reconnect or reboot. */
|
|
790
|
+
private protocolV2StateNeedsReload;
|
|
791
|
+
get state(): (DeviceState & {
|
|
792
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
793
|
+
}) | undefined;
|
|
794
|
+
get features(): Features | undefined;
|
|
795
|
+
set features(features: Features | undefined);
|
|
796
|
+
runPromise?: Deferred<void> | null;
|
|
797
|
+
externalState: string[];
|
|
798
|
+
unavailableCapabilities: UnavailableCapabilities;
|
|
799
|
+
instance: number;
|
|
800
|
+
internalState: string[];
|
|
801
|
+
needReloadDevice: boolean;
|
|
802
|
+
/**
|
|
803
|
+
* 执行 API 方法后是否保留 SessionID
|
|
804
|
+
*/
|
|
805
|
+
keepSession: boolean;
|
|
806
|
+
passphraseState: string | undefined;
|
|
807
|
+
pendingCallbackPromise?: Deferred<void>;
|
|
808
|
+
/** Pre-initialize timestamp (ms) */
|
|
809
|
+
private preInitializedAt?;
|
|
810
|
+
/** Pre-initialize context, used to verify state consistency before skipping */
|
|
811
|
+
private preInitializeMeta?;
|
|
812
|
+
/** Last Initialize duration (ms), reported as "saved" when a skip happens */
|
|
813
|
+
private lastInitializeDurationMs?;
|
|
814
|
+
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
815
|
+
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
|
|
816
|
+
toMessageObject(): Device$1 | null;
|
|
817
|
+
/**
|
|
818
|
+
* Device connect
|
|
819
|
+
* @returns {Promise<boolean>}
|
|
820
|
+
*/
|
|
821
|
+
connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
|
|
822
|
+
acquire(expectedProtocol?: HardwareConnectProtocol, options?: {
|
|
823
|
+
throwOnRunPromiseError?: boolean;
|
|
824
|
+
}): Promise<void>;
|
|
825
|
+
release(): Promise<void>;
|
|
826
|
+
/**
|
|
827
|
+
* Pre-initialize: connect + Initialize ahead of the sign.
|
|
828
|
+
*/
|
|
829
|
+
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
830
|
+
markPreInitialized(meta?: {
|
|
831
|
+
passphraseState?: string;
|
|
832
|
+
}): void;
|
|
833
|
+
clearPreInitialized(): void;
|
|
834
|
+
isPreInitializeMetaMatch(payload?: {
|
|
835
|
+
passphraseState?: string;
|
|
836
|
+
}): boolean;
|
|
837
|
+
isPreInitializedValid(ttlMs: number): boolean;
|
|
838
|
+
setLastInitializeDuration(durationMs: number): void;
|
|
839
|
+
getLastInitializeDuration(): number | undefined;
|
|
840
|
+
getCommands(): DeviceCommands;
|
|
841
|
+
/**
|
|
842
|
+
* Canonical protocol discriminator.
|
|
843
|
+
*
|
|
844
|
+
* descriptor.protocolType is established by active probing; V2 features are mapped
|
|
845
|
+
* from DeviceInfoGet. All protocol branches must use this method instead of reading
|
|
846
|
+
* originalDescriptor.protocolType directly or inferring a protocol from features.
|
|
847
|
+
*/
|
|
848
|
+
getProtocol(): 'V1' | 'V2';
|
|
849
|
+
isProtocolV2(): boolean;
|
|
850
|
+
getCurrentDeviceType(): IDeviceType;
|
|
851
|
+
getCurrentDeviceId(): string | undefined;
|
|
852
|
+
getCurrentSerialNo(): string;
|
|
853
|
+
getConnectId(): string;
|
|
854
|
+
getCurrentBleName(): string | null;
|
|
855
|
+
getCurrentLabel(): string | null;
|
|
856
|
+
getCurrentDisplayName(): string | null;
|
|
857
|
+
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
858
|
+
getCurrentFirmwareType(): EFirmwareType;
|
|
859
|
+
getCurrentFirmwareVersionString(): string;
|
|
860
|
+
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
861
|
+
getCurrentBootloaderVersionString(): string | undefined;
|
|
862
|
+
getCurrentSafetyChecks(): _onekeyfe_hd_transport.Enum_SafetyCheckLevel | null | undefined;
|
|
863
|
+
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
864
|
+
supportNewPassphrase(): SupportFeatureType;
|
|
865
|
+
supportInputPinOnSoftware(): SupportFeatureType;
|
|
866
|
+
supportModifyHomescreen(): SupportFeatureType;
|
|
867
|
+
private getSessionCacheDeviceKey;
|
|
868
|
+
private reconcileSessionCacheDeviceIdentity;
|
|
869
|
+
getInternalState(_deviceId?: string): string | undefined;
|
|
870
|
+
getStandardInternalState(_deviceId?: string): {
|
|
871
|
+
passphraseState: string;
|
|
872
|
+
sessionId: string;
|
|
873
|
+
} | undefined;
|
|
874
|
+
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null, walletType?: 'standard' | 'hidden'): void;
|
|
875
|
+
private setInternalState;
|
|
876
|
+
clearInternalState(_deviceId?: string): void;
|
|
877
|
+
clearStandardInternalState(_deviceId?: string): void;
|
|
878
|
+
initialize(options?: InitOptions): Promise<void>;
|
|
879
|
+
/**
|
|
880
|
+
* Device initialization over Protocol V2.
|
|
881
|
+
*
|
|
882
|
+
* Protocol V2 bypasses legacy Initialize/GetFeatures and builds its canonical
|
|
883
|
+
* features state directly from DeviceInfoGet.
|
|
884
|
+
*/
|
|
885
|
+
private _initializeProtocolV2;
|
|
886
|
+
getFeatures(): Promise<Features | undefined>;
|
|
887
|
+
getDeviceState(params?: DeviceStateReadOptions): Promise<DeviceState>;
|
|
888
|
+
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
889
|
+
updateState(patch: DeviceStatePatch, source: DeviceStateUpdateSource): DeviceState & {
|
|
890
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
779
891
|
};
|
|
892
|
+
updateFeaturesPatch(patch: Partial<Features>, source: DeviceStateUpdateSource): Features | undefined;
|
|
893
|
+
probeProtocolV2RuntimeState(deviceInfo: ProtocolV2DeviceInfo, timeoutMs?: number): Promise<Features>;
|
|
894
|
+
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo, deviceStatus?: DeviceStatus$1 | null, runtimeMode?: ProtocolV2RuntimeMode, protocolInfo?: ProtocolInfo): Features;
|
|
895
|
+
updateProtocolV2Status(status: DeviceStatus$1): Features;
|
|
896
|
+
markTransportDisconnected(): void;
|
|
897
|
+
invalidateAfterWipe(): void;
|
|
898
|
+
markProtocolV2Reboot(rebootType: DeviceRebootType): void;
|
|
899
|
+
/**
|
|
900
|
+
* 暂时只在 acquire 后更新 Session ID
|
|
901
|
+
* 后续看是否有需要依据 listen 返回结果更新
|
|
902
|
+
* @param descriptor
|
|
903
|
+
*/
|
|
904
|
+
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
905
|
+
updateFromCache(device: Device): void;
|
|
906
|
+
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
907
|
+
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions, runPromise: Deferred<void>): Promise<void>;
|
|
908
|
+
interruptionFromOutside(): Promise<void>;
|
|
909
|
+
interruptionFromUser(): Promise<void>;
|
|
910
|
+
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
911
|
+
clearCancelableAction(): void;
|
|
912
|
+
getMode(): EOneKeyDeviceMode;
|
|
913
|
+
getStatus(): "available" | "occupied" | "used";
|
|
914
|
+
getFirmwareVersion(): IVersionArray | null;
|
|
915
|
+
getBLEFirmwareVersion(): IVersionArray | null;
|
|
916
|
+
isUsed(): boolean;
|
|
917
|
+
hasDeviceAcquire(): boolean;
|
|
918
|
+
isUsedHere(): boolean;
|
|
919
|
+
isUsedElsewhere(): boolean;
|
|
920
|
+
isBootloader(): boolean | undefined;
|
|
921
|
+
isRomloader(): boolean | undefined;
|
|
922
|
+
isInitialized(): boolean | undefined;
|
|
923
|
+
isSeedless(): boolean | undefined;
|
|
924
|
+
isUnacquired(): boolean;
|
|
925
|
+
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
926
|
+
hasUsePassphrase(): boolean;
|
|
927
|
+
checkDeviceId(deviceId: string): boolean;
|
|
928
|
+
lockDevice(): Promise<Success$1>;
|
|
929
|
+
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
930
|
+
unlockDevice(pinType?: DeviceSessionPinType): Promise<Features | undefined>;
|
|
931
|
+
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
932
|
+
}
|
|
933
|
+
|
|
934
|
+
/**
|
|
935
|
+
* SDK Tracing Utilities
|
|
936
|
+
* Tracks object instances and request call chains across multiple SDK instances
|
|
937
|
+
*/
|
|
938
|
+
/**
|
|
939
|
+
* Generate SDK instance ID
|
|
940
|
+
* @returns Format: "SDK-<number>-<timestamp>"
|
|
941
|
+
* @example "SDK-1-123456"
|
|
942
|
+
*/
|
|
943
|
+
declare function generateSdkInstanceId(): string;
|
|
944
|
+
/**
|
|
945
|
+
* Generate globally unique instance ID
|
|
946
|
+
* @param type Instance type (Device, DeviceCommands, BaseMethod, etc.)
|
|
947
|
+
* @param sdkInstanceId SDK instance ID (optional)
|
|
948
|
+
* @returns Format: <SDK>.<type>-<number>-<timestamp>
|
|
949
|
+
* @example "SDK-1.Device-1-123456" or "Device-1-123456"
|
|
950
|
+
*/
|
|
951
|
+
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
952
|
+
/**
|
|
953
|
+
* Request context information
|
|
954
|
+
*/
|
|
955
|
+
interface RequestContext {
|
|
956
|
+
/** Request unique ID (reuses BaseMethod.responseID) */
|
|
957
|
+
responseID: number;
|
|
958
|
+
/** SDK instance ID */
|
|
959
|
+
sdkInstanceId?: string;
|
|
960
|
+
/** API method name */
|
|
961
|
+
methodName: string;
|
|
962
|
+
/** Device connection ID */
|
|
963
|
+
connectId?: string;
|
|
964
|
+
/** Device instance ID */
|
|
965
|
+
deviceInstanceId?: string;
|
|
966
|
+
/** DeviceCommands instance ID */
|
|
967
|
+
commandsInstanceId?: string;
|
|
968
|
+
/** Parent request ID (for nested calls like allNetworkGetAddress) */
|
|
969
|
+
parentResponseID?: number;
|
|
970
|
+
/** Request start time */
|
|
971
|
+
startTime: number;
|
|
972
|
+
/** Request end time */
|
|
973
|
+
endTime?: number;
|
|
974
|
+
/** Request status */
|
|
975
|
+
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
976
|
+
/** Error message */
|
|
977
|
+
error?: string;
|
|
978
|
+
}
|
|
979
|
+
/**
|
|
980
|
+
* SDK instance tracing context
|
|
981
|
+
*/
|
|
982
|
+
interface SdkTracingContext {
|
|
983
|
+
/** SDK instance ID */
|
|
984
|
+
sdkInstanceId: string;
|
|
985
|
+
/** Creation timestamp */
|
|
986
|
+
createdAt: number;
|
|
987
|
+
/** Active requests */
|
|
988
|
+
activeRequests: Map<number, RequestContext>;
|
|
989
|
+
}
|
|
990
|
+
/**
|
|
991
|
+
* Create SDK instance tracing context
|
|
992
|
+
*/
|
|
993
|
+
declare function createSdkTracingContext(): SdkTracingContext;
|
|
994
|
+
/**
|
|
995
|
+
* Create and register request context
|
|
996
|
+
* @param responseID Request ID (reuses BaseMethod.responseID)
|
|
997
|
+
* @param methodName API method name
|
|
998
|
+
* @param options Additional options
|
|
999
|
+
*/
|
|
1000
|
+
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
1001
|
+
sdkInstanceId?: string;
|
|
1002
|
+
connectId?: string;
|
|
1003
|
+
deviceInstanceId?: string;
|
|
1004
|
+
commandsInstanceId?: string;
|
|
1005
|
+
parentResponseID?: number;
|
|
1006
|
+
}): RequestContext;
|
|
1007
|
+
/**
|
|
1008
|
+
* Update request context
|
|
1009
|
+
*/
|
|
1010
|
+
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
1011
|
+
/**
|
|
1012
|
+
* Complete request context
|
|
1013
|
+
*/
|
|
1014
|
+
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
1015
|
+
/**
|
|
1016
|
+
* Get active requests for specific Device instance
|
|
1017
|
+
*/
|
|
1018
|
+
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
1019
|
+
/**
|
|
1020
|
+
* Format request context for logging
|
|
1021
|
+
*/
|
|
1022
|
+
declare function formatRequestContext(context: RequestContext): string;
|
|
1023
|
+
/**
|
|
1024
|
+
* Cleanup specific SDK instance
|
|
1025
|
+
*/
|
|
1026
|
+
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
1027
|
+
|
|
1028
|
+
declare class Core extends EventEmitter {
|
|
1029
|
+
private tracingContext;
|
|
1030
|
+
readonly sdkInstanceId: string;
|
|
1031
|
+
private requestQueue;
|
|
1032
|
+
private disposePromise?;
|
|
1033
|
+
private prePendingCallPromise;
|
|
1034
|
+
private methodSynchronize;
|
|
1035
|
+
constructor();
|
|
1036
|
+
private getCoreContext;
|
|
1037
|
+
handleMessage(message: CoreMessage): Promise<any>;
|
|
1038
|
+
dispose(): Promise<void>;
|
|
1039
|
+
private disposeResources;
|
|
1040
|
+
}
|
|
1041
|
+
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
1042
|
+
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
1043
|
+
env: ConnectSettings['env'];
|
|
1044
|
+
Transport: any;
|
|
1045
|
+
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
1046
|
+
}) => void;
|
|
1047
|
+
|
|
1048
|
+
declare const PRO2_WALLPAPER_WIDTH = 604;
|
|
1049
|
+
declare const PRO2_WALLPAPER_HEIGHT = 1024;
|
|
1050
|
+
type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
|
|
1051
|
+
declare function encodePro2Wallpaper(options: {
|
|
1052
|
+
width: number;
|
|
1053
|
+
height: number;
|
|
1054
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
1055
|
+
}): {
|
|
1056
|
+
data: Uint8Array;
|
|
1057
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
780
1058
|
};
|
|
781
|
-
|
|
782
|
-
type
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
789
|
-
ble: IBLEFirmwareReleaseInfo[];
|
|
790
|
-
};
|
|
1059
|
+
|
|
1060
|
+
type DeviceUploadWallpaperParams = {
|
|
1061
|
+
width: number;
|
|
1062
|
+
height: number;
|
|
1063
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
1064
|
+
fileName?: string;
|
|
1065
|
+
chunkSize?: number;
|
|
791
1066
|
};
|
|
792
|
-
type
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
1067
|
+
type DeviceUploadWallpaperResponse = {
|
|
1068
|
+
path: string;
|
|
1069
|
+
size: number;
|
|
1070
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
1071
|
+
message?: string;
|
|
1072
|
+
};
|
|
1073
|
+
|
|
1074
|
+
type FileInfo = {
|
|
1075
|
+
path: string;
|
|
1076
|
+
offset: number;
|
|
1077
|
+
total_size: number;
|
|
1078
|
+
data?: Uint8Array;
|
|
1079
|
+
data_hash?: number;
|
|
1080
|
+
processed_byte?: number;
|
|
1081
|
+
chunks?: number;
|
|
1082
|
+
};
|
|
1083
|
+
type TestProtocolV2PingParams = CommonParams & {
|
|
1084
|
+
/** Firmware diagnostic echo payload, limited to 63 UTF-8 bytes. */
|
|
1085
|
+
message?: string;
|
|
1086
|
+
};
|
|
1087
|
+
declare function testProtocolV2Ping(connectId: string, params?: TestProtocolV2PingParams): Response<Success$1>;
|
|
1088
|
+
declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
1089
|
+
declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<OnboardingStatus>;
|
|
1090
|
+
declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
|
|
1091
|
+
declare function uploadPortfolio(connectId: string, params: {
|
|
1092
|
+
packageBytes: ArrayBuffer | Uint8Array | Blob;
|
|
1093
|
+
timeoutMs?: number | string;
|
|
1094
|
+
}): Response<FileInfo & {
|
|
1095
|
+
portfolioUpdated: true;
|
|
1096
|
+
}>;
|
|
1097
|
+
|
|
1098
|
+
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
1099
|
+
declare const off: (type: any, fn: any) => void;
|
|
1100
|
+
declare const removeAllListeners: (type: any) => void;
|
|
1101
|
+
|
|
1102
|
+
declare function uiResponse(response: UiResponseEvent): void;
|
|
1103
|
+
|
|
1104
|
+
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
1105
|
+
interface LowLevelInjectApi {
|
|
1106
|
+
call: CallMethod;
|
|
1107
|
+
eventEmitter: EventEmitter$1;
|
|
1108
|
+
init: CoreApi['init'];
|
|
1109
|
+
dispose: CoreApi['dispose'];
|
|
1110
|
+
uiResponse: CoreApi['uiResponse'];
|
|
1111
|
+
cancel: CoreApi['cancel'];
|
|
1112
|
+
updateSettings: CoreApi['updateSettings'];
|
|
1113
|
+
switchTransport: CoreApi['switchTransport'];
|
|
1114
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
1115
|
+
}
|
|
1116
|
+
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
1117
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
806
1118
|
};
|
|
807
|
-
type RemoteConfigResponse = {
|
|
808
|
-
bridge: AssetsMap['bridge'];
|
|
809
|
-
} & DeviceTypeMap;
|
|
810
1119
|
|
|
811
1120
|
declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
|
|
812
1121
|
declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
|
|
@@ -817,6 +1126,18 @@ declare function preInitialize(connectId: string, params?: CommonParams): Respon
|
|
|
817
1126
|
|
|
818
1127
|
declare function getLogs(): Response<string[]>;
|
|
819
1128
|
|
|
1129
|
+
type ClearSessionCacheParams = {
|
|
1130
|
+
deviceId?: never;
|
|
1131
|
+
passphraseState?: never;
|
|
1132
|
+
} | {
|
|
1133
|
+
deviceId: string;
|
|
1134
|
+
passphraseState?: string;
|
|
1135
|
+
};
|
|
1136
|
+
type ClearSessionCachePayload = {
|
|
1137
|
+
cleared: true;
|
|
1138
|
+
};
|
|
1139
|
+
declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
|
|
1140
|
+
|
|
820
1141
|
declare function checkBridgeStatus(): Response<boolean>;
|
|
821
1142
|
|
|
822
1143
|
type CheckBridgeReleaseResponse = {
|
|
@@ -840,165 +1161,119 @@ type CheckBootloaderReleaseParams = {
|
|
|
840
1161
|
};
|
|
841
1162
|
declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
|
|
842
1163
|
|
|
843
|
-
type
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
};
|
|
864
|
-
declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
|
|
865
|
-
|
|
866
|
-
type CheckFirmwareTypeAvailableParams = {
|
|
867
|
-
deviceType: EDeviceType;
|
|
868
|
-
firmwareType: EFirmwareType;
|
|
869
|
-
};
|
|
870
|
-
declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
|
|
871
|
-
|
|
872
|
-
declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
|
|
873
|
-
|
|
874
|
-
declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
|
|
875
|
-
|
|
876
|
-
type DeviceInfoProtocol = ProtocolType | 'unknown';
|
|
877
|
-
type DeviceInfoSource = 'features' | 'protocolV1OneKeyFeatures' | 'deviceInfo';
|
|
878
|
-
type DeviceInfoScope = 'basic' | 'versions' | 'verify' | 'full';
|
|
879
|
-
type GetDeviceInfoParams = {
|
|
880
|
-
scope?: DeviceInfoScope;
|
|
881
|
-
refresh?: boolean;
|
|
882
|
-
includeRaw?: boolean;
|
|
883
|
-
};
|
|
884
|
-
type DeviceInfoMode = 'normal' | 'bootloader' | 'notInitialized' | 'unknown';
|
|
885
|
-
type DeviceInfoStatus = {
|
|
886
|
-
mode: DeviceInfoMode;
|
|
887
|
-
initialized: boolean | null;
|
|
888
|
-
bootloaderMode: boolean | null;
|
|
889
|
-
unlocked: boolean | null;
|
|
890
|
-
passphraseProtection: boolean | null;
|
|
891
|
-
attachToPinEnabled?: boolean | null;
|
|
892
|
-
unlockedAttachPin?: boolean | null;
|
|
893
|
-
backupRequired: boolean | null;
|
|
894
|
-
noBackup: boolean | null;
|
|
895
|
-
language: string | null;
|
|
896
|
-
bleEnabled: boolean | null;
|
|
897
|
-
};
|
|
898
|
-
type DeviceProfileVersions = {
|
|
899
|
-
firmware: string | null;
|
|
900
|
-
bootloader: string | null;
|
|
901
|
-
board: string | null;
|
|
902
|
-
ble: string | null;
|
|
903
|
-
se01?: string | null;
|
|
904
|
-
se02?: string | null;
|
|
905
|
-
se03?: string | null;
|
|
906
|
-
se04?: string | null;
|
|
907
|
-
se01Boot?: string | null;
|
|
908
|
-
se02Boot?: string | null;
|
|
909
|
-
se03Boot?: string | null;
|
|
910
|
-
se04Boot?: string | null;
|
|
911
|
-
};
|
|
912
|
-
type DeviceProfileVerify = {
|
|
913
|
-
firmwareBuildId?: string;
|
|
914
|
-
firmwareHash?: string;
|
|
915
|
-
bootloaderBuildId?: string;
|
|
916
|
-
bootloaderHash?: string;
|
|
917
|
-
boardBuildId?: string;
|
|
918
|
-
boardHash?: string;
|
|
919
|
-
bleBuildId?: string;
|
|
920
|
-
bleHash?: string;
|
|
921
|
-
se01BuildId?: string;
|
|
922
|
-
se01Hash?: string;
|
|
923
|
-
se02BuildId?: string;
|
|
924
|
-
se02Hash?: string;
|
|
925
|
-
se03BuildId?: string;
|
|
926
|
-
se03Hash?: string;
|
|
927
|
-
se04BuildId?: string;
|
|
928
|
-
se04Hash?: string;
|
|
929
|
-
se01BootBuildId?: string;
|
|
930
|
-
se01BootHash?: string;
|
|
931
|
-
se02BootBuildId?: string;
|
|
932
|
-
se02BootHash?: string;
|
|
933
|
-
se03BootBuildId?: string;
|
|
934
|
-
se03BootHash?: string;
|
|
935
|
-
se04BootBuildId?: string;
|
|
936
|
-
se04BootHash?: string;
|
|
937
|
-
};
|
|
938
|
-
type DeviceProfileRaw = {
|
|
939
|
-
features?: Features;
|
|
940
|
-
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
941
|
-
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
942
|
-
};
|
|
943
|
-
type DeviceProfile = {
|
|
944
|
-
protocol: DeviceInfoProtocol;
|
|
945
|
-
sources: DeviceInfoSource[];
|
|
946
|
-
deviceType: IDeviceType;
|
|
1164
|
+
type FirmwareUpdatePlanArtifactRole = 'firmware' | 'ble' | 'bootloader' | 'resource' | 'component' | 'resourceBundle';
|
|
1165
|
+
type FirmwareUpdatePlanTarget = 'firmware' | 'ble' | 'bootloader' | FirmwareUpdateV4Target;
|
|
1166
|
+
type FirmwareUpdatePlanForceTarget = 'firmware' | 'ble' | 'bootloader' | 'resource';
|
|
1167
|
+
interface FirmwareUpdatePlanArtifact {
|
|
1168
|
+
artifactId: string;
|
|
1169
|
+
role: FirmwareUpdatePlanArtifactRole;
|
|
1170
|
+
target: FirmwareUpdatePlanTarget;
|
|
1171
|
+
url: string;
|
|
1172
|
+
container: 'raw' | 'zip';
|
|
1173
|
+
logicalName?: string;
|
|
1174
|
+
expectedSize?: number;
|
|
1175
|
+
expectedSha256?: string;
|
|
1176
|
+
targetVersion?: string;
|
|
1177
|
+
}
|
|
1178
|
+
interface FirmwareUpdatePlan {
|
|
1179
|
+
schemaVersion: 2;
|
|
1180
|
+
planDigest: string;
|
|
1181
|
+
executor: 'v2' | 'v3' | 'v4';
|
|
1182
|
+
deviceIdentity: string;
|
|
1183
|
+
deviceModel: string;
|
|
947
1184
|
firmwareType: EFirmwareType;
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
status: DeviceInfoStatus;
|
|
953
|
-
versions: DeviceProfileVersions;
|
|
954
|
-
verify?: DeviceProfileVerify;
|
|
955
|
-
raw?: DeviceProfileRaw;
|
|
956
|
-
};
|
|
957
|
-
declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
|
|
958
|
-
|
|
959
|
-
declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
|
|
960
|
-
|
|
961
|
-
type GetPassphraseStatePayload = {
|
|
962
|
-
passphraseState?: string;
|
|
963
|
-
sessionId?: string;
|
|
964
|
-
unlockedAttachPin?: boolean;
|
|
965
|
-
passphraseProtection?: boolean | null;
|
|
966
|
-
};
|
|
967
|
-
type GetPassphraseStateParams = CommonParams & {
|
|
968
|
-
allowCreateAttachPin?: boolean;
|
|
969
|
-
};
|
|
970
|
-
declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<GetPassphraseStatePayload>;
|
|
971
|
-
|
|
972
|
-
type FirmwareRelease$1 = {
|
|
973
|
-
status: IDeviceFirmwareStatus;
|
|
974
|
-
changelog: {
|
|
975
|
-
'en-US': string;
|
|
976
|
-
'zh-CN': string;
|
|
977
|
-
}[];
|
|
978
|
-
release: IFirmwareReleaseInfo;
|
|
979
|
-
bootloaderMode: boolean;
|
|
980
|
-
};
|
|
981
|
-
type CheckFirmwareReleaseParams = {
|
|
982
|
-
firmwareType?: EFirmwareType;
|
|
983
|
-
};
|
|
984
|
-
declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
|
|
1185
|
+
platform: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
1186
|
+
artifacts: FirmwareUpdatePlanArtifact[];
|
|
1187
|
+
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
1188
|
+
}
|
|
985
1189
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
}
|
|
995
|
-
|
|
1190
|
+
interface FirmwareUpdatePreparedEntry {
|
|
1191
|
+
entryName: string;
|
|
1192
|
+
artifact: FirmwareArtifactReference;
|
|
1193
|
+
}
|
|
1194
|
+
interface FirmwareUpdatePreparedArtifactInput {
|
|
1195
|
+
artifactId: string;
|
|
1196
|
+
artifact: FirmwareArtifactReference;
|
|
1197
|
+
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
1198
|
+
}
|
|
1199
|
+
interface FirmwareUpdatePreparedArtifact {
|
|
1200
|
+
artifactId: string;
|
|
1201
|
+
role: FirmwareUpdatePlanArtifactRole;
|
|
1202
|
+
target: FirmwareUpdatePlanTarget;
|
|
1203
|
+
container: 'raw' | 'zip';
|
|
1204
|
+
logicalName?: string;
|
|
1205
|
+
targetVersion?: string;
|
|
1206
|
+
artifact: FirmwareArtifactReference;
|
|
1207
|
+
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
1208
|
+
}
|
|
1209
|
+
interface FirmwareUpdatePreparedPlan {
|
|
1210
|
+
schemaVersion: 2;
|
|
1211
|
+
preparedPlanDigest: string;
|
|
1212
|
+
planDigest: string;
|
|
1213
|
+
networkPolicy: 'forbid';
|
|
1214
|
+
executor: FirmwareUpdatePlan['executor'];
|
|
1215
|
+
deviceIdentity: string;
|
|
1216
|
+
deviceModel: string;
|
|
1217
|
+
firmwareType: FirmwareUpdatePlan['firmwareType'];
|
|
1218
|
+
platform: FirmwareUpdatePlan['platform'];
|
|
1219
|
+
leaseRef: string;
|
|
1220
|
+
artifacts: FirmwareUpdatePreparedArtifact[];
|
|
1221
|
+
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
1222
|
+
}
|
|
1223
|
+
declare function prepareFirmwareUpdatePlan(input: {
|
|
1224
|
+
plan: FirmwareUpdatePlan;
|
|
1225
|
+
leaseRef: string;
|
|
1226
|
+
artifacts: FirmwareUpdatePreparedArtifactInput[];
|
|
1227
|
+
}): FirmwareUpdatePreparedPlan;
|
|
1228
|
+
declare function validateFirmwareUpdatePreparedPlan(value: unknown): FirmwareUpdatePreparedPlan;
|
|
996
1229
|
|
|
997
1230
|
type IUpdateType = 'firmware' | 'ble';
|
|
1231
|
+
interface FirmwareArtifactReference {
|
|
1232
|
+
artifactRef: string;
|
|
1233
|
+
size: number;
|
|
1234
|
+
sha256: string;
|
|
1235
|
+
}
|
|
1236
|
+
interface FirmwareArtifactReader {
|
|
1237
|
+
open(input: {
|
|
1238
|
+
artifactRef: string;
|
|
1239
|
+
}): Promise<{
|
|
1240
|
+
readerId: string;
|
|
1241
|
+
size: number;
|
|
1242
|
+
}>;
|
|
1243
|
+
read(input: {
|
|
1244
|
+
readerId: string;
|
|
1245
|
+
offset: number;
|
|
1246
|
+
length: number;
|
|
1247
|
+
}): Promise<{
|
|
1248
|
+
data: ArrayBuffer;
|
|
1249
|
+
bytesRead: number;
|
|
1250
|
+
eof: boolean;
|
|
1251
|
+
}>;
|
|
1252
|
+
close(input: {
|
|
1253
|
+
readerId: string;
|
|
1254
|
+
}): Promise<void>;
|
|
1255
|
+
}
|
|
1256
|
+
interface FirmwareUpdateHostBinding {
|
|
1257
|
+
artifactReader: FirmwareArtifactReader;
|
|
1258
|
+
}
|
|
998
1259
|
interface FirmwareUpdateBinaryParams {
|
|
999
1260
|
binary: ArrayBuffer;
|
|
1000
1261
|
updateType: IUpdateType;
|
|
1001
1262
|
}
|
|
1263
|
+
interface FirmwareUpdateArtifactParams {
|
|
1264
|
+
preparedPlan: FirmwareUpdatePreparedPlan;
|
|
1265
|
+
hostBindingGeneration: number;
|
|
1266
|
+
artifact: FirmwareArtifactReference;
|
|
1267
|
+
resourceArtifact?: FirmwareArtifactReference;
|
|
1268
|
+
resourceEntries?: Array<{
|
|
1269
|
+
entryName: string;
|
|
1270
|
+
artifact: FirmwareArtifactReference;
|
|
1271
|
+
}>;
|
|
1272
|
+
updateType: IUpdateType;
|
|
1273
|
+
forcedUpdateRes?: boolean;
|
|
1274
|
+
isUpdateBootloader?: boolean;
|
|
1275
|
+
firmwareType?: EFirmwareType;
|
|
1276
|
+
}
|
|
1002
1277
|
interface FirmwareUpdateParams {
|
|
1003
1278
|
version?: number[];
|
|
1004
1279
|
updateType: IUpdateType;
|
|
@@ -1018,7 +1293,10 @@ type Platform = {
|
|
|
1018
1293
|
};
|
|
1019
1294
|
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateParams & Platform>): Response<Messages.Success>;
|
|
1020
1295
|
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams & Platform>): Response<Messages.Success>;
|
|
1296
|
+
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateArtifactParams & Platform>): Response<Messages.Success>;
|
|
1021
1297
|
interface FirmwareUpdateV3Params {
|
|
1298
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1299
|
+
hostBindingGeneration?: number;
|
|
1022
1300
|
bleVersion?: number[];
|
|
1023
1301
|
bleBinary?: ArrayBuffer;
|
|
1024
1302
|
chunkSize?: number;
|
|
@@ -1030,23 +1308,65 @@ interface FirmwareUpdateV3Params {
|
|
|
1030
1308
|
forcedUpdateRes?: boolean;
|
|
1031
1309
|
firmwareType?: EFirmwareType;
|
|
1032
1310
|
platform: IPlatform;
|
|
1311
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1312
|
+
artifacts?: {
|
|
1313
|
+
ble?: FirmwareArtifactReference;
|
|
1314
|
+
firmware?: FirmwareArtifactReference;
|
|
1315
|
+
bootloader?: FirmwareArtifactReference;
|
|
1316
|
+
resourceEntries?: Array<{
|
|
1317
|
+
entryName: string;
|
|
1318
|
+
artifact: FirmwareArtifactReference;
|
|
1319
|
+
}>;
|
|
1320
|
+
};
|
|
1033
1321
|
}
|
|
1322
|
+
/**
|
|
1323
|
+
* firmwareUpdateV4 target binaries grouped by DeviceFirmwareTargetType.
|
|
1324
|
+
* Except for romloader, each field maps to a target accepted by bootloader.
|
|
1325
|
+
*/
|
|
1326
|
+
type FirmwareUpdateV4Target = 'boot' | 'app_v1' | 'app_v2' | 'coprocessor' | 'resource' | 'se01' | 'se02' | 'se03' | 'se04';
|
|
1034
1327
|
interface FirmwareUpdateV4Params {
|
|
1328
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1329
|
+
hostBindingGeneration?: number;
|
|
1035
1330
|
platform: IPlatform;
|
|
1331
|
+
expectedDeviceId?: string;
|
|
1036
1332
|
chunkSize?: number;
|
|
1037
1333
|
firmwareType?: EFirmwareType;
|
|
1334
|
+
targetsToUpdate?: FirmwareUpdateV4Target[];
|
|
1335
|
+
expectedTargetVersions?: Partial<Record<FirmwareUpdateV4Target, string>>;
|
|
1336
|
+
/** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
|
|
1038
1337
|
romloaderBinary?: ArrayBuffer;
|
|
1338
|
+
/** FW_MGMT_TARGET_BOOTLOADER = 3 */
|
|
1039
1339
|
bootloaderBinary?: ArrayBuffer;
|
|
1340
|
+
/** FW_MGMT_TARGET_APPLICATION_P1 = 4 */
|
|
1040
1341
|
applicationP1Binary?: ArrayBuffer;
|
|
1342
|
+
/** FW_MGMT_TARGET_APPLICATION_P2 = 5 */
|
|
1041
1343
|
applicationP2Binary?: ArrayBuffer;
|
|
1344
|
+
/** FW_MGMT_TARGET_COPROCESSOR = 6 */
|
|
1042
1345
|
coprocessorBinary?: ArrayBuffer;
|
|
1346
|
+
/** FW_MGMT_TARGET_SE01-04 = 7-10 */
|
|
1043
1347
|
se01Binary?: ArrayBuffer;
|
|
1044
1348
|
se02Binary?: ArrayBuffer;
|
|
1045
1349
|
se03Binary?: ArrayBuffer;
|
|
1046
1350
|
se04Binary?: ArrayBuffer;
|
|
1047
|
-
resourceBinaries?: ArrayBuffer[];
|
|
1048
1351
|
forcedUpdateRes?: boolean;
|
|
1352
|
+
/**
|
|
1353
|
+
* RESC bundle okpkg files written directly to devicePath through FilesystemFileWrite.
|
|
1354
|
+
* Manual mode installs them without version comparison.
|
|
1355
|
+
*/
|
|
1356
|
+
resourceBundleFiles?: Array<{
|
|
1357
|
+
binary: ArrayBuffer;
|
|
1358
|
+
devicePath: string;
|
|
1359
|
+
}>;
|
|
1360
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1361
|
+
componentArtifacts?: Partial<Record<Exclude<FirmwareUpdateV4Target, 'resource'>, FirmwareArtifactReference>>;
|
|
1362
|
+
resourceBundleArtifacts?: Array<{
|
|
1363
|
+
name: string;
|
|
1364
|
+
artifact: FirmwareArtifactReference;
|
|
1365
|
+
}>;
|
|
1049
1366
|
}
|
|
1367
|
+
declare function registerFirmwareUpdateHostBinding$1(binding: FirmwareUpdateHostBinding): number;
|
|
1368
|
+
declare function unregisterFirmwareUpdateHostBinding$1(generation?: number): boolean;
|
|
1369
|
+
declare function getFirmwareUpdateHostBindingGeneration$1(): number;
|
|
1050
1370
|
declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
|
|
1051
1371
|
bleVersion: string;
|
|
1052
1372
|
firmwareVersion: string;
|
|
@@ -1058,6 +1378,152 @@ declare function firmwareUpdateV4(connectId: string | undefined, params: Params<
|
|
|
1058
1378
|
bootloaderVersion: string;
|
|
1059
1379
|
}>;
|
|
1060
1380
|
|
|
1381
|
+
type FirmwareRelease$2 = {
|
|
1382
|
+
shouldUpdate?: boolean;
|
|
1383
|
+
status: IDeviceFirmwareStatus;
|
|
1384
|
+
changelog?: {
|
|
1385
|
+
'zh-CN': string;
|
|
1386
|
+
'en-US': string;
|
|
1387
|
+
}[];
|
|
1388
|
+
release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo | IFirmwareReleaseInfo;
|
|
1389
|
+
bootloaderMode?: boolean;
|
|
1390
|
+
};
|
|
1391
|
+
type ProtocolV2FirmwareComponentReleaseStatus = 'valid' | 'outdated' | 'unknown' | 'unsupported';
|
|
1392
|
+
type ProtocolV2FirmwareReleaseStatus = 'unavailable' | 'valid' | 'unknown' | 'outdated' | 'required';
|
|
1393
|
+
type ProtocolV2FirmwareComponentRelease = {
|
|
1394
|
+
configKey: string;
|
|
1395
|
+
componentTarget: IProtocolV2FirmwareComponentTarget;
|
|
1396
|
+
updateTarget: FirmwareUpdateV4Target | null;
|
|
1397
|
+
currentVersion: string | null;
|
|
1398
|
+
targetVersion: string | null;
|
|
1399
|
+
status: ProtocolV2FirmwareComponentReleaseStatus;
|
|
1400
|
+
required: boolean;
|
|
1401
|
+
};
|
|
1402
|
+
type AllFirmwareRelease = {
|
|
1403
|
+
firmware: FirmwareRelease$2;
|
|
1404
|
+
ble: FirmwareRelease$2;
|
|
1405
|
+
bootloader?: FirmwareRelease$2;
|
|
1406
|
+
bridge?: FirmwareRelease$2;
|
|
1407
|
+
features?: Features;
|
|
1408
|
+
protocol?: 'V1' | 'V2';
|
|
1409
|
+
deviceType?: 'pro2';
|
|
1410
|
+
firmwareType?: EFirmwareType;
|
|
1411
|
+
status?: ProtocolV2FirmwareReleaseStatus;
|
|
1412
|
+
hasUpgrade?: boolean;
|
|
1413
|
+
required?: boolean;
|
|
1414
|
+
currentVersions?: DeviceStateVersions;
|
|
1415
|
+
components?: ProtocolV2FirmwareComponentRelease[];
|
|
1416
|
+
targetsToUpdate?: FirmwareUpdateV4Target[];
|
|
1417
|
+
release?: IFirmwareReleaseInfo;
|
|
1418
|
+
firmwareUpdatePlan?: FirmwareUpdatePlan;
|
|
1419
|
+
};
|
|
1420
|
+
type CheckAllFirmwareReleaseParams = {
|
|
1421
|
+
checkBridgeRelease?: boolean;
|
|
1422
|
+
firmwareType?: EFirmwareType;
|
|
1423
|
+
platform?: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
1424
|
+
forceUpdateTargets?: FirmwareUpdatePlanForceTarget[];
|
|
1425
|
+
};
|
|
1426
|
+
declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
|
|
1427
|
+
|
|
1428
|
+
type CheckFirmwareTypeAvailableParams = {
|
|
1429
|
+
deviceType: EDeviceType;
|
|
1430
|
+
firmwareType: EFirmwareType;
|
|
1431
|
+
};
|
|
1432
|
+
declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
|
|
1433
|
+
|
|
1434
|
+
declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
|
|
1435
|
+
|
|
1436
|
+
/**
|
|
1437
|
+
* @deprecated Use `getDeviceState` for both Protocol V1 and Protocol V2 devices.
|
|
1438
|
+
*/
|
|
1439
|
+
declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
|
|
1440
|
+
|
|
1441
|
+
/**
|
|
1442
|
+
* @deprecated Use `getDeviceState(connectId, { scope: 'firmware' })`.
|
|
1443
|
+
*/
|
|
1444
|
+
declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
|
|
1445
|
+
|
|
1446
|
+
type GetPassphraseStateParams = CommonParams;
|
|
1447
|
+
/**
|
|
1448
|
+
* Compatibility wallet-state API for existing App integrations.
|
|
1449
|
+
*
|
|
1450
|
+
* Protocol V1 keeps its parameterless firmware flow. Protocol V2 maps the existing
|
|
1451
|
+
* `useEmptyPassphrase` and `initSession` intent to the device-only wallet-session flow.
|
|
1452
|
+
* New integrations should prefer `openWalletSession` for explicit wallet intent.
|
|
1453
|
+
*/
|
|
1454
|
+
declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
|
|
1455
|
+
|
|
1456
|
+
declare const OpenWalletSessionMode: {
|
|
1457
|
+
readonly Standard: "standard";
|
|
1458
|
+
readonly SelectHidden: "select-hidden";
|
|
1459
|
+
readonly ResumeHidden: "resume-hidden";
|
|
1460
|
+
};
|
|
1461
|
+
type OpenWalletSessionModeValue = (typeof OpenWalletSessionMode)[keyof typeof OpenWalletSessionMode];
|
|
1462
|
+
type OpenWalletSessionParams = {
|
|
1463
|
+
mode: typeof OpenWalletSessionMode.Standard;
|
|
1464
|
+
deviceId?: never;
|
|
1465
|
+
passphraseState?: never;
|
|
1466
|
+
} | {
|
|
1467
|
+
mode: typeof OpenWalletSessionMode.SelectHidden;
|
|
1468
|
+
deviceId?: never;
|
|
1469
|
+
passphraseState?: never;
|
|
1470
|
+
} | {
|
|
1471
|
+
mode: typeof OpenWalletSessionMode.ResumeHidden;
|
|
1472
|
+
deviceId: string;
|
|
1473
|
+
passphraseState: string;
|
|
1474
|
+
};
|
|
1475
|
+
type OpenWalletSessionPayloadBase = {
|
|
1476
|
+
protocol: 'V1' | 'V2';
|
|
1477
|
+
deviceId: string;
|
|
1478
|
+
resumed: boolean;
|
|
1479
|
+
};
|
|
1480
|
+
type OpenWalletSessionPayload = OpenWalletSessionPayloadBase & ({
|
|
1481
|
+
walletType: 'standard';
|
|
1482
|
+
passphraseState: null;
|
|
1483
|
+
} | {
|
|
1484
|
+
walletType: 'hidden';
|
|
1485
|
+
passphraseState: string;
|
|
1486
|
+
});
|
|
1487
|
+
/**
|
|
1488
|
+
* Opens the standard, hidden, or Attach-to-PIN wallet flow through a unified
|
|
1489
|
+
* Protocol V1/V2 API.
|
|
1490
|
+
*/
|
|
1491
|
+
declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
|
|
1492
|
+
|
|
1493
|
+
type FirmwareRelease$1 = {
|
|
1494
|
+
status: IDeviceFirmwareStatus;
|
|
1495
|
+
changelog: {
|
|
1496
|
+
'en-US': string;
|
|
1497
|
+
'zh-CN': string;
|
|
1498
|
+
}[];
|
|
1499
|
+
release: IFirmwareReleaseInfo;
|
|
1500
|
+
bootloaderMode: boolean;
|
|
1501
|
+
};
|
|
1502
|
+
type CheckFirmwareReleaseParams = {
|
|
1503
|
+
firmwareType?: EFirmwareType;
|
|
1504
|
+
};
|
|
1505
|
+
declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
|
|
1506
|
+
|
|
1507
|
+
type BleFirmwareRelease = {
|
|
1508
|
+
status: IDeviceBLEFirmwareStatus;
|
|
1509
|
+
changelog: {
|
|
1510
|
+
'zh-CN': string;
|
|
1511
|
+
'en-US': string;
|
|
1512
|
+
}[];
|
|
1513
|
+
release: IBLEFirmwareReleaseInfo;
|
|
1514
|
+
bootloaderMode: boolean;
|
|
1515
|
+
};
|
|
1516
|
+
declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
|
|
1517
|
+
|
|
1518
|
+
interface FirmwareUpdateCapabilities {
|
|
1519
|
+
planSchemaVersion: 2;
|
|
1520
|
+
preparedPlanSchemaVersion: 2;
|
|
1521
|
+
hostBindingProtocolVersion: 2;
|
|
1522
|
+
manifestModes: Array<'external-only' | 'sdk-managed'>;
|
|
1523
|
+
supportsArtifactReader: true;
|
|
1524
|
+
}
|
|
1525
|
+
declare function getFirmwareUpdateCapabilities(): FirmwareUpdateCapabilities;
|
|
1526
|
+
|
|
1061
1527
|
declare function promptWebDeviceAccess(options?: {
|
|
1062
1528
|
deviceSerialNumberFromUI?: string;
|
|
1063
1529
|
}): Response<{
|
|
@@ -1117,16 +1583,40 @@ type DeviceSettingsParams = {
|
|
|
1117
1583
|
language?: string;
|
|
1118
1584
|
label?: string;
|
|
1119
1585
|
usePassphrase?: boolean;
|
|
1586
|
+
/** Protocol V1 only. */
|
|
1120
1587
|
homescreen?: string;
|
|
1588
|
+
/** Protocol V1 only. */
|
|
1121
1589
|
passphraseSource?: number;
|
|
1122
1590
|
autoLockDelayMs?: number;
|
|
1591
|
+
/** Protocol V1 only. */
|
|
1123
1592
|
displayRotation?: number;
|
|
1593
|
+
/** Protocol V1 only. */
|
|
1124
1594
|
passphraseAlwaysOnDevice?: boolean;
|
|
1125
|
-
|
|
1595
|
+
/** Protocol V1 only. Uses Enum_SafetyCheckLevel numeric values. */
|
|
1596
|
+
safetyChecks?: Enum_SafetyCheckLevel;
|
|
1597
|
+
/** Protocol V1 only; the current Protocol V2 schema has no matching field. */
|
|
1126
1598
|
experimentalFeatures?: boolean;
|
|
1127
1599
|
autoShutdownDelayMs?: number;
|
|
1600
|
+
/** Protocol V1 only; opens the legacy device-side brightness flow. */
|
|
1128
1601
|
changeBrightness?: boolean;
|
|
1602
|
+
/** Protocol V2 only. */
|
|
1603
|
+
brightness?: number;
|
|
1129
1604
|
hapticFeedback?: boolean;
|
|
1605
|
+
bluetoothEnabled?: boolean;
|
|
1606
|
+
/** Protocol V2 only; changed through an on-device confirmation page. */
|
|
1607
|
+
airgapMode?: boolean;
|
|
1608
|
+
/** Protocol V2 only. */
|
|
1609
|
+
animationEnabled?: boolean;
|
|
1610
|
+
/** Protocol V2 only. */
|
|
1611
|
+
tapToWake?: boolean;
|
|
1612
|
+
/** Protocol V2 only. */
|
|
1613
|
+
deviceNameDisplayEnabled?: boolean;
|
|
1614
|
+
/** Protocol V2 only. */
|
|
1615
|
+
fidoEnabled?: boolean;
|
|
1616
|
+
/** Protocol V2 only. */
|
|
1617
|
+
usbLockEnabled?: boolean;
|
|
1618
|
+
/** Protocol V2 only. */
|
|
1619
|
+
randomKeypad?: boolean;
|
|
1130
1620
|
};
|
|
1131
1621
|
declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
|
|
1132
1622
|
|
|
@@ -1152,7 +1642,7 @@ type DeviceUploadResourceResponse = Success$1 & {
|
|
|
1152
1642
|
declare function deviceUploadResource(connectId: string, params: CommonParams & DeviceUploadResourceParams): Response<DeviceUploadResourceResponse>;
|
|
1153
1643
|
|
|
1154
1644
|
type DeviceSupportFeatures = SupportFeatures & {
|
|
1155
|
-
device: Device | null;
|
|
1645
|
+
device: Device$1 | null;
|
|
1156
1646
|
};
|
|
1157
1647
|
declare function deviceSupportFeatures(connectId?: string): Response<DeviceSupportFeatures>;
|
|
1158
1648
|
|
|
@@ -1161,14 +1651,18 @@ declare function deviceFullyUploadResource(connectId: string, params: CommonPara
|
|
|
1161
1651
|
}): Response<Success$1>;
|
|
1162
1652
|
|
|
1163
1653
|
type DeviceUpdateBootloaderParams = {
|
|
1654
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1655
|
+
hostBindingGeneration?: number;
|
|
1164
1656
|
binary?: ArrayBuffer;
|
|
1657
|
+
artifact?: FirmwareArtifactReference;
|
|
1658
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1165
1659
|
firmwareType?: EFirmwareType;
|
|
1166
1660
|
};
|
|
1167
1661
|
declare function deviceUpdateBootloader(connectId: string, params?: DeviceUpdateBootloaderParams): Response<Success$1>;
|
|
1168
1662
|
|
|
1169
1663
|
declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1170
1664
|
|
|
1171
|
-
declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features
|
|
1665
|
+
declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features>;
|
|
1172
1666
|
|
|
1173
1667
|
declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1174
1668
|
|
|
@@ -1372,6 +1866,9 @@ type AllNetworkAddressParams = {
|
|
|
1372
1866
|
type AllNetworkAddressPayload = {
|
|
1373
1867
|
address: string;
|
|
1374
1868
|
pub?: string;
|
|
1869
|
+
/**
|
|
1870
|
+
* @deprecated Use `pub` instead.
|
|
1871
|
+
*/
|
|
1375
1872
|
publicKey?: string;
|
|
1376
1873
|
npub?: string;
|
|
1377
1874
|
} | {
|
|
@@ -1437,6 +1934,9 @@ declare function evmGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
1437
1934
|
type EVMPublicKey = {
|
|
1438
1935
|
path: string;
|
|
1439
1936
|
pub: string;
|
|
1937
|
+
/**
|
|
1938
|
+
* @deprecated Use `pub` instead.
|
|
1939
|
+
*/
|
|
1440
1940
|
publicKey?: string;
|
|
1441
1941
|
} & EthereumPublicKey;
|
|
1442
1942
|
type EVMGetPublicKeyParams = {
|
|
@@ -2220,6 +2720,9 @@ declare function nearSignTransaction(connectId: string, deviceId: string, params
|
|
|
2220
2720
|
type AptosAddress = {
|
|
2221
2721
|
path: string;
|
|
2222
2722
|
pub?: string;
|
|
2723
|
+
/**
|
|
2724
|
+
* @deprecated Use `pub` instead.
|
|
2725
|
+
*/
|
|
2223
2726
|
publicKey?: string;
|
|
2224
2727
|
} & AptosAddress$1;
|
|
2225
2728
|
type AptosGetAddressParams = {
|
|
@@ -2234,6 +2737,9 @@ declare function aptosGetAddress(connectId: string, deviceId: string, params: Co
|
|
|
2234
2737
|
type AptosPublicKey = {
|
|
2235
2738
|
path: string;
|
|
2236
2739
|
pub: string;
|
|
2740
|
+
/**
|
|
2741
|
+
* @deprecated Use `pub` instead.
|
|
2742
|
+
*/
|
|
2237
2743
|
publicKey?: string;
|
|
2238
2744
|
};
|
|
2239
2745
|
type AptosGetPublicKeyParams = {
|
|
@@ -2318,6 +2824,9 @@ declare function cosmosGetAddress(connectId: string, deviceId: string, params: C
|
|
|
2318
2824
|
type CosmosPublicKey = {
|
|
2319
2825
|
path: string;
|
|
2320
2826
|
pub: string;
|
|
2827
|
+
/**
|
|
2828
|
+
* @deprecated Use `pub` instead.
|
|
2829
|
+
*/
|
|
2321
2830
|
publicKey?: string;
|
|
2322
2831
|
};
|
|
2323
2832
|
type CosmosGetPublicKeyParams = {
|
|
@@ -2342,6 +2851,9 @@ declare function cosmosSignTransaction(connectId: string, deviceId: string, para
|
|
|
2342
2851
|
type XrpAddress = {
|
|
2343
2852
|
path: string;
|
|
2344
2853
|
pub?: string;
|
|
2854
|
+
/**
|
|
2855
|
+
* @deprecated Use `pub` instead.
|
|
2856
|
+
*/
|
|
2345
2857
|
publicKey?: string;
|
|
2346
2858
|
address: string;
|
|
2347
2859
|
};
|
|
@@ -2375,6 +2887,9 @@ declare function xrpSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2375
2887
|
type SuiAddress = {
|
|
2376
2888
|
path: string;
|
|
2377
2889
|
pub?: string;
|
|
2890
|
+
/**
|
|
2891
|
+
* @deprecated Use `pub` instead.
|
|
2892
|
+
*/
|
|
2378
2893
|
publicKey?: string;
|
|
2379
2894
|
} & SuiAddress$1;
|
|
2380
2895
|
type SuiGetAddressParams = {
|
|
@@ -2389,6 +2904,9 @@ declare function suiGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
2389
2904
|
type SuiPublicKey = {
|
|
2390
2905
|
path: string;
|
|
2391
2906
|
pub: string;
|
|
2907
|
+
/**
|
|
2908
|
+
* @deprecated Use `pub` instead.
|
|
2909
|
+
*/
|
|
2392
2910
|
publicKey?: string;
|
|
2393
2911
|
};
|
|
2394
2912
|
type SuiGetPublicKeyParams = {
|
|
@@ -2418,6 +2936,10 @@ declare function suiSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2418
2936
|
type CardanoGetAddressMethodParams = {
|
|
2419
2937
|
addressParameters: CardanoAddressParameters;
|
|
2420
2938
|
networkId: number;
|
|
2939
|
+
/**
|
|
2940
|
+
* Testnet cip34:0-1097911063
|
|
2941
|
+
* Mainnet cip34:1-764824073
|
|
2942
|
+
*/
|
|
2421
2943
|
protocolMagic: number;
|
|
2422
2944
|
derivationType: number;
|
|
2423
2945
|
address?: string;
|
|
@@ -2479,6 +3001,10 @@ type CardanoSignMessageMethodParams = {
|
|
|
2479
3001
|
derivationType: number;
|
|
2480
3002
|
networkId: number;
|
|
2481
3003
|
addressType?: Messages.CardanoAddressType;
|
|
3004
|
+
/**
|
|
3005
|
+
* Testnet cip34:0-1097911063
|
|
3006
|
+
* Mainnet cip34:1-764824073
|
|
3007
|
+
*/
|
|
2482
3008
|
protocolMagic?: number;
|
|
2483
3009
|
};
|
|
2484
3010
|
declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
|
|
@@ -2512,6 +3038,9 @@ declare function filecoinSignTransaction(connectId: string, deviceId: string, pa
|
|
|
2512
3038
|
type PolkadotAddress = {
|
|
2513
3039
|
path: string;
|
|
2514
3040
|
pub: string;
|
|
3041
|
+
/**
|
|
3042
|
+
* @deprecated Use `pub` instead.
|
|
3043
|
+
*/
|
|
2515
3044
|
publicKey?: string;
|
|
2516
3045
|
} & PolkadotAddress$1;
|
|
2517
3046
|
type PolkadotGetAddressParams = {
|
|
@@ -2570,23 +3099,61 @@ type KaspaSignInputParams = {
|
|
|
2570
3099
|
sequenceNumber: number | string;
|
|
2571
3100
|
output: {
|
|
2572
3101
|
satoshis: number | string;
|
|
2573
|
-
script
|
|
3102
|
+
script?: string;
|
|
2574
3103
|
};
|
|
2575
3104
|
sigOpCount?: number;
|
|
2576
3105
|
};
|
|
2577
3106
|
type KaspaSignOutputParams = {
|
|
2578
3107
|
satoshis: number | string;
|
|
3108
|
+
address?: string;
|
|
3109
|
+
addressN?: string | number[];
|
|
3110
|
+
script?: string;
|
|
3111
|
+
scriptVersion?: number;
|
|
3112
|
+
};
|
|
3113
|
+
type KaspaStreamingSignInputParams = Omit<KaspaSignInputParams, 'output'> & {
|
|
3114
|
+
output: {
|
|
3115
|
+
satoshis: number | string;
|
|
3116
|
+
script?: string;
|
|
3117
|
+
};
|
|
3118
|
+
};
|
|
3119
|
+
type KaspaStreamingSignOutputParams = {
|
|
3120
|
+
satoshis: number | string;
|
|
3121
|
+
address?: string;
|
|
3122
|
+
addressN?: string | number[];
|
|
3123
|
+
script?: string;
|
|
3124
|
+
scriptVersion?: number;
|
|
3125
|
+
};
|
|
3126
|
+
type KaspaRefTransactionInput = {
|
|
3127
|
+
prevTxId: string;
|
|
3128
|
+
outputIndex: number;
|
|
3129
|
+
sequenceNumber: number | string;
|
|
3130
|
+
};
|
|
3131
|
+
type KaspaRefTransactionOutput = {
|
|
3132
|
+
satoshis: number | string;
|
|
3133
|
+
scriptVersion?: number;
|
|
2579
3134
|
script: string;
|
|
2580
|
-
|
|
3135
|
+
};
|
|
3136
|
+
type KaspaRefTransaction = {
|
|
3137
|
+
txId: string;
|
|
3138
|
+
version: number;
|
|
3139
|
+
inputs: KaspaRefTransactionInput[];
|
|
3140
|
+
outputs: KaspaRefTransactionOutput[];
|
|
3141
|
+
lockTime?: number | string;
|
|
3142
|
+
subNetworkID?: string;
|
|
3143
|
+
gas?: number | string;
|
|
3144
|
+
payload?: string;
|
|
2581
3145
|
};
|
|
2582
3146
|
type KaspaSignTransactionParams = {
|
|
2583
3147
|
version: number;
|
|
2584
|
-
inputs: KaspaSignInputParams
|
|
2585
|
-
outputs: KaspaSignOutputParams
|
|
3148
|
+
inputs: Array<KaspaSignInputParams | KaspaStreamingSignInputParams>;
|
|
3149
|
+
outputs: Array<KaspaSignOutputParams | KaspaStreamingSignOutputParams>;
|
|
2586
3150
|
lockTime: number | string;
|
|
2587
3151
|
sigHashType?: SignatureType;
|
|
2588
3152
|
sigOpCount?: number;
|
|
2589
3153
|
subNetworkID?: string;
|
|
3154
|
+
payload?: string;
|
|
3155
|
+
gas?: number | string;
|
|
3156
|
+
refTxs?: KaspaRefTransaction[];
|
|
2590
3157
|
scheme?: string;
|
|
2591
3158
|
prefix?: string;
|
|
2592
3159
|
useTweak?: boolean;
|
|
@@ -2631,6 +3198,9 @@ declare function nexaSignTransaction(connectId: string, deviceId: string, params
|
|
|
2631
3198
|
type NostrPublicKey = {
|
|
2632
3199
|
npub?: string;
|
|
2633
3200
|
pub?: string;
|
|
3201
|
+
/**
|
|
3202
|
+
* @deprecated Use `pub` instead.
|
|
3203
|
+
*/
|
|
2634
3204
|
publicKey?: string;
|
|
2635
3205
|
path: string;
|
|
2636
3206
|
};
|
|
@@ -2727,6 +3297,9 @@ declare function nostrSignSchnorr(connectId: string, deviceId: string, params: C
|
|
|
2727
3297
|
|
|
2728
3298
|
interface LnurlAuth {
|
|
2729
3299
|
pub?: string;
|
|
3300
|
+
/**
|
|
3301
|
+
* @deprecated Use `pub` instead.
|
|
3302
|
+
*/
|
|
2730
3303
|
publickey?: string;
|
|
2731
3304
|
path?: string;
|
|
2732
3305
|
signature?: string;
|
|
@@ -2803,6 +3376,9 @@ declare function dnxSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2803
3376
|
type TonAddress = {
|
|
2804
3377
|
path: string;
|
|
2805
3378
|
pub: string;
|
|
3379
|
+
/**
|
|
3380
|
+
* @deprecated Use `pub` instead.
|
|
3381
|
+
*/
|
|
2806
3382
|
publicKey?: string;
|
|
2807
3383
|
address: string;
|
|
2808
3384
|
};
|
|
@@ -2914,6 +3490,9 @@ declare function scdoSignTransaction(connectId: string, deviceId: string, params
|
|
|
2914
3490
|
|
|
2915
3491
|
type AlephiumAddress = {
|
|
2916
3492
|
path: string;
|
|
3493
|
+
/**
|
|
3494
|
+
* @deprecated Use `pub` instead.
|
|
3495
|
+
*/
|
|
2917
3496
|
publicKey?: string;
|
|
2918
3497
|
pub?: string;
|
|
2919
3498
|
address: string;
|
|
@@ -3016,12 +3595,15 @@ type NeoSignedTx = {
|
|
|
3016
3595
|
declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
|
|
3017
3596
|
|
|
3018
3597
|
type CoreApi = {
|
|
3598
|
+
/**
|
|
3599
|
+
* Inject function
|
|
3600
|
+
*/
|
|
3019
3601
|
init: typeof init;
|
|
3020
3602
|
on: typeof on;
|
|
3021
3603
|
off: typeof off;
|
|
3022
3604
|
emit: (event: string, ...args: any[]) => void;
|
|
3023
3605
|
removeAllListeners: typeof removeAllListeners;
|
|
3024
|
-
dispose: () => void
|
|
3606
|
+
dispose: () => void | Promise<void>;
|
|
3025
3607
|
call: (params: any) => Promise<any>;
|
|
3026
3608
|
uiResponse: typeof uiResponse;
|
|
3027
3609
|
cancel: (connectId?: string) => void;
|
|
@@ -3030,19 +3612,31 @@ type CoreApi = {
|
|
|
3030
3612
|
success: boolean;
|
|
3031
3613
|
}>;
|
|
3032
3614
|
getLogs: typeof getLogs;
|
|
3615
|
+
clearSessionCache: typeof clearSessionCache;
|
|
3616
|
+
/**
|
|
3617
|
+
* Test function
|
|
3618
|
+
*/
|
|
3033
3619
|
testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
|
|
3620
|
+
testProtocolV2Ping: typeof testProtocolV2Ping;
|
|
3034
3621
|
preInitialize: typeof preInitialize;
|
|
3622
|
+
/**
|
|
3623
|
+
* Core function
|
|
3624
|
+
*/
|
|
3035
3625
|
checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
|
|
3036
3626
|
checkBridgeStatus: typeof checkBridgeStatus;
|
|
3037
3627
|
checkBridgeRelease: typeof checkBridgeRelease;
|
|
3038
3628
|
checkBootloaderRelease: typeof checkBootloaderRelease;
|
|
3039
3629
|
checkFirmwareTypeAvailable: typeof checkFirmwareTypeAvailable;
|
|
3630
|
+
/**
|
|
3631
|
+
* Device function
|
|
3632
|
+
*/
|
|
3040
3633
|
searchDevices: typeof searchDevices;
|
|
3041
3634
|
promptWebDeviceAccess: typeof promptWebDeviceAccess;
|
|
3042
3635
|
getFeatures: typeof getFeatures;
|
|
3043
|
-
|
|
3636
|
+
getDeviceState: typeof getDeviceState;
|
|
3044
3637
|
getOnekeyFeatures: typeof getOnekeyFeatures;
|
|
3045
3638
|
getPassphraseState: typeof getPassphraseState;
|
|
3639
|
+
openWalletSession: typeof openWalletSession;
|
|
3046
3640
|
deviceBackup: typeof deviceBackup;
|
|
3047
3641
|
deviceChangePin: typeof deviceChangePin;
|
|
3048
3642
|
deviceFlags: typeof deviceFlags;
|
|
@@ -3069,34 +3663,28 @@ type CoreApi = {
|
|
|
3069
3663
|
firmwareUpdateV2: typeof firmwareUpdateV2;
|
|
3070
3664
|
firmwareUpdateV3: typeof firmwareUpdateV3;
|
|
3071
3665
|
firmwareUpdateV4: typeof firmwareUpdateV4;
|
|
3666
|
+
registerFirmwareUpdateHostBinding: typeof registerFirmwareUpdateHostBinding$1;
|
|
3667
|
+
unregisterFirmwareUpdateHostBinding: typeof unregisterFirmwareUpdateHostBinding$1;
|
|
3668
|
+
getFirmwareUpdateHostBindingGeneration: typeof getFirmwareUpdateHostBindingGeneration$1;
|
|
3669
|
+
getFirmwareUpdateCapabilities: typeof getFirmwareUpdateCapabilities;
|
|
3670
|
+
prepareFirmwareUpdatePlan: typeof prepareFirmwareUpdatePlan;
|
|
3671
|
+
validateFirmwareUpdatePreparedPlan: typeof validateFirmwareUpdatePreparedPlan;
|
|
3072
3672
|
cipherKeyValue: typeof cipherKeyValue;
|
|
3073
|
-
|
|
3074
|
-
|
|
3673
|
+
/**
|
|
3674
|
+
* Pro2 business API
|
|
3675
|
+
*/
|
|
3075
3676
|
deviceReboot: typeof deviceReboot;
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
fileRead: typeof fileRead;
|
|
3083
|
-
fileWrite: typeof fileWrite;
|
|
3084
|
-
fileDelete: typeof fileDelete;
|
|
3085
|
-
dirList: typeof dirList;
|
|
3086
|
-
dirMake: typeof dirMake;
|
|
3087
|
-
dirRemove: typeof dirRemove;
|
|
3088
|
-
pathInfo: typeof pathInfo;
|
|
3089
|
-
filesystemFileRead: typeof filesystemFileRead;
|
|
3090
|
-
filesystemFileWrite: typeof filesystemFileWrite;
|
|
3091
|
-
filesystemFileDelete: typeof filesystemFileDelete;
|
|
3092
|
-
filesystemDirList: typeof filesystemDirList;
|
|
3093
|
-
filesystemDirMake: typeof filesystemDirMake;
|
|
3094
|
-
filesystemDirRemove: typeof filesystemDirRemove;
|
|
3095
|
-
filesystemPathInfoQuery: typeof filesystemPathInfoQuery;
|
|
3096
|
-
filesystemFormat: typeof filesystemFormat;
|
|
3097
|
-
filesystemDiskControl: typeof filesystemDiskControl;
|
|
3677
|
+
deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
|
|
3678
|
+
deviceUploadWallpaper: typeof deviceUploadWallpaper;
|
|
3679
|
+
uploadPortfolio: typeof uploadPortfolio;
|
|
3680
|
+
/**
|
|
3681
|
+
* All network function
|
|
3682
|
+
*/
|
|
3098
3683
|
allNetworkGetAddress: typeof allNetworkGetAddress;
|
|
3099
3684
|
allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
|
|
3685
|
+
/**
|
|
3686
|
+
* EVM function
|
|
3687
|
+
*/
|
|
3100
3688
|
evmGetAddress: typeof evmGetAddress;
|
|
3101
3689
|
evmGetPublicKey: typeof evmGetPublicKey;
|
|
3102
3690
|
evmSignMessage: typeof evmSignMessage;
|
|
@@ -3104,86 +3692,167 @@ type CoreApi = {
|
|
|
3104
3692
|
evmSignTransaction: typeof evmSignTransaction;
|
|
3105
3693
|
evmSignTypedData: typeof evmSignTypedData;
|
|
3106
3694
|
evmVerifyMessage: typeof evmVerifyMessage;
|
|
3695
|
+
/**
|
|
3696
|
+
* BTC function
|
|
3697
|
+
*/
|
|
3107
3698
|
btcGetAddress: typeof btcGetAddress;
|
|
3108
3699
|
btcGetPublicKey: typeof btcGetPublicKey;
|
|
3109
3700
|
btcSignMessage: typeof btcSignMessage;
|
|
3110
3701
|
btcSignPsbt: typeof btcSignPsbt;
|
|
3111
3702
|
btcSignTransaction: typeof btcSignTransaction;
|
|
3112
3703
|
btcVerifyMessage: typeof btcVerifyMessage;
|
|
3704
|
+
/**
|
|
3705
|
+
* Starcoin function
|
|
3706
|
+
*/
|
|
3113
3707
|
starcoinGetAddress: typeof starcoinGetAddress;
|
|
3114
3708
|
starcoinGetPublicKey: typeof starcoinGetPublicKey;
|
|
3115
3709
|
starcoinSignMessage: typeof starcoinSignMessage;
|
|
3116
3710
|
starcoinSignTransaction: typeof starcoinSignTransaction;
|
|
3117
3711
|
starcoinVerifyMessage: typeof starcoinVerifyMessage;
|
|
3712
|
+
/**
|
|
3713
|
+
* Nem function
|
|
3714
|
+
*/
|
|
3118
3715
|
nemGetAddress: typeof nemGetAddress;
|
|
3119
3716
|
nemSignTransaction: typeof nemSignTransaction;
|
|
3717
|
+
/**
|
|
3718
|
+
* Solana function
|
|
3719
|
+
*/
|
|
3120
3720
|
solGetAddress: typeof solGetAddress;
|
|
3121
3721
|
solSignTransaction: typeof solSignTransaction;
|
|
3122
3722
|
solSignOffchainMessage: typeof solSignOffchainMessage;
|
|
3123
3723
|
solSignMessage: typeof solSignMessage;
|
|
3724
|
+
/**
|
|
3725
|
+
* Stellar function
|
|
3726
|
+
*/
|
|
3124
3727
|
stellarGetAddress: typeof stellarGetAddress;
|
|
3125
3728
|
stellarSignTransaction: typeof stellarSignTransaction;
|
|
3729
|
+
/**
|
|
3730
|
+
* Tron function
|
|
3731
|
+
*/
|
|
3126
3732
|
tronGetAddress: typeof tronGetAddress;
|
|
3127
3733
|
tronSignMessage: typeof tronSignMessage;
|
|
3128
3734
|
tronSignTransaction: typeof tronSignTransaction;
|
|
3735
|
+
/**
|
|
3736
|
+
* Conflux function
|
|
3737
|
+
*/
|
|
3129
3738
|
confluxGetAddress: typeof confluxGetAddress;
|
|
3130
3739
|
confluxSignMessage: typeof confluxSignMessage;
|
|
3131
3740
|
confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
|
|
3132
3741
|
confluxSignTransaction: typeof confluxSignTransaction;
|
|
3742
|
+
/**
|
|
3743
|
+
* Near function
|
|
3744
|
+
*/
|
|
3133
3745
|
nearGetAddress: typeof nearGetAddress;
|
|
3134
3746
|
nearSignTransaction: typeof nearSignTransaction;
|
|
3747
|
+
/**
|
|
3748
|
+
* Aptos function
|
|
3749
|
+
*/
|
|
3135
3750
|
aptosGetAddress: typeof aptosGetAddress;
|
|
3136
3751
|
aptosGetPublicKey: typeof aptosGetPublicKey;
|
|
3137
3752
|
aptosSignMessage: typeof aptosSignMessage;
|
|
3138
3753
|
aptosSignInMessage: typeof aptosSignInMessage;
|
|
3139
3754
|
aptosSignTransaction: typeof aptosSignTransaction;
|
|
3755
|
+
/**
|
|
3756
|
+
* Algo function
|
|
3757
|
+
*/
|
|
3140
3758
|
algoGetAddress: typeof algoGetAddress;
|
|
3141
3759
|
algoSignTransaction: typeof algoSignTransaction;
|
|
3760
|
+
/**
|
|
3761
|
+
* Cosmos function
|
|
3762
|
+
*/
|
|
3142
3763
|
cosmosGetAddress: typeof cosmosGetAddress;
|
|
3143
3764
|
cosmosGetPublicKey: typeof cosmosGetPublicKey;
|
|
3144
3765
|
cosmosSignTransaction: typeof cosmosSignTransaction;
|
|
3766
|
+
/**
|
|
3767
|
+
* XRP function
|
|
3768
|
+
*/
|
|
3145
3769
|
xrpGetAddress: typeof xrpGetAddress;
|
|
3146
3770
|
xrpSignTransaction: typeof xrpSignTransaction;
|
|
3771
|
+
/**
|
|
3772
|
+
* SUI function
|
|
3773
|
+
*/
|
|
3147
3774
|
suiGetAddress: typeof suiGetAddress;
|
|
3148
3775
|
suiGetPublicKey: typeof suiGetPublicKey;
|
|
3149
3776
|
suiSignMessage: typeof suiSignMessage;
|
|
3150
3777
|
suiSignTransaction: typeof suiSignTransaction;
|
|
3778
|
+
/**
|
|
3779
|
+
* Cardano function
|
|
3780
|
+
*/
|
|
3151
3781
|
cardanoGetAddress: typeof cardanoGetAddress;
|
|
3152
3782
|
cardanoGetPublicKey: typeof cardanoGetPublicKey;
|
|
3153
3783
|
cardanoSignTransaction: typeof cardanoSignTransaction;
|
|
3154
3784
|
cardanoSignMessage: typeof cardanoSignMessage;
|
|
3785
|
+
/**
|
|
3786
|
+
* Filecoin function
|
|
3787
|
+
*/
|
|
3155
3788
|
filecoinGetAddress: typeof filecoinGetAddress;
|
|
3156
3789
|
filecoinSignTransaction: typeof filecoinSignTransaction;
|
|
3790
|
+
/**
|
|
3791
|
+
* Polkadot function
|
|
3792
|
+
*/
|
|
3157
3793
|
polkadotGetAddress: typeof polkadotGetAddress;
|
|
3158
3794
|
polkadotSignTransaction: typeof polkadotSignTransaction;
|
|
3795
|
+
/**
|
|
3796
|
+
* Kaspa function
|
|
3797
|
+
*/
|
|
3159
3798
|
kaspaGetAddress: typeof kaspaGetAddress;
|
|
3160
3799
|
kaspaSignTransaction: typeof kaspaSignTransaction;
|
|
3800
|
+
/**
|
|
3801
|
+
* nexa function
|
|
3802
|
+
*/
|
|
3161
3803
|
nexaGetAddress: typeof nexaGetAddress;
|
|
3162
3804
|
nexaSignTransaction: typeof nexaSignTransaction;
|
|
3805
|
+
/**
|
|
3806
|
+
* Nostr function
|
|
3807
|
+
*/
|
|
3163
3808
|
nostrGetPublicKey: typeof nostrGetPublicKey;
|
|
3164
3809
|
nostrSignEvent: typeof nostrSignEvent;
|
|
3165
3810
|
nostrEncryptMessage: typeof nostrEncryptMessage;
|
|
3166
3811
|
nostrDecryptMessage: typeof nostrDecryptMessage;
|
|
3167
3812
|
nostrSignSchnorr: typeof nostrSignSchnorr;
|
|
3813
|
+
/**
|
|
3814
|
+
* Lightning Network
|
|
3815
|
+
*/
|
|
3168
3816
|
lnurlAuth: typeof lnurlAuth;
|
|
3817
|
+
/**
|
|
3818
|
+
* Nervos Network
|
|
3819
|
+
*/
|
|
3169
3820
|
nervosGetAddress: typeof nervosGetAddress;
|
|
3170
3821
|
nervosSignTransaction: typeof nervosSignTransaction;
|
|
3822
|
+
/**
|
|
3823
|
+
* Dnx Network
|
|
3824
|
+
*/
|
|
3171
3825
|
dnxGetAddress: typeof dnxGetAddress;
|
|
3172
3826
|
dnxSignTransaction: typeof dnxSignTransaction;
|
|
3827
|
+
/**
|
|
3828
|
+
* TON Network
|
|
3829
|
+
*/
|
|
3173
3830
|
tonGetAddress: typeof tonGetAddress;
|
|
3174
3831
|
tonSignMessage: typeof tonSignMessage;
|
|
3175
3832
|
tonSignProof: typeof tonSignProof;
|
|
3176
3833
|
tonSignData: typeof tonSignData;
|
|
3834
|
+
/**
|
|
3835
|
+
* SCDO Network
|
|
3836
|
+
*/
|
|
3177
3837
|
scdoGetAddress: typeof scdoGetAddress;
|
|
3178
3838
|
scdoSignMessage: typeof scdoSignMessage;
|
|
3179
3839
|
scdoSignTransaction: typeof scdoSignTransaction;
|
|
3840
|
+
/**
|
|
3841
|
+
* Alephium Network
|
|
3842
|
+
*/
|
|
3180
3843
|
alephiumGetAddress: typeof alephiumGetAddress;
|
|
3181
3844
|
alephiumSignMessage: typeof alephiumSignMessage;
|
|
3182
3845
|
alephiumSignTransaction: typeof alephiumSignTransaction;
|
|
3846
|
+
/**
|
|
3847
|
+
* Benfen Network
|
|
3848
|
+
*/
|
|
3183
3849
|
benfenGetAddress: typeof benfenGetAddress;
|
|
3184
3850
|
benfenGetPublicKey: typeof benfenGetPublicKey;
|
|
3185
3851
|
benfenSignTransaction: typeof benfenSignTransaction;
|
|
3186
3852
|
benfenSignMessage: typeof benfenSignMessage;
|
|
3853
|
+
/**
|
|
3854
|
+
* Neo Network
|
|
3855
|
+
*/
|
|
3187
3856
|
neoGetAddress: typeof neoGetAddress;
|
|
3188
3857
|
neoSignTransaction: typeof neoSignTransaction;
|
|
3189
3858
|
};
|
|
@@ -3258,11 +3927,13 @@ declare const DEVICE: {
|
|
|
3258
3927
|
readonly PIN: "pin";
|
|
3259
3928
|
readonly PASSPHRASE: "passphrase";
|
|
3260
3929
|
readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
|
|
3930
|
+
readonly ATTACH_PIN_ON_DEVICE: "attach_pin_on_device";
|
|
3261
3931
|
readonly WORD: "word";
|
|
3262
3932
|
readonly SUPPORT_FEATURES: "support_features";
|
|
3263
3933
|
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
|
|
3264
3934
|
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "select_device_for_switch_firmware_web_device";
|
|
3265
3935
|
readonly FEATURES: "features";
|
|
3936
|
+
readonly STATE: "state";
|
|
3266
3937
|
};
|
|
3267
3938
|
interface DeviceConnnectRequest {
|
|
3268
3939
|
type: typeof DEVICE.CONNECT;
|
|
@@ -3281,6 +3952,10 @@ interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'
|
|
|
3281
3952
|
}
|
|
3282
3953
|
type PassphraseRequestPayload = {
|
|
3283
3954
|
existsAttachPinUser?: boolean;
|
|
3955
|
+
deviceOnly?: boolean;
|
|
3956
|
+
source?: 'wallet-session-coordinator';
|
|
3957
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
3958
|
+
expectedPassphraseState?: string;
|
|
3284
3959
|
};
|
|
3285
3960
|
interface DeviceButtonRequest {
|
|
3286
3961
|
type: typeof DEVICE.BUTTON;
|
|
@@ -3293,6 +3968,10 @@ interface DeviceSendFeatures {
|
|
|
3293
3968
|
type: typeof DEVICE.FEATURES;
|
|
3294
3969
|
payload: DeviceFeaturesPayload;
|
|
3295
3970
|
}
|
|
3971
|
+
interface DeviceSendState {
|
|
3972
|
+
type: typeof DEVICE.STATE;
|
|
3973
|
+
payload: DeviceStateEvent;
|
|
3974
|
+
}
|
|
3296
3975
|
type DeviceSupportFeaturesPayload = SupportFeatures & {
|
|
3297
3976
|
device: KnownDevice | null;
|
|
3298
3977
|
};
|
|
@@ -3300,7 +3979,7 @@ interface DeviceSendSupportFeatures {
|
|
|
3300
3979
|
type: typeof DEVICE.SUPPORT_FEATURES;
|
|
3301
3980
|
payload: DeviceSupportFeaturesPayload;
|
|
3302
3981
|
}
|
|
3303
|
-
type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
3982
|
+
type DeviceEvent = DeviceButtonRequest | DeviceSendState | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
3304
3983
|
type DeviceEventMessage = DeviceEvent & {
|
|
3305
3984
|
event: typeof DEVICE_EVENT;
|
|
3306
3985
|
};
|
|
@@ -3341,6 +4020,17 @@ declare const UI_REQUEST: {
|
|
|
3341
4020
|
readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
|
|
3342
4021
|
readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
|
|
3343
4022
|
};
|
|
4023
|
+
type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
|
|
4024
|
+
type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
|
|
4025
|
+
type ProtocolV2UiEventMetadata = {
|
|
4026
|
+
source?: ProtocolV2UiEventSource;
|
|
4027
|
+
reason?: string;
|
|
4028
|
+
deviceOnly?: boolean;
|
|
4029
|
+
completion?: ProtocolV2UiCompletion;
|
|
4030
|
+
method?: string;
|
|
4031
|
+
page?: string | number;
|
|
4032
|
+
operation?: string;
|
|
4033
|
+
};
|
|
3344
4034
|
interface UiRequestWithoutPayload {
|
|
3345
4035
|
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;
|
|
3346
4036
|
payload?: typeof undefined;
|
|
@@ -3353,40 +4043,46 @@ interface UiRequestFirmwareProgressing {
|
|
|
3353
4043
|
}
|
|
3354
4044
|
type UiRequestDeviceAction = {
|
|
3355
4045
|
type: typeof UI_REQUEST.REQUEST_PIN;
|
|
3356
|
-
payload: {
|
|
3357
|
-
device: Device;
|
|
4046
|
+
payload: ProtocolV2UiEventMetadata & {
|
|
4047
|
+
device: Device$1;
|
|
3358
4048
|
type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
|
|
3359
4049
|
};
|
|
3360
4050
|
};
|
|
3361
4051
|
interface UiRequestButton {
|
|
3362
4052
|
type: typeof UI_REQUEST.REQUEST_BUTTON;
|
|
3363
|
-
payload: DeviceButtonRequest['payload'];
|
|
4053
|
+
payload: DeviceButtonRequest['payload'] & ProtocolV2UiEventMetadata;
|
|
3364
4054
|
}
|
|
3365
4055
|
interface UiRequestPassphrase {
|
|
3366
4056
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
|
|
3367
4057
|
payload: {
|
|
3368
|
-
device: Device;
|
|
4058
|
+
device: Device$1;
|
|
3369
4059
|
passphraseState?: string;
|
|
3370
4060
|
existsAttachPinUser?: boolean;
|
|
4061
|
+
deviceOnly?: boolean;
|
|
4062
|
+
source?: 'wallet-session-coordinator';
|
|
4063
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
4064
|
+
expectedPassphraseState?: string;
|
|
3371
4065
|
};
|
|
3372
4066
|
}
|
|
3373
4067
|
interface UiRequestPassphraseOnDevice {
|
|
3374
4068
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
|
|
3375
4069
|
payload: {
|
|
3376
|
-
device: Device;
|
|
4070
|
+
device: Device$1;
|
|
3377
4071
|
passphraseState?: string;
|
|
4072
|
+
source?: 'wallet-session-coordinator';
|
|
4073
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
3378
4074
|
};
|
|
3379
4075
|
}
|
|
3380
4076
|
interface UiRequestSelectDeviceInBootloaderForWebDevice {
|
|
3381
4077
|
type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
3382
4078
|
payload: {
|
|
3383
|
-
device: Device;
|
|
4079
|
+
device: Device$1;
|
|
3384
4080
|
};
|
|
3385
4081
|
}
|
|
3386
4082
|
interface UiRequestSelectDeviceForSwitchFirmwareWebDevice {
|
|
3387
4083
|
type: typeof UI_REQUEST.REQUEST_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
|
|
3388
4084
|
payload: {
|
|
3389
|
-
device: Device;
|
|
4085
|
+
device: Device$1;
|
|
3390
4086
|
};
|
|
3391
4087
|
}
|
|
3392
4088
|
interface FirmwareProcessing {
|
|
@@ -3399,7 +4095,7 @@ type IFirmwareUpdateProgressType = 'transferData' | 'installingFirmware';
|
|
|
3399
4095
|
interface FirmwareProgress {
|
|
3400
4096
|
type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
|
|
3401
4097
|
payload: {
|
|
3402
|
-
device: Device;
|
|
4098
|
+
device: Device$1;
|
|
3403
4099
|
progress: number;
|
|
3404
4100
|
progressType: IFirmwareUpdateProgressType;
|
|
3405
4101
|
transferredBytes?: number;
|
|
@@ -3411,7 +4107,7 @@ interface FirmwareProgress {
|
|
|
3411
4107
|
interface FirmwareTip {
|
|
3412
4108
|
type: typeof UI_REQUEST.FIRMWARE_TIP;
|
|
3413
4109
|
payload: {
|
|
3414
|
-
device: Device;
|
|
4110
|
+
device: Device$1;
|
|
3415
4111
|
data: {
|
|
3416
4112
|
message: string;
|
|
3417
4113
|
};
|
|
@@ -3430,7 +4126,7 @@ interface DeviceProgress {
|
|
|
3430
4126
|
interface PreviousAddressResult {
|
|
3431
4127
|
type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
|
|
3432
4128
|
payload: {
|
|
3433
|
-
device: Device;
|
|
4129
|
+
device: Device$1;
|
|
3434
4130
|
data: {
|
|
3435
4131
|
address?: string;
|
|
3436
4132
|
path?: string;
|
|
@@ -3683,10 +4379,12 @@ type UiPromiseResponse = UiResponseEvent | {
|
|
|
3683
4379
|
};
|
|
3684
4380
|
type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
|
|
3685
4381
|
type: T;
|
|
3686
|
-
}>, T, Device
|
|
4382
|
+
}>, T, Device>;
|
|
3687
4383
|
|
|
3688
4384
|
declare const LogBlockEvent: Set<string>;
|
|
3689
4385
|
declare function getLogBlockLabel(message: unknown): string | undefined;
|
|
4386
|
+
declare function getSafeLogPayload(value: unknown, blockLabel?: string): unknown;
|
|
4387
|
+
declare function formatLogMethodLabel(label: string, methodName?: string): string;
|
|
3690
4388
|
|
|
3691
4389
|
declare const executeCallback: (id: string, ...args: any[]) => void;
|
|
3692
4390
|
declare const cleanupCallback: (id: string) => void;
|
|
@@ -3750,30 +4448,109 @@ declare enum LoggerNames {
|
|
|
3750
4448
|
}
|
|
3751
4449
|
declare const getLogger: (key: LoggerNames) => Log;
|
|
3752
4450
|
|
|
3753
|
-
|
|
4451
|
+
type HttpRequestOptions = {
|
|
4452
|
+
/** Additional request headers, such as a byte range for package metadata reads. */
|
|
4453
|
+
headers?: Record<string, string>;
|
|
4454
|
+
/** Axios adapter-defined request timeout retained for existing opt-in callers. */
|
|
4455
|
+
timeoutMs?: number;
|
|
4456
|
+
/** Deadline for DNS, connection, TLS, redirects, and the first response-body progress. */
|
|
4457
|
+
connectTimeoutMs?: number;
|
|
4458
|
+
/** Maximum idle interval between response-body progress events. */
|
|
4459
|
+
readTimeoutMs?: number;
|
|
4460
|
+
/** Wall-clock deadline across all attempts and retry backoff. */
|
|
4461
|
+
overallTimeoutMs?: number;
|
|
4462
|
+
maxRetries?: number;
|
|
4463
|
+
retryDelayMs?: number;
|
|
4464
|
+
};
|
|
4465
|
+
|
|
4466
|
+
declare const httpRequest: (url: string, type: string, options?: HttpRequestOptions) => any;
|
|
3754
4467
|
declare const getTimeStamp: () => number;
|
|
3755
4468
|
|
|
4469
|
+
/**
|
|
4470
|
+
* Validates version string
|
|
4471
|
+
* @param {string} version Version string
|
|
4472
|
+
* @returns {boolean} True if version string is valid, false if not
|
|
4473
|
+
*/
|
|
3756
4474
|
declare const isValidVersionString: (version: string) => boolean;
|
|
4475
|
+
/**
|
|
4476
|
+
* Validates a version array
|
|
4477
|
+
* @param {number[]} version Version array
|
|
4478
|
+
* @returns {boolean} True if version array is valid, false if not
|
|
4479
|
+
*/
|
|
3757
4480
|
declare const isValidVersionArray: (version: number[]) => boolean;
|
|
4481
|
+
/**
|
|
4482
|
+
* Fills the missing version numbers with zeros (ie: [1, 2] will become [1, 2, 0])
|
|
4483
|
+
* @param {number[]} version Version array
|
|
4484
|
+
* @returns {number[]} Version array with all positions filled
|
|
4485
|
+
*/
|
|
3758
4486
|
declare const normalizeVersionArray: (version: number[]) => number[];
|
|
4487
|
+
/**
|
|
4488
|
+
* Returns a valid version array from a version string
|
|
4489
|
+
* @param {string} version Version string
|
|
4490
|
+
* @returns {number[]} Version array
|
|
4491
|
+
*/
|
|
3759
4492
|
declare const versionSplit: (version: string) => number[];
|
|
4493
|
+
/**
|
|
4494
|
+
* Compares two versions and returns if the version is newer (1), older (-1) or equal (0).
|
|
4495
|
+
* @param {string | number[]} a Version to compare from
|
|
4496
|
+
* @param {string | number[]} b Version to compare with
|
|
4497
|
+
* @returns {number} Returns 1 if newer, -1 if older and 0 if equal
|
|
4498
|
+
*/
|
|
3760
4499
|
declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
|
|
3761
4500
|
|
|
3762
|
-
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"DeviceFirmwareUpdateStatus"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoDRep"> | TypedResponseMessage<"CardanoCVoteRegistrationDelegation"> | TypedResponseMessage<"CardanoCVoteRegistrationParametersType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"DnxTxKey"> | TypedResponseMessage<"DnxComputedKeyImage"> | TypedResponseMessage<"EmmcFile"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMemberOneKey"> | TypedResponseMessage<"EthereumFieldTypeOneKey"> | TypedResponseMessage<"EthereumDefinitions"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessListOneKey"> | TypedResponseMessage<"EthereumAuthorizationOneKey"> | TypedResponseMessage<"EthereumAuthorizationSignature"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"SolanaTxATADetails"> | TypedResponseMessage<"SolanaTxExtraInfo"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"CoinJoinRequest"> | TypedResponseMessage<"PaymentRequestMemo"> | TypedResponseMessage<"TextMemo"> | TypedResponseMessage<"RefundMemo"> | TypedResponseMessage<"CoinPurchaseMemo"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"DeviceStatus"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"BlurRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarInvokeHostFunctionOp"> | TypedResponseMessage<"StellarSorobanDataRequest"> | TypedResponseMessage<"StellarSorobanDataAck"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TonSignData"> | TypedResponseMessage<"TonSignedData"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry"> | TypedResponseMessage<"experimental_message"> | TypedResponseMessage<"experimental_field"> | TypedResponseMessage<"TxAckPaymentRequest"> | TypedResponseMessage<"InternalMyAddressRequest"> | TypedResponseMessage<"StartSession"> | TypedResponseMessage<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"SetWallpaper"> | TypedResponseMessage<"GetWallpaper"> | TypedResponseMessage<"Wallpaper"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage"> | TypedResponseMessage<"ProtocolInfoRequest"> | TypedResponseMessage<"ProtocolInfo"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DeviceSettingsGet"> | TypedResponseMessage<"DeviceSettingsSet"> | TypedResponseMessage<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionGet"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat">;
|
|
4501
|
+
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<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"OnboardingSetupStatus"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"ViewRawData"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaTxRequest"> | TypedResponseMessage<"KaspaTxAckInput"> | TypedResponseMessage<"KaspaTxAckOutput"> | TypedResponseMessage<"KaspaTxAckPayloadChunk"> | TypedResponseMessage<"KaspaTxAckPrevMeta"> | TypedResponseMessage<"KaspaTxAckPrevInput"> | TypedResponseMessage<"KaspaTxAckPrevOutput"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"BlurRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarInvokeHostFunctionOp"> | TypedResponseMessage<"StellarSorobanDataRequest"> | TypedResponseMessage<"StellarSorobanDataAck"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TonSignData"> | TypedResponseMessage<"TonSignedData"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry"> | TypedResponseMessage<"experimental_message"> | TypedResponseMessage<"experimental_field"> | TypedResponseMessage<"TxAckPaymentRequest"> | TypedResponseMessage<"EthereumSignTypedDataQR"> | TypedResponseMessage<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"UiAnimationRequest"> | TypedResponseMessage<"ProtocolInfoRequest"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DeviceSettingsGet"> | TypedResponseMessage<"DeviceSettingsSet"> | TypedResponseMessage<"DeviceSettingsPageShow"> | TypedResponseMessage<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceMiscUsbMscControl"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionGet"> | TypedResponseMessage<"DeviceSessionAskPin"> | TypedResponseMessage<"DeviceSessionAskPassphrase"> | TypedResponseMessage<"DeviceStatusGet"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"InternalMyAddressRequest"> | TypedResponseMessage<"OnboardingStatusGet"> | TypedResponseMessage<"OnboardingStatus"> | TypedResponseMessage<"PortfolioUpdate"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage">;
|
|
4502
|
+
|
|
4503
|
+
type DeviceFeaturesInput = Features | Messages.Features;
|
|
3763
4504
|
|
|
3764
|
-
|
|
4505
|
+
/**
|
|
4506
|
+
* get device type by features
|
|
4507
|
+
*/
|
|
4508
|
+
declare const getDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
|
|
4509
|
+
/**
|
|
4510
|
+
* get device type by ble name
|
|
4511
|
+
* @param name Ble name
|
|
4512
|
+
*/
|
|
3765
4513
|
declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
declare const
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
declare const
|
|
3775
|
-
|
|
3776
|
-
|
|
4514
|
+
/**
|
|
4515
|
+
* Get Connected Device ble name by features
|
|
4516
|
+
* @returns
|
|
4517
|
+
*/
|
|
4518
|
+
declare const getDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
|
|
4519
|
+
/**
|
|
4520
|
+
* Get Connected Device serial number by features
|
|
4521
|
+
*/
|
|
4522
|
+
declare const getDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
|
|
4523
|
+
/**
|
|
4524
|
+
* @deprecated Use getDeviceSerialNo instead.
|
|
4525
|
+
*/
|
|
4526
|
+
declare const getDeviceUUID: (features?: DeviceFeaturesInput) => string;
|
|
4527
|
+
/**
|
|
4528
|
+
* Get Connected Device label by features
|
|
4529
|
+
*/
|
|
4530
|
+
declare const getDeviceLabel: (features?: DeviceFeaturesInput) => string | null;
|
|
4531
|
+
/**
|
|
4532
|
+
* Get firmware version range by features
|
|
4533
|
+
* Type has a higher priority than Model
|
|
4534
|
+
*/
|
|
4535
|
+
declare const getMethodVersionRange: (features: DeviceFeaturesInput | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
|
|
4536
|
+
declare const getFirmwareType: (features?: DeviceFeaturesInput) => _onekeyfe_hd_shared.EFirmwareType;
|
|
4537
|
+
|
|
4538
|
+
/**
|
|
4539
|
+
* Get Connected Device version by features
|
|
4540
|
+
*/
|
|
4541
|
+
declare const getDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4542
|
+
/**
|
|
4543
|
+
* Get Connected Device bootloader version by features
|
|
4544
|
+
*/
|
|
4545
|
+
declare const getDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4546
|
+
/**
|
|
4547
|
+
* Get Connected Device boardloader/romloader version by features
|
|
4548
|
+
*/
|
|
4549
|
+
declare const getDeviceBoardloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4550
|
+
/**
|
|
4551
|
+
* Get Connected Device bluetooth firmware version by features
|
|
4552
|
+
*/
|
|
4553
|
+
declare const getDeviceBLEFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
3777
4554
|
|
|
3778
4555
|
declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v1", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
|
|
3779
4556
|
type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
|
|
@@ -3790,11 +4567,19 @@ declare class DataManager {
|
|
|
3790
4567
|
};
|
|
3791
4568
|
static lastCheckTimestamp: number;
|
|
3792
4569
|
static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
|
|
4570
|
+
/**
|
|
4571
|
+
* Touch、Pro System UI Resource Update
|
|
4572
|
+
* ** Interval upgrade is not considered **
|
|
4573
|
+
*/
|
|
3793
4574
|
static getSysResourcesLatestRelease: ({ features, forcedUpdateRes, firmwareType, }: {
|
|
3794
4575
|
features: Features;
|
|
3795
4576
|
forcedUpdateRes?: boolean | undefined;
|
|
3796
4577
|
firmwareType: EFirmwareType;
|
|
3797
4578
|
}) => string | undefined;
|
|
4579
|
+
/**
|
|
4580
|
+
* Touch、Pro System full UI Resource Update
|
|
4581
|
+
* ** Interval upgrade is not considered **
|
|
4582
|
+
*/
|
|
3798
4583
|
static getSysFullResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3799
4584
|
static getBootloaderResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3800
4585
|
static getBootloaderTargetVersion: (features: Features, firmwareType: EFirmwareType) => IVersionArray | undefined;
|
|
@@ -3817,23 +4602,34 @@ declare class DataManager {
|
|
|
3817
4602
|
} | undefined;
|
|
3818
4603
|
private static enrichFirmwareReleaseInfo;
|
|
3819
4604
|
static load(settings: ConnectSettings): Promise<void>;
|
|
4605
|
+
private static applyRemoteConfig;
|
|
3820
4606
|
static updateEnv(newEnv: ConnectSettings['env']): void;
|
|
3821
4607
|
static checkAndReloadData(): Promise<void>;
|
|
3822
4608
|
static getProtobufMessages(schema?: ProtobufMessageSchema): JSON;
|
|
3823
4609
|
static getSettings(key?: undefined): ConnectSettings;
|
|
3824
4610
|
static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
|
|
3825
4611
|
static isBleConnect: (env: ConnectSettings['env']) => boolean;
|
|
4612
|
+
/** Desktop WebUSB doesn't need browser permission prompt */
|
|
3826
4613
|
static isDesktopWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
4614
|
+
/** Browser WebUSB needs permission prompt */
|
|
3827
4615
|
static isBrowserWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
3828
4616
|
}
|
|
3829
4617
|
|
|
3830
|
-
declare const supportInputPinOnSoftware: (features
|
|
4618
|
+
declare const supportInputPinOnSoftware: (features?: Features) => SupportFeatureType;
|
|
4619
|
+
/**
|
|
4620
|
+
* Since 3.5.0, Touch uses the firmware-v3 field to get firmware release info
|
|
4621
|
+
*/
|
|
3831
4622
|
declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, firmwareType, }: {
|
|
3832
4623
|
features: Features;
|
|
3833
4624
|
updateType: 'firmware' | 'ble';
|
|
3834
4625
|
targetVersion?: string | undefined;
|
|
3835
4626
|
firmwareType: EFirmwareType;
|
|
3836
4627
|
}) => 'ble' | IFirmwareField;
|
|
4628
|
+
/**
|
|
4629
|
+
* Returns the optional firmware version
|
|
4630
|
+
* Used in firmware web update
|
|
4631
|
+
* https://firmware.onekey.so/
|
|
4632
|
+
*/
|
|
3837
4633
|
declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('ble' | IFirmwareField)[];
|
|
3838
4634
|
|
|
3839
4635
|
declare function checkNeedUpdateBootForTouch(features: Features, firmwareType: EFirmwareType): boolean;
|
|
@@ -3843,15 +4639,40 @@ declare function checkNeedUpdateBootForClassicAndMini({ features, willUpdateFirm
|
|
|
3843
4639
|
firmwareType: EFirmwareType;
|
|
3844
4640
|
}): boolean;
|
|
3845
4641
|
|
|
4642
|
+
type DeviceSettingsProtocol = 'V1' | 'V2';
|
|
4643
|
+
type DeviceSettingsField = keyof DeviceSettingsParams;
|
|
4644
|
+
declare const DEVICE_SETTINGS_SHARED_FIELDS: readonly ["language", "label", "usePassphrase", "autoLockDelayMs", "autoShutdownDelayMs", "hapticFeedback", "bluetoothEnabled"];
|
|
4645
|
+
declare const DEVICE_SETTINGS_V1_ONLY_FIELDS: readonly ["homescreen", "passphraseSource", "displayRotation", "passphraseAlwaysOnDevice", "safetyChecks", "experimentalFeatures", "changeBrightness"];
|
|
4646
|
+
declare const DEVICE_SETTINGS_V2_ONLY_FIELDS: readonly ["brightness", "airgapMode", "animationEnabled", "tapToWake", "deviceNameDisplayEnabled", "fidoEnabled", "usbLockEnabled", "randomKeypad"];
|
|
4647
|
+
declare const PROTOCOL_V2_NEVER_TIMEOUT_MS = 268435456;
|
|
4648
|
+
declare const normalizeSafetyCheckLevel: (value: SafetyCheckLevel | null | undefined) => Enum_SafetyCheckLevel | null | undefined;
|
|
3846
4649
|
declare const getLanguageConfig: (deviceType: IDeviceType) => Record<string, string>[];
|
|
3847
|
-
type
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
4650
|
+
type DeviceSettingsDurationOption = {
|
|
4651
|
+
label: string;
|
|
4652
|
+
valueMs: number;
|
|
4653
|
+
};
|
|
4654
|
+
type DeviceSettingsValueOption<T> = {
|
|
4655
|
+
label: string;
|
|
4656
|
+
value: T;
|
|
4657
|
+
};
|
|
4658
|
+
declare const getAutoLockOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
|
|
4659
|
+
declare const getAutoShutDownOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
|
|
4660
|
+
type DeviceSettingsCapabilities = {
|
|
4661
|
+
protocol: DeviceSettingsProtocol;
|
|
4662
|
+
supportedFields: readonly DeviceSettingsField[];
|
|
4663
|
+
languageOptions: ReadonlyArray<Record<string, string>>;
|
|
4664
|
+
autoLockDelayOptions: readonly DeviceSettingsDurationOption[];
|
|
4665
|
+
autoShutdownDelayOptions: readonly DeviceSettingsDurationOption[];
|
|
4666
|
+
ranges: {
|
|
4667
|
+
brightness?: {
|
|
4668
|
+
min: number;
|
|
4669
|
+
max: number;
|
|
4670
|
+
};
|
|
4671
|
+
};
|
|
4672
|
+
safetyCheckOptions: ReadonlyArray<DeviceSettingsValueOption<Enum_SafetyCheckLevel>>;
|
|
4673
|
+
onDeviceConfirmationFields: readonly DeviceSettingsField[];
|
|
3852
4674
|
};
|
|
3853
|
-
declare const
|
|
3854
|
-
declare const getAutoShutDownOptions: (_deviceType: IDeviceType) => DurationParts[];
|
|
4675
|
+
declare const getDeviceSettingsCapabilities: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsCapabilities;
|
|
3855
4676
|
|
|
3856
4677
|
declare const getHDPath: (path: string) => Array<number>;
|
|
3857
4678
|
declare const getScriptType: (path: Array<number>) => InputScriptType;
|
|
@@ -3888,8 +4709,12 @@ declare const getEnv: () => "web" | "webextension" | "electron" | "react-native"
|
|
|
3888
4709
|
declare const corsValidator: (url?: string) => string | undefined;
|
|
3889
4710
|
declare const parseConnectSettings: (input?: Partial<ConnectSettings>) => ConnectSettings;
|
|
3890
4711
|
|
|
4712
|
+
declare const registerFirmwareUpdateHostBinding: (binding: FirmwareUpdateHostBinding) => number;
|
|
4713
|
+
declare const unregisterFirmwareUpdateHostBinding: (generation?: number) => boolean;
|
|
4714
|
+
declare const getFirmwareUpdateHostBindingGeneration: () => number;
|
|
4715
|
+
|
|
3891
4716
|
declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, updateSettings, switchTransport, }: InjectApi) => CoreApi;
|
|
3892
4717
|
declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
|
|
3893
4718
|
declare const HardwareTopLevelSdk: () => CoreApi;
|
|
3894
4719
|
|
|
3895
|
-
export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllFirmwareRelease, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceInfoMode, DeviceInfoProtocol, DeviceInfoScope, DeviceInfoSource, DeviceInfoStatus, DeviceModelToTypes, DeviceProfile, DeviceProfileRaw, DeviceProfileVerify, DeviceProfileVersions, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4Params, GetDeviceInfoParams, GetPassphraseStateParams, GetPassphraseStatePayload, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceManifest, IProtocolV2ResourceManifestPackage, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, OnekeyFeatures, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TonAddress, TonGetAddressParams, TonSignDataParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceForSwitchFirmwareWebDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceForSwitchFirmwareWebDevice, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, cleanupSdkInstance, completeRequestContext, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createRequestContext, createResponseMessage, createSdkTracingContext, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, executeCallback, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogBlockLabel, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init$1 as initCore, isBleConnect, isMethodVersionRangeUnsupported, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
|
|
4720
|
+
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, OpenWalletSessionMode, OpenWalletSessionModeValue, OpenWalletSessionParams, OpenWalletSessionPayload, PRO2_WALLPAPER_HEIGHT, PRO2_WALLPAPER_WIDTH, PROTOCOL_V2_NEVER_TIMEOUT_MS, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, Pro2WallpaperColorFormat, ProtocolV2FirmwareComponentRelease, ProtocolV2FirmwareComponentReleaseStatus, ProtocolV2FirmwareReleaseStatus, ProtocolV2UiCompletion, ProtocolV2UiEventMetadata, ProtocolV2UiEventSource, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TestProtocolV2PingParams, TonAddress, TonGetAddressParams, TonSignDataParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceForSwitchFirmwareWebDevice, UiRequestSelectDeviceInBootloaderForWebDevice, 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, formatLogMethodLabel, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceSerialNo, getDeviceSettingsCapabilities, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getFirmwareUpdateHostBindingGeneration, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogBlockLabel, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getSafeLogPayload, 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 };
|