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