@onekeyfe/hd-core 1.1.27-patch.1 → 1.2.0-alpha.0
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__/evmLedgerLegacySafety.test.ts +15 -4
- package/__tests__/evmSignTransaction.test.ts +1 -1
- package/__tests__/evmSignTypedData.test.ts +1 -1
- package/__tests__/logBlockEvent.test.ts +37 -0
- package/__tests__/protocol-v2.test.ts +3025 -0
- package/dist/api/BaseMethod.d.ts +1 -0
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/DirList.d.ts +10 -0
- package/dist/api/DirList.d.ts.map +1 -0
- package/dist/api/DirMake.d.ts +9 -0
- package/dist/api/DirMake.d.ts.map +1 -0
- package/dist/api/DirRemove.d.ts +9 -0
- package/dist/api/DirRemove.d.ts.map +1 -0
- package/dist/api/FileDelete.d.ts +9 -0
- package/dist/api/FileDelete.d.ts.map +1 -0
- package/dist/api/FileRead.d.ts +19 -0
- package/dist/api/FileRead.d.ts.map +1 -0
- package/dist/api/FileWrite.d.ts +24 -0
- package/dist/api/FileWrite.d.ts.map +1 -0
- package/dist/api/FirmwareUpdate.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV3.d.ts +1 -0
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +35 -0
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -0
- package/dist/api/GetDeviceInfo.d.ts +9 -0
- package/dist/api/GetDeviceInfo.d.ts.map +1 -0
- package/dist/api/GetFeatures.d.ts.map +1 -1
- package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
- package/dist/api/GetPassphraseState.d.ts +6 -1
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/PathInfo.d.ts +10 -0
- package/dist/api/PathInfo.d.ts.map +1 -0
- package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
- package/dist/api/SearchDevices.d.ts +2 -1
- package/dist/api/SearchDevices.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumGetAddress.d.ts +2 -6
- package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignMessage.d.ts +2 -5
- package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts +5 -8
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetAddress.d.ts +2 -9
- package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts +2 -9
- package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts +2 -8
- package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts +2 -8
- package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCGetAddress.d.ts +1 -11
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts +1 -11
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts +1 -15
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
- package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
- package/dist/api/btc/BTCSignTransaction.d.ts +1 -11
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts +1 -11
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
- package/dist/api/btc/helpers/versionLimit.d.ts +2 -11
- package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
- package/dist/api/device/DeviceLock.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
- package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
- package/dist/api/device/DeviceUploadResource.d.ts.map +1 -1
- package/dist/api/device/DeviceVerify.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/EVMGetPublicKey.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessageEIP712.d.ts +2 -8
- package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
- package/dist/api/evm/latest/signTypedData.d.ts +1 -1
- package/dist/api/evm/latest/signTypedData.d.ts.map +1 -1
- package/dist/api/evm/latest/signTypedHash.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/getAddress.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/getPublicKey.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/signMessage.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/signTypedData.d.ts +1 -1
- package/dist/api/evm/legacyV1/signTypedData.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/signTypedHash.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/verifyMessage.d.ts.map +1 -1
- package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
- package/dist/api/helpers/batchGetPublickeys.d.ts +3 -0
- package/dist/api/helpers/batchGetPublickeys.d.ts.map +1 -1
- package/dist/api/helpers/filesystemValidation.d.ts +7 -0
- package/dist/api/helpers/filesystemValidation.d.ts.map +1 -0
- package/dist/api/index.d.ts +32 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
- package/dist/api/lightning/LnurlAuth.d.ts +4 -0
- package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
- package/dist/api/neo/NeoGetAddress.d.ts +2 -8
- package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
- package/dist/api/neo/NeoSignTransaction.d.ts +2 -8
- package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
- package/dist/api/nervos/NervosGetAddress.d.ts +2 -9
- package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
- package/dist/api/nervos/NervosSignTransaction.d.ts +9 -12
- package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
- package/dist/api/nexa/NexaGetAddress.d.ts +2 -8
- package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
- package/dist/api/nexa/NexaSignTransaction.d.ts +2 -9
- package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
- package/dist/api/polkadot/PolkadotGetAddress.d.ts +3 -0
- package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
- package/dist/api/polkadot/networks.d.ts +3 -0
- package/dist/api/polkadot/networks.d.ts.map +1 -1
- package/dist/api/protocol-v2/DevReboot.d.ts +7 -0
- package/dist/api/protocol-v2/DevReboot.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts +29 -0
- package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +6 -0
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +6 -0
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceReboot.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -0
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts +7 -0
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts.map +1 -0
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts +6 -0
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +13 -0
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts +6 -0
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts +6 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -0
- package/dist/api/protocol-v2/GetProtoVersion.d.ts +6 -0
- package/dist/api/protocol-v2/GetProtoVersion.d.ts.map +1 -0
- package/dist/api/protocol-v2/Ping.d.ts +8 -0
- package/dist/api/protocol-v2/Ping.d.ts.map +1 -0
- package/dist/api/protocol-v2/helpers.d.ts +34 -0
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -0
- package/dist/api/scdo/ScdoGetAddress.d.ts +2 -6
- package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignMessage.d.ts +2 -5
- package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignTransaction.d.ts +2 -5
- 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 +3 -0
- package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts +3 -0
- package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignTransaction.d.ts +6 -0
- package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
- package/dist/api/stellar/StellarGetAddress.d.ts +2 -1
- package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts +3 -2
- package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
- package/dist/api/sui/SuiGetAddress.d.ts +3 -0
- package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
- package/dist/api/sui/SuiGetPublicKey.d.ts +3 -0
- package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
- package/dist/api/sui/SuiSignMessage.d.ts +3 -0
- package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
- package/dist/api/sui/SuiSignTransaction.d.ts +5 -2
- package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
- package/dist/api/ton/TonGetAddress.d.ts +3 -0
- package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
- package/dist/api/ton/TonSignData.d.ts +5 -0
- package/dist/api/ton/TonSignData.d.ts.map +1 -1
- package/dist/api/ton/TonSignMessage.d.ts +3 -0
- package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
- package/dist/api/ton/TonSignProof.d.ts +3 -0
- package/dist/api/ton/TonSignProof.d.ts.map +1 -1
- package/dist/api/tron/TronSignMessage.d.ts +4 -0
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts +4 -0
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +7 -4
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/data-manager/MessagesConfig.d.ts +2 -2
- package/dist/data-manager/MessagesConfig.d.ts.map +1 -1
- package/dist/data-manager/TransportManager.d.ts +5 -4
- package/dist/data-manager/TransportManager.d.ts.map +1 -1
- package/dist/device/Device.d.ts +36 -10
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +9 -9
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DeviceConnector.d.ts +2 -1
- package/dist/device/DeviceConnector.d.ts.map +1 -1
- package/dist/deviceProfile/buildDeviceProfile.d.ts +22 -0
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +1 -0
- package/dist/deviceProfile/index.d.ts +3 -0
- package/dist/deviceProfile/index.d.ts.map +1 -0
- package/dist/deviceProfile/legacyFeaturesView.d.ts +5 -0
- package/dist/deviceProfile/legacyFeaturesView.d.ts.map +1 -0
- package/dist/events/logBlockEvent.d.ts +1 -0
- package/dist/events/logBlockEvent.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +8 -0
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +720 -382
- package/dist/index.js +17634 -1201
- package/dist/inject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/features.d.ts +93 -0
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/firmware.d.ts +13 -0
- package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/index.d.ts +4 -0
- package/dist/protocols/protocol-v2/index.d.ts.map +1 -0
- package/dist/types/api/export.d.ts +1 -1
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +27 -0
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/getDeviceInfo.d.ts +85 -0
- package/dist/types/api/getDeviceInfo.d.ts.map +1 -0
- package/dist/types/api/getPassphraseState.d.ts +10 -1
- package/dist/types/api/getPassphraseState.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +37 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/protocolV2.d.ts +103 -0
- package/dist/types/api/protocolV2.d.ts.map +1 -0
- package/dist/types/api/searchDevices.d.ts +2 -2
- package/dist/types/api/searchDevices.d.ts.map +1 -1
- package/dist/types/device.d.ts +10 -3
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/params.d.ts +2 -0
- package/dist/types/params.d.ts.map +1 -1
- package/dist/types/settings.d.ts +1 -1
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts +6 -8
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts +1 -0
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/BaseMethod.ts +26 -22
- package/src/api/DirList.ts +31 -0
- package/src/api/DirMake.ts +23 -0
- package/src/api/DirRemove.ts +23 -0
- package/src/api/FileDelete.ts +23 -0
- package/src/api/FileRead.ts +167 -0
- package/src/api/FileWrite.ts +216 -0
- package/src/api/FirmwareUpdate.ts +13 -5
- package/src/api/FirmwareUpdateV2.ts +21 -25
- package/src/api/FirmwareUpdateV3.ts +17 -4
- package/src/api/FirmwareUpdateV4.ts +827 -0
- package/src/api/GetDeviceInfo.ts +152 -0
- package/src/api/GetFeatures.ts +5 -2
- package/src/api/GetOnekeyFeatures.ts +95 -3
- package/src/api/GetPassphraseState.ts +16 -10
- package/src/api/PathInfo.ts +39 -0
- package/src/api/PromptWebDeviceAccess.ts +11 -1
- package/src/api/SearchDevices.ts +7 -2
- package/src/api/alephium/AlephiumGetAddress.ts +6 -2
- package/src/api/alephium/AlephiumSignMessage.ts +6 -1
- package/src/api/alephium/AlephiumSignTransaction.ts +15 -4
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +21 -13
- package/src/api/aptos/AptosGetAddress.ts +2 -3
- package/src/api/benfen/BenfenGetAddress.ts +11 -7
- package/src/api/benfen/BenfenGetPublicKey.ts +6 -2
- package/src/api/benfen/BenfenSignMessage.ts +6 -1
- package/src/api/benfen/BenfenSignTransaction.ts +6 -1
- package/src/api/btc/BTCGetPublicKey.ts +3 -2
- package/src/api/btc/BTCSignPsbt.ts +1 -2
- package/src/api/btc/helpers/versionLimit.ts +7 -1
- package/src/api/cardano/CardanoSignTransaction.ts +2 -4
- package/src/api/conflux/ConfluxSignTransaction.ts +5 -2
- package/src/api/device/DeviceFullyUploadResource.ts +3 -3
- package/src/api/device/DeviceLock.ts +1 -3
- package/src/api/device/DeviceRebootToBoardloader.ts +10 -1
- package/src/api/device/DeviceRebootToBootloader.ts +10 -1
- package/src/api/device/DeviceSupportFeatures.ts +2 -13
- package/src/api/device/DeviceUpdateBootloader.ts +4 -4
- package/src/api/device/DeviceUploadResource.ts +4 -5
- package/src/api/device/DeviceVerify.ts +1 -2
- package/src/api/dynex/DnxGetAddress.ts +6 -0
- package/src/api/dynex/DnxSignTransaction.ts +6 -0
- package/src/api/evm/EVMGetAddress.ts +1 -1
- package/src/api/evm/EVMGetPublicKey.ts +3 -4
- package/src/api/evm/EVMSignMessage.ts +1 -1
- package/src/api/evm/EVMSignMessageEIP712.ts +14 -1
- package/src/api/evm/EVMSignTransaction.ts +1 -1
- package/src/api/evm/EVMSignTypedData.ts +32 -18
- package/src/api/evm/EVMVerifyMessage.ts +1 -1
- package/src/api/evm/latest/signTypedHash.ts +2 -4
- package/src/api/evm/legacyV1/getAddress.ts +5 -3
- package/src/api/evm/legacyV1/getPublicKey.ts +5 -3
- package/src/api/evm/legacyV1/signMessage.ts +5 -3
- package/src/api/evm/legacyV1/signTypedData.ts +9 -8
- package/src/api/evm/legacyV1/signTypedHash.ts +7 -7
- package/src/api/evm/legacyV1/verifyMessage.ts +5 -3
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +8 -8
- package/src/api/firmware/uploadFirmware.ts +3 -10
- package/src/api/helpers/batchGetPublickeys.ts +51 -6
- package/src/api/helpers/filesystemValidation.ts +51 -0
- package/src/api/index.ts +34 -0
- package/src/api/kaspa/KaspaSignTransaction.ts +4 -5
- package/src/api/lightning/LnurlAuth.ts +4 -0
- package/src/api/neo/NeoGetAddress.ts +6 -1
- package/src/api/neo/NeoSignTransaction.ts +6 -1
- package/src/api/nervos/NervosGetAddress.ts +6 -2
- package/src/api/nervos/NervosSignTransaction.ts +14 -4
- package/src/api/nexa/NexaGetAddress.ts +6 -2
- package/src/api/nexa/NexaSignTransaction.ts +11 -12
- package/src/api/polkadot/networks.ts +9 -0
- package/src/api/protocol-v2/DevReboot.ts +24 -0
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +63 -0
- package/src/api/protocol-v2/DeviceGetDeviceInfo.ts +118 -0
- package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +20 -0
- package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +16 -0
- package/src/api/protocol-v2/DeviceReboot.ts +24 -0
- package/src/api/protocol-v2/FactoryDeviceInfoSettings.ts +29 -0
- package/src/api/protocol-v2/FactoryGetDeviceInfo.ts +20 -0
- package/src/api/protocol-v2/FilesystemDiskControl.ts +50 -0
- package/src/api/protocol-v2/FilesystemFixPermission.ts +16 -0
- package/src/api/protocol-v2/FilesystemFormat.ts +16 -0
- package/src/api/protocol-v2/GetProtoVersion.ts +16 -0
- package/src/api/protocol-v2/Ping.ts +18 -0
- package/src/api/protocol-v2/helpers.ts +207 -0
- package/src/api/scdo/ScdoGetAddress.ts +6 -2
- package/src/api/scdo/ScdoSignMessage.ts +6 -1
- package/src/api/scdo/ScdoSignTransaction.ts +6 -2
- package/src/api/solana/SolGetAddress.ts +4 -0
- package/src/api/solana/SolSignMessage.ts +3 -0
- package/src/api/solana/SolSignOffchainMessage.ts +3 -0
- package/src/api/solana/SolSignTransaction.ts +6 -0
- package/src/api/stellar/StellarGetAddress.ts +10 -1
- package/src/api/stellar/StellarSignTransaction.ts +14 -1
- package/src/api/sui/SuiGetAddress.ts +5 -3
- package/src/api/sui/SuiGetPublicKey.ts +3 -0
- package/src/api/sui/SuiSignMessage.ts +3 -0
- package/src/api/sui/SuiSignTransaction.ts +14 -12
- package/src/api/ton/TonGetAddress.ts +3 -0
- package/src/api/ton/TonSignData.ts +10 -3
- package/src/api/ton/TonSignMessage.ts +6 -5
- package/src/api/ton/TonSignProof.ts +3 -0
- package/src/api/tron/TronSignMessage.ts +5 -1
- package/src/api/tron/TronSignTransaction.ts +4 -0
- package/src/api/xrp/XrpSignTransaction.ts +1 -1
- package/src/core/index.ts +87 -55
- package/src/data/messages/messages-protocol-v2.json +13369 -0
- package/src/data-manager/DataManager.ts +12 -7
- package/src/data-manager/MessagesConfig.ts +14 -14
- package/src/data-manager/TransportManager.ts +38 -12
- package/src/device/Device.ts +538 -61
- package/src/device/DeviceCommands.ts +195 -29
- package/src/device/DeviceConnector.ts +29 -4
- package/src/device/DevicePool.ts +7 -7
- package/src/deviceProfile/buildDeviceProfile.ts +387 -0
- package/src/deviceProfile/index.ts +2 -0
- package/src/deviceProfile/legacyFeaturesView.ts +123 -0
- package/src/events/logBlockEvent.ts +23 -0
- package/src/events/ui-request.ts +8 -0
- package/src/inject.ts +52 -1
- package/src/protocols/protocol-v2/features.ts +180 -0
- package/src/protocols/protocol-v2/firmware.ts +43 -0
- package/src/protocols/protocol-v2/index.ts +16 -0
- package/src/types/api/export.ts +1 -0
- package/src/types/api/firmwareUpdate.ts +49 -0
- package/src/types/api/getDeviceInfo.ts +99 -0
- package/src/types/api/getPassphraseState.ts +13 -2
- package/src/types/api/index.ts +88 -1
- package/src/types/api/protocolV2.ts +201 -0
- package/src/types/api/searchDevices.ts +2 -2
- package/src/types/device.ts +37 -3
- package/src/types/params.ts +7 -0
- package/src/types/settings.ts +1 -1
- package/src/utils/deviceFeaturesUtils.ts +70 -70
- package/src/utils/deviceInfoUtils.ts +15 -8
- package/src/utils/index.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import EventEmitter
|
|
1
|
+
import EventEmitter, { EventEmitter as EventEmitter$1 } from 'events';
|
|
2
2
|
import * as _onekeyfe_hd_transport from '@onekeyfe/hd-transport';
|
|
3
|
-
import {
|
|
3
|
+
import { DevFirmwareTargetType, DevRebootType, DeviceRebootType, DevFirmwareTarget, Messages, Transport, TransportCallOptions, OneKeyDeviceInfo, OneKeyDeviceCommType, ProtocolType, ProtocolV2DeviceInfo, Success as Success$1, LowlevelTransportSharedPlugin, ProtoVersion, OnboardingStatus, DevFirmwareUpdateStatus, DeviceFirmwareUpdateStatus, FactoryDeviceInfo, Features as Features$1, RecoveryDeviceType, SafetyCheckLevel, 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, ChangeOutputScriptType } from '@onekeyfe/hd-transport';
|
|
4
4
|
export { Messages as PROTO, TonSignDataType } from '@onekeyfe/hd-transport';
|
|
5
|
-
import
|
|
5
|
+
import * as _onekeyfe_hd_shared from '@onekeyfe/hd-shared';
|
|
6
|
+
import { HardwareConnectProtocol, EFirmwareType, EDeviceType, Deferred } from '@onekeyfe/hd-shared';
|
|
6
7
|
|
|
7
8
|
interface CommonParams {
|
|
8
9
|
keepSession?: boolean;
|
|
@@ -18,6 +19,7 @@ interface CommonParams {
|
|
|
18
19
|
skipPassphraseCheck?: boolean;
|
|
19
20
|
onlyConnectBleDevice?: boolean;
|
|
20
21
|
usePreInitialize?: boolean;
|
|
22
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
21
23
|
}
|
|
22
24
|
type Params<T> = CommonParams & T & {
|
|
23
25
|
bundle?: undefined;
|
|
@@ -37,27 +39,219 @@ type Response<T> = Promise<Success<T> | Unsuccessful>;
|
|
|
37
39
|
|
|
38
40
|
declare const safeThrowError: (error: any) => never;
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
type RebootTypeInput = DevRebootType | DeviceRebootType | keyof typeof DevRebootType | keyof typeof DeviceRebootType | string | number;
|
|
43
|
+
type DeviceRebootParams = {
|
|
44
|
+
rebootType?: RebootTypeInput;
|
|
45
|
+
reboot_type?: RebootTypeInput;
|
|
46
|
+
};
|
|
47
|
+
type DeviceFirmwareTargetInput = DevFirmwareTarget | {
|
|
48
|
+
targetId?: DevFirmwareTargetType | string | number;
|
|
49
|
+
target_id?: DevFirmwareTargetType | string | number;
|
|
50
|
+
path: string;
|
|
51
|
+
};
|
|
52
|
+
type DeviceFirmwareUpdateParams = {
|
|
53
|
+
targets?: DeviceFirmwareTargetInput[];
|
|
54
|
+
targetId?: DevFirmwareTargetType | string | number;
|
|
55
|
+
target_id?: DevFirmwareTargetType | string | number;
|
|
56
|
+
path?: string;
|
|
57
|
+
};
|
|
58
|
+
type FactoryDeviceInfoSettingsParams = {
|
|
59
|
+
serial_no?: string;
|
|
60
|
+
serialNo?: string;
|
|
61
|
+
cpu_info?: string;
|
|
62
|
+
cpuInfo?: string;
|
|
63
|
+
pre_firmware?: string;
|
|
64
|
+
preFirmware?: string;
|
|
65
|
+
};
|
|
43
66
|
|
|
44
|
-
|
|
67
|
+
type PassphrasePromptResponse = {
|
|
68
|
+
passphrase?: string;
|
|
69
|
+
passphraseOnDevice?: boolean;
|
|
70
|
+
attachPinOnDevice?: boolean;
|
|
71
|
+
cache?: boolean;
|
|
72
|
+
};
|
|
73
|
+
type MessageType = Messages.MessageType;
|
|
74
|
+
type MessageKey = Extract<keyof MessageType, string>;
|
|
75
|
+
type TypedResponseMessage<T extends MessageKey> = {
|
|
76
|
+
type: T;
|
|
77
|
+
message: MessageType[T];
|
|
78
|
+
};
|
|
79
|
+
type TypedCallResponseMap = {
|
|
80
|
+
[K in MessageKey]: TypedResponseMessage<K>;
|
|
81
|
+
};
|
|
82
|
+
type DefaultMessageResponse = TypedCallResponseMap[MessageKey];
|
|
83
|
+
declare class DeviceCommands {
|
|
84
|
+
instanceId: string;
|
|
85
|
+
currentResponseID?: number;
|
|
86
|
+
device: Device;
|
|
87
|
+
transport: Transport;
|
|
88
|
+
mainId: string;
|
|
89
|
+
disposed: boolean;
|
|
90
|
+
callPromise?: Promise<DefaultMessageResponse>;
|
|
91
|
+
constructor(device: Device, mainId: string);
|
|
92
|
+
dispose(_cancelRequest: boolean): Promise<void>;
|
|
93
|
+
checkDisposed(): void;
|
|
94
|
+
cancelDeviceOnOneKeyDevice(): Promise<{
|
|
95
|
+
readonly success: false;
|
|
96
|
+
readonly error: 800;
|
|
97
|
+
readonly payload: {
|
|
98
|
+
readonly message: "Device disconnected or acquired by someone else";
|
|
99
|
+
};
|
|
100
|
+
} | {
|
|
101
|
+
success: boolean;
|
|
102
|
+
error: null;
|
|
103
|
+
payload: {
|
|
104
|
+
message: string;
|
|
105
|
+
};
|
|
106
|
+
} | {
|
|
107
|
+
success: boolean;
|
|
108
|
+
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;
|
|
109
|
+
payload: {
|
|
110
|
+
message: string;
|
|
111
|
+
};
|
|
112
|
+
} | undefined>;
|
|
113
|
+
cancelDevice(): Promise<{
|
|
114
|
+
readonly success: false;
|
|
115
|
+
readonly error: 800;
|
|
116
|
+
readonly payload: {
|
|
117
|
+
readonly message: "Device disconnected or acquired by someone else";
|
|
118
|
+
};
|
|
119
|
+
} | {
|
|
120
|
+
success: boolean;
|
|
121
|
+
error: null;
|
|
122
|
+
payload: {
|
|
123
|
+
message: string;
|
|
124
|
+
};
|
|
125
|
+
} | {
|
|
126
|
+
success: boolean;
|
|
127
|
+
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;
|
|
128
|
+
payload: {
|
|
129
|
+
message: string;
|
|
130
|
+
};
|
|
131
|
+
} | undefined>;
|
|
132
|
+
cancel(): Promise<void>;
|
|
133
|
+
call(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
134
|
+
typedCall<T extends MessageKey, R extends MessageKey[]>(type: T, resType: R, msg?: MessageType[T], options?: TransportCallOptions): Promise<TypedCallResponseMap[R[number]]>;
|
|
135
|
+
typedCall<T extends MessageKey, R extends MessageKey>(type: T, resType: R, msg?: MessageType[T], options?: TransportCallOptions): Promise<TypedResponseMessage<R>>;
|
|
136
|
+
_commonCall(type: MessageKey, msg?: DefaultMessageResponse['message'], options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
137
|
+
_filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey, options?: TransportCallOptions): Promise<DefaultMessageResponse>;
|
|
138
|
+
_promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
|
|
139
|
+
_promptPassphrase(options: PassphraseRequestPayload): Promise<PassphrasePromptResponse>;
|
|
140
|
+
}
|
|
45
141
|
|
|
46
|
-
type
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
142
|
+
type DeviceDescriptorDiff = {
|
|
143
|
+
didUpdate: boolean;
|
|
144
|
+
connected: OneKeyDeviceInfo[];
|
|
145
|
+
disconnected: OneKeyDeviceInfo[];
|
|
146
|
+
changedSessions: OneKeyDeviceInfo[];
|
|
147
|
+
changedDebugSessions: OneKeyDeviceInfo[];
|
|
148
|
+
acquired: OneKeyDeviceInfo[];
|
|
149
|
+
debugAcquired: OneKeyDeviceInfo[];
|
|
150
|
+
released: OneKeyDeviceInfo[];
|
|
151
|
+
debugReleased: OneKeyDeviceInfo[];
|
|
152
|
+
descriptors: OneKeyDeviceInfo[];
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
declare class DeviceConnector {
|
|
156
|
+
transport: Transport;
|
|
157
|
+
listenTimestamp: number;
|
|
158
|
+
current: OneKeyDeviceInfo[] | null;
|
|
159
|
+
upcoming: OneKeyDeviceInfo[];
|
|
160
|
+
listening: boolean;
|
|
161
|
+
constructor();
|
|
162
|
+
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
163
|
+
listen(): Promise<void>;
|
|
164
|
+
stop(): void;
|
|
165
|
+
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean, connectProtocol?: HardwareConnectProtocol): Promise<string | undefined>;
|
|
166
|
+
release(session: string, onclose: boolean): Promise<void>;
|
|
167
|
+
disconnect(session: string | undefined | null): Promise<void>;
|
|
168
|
+
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
169
|
+
_reportDevicesChange(): void;
|
|
57
170
|
}
|
|
58
|
-
|
|
59
|
-
|
|
171
|
+
|
|
172
|
+
type transportEnv = 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'desktop-webusb' | 'desktop-web-ble' | 'emulator' | 'lowlevel' | 'node-usb';
|
|
173
|
+
type ConnectSettings = {
|
|
174
|
+
connectSrc?: string;
|
|
175
|
+
debug?: boolean;
|
|
176
|
+
transportReconnect?: boolean;
|
|
177
|
+
lazyLoad?: boolean;
|
|
178
|
+
origin?: string;
|
|
179
|
+
parentOrigin?: string;
|
|
180
|
+
configSrc: string;
|
|
181
|
+
iframeSrc: string;
|
|
182
|
+
version: string;
|
|
183
|
+
priority: number;
|
|
184
|
+
trustedHost: boolean;
|
|
185
|
+
supportedBrowser?: boolean;
|
|
186
|
+
env: transportEnv;
|
|
187
|
+
timestamp: number;
|
|
188
|
+
isFrame?: boolean;
|
|
189
|
+
preRelease?: boolean;
|
|
190
|
+
fetchConfig?: boolean;
|
|
191
|
+
extension?: string;
|
|
192
|
+
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
193
|
+
};
|
|
194
|
+
type IVersionArray = [number, number, number];
|
|
195
|
+
type ILocale = 'zh-CN' | 'en-US';
|
|
196
|
+
type IFirmwareReleaseInfo = {
|
|
197
|
+
required: boolean;
|
|
198
|
+
url: string;
|
|
199
|
+
firmwareType?: EFirmwareType;
|
|
200
|
+
resource?: string;
|
|
201
|
+
fullResource?: string;
|
|
202
|
+
fullResourceRange?: string[];
|
|
203
|
+
bootloaderResource?: string;
|
|
204
|
+
bootloaderVersion?: IVersionArray;
|
|
205
|
+
displayBootloaderVersion?: IVersionArray;
|
|
206
|
+
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
207
|
+
bootloaderChangelog?: {
|
|
208
|
+
[k in ILocale]: string;
|
|
209
|
+
};
|
|
210
|
+
fingerprint: string;
|
|
211
|
+
version: IVersionArray;
|
|
212
|
+
changelog: {
|
|
213
|
+
[k in ILocale]: string;
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
type IBLEFirmwareReleaseInfo = {
|
|
217
|
+
required: boolean;
|
|
218
|
+
url: string;
|
|
219
|
+
webUpdate: string;
|
|
220
|
+
fingerprint: string;
|
|
221
|
+
fingerprintWeb: string;
|
|
222
|
+
version: IVersionArray;
|
|
223
|
+
changelog: {
|
|
224
|
+
[k in ILocale]: string;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
type IKnownDevice = Exclude<IDeviceType, 'unknown' | 'pro2'>;
|
|
228
|
+
type DeviceTypeMap = {
|
|
229
|
+
[k in IKnownDevice]: {
|
|
230
|
+
firmware: IFirmwareReleaseInfo[];
|
|
231
|
+
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
232
|
+
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
233
|
+
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
234
|
+
ble: IBLEFirmwareReleaseInfo[];
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
type AssetsMap = {
|
|
238
|
+
bridge: {
|
|
239
|
+
version: IVersionArray;
|
|
240
|
+
linux32Rpm: string;
|
|
241
|
+
linux64Rpm: string;
|
|
242
|
+
linux32Deb: string;
|
|
243
|
+
linux64Deb: string;
|
|
244
|
+
win: string;
|
|
245
|
+
mac: string;
|
|
246
|
+
sha256sumAsc: string;
|
|
247
|
+
changelog: {
|
|
248
|
+
[k in ILocale]: string;
|
|
249
|
+
};
|
|
250
|
+
};
|
|
60
251
|
};
|
|
252
|
+
type RemoteConfigResponse = {
|
|
253
|
+
bridge: AssetsMap['bridge'];
|
|
254
|
+
} & DeviceTypeMap;
|
|
61
255
|
|
|
62
256
|
type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
63
257
|
declare enum EOneKeyDeviceMode {
|
|
@@ -82,7 +276,9 @@ type KnownDevice = {
|
|
|
82
276
|
name: string;
|
|
83
277
|
error?: typeof undefined;
|
|
84
278
|
mode: EOneKeyDeviceMode;
|
|
85
|
-
|
|
279
|
+
profile?: DeviceProfile;
|
|
280
|
+
features?: Messages.Features;
|
|
281
|
+
sessionId?: string | null;
|
|
86
282
|
unavailableCapabilities: UnavailableCapabilities;
|
|
87
283
|
bleFirmwareVersion: IVersionArray | null;
|
|
88
284
|
firmwareVersion: IVersionArray | null;
|
|
@@ -99,9 +295,12 @@ type SearchDevice = {
|
|
|
99
295
|
commType: OneKeyDeviceCommType;
|
|
100
296
|
};
|
|
101
297
|
type Device$1 = KnownDevice;
|
|
102
|
-
type
|
|
298
|
+
type OnekeyFeatureExtensions = Partial<Pick<Messages.OnekeyFeatures, 'onekey_board_build_id' | 'onekey_se02_hash' | 'onekey_se03_hash' | 'onekey_se04_hash' | 'onekey_se02_build_id' | 'onekey_se03_build_id' | 'onekey_se04_build_id' | 'onekey_se01_boot_version' | 'onekey_se02_boot_version' | 'onekey_se03_boot_version' | 'onekey_se04_boot_version' | 'onekey_se01_boot_hash' | 'onekey_se02_boot_hash' | 'onekey_se03_boot_hash' | 'onekey_se04_boot_hash' | 'onekey_se01_boot_build_id' | 'onekey_se02_boot_build_id' | 'onekey_se03_boot_build_id' | 'onekey_se04_boot_build_id'>>;
|
|
299
|
+
type Features = Messages.Features & OnekeyFeatureExtensions & {
|
|
300
|
+
protocol_version?: number | null;
|
|
301
|
+
};
|
|
103
302
|
type OnekeyFeatures = Messages.OnekeyFeatures;
|
|
104
|
-
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro;
|
|
303
|
+
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro | EDeviceType.Pro2;
|
|
105
304
|
type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
|
|
106
305
|
declare const DeviceModelToTypes: {
|
|
107
306
|
[deviceModel in IDeviceModel]: IDeviceType[];
|
|
@@ -115,6 +314,7 @@ type ITransportStatus = 'valid' | 'outdated';
|
|
|
115
314
|
type IVersionRange = {
|
|
116
315
|
min: string;
|
|
117
316
|
max?: string;
|
|
317
|
+
unsupported?: boolean;
|
|
118
318
|
};
|
|
119
319
|
type DeviceFirmwareRange = {
|
|
120
320
|
[deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
|
|
@@ -165,91 +365,418 @@ type SupportFeatures = {
|
|
|
165
365
|
modifyHomescreen: SupportFeatureType;
|
|
166
366
|
};
|
|
167
367
|
|
|
168
|
-
type
|
|
169
|
-
type
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
368
|
+
type DeviceInfoProtocol = ProtocolType | 'unknown';
|
|
369
|
+
type DeviceInfoSource = 'features' | 'onekeyFeatures' | 'deviceInfo';
|
|
370
|
+
type DeviceInfoScope = 'basic' | 'versions' | 'verify' | 'full';
|
|
371
|
+
type GetDeviceInfoParams = {
|
|
372
|
+
scope?: DeviceInfoScope;
|
|
373
|
+
refresh?: boolean;
|
|
374
|
+
includeRaw?: boolean;
|
|
375
|
+
};
|
|
376
|
+
type DeviceInfoMode = 'normal' | 'bootloader' | 'notInitialized' | 'unknown';
|
|
377
|
+
type DeviceInfoStatus = {
|
|
378
|
+
mode: DeviceInfoMode;
|
|
379
|
+
initialized: boolean | null;
|
|
380
|
+
bootloaderMode: boolean | null;
|
|
381
|
+
unlocked: boolean | null;
|
|
382
|
+
passphraseProtection: boolean | null;
|
|
383
|
+
backupRequired: boolean | null;
|
|
384
|
+
noBackup: boolean | null;
|
|
385
|
+
language: string | null;
|
|
386
|
+
bleEnabled: boolean | null;
|
|
387
|
+
};
|
|
388
|
+
type DeviceProfileVersions = {
|
|
389
|
+
firmware: string | null;
|
|
390
|
+
bootloader: string | null;
|
|
391
|
+
board: string | null;
|
|
392
|
+
ble: string | null;
|
|
393
|
+
se01?: string | null;
|
|
394
|
+
se02?: string | null;
|
|
395
|
+
se03?: string | null;
|
|
396
|
+
se04?: string | null;
|
|
397
|
+
se01Boot?: string | null;
|
|
398
|
+
se02Boot?: string | null;
|
|
399
|
+
se03Boot?: string | null;
|
|
400
|
+
se04Boot?: string | null;
|
|
401
|
+
};
|
|
402
|
+
type DeviceProfileVerify = {
|
|
403
|
+
firmwareBuildId?: string;
|
|
404
|
+
firmwareHash?: string;
|
|
405
|
+
bootloaderBuildId?: string;
|
|
406
|
+
bootloaderHash?: string;
|
|
407
|
+
boardBuildId?: string;
|
|
408
|
+
boardHash?: string;
|
|
409
|
+
bleBuildId?: string;
|
|
410
|
+
bleHash?: string;
|
|
411
|
+
se01BuildId?: string;
|
|
412
|
+
se01Hash?: string;
|
|
413
|
+
se02BuildId?: string;
|
|
414
|
+
se02Hash?: string;
|
|
415
|
+
se03BuildId?: string;
|
|
416
|
+
se03Hash?: string;
|
|
417
|
+
se04BuildId?: string;
|
|
418
|
+
se04Hash?: string;
|
|
419
|
+
se01BootBuildId?: string;
|
|
420
|
+
se01BootHash?: string;
|
|
421
|
+
se02BootBuildId?: string;
|
|
422
|
+
se02BootHash?: string;
|
|
423
|
+
se03BootBuildId?: string;
|
|
424
|
+
se03BootHash?: string;
|
|
425
|
+
se04BootBuildId?: string;
|
|
426
|
+
se04BootHash?: string;
|
|
427
|
+
};
|
|
428
|
+
type DeviceProfileRaw = {
|
|
429
|
+
features?: Features;
|
|
430
|
+
onekeyFeatures?: OnekeyFeatures;
|
|
431
|
+
protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
|
|
432
|
+
};
|
|
433
|
+
type DeviceProfile = {
|
|
434
|
+
protocol: DeviceInfoProtocol;
|
|
435
|
+
sources: DeviceInfoSource[];
|
|
436
|
+
deviceType: IDeviceType;
|
|
437
|
+
firmwareType: EFirmwareType;
|
|
438
|
+
deviceId: string;
|
|
439
|
+
serialNo: string;
|
|
440
|
+
label: string | null;
|
|
441
|
+
bleName: string | null;
|
|
442
|
+
status: DeviceInfoStatus;
|
|
443
|
+
versions: DeviceProfileVersions;
|
|
444
|
+
verify?: DeviceProfileVerify;
|
|
445
|
+
raw?: DeviceProfileRaw;
|
|
189
446
|
};
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
type
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
fullResourceRange?: string[];
|
|
199
|
-
bootloaderResource?: string;
|
|
200
|
-
bootloaderVersion?: IVersionArray;
|
|
201
|
-
displayBootloaderVersion?: IVersionArray;
|
|
202
|
-
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
203
|
-
bootloaderChangelog?: {
|
|
204
|
-
[k in ILocale]: string;
|
|
205
|
-
};
|
|
206
|
-
fingerprint: string;
|
|
207
|
-
version: IVersionArray;
|
|
208
|
-
changelog: {
|
|
209
|
-
[k in ILocale]: string;
|
|
210
|
-
};
|
|
447
|
+
declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
|
|
448
|
+
|
|
449
|
+
type InitOptions = {
|
|
450
|
+
initSession?: boolean;
|
|
451
|
+
deviceId?: string;
|
|
452
|
+
passphraseState?: string;
|
|
453
|
+
deriveCardano?: boolean;
|
|
454
|
+
connectProtocol?: HardwareConnectProtocol;
|
|
211
455
|
};
|
|
212
|
-
type
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
456
|
+
type RunOptions = {
|
|
457
|
+
keepSession?: boolean;
|
|
458
|
+
skipInitialize?: boolean;
|
|
459
|
+
} & InitOptions;
|
|
460
|
+
interface DeviceEvents {
|
|
461
|
+
[DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
462
|
+
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device, ((response: any) => void)?];
|
|
463
|
+
[DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
|
|
464
|
+
[DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
|
|
465
|
+
[DEVICE.PASSPHRASE]: [
|
|
466
|
+
Device,
|
|
467
|
+
PassphraseRequestPayload,
|
|
468
|
+
(response: PassphrasePromptResponse, error?: Error) => void
|
|
469
|
+
];
|
|
470
|
+
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
471
|
+
Device,
|
|
472
|
+
(err: any, deviceId: string) => void
|
|
473
|
+
];
|
|
474
|
+
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
475
|
+
Device,
|
|
476
|
+
(err: any, deviceId: string) => void
|
|
477
|
+
];
|
|
478
|
+
}
|
|
479
|
+
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
480
|
+
interface Device {
|
|
481
|
+
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
482
|
+
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
483
|
+
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
484
|
+
}
|
|
485
|
+
declare class Device extends EventEmitter {
|
|
486
|
+
originalDescriptor: OneKeyDeviceInfo;
|
|
487
|
+
sdkInstanceId?: string;
|
|
488
|
+
instanceId: string;
|
|
489
|
+
createdAt: number;
|
|
490
|
+
mainId?: string | null;
|
|
491
|
+
deviceConnector?: DeviceConnector | null;
|
|
492
|
+
commands: DeviceCommands;
|
|
493
|
+
private cancelableAction?;
|
|
494
|
+
private deviceAcquired;
|
|
495
|
+
features: Features | undefined;
|
|
496
|
+
private getFeaturesProfile;
|
|
497
|
+
get profile(): DeviceProfile | undefined;
|
|
498
|
+
set profile(profile: DeviceProfile | undefined);
|
|
499
|
+
featuresNeedsReload: boolean;
|
|
500
|
+
runPromise?: Deferred<void> | null;
|
|
501
|
+
externalState: string[];
|
|
502
|
+
unavailableCapabilities: UnavailableCapabilities;
|
|
503
|
+
instance: number;
|
|
504
|
+
internalState: string[];
|
|
505
|
+
needReloadDevice: boolean;
|
|
506
|
+
keepSession: boolean;
|
|
507
|
+
passphraseState: string | undefined;
|
|
508
|
+
pendingCallbackPromise?: Deferred<void>;
|
|
509
|
+
private preInitializedAt?;
|
|
510
|
+
private preInitializeMeta?;
|
|
511
|
+
private lastInitializeDurationMs?;
|
|
512
|
+
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
513
|
+
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
|
|
514
|
+
toMessageObject(): Device$1 | null;
|
|
515
|
+
connect(connectProtocol?: HardwareConnectProtocol): Promise<boolean>;
|
|
516
|
+
acquire(connectProtocol?: HardwareConnectProtocol): Promise<void>;
|
|
517
|
+
release(): Promise<void>;
|
|
518
|
+
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
519
|
+
markPreInitialized(meta?: {
|
|
520
|
+
passphraseState?: string;
|
|
521
|
+
}): void;
|
|
522
|
+
clearPreInitialized(): void;
|
|
523
|
+
isPreInitializeMetaMatch(payload?: {
|
|
524
|
+
passphraseState?: string;
|
|
525
|
+
}): boolean;
|
|
526
|
+
isPreInitializedValid(ttlMs: number): boolean;
|
|
527
|
+
setLastInitializeDuration(durationMs: number): void;
|
|
528
|
+
getLastInitializeDuration(): number | undefined;
|
|
529
|
+
getCommands(): DeviceCommands;
|
|
530
|
+
getProtocol(): 'V1' | 'V2';
|
|
531
|
+
isProtocolV2(): boolean;
|
|
532
|
+
getCurrentDeviceType(): IDeviceType;
|
|
533
|
+
getCurrentDeviceId(): string | undefined;
|
|
534
|
+
getCurrentSerialNo(): string;
|
|
535
|
+
getCurrentBleName(): string | null;
|
|
536
|
+
getCurrentLabel(): string | null;
|
|
537
|
+
getCurrentPassphraseProtection(): boolean | null | undefined;
|
|
538
|
+
getCurrentFirmwareType(): _onekeyfe_hd_shared.EFirmwareType;
|
|
539
|
+
getCurrentFirmwareVersionString(): string;
|
|
540
|
+
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
541
|
+
getCurrentSafetyChecks(): "Strict" | "PromptAlways" | "PromptTemporarily" | null | undefined;
|
|
542
|
+
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
543
|
+
supportNewPassphrase(): SupportFeatureType;
|
|
544
|
+
supportInputPinOnSoftware(): SupportFeatureType;
|
|
545
|
+
supportModifyHomescreen(): SupportFeatureType;
|
|
546
|
+
private generateStateKey;
|
|
547
|
+
getInternalState(_deviceId?: string): string | undefined;
|
|
548
|
+
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
549
|
+
private setInternalState;
|
|
550
|
+
clearInternalState(_deviceId?: string): void;
|
|
551
|
+
initialize(options?: InitOptions): Promise<void>;
|
|
552
|
+
private _initializeProtocolV2;
|
|
553
|
+
private _refreshProtocolV2Status;
|
|
554
|
+
getFeatures(): Promise<_onekeyfe_hd_transport.Features>;
|
|
555
|
+
_updateFeatures(feat: Features, initSession?: boolean): void;
|
|
556
|
+
updateProfile(profile: DeviceProfile | undefined): void;
|
|
557
|
+
applyProfileUpdate(next: DeviceProfile, deviceInfo?: ProtocolV2DeviceInfo): DeviceProfile;
|
|
558
|
+
private updateProtocolV2Features;
|
|
559
|
+
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
560
|
+
updateFromCache(device: Device): void;
|
|
561
|
+
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
562
|
+
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
|
|
563
|
+
interruptionFromOutside(): Promise<void>;
|
|
564
|
+
interruptionFromUser(): Promise<void>;
|
|
565
|
+
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
566
|
+
clearCancelableAction(): void;
|
|
567
|
+
getMode(): EOneKeyDeviceMode;
|
|
568
|
+
getFirmwareVersion(): IVersionArray | null;
|
|
569
|
+
getBLEFirmwareVersion(): IVersionArray | null;
|
|
570
|
+
isUsed(): boolean;
|
|
571
|
+
hasDeviceAcquire(): boolean;
|
|
572
|
+
isUsedHere(): boolean;
|
|
573
|
+
isUsedElsewhere(): boolean;
|
|
574
|
+
isBootloader(): boolean | undefined;
|
|
575
|
+
isInitialized(): boolean | undefined;
|
|
576
|
+
isSeedless(): boolean | undefined;
|
|
577
|
+
isUnacquired(): boolean;
|
|
578
|
+
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
579
|
+
hasUsePassphrase(): boolean;
|
|
580
|
+
checkDeviceId(deviceId: string): boolean;
|
|
581
|
+
lockDevice(): Promise<Success$1>;
|
|
582
|
+
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
583
|
+
unlockDevice(): Promise<_onekeyfe_hd_transport.Features>;
|
|
584
|
+
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
declare function generateSdkInstanceId(): string;
|
|
588
|
+
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
589
|
+
interface RequestContext {
|
|
590
|
+
responseID: number;
|
|
591
|
+
sdkInstanceId?: string;
|
|
592
|
+
methodName: string;
|
|
593
|
+
connectId?: string;
|
|
594
|
+
deviceInstanceId?: string;
|
|
595
|
+
commandsInstanceId?: string;
|
|
596
|
+
parentResponseID?: number;
|
|
597
|
+
startTime: number;
|
|
598
|
+
endTime?: number;
|
|
599
|
+
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
600
|
+
error?: string;
|
|
601
|
+
}
|
|
602
|
+
interface SdkTracingContext {
|
|
603
|
+
sdkInstanceId: string;
|
|
604
|
+
createdAt: number;
|
|
605
|
+
activeRequests: Map<number, RequestContext>;
|
|
606
|
+
}
|
|
607
|
+
declare function createSdkTracingContext(): SdkTracingContext;
|
|
608
|
+
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
609
|
+
sdkInstanceId?: string;
|
|
610
|
+
connectId?: string;
|
|
611
|
+
deviceInstanceId?: string;
|
|
612
|
+
commandsInstanceId?: string;
|
|
613
|
+
parentResponseID?: number;
|
|
614
|
+
}): RequestContext;
|
|
615
|
+
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
616
|
+
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
617
|
+
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
618
|
+
declare function formatRequestContext(context: RequestContext): string;
|
|
619
|
+
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
620
|
+
|
|
621
|
+
declare class Core extends EventEmitter {
|
|
622
|
+
private tracingContext;
|
|
623
|
+
readonly sdkInstanceId: string;
|
|
624
|
+
private requestQueue;
|
|
625
|
+
private prePendingCallPromise;
|
|
626
|
+
private methodSynchronize;
|
|
627
|
+
constructor();
|
|
628
|
+
private getCoreContext;
|
|
629
|
+
handleMessage(message: CoreMessage): Promise<any>;
|
|
630
|
+
dispose(): void;
|
|
631
|
+
}
|
|
632
|
+
declare const init$1: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
633
|
+
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
634
|
+
env: ConnectSettings['env'];
|
|
635
|
+
Transport: any;
|
|
636
|
+
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
637
|
+
}) => void;
|
|
638
|
+
|
|
639
|
+
type DeviceGetDeviceInfoTargets = {
|
|
640
|
+
hw?: boolean;
|
|
641
|
+
fw?: boolean;
|
|
642
|
+
bt?: boolean;
|
|
643
|
+
se1?: boolean;
|
|
644
|
+
se2?: boolean;
|
|
645
|
+
se3?: boolean;
|
|
646
|
+
se4?: boolean;
|
|
647
|
+
status?: boolean;
|
|
222
648
|
};
|
|
223
|
-
type
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
229
|
-
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
230
|
-
ble: IBLEFirmwareReleaseInfo[];
|
|
231
|
-
};
|
|
649
|
+
type DeviceGetDeviceInfoTypes = {
|
|
650
|
+
version?: boolean;
|
|
651
|
+
build_id?: boolean;
|
|
652
|
+
hash?: boolean;
|
|
653
|
+
specific?: boolean;
|
|
232
654
|
};
|
|
233
|
-
type
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
linux32Rpm: string;
|
|
237
|
-
linux64Rpm: string;
|
|
238
|
-
linux32Deb: string;
|
|
239
|
-
linux64Deb: string;
|
|
240
|
-
win: string;
|
|
241
|
-
mac: string;
|
|
242
|
-
sha256sumAsc: string;
|
|
243
|
-
changelog: {
|
|
244
|
-
[k in ILocale]: string;
|
|
245
|
-
};
|
|
246
|
-
};
|
|
655
|
+
type DeviceGetDeviceInfoParams = {
|
|
656
|
+
targets?: DeviceGetDeviceInfoTargets;
|
|
657
|
+
types?: DeviceGetDeviceInfoTypes;
|
|
247
658
|
};
|
|
248
|
-
type RemoteConfigResponse = {
|
|
249
|
-
bridge: AssetsMap['bridge'];
|
|
250
|
-
} & DeviceTypeMap;
|
|
251
659
|
|
|
252
|
-
|
|
660
|
+
type FileOpSuccess = {
|
|
661
|
+
message?: string;
|
|
662
|
+
};
|
|
663
|
+
type FileInfo = {
|
|
664
|
+
path: string;
|
|
665
|
+
offset: number;
|
|
666
|
+
total_size: number;
|
|
667
|
+
data?: Uint8Array;
|
|
668
|
+
data_hash?: number;
|
|
669
|
+
processed_byte?: number;
|
|
670
|
+
chunks?: number;
|
|
671
|
+
};
|
|
672
|
+
type DirInfo = {
|
|
673
|
+
path: string;
|
|
674
|
+
child_dirs?: string;
|
|
675
|
+
child_files?: string;
|
|
676
|
+
};
|
|
677
|
+
type PathInfoResult = {
|
|
678
|
+
exist: boolean;
|
|
679
|
+
size: number;
|
|
680
|
+
year: number;
|
|
681
|
+
month: number;
|
|
682
|
+
day: number;
|
|
683
|
+
hour: number;
|
|
684
|
+
minute: number;
|
|
685
|
+
second: number;
|
|
686
|
+
readonly: boolean;
|
|
687
|
+
hidden: boolean;
|
|
688
|
+
system: boolean;
|
|
689
|
+
archive: boolean;
|
|
690
|
+
directory: boolean;
|
|
691
|
+
};
|
|
692
|
+
declare function getProtoVersion(connectId: string, params?: CommonParams): Response<ProtoVersion>;
|
|
693
|
+
declare function ping(connectId: string, params?: CommonParams & {
|
|
694
|
+
message?: string;
|
|
695
|
+
}): Response<Success$1>;
|
|
696
|
+
declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
697
|
+
declare function deviceGetDeviceInfo(connectId: string, params?: CommonParams & DeviceGetDeviceInfoParams): Response<ProtocolV2DeviceInfo>;
|
|
698
|
+
declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<OnboardingStatus>;
|
|
699
|
+
declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DevFirmwareUpdateStatus | DeviceFirmwareUpdateStatus>;
|
|
700
|
+
declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams): Response<DevFirmwareUpdateStatus | DeviceFirmwareUpdateStatus>;
|
|
701
|
+
declare function devReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success$1>;
|
|
702
|
+
declare function devGetDeviceInfo(connectId: string, params?: CommonParams & DeviceGetDeviceInfoParams): Response<ProtocolV2DeviceInfo>;
|
|
703
|
+
declare function devFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success$1 | DevFirmwareUpdateStatus>;
|
|
704
|
+
declare function devGetFirmwareUpdateStatus(connectId: string, params?: CommonParams): Response<DevFirmwareUpdateStatus>;
|
|
705
|
+
declare function factoryDeviceInfoSettings(connectId: string, params: FactoryDeviceInfoSettingsParams): Response<Success$1>;
|
|
706
|
+
declare function factoryGetDeviceInfo(connectId: string): Response<FactoryDeviceInfo>;
|
|
707
|
+
declare function filesystemFixPermission(connectId: string): Response<Success$1>;
|
|
708
|
+
declare function fileRead(connectId: string, params: {
|
|
709
|
+
path: string;
|
|
710
|
+
offset?: number;
|
|
711
|
+
totalSize?: number;
|
|
712
|
+
chunkLen?: number;
|
|
713
|
+
uiPercentage?: number;
|
|
714
|
+
}): Response<FileInfo>;
|
|
715
|
+
declare function fileWrite(connectId: string, params: {
|
|
716
|
+
path: string;
|
|
717
|
+
offset?: number;
|
|
718
|
+
totalSize?: number;
|
|
719
|
+
chunkSize?: number;
|
|
720
|
+
chunkLen?: number;
|
|
721
|
+
data: ArrayBuffer | Uint8Array | Blob | string;
|
|
722
|
+
overwrite?: boolean;
|
|
723
|
+
append?: boolean;
|
|
724
|
+
uiPercentage?: number;
|
|
725
|
+
timeoutMs?: number | string;
|
|
726
|
+
}): Response<FileInfo>;
|
|
727
|
+
declare function fileDelete(connectId: string, params: {
|
|
728
|
+
path: string;
|
|
729
|
+
}): Response<FileOpSuccess>;
|
|
730
|
+
declare function dirList(connectId: string, params: {
|
|
731
|
+
path: string;
|
|
732
|
+
depth?: number;
|
|
733
|
+
}): Response<DirInfo>;
|
|
734
|
+
declare function dirMake(connectId: string, params: {
|
|
735
|
+
path: string;
|
|
736
|
+
}): Response<FileOpSuccess>;
|
|
737
|
+
declare function dirRemove(connectId: string, params: {
|
|
738
|
+
path: string;
|
|
739
|
+
}): Response<FileOpSuccess>;
|
|
740
|
+
declare function pathInfo(connectId: string, params: {
|
|
741
|
+
path: string;
|
|
742
|
+
timeoutMs?: number | string;
|
|
743
|
+
}): Response<PathInfoResult>;
|
|
744
|
+
declare const filesystemFileRead: typeof fileRead;
|
|
745
|
+
declare const filesystemFileWrite: typeof fileWrite;
|
|
746
|
+
declare const filesystemFileDelete: typeof fileDelete;
|
|
747
|
+
declare const filesystemDirList: typeof dirList;
|
|
748
|
+
declare const filesystemDirMake: typeof dirMake;
|
|
749
|
+
declare const filesystemDirRemove: typeof dirRemove;
|
|
750
|
+
declare const filesystemPathInfoQuery: typeof pathInfo;
|
|
751
|
+
declare function filesystemFormat(connectId: string): Response<Success$1>;
|
|
752
|
+
declare function filesystemDiskControl(connectId: string, params: CommonParams & {
|
|
753
|
+
enable: boolean | 0 | 1;
|
|
754
|
+
timeoutMs?: number | string;
|
|
755
|
+
}): Response<Success$1>;
|
|
756
|
+
|
|
757
|
+
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
758
|
+
declare const off: (type: any, fn: any) => void;
|
|
759
|
+
declare const removeAllListeners: (type: any) => void;
|
|
760
|
+
|
|
761
|
+
declare function uiResponse(response: UiResponseEvent): void;
|
|
762
|
+
|
|
763
|
+
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
764
|
+
interface LowLevelInjectApi {
|
|
765
|
+
call: CallMethod;
|
|
766
|
+
eventEmitter: EventEmitter$1;
|
|
767
|
+
init: CoreApi['init'];
|
|
768
|
+
dispose: CoreApi['dispose'];
|
|
769
|
+
uiResponse: CoreApi['uiResponse'];
|
|
770
|
+
cancel: CoreApi['cancel'];
|
|
771
|
+
updateSettings: CoreApi['updateSettings'];
|
|
772
|
+
switchTransport: CoreApi['switchTransport'];
|
|
773
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
774
|
+
}
|
|
775
|
+
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
776
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
777
|
+
};
|
|
778
|
+
|
|
779
|
+
declare function init(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
|
|
253
780
|
declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
|
|
254
781
|
|
|
255
782
|
declare function testInitializeDeviceDuration(connectId?: string, params?: CommonParams): Response<number>;
|
|
@@ -310,13 +837,22 @@ type CheckFirmwareTypeAvailableParams = {
|
|
|
310
837
|
};
|
|
311
838
|
declare function checkFirmwareTypeAvailable(params: CheckFirmwareTypeAvailableParams): Response<FirmwareRelease$2 | undefined>;
|
|
312
839
|
|
|
313
|
-
declare function searchDevices(): Response<SearchDevice[]>;
|
|
840
|
+
declare function searchDevices(params?: CommonParams): Response<SearchDevice[]>;
|
|
314
841
|
|
|
315
842
|
declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
|
|
316
843
|
|
|
317
844
|
declare function getOnekeyFeatures(connectId?: string, params?: CommonParams): Response<OnekeyFeatures>;
|
|
318
845
|
|
|
319
|
-
|
|
846
|
+
type GetPassphraseStatePayload = {
|
|
847
|
+
passphrase_state?: string;
|
|
848
|
+
session_id?: string;
|
|
849
|
+
unlocked_attach_pin?: boolean;
|
|
850
|
+
passphrase_protection?: boolean | null;
|
|
851
|
+
};
|
|
852
|
+
type GetPassphraseStateParams = CommonParams & {
|
|
853
|
+
allowCreateAttachPin?: boolean;
|
|
854
|
+
};
|
|
855
|
+
declare function getPassphraseState(connectId?: string, params?: GetPassphraseStateParams): Response<GetPassphraseStatePayload>;
|
|
320
856
|
|
|
321
857
|
type FirmwareRelease$1 = {
|
|
322
858
|
status: IDeviceFirmwareStatus;
|
|
@@ -370,6 +906,7 @@ declare function firmwareUpdateV2(connectId: string | undefined, params: Params<
|
|
|
370
906
|
interface FirmwareUpdateV3Params {
|
|
371
907
|
bleVersion?: number[];
|
|
372
908
|
bleBinary?: ArrayBuffer;
|
|
909
|
+
chunkSize?: number;
|
|
373
910
|
firmwareVersion?: number[];
|
|
374
911
|
firmwareBinary?: ArrayBuffer;
|
|
375
912
|
bootloaderVersion?: number[];
|
|
@@ -379,11 +916,37 @@ interface FirmwareUpdateV3Params {
|
|
|
379
916
|
firmwareType?: EFirmwareType;
|
|
380
917
|
platform: IPlatform;
|
|
381
918
|
}
|
|
919
|
+
interface FirmwareUpdateV4Params {
|
|
920
|
+
platform: IPlatform;
|
|
921
|
+
chunkSize?: number;
|
|
922
|
+
firmwareType?: EFirmwareType;
|
|
923
|
+
romloaderBinary?: ArrayBuffer;
|
|
924
|
+
bootloaderBinary?: ArrayBuffer;
|
|
925
|
+
applicationP1Binary?: ArrayBuffer;
|
|
926
|
+
applicationP2Binary?: ArrayBuffer;
|
|
927
|
+
coprocessorBinary?: ArrayBuffer;
|
|
928
|
+
se01Binary?: ArrayBuffer;
|
|
929
|
+
se02Binary?: ArrayBuffer;
|
|
930
|
+
se03Binary?: ArrayBuffer;
|
|
931
|
+
se04Binary?: ArrayBuffer;
|
|
932
|
+
resourceBinary?: ArrayBuffer;
|
|
933
|
+
forcedUpdateRes?: boolean;
|
|
934
|
+
firmwareVersion?: number[];
|
|
935
|
+
bleVersion?: number[];
|
|
936
|
+
bootloaderVersion?: number[];
|
|
937
|
+
firmwareBinary?: ArrayBuffer;
|
|
938
|
+
bleBinary?: ArrayBuffer;
|
|
939
|
+
}
|
|
382
940
|
declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
|
|
383
941
|
bleVersion: string;
|
|
384
942
|
firmwareVersion: string;
|
|
385
943
|
bootloaderVersion: string;
|
|
386
944
|
}>;
|
|
945
|
+
declare function firmwareUpdateV4(connectId: string | undefined, params: Params<FirmwareUpdateV4Params>): Response<{
|
|
946
|
+
bleVersion: string;
|
|
947
|
+
firmwareVersion: string;
|
|
948
|
+
bootloaderVersion: string;
|
|
949
|
+
}>;
|
|
387
950
|
|
|
388
951
|
declare function promptWebDeviceAccess(options?: {
|
|
389
952
|
deviceSerialNumberFromUI?: string;
|
|
@@ -2343,7 +2906,7 @@ type NeoSignedTx = {
|
|
|
2343
2906
|
declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
|
|
2344
2907
|
|
|
2345
2908
|
type CoreApi = {
|
|
2346
|
-
init: typeof init
|
|
2909
|
+
init: typeof init;
|
|
2347
2910
|
on: typeof on;
|
|
2348
2911
|
off: typeof off;
|
|
2349
2912
|
emit: (event: string, ...args: any[]) => void;
|
|
@@ -2367,6 +2930,7 @@ type CoreApi = {
|
|
|
2367
2930
|
searchDevices: typeof searchDevices;
|
|
2368
2931
|
promptWebDeviceAccess: typeof promptWebDeviceAccess;
|
|
2369
2932
|
getFeatures: typeof getFeatures;
|
|
2933
|
+
getDeviceInfo: typeof getDeviceInfo;
|
|
2370
2934
|
getOnekeyFeatures: typeof getOnekeyFeatures;
|
|
2371
2935
|
getPassphraseState: typeof getPassphraseState;
|
|
2372
2936
|
deviceBackup: typeof deviceBackup;
|
|
@@ -2394,7 +2958,38 @@ type CoreApi = {
|
|
|
2394
2958
|
firmwareUpdate: typeof firmwareUpdate;
|
|
2395
2959
|
firmwareUpdateV2: typeof firmwareUpdateV2;
|
|
2396
2960
|
firmwareUpdateV3: typeof firmwareUpdateV3;
|
|
2961
|
+
firmwareUpdateV4: typeof firmwareUpdateV4;
|
|
2397
2962
|
cipherKeyValue: typeof cipherKeyValue;
|
|
2963
|
+
getProtoVersion: typeof getProtoVersion;
|
|
2964
|
+
ping: typeof ping;
|
|
2965
|
+
deviceReboot: typeof deviceReboot;
|
|
2966
|
+
deviceGetDeviceInfo: typeof deviceGetDeviceInfo;
|
|
2967
|
+
deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
|
|
2968
|
+
deviceFirmwareUpdate: typeof deviceFirmwareUpdate;
|
|
2969
|
+
deviceGetFirmwareUpdateStatus: typeof deviceGetFirmwareUpdateStatus;
|
|
2970
|
+
devReboot: typeof devReboot;
|
|
2971
|
+
devGetDeviceInfo: typeof devGetDeviceInfo;
|
|
2972
|
+
devFirmwareUpdate: typeof devFirmwareUpdate;
|
|
2973
|
+
devGetFirmwareUpdateStatus: typeof devGetFirmwareUpdateStatus;
|
|
2974
|
+
factoryDeviceInfoSettings: typeof factoryDeviceInfoSettings;
|
|
2975
|
+
factoryGetDeviceInfo: typeof factoryGetDeviceInfo;
|
|
2976
|
+
filesystemFixPermission: typeof filesystemFixPermission;
|
|
2977
|
+
fileRead: typeof fileRead;
|
|
2978
|
+
fileWrite: typeof fileWrite;
|
|
2979
|
+
fileDelete: typeof fileDelete;
|
|
2980
|
+
dirList: typeof dirList;
|
|
2981
|
+
dirMake: typeof dirMake;
|
|
2982
|
+
dirRemove: typeof dirRemove;
|
|
2983
|
+
pathInfo: typeof pathInfo;
|
|
2984
|
+
filesystemFileRead: typeof filesystemFileRead;
|
|
2985
|
+
filesystemFileWrite: typeof filesystemFileWrite;
|
|
2986
|
+
filesystemFileDelete: typeof filesystemFileDelete;
|
|
2987
|
+
filesystemDirList: typeof filesystemDirList;
|
|
2988
|
+
filesystemDirMake: typeof filesystemDirMake;
|
|
2989
|
+
filesystemDirRemove: typeof filesystemDirRemove;
|
|
2990
|
+
filesystemPathInfoQuery: typeof filesystemPathInfoQuery;
|
|
2991
|
+
filesystemFormat: typeof filesystemFormat;
|
|
2992
|
+
filesystemDiskControl: typeof filesystemDiskControl;
|
|
2398
2993
|
allNetworkGetAddress: typeof allNetworkGetAddress;
|
|
2399
2994
|
allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
|
|
2400
2995
|
evmGetAddress: typeof evmGetAddress;
|
|
@@ -2702,6 +3297,10 @@ interface FirmwareProgress {
|
|
|
2702
3297
|
device: Device$1;
|
|
2703
3298
|
progress: number;
|
|
2704
3299
|
progressType: IFirmwareUpdateProgressType;
|
|
3300
|
+
transferredBytes?: number;
|
|
3301
|
+
totalBytes?: number;
|
|
3302
|
+
rateBytesPerSecond?: number;
|
|
3303
|
+
elapsedMs?: number;
|
|
2705
3304
|
};
|
|
2706
3305
|
}
|
|
2707
3306
|
interface FirmwareTip {
|
|
@@ -2717,6 +3316,10 @@ interface DeviceProgress {
|
|
|
2717
3316
|
type: typeof UI_REQUEST.DEVICE_PROGRESS;
|
|
2718
3317
|
payload: {
|
|
2719
3318
|
progress?: number;
|
|
3319
|
+
transferredBytes?: number;
|
|
3320
|
+
totalBytes?: number;
|
|
3321
|
+
rateBytesPerSecond?: number;
|
|
3322
|
+
elapsedMs?: number;
|
|
2720
3323
|
};
|
|
2721
3324
|
}
|
|
2722
3325
|
interface PreviousAddressResult {
|
|
@@ -2969,224 +3572,6 @@ declare const createErrorMessage: (error: Error & {
|
|
|
2969
3572
|
code?: string | number;
|
|
2970
3573
|
}) => Unsuccessful;
|
|
2971
3574
|
|
|
2972
|
-
type PassphrasePromptResponse = {
|
|
2973
|
-
passphrase?: string;
|
|
2974
|
-
passphraseOnDevice?: boolean;
|
|
2975
|
-
attachPinOnDevice?: boolean;
|
|
2976
|
-
cache?: boolean;
|
|
2977
|
-
};
|
|
2978
|
-
type MessageType = Messages.MessageType;
|
|
2979
|
-
type MessageKey = keyof MessageType;
|
|
2980
|
-
type TypedResponseMessage<T extends MessageKey> = {
|
|
2981
|
-
type: T;
|
|
2982
|
-
message: MessageType[T];
|
|
2983
|
-
};
|
|
2984
|
-
type TypedCallResponseMap = {
|
|
2985
|
-
[K in keyof MessageType]: TypedResponseMessage<K>;
|
|
2986
|
-
};
|
|
2987
|
-
type DefaultMessageResponse = TypedCallResponseMap[keyof MessageType];
|
|
2988
|
-
declare class DeviceCommands {
|
|
2989
|
-
instanceId: string;
|
|
2990
|
-
currentResponseID?: number;
|
|
2991
|
-
device: Device;
|
|
2992
|
-
transport: Transport;
|
|
2993
|
-
mainId: string;
|
|
2994
|
-
disposed: boolean;
|
|
2995
|
-
callPromise?: Promise<DefaultMessageResponse>;
|
|
2996
|
-
constructor(device: Device, mainId: string);
|
|
2997
|
-
dispose(_cancelRequest: boolean): Promise<void>;
|
|
2998
|
-
checkDisposed(): void;
|
|
2999
|
-
cancelDeviceOnOneKeyDevice(): Promise<{
|
|
3000
|
-
readonly success: false;
|
|
3001
|
-
readonly error: 800;
|
|
3002
|
-
readonly payload: {
|
|
3003
|
-
readonly message: "Device disconnected or acquired by someone else";
|
|
3004
|
-
};
|
|
3005
|
-
} | {
|
|
3006
|
-
success: boolean;
|
|
3007
|
-
error: null;
|
|
3008
|
-
payload: {
|
|
3009
|
-
message: string;
|
|
3010
|
-
};
|
|
3011
|
-
} | {
|
|
3012
|
-
success: boolean;
|
|
3013
|
-
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;
|
|
3014
|
-
payload: {
|
|
3015
|
-
message: string;
|
|
3016
|
-
};
|
|
3017
|
-
} | undefined>;
|
|
3018
|
-
cancelDevice(): Promise<{
|
|
3019
|
-
readonly success: false;
|
|
3020
|
-
readonly error: 800;
|
|
3021
|
-
readonly payload: {
|
|
3022
|
-
readonly message: "Device disconnected or acquired by someone else";
|
|
3023
|
-
};
|
|
3024
|
-
} | {
|
|
3025
|
-
success: boolean;
|
|
3026
|
-
error: null;
|
|
3027
|
-
payload: {
|
|
3028
|
-
message: string;
|
|
3029
|
-
};
|
|
3030
|
-
} | {
|
|
3031
|
-
success: boolean;
|
|
3032
|
-
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;
|
|
3033
|
-
payload: {
|
|
3034
|
-
message: string;
|
|
3035
|
-
};
|
|
3036
|
-
} | undefined>;
|
|
3037
|
-
cancel(): Promise<void>;
|
|
3038
|
-
call(type: MessageKey, msg?: DefaultMessageResponse['message']): Promise<DefaultMessageResponse>;
|
|
3039
|
-
typedCall<T extends MessageKey, R extends MessageKey[]>(type: T, resType: R, msg?: MessageType[T]): Promise<TypedCallResponseMap[R[number]]>;
|
|
3040
|
-
typedCall<T extends MessageKey, R extends MessageKey>(type: T, resType: R, msg?: MessageType[T]): Promise<TypedResponseMessage<R>>;
|
|
3041
|
-
_commonCall(type: MessageKey, msg?: DefaultMessageResponse['message']): Promise<DefaultMessageResponse>;
|
|
3042
|
-
_filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey): Promise<DefaultMessageResponse>;
|
|
3043
|
-
_promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
|
|
3044
|
-
_promptPassphrase(options: PassphraseRequestPayload): Promise<PassphrasePromptResponse>;
|
|
3045
|
-
}
|
|
3046
|
-
|
|
3047
|
-
type DeviceDescriptorDiff = {
|
|
3048
|
-
didUpdate: boolean;
|
|
3049
|
-
connected: OneKeyDeviceInfo[];
|
|
3050
|
-
disconnected: OneKeyDeviceInfo[];
|
|
3051
|
-
changedSessions: OneKeyDeviceInfo[];
|
|
3052
|
-
changedDebugSessions: OneKeyDeviceInfo[];
|
|
3053
|
-
acquired: OneKeyDeviceInfo[];
|
|
3054
|
-
debugAcquired: OneKeyDeviceInfo[];
|
|
3055
|
-
released: OneKeyDeviceInfo[];
|
|
3056
|
-
debugReleased: OneKeyDeviceInfo[];
|
|
3057
|
-
descriptors: OneKeyDeviceInfo[];
|
|
3058
|
-
};
|
|
3059
|
-
|
|
3060
|
-
declare class DeviceConnector {
|
|
3061
|
-
transport: Transport;
|
|
3062
|
-
listenTimestamp: number;
|
|
3063
|
-
current: OneKeyDeviceInfo[] | null;
|
|
3064
|
-
upcoming: OneKeyDeviceInfo[];
|
|
3065
|
-
listening: boolean;
|
|
3066
|
-
constructor();
|
|
3067
|
-
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
3068
|
-
listen(): Promise<void>;
|
|
3069
|
-
stop(): void;
|
|
3070
|
-
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean): Promise<string | undefined>;
|
|
3071
|
-
release(session: string, onclose: boolean): Promise<void>;
|
|
3072
|
-
disconnect(session: string | undefined | null): Promise<void>;
|
|
3073
|
-
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
3074
|
-
_reportDevicesChange(): void;
|
|
3075
|
-
}
|
|
3076
|
-
|
|
3077
|
-
type InitOptions = {
|
|
3078
|
-
initSession?: boolean;
|
|
3079
|
-
deviceId?: string;
|
|
3080
|
-
passphraseState?: string;
|
|
3081
|
-
deriveCardano?: boolean;
|
|
3082
|
-
};
|
|
3083
|
-
type RunOptions = {
|
|
3084
|
-
keepSession?: boolean;
|
|
3085
|
-
skipInitialize?: boolean;
|
|
3086
|
-
} & InitOptions;
|
|
3087
|
-
interface DeviceEvents {
|
|
3088
|
-
[DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
3089
|
-
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device, ((response: any) => void)?];
|
|
3090
|
-
[DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
|
|
3091
|
-
[DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
|
|
3092
|
-
[DEVICE.PASSPHRASE]: [
|
|
3093
|
-
Device,
|
|
3094
|
-
PassphraseRequestPayload,
|
|
3095
|
-
(response: PassphrasePromptResponse, error?: Error) => void
|
|
3096
|
-
];
|
|
3097
|
-
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
3098
|
-
Device,
|
|
3099
|
-
(err: any, deviceId: string) => void
|
|
3100
|
-
];
|
|
3101
|
-
[DEVICE.SELECT_DEVICE_FOR_SWITCH_FIRMWARE_WEB_DEVICE]: [
|
|
3102
|
-
Device,
|
|
3103
|
-
(err: any, deviceId: string) => void
|
|
3104
|
-
];
|
|
3105
|
-
}
|
|
3106
|
-
declare function preloadSessionCache(deviceId: string, passphraseState: string, sessionId: string): void;
|
|
3107
|
-
interface Device {
|
|
3108
|
-
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
3109
|
-
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
3110
|
-
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
3111
|
-
}
|
|
3112
|
-
declare class Device extends EventEmitter$1 {
|
|
3113
|
-
originalDescriptor: OneKeyDeviceInfo;
|
|
3114
|
-
sdkInstanceId?: string;
|
|
3115
|
-
instanceId: string;
|
|
3116
|
-
createdAt: number;
|
|
3117
|
-
mainId?: string | null;
|
|
3118
|
-
deviceConnector?: DeviceConnector | null;
|
|
3119
|
-
commands: DeviceCommands;
|
|
3120
|
-
private cancelableAction?;
|
|
3121
|
-
private deviceAcquired;
|
|
3122
|
-
features: Features | undefined;
|
|
3123
|
-
featuresNeedsReload: boolean;
|
|
3124
|
-
runPromise?: Deferred<void> | null;
|
|
3125
|
-
externalState: string[];
|
|
3126
|
-
unavailableCapabilities: UnavailableCapabilities;
|
|
3127
|
-
instance: number;
|
|
3128
|
-
internalState: string[];
|
|
3129
|
-
needReloadDevice: boolean;
|
|
3130
|
-
keepSession: boolean;
|
|
3131
|
-
passphraseState: string | undefined;
|
|
3132
|
-
pendingCallbackPromise?: Deferred<void>;
|
|
3133
|
-
private preInitializedAt?;
|
|
3134
|
-
private preInitializeMeta?;
|
|
3135
|
-
private lastInitializeDurationMs?;
|
|
3136
|
-
constructor(descriptor: OneKeyDeviceInfo, sdkInstanceId?: string);
|
|
3137
|
-
static fromDescriptor(originalDescriptor: OneKeyDeviceInfo, sdkInstanceId?: string): Device;
|
|
3138
|
-
toMessageObject(): Device$1 | null;
|
|
3139
|
-
connect(): Promise<boolean>;
|
|
3140
|
-
acquire(): Promise<void>;
|
|
3141
|
-
release(): Promise<void>;
|
|
3142
|
-
preInitialize(initOptions?: InitOptions): Promise<void>;
|
|
3143
|
-
markPreInitialized(meta?: {
|
|
3144
|
-
passphraseState?: string;
|
|
3145
|
-
}): void;
|
|
3146
|
-
clearPreInitialized(): void;
|
|
3147
|
-
isPreInitializeMetaMatch(payload?: {
|
|
3148
|
-
passphraseState?: string;
|
|
3149
|
-
}): boolean;
|
|
3150
|
-
isPreInitializedValid(ttlMs: number): boolean;
|
|
3151
|
-
setLastInitializeDuration(durationMs: number): void;
|
|
3152
|
-
getLastInitializeDuration(): number | undefined;
|
|
3153
|
-
getCommands(): DeviceCommands;
|
|
3154
|
-
private generateStateKey;
|
|
3155
|
-
getInternalState(_deviceId?: string): string | undefined;
|
|
3156
|
-
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
3157
|
-
private setInternalState;
|
|
3158
|
-
clearInternalState(_deviceId?: string): void;
|
|
3159
|
-
initialize(options?: InitOptions): Promise<void>;
|
|
3160
|
-
getFeatures(): Promise<void>;
|
|
3161
|
-
_updateFeatures(feat: Features, initSession?: boolean): void;
|
|
3162
|
-
updateDescriptor(descriptor: OneKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
3163
|
-
updateFromCache(device: Device): void;
|
|
3164
|
-
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
3165
|
-
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
|
|
3166
|
-
interruptionFromOutside(): Promise<void>;
|
|
3167
|
-
interruptionFromUser(): Promise<void>;
|
|
3168
|
-
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
3169
|
-
clearCancelableAction(): void;
|
|
3170
|
-
getMode(): EOneKeyDeviceMode;
|
|
3171
|
-
getFirmwareVersion(): IVersionArray | null;
|
|
3172
|
-
getBLEFirmwareVersion(): IVersionArray | null;
|
|
3173
|
-
isUsed(): boolean;
|
|
3174
|
-
hasDeviceAcquire(): boolean;
|
|
3175
|
-
isUsedHere(): boolean;
|
|
3176
|
-
isUsedElsewhere(): boolean;
|
|
3177
|
-
isBootloader(): boolean | undefined;
|
|
3178
|
-
isInitialized(): boolean | undefined;
|
|
3179
|
-
isSeedless(): boolean | undefined;
|
|
3180
|
-
isUnacquired(): boolean;
|
|
3181
|
-
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
3182
|
-
hasUsePassphrase(): boolean | undefined;
|
|
3183
|
-
checkDeviceId(deviceId: string): boolean;
|
|
3184
|
-
lockDevice(): Promise<_onekeyfe_hd_transport.Success>;
|
|
3185
|
-
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
3186
|
-
unlockDevice(): Promise<_onekeyfe_hd_transport.Features>;
|
|
3187
|
-
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
3188
|
-
}
|
|
3189
|
-
|
|
3190
3575
|
type UiPromiseResponse = UiResponseEvent | {
|
|
3191
3576
|
type: typeof DEVICE.DISCONNECT;
|
|
3192
3577
|
payload?: undefined;
|
|
@@ -3196,13 +3581,14 @@ type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromise
|
|
|
3196
3581
|
}>, T, Device>;
|
|
3197
3582
|
|
|
3198
3583
|
declare const LogBlockEvent: Set<string>;
|
|
3584
|
+
declare function getLogBlockLabel(message: unknown): string | undefined;
|
|
3199
3585
|
|
|
3200
3586
|
declare const executeCallback: (id: string, ...args: any[]) => void;
|
|
3201
3587
|
declare const cleanupCallback: (id: string) => void;
|
|
3202
3588
|
|
|
3203
3589
|
interface InjectApi {
|
|
3204
3590
|
call: CallMethod;
|
|
3205
|
-
eventEmitter: EventEmitter;
|
|
3591
|
+
eventEmitter: EventEmitter$1;
|
|
3206
3592
|
init: CoreApi['init'];
|
|
3207
3593
|
updateSettings: CoreApi['updateSettings'];
|
|
3208
3594
|
dispose: CoreApi['dispose'];
|
|
@@ -3216,24 +3602,6 @@ interface TopLevelInjectApi {
|
|
|
3216
3602
|
call: CoreApi['call'];
|
|
3217
3603
|
}
|
|
3218
3604
|
|
|
3219
|
-
declare class Core extends EventEmitter$1 {
|
|
3220
|
-
private tracingContext;
|
|
3221
|
-
readonly sdkInstanceId: string;
|
|
3222
|
-
private requestQueue;
|
|
3223
|
-
private prePendingCallPromise;
|
|
3224
|
-
private methodSynchronize;
|
|
3225
|
-
constructor();
|
|
3226
|
-
private getCoreContext;
|
|
3227
|
-
handleMessage(message: CoreMessage): Promise<any>;
|
|
3228
|
-
dispose(): void;
|
|
3229
|
-
}
|
|
3230
|
-
declare const init: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
3231
|
-
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
3232
|
-
env: ConnectSettings['env'];
|
|
3233
|
-
Transport: any;
|
|
3234
|
-
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
3235
|
-
}) => void;
|
|
3236
|
-
|
|
3237
3605
|
type LogMessage = {
|
|
3238
3606
|
level: string;
|
|
3239
3607
|
prefix: string;
|
|
@@ -3286,41 +3654,7 @@ declare const normalizeVersionArray: (version: number[]) => number[];
|
|
|
3286
3654
|
declare const versionSplit: (version: string) => number[];
|
|
3287
3655
|
declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
|
|
3288
3656
|
|
|
3289
|
-
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | 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<"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<"Success"> | 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">;
|
|
3290
|
-
|
|
3291
|
-
declare function generateSdkInstanceId(): string;
|
|
3292
|
-
declare function generateInstanceId(type: string, sdkInstanceId?: string): string;
|
|
3293
|
-
interface RequestContext {
|
|
3294
|
-
responseID: number;
|
|
3295
|
-
sdkInstanceId?: string;
|
|
3296
|
-
methodName: string;
|
|
3297
|
-
connectId?: string;
|
|
3298
|
-
deviceInstanceId?: string;
|
|
3299
|
-
commandsInstanceId?: string;
|
|
3300
|
-
parentResponseID?: number;
|
|
3301
|
-
startTime: number;
|
|
3302
|
-
endTime?: number;
|
|
3303
|
-
status?: 'pending' | 'running' | 'success' | 'error' | 'cancelled';
|
|
3304
|
-
error?: string;
|
|
3305
|
-
}
|
|
3306
|
-
interface SdkTracingContext {
|
|
3307
|
-
sdkInstanceId: string;
|
|
3308
|
-
createdAt: number;
|
|
3309
|
-
activeRequests: Map<number, RequestContext>;
|
|
3310
|
-
}
|
|
3311
|
-
declare function createSdkTracingContext(): SdkTracingContext;
|
|
3312
|
-
declare function createRequestContext(responseID: number, methodName: string, options?: {
|
|
3313
|
-
sdkInstanceId?: string;
|
|
3314
|
-
connectId?: string;
|
|
3315
|
-
deviceInstanceId?: string;
|
|
3316
|
-
commandsInstanceId?: string;
|
|
3317
|
-
parentResponseID?: number;
|
|
3318
|
-
}): RequestContext;
|
|
3319
|
-
declare function updateRequestContext(responseID: number, updates: Partial<RequestContext>): void;
|
|
3320
|
-
declare function completeRequestContext(responseID: number, error?: Error): void;
|
|
3321
|
-
declare function getActiveRequestsByDeviceInstance(deviceInstanceId: string): RequestContext[];
|
|
3322
|
-
declare function formatRequestContext(context: RequestContext): string;
|
|
3323
|
-
declare function cleanupSdkInstance(sdkInstanceId: string): void;
|
|
3657
|
+
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"Features"> | TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"DevFirmwareInstallProgress"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"DevFirmwareUpdateStatus"> | 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<"TxDetailsAmount"> | TypedResponseMessage<"TxDetailsNetwork"> | TypedResponseMessage<"TxDetailsAddress"> | TypedResponseMessage<"TxDetailsGeneral"> | TypedResponseMessage<"DevFirmwareImageInfo"> | TypedResponseMessage<"DevInfoTargets"> | TypedResponseMessage<"DevInfoTypes"> | TypedResponseMessage<"DevHardwareInfo"> | TypedResponseMessage<"DevMainMcuInfo"> | TypedResponseMessage<"DevBluetoothInfo"> | TypedResponseMessage<"DevSEInfo"> | TypedResponseMessage<"DevStatus"> | TypedResponseMessage<"DevFirmwareTarget"> | TypedResponseMessage<"DevFirmwareUpdateStatusEntry"> | TypedResponseMessage<"FilesystemFile"> | TypedResponseMessage<"Setup"> | TypedResponseMessage<"NewDevice"> | TypedResponseMessage<"Restore"> | TypedResponseMessage<"DeviceFirmwareTarget"> | TypedResponseMessage<"DeviceFirmwareUpdateStatusEntry"> | 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<"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<"SetBusy"> | TypedResponseMessage<"GetFirmwareHash"> | TypedResponseMessage<"FirmwareHash"> | TypedResponseMessage<"GetNonce"> | TypedResponseMessage<"Nonce"> | TypedResponseMessage<"WriteSEPrivateKey"> | TypedResponseMessage<"UnlockPath"> | TypedResponseMessage<"UnlockedPathRequest"> | TypedResponseMessage<"TxDetailsPage"> | TypedResponseMessage<"GetProtoVersion"> | TypedResponseMessage<"ProtoVersion"> | TypedResponseMessage<"DevReboot"> | TypedResponseMessage<"DeviceReboot"> | TypedResponseMessage<"DevGetDeviceInfo"> | TypedResponseMessage<"DeviceGetDeviceInfo"> | TypedResponseMessage<"DevFirmwareUpdate"> | TypedResponseMessage<"DeviceFirmwareUpdate"> | TypedResponseMessage<"DeviceFirmwareInstallProgress"> | TypedResponseMessage<"DevGetFirmwareUpdateStatus"> | TypedResponseMessage<"DeviceGetFirmwareUpdateStatus"> | TypedResponseMessage<"DeviceFirmwareUpdateStatus"> | TypedResponseMessage<"FactoryDeviceInfoSettings"> | TypedResponseMessage<"FactoryGetDeviceInfo"> | TypedResponseMessage<"FactoryDeviceInfo"> | TypedResponseMessage<"FilesystemFixPermission"> | TypedResponseMessage<"FilesystemPathInfo"> | TypedResponseMessage<"FilesystemPathInfoQuery"> | TypedResponseMessage<"FilesystemFileRead"> | TypedResponseMessage<"FilesystemFileWrite"> | TypedResponseMessage<"FilesystemFileDelete"> | TypedResponseMessage<"FilesystemDir"> | TypedResponseMessage<"FilesystemDirList"> | TypedResponseMessage<"FilesystemDirMake"> | TypedResponseMessage<"FilesystemDirRemove"> | TypedResponseMessage<"FilesystemFormat"> | TypedResponseMessage<"GetOnboardingStatus"> | TypedResponseMessage<"OnboardingStatus">;
|
|
3324
3658
|
|
|
3325
3659
|
declare const getDeviceType: (features?: Features) => IDeviceType;
|
|
3326
3660
|
declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
|
|
@@ -3328,6 +3662,7 @@ declare const getDeviceBleName: (features?: Features) => string | null;
|
|
|
3328
3662
|
declare const getDeviceUUID: (features: Features) => string;
|
|
3329
3663
|
declare const getDeviceLabel: (features?: Features) => string | null;
|
|
3330
3664
|
declare const getMethodVersionRange: (features: Features | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
|
|
3665
|
+
declare const isMethodVersionRangeUnsupported: (versionRange?: IVersionRange) => boolean;
|
|
3331
3666
|
declare const getFirmwareType: (features: Features | undefined) => EFirmwareType;
|
|
3332
3667
|
|
|
3333
3668
|
declare const getDeviceFirmwareVersion: (features: Features | undefined) => IVersionArray;
|
|
@@ -3337,13 +3672,16 @@ declare const getDeviceBoardloaderVersion: (features: Features) => IVersionArray
|
|
|
3337
3672
|
|
|
3338
3673
|
declare const FIRMWARE_FIELDS: readonly ["firmware", "firmware-v2", "firmware-v8", "firmware-btc-v8"];
|
|
3339
3674
|
type IFirmwareField = (typeof FIRMWARE_FIELDS)[number];
|
|
3340
|
-
type
|
|
3675
|
+
type ProtocolV1MessageSchema = 'v1CurrentSchema' | 'v1LegacySchema';
|
|
3676
|
+
type ProtobufMessageSchema = ProtocolV1MessageSchema | 'v2Schema';
|
|
3341
3677
|
declare class DataManager {
|
|
3342
|
-
static deviceMap: DeviceTypeMap
|
|
3678
|
+
static deviceMap: DeviceTypeMap & {
|
|
3679
|
+
[k: string]: DeviceTypeMap[keyof DeviceTypeMap] | undefined;
|
|
3680
|
+
};
|
|
3343
3681
|
static assets: AssetsMap | null;
|
|
3344
3682
|
static settings: ConnectSettings;
|
|
3345
3683
|
static messages: {
|
|
3346
|
-
[
|
|
3684
|
+
[schema in ProtobufMessageSchema]: JSON;
|
|
3347
3685
|
};
|
|
3348
3686
|
static lastCheckTimestamp: number;
|
|
3349
3687
|
static getFirmwareStatus: (features: Features, firmwareType: EFirmwareType) => IDeviceFirmwareStatus;
|
|
@@ -3376,7 +3714,7 @@ declare class DataManager {
|
|
|
3376
3714
|
static load(settings: ConnectSettings): Promise<void>;
|
|
3377
3715
|
static updateEnv(newEnv: ConnectSettings['env']): void;
|
|
3378
3716
|
static checkAndReloadData(): Promise<void>;
|
|
3379
|
-
static getProtobufMessages(
|
|
3717
|
+
static getProtobufMessages(schema?: ProtobufMessageSchema): JSON;
|
|
3380
3718
|
static getSettings(key?: undefined): ConnectSettings;
|
|
3381
3719
|
static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
|
|
3382
3720
|
static isBleConnect: (env: ConnectSettings['env']) => boolean;
|
|
@@ -3449,4 +3787,4 @@ declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, can
|
|
|
3449
3787
|
declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
|
|
3450
3788
|
declare const HardwareTopLevelSdk: () => CoreApi;
|
|
3451
3789
|
|
|
3452
|
-
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$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesPayload, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, 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, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, 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, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init as initCore, isBleConnect, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, preloadSessionCache, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, transportEnv, updateRequestContext, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
|
|
3790
|
+
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$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesPayload, 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, 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 };
|