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