@onekeyfe/hd-core 1.1.34-alpha.3 → 1.1.34-alpha.4
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__/DeviceCommands.test.ts +0 -217
- package/__tests__/evmLedgerLegacySafety.test.ts +4 -15
- package/__tests__/evmSignTransaction.test.ts +1 -1
- package/__tests__/evmSignTypedData.test.ts +1 -1
- package/__tests__/firmware-update/firmware-update-v2-download-before-boot.test.ts +31 -48
- package/__tests__/preInitialize.test.ts +0 -33
- package/dist/api/BaseMethod.d.ts +0 -12
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
- package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
- package/dist/api/FirmwareUpdate.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV2.d.ts +3 -14
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV3.d.ts +3 -10
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/GetFeatures.d.ts +1 -1
- package/dist/api/GetFeatures.d.ts.map +1 -1
- package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
- package/dist/api/SearchDevices.d.ts +1 -5
- package/dist/api/SearchDevices.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumGetAddress.d.ts +6 -2
- package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignMessage.d.ts +5 -2
- package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts +8 -5
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetAddress.d.ts +9 -2
- package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts +9 -2
- package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts +8 -2
- package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts +8 -2
- package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCGetAddress.d.ts +11 -1
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts +11 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts +15 -1
- 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 +11 -1
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts +11 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
- package/dist/api/btc/helpers/versionLimit.d.ts +11 -2
- 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/DeviceCancel.d.ts.map +1 -1
- package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
- package/dist/api/device/DeviceFullyUploadResource.d.ts +2 -1
- package/dist/api/device/DeviceFullyUploadResource.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/DeviceSettings.d.ts.map +1 -1
- package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -1
- package/dist/api/device/DeviceUnlock.d.ts +1 -1
- package/dist/api/device/DeviceUnlock.d.ts.map +1 -1
- package/dist/api/device/DeviceUpdateBootloader.d.ts +1 -7
- package/dist/api/device/DeviceUpdateBootloader.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/device/DeviceWipe.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 +8 -2
- 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/FirmwareUpdateBaseMethod.d.ts +1 -10
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
- package/dist/api/firmware/bootloaderHelper.d.ts.map +1 -1
- package/dist/api/firmware/getBinary.d.ts +0 -11
- package/dist/api/firmware/getBinary.d.ts.map +1 -1
- package/dist/api/firmware/updateBootloader.d.ts +0 -2
- package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
- package/dist/api/firmware/uploadFirmware.d.ts +1 -9
- package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
- package/dist/api/helpers/batchGetPublickeys.d.ts +0 -3
- package/dist/api/helpers/batchGetPublickeys.d.ts.map +1 -1
- package/dist/api/index.d.ts +0 -29
- 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 +0 -4
- package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
- package/dist/api/neo/NeoGetAddress.d.ts +8 -2
- package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
- package/dist/api/neo/NeoSignTransaction.d.ts +8 -2
- package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
- package/dist/api/nervos/NervosGetAddress.d.ts +9 -2
- package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
- package/dist/api/nervos/NervosSignTransaction.d.ts +12 -9
- package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
- package/dist/api/nexa/NexaGetAddress.d.ts +8 -2
- package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
- package/dist/api/nexa/NexaSignTransaction.d.ts +9 -2
- package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
- package/dist/api/polkadot/PolkadotGetAddress.d.ts +0 -3
- package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
- package/dist/api/polkadot/networks.d.ts +0 -3
- package/dist/api/polkadot/networks.d.ts.map +1 -1
- package/dist/api/scdo/ScdoGetAddress.d.ts +6 -2
- package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignMessage.d.ts +5 -2
- package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignTransaction.d.ts +5 -2
- package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
- package/dist/api/solana/SolGetAddress.d.ts +0 -1
- package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
- package/dist/api/solana/SolSignMessage.d.ts +0 -3
- package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts +0 -3
- package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignTransaction.d.ts +0 -6
- package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
- package/dist/api/stellar/StellarGetAddress.d.ts +1 -2
- package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts +2 -3
- package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
- package/dist/api/sui/SuiGetAddress.d.ts +0 -3
- package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
- package/dist/api/sui/SuiGetPublicKey.d.ts +0 -3
- package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
- package/dist/api/sui/SuiSignMessage.d.ts +0 -3
- package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
- package/dist/api/sui/SuiSignTransaction.d.ts +2 -5
- package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
- package/dist/api/ton/TonGetAddress.d.ts +0 -3
- package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
- package/dist/api/ton/TonSignData.d.ts +0 -1
- package/dist/api/ton/TonSignData.d.ts.map +1 -1
- package/dist/api/ton/TonSignMessage.d.ts +0 -3
- package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
- package/dist/api/ton/TonSignProof.d.ts +0 -3
- package/dist/api/ton/TonSignProof.d.ts.map +1 -1
- package/dist/api/tron/TronSignMessage.d.ts +0 -3
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts +0 -3
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
- package/dist/api/utils.d.ts +1 -2
- package/dist/api/utils.d.ts.map +1 -1
- package/dist/constants/index.d.ts +1 -2
- package/dist/constants/index.d.ts.map +1 -1
- package/dist/core/RequestQueue.d.ts +1 -19
- package/dist/core/RequestQueue.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -4
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +5 -9
- 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 +4 -5
- package/dist/data-manager/TransportManager.d.ts.map +1 -1
- package/dist/data-manager/connectSettings.d.ts.map +1 -1
- package/dist/device/Device.d.ts +16 -60
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +14 -16
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DeviceConnector.d.ts +1 -2
- package/dist/device/DeviceConnector.d.ts.map +1 -1
- package/dist/device/DevicePool.d.ts +2 -4
- package/dist/device/DevicePool.d.ts.map +1 -1
- package/dist/events/call.d.ts +0 -7
- package/dist/events/call.d.ts.map +1 -1
- package/dist/events/core.d.ts +2 -2
- package/dist/events/core.d.ts.map +1 -1
- package/dist/events/device.d.ts +2 -11
- package/dist/events/device.d.ts.map +1 -1
- package/dist/events/iframe.d.ts +0 -1
- package/dist/events/iframe.d.ts.map +1 -1
- package/dist/events/logBlockEvent.d.ts +0 -1
- package/dist/events/logBlockEvent.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +2 -26
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/index.d.ts +451 -1797
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5556 -26855
- package/dist/inject.d.ts +2 -3
- package/dist/inject.d.ts.map +1 -1
- package/dist/lowLevelInject.d.ts +1 -2
- package/dist/lowLevelInject.d.ts.map +1 -1
- package/dist/topLevelInject.d.ts.map +1 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts +2 -4
- package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/deviceSettings.d.ts +0 -9
- package/dist/types/api/deviceSettings.d.ts.map +1 -1
- package/dist/types/api/deviceUnlock.d.ts +1 -1
- package/dist/types/api/deviceUnlock.d.ts.map +1 -1
- package/dist/types/api/deviceUpdateBootloader.d.ts +1 -6
- package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +1 -4
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +1 -114
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/getFeatures.d.ts.map +1 -1
- package/dist/types/api/getOnekeyFeatures.d.ts.map +1 -1
- package/dist/types/api/getPassphraseState.d.ts +1 -2
- package/dist/types/api/getPassphraseState.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +2 -48
- package/dist/types/api/index.d.ts.map +1 -1
- 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 +5 -207
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/params.d.ts +0 -3
- package/dist/types/params.d.ts.map +1 -1
- package/dist/types/settings.d.ts +0 -33
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/capabilitieUtils.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts +9 -17
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts +8 -10
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/deviceSettings.d.ts +0 -2
- package/dist/utils/deviceSettings.d.ts.map +1 -1
- package/dist/utils/deviceVersionUtils.d.ts +5 -6
- package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
- package/dist/utils/findDefectiveBatchDevice.d.ts +1 -1
- package/dist/utils/homescreen.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -3
- 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/dist/utils/tracing.d.ts.map +1 -1
- package/dist/utils/versionUtils.d.ts +1 -1
- package/package.json +4 -4
- package/src/api/BaseMethod.ts +23 -60
- package/src/api/CheckAllFirmwareRelease.ts +3 -16
- package/src/api/CheckBootloaderRelease.ts +2 -1
- package/src/api/CheckFirmwareRelease.ts +2 -1
- package/src/api/FirmwareUpdate.ts +7 -15
- package/src/api/FirmwareUpdateV2.ts +148 -354
- package/src/api/FirmwareUpdateV3.ts +62 -376
- package/src/api/GetFeatures.ts +4 -12
- package/src/api/GetOnekeyFeatures.ts +3 -15
- package/src/api/GetPassphraseState.ts +10 -9
- package/src/api/PromptWebDeviceAccess.ts +1 -10
- package/src/api/SearchDevices.ts +3 -33
- package/src/api/alephium/AlephiumGetAddress.ts +2 -6
- package/src/api/alephium/AlephiumSignMessage.ts +1 -6
- package/src/api/alephium/AlephiumSignTransaction.ts +4 -15
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +21 -25
- package/src/api/aptos/AptosGetAddress.ts +3 -2
- package/src/api/benfen/BenfenGetAddress.ts +7 -11
- package/src/api/benfen/BenfenGetPublicKey.ts +2 -6
- package/src/api/benfen/BenfenSignMessage.ts +1 -6
- package/src/api/benfen/BenfenSignTransaction.ts +1 -6
- package/src/api/btc/BTCGetPublicKey.ts +2 -3
- package/src/api/btc/BTCSignPsbt.ts +2 -1
- package/src/api/btc/helpers/versionLimit.ts +1 -7
- package/src/api/cardano/CardanoSignTransaction.ts +4 -2
- package/src/api/conflux/ConfluxSignTransaction.ts +2 -5
- package/src/api/device/DeviceCancel.ts +0 -1
- package/src/api/device/DeviceChangePin.ts +0 -24
- package/src/api/device/DeviceFullyUploadResource.ts +7 -6
- package/src/api/device/DeviceLock.ts +3 -2
- package/src/api/device/DeviceRebootToBoardloader.ts +1 -11
- package/src/api/device/DeviceRebootToBootloader.ts +1 -11
- package/src/api/device/DeviceSettings.ts +0 -121
- package/src/api/device/DeviceSupportFeatures.ts +13 -2
- package/src/api/device/DeviceUnlock.ts +0 -9
- package/src/api/device/DeviceUpdateBootloader.ts +11 -175
- package/src/api/device/DeviceUploadResource.ts +5 -4
- package/src/api/device/DeviceVerify.ts +2 -1
- package/src/api/device/DeviceWipe.ts +0 -19
- package/src/api/dynex/DnxGetAddress.ts +0 -6
- package/src/api/dynex/DnxSignTransaction.ts +0 -6
- package/src/api/evm/EVMGetAddress.ts +1 -1
- package/src/api/evm/EVMGetPublicKey.ts +4 -3
- package/src/api/evm/EVMSignMessage.ts +1 -1
- package/src/api/evm/EVMSignMessageEIP712.ts +1 -14
- package/src/api/evm/EVMSignTransaction.ts +1 -1
- package/src/api/evm/EVMSignTypedData.ts +18 -30
- package/src/api/evm/EVMVerifyMessage.ts +1 -1
- package/src/api/evm/latest/signTypedHash.ts +4 -2
- package/src/api/evm/legacyV1/getAddress.ts +3 -5
- package/src/api/evm/legacyV1/getPublicKey.ts +3 -5
- package/src/api/evm/legacyV1/signMessage.ts +3 -5
- package/src/api/evm/legacyV1/signTypedData.ts +8 -9
- package/src/api/evm/legacyV1/signTypedHash.ts +7 -7
- package/src/api/evm/legacyV1/verifyMessage.ts +3 -5
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +15 -83
- package/src/api/firmware/bootloaderHelper.ts +2 -3
- package/src/api/firmware/getBinary.ts +1 -1
- package/src/api/firmware/releaseHelper.ts +3 -3
- package/src/api/firmware/updateBootloader.ts +4 -19
- package/src/api/firmware/uploadFirmware.ts +34 -148
- package/src/api/helpers/batchGetPublickeys.ts +6 -51
- package/src/api/index.ts +0 -32
- package/src/api/kaspa/KaspaSignTransaction.ts +3 -2
- package/src/api/lightning/LnurlAuth.ts +0 -4
- package/src/api/neo/NeoGetAddress.ts +1 -6
- package/src/api/neo/NeoSignTransaction.ts +1 -6
- package/src/api/nervos/NervosGetAddress.ts +2 -6
- package/src/api/nervos/NervosSignTransaction.ts +4 -14
- package/src/api/nexa/NexaGetAddress.ts +2 -6
- package/src/api/nexa/NexaSignTransaction.ts +12 -11
- package/src/api/polkadot/networks.ts +0 -9
- package/src/api/scdo/ScdoGetAddress.ts +2 -6
- package/src/api/scdo/ScdoSignMessage.ts +1 -6
- package/src/api/scdo/ScdoSignTransaction.ts +2 -6
- package/src/api/solana/SolGetAddress.ts +0 -4
- package/src/api/solana/SolSignMessage.ts +0 -3
- package/src/api/solana/SolSignOffchainMessage.ts +0 -3
- package/src/api/solana/SolSignTransaction.ts +0 -6
- package/src/api/stellar/StellarGetAddress.ts +1 -10
- package/src/api/stellar/StellarSignTransaction.ts +1 -14
- package/src/api/sui/SuiGetAddress.ts +3 -5
- package/src/api/sui/SuiGetPublicKey.ts +0 -3
- package/src/api/sui/SuiSignMessage.ts +0 -3
- package/src/api/sui/SuiSignTransaction.ts +12 -14
- package/src/api/ton/TonGetAddress.ts +0 -3
- package/src/api/ton/TonSignData.ts +3 -6
- package/src/api/ton/TonSignMessage.ts +5 -6
- package/src/api/ton/TonSignProof.ts +0 -3
- package/src/api/tron/TronSignMessage.ts +1 -4
- package/src/api/tron/TronSignTransaction.ts +0 -3
- package/src/api/utils.ts +3 -7
- package/src/api/xrp/XrpSignTransaction.ts +1 -1
- package/src/constants/index.ts +1 -7
- package/src/core/RequestQueue.ts +4 -124
- package/src/core/index.ts +116 -255
- package/src/data-manager/DataManager.ts +49 -61
- package/src/data-manager/MessagesConfig.ts +14 -14
- package/src/data-manager/TransportManager.ts +12 -38
- package/src/data-manager/connectSettings.ts +0 -15
- package/src/device/Device.ts +164 -759
- package/src/device/DeviceCommands.ts +36 -245
- package/src/device/DeviceConnector.ts +4 -29
- package/src/device/DevicePool.ts +21 -69
- package/src/events/call.ts +0 -6
- package/src/events/core.ts +0 -2
- package/src/events/device.ts +1 -17
- package/src/events/iframe.ts +0 -1
- package/src/events/logBlockEvent.ts +0 -30
- package/src/events/ui-request.ts +2 -32
- package/src/index.ts +0 -9
- package/src/inject.ts +3 -75
- package/src/lowLevelInject.ts +1 -8
- package/src/topLevelInject.ts +1 -7
- package/src/types/api/checkAllFirmwareRelease.ts +2 -4
- package/src/types/api/deviceSettings.ts +0 -9
- package/src/types/api/deviceUnlock.ts +1 -1
- package/src/types/api/deviceUpdateBootloader.ts +1 -10
- package/src/types/api/export.ts +0 -25
- package/src/types/api/firmwareUpdate.ts +1 -163
- package/src/types/api/getFeatures.ts +0 -3
- package/src/types/api/getOnekeyFeatures.ts +0 -3
- package/src/types/api/getPassphraseState.ts +2 -10
- package/src/types/api/index.ts +2 -89
- package/src/types/api/searchDevices.ts +2 -2
- package/src/types/device.ts +5 -266
- package/src/types/params.ts +0 -11
- package/src/types/settings.ts +29 -54
- package/src/utils/capabilitieUtils.ts +2 -1
- package/src/utils/deviceFeaturesUtils.ts +84 -122
- package/src/utils/deviceInfoUtils.ts +87 -38
- package/src/utils/deviceSettings.ts +0 -48
- package/src/utils/deviceVersionUtils.ts +62 -25
- package/src/utils/findDefectiveBatchDevice.ts +8 -8
- package/src/utils/homescreen.ts +0 -10
- package/src/utils/index.ts +0 -4
- package/src/utils/tracing.ts +1 -3
- package/__tests__/AllNetworkGetAddressBase.tracing.test.ts +0 -75
- package/__tests__/RequestQueue.test.ts +0 -140
- package/__tests__/UploadPortfolio.test.ts +0 -46
- package/__tests__/connectSettings.test.ts +0 -61
- package/__tests__/device-lifecycle-events.test.ts +0 -117
- package/__tests__/device-pool-state.test.ts +0 -132
- package/__tests__/device-settings.test.ts +0 -286
- package/__tests__/device-state-mapper.test.ts +0 -229
- package/__tests__/device-utils.test.ts +0 -106
- package/__tests__/device-wallet-session-store.test.ts +0 -191
- package/__tests__/filesystemValidation.test.ts +0 -53
- package/__tests__/firmware-update/firmware-artifact-source.test.ts +0 -119
- package/__tests__/firmware-update/firmware-checkpoint.test.ts +0 -105
- package/__tests__/firmware-update/firmware-host-binding.test.ts +0 -73
- package/__tests__/firmware-update/firmware-update-capabilities.test.ts +0 -17
- package/__tests__/firmware-update/firmware-update-plan.test.ts +0 -358
- package/__tests__/firmware-update/firmware-update-prepared-plan.test.ts +0 -200
- package/__tests__/firmware-update/firmware-update-recovery.test.ts +0 -81
- package/__tests__/firmware-update/firmware-upload-source.test.ts +0 -70
- package/__tests__/get-device-state.test.ts +0 -403
- package/__tests__/logBlockEvent.test.ts +0 -61
- package/__tests__/logger.test.ts +0 -34
- package/__tests__/open-wallet-session.test.ts +0 -565
- package/__tests__/pro2Wallpaper.test.ts +0 -39
- package/__tests__/protocol-v2-bootloader-mode.test.ts +0 -37
- package/__tests__/protocol-v2-firmware-targets.test.ts +0 -19
- package/__tests__/protocol-v2.test.ts +0 -6008
- package/__tests__/protocolV2FileWrite.test.ts +0 -67
- package/__tests__/public-pro2-api-boundary.test.ts +0 -66
- package/__tests__/search-devices.test.ts +0 -136
- package/dist/api/ClearSessionCache.d.ts +0 -9
- package/dist/api/ClearSessionCache.d.ts.map +0 -1
- package/dist/api/DirList.d.ts +0 -10
- package/dist/api/DirList.d.ts.map +0 -1
- package/dist/api/DirMake.d.ts +0 -9
- package/dist/api/DirMake.d.ts.map +0 -1
- package/dist/api/DirRemove.d.ts +0 -9
- package/dist/api/DirRemove.d.ts.map +0 -1
- package/dist/api/FileDelete.d.ts +0 -9
- package/dist/api/FileDelete.d.ts.map +0 -1
- package/dist/api/FileRead.d.ts +0 -19
- package/dist/api/FileRead.d.ts.map +0 -1
- package/dist/api/FileWrite.d.ts +0 -25
- package/dist/api/FileWrite.d.ts.map +0 -1
- package/dist/api/FirmwareUpdateV4.d.ts +0 -75
- package/dist/api/FirmwareUpdateV4.d.ts.map +0 -1
- package/dist/api/GetDeviceState.d.ts +0 -7
- package/dist/api/GetDeviceState.d.ts.map +0 -1
- package/dist/api/OpenWalletSession.d.ts +0 -14
- package/dist/api/OpenWalletSession.d.ts.map +0 -1
- package/dist/api/PathInfo.d.ts +0 -10
- package/dist/api/PathInfo.d.ts.map +0 -1
- package/dist/api/UploadPortfolio.d.ts +0 -18
- package/dist/api/UploadPortfolio.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareArtifactSource.d.ts +0 -26
- package/dist/api/firmware/FirmwareArtifactSource.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareCheckpoint.d.ts +0 -15
- package/dist/api/firmware/FirmwareCheckpoint.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareHostBinding.d.ts +0 -6
- package/dist/api/firmware/FirmwareHostBinding.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts +0 -3
- package/dist/api/firmware/FirmwareUpdateCapabilities.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts +0 -29
- package/dist/api/firmware/FirmwareUpdatePlan.d.ts.map +0 -1
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts +0 -25
- package/dist/api/firmware/FirmwareUpdatePreparedPlan.d.ts.map +0 -1
- package/dist/api/firmware/progressThrottle.d.ts +0 -3
- package/dist/api/firmware/progressThrottle.d.ts.map +0 -1
- package/dist/api/helpers/filesystemValidation.d.ts +0 -10
- package/dist/api/helpers/filesystemValidation.d.ts.map +0 -1
- package/dist/api/helpers/protocolV2FileWrite.d.ts +0 -33
- package/dist/api/helpers/protocolV2FileWrite.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +0 -6
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +0 -7
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +0 -7
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +0 -7
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +0 -6
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts +0 -28
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceReboot.d.ts +0 -7
- package/dist/api/protocol-v2/DeviceReboot.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceSessionOpen.d.ts +0 -28
- package/dist/api/protocol-v2/DeviceSessionOpen.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceSettingsGet.d.ts +0 -6
- package/dist/api/protocol-v2/DeviceSettingsGet.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts +0 -16
- package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceSettingsSet.d.ts +0 -12
- package/dist/api/protocol-v2/DeviceSettingsSet.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts +0 -6
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +0 -26
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +0 -1
- package/dist/api/protocol-v2/FilesystemFormat.d.ts +0 -6
- package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +0 -1
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts +0 -6
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +0 -1
- package/dist/api/protocol-v2/Ping.d.ts +0 -8
- package/dist/api/protocol-v2/Ping.d.ts.map +0 -1
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +0 -6
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +0 -1
- package/dist/api/protocol-v2/helpers.d.ts +0 -42
- package/dist/api/protocol-v2/helpers.d.ts.map +0 -1
- package/dist/core/deviceEventRegistration.d.ts +0 -11
- package/dist/core/deviceEventRegistration.d.ts.map +0 -1
- package/dist/device/DeviceFeaturesState.d.ts +0 -4
- package/dist/device/DeviceFeaturesState.d.ts.map +0 -1
- package/dist/device/DeviceStateMapper.d.ts +0 -13
- package/dist/device/DeviceStateMapper.d.ts.map +0 -1
- package/dist/device/DeviceStateProjector.d.ts +0 -7
- package/dist/device/DeviceStateProjector.d.ts.map +0 -1
- package/dist/device/DeviceStateStore.d.ts +0 -21
- package/dist/device/DeviceStateStore.d.ts.map +0 -1
- package/dist/device/DeviceWalletSessionStore.d.ts +0 -15
- package/dist/device/DeviceWalletSessionStore.d.ts.map +0 -1
- package/dist/device/cloneDeviceState.d.ts +0 -2
- package/dist/device/cloneDeviceState.d.ts.map +0 -1
- package/dist/device/deviceIdentity.d.ts +0 -5
- package/dist/device/deviceIdentity.d.ts.map +0 -1
- package/dist/deviceProfile/buildDeviceFeatures.d.ts +0 -12
- package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +0 -1
- package/dist/deviceProfile/index.d.ts +0 -2
- package/dist/deviceProfile/index.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/deviceSession.d.ts +0 -7
- package/dist/protocols/protocol-v2/deviceSession.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/features.d.ts +0 -88
- package/dist/protocols/protocol-v2/features.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/firmware.d.ts +0 -15
- package/dist/protocols/protocol-v2/firmware.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/index.d.ts +0 -5
- package/dist/protocols/protocol-v2/index.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/lockedError.d.ts +0 -2
- package/dist/protocols/protocol-v2/lockedError.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts +0 -16
- package/dist/protocols/protocol-v2/settingsUnlockPolicy.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/uiInteraction.d.ts +0 -39
- package/dist/protocols/protocol-v2/uiInteraction.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/unlockRetry.d.ts +0 -11
- package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +0 -1
- package/dist/protocols/protocol-v2/walletSession.d.ts +0 -21
- package/dist/protocols/protocol-v2/walletSession.d.ts.map +0 -1
- package/dist/types/api/firmwareUpdateCapabilities.d.ts +0 -13
- package/dist/types/api/firmwareUpdateCapabilities.d.ts.map +0 -1
- package/dist/types/api/firmwareUpdatePlan.d.ts +0 -35
- package/dist/types/api/firmwareUpdatePlan.d.ts.map +0 -1
- package/dist/types/api/firmwareUpdatePreparedPlan.d.ts +0 -43
- package/dist/types/api/firmwareUpdatePreparedPlan.d.ts.map +0 -1
- package/dist/types/api/getDeviceState.d.ts +0 -12
- package/dist/types/api/getDeviceState.d.ts.map +0 -1
- package/dist/types/api/openWalletSession.d.ts +0 -35
- package/dist/types/api/openWalletSession.d.ts.map +0 -1
- package/dist/types/api/protocolV2.d.ts +0 -113
- package/dist/types/api/protocolV2.d.ts.map +0 -1
- package/dist/types/api/sessionCache.d.ts +0 -10
- package/dist/types/api/sessionCache.d.ts.map +0 -1
- package/dist/utils/deviceFeaturesCompat.d.ts +0 -13
- package/dist/utils/deviceFeaturesCompat.d.ts.map +0 -1
- package/dist/utils/pro2Wallpaper.d.ts +0 -12
- package/dist/utils/pro2Wallpaper.d.ts.map +0 -1
- package/src/api/ClearSessionCache.ts +0 -28
- package/src/api/DirList.ts +0 -33
- package/src/api/DirMake.ts +0 -23
- package/src/api/DirRemove.ts +0 -23
- package/src/api/FileDelete.ts +0 -23
- package/src/api/FileRead.ts +0 -183
- package/src/api/FileWrite.ts +0 -71
- package/src/api/FirmwareUpdateV4.ts +0 -2279
- package/src/api/GetDeviceState.ts +0 -55
- package/src/api/OpenWalletSession.ts +0 -211
- package/src/api/PathInfo.ts +0 -41
- package/src/api/UploadPortfolio.ts +0 -50
- package/src/api/firmware/FirmwareArtifactSource.ts +0 -278
- package/src/api/firmware/FirmwareCheckpoint.ts +0 -188
- package/src/api/firmware/FirmwareHostBinding.ts +0 -108
- package/src/api/firmware/FirmwareUpdateCapabilities.ts +0 -13
- package/src/api/firmware/FirmwareUpdatePlan.ts +0 -729
- package/src/api/firmware/FirmwareUpdatePreparedPlan.ts +0 -403
- package/src/api/firmware/progressThrottle.ts +0 -44
- package/src/api/helpers/filesystemValidation.ts +0 -112
- package/src/api/helpers/protocolV2FileWrite.ts +0 -193
- package/src/api/protocol-v2/DeviceFactoryInfoGet.ts +0 -20
- package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +0 -32
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +0 -61
- package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +0 -55
- package/src/api/protocol-v2/DeviceGetOnboardingStatus.ts +0 -18
- package/src/api/protocol-v2/DeviceInfoGet.ts +0 -145
- package/src/api/protocol-v2/DeviceReboot.ts +0 -26
- package/src/api/protocol-v2/DeviceSessionOpen.ts +0 -102
- package/src/api/protocol-v2/DeviceSettingsGet.ts +0 -18
- package/src/api/protocol-v2/DeviceSettingsPageShow.ts +0 -70
- package/src/api/protocol-v2/DeviceSettingsSet.ts +0 -44
- package/src/api/protocol-v2/DeviceStatusGet.ts +0 -16
- package/src/api/protocol-v2/DeviceUploadWallpaper.ts +0 -131
- package/src/api/protocol-v2/FilesystemFormat.ts +0 -19
- package/src/api/protocol-v2/FilesystemPermissionFix.ts +0 -16
- package/src/api/protocol-v2/Ping.ts +0 -18
- package/src/api/protocol-v2/ProtocolInfoRequest.ts +0 -16
- package/src/api/protocol-v2/helpers.ts +0 -203
- package/src/core/deviceEventRegistration.ts +0 -23
- package/src/data/messages/messages-protocol-v2.json +0 -13544
- package/src/device/DeviceFeaturesState.ts +0 -34
- package/src/device/DeviceStateMapper.ts +0 -348
- package/src/device/DeviceStateProjector.ts +0 -95
- package/src/device/DeviceStateStore.ts +0 -201
- package/src/device/DeviceWalletSessionStore.ts +0 -78
- package/src/device/cloneDeviceState.ts +0 -39
- package/src/device/deviceIdentity.ts +0 -18
- package/src/deviceProfile/buildDeviceFeatures.ts +0 -391
- package/src/deviceProfile/index.ts +0 -4
- package/src/protocols/protocol-v2/deviceSession.ts +0 -24
- package/src/protocols/protocol-v2/features.ts +0 -163
- package/src/protocols/protocol-v2/firmware.ts +0 -21
- package/src/protocols/protocol-v2/index.ts +0 -18
- package/src/protocols/protocol-v2/lockedError.ts +0 -10
- package/src/protocols/protocol-v2/settingsUnlockPolicy.ts +0 -61
- package/src/protocols/protocol-v2/uiInteraction.ts +0 -210
- package/src/protocols/protocol-v2/unlockRetry.ts +0 -76
- package/src/protocols/protocol-v2/walletSession.ts +0 -202
- package/src/types/api/firmwareUpdateCapabilities.ts +0 -13
- package/src/types/api/firmwareUpdatePlan.ts +0 -52
- package/src/types/api/firmwareUpdatePreparedPlan.ts +0 -55
- package/src/types/api/getDeviceState.ts +0 -19
- package/src/types/api/openWalletSession.ts +0 -54
- package/src/types/api/protocolV2.ts +0 -244
- package/src/types/api/sessionCache.ts +0 -14
- package/src/utils/deviceFeaturesCompat.ts +0 -173
- package/src/utils/pro2Wallpaper.ts +0 -109
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { DeviceStatus, ProtocolV2DeviceInfo } from '@onekeyfe/hd-transport';
|
|
2
|
-
import type { PROTO } from '../constants';
|
|
3
|
-
import type { ProtocolV2RuntimeMode } from '../protocols/protocol-v2/features';
|
|
4
|
-
import type { Features } from '../types';
|
|
5
|
-
export declare const buildProtocolV1FeaturesPayload: (protocolV1Features: PROTO.Features, previous?: Features) => Features;
|
|
6
|
-
export declare const buildProtocolV2FeaturesPayload: ({ deviceInfo, deviceStatus, previous, runtimeMode, }: {
|
|
7
|
-
deviceInfo?: ProtocolV2DeviceInfo | undefined;
|
|
8
|
-
deviceStatus?: DeviceStatus | undefined;
|
|
9
|
-
previous?: Features | undefined;
|
|
10
|
-
runtimeMode?: ProtocolV2RuntimeMode | undefined;
|
|
11
|
-
}) => Features;
|
|
12
|
-
//# sourceMappingURL=buildDeviceFeatures.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"buildDeviceFeatures.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/buildDeviceFeatures.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAEV,YAAY,EACZ,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,KAAK,EAAsB,QAAQ,EAAE,MAAM,UAAU,CAAC;AA6C7D,eAAO,MAAM,8BAA8B,uBACrB,cAAc,aACvB,QAAQ,KAClB,QA+HF,CAAC;AASF,eAAO,MAAM,8BAA8B;;;;;MAUvC,QAgLH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { DeviceSession } from '@onekeyfe/hd-transport';
|
|
2
|
-
export type CompleteDeviceSession = DeviceSession & {
|
|
3
|
-
session_id: string;
|
|
4
|
-
btc_test_address: string;
|
|
5
|
-
};
|
|
6
|
-
export declare function assertCompleteDeviceSession(message: DeviceSession): asserts message is CompleteDeviceSession;
|
|
7
|
-
//# sourceMappingURL=deviceSession.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deviceSession.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/deviceSession.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,OAAO,IAAI,qBAAqB,CAY1C"}
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
import type { DeviceInfoGet, DeviceSEInfo, DeviceStatus, ProtocolV2DeviceInfo } from '@onekeyfe/hd-transport';
|
|
2
|
-
import type { DeviceCommands } from '../../device/DeviceCommands';
|
|
3
|
-
export type { ProtocolV2DeviceInfo };
|
|
4
|
-
export type { DeviceFirmwareImageInfo as ProtocolV2FirmwareImageInfo } from '@onekeyfe/hd-transport';
|
|
5
|
-
export type { DeviceSEInfo as ProtocolV2SEInfo } from '@onekeyfe/hd-transport';
|
|
6
|
-
export type ProtocolV2SeStateLabel = 'BOOT' | 'APP_FACTORY' | 'APP';
|
|
7
|
-
export declare const getProtocolV2SeState: (se?: DeviceSEInfo) => ProtocolV2SeStateLabel | null;
|
|
8
|
-
export declare const getProtocolV2SeType: (se?: DeviceSEInfo) => string | null;
|
|
9
|
-
export type ProtocolV2RuntimeMode = 'normal' | 'bootloader';
|
|
10
|
-
export declare const getProtocolV2RuntimeMode: ({ deviceInfo: _deviceInfo, deviceStatusAvailable, }: {
|
|
11
|
-
deviceInfo?: ProtocolV2DeviceInfo | null | undefined;
|
|
12
|
-
deviceStatusAvailable: boolean;
|
|
13
|
-
}) => ProtocolV2RuntimeMode;
|
|
14
|
-
export declare const PROTOCOL_V2_FEATURES_DEVICE_INFO_REQUEST: {
|
|
15
|
-
targets: {
|
|
16
|
-
hw: boolean;
|
|
17
|
-
fw: boolean;
|
|
18
|
-
coprocessor: boolean;
|
|
19
|
-
se1: boolean;
|
|
20
|
-
se2: boolean;
|
|
21
|
-
se3: boolean;
|
|
22
|
-
se4: boolean;
|
|
23
|
-
};
|
|
24
|
-
types: {
|
|
25
|
-
version: boolean;
|
|
26
|
-
specific: boolean;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export declare const PROTOCOL_V2_VERSIONS_DEVICE_INFO_REQUEST: {
|
|
30
|
-
targets: {
|
|
31
|
-
hw: boolean;
|
|
32
|
-
fw: boolean;
|
|
33
|
-
coprocessor: boolean;
|
|
34
|
-
se1: boolean;
|
|
35
|
-
se2: boolean;
|
|
36
|
-
se3: boolean;
|
|
37
|
-
se4: boolean;
|
|
38
|
-
};
|
|
39
|
-
types: {
|
|
40
|
-
version: boolean;
|
|
41
|
-
specific: boolean;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
export declare const PROTOCOL_V2_FULL_DEVICE_INFO_REQUEST: {
|
|
45
|
-
targets: {
|
|
46
|
-
hw: boolean;
|
|
47
|
-
fw: boolean;
|
|
48
|
-
coprocessor: boolean;
|
|
49
|
-
se1: boolean;
|
|
50
|
-
se2: boolean;
|
|
51
|
-
se3: boolean;
|
|
52
|
-
se4: boolean;
|
|
53
|
-
};
|
|
54
|
-
types: {
|
|
55
|
-
version: boolean;
|
|
56
|
-
build_id: boolean;
|
|
57
|
-
hash: boolean;
|
|
58
|
-
specific: boolean;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
export declare const PROTOCOL_V2_DEVICE_INFO_REQUEST: {
|
|
62
|
-
targets: {
|
|
63
|
-
hw: boolean;
|
|
64
|
-
fw: boolean;
|
|
65
|
-
coprocessor: boolean;
|
|
66
|
-
se1: boolean;
|
|
67
|
-
se2: boolean;
|
|
68
|
-
se3: boolean;
|
|
69
|
-
se4: boolean;
|
|
70
|
-
};
|
|
71
|
-
types: {
|
|
72
|
-
version: boolean;
|
|
73
|
-
build_id: boolean;
|
|
74
|
-
hash: boolean;
|
|
75
|
-
specific: boolean;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
export declare const PROTOCOL_V2_DEVICE_INFO_TIMEOUT_MS: number;
|
|
79
|
-
export declare function requestProtocolV2DeviceInfo({ commands, timeoutMs, request, }: {
|
|
80
|
-
commands: DeviceCommands;
|
|
81
|
-
timeoutMs?: number;
|
|
82
|
-
request?: DeviceInfoGet;
|
|
83
|
-
}): Promise<ProtocolV2DeviceInfo>;
|
|
84
|
-
export declare function requestProtocolV2DeviceStatus({ commands, timeoutMs, }: {
|
|
85
|
-
commands: DeviceCommands;
|
|
86
|
-
timeoutMs?: number;
|
|
87
|
-
}): Promise<DeviceStatus>;
|
|
88
|
-
//# sourceMappingURL=features.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/features.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,YAAY,EAAE,oBAAoB,EAAE,CAAC;AACrC,YAAY,EAAE,uBAAuB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACrG,YAAY,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE/E,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,aAAa,GAAG,KAAK,CAAC;AAoBpE,eAAO,MAAM,oBAAoB,QAAS,YAAY,KAAG,sBAAsB,GAAG,IAYjF,CAAC;AAKF,eAAO,MAAM,mBAAmB,QAAS,YAAY,KAAG,MAAM,GAAG,IACrB,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAAG,QAAQ,GAAG,YAAY,CAAC;AAU5D,eAAO,MAAM,wBAAwB;;2BAKZ,OAAO;MAC5B,qBAGH,CAAC;AAEF,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;CAcpD,CAAC;AAMF,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;CAcpD,CAAC;AAEF,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;CAgBhD,CAAC;AAEF,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;CAAuC,CAAC;AACpF,eAAO,MAAM,kCAAkC,QAAY,CAAC;AAE5D,wBAAsB,2BAA2B,CAAC,EAChD,QAAQ,EACR,SAA8C,EAC9C,OAAkD,GACnD,EAAE;IACD,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAMhC;AAED,wBAAsB,6BAA6B,CAAC,EAClD,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,cAAc,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,YAAY,CAAC,CAOxB"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare const ProtocolV2FirmwareTargetType: {
|
|
2
|
-
readonly FW_MGMT_TARGET_INVALID: 0;
|
|
3
|
-
readonly FW_MGMT_TARGET_CRATE: 1;
|
|
4
|
-
readonly FW_MGMT_TARGET_ROMLOADER: 2;
|
|
5
|
-
readonly FW_MGMT_TARGET_BOOTLOADER: 3;
|
|
6
|
-
readonly FW_MGMT_TARGET_APPLICATION_P1: 4;
|
|
7
|
-
readonly FW_MGMT_TARGET_APPLICATION_P2: 5;
|
|
8
|
-
readonly FW_MGMT_TARGET_COPROCESSOR: 6;
|
|
9
|
-
readonly FW_MGMT_TARGET_SE01: 7;
|
|
10
|
-
readonly FW_MGMT_TARGET_SE02: 8;
|
|
11
|
-
readonly FW_MGMT_TARGET_SE03: 9;
|
|
12
|
-
readonly FW_MGMT_TARGET_SE04: 10;
|
|
13
|
-
};
|
|
14
|
-
export type ProtocolV2FirmwareTargetType = (typeof ProtocolV2FirmwareTargetType)[keyof typeof ProtocolV2FirmwareTargetType];
|
|
15
|
-
//# sourceMappingURL=firmware.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firmware.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/firmware.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;CAY/B,CAAC;AAIX,MAAM,MAAM,4BAA4B,GACtC,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,OAAO,4BAA4B,CAAC,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { PROTOCOL_V2_DEVICE_INFO_REQUEST, PROTOCOL_V2_DEVICE_INFO_TIMEOUT_MS, PROTOCOL_V2_FEATURES_DEVICE_INFO_REQUEST, PROTOCOL_V2_VERSIONS_DEVICE_INFO_REQUEST, getProtocolV2RuntimeMode, getProtocolV2SeState, getProtocolV2SeType, } from './features';
|
|
2
|
-
export type { ProtocolV2DeviceInfo, ProtocolV2FirmwareImageInfo, ProtocolV2SEInfo, ProtocolV2SeStateLabel, ProtocolV2RuntimeMode, } from './features';
|
|
3
|
-
export * from './firmware';
|
|
4
|
-
export * from './walletSession';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,+BAA+B,EAC/B,kCAAkC,EAClC,wCAAwC,EACxC,wCAAwC,EACxC,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,oBAAoB,EACpB,2BAA2B,EAC3B,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AACpB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lockedError.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/lockedError.ts"],"names":[],"mappings":"AAEA,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAO3D"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { DeviceSettings, DeviceSettingsPage } from '@onekeyfe/hd-transport';
|
|
2
|
-
import type { UnlockPolicy } from '../../api/BaseMethod';
|
|
3
|
-
import type { ProtocolV2InteractionDescriptor } from './uiInteraction';
|
|
4
|
-
export declare const getProtocolV2SettingsUnlockPolicy: (settings: DeviceSettings) => UnlockPolicy;
|
|
5
|
-
export type ProtocolV2SettingsOperation = {
|
|
6
|
-
kind: 'direct';
|
|
7
|
-
settings: DeviceSettings;
|
|
8
|
-
} | {
|
|
9
|
-
kind: 'page';
|
|
10
|
-
page: DeviceSettingsPage;
|
|
11
|
-
};
|
|
12
|
-
export declare const getProtocolV2SettingsBehavior: (operation: ProtocolV2SettingsOperation) => {
|
|
13
|
-
unlockPolicy: UnlockPolicy;
|
|
14
|
-
uiInteraction?: ProtocolV2InteractionDescriptor;
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=settingsUnlockPolicy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"settingsUnlockPolicy.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/settingsUnlockPolicy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,iBAAiB,CAAC;AASvE,eAAO,MAAM,iCAAiC,aAAc,cAAc,KAAG,YAGtD,CAAC;AAExB,MAAM,MAAM,2BAA2B,GACnC;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,QAAQ,EAAE,cAAc,CAAC;CAC1B,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,kBAAkB,CAAC;CAC1B,CAAC;AAEN,eAAO,MAAM,6BAA6B,cAC7B,2BAA2B,KACrC;IACD,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,CAAC,EAAE,+BAA+B,CAAC;CA8BjD,CAAC"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { CoreMessage, ProtocolV2UiCompletion } from '../../events';
|
|
2
|
-
import type { Device } from '../../device/Device';
|
|
3
|
-
export type ProtocolV2InteractionDescriptor = {
|
|
4
|
-
request: 'button' | 'pin';
|
|
5
|
-
source: 'method-lifecycle';
|
|
6
|
-
reason: 'change-pin' | 'device-unlock' | 'settings-page' | 'address-confirmation' | 'public-key-confirmation' | 'signing-confirmation' | 'device-management';
|
|
7
|
-
completion: ProtocolV2UiCompletion;
|
|
8
|
-
deviceOnly: true;
|
|
9
|
-
page?: string | number;
|
|
10
|
-
operation?: string;
|
|
11
|
-
};
|
|
12
|
-
type ProtocolV2InteractionMethod = {
|
|
13
|
-
name?: string;
|
|
14
|
-
params?: unknown;
|
|
15
|
-
payload?: unknown;
|
|
16
|
-
protocolV2UiInteraction?: ProtocolV2InteractionDescriptor;
|
|
17
|
-
};
|
|
18
|
-
type InteractionDevice = Pick<Device, 'isProtocolV2' | 'toMessageObject'>;
|
|
19
|
-
type PostMessage = (message: CoreMessage) => void;
|
|
20
|
-
export declare const isProtocolV2UiEnabled: (method: {
|
|
21
|
-
protocolV2UiMode?: 'auto' | 'none';
|
|
22
|
-
}) => boolean;
|
|
23
|
-
export declare const resolveProtocolV2UiInteraction: (method: ProtocolV2InteractionMethod) => ProtocolV2InteractionDescriptor | undefined;
|
|
24
|
-
export declare class ProtocolV2UiInteractionCoordinator {
|
|
25
|
-
private readonly device;
|
|
26
|
-
private readonly postMessage;
|
|
27
|
-
private methodInteraction?;
|
|
28
|
-
private currentPhase?;
|
|
29
|
-
private opened;
|
|
30
|
-
private closed;
|
|
31
|
-
constructor(device: InteractionDevice, postMessage: PostMessage);
|
|
32
|
-
enterMethodInteraction(interaction?: ProtocolV2InteractionDescriptor): void;
|
|
33
|
-
enterUnlockInteraction(method?: string): void;
|
|
34
|
-
resumeMethodInteraction(): void;
|
|
35
|
-
close(): void;
|
|
36
|
-
private emit;
|
|
37
|
-
}
|
|
38
|
-
export {};
|
|
39
|
-
//# sourceMappingURL=uiInteraction.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uiInteraction.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/uiInteraction.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,MAAM,MAAM,+BAA+B,GAAG;IAC5C,OAAO,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC1B,MAAM,EAAE,kBAAkB,CAAC;IAC3B,MAAM,EACF,YAAY,GACZ,eAAe,GACf,eAAe,GACf,sBAAsB,GACtB,yBAAyB,GACzB,sBAAsB,GACtB,mBAAmB,CAAC;IACxB,UAAU,EAAE,sBAAsB,CAAC;IACnC,UAAU,EAAE,IAAI,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,2BAA2B,GAAG;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,uBAAuB,CAAC,EAAE,+BAA+B,CAAC;CAC3D,CAAC;AAEF,KAAK,iBAAiB,GAAG,IAAI,CAAC,MAAM,EAAE,cAAc,GAAG,iBAAiB,CAAC,CAAC;AAC1E,KAAK,WAAW,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;AAElD,eAAO,MAAM,qBAAqB,WAAY;IAAE,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,YAChD,CAAC;AA4DrC,eAAO,MAAM,8BAA8B,WACjC,2BAA2B,KAClC,+BAA+B,GAAG,SAsCpC,CAAC;AAEF,qBAAa,kCAAkC;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAoB;IAE3C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;IAE1C,OAAO,CAAC,iBAAiB,CAAC,CAAkC;IAE5D,OAAO,CAAC,YAAY,CAAC,CAAS;IAE9B,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,CAAC,MAAM,CAAS;gBAEX,MAAM,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW;IAK/D,sBAAsB,CAAC,WAAW,CAAC,EAAE,+BAA+B;IAiBpE,sBAAsB,CAAC,MAAM,CAAC,EAAE,MAAM;IActC,uBAAuB;IAIvB,KAAK;IAML,OAAO,CAAC,IAAI;CAcb"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { BaseMethod } from '../../api/BaseMethod';
|
|
2
|
-
import type { Device } from '../../device/Device';
|
|
3
|
-
import type { ProtocolV2UiInteractionCoordinator } from './uiInteraction';
|
|
4
|
-
type RunnableMethod = Pick<BaseMethod, 'run' | 'unlockPolicy' | 'protocolV2UiInteraction' | 'protocolV2UiMode' | 'params' | 'payload'> & {
|
|
5
|
-
name?: string;
|
|
6
|
-
};
|
|
7
|
-
type UnlockableDevice = Pick<Device, 'isProtocolV2' | 'unlockDevice' | 'features'>;
|
|
8
|
-
type UiInteractionCoordinator = Pick<ProtocolV2UiInteractionCoordinator, 'enterMethodInteraction' | 'enterUnlockInteraction' | 'resumeMethodInteraction'>;
|
|
9
|
-
export declare function runMethodWithUnlockRetry(method: RunnableMethod, device: UnlockableDevice, uiCoordinator?: UiInteractionCoordinator): Promise<any>;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=unlockRetry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"unlockRetry.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/unlockRetry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,iBAAiB,CAAC;AAI1E,KAAK,cAAc,GAAG,IAAI,CACxB,UAAU,EACV,KAAK,GAAG,cAAc,GAAG,yBAAyB,GAAG,kBAAkB,GAAG,QAAQ,GAAG,SAAS,CAC/F,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACtB,KAAK,gBAAgB,GAAG,IAAI,CAAC,MAAM,EAAE,cAAc,GAAG,cAAc,GAAG,UAAU,CAAC,CAAC;AACnF,KAAK,wBAAwB,GAAG,IAAI,CAClC,kCAAkC,EAClC,wBAAwB,GAAG,wBAAwB,GAAG,yBAAyB,CAChF,CAAC;AAEF,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,cAAc,EACtB,MAAM,EAAE,gBAAgB,EACxB,aAAa,CAAC,EAAE,wBAAwB,gBAoDzC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { Device } from '../../device/Device';
|
|
2
|
-
export declare const isProtocolV2InvalidSessionError: (error: unknown) => boolean;
|
|
3
|
-
export declare function requestProtocolV2DeviceStatus(device: Device): Promise<import("@onekeyfe/hd-transport").DeviceStatus>;
|
|
4
|
-
export declare function refreshProtocolV2DeviceStatus(device: Device): Promise<import("../..").Features>;
|
|
5
|
-
export declare function getProtocolV2WalletSession(device: Device, options?: {
|
|
6
|
-
initSession?: boolean;
|
|
7
|
-
expectedPassphraseState?: string;
|
|
8
|
-
onlyMainPin?: boolean;
|
|
9
|
-
recoverInvalidSession?: boolean;
|
|
10
|
-
}): Promise<{
|
|
11
|
-
passphraseState: undefined;
|
|
12
|
-
newSession: undefined;
|
|
13
|
-
unlockedAttachPin: boolean;
|
|
14
|
-
resumed: boolean;
|
|
15
|
-
} | {
|
|
16
|
-
passphraseState: string;
|
|
17
|
-
newSession: string;
|
|
18
|
-
unlockedAttachPin: boolean | undefined;
|
|
19
|
-
resumed: boolean;
|
|
20
|
-
}>;
|
|
21
|
-
//# sourceMappingURL=walletSession.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"walletSession.d.ts","sourceRoot":"","sources":["../../../src/protocols/protocol-v2/walletSession.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,eAAO,MAAM,+BAA+B,UAAW,OAAO,YAIF,CAAC;AAa7D,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,MAAM,0DAGjE;AAED,wBAAsB,6BAA6B,CAAC,MAAM,EAAE,MAAM,qCAGjE;AAmED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE;IACR,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;;;;;;;;;;GA4FF"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface FirmwareUpdateCapabilities {
|
|
2
|
-
planSchemaVersion: 1;
|
|
3
|
-
preparedPlanSchemaVersion: 1;
|
|
4
|
-
hostBindingProtocolVersion: 1;
|
|
5
|
-
checkpointSchemaVersion: 1;
|
|
6
|
-
manifestModes: Array<'external-only' | 'sdk-managed'>;
|
|
7
|
-
supportsArtifactReader: true;
|
|
8
|
-
supportsAwaitableCheckpoint: true;
|
|
9
|
-
supportsResume: true;
|
|
10
|
-
supportsReconciliation: true;
|
|
11
|
-
}
|
|
12
|
-
export declare function getFirmwareUpdateCapabilities(): FirmwareUpdateCapabilities;
|
|
13
|
-
//# sourceMappingURL=firmwareUpdateCapabilities.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firmwareUpdateCapabilities.d.ts","sourceRoot":"","sources":["../../../src/types/api/firmwareUpdateCapabilities.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,EAAE,CAAC,CAAC;IACrB,yBAAyB,EAAE,CAAC,CAAC;IAC7B,0BAA0B,EAAE,CAAC,CAAC;IAC9B,uBAAuB,EAAE,CAAC,CAAC;IAC3B,aAAa,EAAE,KAAK,CAAC,eAAe,GAAG,aAAa,CAAC,CAAC;IACtD,sBAAsB,EAAE,IAAI,CAAC;IAC7B,2BAA2B,EAAE,IAAI,CAAC;IAClC,cAAc,EAAE,IAAI,CAAC;IACrB,sBAAsB,EAAE,IAAI,CAAC;CAC9B;AAED,MAAM,CAAC,OAAO,UAAU,6BAA6B,IAAI,0BAA0B,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { FirmwareUpdateV4Target } from './firmwareUpdate';
|
|
2
|
-
import type { EFirmwareType } from '@onekeyfe/hd-shared';
|
|
3
|
-
export type FirmwareUpdatePlanArtifactRole = 'firmware' | 'ble' | 'bootloader' | 'resource' | 'component' | 'resourceBundle';
|
|
4
|
-
export type FirmwareUpdatePlanTarget = 'firmware' | 'ble' | 'bootloader' | FirmwareUpdateV4Target;
|
|
5
|
-
export interface FirmwareUpdatePlanArtifact {
|
|
6
|
-
artifactId: string;
|
|
7
|
-
role: FirmwareUpdatePlanArtifactRole;
|
|
8
|
-
target: FirmwareUpdatePlanTarget;
|
|
9
|
-
url: string;
|
|
10
|
-
container: 'raw' | 'zip';
|
|
11
|
-
logicalName?: string;
|
|
12
|
-
expectedSize?: number;
|
|
13
|
-
expectedSha256?: string;
|
|
14
|
-
targetVersion?: string;
|
|
15
|
-
}
|
|
16
|
-
export type FirmwareUpdatePlanEpochKind = 'legacy-update' | 'resource-sync' | 'bootloader-install' | 'bootloader-verify' | 'component-install' | 'final-verify';
|
|
17
|
-
export interface FirmwareUpdatePlanEpoch {
|
|
18
|
-
epoch: number;
|
|
19
|
-
kind: FirmwareUpdatePlanEpochKind;
|
|
20
|
-
artifactIds: string[];
|
|
21
|
-
targets: FirmwareUpdatePlanTarget[];
|
|
22
|
-
}
|
|
23
|
-
export interface FirmwareUpdatePlan {
|
|
24
|
-
schemaVersion: 1;
|
|
25
|
-
planDigest: string;
|
|
26
|
-
executor: 'v2' | 'v3' | 'v4';
|
|
27
|
-
deviceIdentity: string;
|
|
28
|
-
deviceModel: string;
|
|
29
|
-
firmwareType: EFirmwareType;
|
|
30
|
-
platform: 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
31
|
-
artifacts: FirmwareUpdatePlanArtifact[];
|
|
32
|
-
epochs: FirmwareUpdatePlanEpoch[];
|
|
33
|
-
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=firmwareUpdatePlan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firmwareUpdatePlan.d.ts","sourceRoot":"","sources":["../../../src/types/api/firmwareUpdatePlan.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,MAAM,MAAM,8BAA8B,GACtC,UAAU,GACV,KAAK,GACL,YAAY,GACZ,UAAU,GACV,WAAW,GACX,gBAAgB,CAAC;AAErB,MAAM,MAAM,wBAAwB,GAAG,UAAU,GAAG,KAAK,GAAG,YAAY,GAAG,sBAAsB,CAAC;AAElG,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,8BAA8B,CAAC;IACrC,MAAM,EAAE,wBAAwB,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,KAAK,GAAG,KAAK,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,MAAM,2BAA2B,GACnC,eAAe,GACf,eAAe,GACf,oBAAoB,GACpB,mBAAmB,GACnB,mBAAmB,GACnB,cAAc,CAAC;AAEnB,MAAM,WAAW,uBAAuB;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,2BAA2B,CAAC;IAClC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,EAAE,wBAAwB,EAAE,CAAC;CACrC;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,CAAC,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,aAAa,CAAC;IAC5B,QAAQ,EAAE,QAAQ,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG,WAAW,CAAC;IAC7D,SAAS,EAAE,0BAA0B,EAAE,CAAC;IACxC,MAAM,EAAE,uBAAuB,EAAE,CAAC;IAClC,eAAe,EAAE,wBAAwB,EAAE,CAAC;CAC7C"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import type { FirmwareArtifactReference } from './firmwareUpdate';
|
|
2
|
-
import type { FirmwareUpdatePlan, FirmwareUpdatePlanArtifactRole, FirmwareUpdatePlanEpoch, FirmwareUpdatePlanTarget } from './firmwareUpdatePlan';
|
|
3
|
-
export interface FirmwareUpdatePreparedEntry {
|
|
4
|
-
entryName: string;
|
|
5
|
-
artifact: FirmwareArtifactReference;
|
|
6
|
-
}
|
|
7
|
-
export interface FirmwareUpdatePreparedArtifactInput {
|
|
8
|
-
artifactId: string;
|
|
9
|
-
artifact: FirmwareArtifactReference;
|
|
10
|
-
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
11
|
-
}
|
|
12
|
-
export interface FirmwareUpdatePreparedArtifact {
|
|
13
|
-
artifactId: string;
|
|
14
|
-
role: FirmwareUpdatePlanArtifactRole;
|
|
15
|
-
target: FirmwareUpdatePlanTarget;
|
|
16
|
-
container: 'raw' | 'zip';
|
|
17
|
-
logicalName?: string;
|
|
18
|
-
targetVersion?: string;
|
|
19
|
-
artifact: FirmwareArtifactReference;
|
|
20
|
-
materializedEntries?: FirmwareUpdatePreparedEntry[];
|
|
21
|
-
}
|
|
22
|
-
export interface FirmwareUpdatePreparedPlan {
|
|
23
|
-
schemaVersion: 1;
|
|
24
|
-
preparedPlanDigest: string;
|
|
25
|
-
planDigest: string;
|
|
26
|
-
networkPolicy: 'forbid';
|
|
27
|
-
executor: FirmwareUpdatePlan['executor'];
|
|
28
|
-
deviceIdentity: string;
|
|
29
|
-
deviceModel: string;
|
|
30
|
-
firmwareType: FirmwareUpdatePlan['firmwareType'];
|
|
31
|
-
platform: FirmwareUpdatePlan['platform'];
|
|
32
|
-
leaseRef: string;
|
|
33
|
-
artifacts: FirmwareUpdatePreparedArtifact[];
|
|
34
|
-
epochs: FirmwareUpdatePlanEpoch[];
|
|
35
|
-
targetsToUpdate: FirmwareUpdatePlanTarget[];
|
|
36
|
-
}
|
|
37
|
-
export declare function prepareFirmwareUpdatePlan(input: {
|
|
38
|
-
plan: FirmwareUpdatePlan;
|
|
39
|
-
leaseRef: string;
|
|
40
|
-
artifacts: FirmwareUpdatePreparedArtifactInput[];
|
|
41
|
-
}): FirmwareUpdatePreparedPlan;
|
|
42
|
-
export declare function validateFirmwareUpdatePreparedPlan(value: unknown): FirmwareUpdatePreparedPlan;
|
|
43
|
-
//# sourceMappingURL=firmwareUpdatePreparedPlan.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"firmwareUpdatePreparedPlan.d.ts","sourceRoot":"","sources":["../../../src/types/api/firmwareUpdatePreparedPlan.ts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wBAAwB,EAAE,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,UAAU,yBAAyB,CAAC,KAAK,EAAE;IACvD,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,mCAAmC,EAAE,CAAC;CAClD,GAAG,0BAA0B,CAAC;AAE/B,MAAM,CAAC,OAAO,UAAU,kCAAkC,CACxD,KAAK,EAAE,OAAO,GACb,0BAA0B,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { DeviceState, DeviceStateSection } from '../device';
|
|
2
|
-
import type { CommonParams, Response } from '../params';
|
|
3
|
-
export type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
|
|
4
|
-
export type GetDeviceStateParams = CommonParams & {
|
|
5
|
-
scope?: DeviceStateScope;
|
|
6
|
-
};
|
|
7
|
-
export type DeviceStateReadOptions = {
|
|
8
|
-
refreshSections?: DeviceStateSection[];
|
|
9
|
-
includeRaw?: boolean;
|
|
10
|
-
};
|
|
11
|
-
export declare function getDeviceState(connectId?: string, params?: GetDeviceStateParams): Response<DeviceState>;
|
|
12
|
-
//# sourceMappingURL=getDeviceState.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getDeviceState.d.ts","sourceRoot":"","sources":["../../../src/types/api/getDeviceState.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAExD,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC;AAEnE,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG;IAChD,KAAK,CAAC,EAAE,gBAAgB,CAAC;CAC1B,CAAC;AAGF,MAAM,MAAM,sBAAsB,GAAG;IACnC,eAAe,CAAC,EAAE,kBAAkB,EAAE,CAAC;IACvC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,cAAc,CACpC,SAAS,CAAC,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE,oBAAoB,GAC5B,QAAQ,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import type { CommonParams, Response } from '../params';
|
|
2
|
-
export type OpenWalletSessionParams = {
|
|
3
|
-
mode: 'standard';
|
|
4
|
-
deviceId?: never;
|
|
5
|
-
passphraseState?: never;
|
|
6
|
-
useEmptyPassphrase?: never;
|
|
7
|
-
initSession?: never;
|
|
8
|
-
} | {
|
|
9
|
-
mode: 'select-hidden';
|
|
10
|
-
deviceId?: never;
|
|
11
|
-
passphraseState?: never;
|
|
12
|
-
useEmptyPassphrase?: never;
|
|
13
|
-
initSession?: never;
|
|
14
|
-
} | {
|
|
15
|
-
mode: 'resume-hidden';
|
|
16
|
-
deviceId: string;
|
|
17
|
-
passphraseState: string;
|
|
18
|
-
useEmptyPassphrase?: never;
|
|
19
|
-
initSession?: never;
|
|
20
|
-
} | {
|
|
21
|
-
mode?: undefined;
|
|
22
|
-
useEmptyPassphrase?: boolean;
|
|
23
|
-
initSession?: boolean;
|
|
24
|
-
deviceId?: string;
|
|
25
|
-
passphraseState?: string;
|
|
26
|
-
};
|
|
27
|
-
export type OpenWalletSessionPayload = {
|
|
28
|
-
protocol: 'V1' | 'V2';
|
|
29
|
-
walletType: 'standard' | 'hidden';
|
|
30
|
-
deviceId: string;
|
|
31
|
-
passphraseState: string | null;
|
|
32
|
-
resumed: boolean;
|
|
33
|
-
};
|
|
34
|
-
export declare function openWalletSession(connectId: string, params: CommonParams & OpenWalletSessionParams): Response<OpenWalletSessionPayload>;
|
|
35
|
-
//# sourceMappingURL=openWalletSession.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"openWalletSession.d.ts","sourceRoot":"","sources":["../../../src/types/api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,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import type { CommonParams, Response } from '../params';
|
|
2
|
-
import type { DevOnboardingStatus, DeviceFactoryInfo, DeviceFirmwareUpdateStatus, DeviceSettings, DeviceStatus, ProtocolInfo, ProtocolV2DeviceInfo, Success } from '@onekeyfe/hd-transport';
|
|
3
|
-
import type { DeviceFactoryInfoSetParams, DeviceFirmwareUpdateParams, DeviceFirmwareUpdateStatusGetParams, DeviceRebootParams } from '../../api/protocol-v2/helpers';
|
|
4
|
-
import type { DeviceSessionOpenParams } from '../../api/protocol-v2/DeviceSessionOpen';
|
|
5
|
-
import type { DeviceInfoGetParams } from '../../api/protocol-v2/DeviceInfoGet';
|
|
6
|
-
import type { DeviceSettingsSetParams } from '../../api/protocol-v2/DeviceSettingsSet';
|
|
7
|
-
import type { DeviceSettingsPageShowParams } from '../../api/protocol-v2/DeviceSettingsPageShow';
|
|
8
|
-
import type { DeviceUploadWallpaperParams, DeviceUploadWallpaperResponse } from '../../api/protocol-v2/DeviceUploadWallpaper';
|
|
9
|
-
export type { DeviceFirmwareTargetInput, DeviceFirmwareUpdateParams, DeviceFirmwareUpdateStatusGetParams, DeviceRebootParams, DeviceFactoryInfoSetParams, RebootTypeInput, } from '../../api/protocol-v2/helpers';
|
|
10
|
-
export type { DeviceSessionOpenParams } from '../../api/protocol-v2/DeviceSessionOpen';
|
|
11
|
-
export type { DeviceInfoGetParams, DeviceInfoGetTargets, DeviceInfoGetTypes, } from '../../api/protocol-v2/DeviceInfoGet';
|
|
12
|
-
export type { DeviceSettingsSetParams } from '../../api/protocol-v2/DeviceSettingsSet';
|
|
13
|
-
export type { DeviceSettingsPageShowParams, SupportedDeviceSettingsPage, } from '../../api/protocol-v2/DeviceSettingsPageShow';
|
|
14
|
-
export type { DeviceUploadWallpaperParams, DeviceUploadWallpaperResponse, } from '../../api/protocol-v2/DeviceUploadWallpaper';
|
|
15
|
-
export type FileOpSuccess = {
|
|
16
|
-
message?: string;
|
|
17
|
-
};
|
|
18
|
-
export type FileInfo = {
|
|
19
|
-
path: string;
|
|
20
|
-
offset: number;
|
|
21
|
-
total_size: number;
|
|
22
|
-
data?: Uint8Array;
|
|
23
|
-
data_hash?: number;
|
|
24
|
-
processed_byte?: number;
|
|
25
|
-
chunks?: number;
|
|
26
|
-
};
|
|
27
|
-
export type DirInfo = {
|
|
28
|
-
path: string;
|
|
29
|
-
child_dirs?: string;
|
|
30
|
-
child_files?: string;
|
|
31
|
-
};
|
|
32
|
-
export type PathInfoResult = {
|
|
33
|
-
exist: boolean;
|
|
34
|
-
size: number;
|
|
35
|
-
year: number;
|
|
36
|
-
month: number;
|
|
37
|
-
day: number;
|
|
38
|
-
hour: number;
|
|
39
|
-
minute: number;
|
|
40
|
-
second: number;
|
|
41
|
-
readonly: boolean;
|
|
42
|
-
hidden: boolean;
|
|
43
|
-
system: boolean;
|
|
44
|
-
archive: boolean;
|
|
45
|
-
directory: boolean;
|
|
46
|
-
};
|
|
47
|
-
export type DeviceSessionOpenResponse = {
|
|
48
|
-
session_id: string;
|
|
49
|
-
btc_test_address: string;
|
|
50
|
-
};
|
|
51
|
-
export declare function deviceInfoGet(connectId: string, params?: CommonParams & DeviceInfoGetParams): Response<ProtocolV2DeviceInfo>;
|
|
52
|
-
export declare function deviceStatusGet(connectId: string, params?: CommonParams): Response<DeviceStatus>;
|
|
53
|
-
export declare function deviceSettingsGet(connectId: string, params?: CommonParams): Response<DeviceSettings>;
|
|
54
|
-
export declare function protocolInfoRequest(connectId: string, params?: CommonParams): Response<ProtocolInfo>;
|
|
55
|
-
export declare function ping(connectId: string, params?: CommonParams & {
|
|
56
|
-
message?: string;
|
|
57
|
-
}): Response<Success>;
|
|
58
|
-
export declare function deviceReboot(connectId: string, params: CommonParams & DeviceRebootParams): Response<Success>;
|
|
59
|
-
export declare function deviceGetOnboardingStatus(connectId: string, params?: CommonParams): Response<DevOnboardingStatus>;
|
|
60
|
-
export declare function deviceSessionOpen(connectId: string, params: CommonParams & DeviceSessionOpenParams): Response<DeviceSessionOpenResponse>;
|
|
61
|
-
export declare function deviceFirmwareUpdate(connectId: string, params: CommonParams & DeviceFirmwareUpdateParams): Response<Success | DeviceFirmwareUpdateStatus>;
|
|
62
|
-
export declare function deviceGetFirmwareUpdateStatus(connectId: string, params?: CommonParams & DeviceFirmwareUpdateStatusGetParams): Response<DeviceFirmwareUpdateStatus>;
|
|
63
|
-
export declare function deviceFactoryInfoSet(connectId: string, params: CommonParams & DeviceFactoryInfoSetParams): Response<Success>;
|
|
64
|
-
export declare function deviceFactoryInfoGet(connectId: string, params?: CommonParams): Response<DeviceFactoryInfo>;
|
|
65
|
-
export declare function deviceSettingsSet(connectId: string, params: CommonParams & DeviceSettingsSetParams): Response<Success>;
|
|
66
|
-
export declare function deviceSettingsPageShow(connectId: string, params: CommonParams & DeviceSettingsPageShowParams): Response<Success>;
|
|
67
|
-
export declare function deviceUploadWallpaper(connectId: string, params: CommonParams & DeviceUploadWallpaperParams): Response<DeviceUploadWallpaperResponse>;
|
|
68
|
-
export declare function filesystemPermissionFix(connectId: string, params?: CommonParams): Response<Success>;
|
|
69
|
-
export declare function fileRead(connectId: string, params: {
|
|
70
|
-
path: string;
|
|
71
|
-
offset?: number;
|
|
72
|
-
totalSize?: number;
|
|
73
|
-
chunkLen?: number;
|
|
74
|
-
uiPercentage?: number;
|
|
75
|
-
}): Response<FileInfo>;
|
|
76
|
-
export declare function fileWrite(connectId: string, params: {
|
|
77
|
-
path: string;
|
|
78
|
-
offset?: number;
|
|
79
|
-
totalSize?: number;
|
|
80
|
-
chunkSize?: number;
|
|
81
|
-
chunkLen?: number;
|
|
82
|
-
data: ArrayBuffer | Uint8Array | Blob | string;
|
|
83
|
-
overwrite?: boolean;
|
|
84
|
-
append?: boolean;
|
|
85
|
-
uiPercentage?: number;
|
|
86
|
-
timeoutMs?: number | string;
|
|
87
|
-
}): Response<FileInfo>;
|
|
88
|
-
export declare function fileDelete(connectId: string, params: {
|
|
89
|
-
path: string;
|
|
90
|
-
}): Response<FileOpSuccess>;
|
|
91
|
-
export declare function dirList(connectId: string, params: {
|
|
92
|
-
path: string;
|
|
93
|
-
depth?: number;
|
|
94
|
-
}): Response<DirInfo>;
|
|
95
|
-
export declare function dirMake(connectId: string, params: {
|
|
96
|
-
path: string;
|
|
97
|
-
}): Response<FileOpSuccess>;
|
|
98
|
-
export declare function dirRemove(connectId: string, params: {
|
|
99
|
-
path: string;
|
|
100
|
-
}): Response<FileOpSuccess>;
|
|
101
|
-
export declare function pathInfo(connectId: string, params: {
|
|
102
|
-
path: string;
|
|
103
|
-
timeoutMs?: number | string;
|
|
104
|
-
}): Response<PathInfoResult>;
|
|
105
|
-
export declare function uploadPortfolio(connectId: string, params: {
|
|
106
|
-
operationId?: string;
|
|
107
|
-
packageBytes: ArrayBuffer | Uint8Array | Blob;
|
|
108
|
-
timeoutMs?: number | string;
|
|
109
|
-
}): Response<FileInfo & {
|
|
110
|
-
portfolioUpdated: true;
|
|
111
|
-
}>;
|
|
112
|
-
export declare function filesystemFormat(connectId: string): Response<Success>;
|
|
113
|
-
//# sourceMappingURL=protocolV2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"protocolV2.d.ts","sourceRoot":"","sources":["../../../src/types/api/protocolV2.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EACV,mBAAmB,EACnB,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,OAAO,EACR,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,0BAA0B,EAC1B,0BAA0B,EAC1B,mCAAmC,EACnC,kBAAkB,EACnB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,KAAK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viceId?: string;
|
|
4
|
-
passphraseState?: string;
|
|
5
|
-
};
|
|
6
|
-
export type ClearSessionCachePayload = {
|
|
7
|
-
cleared: true;
|
|
8
|
-
};
|
|
9
|
-
export declare function clearSessionCache(params?: ClearSessionCacheParams): Response<ClearSessionCachePayload>;
|
|
10
|
-
//# sourceMappingURL=sessionCache.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionCache.d.ts","sourceRoot":"","sources":["../../../src/types/api/sessionCache.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,IAAI,CAAC;CACf,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,MAAM,CAAC,EAAE,uBAAuB,GAC/B,QAAQ,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { EFirmwareType } from '@onekeyfe/hd-shared';
|
|
2
|
-
import type { PROTO } from '../constants';
|
|
3
|
-
import type { Features, IDeviceType } from '../types';
|
|
4
|
-
export type DeviceFeaturesInput = Features | PROTO.Features;
|
|
5
|
-
export declare const resolveDeviceSerialNo: (features?: DeviceFeaturesInput) => string;
|
|
6
|
-
export declare const resolveDeviceType: (features?: DeviceFeaturesInput) => IDeviceType;
|
|
7
|
-
export declare const resolveDeviceFirmwareType: (features?: DeviceFeaturesInput) => EFirmwareType;
|
|
8
|
-
export declare const resolveDeviceBleName: (features?: DeviceFeaturesInput) => string | null;
|
|
9
|
-
export declare const resolveDeviceFirmwareVersion: (features?: DeviceFeaturesInput) => string | null;
|
|
10
|
-
export declare const resolveDeviceBootloaderVersion: (features?: DeviceFeaturesInput) => string | null;
|
|
11
|
-
export declare const resolveDeviceBoardVersion: (features?: DeviceFeaturesInput) => string | null;
|
|
12
|
-
export declare const resolveDeviceBleFirmwareVersion: (features?: DeviceFeaturesInput) => string | null;
|
|
13
|
-
//# sourceMappingURL=deviceFeaturesCompat.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deviceFeaturesCompat.d.ts","sourceRoot":"","sources":["../../src/utils/deviceFeaturesCompat.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;AAoB5D,eAAO,MAAM,qBAAqB,cAAe,mBAAmB,KAAG,MAWtE,CAAC;AAEF,eAAO,MAAM,iBAAiB,cAAe,mBAAmB,KAAG,WAgDlE,CAAC;AAEF,eAAO,MAAM,yBAAyB,cAAe,mBAAmB,KAAG,aAsB1E,CAAC;AAEF,eAAO,MAAM,oBAAoB,cAAe,mBAAmB,KAAG,MAAM,GAAG,IAM9E,CAAC;AAEF,eAAO,MAAM,4BAA4B,cAAe,mBAAmB,KAAG,MAAM,GAAG,IAStF,CAAC;AAEF,eAAO,MAAM,8BAA8B,cAAe,mBAAmB,KAAG,MAAM,GAAG,IAiBxF,CAAC;AAEF,eAAO,MAAM,yBAAyB,cAAe,mBAAmB,KAAG,MAAM,GAAG,IAUnF,CAAC;AAEF,eAAO,MAAM,+BAA+B,cAAe,mBAAmB,KAAG,MAAM,GAAG,IASzF,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const PRO2_WALLPAPER_WIDTH = 604;
|
|
2
|
-
export declare const PRO2_WALLPAPER_HEIGHT = 1024;
|
|
3
|
-
export type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
|
|
4
|
-
export declare function encodePro2Wallpaper(options: {
|
|
5
|
-
width: number;
|
|
6
|
-
height: number;
|
|
7
|
-
rgba: Uint8Array | ArrayBuffer;
|
|
8
|
-
}): {
|
|
9
|
-
data: Uint8Array;
|
|
10
|
-
colorFormat: Pro2WallpaperColorFormat;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=pro2Wallpaper.d.ts.map
|