@onekeyfe/hd-core 1.2.0-alpha.8 → 1.2.0-alpha.81
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 +563 -0
- package/__tests__/DeviceEventRegistration.test.ts +49 -0
- package/__tests__/chain-params-onekey-compatibility.test.ts +229 -0
- package/__tests__/check-all-firmware-release-protocol-v2.test.ts +492 -0
- package/__tests__/check-firmware-release-protocol-v2.test.ts +164 -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 +351 -0
- package/__tests__/device-pool-state.test.ts +166 -0
- package/__tests__/device-settings.test.ts +437 -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-utils.test.ts +154 -0
- package/__tests__/device-wallet-session-store.test.ts +478 -0
- package/__tests__/deviceFeaturesUtils.test.ts +39 -0
- package/__tests__/devicePoolBootloaderPath.test.ts +64 -0
- package/__tests__/deviceSettings.test.ts +113 -0
- package/__tests__/deviceUploadNft.test.ts +316 -0
- package/__tests__/evmLedgerLegacySafety.test.ts +12 -6
- package/__tests__/evmSignTransaction.test.ts +69 -0
- package/__tests__/evmSignTypedData.test.ts +80 -0
- package/__tests__/filesystemValidation.test.ts +53 -0
- package/__tests__/firmware-update/check-all-firmware-release.test.ts +175 -0
- package/__tests__/firmware-update/device-update-bootloader.test.ts +87 -0
- package/__tests__/firmware-update/firmware-artifact-source.test.ts +119 -0
- package/__tests__/firmware-update/firmware-host-binding.test.ts +70 -0
- package/__tests__/firmware-update/firmware-preparation-error.test.ts +27 -0
- package/__tests__/firmware-update/firmware-update-bootloader-poll.test.ts +200 -0
- package/__tests__/firmware-update/firmware-update-capabilities.test.ts +13 -0
- package/__tests__/firmware-update/firmware-update-plan-bootloader-identity.test.ts +394 -0
- package/__tests__/firmware-update/firmware-update-plan.test.ts +593 -0
- package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +231 -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 +121 -0
- package/__tests__/firmware-update/firmware-upload-source.test.ts +70 -0
- package/__tests__/get-device-state.test.ts +578 -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 +128 -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 +39 -0
- 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 +85 -0
- package/__tests__/protocol-v2-ping.test.ts +28 -0
- package/__tests__/protocol-v2-resources.test.ts +250 -0
- package/__tests__/protocol-v2-ui-lifecycle.test.ts +91 -0
- package/__tests__/protocol-v2-unlock-policy.test.ts +308 -0
- package/__tests__/protocol-v2.test.ts +7034 -2497
- package/__tests__/protocolV2FileWrite.test.ts +285 -0
- 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 +101 -0
- package/__tests__/request-context-logging.test.ts +16 -0
- package/__tests__/search-devices.test.ts +145 -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 +16 -1
- 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 +2 -1
- package/dist/api/CheckBLEFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CheckBootloaderRelease.d.ts +3 -2
- package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
- package/dist/api/CheckFirmwareRelease.d.ts +2 -1
- package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CipherKeyValue.d.ts +1 -0
- package/dist/api/CipherKeyValue.d.ts.map +1 -1
- package/dist/api/ClearSessionCache.d.ts +9 -0
- package/dist/api/ClearSessionCache.d.ts.map +1 -0
- package/dist/api/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 +12 -2
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV3.d.ts +7 -3
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +47 -18
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/GetDeviceState.d.ts +8 -0
- package/dist/api/GetDeviceState.d.ts.map +1 -0
- package/dist/api/GetFeatures.d.ts +1 -1
- package/dist/api/GetFeatures.d.ts.map +1 -1
- package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
- package/dist/api/GetPassphraseState.d.ts +2 -6
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/OpenWalletSession.d.ts +8 -0
- package/dist/api/OpenWalletSession.d.ts.map +1 -0
- package/dist/api/PathInfo.d.ts +1 -0
- package/dist/api/PathInfo.d.ts.map +1 -1
- package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
- package/dist/api/SearchDevices.d.ts +3 -0
- package/dist/api/SearchDevices.d.ts.map +1 -1
- package/dist/api/UploadPortfolio.d.ts +17 -0
- package/dist/api/UploadPortfolio.d.ts.map +1 -0
- package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
- package/dist/api/algo/AlgoGetAddress.d.ts +1 -0
- package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -1
- package/dist/api/algo/AlgoSignTransaction.d.ts +1 -0
- package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -1
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +1 -0
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetAddress.d.ts +1 -0
- package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetPublicKey.d.ts +1 -0
- package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignInMessage.d.ts +1 -0
- package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignMessage.d.ts +1 -0
- package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignTransaction.d.ts +1 -0
- package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCGetAddress.d.ts +1 -0
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts +1 -0
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts +1 -0
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
- package/dist/api/btc/BTCSignPsbt.d.ts +1 -0
- package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
- package/dist/api/btc/BTCSignTransaction.d.ts +1 -0
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts +1 -0
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
- package/dist/api/btc/helpers/versionLimit.d.ts +2 -0
- package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
- package/dist/api/cardano/CardanoGetAddress.d.ts +1 -0
- package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
- package/dist/api/cardano/CardanoGetPublicKey.d.ts +1 -0
- package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignMessage.d.ts +1 -0
- package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignTransaction.d.ts +1 -0
- package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxGetAddress.d.ts +2 -0
- package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignMessage.d.ts +2 -0
- package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +2 -0
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignTransaction.d.ts +2 -0
- package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
- package/dist/api/cosmos/CosmosGetAddress.d.ts +1 -0
- package/dist/api/cosmos/CosmosGetAddress.d.ts.map +1 -1
- package/dist/api/cosmos/CosmosGetPublicKey.d.ts +1 -0
- package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -1
- package/dist/api/cosmos/CosmosSignTransaction.d.ts +1 -0
- package/dist/api/cosmos/CosmosSignTransaction.d.ts.map +1 -1
- package/dist/api/device/DeviceCancel.d.ts +1 -0
- package/dist/api/device/DeviceCancel.d.ts.map +1 -1
- package/dist/api/device/DeviceChangePin.d.ts +1 -0
- package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
- package/dist/api/device/DeviceFullyUploadResource.d.ts +1 -2
- package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -1
- package/dist/api/device/DeviceLock.d.ts +1 -0
- package/dist/api/device/DeviceLock.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -0
- package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts +1 -0
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
- package/dist/api/device/DeviceSettings.d.ts +1 -0
- package/dist/api/device/DeviceSettings.d.ts.map +1 -1
- package/dist/api/device/DeviceSupportFeatures.d.ts +1 -0
- package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
- package/dist/api/device/DeviceUnlock.d.ts +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/DeviceWipe.d.ts +1 -0
- package/dist/api/device/DeviceWipe.d.ts.map +1 -1
- package/dist/api/device/PreInitialize.d.ts +1 -0
- package/dist/api/device/PreInitialize.d.ts.map +1 -1
- package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -1
- package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -1
- package/dist/api/evm/EVMGetAddress.d.ts +1 -0
- package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
- package/dist/api/evm/EVMGetPublicKey.d.ts +1 -0
- package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessage.d.ts +1 -0
- package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTransaction.d.ts +1 -0
- package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTypedData.d.ts +1 -0
- package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
- package/dist/api/evm/EVMVerifyMessage.d.ts +1 -0
- package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
- package/dist/api/evm/protocol.d.ts +3 -0
- package/dist/api/evm/protocol.d.ts.map +1 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts +1 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -1
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts +1 -0
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareArtifactSource.d.ts +25 -0
- package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareHostBinding.d.ts +6 -0
- package/dist/api/firmware/FirmwareHostBinding.d.ts.map +1 -0
- package/dist/api/firmware/FirmwarePreparationError.d.ts +3 -0
- package/dist/api/firmware/FirmwarePreparationError.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +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 +25 -0
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +32 -0
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +1 -0
- package/dist/api/firmware/getBinary.d.ts +15 -4
- package/dist/api/firmware/getBinary.d.ts.map +1 -1
- package/dist/api/firmware/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/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 +43 -0
- package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -0
- package/dist/api/index.d.ts +9 -25
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaGetAddress.d.ts +4 -0
- package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts +9 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
- package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -1
- package/dist/api/lightning/LnurlAuth.d.ts +0 -4
- package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
- package/dist/api/near/NearGetAddress.d.ts +1 -0
- package/dist/api/near/NearGetAddress.d.ts.map +1 -1
- package/dist/api/near/NearSignTransaction.d.ts +1 -0
- package/dist/api/near/NearSignTransaction.d.ts.map +1 -1
- package/dist/api/nem/NEMGetAddress.d.ts +1 -0
- package/dist/api/nem/NEMGetAddress.d.ts.map +1 -1
- package/dist/api/nem/NEMSignTransaction.d.ts +1 -0
- package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -1
- package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
- package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
- package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
- package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
- package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
- package/dist/api/nexa/NexaSignTransaction.d.ts +1 -0
- package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
- package/dist/api/nostr/NostrDecryptMessage.d.ts +1 -0
- package/dist/api/nostr/NostrDecryptMessage.d.ts.map +1 -1
- package/dist/api/nostr/NostrEncryptMessage.d.ts +1 -0
- package/dist/api/nostr/NostrEncryptMessage.d.ts.map +1 -1
- package/dist/api/nostr/NostrGetPublicKey.d.ts +1 -0
- package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -1
- package/dist/api/nostr/NostrSignEvent.d.ts +1 -0
- package/dist/api/nostr/NostrSignEvent.d.ts.map +1 -1
- package/dist/api/nostr/NostrSignSchnorr.d.ts +1 -0
- package/dist/api/nostr/NostrSignSchnorr.d.ts.map +1 -1
- package/dist/api/polkadot/PolkadotGetAddress.d.ts +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 +1 -0
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts +1 -1
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceReboot.d.ts +1 -0
- package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceUploadNft.d.ts +31 -0
- package/dist/api/protocol-v2/DeviceUploadNft.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +27 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts +1 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +1 -0
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -1
- package/dist/api/protocol-v2/Ping.d.ts +3 -0
- package/dist/api/protocol-v2/Ping.d.ts.map +1 -1
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +1 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -1
- package/dist/api/protocol-v2/helpers.d.ts +1 -1
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
- package/dist/api/solana/SolGetAddress.d.ts +1 -0
- package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
- package/dist/api/solana/SolSignMessage.d.ts +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.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 -1
- 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 +9 -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 +72 -17
- 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 +27 -0
- package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -0
- package/dist/device/cloneDeviceState.d.ts +2 -0
- package/dist/device/cloneDeviceState.d.ts.map +1 -0
- package/dist/device/deviceIdentity.d.ts +5 -0
- package/dist/device/deviceIdentity.d.ts.map +1 -0
- package/dist/deviceProfile/buildDeviceFeatures.d.ts +9 -3
- package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
- package/dist/deviceProfile/index.d.ts +0 -1
- package/dist/deviceProfile/index.d.ts.map +1 -1
- package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts +7 -0
- package/dist/deviceProfile/protocolV2DeviceIdentity.d.ts.map +1 -0
- package/dist/events/device.d.ts +16 -2
- package/dist/events/device.d.ts.map +1 -1
- package/dist/events/logBlockEvent.d.ts +2 -0
- package/dist/events/logBlockEvent.d.ts.map +1 -1
- package/dist/events/ui-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 +1818 -770
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11157 -4209
- package/dist/inject.d.ts +6 -1
- package/dist/inject.d.ts.map +1 -1
- package/dist/lowLevelInject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/deviceSession.d.ts +7 -0
- package/dist/protocols/protocol-v2/deviceSession.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/features.d.ts +21 -17
- 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 +3 -2
- package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/resources.d.ts +29 -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 +27 -0
- package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -0
- package/dist/topLevelInject.d.ts.map +1 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts +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 +9 -3
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +76 -1
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdateCapabilities.d.ts +9 -0
- package/dist/types/api/firmwareUpdateCapabilities.d.ts.map +1 -0
- package/dist/types/api/firmwareUpdatePlan.d.ts +28 -0
- package/dist/types/api/firmwareUpdatePlan.d.ts.map +1 -0
- package/dist/types/api/firmwareUpdatePreparedPlan.d.ts +42 -0
- package/dist/types/api/firmwareUpdatePreparedPlan.d.ts.map +1 -0
- package/dist/types/api/getDeviceState.d.ts +12 -0
- package/dist/types/api/getDeviceState.d.ts.map +1 -0
- package/dist/types/api/getFeatures.d.ts.map +1 -1
- package/dist/types/api/getOnekeyFeatures.d.ts.map +1 -1
- package/dist/types/api/getPassphraseState.d.ts +2 -10
- package/dist/types/api/getPassphraseState.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +34 -31
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/kaspaSignTransaction.d.ts +42 -4
- package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
- package/dist/types/api/openWalletSession.d.ts +35 -0
- package/dist/types/api/openWalletSession.d.ts.map +1 -0
- package/dist/types/api/protocolV2.d.ts +18 -84
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/api/protocolV2ResourceManifest.d.ts +17 -0
- package/dist/types/api/protocolV2ResourceManifest.d.ts.map +1 -0
- package/dist/types/api/sessionCache.d.ts +13 -0
- package/dist/types/api/sessionCache.d.ts.map +1 -0
- package/dist/types/device.d.ts +142 -10
- 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 +69 -22
- 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 -3
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts +9 -9
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/deviceSettings.d.ts +38 -7
- package/dist/utils/deviceSettings.d.ts.map +1 -1
- package/dist/utils/deviceVersionUtils.d.ts +7 -5
- package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
- package/dist/utils/homescreen.d.ts +4 -0
- package/dist/utils/homescreen.d.ts.map +1 -1
- package/dist/utils/index.d.ts +6 -3
- 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 +31 -0
- package/dist/utils/pro2Nft.d.ts.map +1 -0
- package/dist/utils/pro2Wallpaper.d.ts +22 -0
- package/dist/utils/pro2Wallpaper.d.ts.map +1 -0
- 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 +4 -4
- package/src/api/BaseMethod.ts +53 -20
- package/src/api/CheckAllFirmwareRelease.ts +380 -4
- package/src/api/CheckBLEFirmwareRelease.ts +41 -3
- package/src/api/CheckBootloaderRelease.ts +41 -3
- package/src/api/CheckFirmwareRelease.ts +38 -5
- package/src/api/CipherKeyValue.ts +4 -0
- package/src/api/ClearSessionCache.ts +32 -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 +15 -9
- package/src/api/FileWrite.ts +26 -181
- package/src/api/FirmwareUpdate.ts +30 -15
- package/src/api/FirmwareUpdateV2.ts +385 -115
- package/src/api/FirmwareUpdateV3.ts +274 -71
- package/src/api/FirmwareUpdateV4.ts +1465 -660
- 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 -21
- 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 +58 -0
- package/src/api/alephium/AlephiumGetAddress.ts +0 -4
- package/src/api/alephium/AlephiumSignMessage.ts +0 -4
- package/src/api/alephium/AlephiumSignTransaction.ts +2 -6
- package/src/api/algo/AlgoGetAddress.ts +4 -0
- package/src/api/algo/AlgoSignTransaction.ts +4 -0
- package/src/api/allnetwork/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 +195 -1
- package/src/api/device/DeviceSupportFeatures.ts +4 -0
- package/src/api/device/DeviceUnlock.ts +21 -3
- package/src/api/device/DeviceUpdateBootloader.ts +126 -8
- package/src/api/device/DeviceWipe.ts +25 -0
- package/src/api/device/PreInitialize.ts +4 -0
- package/src/api/dynex/DnxGetAddress.ts +0 -6
- package/src/api/dynex/DnxSignTransaction.ts +0 -6
- package/src/api/evm/EVMGetAddress.ts +6 -2
- package/src/api/evm/EVMGetPublicKey.ts +6 -2
- package/src/api/evm/EVMSignMessage.ts +6 -2
- package/src/api/evm/EVMSignMessageEIP712.ts +1 -11
- package/src/api/evm/EVMSignTransaction.ts +6 -2
- package/src/api/evm/EVMSignTypedData.ts +42 -50
- package/src/api/evm/EVMVerifyMessage.ts +6 -2
- package/src/api/evm/legacyV1/getAddress.ts +2 -2
- package/src/api/evm/legacyV1/getPublicKey.ts +2 -2
- package/src/api/evm/legacyV1/signMessage.ts +2 -2
- package/src/api/evm/legacyV1/signTypedData.ts +2 -2
- package/src/api/evm/legacyV1/signTypedHash.ts +2 -2
- package/src/api/evm/legacyV1/verifyMessage.ts +2 -2
- package/src/api/evm/protocol.ts +6 -0
- package/src/api/filecoin/FilecoinGetAddress.ts +4 -0
- package/src/api/filecoin/FilecoinSignTransaction.ts +4 -0
- package/src/api/firmware/FirmwareArtifactSource.ts +278 -0
- package/src/api/firmware/FirmwareHostBinding.ts +100 -0
- package/src/api/firmware/FirmwarePreparationError.ts +12 -0
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +102 -16
- package/src/api/firmware/FirmwareUpdateCapabilities.ts +9 -0
- package/src/api/firmware/FirmwareUpdatePlan.ts +772 -0
- package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +449 -0
- package/src/api/firmware/getBinary.ts +8 -3
- package/src/api/firmware/protocolV2Release.ts +166 -0
- package/src/api/firmware/updateBootloader.ts +19 -4
- package/src/api/firmware/uploadFirmware.ts +157 -26
- 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 +392 -0
- package/src/api/index.ts +10 -26
- 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 +5 -2
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +8 -5
- package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +10 -6
- package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +21 -0
- package/src/api/protocol-v2/DeviceInfoGet.ts +8 -15
- package/src/api/protocol-v2/DeviceReboot.ts +7 -3
- package/src/api/protocol-v2/DeviceStatusGet.ts +19 -0
- package/src/api/protocol-v2/DeviceUploadNft.ts +197 -0
- package/src/api/protocol-v2/DeviceUploadWallpaper.ts +134 -0
- package/src/api/protocol-v2/FilesystemFormat.ts +9 -3
- package/src/api/protocol-v2/FilesystemPermissionFix.ts +5 -2
- package/src/api/protocol-v2/Ping.ts +37 -3
- package/src/api/protocol-v2/ProtocolInfoRequest.ts +8 -3
- package/src/api/protocol-v2/helpers.ts +17 -17
- package/src/api/scdo/ScdoGetAddress.ts +0 -4
- package/src/api/scdo/ScdoSignMessage.ts +0 -4
- package/src/api/scdo/ScdoSignTransaction.ts +0 -4
- package/src/api/solana/SolGetAddress.ts +4 -0
- package/src/api/solana/SolSignMessage.ts +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 +5 -1
- 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 +1 -0
- package/src/core/deviceEventRegistration.ts +27 -0
- package/src/core/index.ts +381 -152
- package/src/core/uiPromiseRegistry.ts +63 -0
- package/src/data/messages/messages-protocol-v2.json +1138 -441
- package/src/data/messages/messages.json +286 -1
- package/src/data-manager/DataManager.ts +132 -41
- package/src/data-manager/TransportManager.ts +7 -1
- package/src/data-manager/connectSettings.ts +11 -0
- package/src/device/Device.ts +898 -296
- package/src/device/DeviceCommands.ts +193 -158
- package/src/device/DeviceConnector.ts +44 -21
- package/src/device/DeviceFeaturesState.ts +25 -0
- package/src/device/DevicePool.ts +101 -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 +144 -0
- package/src/device/cloneDeviceState.ts +39 -0
- package/src/device/deviceIdentity.ts +18 -0
- package/src/deviceProfile/buildDeviceFeatures.ts +223 -189
- package/src/deviceProfile/index.ts +0 -1
- package/src/deviceProfile/protocolV2DeviceIdentity.ts +35 -0
- package/src/events/device.ts +22 -1
- package/src/events/logBlockEvent.ts +80 -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 +12 -0
- package/src/inject.ts +97 -45
- package/src/lowLevelInject.ts +11 -4
- package/src/protocols/protocol-v2/deviceSession.ts +24 -0
- package/src/protocols/protocol-v2/features.ts +100 -33
- package/src/protocols/protocol-v2/firmware.ts +3 -1
- package/src/protocols/protocol-v2/index.ts +8 -1
- package/src/protocols/protocol-v2/resources.ts +257 -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 +131 -0
- package/src/protocols/protocol-v2/walletSession.ts +463 -0
- package/src/topLevelInject.ts +11 -4
- 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 +6 -0
- package/src/types/api/export.ts +37 -1
- package/src/types/api/firmwareUpdate.ts +101 -5
- package/src/types/api/firmwareUpdateCapabilities.ts +9 -0
- package/src/types/api/firmwareUpdatePlan.ts +38 -0
- package/src/types/api/firmwareUpdatePreparedPlan.ts +53 -0
- package/src/types/api/getDeviceState.ts +19 -0
- package/src/types/api/getFeatures.ts +3 -0
- package/src/types/api/getOnekeyFeatures.ts +3 -0
- package/src/types/api/getPassphraseState.ts +9 -11
- package/src/types/api/index.ts +54 -64
- package/src/types/api/kaspaSignTransaction.ts +60 -4
- package/src/types/api/openWalletSession.ts +54 -0
- package/src/types/api/protocolV2.ts +33 -141
- package/src/types/api/protocolV2ResourceManifest.ts +19 -0
- package/src/types/api/sessionCache.ts +19 -0
- package/src/types/device.ts +216 -10
- package/src/types/params.ts +9 -2
- package/src/types/settings.ts +86 -24
- package/src/utils/assets.ts +4 -1
- package/src/utils/deviceFeaturesCompat.ts +191 -0
- package/src/utils/deviceFeaturesUtils.ts +65 -47
- package/src/utils/deviceInfoUtils.ts +29 -69
- package/src/utils/deviceSettings.ts +174 -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 +27 -3
- package/src/utils/networkUtils.ts +274 -16
- package/src/utils/pro2Nft.ts +142 -0
- package/src/utils/pro2Wallpaper.ts +130 -0
- package/src/utils/tracing.ts +3 -1
- package/src/utils/uiProgressThrottle.ts +63 -0
- package/tsconfig.type-tests.json +12 -0
- package/dist/api/GetDeviceInfo.d.ts +0 -9
- package/dist/api/GetDeviceInfo.d.ts.map +0 -1
- package/dist/api/firmware/progressThrottle.d.ts +0 -3
- package/dist/api/firmware/progressThrottle.d.ts.map +0 -1
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +0 -13
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +0 -1
- package/dist/deviceProfile/buildDeviceProfile.d.ts +0 -21
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
- package/dist/types/api/getDeviceInfo.d.ts +0 -87
- package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
- package/src/api/GetDeviceInfo.ts +0 -145
- package/src/api/firmware/progressThrottle.ts +0 -44
- package/src/api/protocol-v2/FilesystemDiskControl.ts +0 -50
- package/src/deviceProfile/buildDeviceProfile.ts +0 -352
- package/src/types/api/getDeviceInfo.ts +0 -101
package/dist/index.d.ts
CHANGED
|
@@ -1,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 | 900 | 901 | 902;
|
|
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 | 900 | 901 | 902;
|
|
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,363 +167,194 @@ 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
|
-
|
|
170
|
+
promptPassphrase(options: PassphraseRequestPayload, promptOptions?: {
|
|
171
|
+
cancelDeviceOnReject?: boolean;
|
|
172
|
+
}): Promise<PassphrasePromptResponse>;
|
|
149
173
|
}
|
|
150
174
|
|
|
151
|
-
type
|
|
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
|
-
}
|
|
175
|
+
type ProtocolV2RuntimeMode = 'normal' | 'bootloader' | 'romloader';
|
|
180
176
|
|
|
181
|
-
type
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
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>;
|
|
188
200
|
};
|
|
189
|
-
type
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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 generateStateKey;
|
|
280
|
-
private getSessionCacheDeviceKey;
|
|
281
|
-
getInternalState(_deviceId?: string): string | undefined;
|
|
282
|
-
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
283
|
-
private setInternalState;
|
|
284
|
-
clearInternalState(_deviceId?: string): void;
|
|
285
|
-
initialize(options?: InitOptions): Promise<void>;
|
|
286
|
-
private _initializeProtocolV2;
|
|
287
|
-
private _refreshProtocolV2Status;
|
|
288
|
-
getFeatures(): Promise<Features | undefined>;
|
|
289
|
-
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
290
|
-
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo): Features;
|
|
291
|
-
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
292
|
-
updateFromCache(device: Device$1): void;
|
|
293
|
-
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
294
|
-
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
|
|
295
|
-
interruptionFromOutside(): Promise<void>;
|
|
296
|
-
interruptionFromUser(): Promise<void>;
|
|
297
|
-
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
298
|
-
clearCancelableAction(): void;
|
|
299
|
-
getMode(): EOneKeyDeviceMode;
|
|
300
|
-
getFirmwareVersion(): IVersionArray | null;
|
|
301
|
-
getBLEFirmwareVersion(): IVersionArray | null;
|
|
302
|
-
isUsed(): boolean;
|
|
303
|
-
hasDeviceAcquire(): boolean;
|
|
304
|
-
isUsedHere(): boolean;
|
|
305
|
-
isUsedElsewhere(): boolean;
|
|
306
|
-
isBootloader(): boolean | undefined;
|
|
307
|
-
isInitialized(): boolean | undefined;
|
|
308
|
-
isSeedless(): boolean | undefined;
|
|
309
|
-
isUnacquired(): boolean;
|
|
310
|
-
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
311
|
-
hasUsePassphrase(): boolean;
|
|
312
|
-
checkDeviceId(deviceId: string): boolean;
|
|
313
|
-
lockDevice(): Promise<Success$1>;
|
|
314
|
-
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
315
|
-
unlockDevice(): Promise<Features | undefined>;
|
|
316
|
-
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
declare function generateSdkInstanceId(): string;
|
|
320
|
-
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
321
|
-
interface RequestContext {
|
|
322
|
-
responseID: number;
|
|
323
|
-
sdkInstanceId?: string;
|
|
324
|
-
methodName: string;
|
|
325
|
-
connectId?: string;
|
|
326
|
-
deviceInstanceId?: string;
|
|
327
|
-
commandsInstanceId?: string;
|
|
328
|
-
parentResponseID?: number;
|
|
329
|
-
startTime: number;
|
|
330
|
-
endTime?: number;
|
|
331
|
-
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
332
|
-
error?: string;
|
|
333
|
-
}
|
|
334
|
-
interface SdkTracingContext {
|
|
335
|
-
sdkInstanceId: string;
|
|
336
|
-
createdAt: number;
|
|
337
|
-
activeRequests: Map<number, RequestContext>;
|
|
338
|
-
}
|
|
339
|
-
declare function createSdkTracingContext(): SdkTracingContext;
|
|
340
|
-
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
341
|
-
sdkInstanceId?: string;
|
|
342
|
-
connectId?: string;
|
|
343
|
-
deviceInstanceId?: string;
|
|
344
|
-
commandsInstanceId?: string;
|
|
345
|
-
parentResponseID?: number;
|
|
346
|
-
}): RequestContext;
|
|
347
|
-
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
348
|
-
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
349
|
-
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
350
|
-
declare function formatRequestContext(context: RequestContext): string;
|
|
351
|
-
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
352
|
-
|
|
353
|
-
declare class Core extends EventEmitter {
|
|
354
|
-
private tracingContext;
|
|
355
|
-
readonly sdkInstanceId: string;
|
|
356
|
-
private requestQueue;
|
|
357
|
-
private prePendingCallPromise;
|
|
358
|
-
private methodSynchronize;
|
|
359
|
-
constructor();
|
|
360
|
-
private getCoreContext;
|
|
361
|
-
handleMessage(message: CoreMessage): Promise<any>;
|
|
362
|
-
dispose(): void;
|
|
363
|
-
}
|
|
364
|
-
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
365
|
-
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
366
|
-
env: ConnectSettings['env'];
|
|
367
|
-
Transport: any;
|
|
368
|
-
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
369
|
-
}) => void;
|
|
370
|
-
|
|
371
|
-
type DeviceInfoGetTargets = {
|
|
372
|
-
hw?: boolean;
|
|
373
|
-
fw?: boolean;
|
|
374
|
-
coprocessor?: boolean;
|
|
375
|
-
se1?: boolean;
|
|
376
|
-
se2?: boolean;
|
|
377
|
-
se3?: boolean;
|
|
378
|
-
se4?: boolean;
|
|
379
|
-
status?: boolean;
|
|
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;
|
|
380
213
|
};
|
|
381
|
-
type
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
specific?: boolean;
|
|
214
|
+
type IProtocolV2ResourceSource = {
|
|
215
|
+
archiveUrl: string;
|
|
216
|
+
archiveSha256: string;
|
|
217
|
+
archiveSize: number;
|
|
386
218
|
};
|
|
387
|
-
type
|
|
388
|
-
|
|
389
|
-
types?: DeviceInfoGetTypes;
|
|
219
|
+
type IProtocolV2Resources = {
|
|
220
|
+
source: IProtocolV2ResourceSource;
|
|
390
221
|
};
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
222
|
+
type IProtocolV2ResourceManifestFile = {
|
|
223
|
+
archive_path: string;
|
|
224
|
+
original_name: string;
|
|
225
|
+
device_path: string;
|
|
226
|
+
size: number;
|
|
227
|
+
sha256: string;
|
|
228
|
+
signed: true;
|
|
229
|
+
sig_algo: 'ed25519' | 'mldsa65';
|
|
230
|
+
payload_version: string | null;
|
|
394
231
|
};
|
|
395
|
-
type
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
232
|
+
type IProtocolV2ResourceManifest = {
|
|
233
|
+
schema: 1;
|
|
234
|
+
artifact_name: string;
|
|
235
|
+
release_name: string;
|
|
236
|
+
variant: 'resource';
|
|
237
|
+
commit: string;
|
|
238
|
+
short_sha: string;
|
|
239
|
+
timestamp_utc: string;
|
|
240
|
+
core_version: string;
|
|
241
|
+
key_set: string;
|
|
242
|
+
device_root: 'vol0:';
|
|
243
|
+
restore_mode: 'bootloader_update';
|
|
244
|
+
trees: Array<{
|
|
245
|
+
path: string;
|
|
246
|
+
device: string;
|
|
247
|
+
}>;
|
|
248
|
+
files: IProtocolV2ResourceManifestFile[];
|
|
403
249
|
};
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
250
|
+
/** Pro2 RESC bundle okpkg descriptor for incremental FileWrite synchronization. */
|
|
251
|
+
type IProtocolV2ResourceBundle = {
|
|
252
|
+
/** Bundle name, such as images, animation, translations, or fonts_roobert. */
|
|
253
|
+
name: string;
|
|
254
|
+
/** Download URL. */
|
|
255
|
+
url: string;
|
|
256
|
+
fingerprint?: string;
|
|
257
|
+
expectedSize?: number;
|
|
258
|
+
/** Device target path, such as vol0:/bundles/images/images.okpkg. */
|
|
259
|
+
devicePath: string;
|
|
260
|
+
/** okpkg payload_version used to skip matching content after FileRead. */
|
|
261
|
+
version?: IVersionArray;
|
|
262
|
+
/** okpkg payload_hash used for SHA3-512 comparison after FileRead. */
|
|
263
|
+
payloadHash?: string;
|
|
264
|
+
/** okpkg header_hash used for SHA3-512 comparison after FileRead. */
|
|
265
|
+
headerHash?: string;
|
|
408
266
|
};
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
uiResponse: CoreApi['uiResponse'];
|
|
497
|
-
cancel: CoreApi['cancel'];
|
|
498
|
-
updateSettings: CoreApi['updateSettings'];
|
|
499
|
-
switchTransport: CoreApi['switchTransport'];
|
|
500
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
501
|
-
}
|
|
502
|
-
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
503
|
-
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
267
|
+
/** STM32 firmware config */
|
|
268
|
+
type IFirmwareReleaseInfo = {
|
|
269
|
+
required: boolean;
|
|
270
|
+
url: string;
|
|
271
|
+
/**
|
|
272
|
+
* Firmware type (bitcoinonly or universal)
|
|
273
|
+
* This field is not present in the remote config, but will be inferred from the firmware field name
|
|
274
|
+
*/
|
|
275
|
+
firmwareType?: EFirmwareType;
|
|
276
|
+
/** Firmware UI resource */
|
|
277
|
+
resource?: string;
|
|
278
|
+
resourceFingerprint?: string;
|
|
279
|
+
resourceExpectedSize?: number;
|
|
280
|
+
/** Firmware full UI resource */
|
|
281
|
+
fullResource?: string;
|
|
282
|
+
fullResourceFingerprint?: string;
|
|
283
|
+
fullResourceExpectedSize?: number;
|
|
284
|
+
fullResourceRange?: string[];
|
|
285
|
+
bootloaderResource?: string;
|
|
286
|
+
bootloaderFingerprint?: string;
|
|
287
|
+
bootloaderExpectedSize?: number;
|
|
288
|
+
bootloaderVersion?: IVersionArray;
|
|
289
|
+
displayBootloaderVersion?: IVersionArray;
|
|
290
|
+
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
291
|
+
upgradeType?: 'payload-package-set' | string;
|
|
292
|
+
components?: Record<string, IProtocolV2FirmwareComponent>;
|
|
293
|
+
installOrder?: string[];
|
|
294
|
+
/** Pro2 RESC bundles for incremental direct FileWrite synchronization. */
|
|
295
|
+
resourceBundles?: IProtocolV2ResourceBundle[];
|
|
296
|
+
bootloaderChangelog?: {
|
|
297
|
+
[k in ILocale]: string;
|
|
298
|
+
};
|
|
299
|
+
fingerprint: string;
|
|
300
|
+
expectedSize?: number;
|
|
301
|
+
version: IVersionArray;
|
|
302
|
+
changelog: {
|
|
303
|
+
[k in ILocale]: string;
|
|
304
|
+
};
|
|
305
|
+
};
|
|
306
|
+
/** BLE firmware config */
|
|
307
|
+
type IBLEFirmwareReleaseInfo = {
|
|
308
|
+
required: boolean;
|
|
309
|
+
/** bluetooth dfu version */
|
|
310
|
+
url: string;
|
|
311
|
+
/** stm bluetooth update version */
|
|
312
|
+
webUpdate: string;
|
|
313
|
+
fingerprint: string;
|
|
314
|
+
fingerprintWeb: string;
|
|
315
|
+
expectedSize?: number;
|
|
316
|
+
version: IVersionArray;
|
|
317
|
+
changelog: {
|
|
318
|
+
[k in ILocale]: string;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
|
|
322
|
+
type ILegacyKnownDevice = Exclude<IKnownDevice, 'neo'>;
|
|
323
|
+
type IDeviceReleaseInfo = {
|
|
324
|
+
firmware: IFirmwareReleaseInfo[];
|
|
325
|
+
/** Protocol V2 payload package set */
|
|
326
|
+
'firmware-v1'?: IFirmwareReleaseInfo[];
|
|
327
|
+
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
328
|
+
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
329
|
+
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
330
|
+
ble: IBLEFirmwareReleaseInfo[];
|
|
331
|
+
/** Independent Protocol V2 resource release configuration. */
|
|
332
|
+
resources?: IProtocolV2Resources;
|
|
333
|
+
};
|
|
334
|
+
type DeviceTypeMap = {
|
|
335
|
+
[k in ILegacyKnownDevice]: IDeviceReleaseInfo;
|
|
336
|
+
} & {
|
|
337
|
+
/** Optional until every remote-config producer publishes a Neo entry. */
|
|
338
|
+
neo?: IDeviceReleaseInfo;
|
|
339
|
+
};
|
|
340
|
+
type AssetsMap = {
|
|
341
|
+
bridge: {
|
|
342
|
+
version: IVersionArray;
|
|
343
|
+
linux32Rpm: string;
|
|
344
|
+
linux64Rpm: string;
|
|
345
|
+
linux32Deb: string;
|
|
346
|
+
linux64Deb: string;
|
|
347
|
+
win: string;
|
|
348
|
+
mac: string;
|
|
349
|
+
sha256sumAsc: string;
|
|
350
|
+
changelog: {
|
|
351
|
+
[k in ILocale]: string;
|
|
352
|
+
};
|
|
353
|
+
};
|
|
504
354
|
};
|
|
355
|
+
type RemoteConfigResponse = {
|
|
356
|
+
bridge: AssetsMap['bridge'];
|
|
357
|
+
} & DeviceTypeMap;
|
|
505
358
|
|
|
506
359
|
type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
507
360
|
declare enum EOneKeyDeviceMode {
|
|
@@ -516,6 +369,14 @@ type UnavailableCapabilities = {
|
|
|
516
369
|
};
|
|
517
370
|
type KnownDevice = {
|
|
518
371
|
connectId: string | null;
|
|
372
|
+
/** Protocol family confirmed by the transport's active probe. */
|
|
373
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
374
|
+
/**
|
|
375
|
+
* Stable physical-device identity. Current SDK responses always include this
|
|
376
|
+
* value; it remains optional in the type during the uuid compatibility window.
|
|
377
|
+
*/
|
|
378
|
+
serialNo?: string;
|
|
379
|
+
/** @deprecated Use serialNo instead. */
|
|
519
380
|
uuid: string;
|
|
520
381
|
deviceId: string | null;
|
|
521
382
|
deviceType: IDeviceType | null;
|
|
@@ -525,9 +386,12 @@ type KnownDevice = {
|
|
|
525
386
|
bleName: string | null;
|
|
526
387
|
name: string;
|
|
527
388
|
error?: typeof undefined;
|
|
389
|
+
/** Current SDK/transport usage state for connection indicators. */
|
|
390
|
+
status?: DeviceStatus;
|
|
528
391
|
mode: EOneKeyDeviceMode;
|
|
529
|
-
features
|
|
530
|
-
|
|
392
|
+
features: Features;
|
|
393
|
+
/** Unified SDK device-state snapshot; features remains a legacy projection. */
|
|
394
|
+
state?: DeviceState;
|
|
531
395
|
unavailableCapabilities: UnavailableCapabilities;
|
|
532
396
|
bleFirmwareVersion: IVersionArray | null;
|
|
533
397
|
firmwareVersion: IVersionArray | null;
|
|
@@ -537,18 +401,35 @@ type KnownDevice = {
|
|
|
537
401
|
};
|
|
538
402
|
type SearchDevice = {
|
|
539
403
|
connectId: string | null;
|
|
404
|
+
/** Protocol family confirmed by the transport's active probe. */
|
|
405
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
406
|
+
/**
|
|
407
|
+
* Available after device initialization. BLE discovery does not connect to the
|
|
408
|
+
* device, so it returns null until a later initialized device response. Current
|
|
409
|
+
* SDK responses always include the field; it remains optional in the type during
|
|
410
|
+
* the uuid compatibility window.
|
|
411
|
+
*/
|
|
412
|
+
serialNo?: string | null;
|
|
413
|
+
/**
|
|
414
|
+
* @deprecated Ambiguous legacy identifier. Use serialNo for hardware identity
|
|
415
|
+
* and connectId for transport routing.
|
|
416
|
+
*/
|
|
540
417
|
uuid: string;
|
|
541
418
|
deviceId: string | null;
|
|
542
419
|
deviceType: IDeviceType;
|
|
543
420
|
name: string;
|
|
544
421
|
commType: OneKeyDeviceCommType;
|
|
545
422
|
};
|
|
546
|
-
type Device = KnownDevice;
|
|
423
|
+
type Device$1 = KnownDevice;
|
|
547
424
|
type DeviceFeaturesProtocol = 'V1' | 'V2' | 'unknown';
|
|
548
|
-
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
425
|
+
type DeviceFeaturesMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'backupMode' | 'unknown';
|
|
549
426
|
type DeviceFeaturesVerify = {
|
|
550
427
|
firmwareBuildId?: string;
|
|
551
428
|
firmwareHash?: string;
|
|
429
|
+
applicationP1BuildId?: string;
|
|
430
|
+
applicationP1Hash?: string;
|
|
431
|
+
applicationP2BuildId?: string;
|
|
432
|
+
applicationP2Hash?: string;
|
|
552
433
|
bootloaderBuildId?: string;
|
|
553
434
|
bootloaderHash?: string;
|
|
554
435
|
boardBuildId?: string;
|
|
@@ -575,9 +456,126 @@ type DeviceFeaturesVerify = {
|
|
|
575
456
|
type DeviceFeaturesRaw = {
|
|
576
457
|
protocolV1Features?: Messages.Features;
|
|
577
458
|
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
459
|
+
protocolV2ProtocolInfo?: ProtocolInfo;
|
|
578
460
|
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
461
|
+
protocolV2DeviceStatus?: DeviceStatus$1;
|
|
462
|
+
};
|
|
463
|
+
type DeviceFeaturesRawPatch = {
|
|
464
|
+
[Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
|
|
465
|
+
};
|
|
466
|
+
type DeviceStateProtocol = DeviceFeaturesProtocol;
|
|
467
|
+
type DeviceStateMode = DeviceFeaturesMode;
|
|
468
|
+
type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
|
|
469
|
+
type DeviceStateUpdateSource = 'initialize' | 'device-info' | 'device-status' | 'settings-read' | 'settings-write' | 'change-pin' | 'lock' | 'unlock' | 'passphrase' | 'session-clear' | 'firmware-update' | 'transport-reconnect' | 'compatibility';
|
|
470
|
+
type DeviceStateIdentity = {
|
|
471
|
+
deviceType: IDeviceType;
|
|
472
|
+
firmwareType: EFirmwareType;
|
|
473
|
+
model: string | null;
|
|
474
|
+
vendor: string | null;
|
|
475
|
+
deviceId: string | null;
|
|
476
|
+
serialNo: string;
|
|
477
|
+
label: string | null;
|
|
478
|
+
bleName: string | null;
|
|
479
|
+
};
|
|
480
|
+
type DeviceStateStatus = {
|
|
481
|
+
mode: DeviceStateMode;
|
|
482
|
+
initialized: boolean | null;
|
|
483
|
+
unlocked: boolean | null;
|
|
484
|
+
firmwarePresent: boolean | null;
|
|
485
|
+
backupRequired: boolean | null;
|
|
486
|
+
noBackup: boolean | null;
|
|
487
|
+
unfinishedBackup: boolean | null;
|
|
488
|
+
recoveryMode: boolean | null;
|
|
489
|
+
passphraseProtection: boolean | null;
|
|
490
|
+
pinProtection: boolean | null;
|
|
491
|
+
/** `attach_to_pin_enabled`:是否至少存在一个 Attach PIN 绑定。 */
|
|
492
|
+
attachToPinEnabled: boolean | null;
|
|
493
|
+
/** `unlocked_by_attach_to_pin`:本次解锁是否由 Attach PIN 完成。 */
|
|
494
|
+
unlockedAttachPin: boolean | null;
|
|
495
|
+
};
|
|
496
|
+
type DeviceStateSettings = {
|
|
497
|
+
language: string | null;
|
|
498
|
+
bleEnabled: boolean | null;
|
|
499
|
+
sdCardPresent: boolean | null;
|
|
500
|
+
sdProtection: boolean | null;
|
|
501
|
+
wipeCodeProtection: boolean | null;
|
|
502
|
+
passphraseAlwaysOnDevice: boolean | null;
|
|
503
|
+
safetyChecks: Enum_SafetyCheckLevel | null;
|
|
504
|
+
autoLockDelayMs: number | null;
|
|
505
|
+
autoShutdownDelayMs: number | null;
|
|
506
|
+
displayRotation: number | null;
|
|
507
|
+
experimentalFeatures: boolean | null;
|
|
508
|
+
wallpaperPath: string | null;
|
|
509
|
+
brightness: number | null;
|
|
510
|
+
animationEnabled: boolean | null;
|
|
511
|
+
tapToWake: boolean | null;
|
|
512
|
+
hapticFeedback: boolean | null;
|
|
513
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
514
|
+
airgapMode: boolean | null;
|
|
515
|
+
fidoEnabled: boolean | null;
|
|
516
|
+
usbLockEnabled: boolean | null;
|
|
517
|
+
randomKeypad: boolean | null;
|
|
518
|
+
};
|
|
519
|
+
type DeviceStateVersions = {
|
|
520
|
+
firmware: string | null;
|
|
521
|
+
applicationP1?: string | null;
|
|
522
|
+
applicationP2?: string | null;
|
|
523
|
+
bootloader: string | null;
|
|
524
|
+
board: string | null;
|
|
525
|
+
ble: string | null;
|
|
526
|
+
/** @deprecated Kept for legacy consumers; new code should read se01. */
|
|
527
|
+
se?: string | null;
|
|
528
|
+
se01?: string | null;
|
|
529
|
+
se02?: string | null;
|
|
530
|
+
se03?: string | null;
|
|
531
|
+
se04?: string | null;
|
|
532
|
+
se01Boot?: string | null;
|
|
533
|
+
se02Boot?: string | null;
|
|
534
|
+
se03Boot?: string | null;
|
|
535
|
+
se04Boot?: string | null;
|
|
536
|
+
};
|
|
537
|
+
type DeviceStateSecurityElement = {
|
|
538
|
+
type: string | null;
|
|
539
|
+
state: string | null;
|
|
540
|
+
};
|
|
541
|
+
type DeviceStateSecurityElements = Partial<Record<'se01' | 'se02' | 'se03' | 'se04', DeviceStateSecurityElement>>;
|
|
542
|
+
type DeviceStateSecurityElementsPatch = Partial<Record<keyof DeviceStateSecurityElements, Partial<DeviceStateSecurityElement>>>;
|
|
543
|
+
type DeviceState = {
|
|
544
|
+
schemaVersion: 1;
|
|
545
|
+
revision: number;
|
|
546
|
+
updatedAt: number;
|
|
547
|
+
protocol: DeviceStateProtocol;
|
|
548
|
+
/** Device-message protocol version, independent of the SDK V1/V2 protocol family. */
|
|
549
|
+
protocolVersion: number | null;
|
|
550
|
+
identity: DeviceStateIdentity;
|
|
551
|
+
status: DeviceStateStatus;
|
|
552
|
+
settings: DeviceStateSettings;
|
|
553
|
+
versions: DeviceStateVersions;
|
|
554
|
+
/** Secure-element metadata exposed by the unified firmware information read. */
|
|
555
|
+
securityElements?: DeviceStateSecurityElements;
|
|
556
|
+
capabilities: Array<number | string>;
|
|
557
|
+
verification?: Partial<DeviceFeaturesVerify>;
|
|
558
|
+
};
|
|
559
|
+
type DeviceStatePatch = {
|
|
560
|
+
protocol?: DeviceStateProtocol;
|
|
561
|
+
protocolVersion?: number | null;
|
|
562
|
+
identity?: Partial<DeviceStateIdentity>;
|
|
563
|
+
status?: Partial<DeviceStateStatus>;
|
|
564
|
+
settings?: Partial<DeviceStateSettings>;
|
|
565
|
+
versions?: Partial<DeviceStateVersions>;
|
|
566
|
+
securityElements?: DeviceStateSecurityElementsPatch;
|
|
567
|
+
capabilities?: Array<number | string>;
|
|
568
|
+
verification?: DeviceFeaturesVerify;
|
|
569
|
+
raw?: DeviceFeaturesRawPatch;
|
|
570
|
+
};
|
|
571
|
+
type DeviceStateEvent = {
|
|
572
|
+
connectId: string | null;
|
|
573
|
+
state: DeviceState;
|
|
574
|
+
revision: number;
|
|
575
|
+
source: DeviceStateUpdateSource;
|
|
576
|
+
changedKeys: string[];
|
|
579
577
|
};
|
|
580
|
-
type
|
|
578
|
+
type NormalizedFeatures = {
|
|
581
579
|
protocol: DeviceFeaturesProtocol;
|
|
582
580
|
protocolVersion?: number | null;
|
|
583
581
|
deviceType: IDeviceType;
|
|
@@ -606,11 +604,23 @@ type Features = {
|
|
|
606
604
|
sdProtection: boolean | null;
|
|
607
605
|
wipeCodeProtection: boolean | null;
|
|
608
606
|
passphraseAlwaysOnDevice: boolean | null;
|
|
607
|
+
/** `attach_to_pin_enabled`:是否至少存在一个 Attach PIN 绑定。 */
|
|
609
608
|
attachToPinEnabled?: boolean | null;
|
|
610
|
-
safetyChecks:
|
|
609
|
+
safetyChecks: Enum_SafetyCheckLevel | null;
|
|
611
610
|
autoLockDelayMs: number | null;
|
|
611
|
+
autoShutdownDelayMs: number | null;
|
|
612
612
|
displayRotation: number | null;
|
|
613
613
|
experimentalFeatures: boolean | null;
|
|
614
|
+
wallpaperPath: string | null;
|
|
615
|
+
brightness: number | null;
|
|
616
|
+
animationEnabled: boolean | null;
|
|
617
|
+
tapToWake: boolean | null;
|
|
618
|
+
hapticFeedback: boolean | null;
|
|
619
|
+
deviceNameDisplayEnabled: boolean | null;
|
|
620
|
+
airgapMode: boolean | null;
|
|
621
|
+
fidoEnabled: boolean | null;
|
|
622
|
+
usbLockEnabled: boolean | null;
|
|
623
|
+
randomKeypad: boolean | null;
|
|
614
624
|
firmwareVersion: string | null;
|
|
615
625
|
bootloaderVersion: string | null;
|
|
616
626
|
boardVersion: string | null;
|
|
@@ -630,9 +640,16 @@ type Features = {
|
|
|
630
640
|
unlockedAttachPin?: boolean;
|
|
631
641
|
raw?: DeviceFeaturesRaw;
|
|
632
642
|
};
|
|
643
|
+
type Features = NormalizedFeatures & Partial<Omit<Messages.Features, keyof NormalizedFeatures>> & Partial<Omit<Messages.OnekeyFeatures, keyof NormalizedFeatures | keyof Messages.Features>>;
|
|
633
644
|
type OnekeyFeatures = Messages.OnekeyFeatures;
|
|
634
|
-
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
|
|
635
|
-
|
|
645
|
+
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2 | EDeviceType.Neo;
|
|
646
|
+
/**
|
|
647
|
+
* model_classic: 'classic' | 'classic1s' | 'classicpure'
|
|
648
|
+
* model_mini: 'classic' | 'classic1s' | 'classicpure' | 'mini'
|
|
649
|
+
* model_touch: 'touch' | 'pro'
|
|
650
|
+
* model_pro2: 'pro2' | 'neo'
|
|
651
|
+
*/
|
|
652
|
+
type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s' | 'model_pro2';
|
|
636
653
|
declare const DeviceModelToTypes: {
|
|
637
654
|
[deviceModel in IDeviceModel]: IDeviceType[];
|
|
638
655
|
};
|
|
@@ -645,7 +662,6 @@ type ITransportStatus = 'valid' | 'outdated';
|
|
|
645
662
|
type IVersionRange = {
|
|
646
663
|
min: string;
|
|
647
664
|
max?: string;
|
|
648
|
-
unsupported?: boolean;
|
|
649
665
|
};
|
|
650
666
|
type DeviceFirmwareRange = {
|
|
651
667
|
[deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
|
|
@@ -696,309 +712,671 @@ type SupportFeatures = {
|
|
|
696
712
|
modifyHomescreen: SupportFeatureType;
|
|
697
713
|
};
|
|
698
714
|
|
|
699
|
-
type
|
|
700
|
-
type
|
|
701
|
-
|
|
702
|
-
debug?: boolean;
|
|
703
|
-
transportReconnect?: boolean;
|
|
704
|
-
lazyLoad?: boolean;
|
|
705
|
-
origin?: string;
|
|
706
|
-
parentOrigin?: string;
|
|
707
|
-
configSrc: string;
|
|
708
|
-
iframeSrc: string;
|
|
709
|
-
version: string;
|
|
710
|
-
priority: number;
|
|
711
|
-
trustedHost: boolean;
|
|
712
|
-
supportedBrowser?: boolean;
|
|
713
|
-
env: transportEnv;
|
|
714
|
-
timestamp: number;
|
|
715
|
-
isFrame?: boolean;
|
|
716
|
-
preRelease?: boolean;
|
|
717
|
-
fetchConfig?: boolean;
|
|
718
|
-
extension?: string;
|
|
719
|
-
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
720
|
-
};
|
|
721
|
-
type IVersionArray = [number, number, number];
|
|
722
|
-
type ILocale = 'zh-CN' | 'en-US';
|
|
723
|
-
type IProtocolV2FirmwareComponentTarget = 'ROMLOADER' | 'BOOTLOADER' | 'APPLICATION_P1' | 'APPLICATION_P2' | 'COPROCESSOR' | 'SE01' | 'SE02' | 'SE03' | 'SE04' | 'CRATE';
|
|
724
|
-
type IProtocolV2FirmwareComponent = {
|
|
725
|
-
target: IProtocolV2FirmwareComponentTarget;
|
|
726
|
-
url: string;
|
|
727
|
-
fingerprint?: string;
|
|
728
|
-
version?: IVersionArray;
|
|
729
|
-
resourceManifest?: IProtocolV2ResourceManifest;
|
|
730
|
-
};
|
|
731
|
-
type IProtocolV2ResourceManifestPackage = {
|
|
732
|
-
name?: string;
|
|
733
|
-
path: string;
|
|
734
|
-
type?: string;
|
|
735
|
-
version?: IVersionArray;
|
|
736
|
-
sha256?: string;
|
|
737
|
-
payloadHash?: string;
|
|
738
|
-
headerHash?: string;
|
|
739
|
-
};
|
|
740
|
-
type IProtocolV2ResourceManifest = {
|
|
741
|
-
format?: 'okpkg-crate' | string;
|
|
742
|
-
target?: 'CRATE' | string;
|
|
743
|
-
version?: IVersionArray;
|
|
744
|
-
packages: IProtocolV2ResourceManifestPackage[];
|
|
745
|
-
};
|
|
746
|
-
type IFirmwareReleaseInfo = {
|
|
747
|
-
required: boolean;
|
|
748
|
-
url: string;
|
|
749
|
-
firmwareType?: EFirmwareType;
|
|
750
|
-
resource?: string;
|
|
751
|
-
fullResource?: string;
|
|
752
|
-
fullResourceRange?: string[];
|
|
753
|
-
bootloaderResource?: string;
|
|
754
|
-
bootloaderVersion?: IVersionArray;
|
|
755
|
-
displayBootloaderVersion?: IVersionArray;
|
|
756
|
-
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
757
|
-
upgradeType?: 'payload-package-set' | string;
|
|
758
|
-
components?: Record<string, IProtocolV2FirmwareComponent>;
|
|
759
|
-
installOrder?: string[];
|
|
760
|
-
resourceManifest?: IProtocolV2ResourceManifest;
|
|
761
|
-
bootloaderChangelog?: {
|
|
762
|
-
[k in ILocale]: string;
|
|
763
|
-
};
|
|
764
|
-
fingerprint: string;
|
|
765
|
-
version: IVersionArray;
|
|
766
|
-
changelog: {
|
|
767
|
-
[k in ILocale]: string;
|
|
768
|
-
};
|
|
769
|
-
};
|
|
770
|
-
type IBLEFirmwareReleaseInfo = {
|
|
771
|
-
required: boolean;
|
|
772
|
-
url: string;
|
|
773
|
-
webUpdate: string;
|
|
774
|
-
fingerprint: string;
|
|
775
|
-
fingerprintWeb: string;
|
|
776
|
-
version: IVersionArray;
|
|
777
|
-
changelog: {
|
|
778
|
-
[k in ILocale]: string;
|
|
779
|
-
};
|
|
780
|
-
};
|
|
781
|
-
type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
|
|
782
|
-
type DeviceTypeMap = {
|
|
783
|
-
[k in IKnownDevice]: {
|
|
784
|
-
firmware: IFirmwareReleaseInfo[];
|
|
785
|
-
'firmware-v1'?: IFirmwareReleaseInfo[];
|
|
786
|
-
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
787
|
-
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
788
|
-
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
789
|
-
ble: IBLEFirmwareReleaseInfo[];
|
|
790
|
-
};
|
|
715
|
+
type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
|
|
716
|
+
type GetDeviceStateParams = CommonParams & {
|
|
717
|
+
scope?: DeviceStateScope;
|
|
791
718
|
};
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
linux64Rpm: string;
|
|
797
|
-
linux32Deb: string;
|
|
798
|
-
linux64Deb: string;
|
|
799
|
-
win: string;
|
|
800
|
-
mac: string;
|
|
801
|
-
sha256sumAsc: string;
|
|
802
|
-
changelog: {
|
|
803
|
-
[k in ILocale]: string;
|
|
804
|
-
};
|
|
805
|
-
};
|
|
719
|
+
/** Internal state-read options, not part of the public CoreApi. */
|
|
720
|
+
type DeviceStateReadOptions = {
|
|
721
|
+
refreshSections?: DeviceStateSection[];
|
|
722
|
+
includeRaw?: boolean;
|
|
806
723
|
};
|
|
807
|
-
|
|
808
|
-
bridge: AssetsMap['bridge'];
|
|
809
|
-
} & DeviceTypeMap;
|
|
724
|
+
declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
|
|
810
725
|
|
|
811
|
-
|
|
812
|
-
|
|
726
|
+
type DeviceDescriptorDiff = {
|
|
727
|
+
didUpdate: boolean;
|
|
728
|
+
connected: OneKeyDeviceInfo[];
|
|
729
|
+
disconnected: OneKeyDeviceInfo[];
|
|
730
|
+
changedSessions: OneKeyDeviceInfo[];
|
|
731
|
+
changedDebugSessions: OneKeyDeviceInfo[];
|
|
732
|
+
acquired: OneKeyDeviceInfo[];
|
|
733
|
+
debugAcquired: OneKeyDeviceInfo[];
|
|
734
|
+
released: OneKeyDeviceInfo[];
|
|
735
|
+
debugReleased: OneKeyDeviceInfo[];
|
|
736
|
+
descriptors: OneKeyDeviceInfo[];
|
|
737
|
+
};
|
|
813
738
|
|
|
814
|
-
declare
|
|
739
|
+
declare class DeviceConnector {
|
|
740
|
+
transport?: Transport;
|
|
741
|
+
listenTimestamp: number;
|
|
742
|
+
current: OneKeyDeviceInfo[] | null;
|
|
743
|
+
upcoming: OneKeyDeviceInfo[];
|
|
744
|
+
listening: boolean;
|
|
745
|
+
constructor();
|
|
746
|
+
private getActiveTransport;
|
|
747
|
+
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
748
|
+
listen(): Promise<void>;
|
|
749
|
+
stop(): void;
|
|
750
|
+
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, expectedProtocol?: HardwareConnectProtocol, protocolHint?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
751
|
+
release(session: string, onclose: boolean, keepSession?: boolean): Promise<void>;
|
|
752
|
+
disconnect(session: string | undefined | null): Promise<void>;
|
|
753
|
+
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
754
|
+
_reportDevicesChange(): void;
|
|
755
|
+
}
|
|
815
756
|
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
757
|
+
type InitOptions = {
|
|
758
|
+
initSession?: boolean;
|
|
759
|
+
deviceId?: string;
|
|
760
|
+
passphraseState?: string;
|
|
761
|
+
deriveCardano?: boolean;
|
|
762
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
763
|
+
forceProtocolDetection?: boolean;
|
|
764
|
+
protocolV2DeviceInfoTimeoutMs?: number;
|
|
765
|
+
/** Refresh Protocol V2 runtime state before returning discovery results. */
|
|
766
|
+
refreshRuntimeState?: boolean;
|
|
767
|
+
/**
|
|
768
|
+
* Protocol V1 Initialize response timeout override. Reboot-wait polling passes a
|
|
769
|
+
* short value so an unanswered probe settles before the next poll tick.
|
|
770
|
+
*/
|
|
771
|
+
timeoutMs?: number;
|
|
772
|
+
};
|
|
773
|
+
type RunOptions = {
|
|
774
|
+
keepSession?: boolean;
|
|
775
|
+
skipInitialize?: boolean;
|
|
776
|
+
} & InitOptions;
|
|
777
|
+
interface DeviceEvents {
|
|
778
|
+
[DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
779
|
+
[DEVICE.PIN_ON_DEVICE]: [Device, DeviceSessionPinType, ProtocolV2UiEventMetadata?];
|
|
780
|
+
[DEVICE.PIN_ON_DEVICE_COMPLETE]: [Device, HardwareUiInteractionMeta];
|
|
781
|
+
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
782
|
+
[DEVICE.ATTACH_PIN_ON_DEVICE]: [Device, PassphraseRequestPayload?];
|
|
783
|
+
[DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
|
|
784
|
+
[DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
|
|
785
|
+
[DEVICE.STATE]: [Device, DeviceStateEvent];
|
|
786
|
+
[DEVICE.PASSPHRASE]: [
|
|
787
|
+
Device,
|
|
788
|
+
PassphraseRequestPayload,
|
|
789
|
+
(response: PassphrasePromptResponse, error?: Error) => void
|
|
790
|
+
];
|
|
791
|
+
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
792
|
+
Device,
|
|
793
|
+
(err: any, deviceId: string) => void
|
|
794
|
+
];
|
|
795
|
+
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
796
|
+
Device,
|
|
797
|
+
(err: any, deviceId: string) => void
|
|
798
|
+
];
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Pre-populate the device session cache with a known session ID.
|
|
802
|
+
*
|
|
803
|
+
* This allows short-lived processes (e.g. CLI) to restore a previously
|
|
804
|
+
* obtained session, avoiding the need to re-enter passphrase on every
|
|
805
|
+
* invocation. The session must have been obtained from a prior
|
|
806
|
+
* wallet-session call on the same device. This compatibility hook is intended
|
|
807
|
+
* for a trusted CLI process restoring its own OS-keychain entry.
|
|
808
|
+
*
|
|
809
|
+
* @param deviceId - The device's device_id (from features)
|
|
810
|
+
* @param passphraseState - The passphrase state token
|
|
811
|
+
* @param sessionId - The session_id to cache (from features.session_id)
|
|
812
|
+
*/
|
|
813
|
+
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
814
|
+
interface Device {
|
|
815
|
+
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
816
|
+
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
817
|
+
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
818
|
+
}
|
|
819
|
+
declare class Device extends EventEmitter {
|
|
820
|
+
/**
|
|
821
|
+
* 设备标识对象
|
|
822
|
+
*/
|
|
823
|
+
originalDescriptor: OneKeyDeviceInfo;
|
|
824
|
+
sdkInstanceId?: string;
|
|
825
|
+
/**
|
|
826
|
+
* 设备实例唯一标识
|
|
827
|
+
*/
|
|
828
|
+
instanceId: string;
|
|
829
|
+
createdAt: number;
|
|
830
|
+
/**
|
|
831
|
+
* 设备主 ID
|
|
832
|
+
* 蓝牙连接时是设备的 UUID
|
|
833
|
+
* USB连接时是设备的 sessionID
|
|
834
|
+
*/
|
|
835
|
+
mainId?: string | null;
|
|
836
|
+
/**
|
|
837
|
+
* 通信管道,向设备发送请求
|
|
838
|
+
*/
|
|
839
|
+
deviceConnector?: DeviceConnector | null;
|
|
840
|
+
/**
|
|
841
|
+
* 固件命令
|
|
842
|
+
*/
|
|
843
|
+
commands: DeviceCommands;
|
|
844
|
+
/**
|
|
845
|
+
* 可取消的操作
|
|
846
|
+
*/
|
|
847
|
+
private cancelableAction?;
|
|
848
|
+
/**
|
|
849
|
+
* 设备是否被占用
|
|
850
|
+
*/
|
|
851
|
+
private deviceAcquired;
|
|
852
|
+
/** Canonical device-state cache; legacy Features is a compatibility projection. */
|
|
853
|
+
private stateStore;
|
|
854
|
+
/** Force the next initialization to reload DeviceInfo after reconnect or reboot. */
|
|
855
|
+
private protocolV2StateNeedsReload;
|
|
856
|
+
/** Runtime context negotiated once per active Protocol V2 link. */
|
|
857
|
+
private protocolV2RuntimeContext?;
|
|
858
|
+
/** Coalesces concurrent first-use runtime negotiation on the same active link. */
|
|
859
|
+
private protocolV2RuntimeContextPromise?;
|
|
860
|
+
/** Invalidates an in-flight runtime-context response without adding a transport epoch. */
|
|
861
|
+
private protocolV2RuntimeContextRequestToken?;
|
|
862
|
+
private protocolV2UiInteraction?;
|
|
863
|
+
private protocolV2UiInteractionCounter;
|
|
864
|
+
get state(): (DeviceState & {
|
|
865
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
866
|
+
}) | undefined;
|
|
867
|
+
get features(): Features | undefined;
|
|
868
|
+
set features(features: Features | undefined);
|
|
869
|
+
runPromise?: Deferred<void> | null;
|
|
870
|
+
externalState: string[];
|
|
871
|
+
unavailableCapabilities: UnavailableCapabilities;
|
|
872
|
+
instance: number;
|
|
873
|
+
internalState: string[];
|
|
874
|
+
needReloadDevice: boolean;
|
|
875
|
+
/**
|
|
876
|
+
* 执行 API 方法后是否保留 SessionID
|
|
877
|
+
*/
|
|
878
|
+
keepSession: boolean;
|
|
879
|
+
passphraseState: string | undefined;
|
|
880
|
+
pendingCallbackPromise?: Deferred<void>;
|
|
881
|
+
/** Pre-initialize timestamp (ms) */
|
|
882
|
+
private preInitializedAt?;
|
|
883
|
+
/** Pre-initialize context, used to verify state consistency before skipping */
|
|
884
|
+
private preInitializeMeta?;
|
|
885
|
+
/** Last Initialize duration (ms), reported as "saved" when a skip happens */
|
|
886
|
+
private lastInitializeDurationMs?;
|
|
887
|
+
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
888
|
+
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
|
|
889
|
+
toMessageObject(): Device$1 | null;
|
|
890
|
+
/**
|
|
891
|
+
* Device connect
|
|
892
|
+
* @returns {Promise<boolean>}
|
|
893
|
+
*/
|
|
894
|
+
connect(connectProtocol?: HardwareConnectProtocol, options?: {
|
|
895
|
+
forceProtocolDetection?: boolean;
|
|
896
|
+
}): Promise<boolean>;
|
|
897
|
+
acquire(expectedProtocol?: HardwareConnectProtocol, options?: {
|
|
898
|
+
throwOnRunPromiseError?: boolean;
|
|
899
|
+
forceProtocolDetection?: boolean;
|
|
900
|
+
}): Promise<void>;
|
|
901
|
+
release(): Promise<void>;
|
|
902
|
+
/**
|
|
903
|
+
* Pre-initialize: connect + Initialize ahead of the sign.
|
|
904
|
+
*/
|
|
905
|
+
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
906
|
+
markPreInitialized(meta?: {
|
|
907
|
+
passphraseState?: string;
|
|
908
|
+
}): void;
|
|
909
|
+
clearPreInitialized(): void;
|
|
910
|
+
isPreInitializeMetaMatch(payload?: {
|
|
911
|
+
passphraseState?: string;
|
|
912
|
+
}): boolean;
|
|
913
|
+
isPreInitializedValid(ttlMs: number): boolean;
|
|
914
|
+
setLastInitializeDuration(durationMs: number): void;
|
|
915
|
+
getLastInitializeDuration(): number | undefined;
|
|
916
|
+
getCommands(): DeviceCommands;
|
|
917
|
+
/**
|
|
918
|
+
* Canonical protocol discriminator.
|
|
919
|
+
*
|
|
920
|
+
* descriptor.protocolType is established by active probing; V2 features are mapped
|
|
921
|
+
* from DeviceInfoGet. All protocol branches must use this method instead of reading
|
|
922
|
+
* originalDescriptor.protocolType directly or inferring a protocol from features.
|
|
923
|
+
*/
|
|
924
|
+
getProtocol(): 'V1' | 'V2';
|
|
925
|
+
isProtocolV2(): boolean;
|
|
926
|
+
getCurrentDeviceType(): IDeviceType;
|
|
927
|
+
getCurrentDeviceId(): string | undefined;
|
|
928
|
+
getCurrentSerialNo(): string;
|
|
929
|
+
getConnectId(): string;
|
|
930
|
+
getCurrentBleName(): string | null;
|
|
931
|
+
getCurrentLabel(): string | null;
|
|
932
|
+
getCurrentDisplayName(): string | null;
|
|
933
|
+
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
934
|
+
getCurrentFirmwareType(): EFirmwareType;
|
|
935
|
+
getCurrentFirmwareVersionString(): string;
|
|
936
|
+
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
937
|
+
getCurrentBootloaderVersionString(): string | undefined;
|
|
938
|
+
getCurrentSafetyChecks(): _onekeyfe_hd_transport.Enum_SafetyCheckLevel | null | undefined;
|
|
939
|
+
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
940
|
+
supportNewPassphrase(): SupportFeatureType;
|
|
941
|
+
supportInputPinOnSoftware(): SupportFeatureType;
|
|
942
|
+
supportModifyHomescreen(): SupportFeatureType;
|
|
943
|
+
private getSessionCacheDeviceKey;
|
|
944
|
+
private reconcileSessionCacheDeviceIdentity;
|
|
945
|
+
getInternalState(_deviceId?: string): string | undefined;
|
|
946
|
+
getStandardInternalState(_deviceId?: string): {
|
|
947
|
+
passphraseState: string;
|
|
948
|
+
sessionId: string;
|
|
949
|
+
} | undefined;
|
|
950
|
+
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null, walletType?: 'standard' | 'hidden'): void;
|
|
951
|
+
private setInternalState;
|
|
952
|
+
clearInternalState(_deviceId?: string): void;
|
|
953
|
+
clearStandardInternalState(_deviceId?: string): void;
|
|
954
|
+
initialize(options?: InitOptions): Promise<void>;
|
|
955
|
+
/**
|
|
956
|
+
* Device initialization over Protocol V2.
|
|
957
|
+
*
|
|
958
|
+
* Protocol V2 bypasses legacy Initialize/GetFeatures and builds its canonical
|
|
959
|
+
* features state directly from DeviceInfoGet.
|
|
960
|
+
*/
|
|
961
|
+
private _initializeProtocolV2;
|
|
962
|
+
getFeatures(): Promise<Features | undefined>;
|
|
963
|
+
getDeviceState(params?: DeviceStateReadOptions): Promise<DeviceState>;
|
|
964
|
+
_updateFeatures(protoFeatures: Messages.Features | Features, initSession?: boolean): void;
|
|
965
|
+
updateState(patch: DeviceStatePatch, source: DeviceStateUpdateSource): DeviceState & {
|
|
966
|
+
raw?: DeviceFeaturesRaw | undefined;
|
|
967
|
+
};
|
|
968
|
+
updateFeaturesPatch(patch: Partial<Features>, source: DeviceStateUpdateSource): Features | undefined;
|
|
969
|
+
ensureProtocolV2RuntimeContext(timeoutMs?: number): Promise<ProtocolInfo>;
|
|
970
|
+
probeProtocolV2RuntimeState(deviceInfo?: ProtocolV2DeviceInfo, timeoutMs?: number): Promise<Features>;
|
|
971
|
+
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo, deviceStatus?: DeviceStatus$1 | null, runtimeMode?: ProtocolV2RuntimeMode, protocolInfo?: ProtocolInfo): Features;
|
|
972
|
+
updateProtocolV2Status(status: DeviceStatus$1): Features;
|
|
973
|
+
markTransportDisconnected(): void;
|
|
974
|
+
invalidateAfterWipe(): void;
|
|
975
|
+
markProtocolV2Reboot(rebootType: DeviceRebootType): void;
|
|
976
|
+
/**
|
|
977
|
+
* 暂时只在 acquire 后更新 Session ID
|
|
978
|
+
* 后续看是否有需要依据 listen 返回结果更新
|
|
979
|
+
* @param descriptor
|
|
980
|
+
*/
|
|
981
|
+
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
982
|
+
updateFromCache(device: Device): void;
|
|
983
|
+
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
984
|
+
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions, runPromise: Deferred<void>): Promise<void>;
|
|
985
|
+
interruptionFromOutside(): Promise<void>;
|
|
986
|
+
interruptionFromUser(): Promise<void>;
|
|
987
|
+
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
988
|
+
clearCancelableAction(): void;
|
|
989
|
+
getMode(): EOneKeyDeviceMode;
|
|
990
|
+
getStatus(): "available" | "occupied" | "used";
|
|
991
|
+
getFirmwareVersion(): IVersionArray | null;
|
|
992
|
+
getBLEFirmwareVersion(): IVersionArray | null;
|
|
993
|
+
isUsed(): boolean;
|
|
994
|
+
hasDeviceAcquire(): boolean;
|
|
995
|
+
isUsedHere(): boolean;
|
|
996
|
+
isUsedElsewhere(): boolean;
|
|
997
|
+
isBootloader(): boolean | undefined;
|
|
998
|
+
isRomloader(): boolean | undefined;
|
|
999
|
+
isInitialized(): boolean | undefined;
|
|
1000
|
+
isSeedless(): boolean | undefined;
|
|
1001
|
+
isUnacquired(): boolean;
|
|
1002
|
+
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
1003
|
+
hasUsePassphrase(): boolean;
|
|
1004
|
+
checkDeviceId(deviceId: string): boolean;
|
|
1005
|
+
lockDevice(): Promise<Success$1>;
|
|
1006
|
+
beginProtocolV2UiInteraction(): void;
|
|
1007
|
+
createProtocolV2UiPhaseMetadata(phase: HardwareUiInteractionMeta['phase'], transition: HardwareUiInteractionMeta['transition'], options?: {
|
|
1008
|
+
phaseId?: string;
|
|
1009
|
+
outcome?: HardwareUiInteractionMeta['outcome'];
|
|
1010
|
+
}): HardwareUiInteractionMeta | undefined;
|
|
1011
|
+
completeProtocolV2UiPhase(phase: HardwareUiInteractionMeta, outcome?: HardwareUiInteractionMeta['outcome']): HardwareUiInteractionMeta | undefined;
|
|
1012
|
+
finishProtocolV2UiInteraction(outcome?: HardwareUiInteractionMeta['outcome'], options?: {
|
|
1013
|
+
ensureMetadata?: boolean;
|
|
1014
|
+
}): HardwareUiInteractionMeta | undefined;
|
|
1015
|
+
hasOpenProtocolV2UiInteraction(): boolean;
|
|
1016
|
+
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
1017
|
+
unlockDevice(pinType?: DeviceSessionPinType, options?: ProtocolV2UiEventMetadata & {
|
|
1018
|
+
emitUiEvent?: boolean;
|
|
1019
|
+
}): Promise<Features | undefined>;
|
|
1020
|
+
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean, deriveCardano?: boolean): Promise<boolean>;
|
|
1021
|
+
}
|
|
819
1022
|
|
|
820
|
-
|
|
1023
|
+
/**
|
|
1024
|
+
* SDK Tracing Utilities
|
|
1025
|
+
* Tracks object instances and request call chains across multiple SDK instances
|
|
1026
|
+
*/
|
|
1027
|
+
/**
|
|
1028
|
+
* Generate SDK instance ID
|
|
1029
|
+
* @returns Format: "SDK-<number>-<timestamp>"
|
|
1030
|
+
* @example "SDK-1-123456"
|
|
1031
|
+
*/
|
|
1032
|
+
declare function generateSdkInstanceId(): string;
|
|
1033
|
+
/**
|
|
1034
|
+
* Generate globally unique instance ID
|
|
1035
|
+
* @param type Instance type (Device, DeviceCommands, BaseMethod, etc.)
|
|
1036
|
+
* @param sdkInstanceId SDK instance ID (optional)
|
|
1037
|
+
* @returns Format: <SDK>.<type>-<number>-<timestamp>
|
|
1038
|
+
* @example "SDK-1.Device-1-123456" or "Device-1-123456"
|
|
1039
|
+
*/
|
|
1040
|
+
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
1041
|
+
/**
|
|
1042
|
+
* Request context information
|
|
1043
|
+
*/
|
|
1044
|
+
interface RequestContext {
|
|
1045
|
+
/** Request unique ID (reuses BaseMethod.responseID) */
|
|
1046
|
+
responseID: number;
|
|
1047
|
+
/** SDK instance ID */
|
|
1048
|
+
sdkInstanceId?: string;
|
|
1049
|
+
/** API method name */
|
|
1050
|
+
methodName: string;
|
|
1051
|
+
/** Device connection ID */
|
|
1052
|
+
connectId?: string;
|
|
1053
|
+
/** Device instance ID */
|
|
1054
|
+
deviceInstanceId?: string;
|
|
1055
|
+
/** DeviceCommands instance ID */
|
|
1056
|
+
commandsInstanceId?: string;
|
|
1057
|
+
/** Parent request ID (for nested calls like allNetworkGetAddress) */
|
|
1058
|
+
parentResponseID?: number;
|
|
1059
|
+
/** Request start time */
|
|
1060
|
+
startTime: number;
|
|
1061
|
+
/** Request end time */
|
|
1062
|
+
endTime?: number;
|
|
1063
|
+
/** Request status */
|
|
1064
|
+
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
1065
|
+
/** Error message */
|
|
1066
|
+
error?: string;
|
|
1067
|
+
}
|
|
1068
|
+
/**
|
|
1069
|
+
* SDK instance tracing context
|
|
1070
|
+
*/
|
|
1071
|
+
interface SdkTracingContext {
|
|
1072
|
+
/** SDK instance ID */
|
|
1073
|
+
sdkInstanceId: string;
|
|
1074
|
+
/** Creation timestamp */
|
|
1075
|
+
createdAt: number;
|
|
1076
|
+
/** Active requests */
|
|
1077
|
+
activeRequests: Map<number, RequestContext>;
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Create SDK instance tracing context
|
|
1081
|
+
*/
|
|
1082
|
+
declare function createSdkTracingContext(): SdkTracingContext;
|
|
1083
|
+
/**
|
|
1084
|
+
* Create and register request context
|
|
1085
|
+
* @param responseID Request ID (reuses BaseMethod.responseID)
|
|
1086
|
+
* @param methodName API method name
|
|
1087
|
+
* @param options Additional options
|
|
1088
|
+
*/
|
|
1089
|
+
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
1090
|
+
sdkInstanceId?: string;
|
|
1091
|
+
connectId?: string;
|
|
1092
|
+
deviceInstanceId?: string;
|
|
1093
|
+
commandsInstanceId?: string;
|
|
1094
|
+
parentResponseID?: number;
|
|
1095
|
+
}): RequestContext;
|
|
1096
|
+
/**
|
|
1097
|
+
* Update request context
|
|
1098
|
+
*/
|
|
1099
|
+
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
1100
|
+
/**
|
|
1101
|
+
* Complete request context
|
|
1102
|
+
*/
|
|
1103
|
+
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
1104
|
+
/**
|
|
1105
|
+
* Get active requests for specific Device instance
|
|
1106
|
+
*/
|
|
1107
|
+
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
1108
|
+
/**
|
|
1109
|
+
* Format request context for logging
|
|
1110
|
+
*/
|
|
1111
|
+
declare function formatRequestContext(context: RequestContext): string;
|
|
1112
|
+
/**
|
|
1113
|
+
* Cleanup specific SDK instance
|
|
1114
|
+
*/
|
|
1115
|
+
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
821
1116
|
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
1117
|
+
declare class Core extends EventEmitter {
|
|
1118
|
+
private tracingContext;
|
|
1119
|
+
readonly sdkInstanceId: string;
|
|
1120
|
+
private requestQueue;
|
|
1121
|
+
private disposePromise?;
|
|
1122
|
+
private prePendingCallPromise;
|
|
1123
|
+
private methodSynchronize;
|
|
1124
|
+
constructor();
|
|
1125
|
+
private getCoreContext;
|
|
1126
|
+
handleMessage(message: CoreMessage): Promise<any>;
|
|
1127
|
+
dispose(): Promise<void>;
|
|
1128
|
+
private disposeResources;
|
|
1129
|
+
}
|
|
1130
|
+
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
1131
|
+
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
1132
|
+
env: ConnectSettings['env'];
|
|
1133
|
+
Transport: any;
|
|
1134
|
+
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
1135
|
+
}) => void;
|
|
830
1136
|
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
1137
|
+
declare const PRO2_WALLPAPER_WIDTH = 604;
|
|
1138
|
+
declare const PRO2_WALLPAPER_HEIGHT = 1024;
|
|
1139
|
+
type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
|
|
1140
|
+
declare function encodePro2Wallpaper(options: {
|
|
1141
|
+
width: number;
|
|
1142
|
+
height: number;
|
|
1143
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
1144
|
+
}): {
|
|
1145
|
+
data: Uint8Array;
|
|
1146
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
840
1147
|
};
|
|
841
|
-
declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
|
|
842
1148
|
|
|
843
|
-
type
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
}[];
|
|
850
|
-
release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo;
|
|
851
|
-
bootloaderMode?: boolean;
|
|
852
|
-
};
|
|
853
|
-
type AllFirmwareRelease = {
|
|
854
|
-
firmware: FirmwareRelease$2;
|
|
855
|
-
ble: FirmwareRelease$2;
|
|
856
|
-
bootloader?: FirmwareRelease$2;
|
|
857
|
-
bridge?: FirmwareRelease$2;
|
|
858
|
-
features?: Features$1;
|
|
1149
|
+
type DeviceUploadWallpaperParams = {
|
|
1150
|
+
width: number;
|
|
1151
|
+
height: number;
|
|
1152
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
1153
|
+
fileName?: string;
|
|
1154
|
+
chunkSize?: number;
|
|
859
1155
|
};
|
|
860
|
-
type
|
|
861
|
-
|
|
862
|
-
|
|
1156
|
+
type DeviceUploadWallpaperResponse = {
|
|
1157
|
+
path: string;
|
|
1158
|
+
size: number;
|
|
1159
|
+
colorFormat: Pro2WallpaperColorFormat;
|
|
1160
|
+
message?: string;
|
|
863
1161
|
};
|
|
864
|
-
declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
|
|
865
1162
|
|
|
866
|
-
type
|
|
867
|
-
|
|
868
|
-
|
|
1163
|
+
type Pro2NftImage = {
|
|
1164
|
+
width: number;
|
|
1165
|
+
height: number;
|
|
1166
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
869
1167
|
};
|
|
870
|
-
declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
|
|
871
1168
|
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
passphraseProtection: boolean | null;
|
|
891
|
-
attachToPinEnabled?: boolean | null;
|
|
892
|
-
unlockedAttachPin?: boolean | null;
|
|
893
|
-
backupRequired: boolean | null;
|
|
894
|
-
noBackup: boolean | null;
|
|
895
|
-
language: string | null;
|
|
896
|
-
bleEnabled: boolean | null;
|
|
897
|
-
};
|
|
898
|
-
type DeviceProfileVersions = {
|
|
899
|
-
firmware: string | null;
|
|
900
|
-
bootloader: string | null;
|
|
901
|
-
board: string | null;
|
|
902
|
-
ble: string | null;
|
|
903
|
-
se01?: string | null;
|
|
904
|
-
se02?: string | null;
|
|
905
|
-
se03?: string | null;
|
|
906
|
-
se04?: string | null;
|
|
907
|
-
se01Boot?: string | null;
|
|
908
|
-
se02Boot?: string | null;
|
|
909
|
-
se03Boot?: string | null;
|
|
910
|
-
se04Boot?: string | null;
|
|
1169
|
+
type DeviceUploadNftParams = {
|
|
1170
|
+
image: Pro2NftImage;
|
|
1171
|
+
thumbnail: Pro2NftImage;
|
|
1172
|
+
title: string;
|
|
1173
|
+
subtitle: string;
|
|
1174
|
+
timestampMs?: number;
|
|
1175
|
+
chunkSize?: number;
|
|
1176
|
+
paceMs?: number;
|
|
1177
|
+
timeoutMs?: number;
|
|
1178
|
+
};
|
|
1179
|
+
type DeviceUploadNftResponse = {
|
|
1180
|
+
basename: string;
|
|
1181
|
+
imagePath: string;
|
|
1182
|
+
thumbnailPath: string;
|
|
1183
|
+
metadataPath: string;
|
|
1184
|
+
totalSize: number;
|
|
1185
|
+
nftUpdated: true;
|
|
1186
|
+
message?: string;
|
|
911
1187
|
};
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
se01BuildId?: string;
|
|
922
|
-
se01Hash?: string;
|
|
923
|
-
se02BuildId?: string;
|
|
924
|
-
se02Hash?: string;
|
|
925
|
-
se03BuildId?: string;
|
|
926
|
-
se03Hash?: string;
|
|
927
|
-
se04BuildId?: string;
|
|
928
|
-
se04Hash?: string;
|
|
929
|
-
se01BootBuildId?: string;
|
|
930
|
-
se01BootHash?: string;
|
|
931
|
-
se02BootBuildId?: string;
|
|
932
|
-
se02BootHash?: string;
|
|
933
|
-
se03BootBuildId?: string;
|
|
934
|
-
se03BootHash?: string;
|
|
935
|
-
se04BootBuildId?: string;
|
|
936
|
-
se04BootHash?: string;
|
|
1188
|
+
|
|
1189
|
+
type FileInfo = {
|
|
1190
|
+
path: string;
|
|
1191
|
+
offset: number;
|
|
1192
|
+
total_size: number;
|
|
1193
|
+
data?: Uint8Array;
|
|
1194
|
+
data_hash?: number;
|
|
1195
|
+
processed_byte?: number;
|
|
1196
|
+
chunks?: number;
|
|
937
1197
|
};
|
|
938
|
-
type
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
1198
|
+
type TestProtocolV2PingParams = CommonParams & {
|
|
1199
|
+
/** Firmware diagnostic echo payload, limited to 63 UTF-8 bytes. */
|
|
1200
|
+
message?: string;
|
|
942
1201
|
};
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1202
|
+
declare function testProtocolV2Ping(connectId: string, params?: TestProtocolV2PingParams): Response<Success$1>;
|
|
1203
|
+
declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
1204
|
+
declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<OnboardingStatus>;
|
|
1205
|
+
declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
|
|
1206
|
+
declare function deviceUploadNft(connectId: string, params: CommonParams & DeviceUploadNftParams): Response<DeviceUploadNftResponse>;
|
|
1207
|
+
declare function uploadPortfolio(connectId: string, params: {
|
|
1208
|
+
packageBytes: ArrayBuffer | Uint8Array | Blob;
|
|
1209
|
+
timeoutMs?: number | string;
|
|
1210
|
+
}): Response<FileInfo & {
|
|
1211
|
+
portfolioUpdated: true;
|
|
1212
|
+
}>;
|
|
1213
|
+
|
|
1214
|
+
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
1215
|
+
declare const off: (type: any, fn: any) => void;
|
|
1216
|
+
declare const removeAllListeners: (type: any) => void;
|
|
1217
|
+
|
|
1218
|
+
declare function uiResponse(response: UiResponseEvent): void;
|
|
1219
|
+
|
|
1220
|
+
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
1221
|
+
interface LowLevelInjectApi {
|
|
1222
|
+
call: CallMethod;
|
|
1223
|
+
eventEmitter: EventEmitter$1;
|
|
1224
|
+
init: CoreApi['init'];
|
|
1225
|
+
dispose: CoreApi['dispose'];
|
|
1226
|
+
uiResponse: CoreApi['uiResponse'];
|
|
1227
|
+
cancel: CoreApi['cancel'];
|
|
1228
|
+
updateSettings: CoreApi['updateSettings'];
|
|
1229
|
+
switchTransport: CoreApi['switchTransport'];
|
|
1230
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
1231
|
+
}
|
|
1232
|
+
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
1233
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
956
1234
|
};
|
|
957
|
-
declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
|
|
958
1235
|
|
|
959
|
-
declare function
|
|
1236
|
+
declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
|
|
1237
|
+
declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
|
|
1238
|
+
|
|
1239
|
+
declare function testInitializeDeviceDuration(connectId?: string, params?: CommonParams): Response<number>;
|
|
1240
|
+
|
|
1241
|
+
declare function preInitialize(connectId: string, params?: CommonParams): Response<boolean>;
|
|
1242
|
+
|
|
1243
|
+
declare function getLogs(): Response<string[]>;
|
|
960
1244
|
|
|
961
|
-
type
|
|
1245
|
+
type ClearSessionCacheParams = {
|
|
1246
|
+
deviceId?: never;
|
|
1247
|
+
passphraseState?: never;
|
|
1248
|
+
} | {
|
|
1249
|
+
deviceId: string;
|
|
962
1250
|
passphraseState?: string;
|
|
963
|
-
sessionId?: string;
|
|
964
|
-
unlockedAttachPin?: boolean;
|
|
965
|
-
passphraseProtection?: boolean | null;
|
|
966
1251
|
};
|
|
967
|
-
type
|
|
968
|
-
|
|
1252
|
+
type ClearSessionCachePayload = {
|
|
1253
|
+
cleared: true;
|
|
969
1254
|
};
|
|
970
|
-
declare function
|
|
1255
|
+
declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
|
|
971
1256
|
|
|
972
|
-
|
|
973
|
-
status: IDeviceFirmwareStatus;
|
|
974
|
-
changelog: {
|
|
975
|
-
'en-US': string;
|
|
976
|
-
'zh-CN': string;
|
|
977
|
-
}[];
|
|
978
|
-
release: IFirmwareReleaseInfo;
|
|
979
|
-
bootloaderMode: boolean;
|
|
980
|
-
};
|
|
981
|
-
type CheckFirmwareReleaseParams = {
|
|
982
|
-
firmwareType?: EFirmwareType;
|
|
983
|
-
};
|
|
984
|
-
declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareRelease$1>;
|
|
1257
|
+
declare function checkBridgeStatus(): Response<boolean>;
|
|
985
1258
|
|
|
986
|
-
type
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
1259
|
+
type CheckBridgeReleaseResponse = {
|
|
1260
|
+
shouldUpdate: boolean;
|
|
1261
|
+
status: 'outdated' | 'valid';
|
|
1262
|
+
releaseVersion: string;
|
|
1263
|
+
} | null;
|
|
1264
|
+
declare function checkBridgeRelease(connectId?: string, params?: CommonParams & {
|
|
1265
|
+
willUpdateFirmwareVersion?: string;
|
|
1266
|
+
}): Response<CheckBridgeReleaseResponse>;
|
|
1267
|
+
|
|
1268
|
+
type FirmwareUpdatePlanArtifactRole = 'firmware' | 'ble' | 'bootloader' | 'resource' | 'component' | 'resourceBundle';
|
|
1269
|
+
type FirmwareUpdatePlanTarget = 'firmware' | 'ble' | 'bootloader' | FirmwareUpdateV4Target;
|
|
1270
|
+
type FirmwareUpdatePlanForceTarget = 'firmware' | 'ble' | 'bootloader' | 'resource';
|
|
1271
|
+
interface FirmwareUpdatePlanArtifact {
|
|
1272
|
+
artifactId: string;
|
|
1273
|
+
role: FirmwareUpdatePlanArtifactRole;
|
|
1274
|
+
target: FirmwareUpdatePlanTarget;
|
|
1275
|
+
url: string;
|
|
1276
|
+
container: 'raw' | 'zip';
|
|
1277
|
+
logicalName?: string;
|
|
1278
|
+
expectedSize?: number;
|
|
1279
|
+
expectedSha256?: string;
|
|
1280
|
+
targetVersion?: string;
|
|
1281
|
+
}
|
|
1282
|
+
interface FirmwareUpdatePlan {
|
|
1283
|
+
schemaVersion: 2;
|
|
1284
|
+
planDigest: string;
|
|
1285
|
+
executor: 'v2' | 'v3' | 'v4';
|
|
1286
|
+
deviceIdentity: string;
|
|
1287
|
+
deviceModel: string;
|
|
1288
|
+
firmwareType: EFirmwareType;
|
|
1289
|
+
platform: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
1290
|
+
artifacts: FirmwareUpdatePlanArtifact[];
|
|
1291
|
+
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
interface FirmwareUpdatePreparedEntry {
|
|
1295
|
+
entryName: string;
|
|
1296
|
+
artifact: FirmwareArtifactReference;
|
|
1297
|
+
}
|
|
1298
|
+
interface FirmwareUpdatePreparedArtifactInput {
|
|
1299
|
+
artifactId: string;
|
|
1300
|
+
artifact: FirmwareArtifactReference;
|
|
1301
|
+
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
1302
|
+
}
|
|
1303
|
+
interface FirmwareUpdatePreparedArtifact {
|
|
1304
|
+
artifactId: string;
|
|
1305
|
+
role: FirmwareUpdatePlanArtifactRole;
|
|
1306
|
+
target: FirmwareUpdatePlanTarget;
|
|
1307
|
+
container: 'raw' | 'zip';
|
|
1308
|
+
logicalName?: string;
|
|
1309
|
+
targetVersion?: string;
|
|
1310
|
+
artifact: FirmwareArtifactReference;
|
|
1311
|
+
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
1312
|
+
}
|
|
1313
|
+
interface FirmwareUpdatePreparedPlan {
|
|
1314
|
+
schemaVersion: 2;
|
|
1315
|
+
preparedPlanDigest: string;
|
|
1316
|
+
planDigest: string;
|
|
1317
|
+
networkPolicy: 'forbid';
|
|
1318
|
+
executor: FirmwareUpdatePlan['executor'];
|
|
1319
|
+
deviceIdentity: string;
|
|
1320
|
+
deviceModel: string;
|
|
1321
|
+
firmwareType: FirmwareUpdatePlan['firmwareType'];
|
|
1322
|
+
platform: FirmwareUpdatePlan['platform'];
|
|
1323
|
+
leaseRef: string;
|
|
1324
|
+
artifacts: FirmwareUpdatePreparedArtifact[];
|
|
1325
|
+
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
1326
|
+
}
|
|
1327
|
+
declare function prepareFirmwareUpdatePlan(input: {
|
|
1328
|
+
plan: FirmwareUpdatePlan;
|
|
1329
|
+
leaseRef: string;
|
|
1330
|
+
artifacts: FirmwareUpdatePreparedArtifactInput[];
|
|
1331
|
+
}): FirmwareUpdatePreparedPlan;
|
|
1332
|
+
declare function validateFirmwareUpdatePreparedPlan(value: unknown): FirmwareUpdatePreparedPlan;
|
|
996
1333
|
|
|
997
1334
|
type IUpdateType = 'firmware' | 'ble';
|
|
1335
|
+
interface FirmwareArtifactReference {
|
|
1336
|
+
artifactRef: string;
|
|
1337
|
+
size: number;
|
|
1338
|
+
sha256: string;
|
|
1339
|
+
}
|
|
1340
|
+
interface FirmwareArtifactReader {
|
|
1341
|
+
open(input: {
|
|
1342
|
+
artifactRef: string;
|
|
1343
|
+
}): Promise<{
|
|
1344
|
+
readerId: string;
|
|
1345
|
+
size: number;
|
|
1346
|
+
}>;
|
|
1347
|
+
read(input: {
|
|
1348
|
+
readerId: string;
|
|
1349
|
+
offset: number;
|
|
1350
|
+
length: number;
|
|
1351
|
+
}): Promise<{
|
|
1352
|
+
data: ArrayBuffer;
|
|
1353
|
+
bytesRead: number;
|
|
1354
|
+
eof: boolean;
|
|
1355
|
+
}>;
|
|
1356
|
+
close(input: {
|
|
1357
|
+
readerId: string;
|
|
1358
|
+
}): Promise<void>;
|
|
1359
|
+
}
|
|
1360
|
+
interface FirmwareUpdateHostBinding {
|
|
1361
|
+
artifactReader: FirmwareArtifactReader;
|
|
1362
|
+
}
|
|
998
1363
|
interface FirmwareUpdateBinaryParams {
|
|
999
1364
|
binary: ArrayBuffer;
|
|
1000
1365
|
updateType: IUpdateType;
|
|
1001
1366
|
}
|
|
1367
|
+
interface FirmwareUpdateArtifactParams {
|
|
1368
|
+
preparedPlan: FirmwareUpdatePreparedPlan;
|
|
1369
|
+
hostBindingGeneration: number;
|
|
1370
|
+
artifact: FirmwareArtifactReference;
|
|
1371
|
+
resourceEntries?: Array<{
|
|
1372
|
+
entryName: string;
|
|
1373
|
+
artifact: FirmwareArtifactReference;
|
|
1374
|
+
}>;
|
|
1375
|
+
updateType: IUpdateType;
|
|
1376
|
+
forcedUpdateRes?: boolean;
|
|
1377
|
+
isUpdateBootloader?: boolean;
|
|
1378
|
+
firmwareType?: EFirmwareType;
|
|
1379
|
+
}
|
|
1002
1380
|
interface FirmwareUpdateParams {
|
|
1003
1381
|
version?: number[];
|
|
1004
1382
|
updateType: IUpdateType;
|
|
@@ -1018,7 +1396,10 @@ type Platform = {
|
|
|
1018
1396
|
};
|
|
1019
1397
|
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateParams & Platform>): Response<Messages.Success>;
|
|
1020
1398
|
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams & Platform>): Response<Messages.Success>;
|
|
1399
|
+
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateArtifactParams & Platform>): Response<Messages.Success>;
|
|
1021
1400
|
interface FirmwareUpdateV3Params {
|
|
1401
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1402
|
+
hostBindingGeneration?: number;
|
|
1022
1403
|
bleVersion?: number[];
|
|
1023
1404
|
bleBinary?: ArrayBuffer;
|
|
1024
1405
|
chunkSize?: number;
|
|
@@ -1030,23 +1411,68 @@ interface FirmwareUpdateV3Params {
|
|
|
1030
1411
|
forcedUpdateRes?: boolean;
|
|
1031
1412
|
firmwareType?: EFirmwareType;
|
|
1032
1413
|
platform: IPlatform;
|
|
1414
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1415
|
+
artifacts?: {
|
|
1416
|
+
ble?: FirmwareArtifactReference;
|
|
1417
|
+
firmware?: FirmwareArtifactReference;
|
|
1418
|
+
bootloader?: FirmwareArtifactReference;
|
|
1419
|
+
resourceEntries?: Array<{
|
|
1420
|
+
entryName: string;
|
|
1421
|
+
artifact: FirmwareArtifactReference;
|
|
1422
|
+
}>;
|
|
1423
|
+
};
|
|
1033
1424
|
}
|
|
1425
|
+
/**
|
|
1426
|
+
* firmwareUpdateV4 target binaries grouped by DeviceFirmwareTargetType.
|
|
1427
|
+
* Except for romloader, each field maps to a target accepted by bootloader.
|
|
1428
|
+
*/
|
|
1429
|
+
type FirmwareUpdateV4Target = 'boot' | 'app_v1' | 'app_v2' | 'coprocessor' | 'resource' | 'se01' | 'se02' | 'se03' | 'se04';
|
|
1034
1430
|
interface FirmwareUpdateV4Params {
|
|
1431
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1432
|
+
hostBindingGeneration?: number;
|
|
1035
1433
|
platform: IPlatform;
|
|
1434
|
+
expectedDeviceId?: string;
|
|
1036
1435
|
chunkSize?: number;
|
|
1037
1436
|
firmwareType?: EFirmwareType;
|
|
1437
|
+
targetsToUpdate?: FirmwareUpdateV4Target[];
|
|
1438
|
+
expectedTargetVersions?: Partial<Record<FirmwareUpdateV4Target, string>>;
|
|
1439
|
+
/** FW_MGMT_TARGET_ROMLOADER = 2; Pro2 cannot install it through firmwareUpdateV4. */
|
|
1038
1440
|
romloaderBinary?: ArrayBuffer;
|
|
1441
|
+
/** FW_MGMT_TARGET_BOOTLOADER = 3 */
|
|
1039
1442
|
bootloaderBinary?: ArrayBuffer;
|
|
1443
|
+
/** FW_MGMT_TARGET_APPLICATION_P1 = 4 */
|
|
1040
1444
|
applicationP1Binary?: ArrayBuffer;
|
|
1445
|
+
/** FW_MGMT_TARGET_APPLICATION_P2 = 5 */
|
|
1041
1446
|
applicationP2Binary?: ArrayBuffer;
|
|
1447
|
+
/** FW_MGMT_TARGET_COPROCESSOR = 6 */
|
|
1042
1448
|
coprocessorBinary?: ArrayBuffer;
|
|
1449
|
+
/** FW_MGMT_TARGET_SE01-04 = 7-10 */
|
|
1043
1450
|
se01Binary?: ArrayBuffer;
|
|
1044
1451
|
se02Binary?: ArrayBuffer;
|
|
1045
1452
|
se03Binary?: ArrayBuffer;
|
|
1046
1453
|
se04Binary?: ArrayBuffer;
|
|
1047
|
-
resourceBinaries?: ArrayBuffer[];
|
|
1048
1454
|
forcedUpdateRes?: boolean;
|
|
1455
|
+
/**
|
|
1456
|
+
* Arbitrary Protocol V2 resource files written directly with FilesystemFileWrite.
|
|
1457
|
+
* Use this for every file selected from the manifest-driven resource archive.
|
|
1458
|
+
* When provided, these files are authoritative for the resource target.
|
|
1459
|
+
*/
|
|
1460
|
+
resourceFiles?: Array<{
|
|
1461
|
+
binary: ArrayBuffer;
|
|
1462
|
+
devicePath: string;
|
|
1463
|
+
size?: number;
|
|
1464
|
+
fileHash?: string;
|
|
1465
|
+
}>;
|
|
1466
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1467
|
+
componentArtifacts?: Partial<Record<Exclude<FirmwareUpdateV4Target, 'resource'>, FirmwareArtifactReference>>;
|
|
1468
|
+
resourceBundleArtifacts?: Array<{
|
|
1469
|
+
name: string;
|
|
1470
|
+
artifact: FirmwareArtifactReference;
|
|
1471
|
+
}>;
|
|
1049
1472
|
}
|
|
1473
|
+
declare function registerFirmwareUpdateHostBinding$1(binding: FirmwareUpdateHostBinding): number;
|
|
1474
|
+
declare function unregisterFirmwareUpdateHostBinding$1(generation?: number): boolean;
|
|
1475
|
+
declare function getFirmwareUpdateHostBindingGeneration$1(): number;
|
|
1050
1476
|
declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
|
|
1051
1477
|
bleVersion: string;
|
|
1052
1478
|
firmwareVersion: string;
|
|
@@ -1058,6 +1484,173 @@ declare function firmwareUpdateV4(connectId: string | undefined, params: Params<
|
|
|
1058
1484
|
bootloaderVersion: string;
|
|
1059
1485
|
}>;
|
|
1060
1486
|
|
|
1487
|
+
type ProtocolV2ComponentReleaseInfo = IProtocolV2FirmwareComponent & {
|
|
1488
|
+
protocol: 'V2';
|
|
1489
|
+
configKey: string;
|
|
1490
|
+
componentTarget: IProtocolV2FirmwareComponentTarget;
|
|
1491
|
+
required: boolean;
|
|
1492
|
+
changelog: IFirmwareReleaseInfo['changelog'];
|
|
1493
|
+
};
|
|
1494
|
+
type FirmwareReleaseCheckResult = {
|
|
1495
|
+
shouldUpdate?: boolean;
|
|
1496
|
+
status: IDeviceFirmwareStatus;
|
|
1497
|
+
changelog?: {
|
|
1498
|
+
'zh-CN': string;
|
|
1499
|
+
'en-US': string;
|
|
1500
|
+
}[];
|
|
1501
|
+
release: IBLEFirmwareReleaseInfo | IFirmwareReleaseInfo | ProtocolV2ComponentReleaseInfo | undefined;
|
|
1502
|
+
bootloaderMode?: boolean;
|
|
1503
|
+
};
|
|
1504
|
+
type BridgeReleaseCheckResult = Omit<FirmwareReleaseCheckResult, 'release'> & {
|
|
1505
|
+
release: string | undefined;
|
|
1506
|
+
};
|
|
1507
|
+
type ProtocolV2FirmwareComponentReleaseStatus = 'valid' | 'outdated' | 'unknown' | 'unsupported';
|
|
1508
|
+
type ProtocolV2FirmwareReleaseStatus = 'unavailable' | 'valid' | 'unknown' | 'outdated' | 'required';
|
|
1509
|
+
type ProtocolV2FirmwareComponentRelease = {
|
|
1510
|
+
configKey: string;
|
|
1511
|
+
componentTarget: IProtocolV2FirmwareComponentTarget;
|
|
1512
|
+
updateTarget: FirmwareUpdateV4Target | null;
|
|
1513
|
+
currentVersion: string | null;
|
|
1514
|
+
targetVersion: string | null;
|
|
1515
|
+
status: ProtocolV2FirmwareComponentReleaseStatus;
|
|
1516
|
+
required: boolean;
|
|
1517
|
+
};
|
|
1518
|
+
type AllFirmwareRelease = {
|
|
1519
|
+
firmware: FirmwareReleaseCheckResult;
|
|
1520
|
+
ble: FirmwareReleaseCheckResult;
|
|
1521
|
+
bootloader?: FirmwareReleaseCheckResult;
|
|
1522
|
+
bridge?: BridgeReleaseCheckResult;
|
|
1523
|
+
features?: Features;
|
|
1524
|
+
protocol?: 'V1' | 'V2';
|
|
1525
|
+
deviceType?: 'pro2' | 'neo';
|
|
1526
|
+
firmwareType?: EFirmwareType;
|
|
1527
|
+
status?: ProtocolV2FirmwareReleaseStatus;
|
|
1528
|
+
hasUpgrade?: boolean;
|
|
1529
|
+
required?: boolean;
|
|
1530
|
+
resourceStatus?: 'valid' | 'outdated' | 'unknown';
|
|
1531
|
+
resourceArchive?: IProtocolV2ResourceSource;
|
|
1532
|
+
resourcePreparationRequired?: boolean;
|
|
1533
|
+
currentVersions?: DeviceStateVersions;
|
|
1534
|
+
components?: ProtocolV2FirmwareComponentRelease[];
|
|
1535
|
+
targetsToUpdate?: FirmwareUpdateV4Target[];
|
|
1536
|
+
release?: IFirmwareReleaseInfo;
|
|
1537
|
+
firmwareUpdatePlan?: FirmwareUpdatePlan;
|
|
1538
|
+
};
|
|
1539
|
+
type CheckAllFirmwareReleaseParams = {
|
|
1540
|
+
checkBridgeRelease?: boolean;
|
|
1541
|
+
checkFirmwareHash?: boolean;
|
|
1542
|
+
firmwareType?: EFirmwareType;
|
|
1543
|
+
platform?: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
1544
|
+
forceUpdateTargets?: FirmwareUpdatePlanForceTarget[];
|
|
1545
|
+
};
|
|
1546
|
+
declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
|
|
1547
|
+
|
|
1548
|
+
type CheckBootloaderReleaseResponse = FirmwareReleaseCheckResult;
|
|
1549
|
+
type CheckBootloaderReleaseParams = {
|
|
1550
|
+
willUpdateFirmwareVersion?: string;
|
|
1551
|
+
firmwareType?: EFirmwareType;
|
|
1552
|
+
};
|
|
1553
|
+
declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & CheckBootloaderReleaseParams): Response<CheckBootloaderReleaseResponse>;
|
|
1554
|
+
|
|
1555
|
+
type CheckFirmwareTypeAvailableParams = {
|
|
1556
|
+
deviceType: EDeviceType;
|
|
1557
|
+
firmwareType: EFirmwareType;
|
|
1558
|
+
};
|
|
1559
|
+
declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareReleaseCheckResult | undefined>;
|
|
1560
|
+
|
|
1561
|
+
declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
|
|
1562
|
+
|
|
1563
|
+
declare function detectDeviceConnectProtocol(connectId: string): Response<HardwareConnectProtocol>;
|
|
1564
|
+
|
|
1565
|
+
/**
|
|
1566
|
+
* @deprecated Use `getDeviceState` for both Protocol V1 and Protocol V2 devices.
|
|
1567
|
+
*/
|
|
1568
|
+
declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* @deprecated Use `getDeviceState(connectId, { scope: 'firmware' })`.
|
|
1572
|
+
*/
|
|
1573
|
+
declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
|
|
1574
|
+
|
|
1575
|
+
type GetPassphraseStateParams = CommonParams;
|
|
1576
|
+
/**
|
|
1577
|
+
* Compatibility wallet-state API for existing App integrations.
|
|
1578
|
+
*
|
|
1579
|
+
* Protocol V1 keeps its parameterless firmware flow. Protocol V2 maps the existing
|
|
1580
|
+
* `useEmptyPassphrase` and `initSession` intent to the device-only wallet-session flow.
|
|
1581
|
+
* New integrations should prefer `openWalletSession` for explicit wallet intent.
|
|
1582
|
+
*/
|
|
1583
|
+
declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<string | undefined>;
|
|
1584
|
+
|
|
1585
|
+
declare const OpenWalletSessionMode: {
|
|
1586
|
+
readonly Standard: "standard";
|
|
1587
|
+
readonly SelectHidden: "select-hidden";
|
|
1588
|
+
readonly ResumeHidden: "resume-hidden";
|
|
1589
|
+
};
|
|
1590
|
+
type OpenWalletSessionModeValue = (typeof OpenWalletSessionMode)[keyof typeof OpenWalletSessionMode];
|
|
1591
|
+
type OpenWalletSessionParams = {
|
|
1592
|
+
mode: typeof OpenWalletSessionMode.Standard;
|
|
1593
|
+
deviceId?: never;
|
|
1594
|
+
passphraseState?: never;
|
|
1595
|
+
} | {
|
|
1596
|
+
mode: typeof OpenWalletSessionMode.SelectHidden;
|
|
1597
|
+
deviceId?: never;
|
|
1598
|
+
passphraseState?: never;
|
|
1599
|
+
} | {
|
|
1600
|
+
mode: typeof OpenWalletSessionMode.ResumeHidden;
|
|
1601
|
+
deviceId: string;
|
|
1602
|
+
passphraseState: string;
|
|
1603
|
+
};
|
|
1604
|
+
type OpenWalletSessionPayloadBase = {
|
|
1605
|
+
protocol: 'V1' | 'V2';
|
|
1606
|
+
deviceId: string;
|
|
1607
|
+
resumed: boolean;
|
|
1608
|
+
};
|
|
1609
|
+
type OpenWalletSessionPayload = OpenWalletSessionPayloadBase & ({
|
|
1610
|
+
walletType: 'standard';
|
|
1611
|
+
passphraseState: null;
|
|
1612
|
+
} | {
|
|
1613
|
+
walletType: 'hidden';
|
|
1614
|
+
passphraseState: string;
|
|
1615
|
+
});
|
|
1616
|
+
/**
|
|
1617
|
+
* Opens the standard, hidden, or Attach-to-PIN wallet flow through a unified
|
|
1618
|
+
* Protocol V1/V2 API.
|
|
1619
|
+
*/
|
|
1620
|
+
declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
|
|
1621
|
+
|
|
1622
|
+
type CheckFirmwareReleaseParams = {
|
|
1623
|
+
firmwareType?: EFirmwareType;
|
|
1624
|
+
};
|
|
1625
|
+
declare function checkFirmwareRelease(connectId?: string, params?: CheckFirmwareReleaseParams): Response<FirmwareReleaseCheckResult>;
|
|
1626
|
+
|
|
1627
|
+
declare function checkBLEFirmwareRelease(connectId?: string): Response<FirmwareReleaseCheckResult>;
|
|
1628
|
+
|
|
1629
|
+
interface FirmwareUpdateCapabilities {
|
|
1630
|
+
planSchemaVersion: 2;
|
|
1631
|
+
preparedPlanSchemaVersion: 2;
|
|
1632
|
+
hostBindingProtocolVersion: 2;
|
|
1633
|
+
manifestModes: Array<'external-only' | 'sdk-managed'>;
|
|
1634
|
+
supportsArtifactReader: true;
|
|
1635
|
+
}
|
|
1636
|
+
declare function getFirmwareUpdateCapabilities(): FirmwareUpdateCapabilities;
|
|
1637
|
+
|
|
1638
|
+
type ProtocolV2ResourceManifestBinary = {
|
|
1639
|
+
archivePath: string;
|
|
1640
|
+
binary: ArrayBuffer;
|
|
1641
|
+
};
|
|
1642
|
+
type ProtocolV2PreparedResourceFile = {
|
|
1643
|
+
binary: ArrayBuffer;
|
|
1644
|
+
devicePath: string;
|
|
1645
|
+
size: number;
|
|
1646
|
+
fileHash: string;
|
|
1647
|
+
};
|
|
1648
|
+
declare function prepareProtocolV2ResourceFiles$1(input: {
|
|
1649
|
+
manifest: unknown;
|
|
1650
|
+
files: ProtocolV2ResourceManifestBinary[];
|
|
1651
|
+
targetsToUpdate: readonly FirmwareUpdateV4Target[];
|
|
1652
|
+
}): ProtocolV2PreparedResourceFile[];
|
|
1653
|
+
|
|
1061
1654
|
declare function promptWebDeviceAccess(options?: {
|
|
1062
1655
|
deviceSerialNumberFromUI?: string;
|
|
1063
1656
|
}): Response<{
|
|
@@ -1117,16 +1710,40 @@ type DeviceSettingsParams = {
|
|
|
1117
1710
|
language?: string;
|
|
1118
1711
|
label?: string;
|
|
1119
1712
|
usePassphrase?: boolean;
|
|
1713
|
+
/** Protocol V1 only. */
|
|
1120
1714
|
homescreen?: string;
|
|
1715
|
+
/** Protocol V1 only. */
|
|
1121
1716
|
passphraseSource?: number;
|
|
1122
1717
|
autoLockDelayMs?: number;
|
|
1718
|
+
/** Protocol V1 only. */
|
|
1123
1719
|
displayRotation?: number;
|
|
1720
|
+
/** Protocol V1 only. */
|
|
1124
1721
|
passphraseAlwaysOnDevice?: boolean;
|
|
1125
|
-
|
|
1722
|
+
/** Protocol V1 only. Uses Enum_SafetyCheckLevel numeric values. */
|
|
1723
|
+
safetyChecks?: Enum_SafetyCheckLevel;
|
|
1724
|
+
/** Protocol V1 only; the current Protocol V2 schema has no matching field. */
|
|
1126
1725
|
experimentalFeatures?: boolean;
|
|
1127
1726
|
autoShutdownDelayMs?: number;
|
|
1727
|
+
/** Protocol V1 only; opens the legacy device-side brightness flow. */
|
|
1128
1728
|
changeBrightness?: boolean;
|
|
1729
|
+
/** Protocol V2 only. */
|
|
1730
|
+
brightness?: number;
|
|
1129
1731
|
hapticFeedback?: boolean;
|
|
1732
|
+
bluetoothEnabled?: boolean;
|
|
1733
|
+
/** Protocol V2 only; changed through an on-device confirmation page. */
|
|
1734
|
+
airgapMode?: boolean;
|
|
1735
|
+
/** Protocol V2 only. */
|
|
1736
|
+
animationEnabled?: boolean;
|
|
1737
|
+
/** Protocol V2 only. */
|
|
1738
|
+
tapToWake?: boolean;
|
|
1739
|
+
/** Protocol V2 only. */
|
|
1740
|
+
deviceNameDisplayEnabled?: boolean;
|
|
1741
|
+
/** Protocol V2 only. */
|
|
1742
|
+
fidoEnabled?: boolean;
|
|
1743
|
+
/** Protocol V2 only. */
|
|
1744
|
+
usbLockEnabled?: boolean;
|
|
1745
|
+
/** Protocol V2 only. */
|
|
1746
|
+
randomKeypad?: boolean;
|
|
1130
1747
|
};
|
|
1131
1748
|
declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
|
|
1132
1749
|
|
|
@@ -1152,7 +1769,7 @@ type DeviceUploadResourceResponse = Success$1 & {
|
|
|
1152
1769
|
declare function deviceUploadResource(connectId: string, params: CommonParams & DeviceUploadResourceParams): Response<DeviceUploadResourceResponse>;
|
|
1153
1770
|
|
|
1154
1771
|
type DeviceSupportFeatures = SupportFeatures & {
|
|
1155
|
-
device: Device | null;
|
|
1772
|
+
device: Device$1 | null;
|
|
1156
1773
|
};
|
|
1157
1774
|
declare function deviceSupportFeatures(connectId?: string): Response<DeviceSupportFeatures>;
|
|
1158
1775
|
|
|
@@ -1161,14 +1778,24 @@ declare function deviceFullyUploadResource(connectId: string, params: CommonPara
|
|
|
1161
1778
|
}): Response<Success$1>;
|
|
1162
1779
|
|
|
1163
1780
|
type DeviceUpdateBootloaderParams = {
|
|
1781
|
+
preparedPlan?: FirmwareUpdatePreparedPlan;
|
|
1782
|
+
hostBindingGeneration?: number;
|
|
1164
1783
|
binary?: ArrayBuffer;
|
|
1784
|
+
artifact?: FirmwareArtifactReference;
|
|
1785
|
+
artifactReader?: FirmwareArtifactReader;
|
|
1165
1786
|
firmwareType?: EFirmwareType;
|
|
1166
1787
|
};
|
|
1167
1788
|
declare function deviceUpdateBootloader(connectId: string, params?: DeviceUpdateBootloaderParams): Response<Success$1>;
|
|
1168
1789
|
|
|
1169
1790
|
declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1170
1791
|
|
|
1171
|
-
|
|
1792
|
+
type DeviceUnlockParams = {
|
|
1793
|
+
/**
|
|
1794
|
+
* 限定本次解锁允许使用的 PIN 类型。省略时保持兼容行为,仅允许主 PIN。
|
|
1795
|
+
*/
|
|
1796
|
+
pinType?: DeviceSessionPinType;
|
|
1797
|
+
};
|
|
1798
|
+
declare function deviceUnlock(connectId: string, params?: CommonParams & DeviceUnlockParams): Response<Features>;
|
|
1172
1799
|
|
|
1173
1800
|
declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
|
|
1174
1801
|
|
|
@@ -1372,6 +1999,9 @@ type AllNetworkAddressParams = {
|
|
|
1372
1999
|
type AllNetworkAddressPayload = {
|
|
1373
2000
|
address: string;
|
|
1374
2001
|
pub?: string;
|
|
2002
|
+
/**
|
|
2003
|
+
* @deprecated Use `pub` instead.
|
|
2004
|
+
*/
|
|
1375
2005
|
publicKey?: string;
|
|
1376
2006
|
npub?: string;
|
|
1377
2007
|
} | {
|
|
@@ -1437,6 +2067,9 @@ declare function evmGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
1437
2067
|
type EVMPublicKey = {
|
|
1438
2068
|
path: string;
|
|
1439
2069
|
pub: string;
|
|
2070
|
+
/**
|
|
2071
|
+
* @deprecated Use `pub` instead.
|
|
2072
|
+
*/
|
|
1440
2073
|
publicKey?: string;
|
|
1441
2074
|
} & EthereumPublicKey;
|
|
1442
2075
|
type EVMGetPublicKeyParams = {
|
|
@@ -2220,6 +2853,9 @@ declare function nearSignTransaction(connectId: string, deviceId: string, params
|
|
|
2220
2853
|
type AptosAddress = {
|
|
2221
2854
|
path: string;
|
|
2222
2855
|
pub?: string;
|
|
2856
|
+
/**
|
|
2857
|
+
* @deprecated Use `pub` instead.
|
|
2858
|
+
*/
|
|
2223
2859
|
publicKey?: string;
|
|
2224
2860
|
} & AptosAddress$1;
|
|
2225
2861
|
type AptosGetAddressParams = {
|
|
@@ -2234,6 +2870,9 @@ declare function aptosGetAddress(connectId: string, deviceId: string, params: Co
|
|
|
2234
2870
|
type AptosPublicKey = {
|
|
2235
2871
|
path: string;
|
|
2236
2872
|
pub: string;
|
|
2873
|
+
/**
|
|
2874
|
+
* @deprecated Use `pub` instead.
|
|
2875
|
+
*/
|
|
2237
2876
|
publicKey?: string;
|
|
2238
2877
|
};
|
|
2239
2878
|
type AptosGetPublicKeyParams = {
|
|
@@ -2318,6 +2957,9 @@ declare function cosmosGetAddress(connectId: string, deviceId: string, params: C
|
|
|
2318
2957
|
type CosmosPublicKey = {
|
|
2319
2958
|
path: string;
|
|
2320
2959
|
pub: string;
|
|
2960
|
+
/**
|
|
2961
|
+
* @deprecated Use `pub` instead.
|
|
2962
|
+
*/
|
|
2321
2963
|
publicKey?: string;
|
|
2322
2964
|
};
|
|
2323
2965
|
type CosmosGetPublicKeyParams = {
|
|
@@ -2342,6 +2984,9 @@ declare function cosmosSignTransaction(connectId: string, deviceId: string, para
|
|
|
2342
2984
|
type XrpAddress = {
|
|
2343
2985
|
path: string;
|
|
2344
2986
|
pub?: string;
|
|
2987
|
+
/**
|
|
2988
|
+
* @deprecated Use `pub` instead.
|
|
2989
|
+
*/
|
|
2345
2990
|
publicKey?: string;
|
|
2346
2991
|
address: string;
|
|
2347
2992
|
};
|
|
@@ -2375,6 +3020,9 @@ declare function xrpSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2375
3020
|
type SuiAddress = {
|
|
2376
3021
|
path: string;
|
|
2377
3022
|
pub?: string;
|
|
3023
|
+
/**
|
|
3024
|
+
* @deprecated Use `pub` instead.
|
|
3025
|
+
*/
|
|
2378
3026
|
publicKey?: string;
|
|
2379
3027
|
} & SuiAddress$1;
|
|
2380
3028
|
type SuiGetAddressParams = {
|
|
@@ -2389,6 +3037,9 @@ declare function suiGetAddress(connectId: string, deviceId: string, params: Comm
|
|
|
2389
3037
|
type SuiPublicKey = {
|
|
2390
3038
|
path: string;
|
|
2391
3039
|
pub: string;
|
|
3040
|
+
/**
|
|
3041
|
+
* @deprecated Use `pub` instead.
|
|
3042
|
+
*/
|
|
2392
3043
|
publicKey?: string;
|
|
2393
3044
|
};
|
|
2394
3045
|
type SuiGetPublicKeyParams = {
|
|
@@ -2418,6 +3069,10 @@ declare function suiSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2418
3069
|
type CardanoGetAddressMethodParams = {
|
|
2419
3070
|
addressParameters: CardanoAddressParameters;
|
|
2420
3071
|
networkId: number;
|
|
3072
|
+
/**
|
|
3073
|
+
* Testnet cip34:0-1097911063
|
|
3074
|
+
* Mainnet cip34:1-764824073
|
|
3075
|
+
*/
|
|
2421
3076
|
protocolMagic: number;
|
|
2422
3077
|
derivationType: number;
|
|
2423
3078
|
address?: string;
|
|
@@ -2479,6 +3134,10 @@ type CardanoSignMessageMethodParams = {
|
|
|
2479
3134
|
derivationType: number;
|
|
2480
3135
|
networkId: number;
|
|
2481
3136
|
addressType?: Messages.CardanoAddressType;
|
|
3137
|
+
/**
|
|
3138
|
+
* Testnet cip34:0-1097911063
|
|
3139
|
+
* Mainnet cip34:1-764824073
|
|
3140
|
+
*/
|
|
2482
3141
|
protocolMagic?: number;
|
|
2483
3142
|
};
|
|
2484
3143
|
declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
|
|
@@ -2512,6 +3171,9 @@ declare function filecoinSignTransaction(connectId: string, deviceId: string, pa
|
|
|
2512
3171
|
type PolkadotAddress = {
|
|
2513
3172
|
path: string;
|
|
2514
3173
|
pub: string;
|
|
3174
|
+
/**
|
|
3175
|
+
* @deprecated Use `pub` instead.
|
|
3176
|
+
*/
|
|
2515
3177
|
publicKey?: string;
|
|
2516
3178
|
} & PolkadotAddress$1;
|
|
2517
3179
|
type PolkadotGetAddressParams = {
|
|
@@ -2570,23 +3232,61 @@ type KaspaSignInputParams = {
|
|
|
2570
3232
|
sequenceNumber: number | string;
|
|
2571
3233
|
output: {
|
|
2572
3234
|
satoshis: number | string;
|
|
2573
|
-
script
|
|
3235
|
+
script?: string;
|
|
2574
3236
|
};
|
|
2575
3237
|
sigOpCount?: number;
|
|
2576
3238
|
};
|
|
2577
3239
|
type KaspaSignOutputParams = {
|
|
2578
3240
|
satoshis: number | string;
|
|
3241
|
+
address?: string;
|
|
3242
|
+
addressN?: string | number[];
|
|
3243
|
+
script?: string;
|
|
3244
|
+
scriptVersion?: number;
|
|
3245
|
+
};
|
|
3246
|
+
type KaspaStreamingSignInputParams = Omit<KaspaSignInputParams, 'output'> & {
|
|
3247
|
+
output: {
|
|
3248
|
+
satoshis: number | string;
|
|
3249
|
+
script?: string;
|
|
3250
|
+
};
|
|
3251
|
+
};
|
|
3252
|
+
type KaspaStreamingSignOutputParams = {
|
|
3253
|
+
satoshis: number | string;
|
|
3254
|
+
address?: string;
|
|
3255
|
+
addressN?: string | number[];
|
|
3256
|
+
script?: string;
|
|
3257
|
+
scriptVersion?: number;
|
|
3258
|
+
};
|
|
3259
|
+
type KaspaRefTransactionInput = {
|
|
3260
|
+
prevTxId: string;
|
|
3261
|
+
outputIndex: number;
|
|
3262
|
+
sequenceNumber: number | string;
|
|
3263
|
+
};
|
|
3264
|
+
type KaspaRefTransactionOutput = {
|
|
3265
|
+
satoshis: number | string;
|
|
3266
|
+
scriptVersion?: number;
|
|
2579
3267
|
script: string;
|
|
2580
|
-
|
|
3268
|
+
};
|
|
3269
|
+
type KaspaRefTransaction = {
|
|
3270
|
+
txId: string;
|
|
3271
|
+
version: number;
|
|
3272
|
+
inputs: KaspaRefTransactionInput[];
|
|
3273
|
+
outputs: KaspaRefTransactionOutput[];
|
|
3274
|
+
lockTime?: number | string;
|
|
3275
|
+
subNetworkID?: string;
|
|
3276
|
+
gas?: number | string;
|
|
3277
|
+
payload?: string;
|
|
2581
3278
|
};
|
|
2582
3279
|
type KaspaSignTransactionParams = {
|
|
2583
3280
|
version: number;
|
|
2584
|
-
inputs: KaspaSignInputParams
|
|
2585
|
-
outputs: KaspaSignOutputParams
|
|
3281
|
+
inputs: Array<KaspaSignInputParams | KaspaStreamingSignInputParams>;
|
|
3282
|
+
outputs: Array<KaspaSignOutputParams | KaspaStreamingSignOutputParams>;
|
|
2586
3283
|
lockTime: number | string;
|
|
2587
3284
|
sigHashType?: SignatureType;
|
|
2588
3285
|
sigOpCount?: number;
|
|
2589
3286
|
subNetworkID?: string;
|
|
3287
|
+
payload?: string;
|
|
3288
|
+
gas?: number | string;
|
|
3289
|
+
refTxs?: KaspaRefTransaction[];
|
|
2590
3290
|
scheme?: string;
|
|
2591
3291
|
prefix?: string;
|
|
2592
3292
|
useTweak?: boolean;
|
|
@@ -2631,6 +3331,9 @@ declare function nexaSignTransaction(connectId: string, deviceId: string, params
|
|
|
2631
3331
|
type NostrPublicKey = {
|
|
2632
3332
|
npub?: string;
|
|
2633
3333
|
pub?: string;
|
|
3334
|
+
/**
|
|
3335
|
+
* @deprecated Use `pub` instead.
|
|
3336
|
+
*/
|
|
2634
3337
|
publicKey?: string;
|
|
2635
3338
|
path: string;
|
|
2636
3339
|
};
|
|
@@ -2727,6 +3430,9 @@ declare function nostrSignSchnorr(connectId: string, deviceId: string, params: C
|
|
|
2727
3430
|
|
|
2728
3431
|
interface LnurlAuth {
|
|
2729
3432
|
pub?: string;
|
|
3433
|
+
/**
|
|
3434
|
+
* @deprecated Use `pub` instead.
|
|
3435
|
+
*/
|
|
2730
3436
|
publickey?: string;
|
|
2731
3437
|
path?: string;
|
|
2732
3438
|
signature?: string;
|
|
@@ -2803,6 +3509,9 @@ declare function dnxSignTransaction(connectId: string, deviceId: string, params:
|
|
|
2803
3509
|
type TonAddress = {
|
|
2804
3510
|
path: string;
|
|
2805
3511
|
pub: string;
|
|
3512
|
+
/**
|
|
3513
|
+
* @deprecated Use `pub` instead.
|
|
3514
|
+
*/
|
|
2806
3515
|
publicKey?: string;
|
|
2807
3516
|
address: string;
|
|
2808
3517
|
};
|
|
@@ -2914,6 +3623,9 @@ declare function scdoSignTransaction(connectId: string, deviceId: string, params
|
|
|
2914
3623
|
|
|
2915
3624
|
type AlephiumAddress = {
|
|
2916
3625
|
path: string;
|
|
3626
|
+
/**
|
|
3627
|
+
* @deprecated Use `pub` instead.
|
|
3628
|
+
*/
|
|
2917
3629
|
publicKey?: string;
|
|
2918
3630
|
pub?: string;
|
|
2919
3631
|
address: string;
|
|
@@ -3016,13 +3728,21 @@ type NeoSignedTx = {
|
|
|
3016
3728
|
declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
|
|
3017
3729
|
|
|
3018
3730
|
type CoreApi = {
|
|
3731
|
+
/**
|
|
3732
|
+
* Inject function
|
|
3733
|
+
*/
|
|
3019
3734
|
init: typeof init;
|
|
3020
3735
|
on: typeof on;
|
|
3021
3736
|
off: typeof off;
|
|
3022
3737
|
emit: (event: string, ...args: any[]) => void;
|
|
3023
3738
|
removeAllListeners: typeof removeAllListeners;
|
|
3024
|
-
dispose: () => void
|
|
3739
|
+
dispose: () => void | Promise<void>;
|
|
3025
3740
|
call: (params: any) => Promise<any>;
|
|
3741
|
+
/**
|
|
3742
|
+
* Bind a protocol that has already been verified for one transport endpoint.
|
|
3743
|
+
* Every later SDK call for the same connectId uses it as a strict expectation.
|
|
3744
|
+
*/
|
|
3745
|
+
setDeviceConnectProtocol: (connectId: string, connectProtocol: HardwareConnectProtocol | undefined) => void;
|
|
3026
3746
|
uiResponse: typeof uiResponse;
|
|
3027
3747
|
cancel: (connectId?: string) => void;
|
|
3028
3748
|
updateSettings: typeof updateSettings;
|
|
@@ -3030,19 +3750,32 @@ type CoreApi = {
|
|
|
3030
3750
|
success: boolean;
|
|
3031
3751
|
}>;
|
|
3032
3752
|
getLogs: typeof getLogs;
|
|
3753
|
+
clearSessionCache: typeof clearSessionCache;
|
|
3754
|
+
/**
|
|
3755
|
+
* Test function
|
|
3756
|
+
*/
|
|
3033
3757
|
testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
|
|
3758
|
+
testProtocolV2Ping: typeof testProtocolV2Ping;
|
|
3034
3759
|
preInitialize: typeof preInitialize;
|
|
3760
|
+
/**
|
|
3761
|
+
* Core function
|
|
3762
|
+
*/
|
|
3035
3763
|
checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
|
|
3036
3764
|
checkBridgeStatus: typeof checkBridgeStatus;
|
|
3037
3765
|
checkBridgeRelease: typeof checkBridgeRelease;
|
|
3038
3766
|
checkBootloaderRelease: typeof checkBootloaderRelease;
|
|
3039
3767
|
checkFirmwareTypeAvailable: typeof checkFirmwareTypeAvailable;
|
|
3768
|
+
/**
|
|
3769
|
+
* Device function
|
|
3770
|
+
*/
|
|
3040
3771
|
searchDevices: typeof searchDevices;
|
|
3772
|
+
detectDeviceConnectProtocol: typeof detectDeviceConnectProtocol;
|
|
3041
3773
|
promptWebDeviceAccess: typeof promptWebDeviceAccess;
|
|
3042
3774
|
getFeatures: typeof getFeatures;
|
|
3043
|
-
|
|
3775
|
+
getDeviceState: typeof getDeviceState;
|
|
3044
3776
|
getOnekeyFeatures: typeof getOnekeyFeatures;
|
|
3045
3777
|
getPassphraseState: typeof getPassphraseState;
|
|
3778
|
+
openWalletSession: typeof openWalletSession;
|
|
3046
3779
|
deviceBackup: typeof deviceBackup;
|
|
3047
3780
|
deviceChangePin: typeof deviceChangePin;
|
|
3048
3781
|
deviceFlags: typeof deviceFlags;
|
|
@@ -3069,34 +3802,30 @@ type CoreApi = {
|
|
|
3069
3802
|
firmwareUpdateV2: typeof firmwareUpdateV2;
|
|
3070
3803
|
firmwareUpdateV3: typeof firmwareUpdateV3;
|
|
3071
3804
|
firmwareUpdateV4: typeof firmwareUpdateV4;
|
|
3805
|
+
registerFirmwareUpdateHostBinding: typeof registerFirmwareUpdateHostBinding$1;
|
|
3806
|
+
unregisterFirmwareUpdateHostBinding: typeof unregisterFirmwareUpdateHostBinding$1;
|
|
3807
|
+
getFirmwareUpdateHostBindingGeneration: typeof getFirmwareUpdateHostBindingGeneration$1;
|
|
3808
|
+
getFirmwareUpdateCapabilities: typeof getFirmwareUpdateCapabilities;
|
|
3809
|
+
prepareFirmwareUpdatePlan: typeof prepareFirmwareUpdatePlan;
|
|
3810
|
+
validateFirmwareUpdatePreparedPlan: typeof validateFirmwareUpdatePreparedPlan;
|
|
3811
|
+
prepareProtocolV2ResourceFiles: typeof prepareProtocolV2ResourceFiles$1;
|
|
3072
3812
|
cipherKeyValue: typeof cipherKeyValue;
|
|
3073
|
-
|
|
3074
|
-
|
|
3813
|
+
/**
|
|
3814
|
+
* Pro2 business API
|
|
3815
|
+
*/
|
|
3075
3816
|
deviceReboot: typeof deviceReboot;
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
fileWrite: typeof fileWrite;
|
|
3084
|
-
fileDelete: typeof fileDelete;
|
|
3085
|
-
dirList: typeof dirList;
|
|
3086
|
-
dirMake: typeof dirMake;
|
|
3087
|
-
dirRemove: typeof dirRemove;
|
|
3088
|
-
pathInfo: typeof pathInfo;
|
|
3089
|
-
filesystemFileRead: typeof filesystemFileRead;
|
|
3090
|
-
filesystemFileWrite: typeof filesystemFileWrite;
|
|
3091
|
-
filesystemFileDelete: typeof filesystemFileDelete;
|
|
3092
|
-
filesystemDirList: typeof filesystemDirList;
|
|
3093
|
-
filesystemDirMake: typeof filesystemDirMake;
|
|
3094
|
-
filesystemDirRemove: typeof filesystemDirRemove;
|
|
3095
|
-
filesystemPathInfoQuery: typeof filesystemPathInfoQuery;
|
|
3096
|
-
filesystemFormat: typeof filesystemFormat;
|
|
3097
|
-
filesystemDiskControl: typeof filesystemDiskControl;
|
|
3817
|
+
deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
|
|
3818
|
+
deviceUploadNft: typeof deviceUploadNft;
|
|
3819
|
+
deviceUploadWallpaper: typeof deviceUploadWallpaper;
|
|
3820
|
+
uploadPortfolio: typeof uploadPortfolio;
|
|
3821
|
+
/**
|
|
3822
|
+
* All network function
|
|
3823
|
+
*/
|
|
3098
3824
|
allNetworkGetAddress: typeof allNetworkGetAddress;
|
|
3099
3825
|
allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
|
|
3826
|
+
/**
|
|
3827
|
+
* EVM function
|
|
3828
|
+
*/
|
|
3100
3829
|
evmGetAddress: typeof evmGetAddress;
|
|
3101
3830
|
evmGetPublicKey: typeof evmGetPublicKey;
|
|
3102
3831
|
evmSignMessage: typeof evmSignMessage;
|
|
@@ -3104,86 +3833,167 @@ type CoreApi = {
|
|
|
3104
3833
|
evmSignTransaction: typeof evmSignTransaction;
|
|
3105
3834
|
evmSignTypedData: typeof evmSignTypedData;
|
|
3106
3835
|
evmVerifyMessage: typeof evmVerifyMessage;
|
|
3836
|
+
/**
|
|
3837
|
+
* BTC function
|
|
3838
|
+
*/
|
|
3107
3839
|
btcGetAddress: typeof btcGetAddress;
|
|
3108
3840
|
btcGetPublicKey: typeof btcGetPublicKey;
|
|
3109
3841
|
btcSignMessage: typeof btcSignMessage;
|
|
3110
3842
|
btcSignPsbt: typeof btcSignPsbt;
|
|
3111
3843
|
btcSignTransaction: typeof btcSignTransaction;
|
|
3112
3844
|
btcVerifyMessage: typeof btcVerifyMessage;
|
|
3845
|
+
/**
|
|
3846
|
+
* Starcoin function
|
|
3847
|
+
*/
|
|
3113
3848
|
starcoinGetAddress: typeof starcoinGetAddress;
|
|
3114
3849
|
starcoinGetPublicKey: typeof starcoinGetPublicKey;
|
|
3115
3850
|
starcoinSignMessage: typeof starcoinSignMessage;
|
|
3116
3851
|
starcoinSignTransaction: typeof starcoinSignTransaction;
|
|
3117
3852
|
starcoinVerifyMessage: typeof starcoinVerifyMessage;
|
|
3853
|
+
/**
|
|
3854
|
+
* Nem function
|
|
3855
|
+
*/
|
|
3118
3856
|
nemGetAddress: typeof nemGetAddress;
|
|
3119
3857
|
nemSignTransaction: typeof nemSignTransaction;
|
|
3858
|
+
/**
|
|
3859
|
+
* Solana function
|
|
3860
|
+
*/
|
|
3120
3861
|
solGetAddress: typeof solGetAddress;
|
|
3121
3862
|
solSignTransaction: typeof solSignTransaction;
|
|
3122
3863
|
solSignOffchainMessage: typeof solSignOffchainMessage;
|
|
3123
3864
|
solSignMessage: typeof solSignMessage;
|
|
3865
|
+
/**
|
|
3866
|
+
* Stellar function
|
|
3867
|
+
*/
|
|
3124
3868
|
stellarGetAddress: typeof stellarGetAddress;
|
|
3125
3869
|
stellarSignTransaction: typeof stellarSignTransaction;
|
|
3870
|
+
/**
|
|
3871
|
+
* Tron function
|
|
3872
|
+
*/
|
|
3126
3873
|
tronGetAddress: typeof tronGetAddress;
|
|
3127
3874
|
tronSignMessage: typeof tronSignMessage;
|
|
3128
3875
|
tronSignTransaction: typeof tronSignTransaction;
|
|
3876
|
+
/**
|
|
3877
|
+
* Conflux function
|
|
3878
|
+
*/
|
|
3129
3879
|
confluxGetAddress: typeof confluxGetAddress;
|
|
3130
3880
|
confluxSignMessage: typeof confluxSignMessage;
|
|
3131
3881
|
confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
|
|
3132
3882
|
confluxSignTransaction: typeof confluxSignTransaction;
|
|
3883
|
+
/**
|
|
3884
|
+
* Near function
|
|
3885
|
+
*/
|
|
3133
3886
|
nearGetAddress: typeof nearGetAddress;
|
|
3134
3887
|
nearSignTransaction: typeof nearSignTransaction;
|
|
3888
|
+
/**
|
|
3889
|
+
* Aptos function
|
|
3890
|
+
*/
|
|
3135
3891
|
aptosGetAddress: typeof aptosGetAddress;
|
|
3136
3892
|
aptosGetPublicKey: typeof aptosGetPublicKey;
|
|
3137
3893
|
aptosSignMessage: typeof aptosSignMessage;
|
|
3138
3894
|
aptosSignInMessage: typeof aptosSignInMessage;
|
|
3139
3895
|
aptosSignTransaction: typeof aptosSignTransaction;
|
|
3896
|
+
/**
|
|
3897
|
+
* Algo function
|
|
3898
|
+
*/
|
|
3140
3899
|
algoGetAddress: typeof algoGetAddress;
|
|
3141
3900
|
algoSignTransaction: typeof algoSignTransaction;
|
|
3901
|
+
/**
|
|
3902
|
+
* Cosmos function
|
|
3903
|
+
*/
|
|
3142
3904
|
cosmosGetAddress: typeof cosmosGetAddress;
|
|
3143
3905
|
cosmosGetPublicKey: typeof cosmosGetPublicKey;
|
|
3144
3906
|
cosmosSignTransaction: typeof cosmosSignTransaction;
|
|
3907
|
+
/**
|
|
3908
|
+
* XRP function
|
|
3909
|
+
*/
|
|
3145
3910
|
xrpGetAddress: typeof xrpGetAddress;
|
|
3146
3911
|
xrpSignTransaction: typeof xrpSignTransaction;
|
|
3912
|
+
/**
|
|
3913
|
+
* SUI function
|
|
3914
|
+
*/
|
|
3147
3915
|
suiGetAddress: typeof suiGetAddress;
|
|
3148
3916
|
suiGetPublicKey: typeof suiGetPublicKey;
|
|
3149
3917
|
suiSignMessage: typeof suiSignMessage;
|
|
3150
3918
|
suiSignTransaction: typeof suiSignTransaction;
|
|
3919
|
+
/**
|
|
3920
|
+
* Cardano function
|
|
3921
|
+
*/
|
|
3151
3922
|
cardanoGetAddress: typeof cardanoGetAddress;
|
|
3152
3923
|
cardanoGetPublicKey: typeof cardanoGetPublicKey;
|
|
3153
3924
|
cardanoSignTransaction: typeof cardanoSignTransaction;
|
|
3154
3925
|
cardanoSignMessage: typeof cardanoSignMessage;
|
|
3926
|
+
/**
|
|
3927
|
+
* Filecoin function
|
|
3928
|
+
*/
|
|
3155
3929
|
filecoinGetAddress: typeof filecoinGetAddress;
|
|
3156
3930
|
filecoinSignTransaction: typeof filecoinSignTransaction;
|
|
3931
|
+
/**
|
|
3932
|
+
* Polkadot function
|
|
3933
|
+
*/
|
|
3157
3934
|
polkadotGetAddress: typeof polkadotGetAddress;
|
|
3158
3935
|
polkadotSignTransaction: typeof polkadotSignTransaction;
|
|
3936
|
+
/**
|
|
3937
|
+
* Kaspa function
|
|
3938
|
+
*/
|
|
3159
3939
|
kaspaGetAddress: typeof kaspaGetAddress;
|
|
3160
3940
|
kaspaSignTransaction: typeof kaspaSignTransaction;
|
|
3941
|
+
/**
|
|
3942
|
+
* nexa function
|
|
3943
|
+
*/
|
|
3161
3944
|
nexaGetAddress: typeof nexaGetAddress;
|
|
3162
3945
|
nexaSignTransaction: typeof nexaSignTransaction;
|
|
3946
|
+
/**
|
|
3947
|
+
* Nostr function
|
|
3948
|
+
*/
|
|
3163
3949
|
nostrGetPublicKey: typeof nostrGetPublicKey;
|
|
3164
3950
|
nostrSignEvent: typeof nostrSignEvent;
|
|
3165
3951
|
nostrEncryptMessage: typeof nostrEncryptMessage;
|
|
3166
3952
|
nostrDecryptMessage: typeof nostrDecryptMessage;
|
|
3167
3953
|
nostrSignSchnorr: typeof nostrSignSchnorr;
|
|
3954
|
+
/**
|
|
3955
|
+
* Lightning Network
|
|
3956
|
+
*/
|
|
3168
3957
|
lnurlAuth: typeof lnurlAuth;
|
|
3958
|
+
/**
|
|
3959
|
+
* Nervos Network
|
|
3960
|
+
*/
|
|
3169
3961
|
nervosGetAddress: typeof nervosGetAddress;
|
|
3170
3962
|
nervosSignTransaction: typeof nervosSignTransaction;
|
|
3963
|
+
/**
|
|
3964
|
+
* Dnx Network
|
|
3965
|
+
*/
|
|
3171
3966
|
dnxGetAddress: typeof dnxGetAddress;
|
|
3172
3967
|
dnxSignTransaction: typeof dnxSignTransaction;
|
|
3968
|
+
/**
|
|
3969
|
+
* TON Network
|
|
3970
|
+
*/
|
|
3173
3971
|
tonGetAddress: typeof tonGetAddress;
|
|
3174
3972
|
tonSignMessage: typeof tonSignMessage;
|
|
3175
3973
|
tonSignProof: typeof tonSignProof;
|
|
3176
3974
|
tonSignData: typeof tonSignData;
|
|
3975
|
+
/**
|
|
3976
|
+
* SCDO Network
|
|
3977
|
+
*/
|
|
3177
3978
|
scdoGetAddress: typeof scdoGetAddress;
|
|
3178
3979
|
scdoSignMessage: typeof scdoSignMessage;
|
|
3179
3980
|
scdoSignTransaction: typeof scdoSignTransaction;
|
|
3981
|
+
/**
|
|
3982
|
+
* Alephium Network
|
|
3983
|
+
*/
|
|
3180
3984
|
alephiumGetAddress: typeof alephiumGetAddress;
|
|
3181
3985
|
alephiumSignMessage: typeof alephiumSignMessage;
|
|
3182
3986
|
alephiumSignTransaction: typeof alephiumSignTransaction;
|
|
3987
|
+
/**
|
|
3988
|
+
* Benfen Network
|
|
3989
|
+
*/
|
|
3183
3990
|
benfenGetAddress: typeof benfenGetAddress;
|
|
3184
3991
|
benfenGetPublicKey: typeof benfenGetPublicKey;
|
|
3185
3992
|
benfenSignTransaction: typeof benfenSignTransaction;
|
|
3186
3993
|
benfenSignMessage: typeof benfenSignMessage;
|
|
3994
|
+
/**
|
|
3995
|
+
* Neo Network
|
|
3996
|
+
*/
|
|
3187
3997
|
neoGetAddress: typeof neoGetAddress;
|
|
3188
3998
|
neoSignTransaction: typeof neoSignTransaction;
|
|
3189
3999
|
};
|
|
@@ -3256,13 +4066,17 @@ declare const DEVICE: {
|
|
|
3256
4066
|
readonly LOADING: "device-loading";
|
|
3257
4067
|
readonly BUTTON: "button";
|
|
3258
4068
|
readonly PIN: "pin";
|
|
4069
|
+
readonly PIN_ON_DEVICE: "pin_on_device";
|
|
4070
|
+
readonly PIN_ON_DEVICE_COMPLETE: "pin_on_device_complete";
|
|
3259
4071
|
readonly PASSPHRASE: "passphrase";
|
|
3260
4072
|
readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
|
|
4073
|
+
readonly ATTACH_PIN_ON_DEVICE: "attach_pin_on_device";
|
|
3261
4074
|
readonly WORD: "word";
|
|
3262
4075
|
readonly SUPPORT_FEATURES: "support_features";
|
|
3263
4076
|
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
|
|
3264
4077
|
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "select_device_for_switch_firmware_web_device";
|
|
3265
4078
|
readonly FEATURES: "features";
|
|
4079
|
+
readonly STATE: "state";
|
|
3266
4080
|
};
|
|
3267
4081
|
interface DeviceConnnectRequest {
|
|
3268
4082
|
type: typeof DEVICE.CONNECT;
|
|
@@ -3281,6 +4095,11 @@ interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'
|
|
|
3281
4095
|
}
|
|
3282
4096
|
type PassphraseRequestPayload = {
|
|
3283
4097
|
existsAttachPinUser?: boolean;
|
|
4098
|
+
deviceOnly?: boolean;
|
|
4099
|
+
source?: 'wallet-session-coordinator';
|
|
4100
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
4101
|
+
expectedPassphraseState?: string;
|
|
4102
|
+
interaction?: HardwareUiInteractionMeta;
|
|
3284
4103
|
};
|
|
3285
4104
|
interface DeviceButtonRequest {
|
|
3286
4105
|
type: typeof DEVICE.BUTTON;
|
|
@@ -3293,6 +4112,10 @@ interface DeviceSendFeatures {
|
|
|
3293
4112
|
type: typeof DEVICE.FEATURES;
|
|
3294
4113
|
payload: DeviceFeaturesPayload;
|
|
3295
4114
|
}
|
|
4115
|
+
interface DeviceSendState {
|
|
4116
|
+
type: typeof DEVICE.STATE;
|
|
4117
|
+
payload: DeviceStateEvent;
|
|
4118
|
+
}
|
|
3296
4119
|
type DeviceSupportFeaturesPayload = SupportFeatures & {
|
|
3297
4120
|
device: KnownDevice | null;
|
|
3298
4121
|
};
|
|
@@ -3300,13 +4123,58 @@ interface DeviceSendSupportFeatures {
|
|
|
3300
4123
|
type: typeof DEVICE.SUPPORT_FEATURES;
|
|
3301
4124
|
payload: DeviceSupportFeaturesPayload;
|
|
3302
4125
|
}
|
|
3303
|
-
type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
4126
|
+
type DeviceEvent = DeviceButtonRequest | DeviceSendState | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
3304
4127
|
type DeviceEventMessage = DeviceEvent & {
|
|
3305
4128
|
event: typeof DEVICE_EVENT;
|
|
3306
4129
|
};
|
|
3307
4130
|
type DeviceEventListenerFn = (type: typeof DEVICE_EVENT, cb: (event: DeviceEventMessage) => void) => void;
|
|
3308
4131
|
declare const createDeviceMessage: MessageFactoryFn<typeof DEVICE_EVENT, DeviceEvent>;
|
|
3309
4132
|
|
|
4133
|
+
declare const UI_RESPONSE: {
|
|
4134
|
+
readonly RECEIVE_PIN: "ui-receive_pin";
|
|
4135
|
+
readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
|
|
4136
|
+
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
|
|
4137
|
+
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "ui-receive_select-device-for-switch-firmware-web-device";
|
|
4138
|
+
};
|
|
4139
|
+
interface UiResponseCorrelation {
|
|
4140
|
+
interactionId: string;
|
|
4141
|
+
deviceId: string;
|
|
4142
|
+
}
|
|
4143
|
+
interface UiResponseCorrelationFields {
|
|
4144
|
+
interactionId?: string;
|
|
4145
|
+
deviceId?: string;
|
|
4146
|
+
}
|
|
4147
|
+
interface UiResponsePin extends UiResponseCorrelationFields {
|
|
4148
|
+
type: typeof UI_RESPONSE.RECEIVE_PIN;
|
|
4149
|
+
payload: string;
|
|
4150
|
+
}
|
|
4151
|
+
interface UiResponsePassphrase extends UiResponseCorrelationFields {
|
|
4152
|
+
type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
|
|
4153
|
+
payload: {
|
|
4154
|
+
value: string;
|
|
4155
|
+
passphraseOnDevice?: boolean;
|
|
4156
|
+
attachPinOnDevice?: boolean;
|
|
4157
|
+
save?: boolean;
|
|
4158
|
+
};
|
|
4159
|
+
}
|
|
4160
|
+
interface UiResponseSelectDeviceInBootloaderForWebDevice {
|
|
4161
|
+
type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
4162
|
+
payload: {
|
|
4163
|
+
deviceId: string;
|
|
4164
|
+
};
|
|
4165
|
+
}
|
|
4166
|
+
interface UiResponseSelectDeviceForSwitchFirmwareWebDevice {
|
|
4167
|
+
type: typeof UI_RESPONSE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
|
|
4168
|
+
payload: {
|
|
4169
|
+
deviceId: string;
|
|
4170
|
+
};
|
|
4171
|
+
}
|
|
4172
|
+
type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice | UiResponseSelectDeviceForSwitchFirmwareWebDevice;
|
|
4173
|
+
type UiResponseMessage = UiResponseEvent & {
|
|
4174
|
+
event: typeof UI_EVENT;
|
|
4175
|
+
};
|
|
4176
|
+
declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
|
|
4177
|
+
|
|
3310
4178
|
declare const UI_EVENT = "UI_EVENT";
|
|
3311
4179
|
declare const UI_REQUEST: {
|
|
3312
4180
|
readonly REQUEST_PIN: "ui-request_pin";
|
|
@@ -3341,8 +4209,43 @@ declare const UI_REQUEST: {
|
|
|
3341
4209
|
readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
|
|
3342
4210
|
readonly NOT_USE_ONEKEY_DEVICE: "ui-device_please_use_onekey_device";
|
|
3343
4211
|
};
|
|
4212
|
+
type ProtocolV2UiEventSource = 'unlock-coordinator' | 'wallet-session-coordinator' | 'method-lifecycle';
|
|
4213
|
+
type ProtocolV2UiCompletion = 'page-accepted' | 'operation-completed';
|
|
4214
|
+
type HardwareUiInteractionMeta = {
|
|
4215
|
+
interactionId: string;
|
|
4216
|
+
phaseId: string;
|
|
4217
|
+
sequence: number;
|
|
4218
|
+
phase: 'pin' | 'passphrase' | 'passphrase-on-device' | 'button' | 'processing';
|
|
4219
|
+
transition: 'start' | 'complete' | 'finish';
|
|
4220
|
+
outcome?: 'submitted' | 'succeeded' | 'failed' | 'cancelled' | 'disconnected';
|
|
4221
|
+
protocol: 'V2';
|
|
4222
|
+
device?: Device$1;
|
|
4223
|
+
};
|
|
4224
|
+
type ProtocolV2UiEventMetadata = {
|
|
4225
|
+
source?: ProtocolV2UiEventSource;
|
|
4226
|
+
reason?: string;
|
|
4227
|
+
deviceOnly?: boolean;
|
|
4228
|
+
completion?: ProtocolV2UiCompletion;
|
|
4229
|
+
method?: string;
|
|
4230
|
+
page?: string | number;
|
|
4231
|
+
operation?: string;
|
|
4232
|
+
interaction?: HardwareUiInteractionMeta;
|
|
4233
|
+
};
|
|
4234
|
+
type UiRequestWindowClose = {
|
|
4235
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
|
|
4236
|
+
payload: HardwareUiInteractionMeta;
|
|
4237
|
+
} | {
|
|
4238
|
+
type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
|
|
4239
|
+
payload: HardwareUiInteractionMeta;
|
|
4240
|
+
} | {
|
|
4241
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW;
|
|
4242
|
+
payload?: undefined;
|
|
4243
|
+
} | {
|
|
4244
|
+
type: typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW;
|
|
4245
|
+
payload?: undefined;
|
|
4246
|
+
};
|
|
3344
4247
|
interface UiRequestWithoutPayload {
|
|
3345
|
-
type: typeof UI_REQUEST.
|
|
4248
|
+
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;
|
|
3346
4249
|
payload?: typeof undefined;
|
|
3347
4250
|
}
|
|
3348
4251
|
interface UiRequestFirmwareProgressing {
|
|
@@ -3353,40 +4256,50 @@ interface UiRequestFirmwareProgressing {
|
|
|
3353
4256
|
}
|
|
3354
4257
|
type UiRequestDeviceAction = {
|
|
3355
4258
|
type: typeof UI_REQUEST.REQUEST_PIN;
|
|
3356
|
-
payload: {
|
|
3357
|
-
device: Device;
|
|
4259
|
+
payload: ProtocolV2UiEventMetadata & {
|
|
4260
|
+
device: Device$1;
|
|
3358
4261
|
type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
|
|
4262
|
+
responseCorrelation?: UiResponseCorrelation;
|
|
3359
4263
|
};
|
|
3360
4264
|
};
|
|
3361
4265
|
interface UiRequestButton {
|
|
3362
4266
|
type: typeof UI_REQUEST.REQUEST_BUTTON;
|
|
3363
|
-
payload: DeviceButtonRequest['payload'];
|
|
4267
|
+
payload: DeviceButtonRequest['payload'] & ProtocolV2UiEventMetadata;
|
|
3364
4268
|
}
|
|
3365
4269
|
interface UiRequestPassphrase {
|
|
3366
4270
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
|
|
3367
4271
|
payload: {
|
|
3368
|
-
device: Device;
|
|
4272
|
+
device: Device$1;
|
|
3369
4273
|
passphraseState?: string;
|
|
3370
4274
|
existsAttachPinUser?: boolean;
|
|
4275
|
+
deviceOnly?: boolean;
|
|
4276
|
+
source?: 'wallet-session-coordinator';
|
|
4277
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
4278
|
+
expectedPassphraseState?: string;
|
|
4279
|
+
interaction?: HardwareUiInteractionMeta;
|
|
4280
|
+
responseCorrelation?: UiResponseCorrelation;
|
|
3371
4281
|
};
|
|
3372
4282
|
}
|
|
3373
4283
|
interface UiRequestPassphraseOnDevice {
|
|
3374
4284
|
type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
|
|
3375
4285
|
payload: {
|
|
3376
|
-
device: Device;
|
|
4286
|
+
device: Device$1;
|
|
3377
4287
|
passphraseState?: string;
|
|
4288
|
+
source?: 'wallet-session-coordinator';
|
|
4289
|
+
reason?: 'open-wallet' | 'session-recovery';
|
|
4290
|
+
interaction?: HardwareUiInteractionMeta;
|
|
3378
4291
|
};
|
|
3379
4292
|
}
|
|
3380
4293
|
interface UiRequestSelectDeviceInBootloaderForWebDevice {
|
|
3381
4294
|
type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
3382
4295
|
payload: {
|
|
3383
|
-
device: Device;
|
|
4296
|
+
device: Device$1;
|
|
3384
4297
|
};
|
|
3385
4298
|
}
|
|
3386
4299
|
interface UiRequestSelectDeviceForSwitchFirmwareWebDevice {
|
|
3387
4300
|
type: typeof UI_REQUEST.REQUEST_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
|
|
3388
4301
|
payload: {
|
|
3389
|
-
device: Device;
|
|
4302
|
+
device: Device$1;
|
|
3390
4303
|
};
|
|
3391
4304
|
}
|
|
3392
4305
|
interface FirmwareProcessing {
|
|
@@ -3399,7 +4312,7 @@ type IFirmwareUpdateProgressType = 'transferData' | 'installingFirmware';
|
|
|
3399
4312
|
interface FirmwareProgress {
|
|
3400
4313
|
type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
|
|
3401
4314
|
payload: {
|
|
3402
|
-
device: Device;
|
|
4315
|
+
device: Device$1;
|
|
3403
4316
|
progress: number;
|
|
3404
4317
|
progressType: IFirmwareUpdateProgressType;
|
|
3405
4318
|
transferredBytes?: number;
|
|
@@ -3411,7 +4324,7 @@ interface FirmwareProgress {
|
|
|
3411
4324
|
interface FirmwareTip {
|
|
3412
4325
|
type: typeof UI_REQUEST.FIRMWARE_TIP;
|
|
3413
4326
|
payload: {
|
|
3414
|
-
device: Device;
|
|
4327
|
+
device: Device$1;
|
|
3415
4328
|
data: {
|
|
3416
4329
|
message: string;
|
|
3417
4330
|
};
|
|
@@ -3430,14 +4343,14 @@ interface DeviceProgress {
|
|
|
3430
4343
|
interface PreviousAddressResult {
|
|
3431
4344
|
type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
|
|
3432
4345
|
payload: {
|
|
3433
|
-
device: Device;
|
|
4346
|
+
device: Device$1;
|
|
3434
4347
|
data: {
|
|
3435
4348
|
address?: string;
|
|
3436
4349
|
path?: string;
|
|
3437
4350
|
};
|
|
3438
4351
|
};
|
|
3439
4352
|
}
|
|
3440
|
-
type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
|
|
4353
|
+
type UiEvent = UiRequestWithoutPayload | UiRequestWindowClose | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | UiRequestSelectDeviceForSwitchFirmwareWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
|
|
3441
4354
|
declare enum FirmwareUpdateTipMessage {
|
|
3442
4355
|
CheckLatestUiResource = "CheckLatestUiResource",
|
|
3443
4356
|
StartDownloadFirmware = "StartDownloadFirmware",
|
|
@@ -3571,43 +4484,6 @@ interface MethodResponseMessage {
|
|
|
3571
4484
|
declare const createResponseMessage: (id: number, success: boolean, payload: any) => MethodResponseMessage;
|
|
3572
4485
|
type CallMethodKeys = keyof CoreApi;
|
|
3573
4486
|
|
|
3574
|
-
declare const UI_RESPONSE: {
|
|
3575
|
-
readonly RECEIVE_PIN: "ui-receive_pin";
|
|
3576
|
-
readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
|
|
3577
|
-
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
|
|
3578
|
-
readonly SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE: "ui-receive_select-device-for-switch-firmware-web-device";
|
|
3579
|
-
};
|
|
3580
|
-
interface UiResponsePin {
|
|
3581
|
-
type: typeof UI_RESPONSE.RECEIVE_PIN;
|
|
3582
|
-
payload: string;
|
|
3583
|
-
}
|
|
3584
|
-
interface UiResponsePassphrase {
|
|
3585
|
-
type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
|
|
3586
|
-
payload: {
|
|
3587
|
-
value: string;
|
|
3588
|
-
passphraseOnDevice?: boolean;
|
|
3589
|
-
attachPinOnDevice?: boolean;
|
|
3590
|
-
save?: boolean;
|
|
3591
|
-
};
|
|
3592
|
-
}
|
|
3593
|
-
interface UiResponseSelectDeviceInBootloaderForWebDevice {
|
|
3594
|
-
type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
3595
|
-
payload: {
|
|
3596
|
-
deviceId: string;
|
|
3597
|
-
};
|
|
3598
|
-
}
|
|
3599
|
-
interface UiResponseSelectDeviceForSwitchFirmwareWebDevice {
|
|
3600
|
-
type: typeof UI_RESPONSE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE;
|
|
3601
|
-
payload: {
|
|
3602
|
-
deviceId: string;
|
|
3603
|
-
};
|
|
3604
|
-
}
|
|
3605
|
-
type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice | UiResponseSelectDeviceForSwitchFirmwareWebDevice;
|
|
3606
|
-
type UiResponseMessage = UiResponseEvent & {
|
|
3607
|
-
event: typeof UI_EVENT;
|
|
3608
|
-
};
|
|
3609
|
-
declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
|
|
3610
|
-
|
|
3611
4487
|
declare const LOG_EVENT = "LOG_EVENT";
|
|
3612
4488
|
declare const LOG: {
|
|
3613
4489
|
readonly OUTPUT: "log-output";
|
|
@@ -3683,10 +4559,14 @@ type UiPromiseResponse = UiResponseEvent | {
|
|
|
3683
4559
|
};
|
|
3684
4560
|
type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
|
|
3685
4561
|
type: T;
|
|
3686
|
-
}>, T, Device
|
|
4562
|
+
}>, T, Device> & {
|
|
4563
|
+
responseCorrelation?: UiResponseCorrelation;
|
|
4564
|
+
};
|
|
3687
4565
|
|
|
3688
4566
|
declare const LogBlockEvent: Set<string>;
|
|
3689
4567
|
declare function getLogBlockLabel(message: unknown): string | undefined;
|
|
4568
|
+
declare function getSafeLogPayload(value: unknown, blockLabel?: string): unknown;
|
|
4569
|
+
declare function formatLogMethodLabel(label: string, methodName?: string): string;
|
|
3690
4570
|
|
|
3691
4571
|
declare const executeCallback: (id: string, ...args: any[]) => void;
|
|
3692
4572
|
declare const cleanupCallback: (id: string) => void;
|
|
@@ -3750,30 +4630,109 @@ declare enum LoggerNames {
|
|
|
3750
4630
|
}
|
|
3751
4631
|
declare const getLogger: (key: LoggerNames) => Log;
|
|
3752
4632
|
|
|
3753
|
-
|
|
4633
|
+
type HttpRequestOptions = {
|
|
4634
|
+
/** Additional request headers, such as a byte range for package metadata reads. */
|
|
4635
|
+
headers?: Record<string, string>;
|
|
4636
|
+
/** Axios adapter-defined request timeout retained for existing opt-in callers. */
|
|
4637
|
+
timeoutMs?: number;
|
|
4638
|
+
/** Deadline for DNS, connection, TLS, redirects, and the first response-body progress. */
|
|
4639
|
+
connectTimeoutMs?: number;
|
|
4640
|
+
/** Maximum idle interval between response-body progress events. */
|
|
4641
|
+
readTimeoutMs?: number;
|
|
4642
|
+
/** Wall-clock deadline across all attempts and retry backoff. */
|
|
4643
|
+
overallTimeoutMs?: number;
|
|
4644
|
+
maxRetries?: number;
|
|
4645
|
+
retryDelayMs?: number;
|
|
4646
|
+
};
|
|
4647
|
+
|
|
4648
|
+
declare const httpRequest: (url: string, type: string, options?: HttpRequestOptions) => any;
|
|
3754
4649
|
declare const getTimeStamp: () => number;
|
|
3755
4650
|
|
|
4651
|
+
/**
|
|
4652
|
+
* Validates version string
|
|
4653
|
+
* @param {string} version Version string
|
|
4654
|
+
* @returns {boolean} True if version string is valid, false if not
|
|
4655
|
+
*/
|
|
3756
4656
|
declare const isValidVersionString: (version: string) => boolean;
|
|
4657
|
+
/**
|
|
4658
|
+
* Validates a version array
|
|
4659
|
+
* @param {number[]} version Version array
|
|
4660
|
+
* @returns {boolean} True if version array is valid, false if not
|
|
4661
|
+
*/
|
|
3757
4662
|
declare const isValidVersionArray: (version: number[]) => boolean;
|
|
4663
|
+
/**
|
|
4664
|
+
* Fills the missing version numbers with zeros (ie: [1, 2] will become [1, 2, 0])
|
|
4665
|
+
* @param {number[]} version Version array
|
|
4666
|
+
* @returns {number[]} Version array with all positions filled
|
|
4667
|
+
*/
|
|
3758
4668
|
declare const normalizeVersionArray: (version: number[]) => number[];
|
|
4669
|
+
/**
|
|
4670
|
+
* Returns a valid version array from a version string
|
|
4671
|
+
* @param {string} version Version string
|
|
4672
|
+
* @returns {number[]} Version array
|
|
4673
|
+
*/
|
|
3759
4674
|
declare const versionSplit: (version: string) => number[];
|
|
4675
|
+
/**
|
|
4676
|
+
* Compares two versions and returns if the version is newer (1), older (-1) or equal (0).
|
|
4677
|
+
* @param {string | number[]} a Version to compare from
|
|
4678
|
+
* @param {string | number[]} b Version to compare with
|
|
4679
|
+
* @returns {number} Returns 1 if newer, -1 if older and 0 if equal
|
|
4680
|
+
*/
|
|
3760
4681
|
declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
|
|
3761
4682
|
|
|
3762
|
-
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"DeviceSession"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"DeviceFirmwareUpdateStatus"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoDRep"> | TypedResponseMessage<"CardanoCVoteRegistrationDelegation"> | TypedResponseMessage<"CardanoCVoteRegistrationParametersType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"DnxTxKey"> | TypedResponseMessage<"DnxComputedKeyImage"> | TypedResponseMessage<"EmmcFile"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMemberOneKey"> | TypedResponseMessage<"EthereumFieldTypeOneKey"> | TypedResponseMessage<"EthereumDefinitions"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessListOneKey"> | TypedResponseMessage<"EthereumAuthorizationOneKey"> | TypedResponseMessage<"EthereumAuthorizationSignature"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"SolanaTxATADetails"> | TypedResponseMessage<"SolanaTxExtraInfo"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"CoinJoinRequest"> | TypedResponseMessage<"PaymentRequestMemo"> | TypedResponseMessage<"TextMemo"> | TypedResponseMessage<"RefundMemo"> | TypedResponseMessage<"CoinPurchaseMemo"> | TypedResponseMessage<"ViewAmount"> | TypedResponseMessage<"ViewDetail"> | TypedResponseMessage<"ViewTip"> | TypedResponseMessage<"DeviceSettings"> | TypedResponseMessage<"DeviceCertificate"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateRecordFields"> | TypedResponseMessage<"DeviceFirmwareUpdateRecord"> | TypedResponseMessage<"DeviceFactoryInfoManufactureTime"> | TypedResponseMessage<"DeviceFactoryInfo"> | TypedResponseMessage<"DeviceFirmwareImageInfo"> | TypedResponseMessage<"DeviceInfoTargets"> | TypedResponseMessage<"DeviceInfoTypes"> | TypedResponseMessage<"DeviceHardwareInfo"> | TypedResponseMessage<"DeviceMainMcuInfo"> | TypedResponseMessage<"DeviceCoprocessorInfo"> | TypedResponseMessage<"DeviceSEInfo"> | TypedResponseMessage<"DeviceStatus"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"UpgradeFileHeader"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataOneKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataStructAckOneKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestOneKey"> | TypedResponseMessage<"EthereumTypedDataValueAckOneKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyOneKey"> | TypedResponseMessage<"EthereumPublicKeyOneKey"> | TypedResponseMessage<"EthereumGetAddressOneKey"> | TypedResponseMessage<"EthereumAddressOneKey"> | TypedResponseMessage<"EthereumSignTxOneKey"> | TypedResponseMessage<"EthereumSignTxEIP1559OneKey"> | TypedResponseMessage<"EthereumSignTxEIP7702OneKey"> | TypedResponseMessage<"EthereumTxRequestOneKey"> | TypedResponseMessage<"EthereumTxAckOneKey"> | TypedResponseMessage<"EthereumSignMessageOneKey"> | TypedResponseMessage<"EthereumMessageSignatureOneKey"> | TypedResponseMessage<"EthereumVerifyMessageOneKey"> | TypedResponseMessage<"EthereumSignTypedHashOneKey"> | TypedResponseMessage<"EthereumTypedDataSignatureOneKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"OnekeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"OnekeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"BlurRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarInvokeHostFunctionOp"> | TypedResponseMessage<"StellarSorobanDataRequest"> | TypedResponseMessage<"StellarSorobanDataAck"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TonSignData"> | TypedResponseMessage<"TonSignedData"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry"> | TypedResponseMessage<"experimental_message"> | TypedResponseMessage<"experimental_field"> | TypedResponseMessage<"TxAckPaymentRequest"> | TypedResponseMessage<"InternalMyAddressRequest"> | TypedResponseMessage<"StartSession"> | TypedResponseMessage<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"SetWallpaper"> | TypedResponseMessage<"GetWallpaper"> | TypedResponseMessage<"Wallpaper"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"ViewSignPage"> | TypedResponseMessage<"ViewVerifyPage"> | TypedResponseMessage<"ProtocolInfoRequest"> | TypedResponseMessage<"ProtocolInfo"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DeviceSettingsGet"> | TypedResponseMessage<"DeviceSettingsSet"> | TypedResponseMessage<"DeviceCertificateWrite"> | TypedResponseMessage<"DeviceCertificateRead"> | TypedResponseMessage<"DeviceCertificateSignature"> | TypedResponseMessage<"DeviceCertificateSign"> | TypedResponseMessage<"DeviceFirmwareUpdateRequest"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusGet"> | TypedResponseMessage<"DeviceFactoryInfoSet"> | TypedResponseMessage<"DeviceFactoryInfoGet"> | TypedResponseMessage<"DeviceFactoryPermanentLock"> | TypedResponseMessage<"DeviceFactoryTest"> | TypedResponseMessage<"DeviceInfoGet"> | TypedResponseMessage<"DeviceSessionGet"> | TypedResponseMessage<"FilesystemPermissionFix"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat">;
|
|
4683
|
+
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<"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">;
|
|
3763
4684
|
|
|
3764
|
-
|
|
4685
|
+
type DeviceFeaturesInput = Features | Messages.Features;
|
|
4686
|
+
|
|
4687
|
+
/**
|
|
4688
|
+
* get device type by features
|
|
4689
|
+
*/
|
|
4690
|
+
declare const getDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
|
|
4691
|
+
/**
|
|
4692
|
+
* get device type by ble name
|
|
4693
|
+
* @param name Ble name
|
|
4694
|
+
*/
|
|
3765
4695
|
declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
declare const
|
|
3771
|
-
|
|
3772
|
-
|
|
3773
|
-
|
|
3774
|
-
declare const
|
|
3775
|
-
|
|
3776
|
-
|
|
4696
|
+
/**
|
|
4697
|
+
* Get Connected Device ble name by features
|
|
4698
|
+
* @returns
|
|
4699
|
+
*/
|
|
4700
|
+
declare const getDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
|
|
4701
|
+
/**
|
|
4702
|
+
* Get Connected Device serial number by features
|
|
4703
|
+
*/
|
|
4704
|
+
declare const getDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
|
|
4705
|
+
/**
|
|
4706
|
+
* @deprecated Use getDeviceSerialNo instead.
|
|
4707
|
+
*/
|
|
4708
|
+
declare const getDeviceUUID: (features?: DeviceFeaturesInput) => string;
|
|
4709
|
+
/**
|
|
4710
|
+
* Get Connected Device label by features
|
|
4711
|
+
*/
|
|
4712
|
+
declare const getDeviceLabel: (features?: DeviceFeaturesInput) => string | null;
|
|
4713
|
+
/**
|
|
4714
|
+
* Get firmware version range by features
|
|
4715
|
+
* Type has a higher priority than Model
|
|
4716
|
+
*/
|
|
4717
|
+
declare const getMethodVersionRange: (features: DeviceFeaturesInput | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
|
|
4718
|
+
declare const getFirmwareType: (features?: DeviceFeaturesInput) => _onekeyfe_hd_shared.EFirmwareType;
|
|
4719
|
+
|
|
4720
|
+
/**
|
|
4721
|
+
* Get Connected Device version by features
|
|
4722
|
+
*/
|
|
4723
|
+
declare const getDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4724
|
+
/**
|
|
4725
|
+
* Get Connected Device bootloader version by features
|
|
4726
|
+
*/
|
|
4727
|
+
declare const getDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4728
|
+
/**
|
|
4729
|
+
* Get Connected Device boardloader/romloader version by features
|
|
4730
|
+
*/
|
|
4731
|
+
declare const getDeviceBoardloaderVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
4732
|
+
/**
|
|
4733
|
+
* Get Connected Device bluetooth firmware version by features
|
|
4734
|
+
*/
|
|
4735
|
+
declare const getDeviceBLEFirmwareVersion: (features?: DeviceFeaturesInput) => IVersionArray;
|
|
3777
4736
|
|
|
3778
4737
|
declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v1", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
|
|
3779
4738
|
type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
|
|
@@ -3781,7 +4740,7 @@ type ProtocolV1MessageSchema = 'v1CurrentSchema' | 'v1LegacySchema';
|
|
|
3781
4740
|
type ProtobufMessageSchema = ProtocolV1MessageSchema | 'v2Schema';
|
|
3782
4741
|
declare class DataManager {
|
|
3783
4742
|
static deviceMap: DeviceTypeMap & {
|
|
3784
|
-
[k: string]: DeviceTypeMap[keyof DeviceTypeMap] | undefined;
|
|
4743
|
+
[k: string]: NonNullable<DeviceTypeMap[keyof DeviceTypeMap]> | undefined;
|
|
3785
4744
|
};
|
|
3786
4745
|
static assets: AssetsMap | null;
|
|
3787
4746
|
static settings: ConnectSettings;
|
|
@@ -3789,12 +4748,21 @@ declare class DataManager {
|
|
|
3789
4748
|
[schema in ProtobufMessageSchema]: JSON;
|
|
3790
4749
|
};
|
|
3791
4750
|
static lastCheckTimestamp: number;
|
|
4751
|
+
static protocolV2ResourcesConfigError: Error | undefined;
|
|
3792
4752
|
static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
|
|
4753
|
+
/**
|
|
4754
|
+
* Touch、Pro System UI Resource Update
|
|
4755
|
+
* ** Interval upgrade is not considered **
|
|
4756
|
+
*/
|
|
3793
4757
|
static getSysResourcesLatestRelease: ({ features, forcedUpdateRes, firmwareType, }: {
|
|
3794
4758
|
features: Features;
|
|
3795
4759
|
forcedUpdateRes?: boolean | undefined;
|
|
3796
4760
|
firmwareType: EFirmwareType;
|
|
3797
4761
|
}) => string | undefined;
|
|
4762
|
+
/**
|
|
4763
|
+
* Touch、Pro System full UI Resource Update
|
|
4764
|
+
* ** Interval upgrade is not considered **
|
|
4765
|
+
*/
|
|
3798
4766
|
static getSysFullResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3799
4767
|
static getBootloaderResource: (features: Features, firmwareType: EFirmwareType) => string | undefined;
|
|
3800
4768
|
static getBootloaderTargetVersion: (features: Features, firmwareType: EFirmwareType) => IVersionArray | undefined;
|
|
@@ -3816,24 +4784,40 @@ declare class DataManager {
|
|
|
3816
4784
|
"en-US": string;
|
|
3817
4785
|
} | undefined;
|
|
3818
4786
|
private static enrichFirmwareReleaseInfo;
|
|
3819
|
-
static load(settings: ConnectSettings): Promise<
|
|
4787
|
+
static load(settings: ConnectSettings): Promise<boolean>;
|
|
4788
|
+
private static applyRemoteConfig;
|
|
3820
4789
|
static updateEnv(newEnv: ConnectSettings['env']): void;
|
|
3821
4790
|
static checkAndReloadData(): Promise<void>;
|
|
4791
|
+
/** Force a fresh remote config before an update is allowed to mutate the device. */
|
|
4792
|
+
static forceReloadData({ requireResources, }?: {
|
|
4793
|
+
requireResources?: boolean;
|
|
4794
|
+
}): Promise<void>;
|
|
4795
|
+
static getProtocolV2ResourceSource(deviceType?: EDeviceType.Pro2 | EDeviceType.Neo): IProtocolV2ResourceSource | undefined;
|
|
3822
4796
|
static getProtobufMessages(schema?: ProtobufMessageSchema): JSON;
|
|
3823
4797
|
static getSettings(key?: undefined): ConnectSettings;
|
|
3824
4798
|
static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
|
|
3825
4799
|
static isBleConnect: (env: ConnectSettings['env']) => boolean;
|
|
4800
|
+
/** Desktop WebUSB doesn't need browser permission prompt */
|
|
3826
4801
|
static isDesktopWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
4802
|
+
/** Browser WebUSB needs permission prompt */
|
|
3827
4803
|
static isBrowserWebUsb: (env: ConnectSettings['env']) => boolean;
|
|
3828
4804
|
}
|
|
3829
4805
|
|
|
3830
|
-
declare const supportInputPinOnSoftware: (features
|
|
4806
|
+
declare const supportInputPinOnSoftware: (features?: Features) => SupportFeatureType;
|
|
4807
|
+
/**
|
|
4808
|
+
* Since 3.5.0, Touch uses the firmware-v3 field to get firmware release info
|
|
4809
|
+
*/
|
|
3831
4810
|
declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, firmwareType, }: {
|
|
3832
4811
|
features: Features;
|
|
3833
4812
|
updateType: 'firmware' | 'ble';
|
|
3834
4813
|
targetVersion?: string | undefined;
|
|
3835
4814
|
firmwareType: EFirmwareType;
|
|
3836
4815
|
}) => 'ble' | IFirmwareField;
|
|
4816
|
+
/**
|
|
4817
|
+
* Returns the optional firmware version
|
|
4818
|
+
* Used in firmware web update
|
|
4819
|
+
* https://firmware.onekey.so/
|
|
4820
|
+
*/
|
|
3837
4821
|
declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('ble' | IFirmwareField)[];
|
|
3838
4822
|
|
|
3839
4823
|
declare function checkNeedUpdateBootForTouch(features: Features, firmwareType: EFirmwareType): boolean;
|
|
@@ -3843,15 +4827,40 @@ declare function checkNeedUpdateBootForClassicAndMini({ features, willUpdateFirm
|
|
|
3843
4827
|
firmwareType: EFirmwareType;
|
|
3844
4828
|
}): boolean;
|
|
3845
4829
|
|
|
4830
|
+
type DeviceSettingsProtocol = 'V1' | 'V2';
|
|
4831
|
+
type DeviceSettingsField = keyof DeviceSettingsParams;
|
|
4832
|
+
declare const DEVICE_SETTINGS_SHARED_FIELDS: readonly ["language", "label", "usePassphrase", "autoLockDelayMs", "autoShutdownDelayMs", "hapticFeedback", "bluetoothEnabled"];
|
|
4833
|
+
declare const DEVICE_SETTINGS_V1_ONLY_FIELDS: readonly ["homescreen", "passphraseSource", "displayRotation", "passphraseAlwaysOnDevice", "safetyChecks", "experimentalFeatures", "changeBrightness"];
|
|
4834
|
+
declare const DEVICE_SETTINGS_V2_ONLY_FIELDS: readonly ["brightness", "airgapMode", "animationEnabled", "tapToWake", "deviceNameDisplayEnabled", "fidoEnabled", "usbLockEnabled", "randomKeypad"];
|
|
4835
|
+
declare const PROTOCOL_V2_NEVER_TIMEOUT_MS = 268435456;
|
|
4836
|
+
declare const normalizeSafetyCheckLevel: (value: SafetyCheckLevel | null | undefined) => Enum_SafetyCheckLevel | null | undefined;
|
|
3846
4837
|
declare const getLanguageConfig: (deviceType: IDeviceType) => Record<string, string>[];
|
|
3847
|
-
type
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
4838
|
+
type DeviceSettingsDurationOption = {
|
|
4839
|
+
label: string;
|
|
4840
|
+
valueMs: number;
|
|
4841
|
+
};
|
|
4842
|
+
type DeviceSettingsValueOption<T> = {
|
|
4843
|
+
label: string;
|
|
4844
|
+
value: T;
|
|
4845
|
+
};
|
|
4846
|
+
declare const getAutoLockOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
|
|
4847
|
+
declare const getAutoShutDownOptions: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsDurationOption[];
|
|
4848
|
+
type DeviceSettingsCapabilities = {
|
|
4849
|
+
protocol: DeviceSettingsProtocol;
|
|
4850
|
+
supportedFields: readonly DeviceSettingsField[];
|
|
4851
|
+
languageOptions: ReadonlyArray<Record<string, string>>;
|
|
4852
|
+
autoLockDelayOptions: readonly DeviceSettingsDurationOption[];
|
|
4853
|
+
autoShutdownDelayOptions: readonly DeviceSettingsDurationOption[];
|
|
4854
|
+
ranges: {
|
|
4855
|
+
brightness?: {
|
|
4856
|
+
min: number;
|
|
4857
|
+
max: number;
|
|
4858
|
+
};
|
|
4859
|
+
};
|
|
4860
|
+
safetyCheckOptions: ReadonlyArray<DeviceSettingsValueOption<Enum_SafetyCheckLevel>>;
|
|
4861
|
+
onDeviceConfirmationFields: readonly DeviceSettingsField[];
|
|
3852
4862
|
};
|
|
3853
|
-
declare const
|
|
3854
|
-
declare const getAutoShutDownOptions: (_deviceType: IDeviceType) => DurationParts[];
|
|
4863
|
+
declare const getDeviceSettingsCapabilities: (deviceType: IDeviceType, protocol: DeviceSettingsProtocol) => DeviceSettingsCapabilities;
|
|
3855
4864
|
|
|
3856
4865
|
declare const getHDPath: (path: string) => Array<number>;
|
|
3857
4866
|
declare const getScriptType: (path: Array<number>) => InputScriptType;
|
|
@@ -3864,6 +4873,10 @@ type SizeConfig = {
|
|
|
3864
4873
|
height: number;
|
|
3865
4874
|
radius?: number;
|
|
3866
4875
|
};
|
|
4876
|
+
declare const getNftSize: ({ deviceType, thumbnail, }: {
|
|
4877
|
+
deviceType: IDeviceType;
|
|
4878
|
+
thumbnail?: boolean | undefined;
|
|
4879
|
+
}) => SizeConfig | undefined;
|
|
3867
4880
|
declare const getHomeScreenSize: ({ deviceType, homeScreenType, thumbnail, }: {
|
|
3868
4881
|
deviceType: IDeviceType;
|
|
3869
4882
|
homeScreenType: 'WallPaper' | 'Nft';
|
|
@@ -3888,8 +4901,43 @@ declare const getEnv: () => "web" | "webextension" | "electron" | "react-native"
|
|
|
3888
4901
|
declare const corsValidator: (url?: string) => string | undefined;
|
|
3889
4902
|
declare const parseConnectSettings: (input?: Partial<ConnectSettings>) => ConnectSettings;
|
|
3890
4903
|
|
|
4904
|
+
type StoredDeviceState = DeviceState & {
|
|
4905
|
+
raw?: DeviceFeaturesRaw;
|
|
4906
|
+
};
|
|
4907
|
+
declare const projectFeatures: (state: StoredDeviceState) => Features;
|
|
4908
|
+
|
|
4909
|
+
/**
|
|
4910
|
+
* Read the protocol contract from the same method instance used by the Core dispatcher.
|
|
4911
|
+
* Passing a payload initializes the method first so parameter-dependent contracts, such
|
|
4912
|
+
* as Bitcoin fork support, are evaluated with the actual request.
|
|
4913
|
+
*/
|
|
4914
|
+
declare function getMethodSupportedProtocols(method: string, payload?: Record<string, unknown>): readonly ProtocolType[];
|
|
4915
|
+
|
|
4916
|
+
declare function parseProtocolV2ResourceManifest(value: unknown): IProtocolV2ResourceManifest;
|
|
4917
|
+
declare function selectProtocolV2ResourceManifestFiles({ manifest, targetsToUpdate, }: {
|
|
4918
|
+
manifest: IProtocolV2ResourceManifest;
|
|
4919
|
+
targetsToUpdate: readonly FirmwareUpdateV4Target[];
|
|
4920
|
+
}): IProtocolV2ResourceManifestFile[];
|
|
4921
|
+
declare function prepareProtocolV2ResourceFiles({ manifest: value, files, targetsToUpdate, }: {
|
|
4922
|
+
manifest: unknown;
|
|
4923
|
+
files: Array<{
|
|
4924
|
+
archivePath: string;
|
|
4925
|
+
binary: ArrayBuffer;
|
|
4926
|
+
}>;
|
|
4927
|
+
targetsToUpdate: readonly FirmwareUpdateV4Target[];
|
|
4928
|
+
}): Array<{
|
|
4929
|
+
binary: ArrayBuffer;
|
|
4930
|
+
devicePath: string;
|
|
4931
|
+
size: number;
|
|
4932
|
+
fileHash: string;
|
|
4933
|
+
}>;
|
|
4934
|
+
|
|
4935
|
+
declare const registerFirmwareUpdateHostBinding: (binding: FirmwareUpdateHostBinding) => number;
|
|
4936
|
+
declare const unregisterFirmwareUpdateHostBinding: (generation?: number) => boolean;
|
|
4937
|
+
declare const getFirmwareUpdateHostBindingGeneration: () => number;
|
|
4938
|
+
|
|
3891
4939
|
declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, updateSettings, switchTransport, }: InjectApi) => CoreApi;
|
|
3892
4940
|
declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
|
|
3893
4941
|
declare const HardwareTopLevelSdk: () => CoreApi;
|
|
3894
4942
|
|
|
3895
|
-
export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllFirmwareRelease, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceInfoMode, DeviceInfoProtocol, DeviceInfoScope, DeviceInfoSource, DeviceInfoStatus, DeviceModelToTypes, DeviceProfile, DeviceProfileRaw, DeviceProfileVerify, DeviceProfileVersions, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4Params, GetDeviceInfoParams, GetPassphraseStateParams, GetPassphraseStatePayload, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceManifest, IProtocolV2ResourceManifestPackage, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, OnekeyFeatures, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, RequestContext, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SdkTracingContext, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TonAddress, TonGetAddressParams, TonSignDataParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceForSwitchFirmwareWebDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceForSwitchFirmwareWebDevice, UiResponseSelectDeviceInBootloaderForWebDevice, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, cleanupSdkInstance, completeRequestContext, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createRequestContext, createResponseMessage, createSdkTracingContext, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, executeCallback, formatRequestContext, generateInstanceId, generateSdkInstanceId, getActiveRequestsByDeviceInstance, getAutoLockOptions, getAutoShutDownOptions, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLanguageConfig, getLog, getLogBlockLabel, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init$1 as initCore, isBleConnect, isMethodVersionRangeUnsupported, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
|
|
4943
|
+
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_SHARED_FIELDS, DEVICE_SETTINGS_V1_ONLY_FIELDS, DEVICE_SETTINGS_V2_ONLY_FIELDS, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesMode, DeviceFeaturesPayload, DeviceFeaturesProtocol, DeviceFeaturesRaw, DeviceFeaturesRawPatch, DeviceFeaturesVerify, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendState, DeviceSendSupportFeatures, DeviceSettingsCapabilities, DeviceSettingsDurationOption, DeviceSettingsField, DeviceSettingsParams, DeviceSettingsProtocol, DeviceSettingsValueOption, DeviceState, DeviceStateEvent, DeviceStateIdentity, DeviceStateMode, DeviceStatePatch, DeviceStateProtocol, DeviceStateScope, DeviceStateSection, DeviceStateSecurityElement, DeviceStateSecurityElements, DeviceStateSecurityElementsPatch, DeviceStateSettings, DeviceStateStatus, DeviceStateUpdateSource, DeviceStateVersions, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUnlockParams, DeviceUploadResourceParams, DeviceUploadResourceResponse, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EOneKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareArtifactReader, FirmwareArtifactReference, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareReleaseCheckResult, FirmwareTip, FirmwareUpdateArtifactParams, FirmwareUpdateBinaryParams, FirmwareUpdateCapabilities, FirmwareUpdateHostBinding, FirmwareUpdateParams, FirmwareUpdatePlan, FirmwareUpdatePlanArtifact, FirmwareUpdatePlanArtifactRole, FirmwareUpdatePlanForceTarget, FirmwareUpdatePlanTarget, FirmwareUpdatePreparedArtifact, FirmwareUpdatePreparedArtifactInput, FirmwareUpdatePreparedEntry, FirmwareUpdatePreparedPlan, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, FirmwareUpdateV4Params, FirmwareUpdateV4Target, GetDeviceStateParams, GetPassphraseStateParams, HardwareSDKLowLevel, HardwareTopLevelSdk, HardwareUiInteractionMeta, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, IProtocolV2FirmwareComponent, IProtocolV2FirmwareComponentTarget, IProtocolV2ResourceBundle, 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, ProtocolV2PreparedResourceFile, ProtocolV2ResourceManifestBinary, 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, prepareProtocolV2ResourceFiles, projectFeatures as projectDeviceStateFeatures, registerFirmwareUpdateHostBinding, safeThrowError, selectProtocolV2ResourceManifestFiles, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, unregisterFirmwareUpdateHostBinding, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
|