@onekeyfe/hd-core 1.2.0-alpha.55 → 1.2.0-alpha.57
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__/device-state-contract.test.ts +1 -0
- package/__tests__/device-state-mapper.test.ts +1 -1
- package/__tests__/deviceSettings.test.ts +1 -1
- package/__tests__/protocol-v2.test.ts +129 -3
- package/__tests__/protocolV2FileWrite.test.ts +39 -0
- package/__tests__/public-pro2-api-boundary.test.ts +98 -2
- package/__tests__/public-test-api-boundary.test.ts +167 -0
- package/dist/api/BixinBackupDevice.d.ts +7 -0
- package/dist/api/BixinBackupDevice.d.ts.map +1 -0
- package/dist/api/BixinLoadDevice.d.ts +7 -0
- package/dist/api/BixinLoadDevice.d.ts.map +1 -0
- package/dist/api/BixinMessageSE.d.ts +8 -0
- package/dist/api/BixinMessageSE.d.ts.map +1 -0
- package/dist/api/BixinVerifyDeviceRequest.d.ts +8 -0
- package/dist/api/BixinVerifyDeviceRequest.d.ts.map +1 -0
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/WebAuthnAddResidentCredential.d.ts +8 -0
- package/dist/api/WebAuthnAddResidentCredential.d.ts.map +1 -0
- package/dist/api/WebAuthnListResidentCredentials.d.ts +8 -0
- package/dist/api/WebAuthnListResidentCredentials.d.ts.map +1 -0
- package/dist/api/WebAuthnRemoveResidentCredential.d.ts +8 -0
- package/dist/api/WebAuthnRemoveResidentCredential.d.ts.map +1 -0
- package/dist/api/binance/BinanceGetAddress.d.ts +8 -0
- package/dist/api/binance/BinanceGetAddress.d.ts.map +1 -0
- package/dist/api/binance/BinanceGetPublicKey.d.ts +8 -0
- package/dist/api/binance/BinanceGetPublicKey.d.ts.map +1 -0
- package/dist/api/binance/BinanceSignTx.d.ts +7 -0
- package/dist/api/binance/BinanceSignTx.d.ts.map +1 -0
- package/dist/api/btc/BTCAuthorizeCoinJoin.d.ts +7 -0
- package/dist/api/btc/BTCAuthorizeCoinJoin.d.ts.map +1 -0
- package/dist/api/btc/BTCGetOwnershipId.d.ts +7 -0
- package/dist/api/btc/BTCGetOwnershipId.d.ts.map +1 -0
- package/dist/api/btc/BTCGetOwnershipProof.d.ts +7 -0
- package/dist/api/btc/BTCGetOwnershipProof.d.ts.map +1 -0
- package/dist/api/crypto/CryptoBatchGetPublickeys.d.ts +8 -0
- package/dist/api/crypto/CryptoBatchGetPublickeys.d.ts.map +1 -0
- package/dist/api/crypto/CryptoCipherKeyValue.d.ts +8 -0
- package/dist/api/crypto/CryptoCipherKeyValue.d.ts.map +1 -0
- package/dist/api/crypto/CryptoCosiCommit.d.ts +8 -0
- package/dist/api/crypto/CryptoCosiCommit.d.ts.map +1 -0
- package/dist/api/crypto/CryptoCosiSign.d.ts +8 -0
- package/dist/api/crypto/CryptoCosiSign.d.ts.map +1 -0
- package/dist/api/crypto/CryptoGetECDHSessionKey.d.ts +8 -0
- package/dist/api/crypto/CryptoGetECDHSessionKey.d.ts.map +1 -0
- package/dist/api/crypto/CryptoSignIdentity.d.ts +8 -0
- package/dist/api/crypto/CryptoSignIdentity.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkDecision.d.ts +7 -0
- package/dist/api/debug/DebugLinkDecision.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkEraseSdCard.d.ts +7 -0
- package/dist/api/debug/DebugLinkEraseSdCard.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkFlashErase.d.ts +7 -0
- package/dist/api/debug/DebugLinkFlashErase.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkGetState.d.ts +7 -0
- package/dist/api/debug/DebugLinkGetState.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkMemoryRead.d.ts +7 -0
- package/dist/api/debug/DebugLinkMemoryRead.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkMemoryWrite.d.ts +7 -0
- package/dist/api/debug/DebugLinkMemoryWrite.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkRecordScreen.d.ts +7 -0
- package/dist/api/debug/DebugLinkRecordScreen.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkReseedRandom.d.ts +7 -0
- package/dist/api/debug/DebugLinkReseedRandom.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkStop.d.ts +7 -0
- package/dist/api/debug/DebugLinkStop.d.ts.map +1 -0
- package/dist/api/debug/DebugLinkWatchLayout.d.ts +7 -0
- package/dist/api/debug/DebugLinkWatchLayout.d.ts.map +1 -0
- package/dist/api/device/DeviceVerify.d.ts.map +1 -1
- package/dist/api/emmc/EmmcDirList.d.ts +7 -0
- package/dist/api/emmc/EmmcDirList.d.ts.map +1 -0
- package/dist/api/emmc/EmmcDirMake.d.ts +7 -0
- package/dist/api/emmc/EmmcDirMake.d.ts.map +1 -0
- package/dist/api/emmc/EmmcDirRemove.d.ts +7 -0
- package/dist/api/emmc/EmmcDirRemove.d.ts.map +1 -0
- package/dist/api/emmc/EmmcFileDelete.d.ts +7 -0
- package/dist/api/emmc/EmmcFileDelete.d.ts.map +1 -0
- package/dist/api/emmc/EmmcFileRead.d.ts +7 -0
- package/dist/api/emmc/EmmcFileRead.d.ts.map +1 -0
- package/dist/api/emmc/EmmcFileWrite.d.ts +7 -0
- package/dist/api/emmc/EmmcFileWrite.d.ts.map +1 -0
- package/dist/api/emmc/EmmcFixPermission.d.ts +7 -0
- package/dist/api/emmc/EmmcFixPermission.d.ts.map +1 -0
- package/dist/api/emmc/EmmcPathInfo.d.ts +7 -0
- package/dist/api/emmc/EmmcPathInfo.d.ts.map +1 -0
- package/dist/api/eos/EosGetPublicKey.d.ts +8 -0
- package/dist/api/eos/EosGetPublicKey.d.ts.map +1 -0
- package/dist/api/eos/EosSignTx.d.ts +12 -0
- package/dist/api/eos/EosSignTx.d.ts.map +1 -0
- package/dist/api/evmTrezor/EVMGetAddress.d.ts +10 -0
- package/dist/api/evmTrezor/EVMGetAddress.d.ts.map +1 -0
- package/dist/api/evmTrezor/EVMGetPublicKey.d.ts +16 -0
- package/dist/api/evmTrezor/EVMGetPublicKey.d.ts.map +1 -0
- package/dist/api/evmTrezor/EVMSignMessage.d.ts +7 -0
- package/dist/api/evmTrezor/EVMSignMessage.d.ts.map +1 -0
- package/dist/api/evmTrezor/EVMSignTransaction.d.ts +15 -0
- package/dist/api/evmTrezor/EVMSignTransaction.d.ts.map +1 -0
- package/dist/api/evmTrezor/EVMSignTypedData.d.ts +43 -0
- package/dist/api/evmTrezor/EVMSignTypedData.d.ts.map +1 -0
- package/dist/api/evmTrezor/EVMVerifyMessage.d.ts +7 -0
- package/dist/api/evmTrezor/EVMVerifyMessage.d.ts.map +1 -0
- package/dist/api/evmTrezor/legacyV1/getAddress.d.ts +6 -0
- package/dist/api/evmTrezor/legacyV1/getAddress.d.ts.map +1 -0
- package/dist/api/evmTrezor/legacyV1/getPublicKey.d.ts +6 -0
- package/dist/api/evmTrezor/legacyV1/getPublicKey.d.ts.map +1 -0
- package/dist/api/evmTrezor/legacyV1/signMessage.d.ts +6 -0
- package/dist/api/evmTrezor/legacyV1/signMessage.d.ts.map +1 -0
- package/dist/api/evmTrezor/legacyV1/signTransaction.d.ts +9 -0
- package/dist/api/evmTrezor/legacyV1/signTransaction.d.ts.map +1 -0
- package/dist/api/evmTrezor/legacyV1/signTypedData.d.ts +10 -0
- package/dist/api/evmTrezor/legacyV1/signTypedData.d.ts.map +1 -0
- package/dist/api/evmTrezor/legacyV1/signTypedHash.d.ts +11 -0
- package/dist/api/evmTrezor/legacyV1/signTypedHash.d.ts.map +1 -0
- package/dist/api/evmTrezor/legacyV1/verifyMessage.d.ts +6 -0
- package/dist/api/evmTrezor/legacyV1/verifyMessage.d.ts.map +1 -0
- package/dist/api/extensionMethodNames.d.ts +3 -0
- package/dist/api/extensionMethodNames.d.ts.map +1 -0
- package/dist/api/factoryMethods.d.ts +3 -0
- package/dist/api/factoryMethods.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareErase.d.ts +12 -0
- package/dist/api/firmware/FirmwareErase.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareEraseEx.d.ts +12 -0
- package/dist/api/firmware/FirmwareEraseEx.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdateEmmcTest.d.ts +7 -0
- package/dist/api/firmware/FirmwareUpdateEmmcTest.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUploadTest.d.ts +7 -0
- package/dist/api/firmware/FirmwareUploadTest.d.ts.map +1 -0
- package/dist/api/firmware/Reboot.d.ts +7 -0
- package/dist/api/firmware/Reboot.d.ts.map +1 -0
- package/dist/api/firmware/SelfTest.d.ts +7 -0
- package/dist/api/firmware/SelfTest.d.ts.map +1 -0
- package/dist/api/helpers/protocolV2FileWrite.d.ts.map +1 -1
- package/dist/api/index.d.ts +3 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/manager/DeviceCancelAuthorization.d.ts +7 -0
- package/dist/api/manager/DeviceCancelAuthorization.d.ts.map +1 -0
- package/dist/api/manager/DeviceChangeWipeCode.d.ts +7 -0
- package/dist/api/manager/DeviceChangeWipeCode.d.ts.map +1 -0
- package/dist/api/manager/DeviceDoPreauthorized.d.ts +7 -0
- package/dist/api/manager/DeviceDoPreauthorized.d.ts.map +1 -0
- package/dist/api/manager/DeviceEndSession.d.ts +7 -0
- package/dist/api/manager/DeviceEndSession.d.ts.map +1 -0
- package/dist/api/manager/DeviceGetEntropy.d.ts +7 -0
- package/dist/api/manager/DeviceGetEntropy.d.ts.map +1 -0
- package/dist/api/manager/DeviceGetFirmwareHash.d.ts +7 -0
- package/dist/api/manager/DeviceGetFirmwareHash.d.ts.map +1 -0
- package/dist/api/manager/DeviceInfoSettings.d.ts +7 -0
- package/dist/api/manager/DeviceInfoSettings.d.ts.map +1 -0
- package/dist/api/manager/DeviceLoad.d.ts +7 -0
- package/dist/api/manager/DeviceLoad.d.ts.map +1 -0
- package/dist/api/manager/DevicePing.d.ts +7 -0
- package/dist/api/manager/DevicePing.d.ts.map +1 -0
- package/dist/api/manager/DeviceReadSEPublicCert.d.ts +7 -0
- package/dist/api/manager/DeviceReadSEPublicCert.d.ts.map +1 -0
- package/dist/api/manager/DeviceSESignMessage.d.ts +7 -0
- package/dist/api/manager/DeviceSESignMessage.d.ts.map +1 -0
- package/dist/api/manager/DeviceSdProtect.d.ts +7 -0
- package/dist/api/manager/DeviceSdProtect.d.ts.map +1 -0
- package/dist/api/manager/DeviceSpiFlashRead.d.ts +7 -0
- package/dist/api/manager/DeviceSpiFlashRead.d.ts.map +1 -0
- package/dist/api/manager/DeviceSpiFlashWrite.d.ts +7 -0
- package/dist/api/manager/DeviceSpiFlashWrite.d.ts.map +1 -0
- package/dist/api/manager/DeviceUnlockPath.d.ts +7 -0
- package/dist/api/manager/DeviceUnlockPath.d.ts.map +1 -0
- package/dist/api/manager/DeviceWriteSEPrivateKey.d.ts +7 -0
- package/dist/api/manager/DeviceWriteSEPrivateKey.d.ts.map +1 -0
- package/dist/api/manager/DeviceWriteSEPublicCert.d.ts +7 -0
- package/dist/api/manager/DeviceWriteSEPublicCert.d.ts.map +1 -0
- package/dist/api/manager/GetDeviceInfoSettings.d.ts +7 -0
- package/dist/api/manager/GetDeviceInfoSettings.d.ts.map +1 -0
- package/dist/api/manager/GetPublicKeyMultiple.d.ts +7 -0
- package/dist/api/manager/GetPublicKeyMultiple.d.ts.map +1 -0
- package/dist/api/manager/ListResDir.d.ts +7 -0
- package/dist/api/manager/ListResDir.d.ts.map +1 -0
- package/dist/api/manager/NFTWriteData.d.ts +7 -0
- package/dist/api/manager/NFTWriteData.d.ts.map +1 -0
- package/dist/api/manager/NFTWriteInfo.d.ts +7 -0
- package/dist/api/manager/NFTWriteInfo.d.ts.map +1 -0
- package/dist/api/manager/ReadSEPublicKey.d.ts +7 -0
- package/dist/api/manager/ReadSEPublicKey.d.ts.map +1 -0
- package/dist/api/manager/ResourceUpdate.d.ts +6 -0
- package/dist/api/manager/ResourceUpdate.d.ts.map +1 -0
- package/dist/api/methodExtension.d.ts +13 -0
- package/dist/api/methodExtension.d.ts.map +1 -0
- package/dist/api/monero/MoneroGetAddress.d.ts +9 -0
- package/dist/api/monero/MoneroGetAddress.d.ts.map +1 -0
- package/dist/api/monero/MoneroGetWatchKey.d.ts +8 -0
- package/dist/api/monero/MoneroGetWatchKey.d.ts.map +1 -0
- package/dist/api/nem/NEMDecryptMessage.d.ts +8 -0
- package/dist/api/nem/NEMDecryptMessage.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFactoryCertificateRead.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceFactoryCertificateRead.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFactoryCertificateWrite.d.ts +8 -0
- package/dist/api/protocol-v2/DeviceFactoryCertificateWrite.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFactoryChallengeSign.d.ts +8 -0
- package/dist/api/protocol-v2/DeviceFactoryChallengeSign.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -1
- package/dist/api/protocol-v2/helpers.d.ts +15 -5
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts +1 -1
- package/dist/api/testMethods.d.ts +82 -0
- package/dist/api/testMethods.d.ts.map +1 -0
- package/dist/api/tezos/TezosGetAddress.d.ts +9 -0
- package/dist/api/tezos/TezosGetAddress.d.ts.map +1 -0
- package/dist/api/tezos/TezosGetPublicKey.d.ts +8 -0
- package/dist/api/tezos/TezosGetPublicKey.d.ts.map +1 -0
- package/dist/api/tezos/TezosSignTx.d.ts +12 -0
- package/dist/api/tezos/TezosSignTx.d.ts.map +1 -0
- package/dist/api/utils.d.ts +6 -1
- package/dist/api/utils.d.ts.map +1 -1
- package/dist/core/index.d.ts +10 -4
- package/dist/core/index.d.ts.map +1 -1
- package/dist/index.d.ts +722 -41
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2635 -54
- package/dist/inject.d.ts +6 -2
- package/dist/inject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
- package/dist/types/api/binanceGetAddress.d.ts +11 -0
- package/dist/types/api/binanceGetAddress.d.ts.map +1 -0
- package/dist/types/api/binanceGetPublicKey.d.ts +11 -0
- package/dist/types/api/binanceGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/binanceSignTx.d.ts +7 -0
- package/dist/types/api/binanceSignTx.d.ts.map +1 -0
- package/dist/types/api/bixinBackupDevice.d.ts +4 -0
- package/dist/types/api/bixinBackupDevice.d.ts.map +1 -0
- package/dist/types/api/bixinLoadDevice.d.ts +4 -0
- package/dist/types/api/bixinLoadDevice.d.ts.map +1 -0
- package/dist/types/api/bixinMessageSE.d.ts +4 -0
- package/dist/types/api/bixinMessageSE.d.ts.map +1 -0
- package/dist/types/api/bixinVerifyDeviceRequest.d.ts +4 -0
- package/dist/types/api/bixinVerifyDeviceRequest.d.ts.map +1 -0
- package/dist/types/api/btcAuthorizeCoinJoin.d.ts +13 -0
- package/dist/types/api/btcAuthorizeCoinJoin.d.ts.map +1 -0
- package/dist/types/api/btcGetOwnershipId.d.ts +10 -0
- package/dist/types/api/btcGetOwnershipId.d.ts.map +1 -0
- package/dist/types/api/btcGetOwnershipProof.d.ts +13 -0
- package/dist/types/api/btcGetOwnershipProof.d.ts.map +1 -0
- package/dist/types/api/cryptoBatchGetPublickeys.d.ts +12 -0
- package/dist/types/api/cryptoBatchGetPublickeys.d.ts.map +1 -0
- package/dist/types/api/cryptoCipherKeyValue.d.ts +13 -0
- package/dist/types/api/cryptoCipherKeyValue.d.ts.map +1 -0
- package/dist/types/api/cryptoCosiCommit.d.ts +8 -0
- package/dist/types/api/cryptoCosiCommit.d.ts.map +1 -0
- package/dist/types/api/cryptoCosiSign.d.ts +10 -0
- package/dist/types/api/cryptoCosiSign.d.ts.map +1 -0
- package/dist/types/api/cryptoGetECDHSessionKey.d.ts +4 -0
- package/dist/types/api/cryptoGetECDHSessionKey.d.ts.map +1 -0
- package/dist/types/api/cryptoSignIdentity.d.ts +4 -0
- package/dist/types/api/cryptoSignIdentity.d.ts.map +1 -0
- package/dist/types/api/debugLinkDecision.d.ts +4 -0
- package/dist/types/api/debugLinkDecision.d.ts.map +1 -0
- package/dist/types/api/debugLinkEraseSdCard.d.ts +4 -0
- package/dist/types/api/debugLinkEraseSdCard.d.ts.map +1 -0
- package/dist/types/api/debugLinkFlashErase.d.ts +4 -0
- package/dist/types/api/debugLinkFlashErase.d.ts.map +1 -0
- package/dist/types/api/debugLinkGetState.d.ts +4 -0
- package/dist/types/api/debugLinkGetState.d.ts.map +1 -0
- package/dist/types/api/debugLinkMemoryRead.d.ts +4 -0
- package/dist/types/api/debugLinkMemoryRead.d.ts.map +1 -0
- package/dist/types/api/debugLinkMemoryWrite.d.ts +4 -0
- package/dist/types/api/debugLinkMemoryWrite.d.ts.map +1 -0
- package/dist/types/api/debugLinkRecordScreen.d.ts +4 -0
- package/dist/types/api/debugLinkRecordScreen.d.ts.map +1 -0
- package/dist/types/api/debugLinkReseedRandom.d.ts +4 -0
- package/dist/types/api/debugLinkReseedRandom.d.ts.map +1 -0
- package/dist/types/api/debugLinkStop.d.ts +4 -0
- package/dist/types/api/debugLinkStop.d.ts.map +1 -0
- package/dist/types/api/debugLinkWatchLayout.d.ts +4 -0
- package/dist/types/api/debugLinkWatchLayout.d.ts.map +1 -0
- package/dist/types/api/detectDeviceConnectProtocol.d.ts.map +1 -1
- package/dist/types/api/deviceCancelAuthorization.d.ts +4 -0
- package/dist/types/api/deviceCancelAuthorization.d.ts.map +1 -0
- package/dist/types/api/deviceChangeWipeCode.d.ts +4 -0
- package/dist/types/api/deviceChangeWipeCode.d.ts.map +1 -0
- package/dist/types/api/deviceDoPreauthorized.d.ts +4 -0
- package/dist/types/api/deviceDoPreauthorized.d.ts.map +1 -0
- package/dist/types/api/deviceEndSession.d.ts +4 -0
- package/dist/types/api/deviceEndSession.d.ts.map +1 -0
- package/dist/types/api/deviceGetEntropy.d.ts +4 -0
- package/dist/types/api/deviceGetEntropy.d.ts.map +1 -0
- package/dist/types/api/deviceGetFirmwareHash.d.ts +4 -0
- package/dist/types/api/deviceGetFirmwareHash.d.ts.map +1 -0
- package/dist/types/api/deviceGetInfo.d.ts +4 -0
- package/dist/types/api/deviceGetInfo.d.ts.map +1 -0
- package/dist/types/api/deviceInfoSettings.d.ts +4 -0
- package/dist/types/api/deviceInfoSettings.d.ts.map +1 -0
- package/dist/types/api/deviceLoad.d.ts +16 -0
- package/dist/types/api/deviceLoad.d.ts.map +1 -0
- package/dist/types/api/devicePing.d.ts +4 -0
- package/dist/types/api/devicePing.d.ts.map +1 -0
- package/dist/types/api/deviceReadSEPublicCert.d.ts +4 -0
- package/dist/types/api/deviceReadSEPublicCert.d.ts.map +1 -0
- package/dist/types/api/deviceSESignMessage.d.ts +4 -0
- package/dist/types/api/deviceSESignMessage.d.ts.map +1 -0
- package/dist/types/api/deviceSdProtect.d.ts +4 -0
- package/dist/types/api/deviceSdProtect.d.ts.map +1 -0
- package/dist/types/api/deviceSpiFlashRead.d.ts +4 -0
- package/dist/types/api/deviceSpiFlashRead.d.ts.map +1 -0
- package/dist/types/api/deviceSpiFlashWrite.d.ts +4 -0
- package/dist/types/api/deviceSpiFlashWrite.d.ts.map +1 -0
- package/dist/types/api/deviceUnlockPath.d.ts +11 -0
- package/dist/types/api/deviceUnlockPath.d.ts.map +1 -0
- package/dist/types/api/deviceWriteSEPrivateKey.d.ts +4 -0
- package/dist/types/api/deviceWriteSEPrivateKey.d.ts.map +1 -0
- package/dist/types/api/deviceWriteSEPublicCert.d.ts +4 -0
- package/dist/types/api/deviceWriteSEPublicCert.d.ts.map +1 -0
- package/dist/types/api/emmcDirList.d.ts +4 -0
- package/dist/types/api/emmcDirList.d.ts.map +1 -0
- package/dist/types/api/emmcDirMake.d.ts +4 -0
- package/dist/types/api/emmcDirMake.d.ts.map +1 -0
- package/dist/types/api/emmcDirRemove.d.ts +4 -0
- package/dist/types/api/emmcDirRemove.d.ts.map +1 -0
- package/dist/types/api/emmcFileDelete.d.ts +4 -0
- package/dist/types/api/emmcFileDelete.d.ts.map +1 -0
- package/dist/types/api/emmcFileRead.d.ts +4 -0
- package/dist/types/api/emmcFileRead.d.ts.map +1 -0
- package/dist/types/api/emmcFileWrite.d.ts +4 -0
- package/dist/types/api/emmcFileWrite.d.ts.map +1 -0
- package/dist/types/api/emmcFixPermission.d.ts +4 -0
- package/dist/types/api/emmcFixPermission.d.ts.map +1 -0
- package/dist/types/api/emmcPathInfo.d.ts +4 -0
- package/dist/types/api/emmcPathInfo.d.ts.map +1 -0
- package/dist/types/api/eosGetPublicKey.d.ts +8 -0
- package/dist/types/api/eosGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/eosSignTx.d.ts +7 -0
- package/dist/types/api/eosSignTx.d.ts.map +1 -0
- package/dist/types/api/evmGetAddressTrezor.d.ts +15 -0
- package/dist/types/api/evmGetAddressTrezor.d.ts.map +1 -0
- package/dist/types/api/evmGetPublicKeyTrezor.d.ts +20 -0
- package/dist/types/api/evmGetPublicKeyTrezor.d.ts.map +1 -0
- package/dist/types/api/evmSignMessageTrezor.d.ts +9 -0
- package/dist/types/api/evmSignMessageTrezor.d.ts.map +1 -0
- package/dist/types/api/evmSignTransactionTrezor.d.ts +40 -0
- package/dist/types/api/evmSignTransactionTrezor.d.ts.map +1 -0
- package/dist/types/api/evmSignTypedDataTrezor.d.ts +34 -0
- package/dist/types/api/evmSignTypedDataTrezor.d.ts.map +1 -0
- package/dist/types/api/evmVerifyMessageTrezor.d.ts +10 -0
- package/dist/types/api/evmVerifyMessageTrezor.d.ts.map +1 -0
- package/dist/types/api/firmwareErase.d.ts +4 -0
- package/dist/types/api/firmwareErase.d.ts.map +1 -0
- package/dist/types/api/firmwareEraseEx.d.ts +4 -0
- package/dist/types/api/firmwareEraseEx.d.ts.map +1 -0
- package/dist/types/api/firmwareUpdateEmmcTest.d.ts +4 -0
- package/dist/types/api/firmwareUpdateEmmcTest.d.ts.map +1 -0
- package/dist/types/api/firmwareUploadTest.d.ts +4 -0
- package/dist/types/api/firmwareUploadTest.d.ts.map +1 -0
- package/dist/types/api/getPublicKeyMultiple.d.ts +4 -0
- package/dist/types/api/getPublicKeyMultiple.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +176 -3
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/listResDir.d.ts +4 -0
- package/dist/types/api/listResDir.d.ts.map +1 -0
- package/dist/types/api/moneroGetAddress.d.ts +14 -0
- package/dist/types/api/moneroGetAddress.d.ts.map +1 -0
- package/dist/types/api/moneroGetWatchKey.d.ts +14 -0
- package/dist/types/api/moneroGetWatchKey.d.ts.map +1 -0
- package/dist/types/api/nemDecryptMessage.d.ts +10 -0
- package/dist/types/api/nemDecryptMessage.d.ts.map +1 -0
- package/dist/types/api/nftWriteData.d.ts +4 -0
- package/dist/types/api/nftWriteData.d.ts.map +1 -0
- package/dist/types/api/nftWriteInfo.d.ts +4 -0
- package/dist/types/api/nftWriteInfo.d.ts.map +1 -0
- package/dist/types/api/protocolV2.d.ts +8 -2
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/api/readSEPublicKey.d.ts +4 -0
- package/dist/types/api/readSEPublicKey.d.ts.map +1 -0
- package/dist/types/api/reboot.d.ts +4 -0
- package/dist/types/api/reboot.d.ts.map +1 -0
- package/dist/types/api/resourceUpdate.d.ts +7 -0
- package/dist/types/api/resourceUpdate.d.ts.map +1 -0
- package/dist/types/api/selfTest.d.ts +4 -0
- package/dist/types/api/selfTest.d.ts.map +1 -0
- package/dist/types/api/tezosGetAddress.d.ts +14 -0
- package/dist/types/api/tezosGetAddress.d.ts.map +1 -0
- package/dist/types/api/tezosGetPublicKey.d.ts +14 -0
- package/dist/types/api/tezosGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/tezosSignTx.d.ts +7 -0
- package/dist/types/api/tezosSignTx.d.ts.map +1 -0
- package/dist/types/api/webAuthnAddResidentCredential.d.ts +4 -0
- package/dist/types/api/webAuthnAddResidentCredential.d.ts.map +1 -0
- package/dist/types/api/webAuthnListResidentCredentials.d.ts +4 -0
- package/dist/types/api/webAuthnListResidentCredentials.d.ts.map +1 -0
- package/dist/types/api/webAuthnRemoveResidentCredential.d.ts +4 -0
- package/dist/types/api/webAuthnRemoveResidentCredential.d.ts.map +1 -0
- 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/BixinBackupDevice.ts +15 -0
- package/src/api/BixinLoadDevice.ts +22 -0
- package/src/api/BixinMessageSE.ts +22 -0
- package/src/api/BixinVerifyDeviceRequest.ts +22 -0
- package/src/api/FirmwareUpdateV4.ts +15 -10
- package/src/api/WebAuthnAddResidentCredential.ts +22 -0
- package/src/api/WebAuthnListResidentCredentials.ts +24 -0
- package/src/api/WebAuthnRemoveResidentCredential.ts +22 -0
- package/src/api/binance/BinanceGetAddress.ts +26 -0
- package/src/api/binance/BinanceGetPublicKey.ts +26 -0
- package/src/api/binance/BinanceSignTx.ts +35 -0
- package/src/api/btc/BTCAuthorizeCoinJoin.ts +37 -0
- package/src/api/btc/BTCGetOwnershipId.ts +34 -0
- package/src/api/btc/BTCGetOwnershipProof.ts +37 -0
- package/src/api/crypto/CryptoBatchGetPublickeys.ts +30 -0
- package/src/api/crypto/CryptoCipherKeyValue.ts +29 -0
- package/src/api/crypto/CryptoCosiCommit.ts +24 -0
- package/src/api/crypto/CryptoCosiSign.ts +26 -0
- package/src/api/crypto/CryptoGetECDHSessionKey.ts +24 -0
- package/src/api/crypto/CryptoSignIdentity.ts +25 -0
- package/src/api/debug/DebugLinkDecision.ts +25 -0
- package/src/api/debug/DebugLinkEraseSdCard.ts +23 -0
- package/src/api/debug/DebugLinkFlashErase.ts +23 -0
- package/src/api/debug/DebugLinkGetState.ts +21 -0
- package/src/api/debug/DebugLinkMemoryRead.ts +24 -0
- package/src/api/debug/DebugLinkMemoryWrite.ts +25 -0
- package/src/api/debug/DebugLinkRecordScreen.ts +23 -0
- package/src/api/debug/DebugLinkReseedRandom.ts +23 -0
- package/src/api/debug/DebugLinkStop.ts +25 -0
- package/src/api/debug/DebugLinkWatchLayout.ts +23 -0
- package/src/api/device/DeviceVerify.ts +2 -0
- package/src/api/emmc/EmmcDirList.ts +20 -0
- package/src/api/emmc/EmmcDirMake.ts +20 -0
- package/src/api/emmc/EmmcDirRemove.ts +20 -0
- package/src/api/emmc/EmmcFileDelete.ts +20 -0
- package/src/api/emmc/EmmcFileRead.ts +21 -0
- package/src/api/emmc/EmmcFileWrite.ts +23 -0
- package/src/api/emmc/EmmcFixPermission.ts +17 -0
- package/src/api/emmc/EmmcPathInfo.ts +20 -0
- package/src/api/eos/EosGetPublicKey.ts +26 -0
- package/src/api/eos/EosSignTx.ts +40 -0
- package/src/api/evmTrezor/EVMGetAddress.ts +75 -0
- package/src/api/evmTrezor/EVMGetPublicKey.ts +106 -0
- package/src/api/evmTrezor/EVMSignMessage.ts +40 -0
- package/src/api/evmTrezor/EVMSignTransaction.ts +83 -0
- package/src/api/evmTrezor/EVMSignTypedData.ts +366 -0
- package/src/api/evmTrezor/EVMVerifyMessage.ts +37 -0
- package/src/api/evmTrezor/legacyV1/getAddress.ts +16 -0
- package/src/api/evmTrezor/legacyV1/getPublicKey.ts +20 -0
- package/src/api/evmTrezor/legacyV1/signMessage.ts +22 -0
- package/src/api/evmTrezor/legacyV1/signTransaction.ts +24 -0
- package/src/api/evmTrezor/legacyV1/signTypedData.ts +36 -0
- package/src/api/evmTrezor/legacyV1/signTypedHash.ts +48 -0
- package/src/api/evmTrezor/legacyV1/verifyMessage.ts +19 -0
- package/src/api/extensionMethodNames.ts +88 -0
- package/src/api/factoryMethods.ts +2 -0
- package/src/api/firmware/FirmwareErase.ts +18 -0
- package/src/api/firmware/FirmwareEraseEx.ts +18 -0
- package/src/api/firmware/FirmwareUpdateEmmcTest.ts +18 -0
- package/src/api/firmware/FirmwareUploadTest.ts +17 -0
- package/src/api/firmware/Reboot.ts +17 -0
- package/src/api/firmware/SelfTest.ts +17 -0
- package/src/api/helpers/protocolV2FileWrite.ts +16 -3
- package/src/api/index.ts +3 -0
- package/src/api/manager/DeviceCancelAuthorization.ts +15 -0
- package/src/api/manager/DeviceChangeWipeCode.ts +19 -0
- package/src/api/manager/DeviceDoPreauthorized.ts +15 -0
- package/src/api/manager/DeviceEndSession.ts +19 -0
- package/src/api/manager/DeviceGetEntropy.ts +19 -0
- package/src/api/manager/DeviceGetFirmwareHash.ts +23 -0
- package/src/api/manager/DeviceInfoSettings.ts +23 -0
- package/src/api/manager/DeviceLoad.ts +27 -0
- package/src/api/manager/DevicePing.ts +19 -0
- package/src/api/manager/DeviceReadSEPublicCert.ts +18 -0
- package/src/api/manager/DeviceSESignMessage.ts +23 -0
- package/src/api/manager/DeviceSdProtect.ts +18 -0
- package/src/api/manager/DeviceSpiFlashRead.ts +22 -0
- package/src/api/manager/DeviceSpiFlashWrite.ts +22 -0
- package/src/api/manager/DeviceUnlockPath.ts +26 -0
- package/src/api/manager/DeviceWriteSEPrivateKey.ts +23 -0
- package/src/api/manager/DeviceWriteSEPublicCert.ts +23 -0
- package/src/api/manager/GetDeviceInfoSettings.ts +20 -0
- package/src/api/manager/GetPublicKeyMultiple.ts +24 -0
- package/src/api/manager/ListResDir.ts +19 -0
- package/src/api/manager/NFTWriteData.ts +21 -0
- package/src/api/manager/NFTWriteInfo.ts +23 -0
- package/src/api/manager/ReadSEPublicKey.ts +20 -0
- package/src/api/manager/ResourceUpdate.ts +22 -0
- package/src/api/methodExtension.ts +27 -0
- package/src/api/monero/MoneroGetAddress.ts +64 -0
- package/src/api/monero/MoneroGetWatchKey.ts +59 -0
- package/src/api/nem/NEMDecryptMessage.ts +29 -0
- package/src/api/protocol-v2/DeviceFactoryCertificateRead.ts +25 -0
- package/src/api/protocol-v2/DeviceFactoryCertificateWrite.ts +30 -0
- package/src/api/protocol-v2/DeviceFactoryChallengeSign.ts +28 -0
- package/src/api/protocol-v2/DeviceFactoryInfoGet.ts +3 -0
- package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +6 -7
- package/src/api/protocol-v2/helpers.ts +152 -5
- package/src/api/testMethods.ts +95 -0
- package/src/api/tezos/TezosGetAddress.ts +64 -0
- package/src/api/tezos/TezosGetPublicKey.ts +63 -0
- package/src/api/tezos/TezosSignTx.ts +44 -0
- package/src/api/utils.ts +46 -1
- package/src/core/index.ts +22 -7
- package/src/index.ts +5 -0
- package/src/inject.ts +209 -7
- package/src/protocols/protocol-v2/firmware.ts +2 -0
- package/src/types/api/binanceGetAddress.ts +17 -0
- package/src/types/api/binanceGetPublicKey.ts +17 -0
- package/src/types/api/binanceSignTx.ts +15 -0
- package/src/types/api/bixinBackupDevice.ts +8 -0
- package/src/types/api/bixinLoadDevice.ts +8 -0
- package/src/types/api/bixinMessageSE.ts +8 -0
- package/src/types/api/bixinVerifyDeviceRequest.ts +8 -0
- package/src/types/api/btcAuthorizeCoinJoin.ts +18 -0
- package/src/types/api/btcGetOwnershipId.ts +19 -0
- package/src/types/api/btcGetOwnershipProof.ts +22 -0
- package/src/types/api/cryptoBatchGetPublickeys.ts +18 -0
- package/src/types/api/cryptoCipherKeyValue.ts +18 -0
- package/src/types/api/cryptoCosiCommit.ts +13 -0
- package/src/types/api/cryptoCosiSign.ts +15 -0
- package/src/types/api/cryptoGetECDHSessionKey.ts +8 -0
- package/src/types/api/cryptoSignIdentity.ts +8 -0
- package/src/types/api/debugLinkDecision.ts +7 -0
- package/src/types/api/debugLinkEraseSdCard.ts +7 -0
- package/src/types/api/debugLinkFlashErase.ts +7 -0
- package/src/types/api/debugLinkGetState.ts +7 -0
- package/src/types/api/debugLinkMemoryRead.ts +7 -0
- package/src/types/api/debugLinkMemoryWrite.ts +7 -0
- package/src/types/api/debugLinkRecordScreen.ts +7 -0
- package/src/types/api/debugLinkReseedRandom.ts +7 -0
- package/src/types/api/debugLinkStop.ts +7 -0
- package/src/types/api/debugLinkWatchLayout.ts +7 -0
- package/src/types/api/detectDeviceConnectProtocol.ts +0 -1
- package/src/types/api/deviceCancelAuthorization.ts +7 -0
- package/src/types/api/deviceChangeWipeCode.ts +7 -0
- package/src/types/api/deviceDoPreauthorized.ts +7 -0
- package/src/types/api/deviceEndSession.ts +7 -0
- package/src/types/api/deviceGetEntropy.ts +7 -0
- package/src/types/api/deviceGetFirmwareHash.ts +7 -0
- package/src/types/api/deviceGetInfo.ts +7 -0
- package/src/types/api/deviceInfoSettings.ts +7 -0
- package/src/types/api/deviceLoad.ts +19 -0
- package/src/types/api/devicePing.ts +7 -0
- package/src/types/api/deviceReadSEPublicCert.ts +7 -0
- package/src/types/api/deviceSESignMessage.ts +7 -0
- package/src/types/api/deviceSdProtect.ts +7 -0
- package/src/types/api/deviceSpiFlashRead.ts +7 -0
- package/src/types/api/deviceSpiFlashWrite.ts +7 -0
- package/src/types/api/deviceUnlockPath.ts +16 -0
- package/src/types/api/deviceWriteSEPrivateKey.ts +7 -0
- package/src/types/api/deviceWriteSEPublicCert.ts +7 -0
- package/src/types/api/emmcDirList.ts +7 -0
- package/src/types/api/emmcDirMake.ts +7 -0
- package/src/types/api/emmcDirRemove.ts +7 -0
- package/src/types/api/emmcFileDelete.ts +7 -0
- package/src/types/api/emmcFileRead.ts +7 -0
- package/src/types/api/emmcFileWrite.ts +7 -0
- package/src/types/api/emmcFixPermission.ts +7 -0
- package/src/types/api/emmcPathInfo.ts +7 -0
- package/src/types/api/eosGetPublicKey.ts +13 -0
- package/src/types/api/eosSignTx.ts +12 -0
- package/src/types/api/evmGetAddressTrezor.ts +24 -0
- package/src/types/api/evmGetPublicKeyTrezor.ts +31 -0
- package/src/types/api/evmSignMessageTrezor.ts +14 -0
- package/src/types/api/evmSignTransactionTrezor.ts +49 -0
- package/src/types/api/evmSignTypedDataTrezor.ts +42 -0
- package/src/types/api/evmVerifyMessageTrezor.ts +15 -0
- package/src/types/api/firmwareErase.ts +4 -0
- package/src/types/api/firmwareEraseEx.ts +7 -0
- package/src/types/api/firmwareUpdateEmmcTest.ts +7 -0
- package/src/types/api/firmwareUploadTest.ts +7 -0
- package/src/types/api/getPublicKeyMultiple.ts +11 -0
- package/src/types/api/index.ts +288 -2
- package/src/types/api/listResDir.ts +8 -0
- package/src/types/api/moneroGetAddress.ts +23 -0
- package/src/types/api/moneroGetWatchKey.ts +26 -0
- package/src/types/api/nemDecryptMessage.ts +15 -0
- package/src/types/api/nftWriteData.ts +8 -0
- package/src/types/api/nftWriteInfo.ts +8 -0
- package/src/types/api/protocolV2.ts +43 -2
- package/src/types/api/readSEPublicKey.ts +8 -0
- package/src/types/api/reboot.ts +4 -0
- package/src/types/api/resourceUpdate.ts +11 -0
- package/src/types/api/selfTest.ts +7 -0
- package/src/types/api/tezosGetAddress.ts +23 -0
- package/src/types/api/tezosGetPublicKey.ts +23 -0
- package/src/types/api/tezosSignTx.ts +12 -0
- package/src/types/api/webAuthnAddResidentCredential.ts +8 -0
- package/src/types/api/webAuthnListResidentCredentials.ts +8 -0
- package/src/types/api/webAuthnRemoveResidentCredential.ts +8 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { CommonParams, Response } from '../params';
|
|
2
|
+
|
|
3
|
+
export type EVMSignedTx = {
|
|
4
|
+
v: string;
|
|
5
|
+
r: string;
|
|
6
|
+
s: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export type EVMTransaction = {
|
|
10
|
+
to: string;
|
|
11
|
+
value: string;
|
|
12
|
+
gasPrice: string;
|
|
13
|
+
gasLimit: string;
|
|
14
|
+
maxFeePerGas?: typeof undefined;
|
|
15
|
+
maxPriorityFeePerGas?: typeof undefined;
|
|
16
|
+
nonce: string;
|
|
17
|
+
data?: string;
|
|
18
|
+
chainId: number;
|
|
19
|
+
txType?: number;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type EVMAccessList = {
|
|
23
|
+
address: string;
|
|
24
|
+
storageKeys: string[];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type EVMTransactionEIP1559 = {
|
|
28
|
+
to: string;
|
|
29
|
+
value: string;
|
|
30
|
+
gasLimit: string;
|
|
31
|
+
gasPrice?: typeof undefined;
|
|
32
|
+
nonce: string;
|
|
33
|
+
data?: string;
|
|
34
|
+
chainId: number;
|
|
35
|
+
maxFeePerGas: string;
|
|
36
|
+
maxPriorityFeePerGas: string;
|
|
37
|
+
accessList?: EVMAccessList[];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
export type EVMSignTransactionParams = {
|
|
41
|
+
path: string | number[];
|
|
42
|
+
transaction: EVMTransaction | EVMTransactionEIP1559;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export declare function evmSignTransactionTrezor(
|
|
46
|
+
connectId: string,
|
|
47
|
+
deviceId: string,
|
|
48
|
+
params: CommonParams & EVMSignTransactionParams
|
|
49
|
+
): Response<EVMSignedTx>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { EthereumMessageSignature } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type EthereumSignTypedDataTypeProperty = {
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
// EthereumSignTypedDataTypes
|
|
10
|
+
export type EthereumSignTypedDataTypes = {
|
|
11
|
+
EIP712Domain: EthereumSignTypedDataTypeProperty[];
|
|
12
|
+
[additionalProperties: string]: EthereumSignTypedDataTypeProperty[];
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
// EthereumSignTypedDataMessage
|
|
16
|
+
export type EthereumSignTypedDataMessage<T extends EthereumSignTypedDataTypes> = {
|
|
17
|
+
types: T;
|
|
18
|
+
primaryType: keyof T;
|
|
19
|
+
domain: {
|
|
20
|
+
name?: string;
|
|
21
|
+
version?: string;
|
|
22
|
+
chainId?: number;
|
|
23
|
+
verifyingContract?: string;
|
|
24
|
+
salt?: ArrayBuffer;
|
|
25
|
+
};
|
|
26
|
+
message: { [fieldName: string]: any };
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type EVMSignTypedDataParams = {
|
|
30
|
+
path: string | number[];
|
|
31
|
+
metamaskV4Compat: boolean;
|
|
32
|
+
data: EthereumSignTypedDataMessage<EthereumSignTypedDataTypes>;
|
|
33
|
+
domainHash?: string;
|
|
34
|
+
messageHash?: string;
|
|
35
|
+
chainId?: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export declare function evmSignTypedDataTrezor(
|
|
39
|
+
connectId: string,
|
|
40
|
+
deviceId: string,
|
|
41
|
+
params: CommonParams & EVMSignTypedDataParams
|
|
42
|
+
): Response<EthereumMessageSignature>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Success } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type EVMVerifyMessageParams = {
|
|
5
|
+
address: string;
|
|
6
|
+
messageHex: string;
|
|
7
|
+
signature: string;
|
|
8
|
+
chainId?: number;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export declare function evmVerifyMessageTrezor(
|
|
12
|
+
connectId: string,
|
|
13
|
+
deviceId: string,
|
|
14
|
+
params: CommonParams & EVMVerifyMessageParams
|
|
15
|
+
): Response<Success>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { FirmwareUpdateEmmc, Success } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export declare function firmwareUpdateEmmcTest(
|
|
5
|
+
connectId: string,
|
|
6
|
+
params: CommonParams & FirmwareUpdateEmmc
|
|
7
|
+
): Response<Success>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
GetPublicKeyMultiple as HardwareGetPublicKeyMultiple,
|
|
3
|
+
PublicKeyMultiple,
|
|
4
|
+
} from '@onekeyfe/hd-transport';
|
|
5
|
+
import type { CommonParams, Response } from '../params';
|
|
6
|
+
|
|
7
|
+
export declare function getPublicKeyMultiple(
|
|
8
|
+
connectId?: string,
|
|
9
|
+
deviceId?: string,
|
|
10
|
+
params?: CommonParams & HardwareGetPublicKeyMultiple
|
|
11
|
+
): Response<PublicKeyMultiple>;
|
package/src/types/api/index.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
deviceGetOnboardingStatus,
|
|
3
|
+
deviceProvisionFactoryInfo,
|
|
4
|
+
deviceReadFactoryCertificate,
|
|
5
|
+
deviceReadFactoryInfo,
|
|
3
6
|
deviceReboot,
|
|
7
|
+
deviceSignFactoryChallenge,
|
|
4
8
|
deviceUploadNft,
|
|
5
9
|
deviceUploadWallpaper,
|
|
10
|
+
deviceWriteFactoryCertificate,
|
|
6
11
|
testProtocolV2Ping,
|
|
7
12
|
uploadPortfolio,
|
|
8
13
|
} from './protocolV2';
|
|
@@ -145,6 +150,87 @@ import type { benfenSignTransaction } from './benfenSignTransaction';
|
|
|
145
150
|
import type { benfenSignMessage } from './benfenSignMessage';
|
|
146
151
|
import type { neoGetAddress } from './neoGetAddress';
|
|
147
152
|
import type { neoSignTransaction } from './neoSignTransaction';
|
|
153
|
+
import type { evmGetAddressTrezor } from './evmGetAddressTrezor';
|
|
154
|
+
import type { evmGetPublicKeyTrezor } from './evmGetPublicKeyTrezor';
|
|
155
|
+
import type { evmSignMessageTrezor } from './evmSignMessageTrezor';
|
|
156
|
+
import type { evmSignTransactionTrezor } from './evmSignTransactionTrezor';
|
|
157
|
+
import type { evmSignTypedDataTrezor } from './evmSignTypedDataTrezor';
|
|
158
|
+
import type { evmVerifyMessageTrezor } from './evmVerifyMessageTrezor';
|
|
159
|
+
import type { btcGetOwnershipId } from './btcGetOwnershipId';
|
|
160
|
+
import type { btcGetOwnershipProof } from './btcGetOwnershipProof';
|
|
161
|
+
import type { btcAuthorizeCoinJoin } from './btcAuthorizeCoinJoin';
|
|
162
|
+
import type { cryptoBatchGetPublickeys } from './cryptoBatchGetPublickeys';
|
|
163
|
+
import type { cryptoCipherKeyValue } from './cryptoCipherKeyValue';
|
|
164
|
+
import type { cryptoCosiCommit } from './cryptoCosiCommit';
|
|
165
|
+
import type { cryptoCosiSign } from './cryptoCosiSign';
|
|
166
|
+
import type { cryptoGetECDHSessionKey } from './cryptoGetECDHSessionKey';
|
|
167
|
+
import type { cryptoSignIdentity } from './cryptoSignIdentity';
|
|
168
|
+
import type { nemDecryptMessage } from './nemDecryptMessage';
|
|
169
|
+
import type { deviceSpiFlashWrite } from './deviceSpiFlashWrite';
|
|
170
|
+
import type { deviceSpiFlashRead } from './deviceSpiFlashRead';
|
|
171
|
+
import type { deviceInfoSettings } from './deviceInfoSettings';
|
|
172
|
+
import type { deviceGetInfo } from './deviceGetInfo';
|
|
173
|
+
import type { deviceWriteSEPrivateKey } from './deviceWriteSEPrivateKey';
|
|
174
|
+
import type { deviceWriteSEPublicCert } from './deviceWriteSEPublicCert';
|
|
175
|
+
import type { deviceReadSEPublicCert } from './deviceReadSEPublicCert';
|
|
176
|
+
import type { deviceSESignMessage } from './deviceSESignMessage';
|
|
177
|
+
import type { devicePing } from './devicePing';
|
|
178
|
+
import type { deviceGetEntropy } from './deviceGetEntropy';
|
|
179
|
+
import type { deviceGetFirmwareHash } from './deviceGetFirmwareHash';
|
|
180
|
+
import type { deviceUnlockPath } from './deviceUnlockPath';
|
|
181
|
+
import type { deviceSdProtect } from './deviceSdProtect';
|
|
182
|
+
import type { deviceChangeWipeCode } from './deviceChangeWipeCode';
|
|
183
|
+
import type { deviceEndSession } from './deviceEndSession';
|
|
184
|
+
import type { deviceLoad } from './deviceLoad';
|
|
185
|
+
import type { deviceDoPreauthorized } from './deviceDoPreauthorized';
|
|
186
|
+
import type { deviceCancelAuthorization } from './deviceCancelAuthorization';
|
|
187
|
+
import type { emmcDirList } from './emmcDirList';
|
|
188
|
+
import type { emmcDirMake } from './emmcDirMake';
|
|
189
|
+
import type { emmcDirRemove } from './emmcDirRemove';
|
|
190
|
+
import type { emmcFileDelete } from './emmcFileDelete';
|
|
191
|
+
import type { emmcFileRead } from './emmcFileRead';
|
|
192
|
+
import type { emmcFileWrite } from './emmcFileWrite';
|
|
193
|
+
import type { emmcFixPermission } from './emmcFixPermission';
|
|
194
|
+
import type { emmcPathInfo } from './emmcPathInfo';
|
|
195
|
+
import type { debugLinkDecision } from './debugLinkDecision';
|
|
196
|
+
import type { debugLinkEraseSdCard } from './debugLinkEraseSdCard';
|
|
197
|
+
import type { debugLinkFlashErase } from './debugLinkFlashErase';
|
|
198
|
+
import type { debugLinkGetState } from './debugLinkGetState';
|
|
199
|
+
import type { debugLinkMemoryRead } from './debugLinkMemoryRead';
|
|
200
|
+
import type { debugLinkMemoryWrite } from './debugLinkMemoryWrite';
|
|
201
|
+
import type { debugLinkRecordScreen } from './debugLinkRecordScreen';
|
|
202
|
+
import type { debugLinkReseedRandom } from './debugLinkReseedRandom';
|
|
203
|
+
import type { debugLinkStop } from './debugLinkStop';
|
|
204
|
+
import type { debugLinkWatchLayout } from './debugLinkWatchLayout';
|
|
205
|
+
import type { firmwareEraseEx } from './firmwareEraseEx';
|
|
206
|
+
import type { firmwareErase } from './firmwareErase';
|
|
207
|
+
import type { firmwareUpdateEmmcTest } from './firmwareUpdateEmmcTest';
|
|
208
|
+
import type { firmwareUploadTest } from './firmwareUploadTest';
|
|
209
|
+
import type { reboot } from './reboot';
|
|
210
|
+
import type { selfTest } from './selfTest';
|
|
211
|
+
import type { tezosGetAddress } from './tezosGetAddress';
|
|
212
|
+
import type { tezosGetPublicKey } from './tezosGetPublicKey';
|
|
213
|
+
import type { tezosSignTx } from './tezosSignTx';
|
|
214
|
+
import type { moneroGetWatchKey } from './moneroGetWatchKey';
|
|
215
|
+
import type { moneroGetAddress } from './moneroGetAddress';
|
|
216
|
+
import type { eosGetPublicKey } from './eosGetPublicKey';
|
|
217
|
+
import type { eosSignTx } from './eosSignTx';
|
|
218
|
+
import type { binanceGetAddress } from './binanceGetAddress';
|
|
219
|
+
import type { binanceGetPublicKey } from './binanceGetPublicKey';
|
|
220
|
+
import type { binanceSignTx } from './binanceSignTx';
|
|
221
|
+
import type { webAuthnAddResidentCredential } from './webAuthnAddResidentCredential';
|
|
222
|
+
import type { webAuthnListResidentCredentials } from './webAuthnListResidentCredentials';
|
|
223
|
+
import type { webAuthnRemoveResidentCredential } from './webAuthnRemoveResidentCredential';
|
|
224
|
+
import type { getPublicKeyMultiple } from './getPublicKeyMultiple';
|
|
225
|
+
import type { listResDir } from './listResDir';
|
|
226
|
+
import type { nftWriteData } from './nftWriteData';
|
|
227
|
+
import type { nftWriteInfo } from './nftWriteInfo';
|
|
228
|
+
import type { readSEPublicKey } from './readSEPublicKey';
|
|
229
|
+
import type { resourceUpdate } from './resourceUpdate';
|
|
230
|
+
import type { bixinBackupDevice } from './bixinBackupDevice';
|
|
231
|
+
import type { bixinLoadDevice } from './bixinLoadDevice';
|
|
232
|
+
import type { bixinMessageSE } from './bixinMessageSE';
|
|
233
|
+
import type { bixinVerifyDeviceRequest } from './bixinVerifyDeviceRequest';
|
|
148
234
|
import type { ConnectSettings } from '../settings';
|
|
149
235
|
import type { HardwareConnectProtocol } from '@onekeyfe/hd-shared';
|
|
150
236
|
|
|
@@ -158,9 +244,14 @@ export type {
|
|
|
158
244
|
OpenWalletSessionPayload,
|
|
159
245
|
} from './openWalletSession';
|
|
160
246
|
export type { ClearSessionCacheParams, ClearSessionCachePayload } from './sessionCache';
|
|
161
|
-
export type {
|
|
247
|
+
export type {
|
|
248
|
+
DeviceFactoryCertificateWriteParams,
|
|
249
|
+
DeviceFactoryChallengeSignParams,
|
|
250
|
+
DeviceFactoryInfoSetParams,
|
|
251
|
+
TestProtocolV2PingParams,
|
|
252
|
+
} from './protocolV2';
|
|
162
253
|
|
|
163
|
-
|
|
254
|
+
type CoreApiWithExtensions = {
|
|
164
255
|
/**
|
|
165
256
|
* Inject function
|
|
166
257
|
*/
|
|
@@ -247,6 +338,11 @@ export type CoreApi = {
|
|
|
247
338
|
deviceReboot: typeof deviceReboot;
|
|
248
339
|
deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
|
|
249
340
|
deviceUploadNft: typeof deviceUploadNft;
|
|
341
|
+
deviceProvisionFactoryInfo: typeof deviceProvisionFactoryInfo;
|
|
342
|
+
deviceReadFactoryInfo: typeof deviceReadFactoryInfo;
|
|
343
|
+
deviceWriteFactoryCertificate: typeof deviceWriteFactoryCertificate;
|
|
344
|
+
deviceReadFactoryCertificate: typeof deviceReadFactoryCertificate;
|
|
345
|
+
deviceSignFactoryChallenge: typeof deviceSignFactoryChallenge;
|
|
250
346
|
deviceUploadWallpaper: typeof deviceUploadWallpaper;
|
|
251
347
|
uploadPortfolio: typeof uploadPortfolio;
|
|
252
348
|
|
|
@@ -267,6 +363,13 @@ export type CoreApi = {
|
|
|
267
363
|
evmSignTypedData: typeof evmSignTypedData;
|
|
268
364
|
evmVerifyMessage: typeof evmVerifyMessage;
|
|
269
365
|
|
|
366
|
+
evmGetAddressTrezor: typeof evmGetAddressTrezor;
|
|
367
|
+
evmGetPublicKeyTrezor: typeof evmGetPublicKeyTrezor;
|
|
368
|
+
evmSignMessageTrezor: typeof evmSignMessageTrezor;
|
|
369
|
+
evmSignTransactionTrezor: typeof evmSignTransactionTrezor;
|
|
370
|
+
evmSignTypedDataTrezor: typeof evmSignTypedDataTrezor;
|
|
371
|
+
evmVerifyMessageTrezor: typeof evmVerifyMessageTrezor;
|
|
372
|
+
|
|
270
373
|
/**
|
|
271
374
|
* BTC function
|
|
272
375
|
*/
|
|
@@ -276,6 +379,19 @@ export type CoreApi = {
|
|
|
276
379
|
btcSignPsbt: typeof btcSignPsbt;
|
|
277
380
|
btcSignTransaction: typeof btcSignTransaction;
|
|
278
381
|
btcVerifyMessage: typeof btcVerifyMessage;
|
|
382
|
+
btcGetOwnershipId: typeof btcGetOwnershipId;
|
|
383
|
+
btcGetOwnershipProof: typeof btcGetOwnershipProof;
|
|
384
|
+
btcAuthorizeCoinJoin: typeof btcAuthorizeCoinJoin;
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Crypto function
|
|
388
|
+
*/
|
|
389
|
+
cryptoBatchGetPublickeys: typeof cryptoBatchGetPublickeys;
|
|
390
|
+
cryptoCipherKeyValue: typeof cryptoCipherKeyValue;
|
|
391
|
+
cryptoCosiCommit: typeof cryptoCosiCommit;
|
|
392
|
+
cryptoCosiSign: typeof cryptoCosiSign;
|
|
393
|
+
cryptoGetECDHSessionKey: typeof cryptoGetECDHSessionKey;
|
|
394
|
+
cryptoSignIdentity: typeof cryptoSignIdentity;
|
|
279
395
|
|
|
280
396
|
/**
|
|
281
397
|
* Starcoin function
|
|
@@ -291,6 +407,7 @@ export type CoreApi = {
|
|
|
291
407
|
*/
|
|
292
408
|
nemGetAddress: typeof nemGetAddress;
|
|
293
409
|
nemSignTransaction: typeof nemSignTransaction;
|
|
410
|
+
nemDecryptMessage: typeof nemDecryptMessage;
|
|
294
411
|
|
|
295
412
|
/**
|
|
296
413
|
* Solana function
|
|
@@ -456,4 +573,173 @@ export type CoreApi = {
|
|
|
456
573
|
*/
|
|
457
574
|
neoGetAddress: typeof neoGetAddress;
|
|
458
575
|
neoSignTransaction: typeof neoSignTransaction;
|
|
576
|
+
|
|
577
|
+
/**
|
|
578
|
+
* Test-only APIs.
|
|
579
|
+
*/
|
|
580
|
+
deviceSpiFlashWrite: typeof deviceSpiFlashWrite;
|
|
581
|
+
deviceSpiFlashRead: typeof deviceSpiFlashRead;
|
|
582
|
+
deviceInfoSettings: typeof deviceInfoSettings;
|
|
583
|
+
deviceGetInfo: typeof deviceGetInfo;
|
|
584
|
+
deviceWriteSEPrivateKey: typeof deviceWriteSEPrivateKey;
|
|
585
|
+
deviceReadSEPublicCert: typeof deviceReadSEPublicCert;
|
|
586
|
+
deviceWriteSEPublicCert: typeof deviceWriteSEPublicCert;
|
|
587
|
+
deviceSESignMessage: typeof deviceSESignMessage;
|
|
588
|
+
devicePing: typeof devicePing;
|
|
589
|
+
deviceGetEntropy: typeof deviceGetEntropy;
|
|
590
|
+
deviceGetFirmwareHash: typeof deviceGetFirmwareHash;
|
|
591
|
+
deviceUnlockPath: typeof deviceUnlockPath;
|
|
592
|
+
deviceSdProtect: typeof deviceSdProtect;
|
|
593
|
+
deviceChangeWipeCode: typeof deviceChangeWipeCode;
|
|
594
|
+
deviceEndSession: typeof deviceEndSession;
|
|
595
|
+
deviceLoad: typeof deviceLoad;
|
|
596
|
+
deviceDoPreauthorized: typeof deviceDoPreauthorized;
|
|
597
|
+
deviceCancelAuthorization: typeof deviceCancelAuthorization;
|
|
598
|
+
|
|
599
|
+
emmcDirList: typeof emmcDirList;
|
|
600
|
+
emmcDirMake: typeof emmcDirMake;
|
|
601
|
+
emmcDirRemove: typeof emmcDirRemove;
|
|
602
|
+
emmcFileDelete: typeof emmcFileDelete;
|
|
603
|
+
emmcFileRead: typeof emmcFileRead;
|
|
604
|
+
emmcFileWrite: typeof emmcFileWrite;
|
|
605
|
+
emmcFixPermission: typeof emmcFixPermission;
|
|
606
|
+
emmcPathInfo: typeof emmcPathInfo;
|
|
607
|
+
|
|
608
|
+
debugLinkDecision: typeof debugLinkDecision;
|
|
609
|
+
debugLinkEraseSdCard: typeof debugLinkEraseSdCard;
|
|
610
|
+
debugLinkFlashErase: typeof debugLinkFlashErase;
|
|
611
|
+
debugLinkGetState: typeof debugLinkGetState;
|
|
612
|
+
debugLinkMemoryRead: typeof debugLinkMemoryRead;
|
|
613
|
+
debugLinkMemoryWrite: typeof debugLinkMemoryWrite;
|
|
614
|
+
debugLinkRecordScreen: typeof debugLinkRecordScreen;
|
|
615
|
+
debugLinkReseedRandom: typeof debugLinkReseedRandom;
|
|
616
|
+
debugLinkStop: typeof debugLinkStop;
|
|
617
|
+
debugLinkWatchLayout: typeof debugLinkWatchLayout;
|
|
618
|
+
|
|
619
|
+
firmwareEraseEx: typeof firmwareEraseEx;
|
|
620
|
+
firmwareErase: typeof firmwareErase;
|
|
621
|
+
firmwareUpdateEmmcTest: typeof firmwareUpdateEmmcTest;
|
|
622
|
+
firmwareUploadTest: typeof firmwareUploadTest;
|
|
623
|
+
reboot: typeof reboot;
|
|
624
|
+
selfTest: typeof selfTest;
|
|
625
|
+
|
|
626
|
+
tezosGetAddress: typeof tezosGetAddress;
|
|
627
|
+
tezosGetPublicKey: typeof tezosGetPublicKey;
|
|
628
|
+
tezosSignTx: typeof tezosSignTx;
|
|
629
|
+
|
|
630
|
+
binanceGetAddress: typeof binanceGetAddress;
|
|
631
|
+
binanceGetPublicKey: typeof binanceGetPublicKey;
|
|
632
|
+
binanceSignTx: typeof binanceSignTx;
|
|
633
|
+
|
|
634
|
+
moneroGetWatchKey: typeof moneroGetWatchKey;
|
|
635
|
+
moneroGetAddress: typeof moneroGetAddress;
|
|
636
|
+
|
|
637
|
+
eosGetPublicKey: typeof eosGetPublicKey;
|
|
638
|
+
eosSignTx: typeof eosSignTx;
|
|
639
|
+
|
|
640
|
+
webAuthnAddResidentCredential: typeof webAuthnAddResidentCredential;
|
|
641
|
+
webAuthnListResidentCredentials: typeof webAuthnListResidentCredentials;
|
|
642
|
+
webAuthnRemoveResidentCredential: typeof webAuthnRemoveResidentCredential;
|
|
643
|
+
|
|
644
|
+
getPublicKeyMultiple: typeof getPublicKeyMultiple;
|
|
645
|
+
listResDir: typeof listResDir;
|
|
646
|
+
nftWriteData: typeof nftWriteData;
|
|
647
|
+
nftWriteInfo: typeof nftWriteInfo;
|
|
648
|
+
readSEPublicKey: typeof readSEPublicKey;
|
|
649
|
+
resourceUpdate: typeof resourceUpdate;
|
|
650
|
+
|
|
651
|
+
bixinBackupDevice: typeof bixinBackupDevice;
|
|
652
|
+
bixinLoadDevice: typeof bixinLoadDevice;
|
|
653
|
+
bixinMessageSE: typeof bixinMessageSE;
|
|
654
|
+
bixinVerifyDeviceRequest: typeof bixinVerifyDeviceRequest;
|
|
459
655
|
};
|
|
656
|
+
|
|
657
|
+
export type TestApiMethodName =
|
|
658
|
+
| 'btcGetOwnershipId'
|
|
659
|
+
| 'btcGetOwnershipProof'
|
|
660
|
+
| 'btcAuthorizeCoinJoin'
|
|
661
|
+
| 'cryptoBatchGetPublickeys'
|
|
662
|
+
| 'cryptoCipherKeyValue'
|
|
663
|
+
| 'cryptoCosiCommit'
|
|
664
|
+
| 'cryptoCosiSign'
|
|
665
|
+
| 'cryptoGetECDHSessionKey'
|
|
666
|
+
| 'cryptoSignIdentity'
|
|
667
|
+
| 'evmGetAddressTrezor'
|
|
668
|
+
| 'evmGetPublicKeyTrezor'
|
|
669
|
+
| 'evmSignMessageTrezor'
|
|
670
|
+
| 'evmSignTransactionTrezor'
|
|
671
|
+
| 'evmSignTypedDataTrezor'
|
|
672
|
+
| 'evmVerifyMessageTrezor'
|
|
673
|
+
| 'nemDecryptMessage'
|
|
674
|
+
| 'deviceSpiFlashWrite'
|
|
675
|
+
| 'deviceSpiFlashRead'
|
|
676
|
+
| 'deviceInfoSettings'
|
|
677
|
+
| 'deviceGetInfo'
|
|
678
|
+
| 'deviceReadSEPublicCert'
|
|
679
|
+
| 'deviceWriteSEPrivateKey'
|
|
680
|
+
| 'deviceWriteSEPublicCert'
|
|
681
|
+
| 'deviceSESignMessage'
|
|
682
|
+
| 'devicePing'
|
|
683
|
+
| 'deviceGetEntropy'
|
|
684
|
+
| 'deviceGetFirmwareHash'
|
|
685
|
+
| 'deviceUnlockPath'
|
|
686
|
+
| 'deviceSdProtect'
|
|
687
|
+
| 'deviceChangeWipeCode'
|
|
688
|
+
| 'deviceEndSession'
|
|
689
|
+
| 'deviceLoad'
|
|
690
|
+
| 'deviceDoPreauthorized'
|
|
691
|
+
| 'deviceCancelAuthorization'
|
|
692
|
+
| 'emmcDirList'
|
|
693
|
+
| 'emmcDirMake'
|
|
694
|
+
| 'emmcDirRemove'
|
|
695
|
+
| 'emmcFileDelete'
|
|
696
|
+
| 'emmcFileRead'
|
|
697
|
+
| 'emmcFileWrite'
|
|
698
|
+
| 'emmcFixPermission'
|
|
699
|
+
| 'emmcPathInfo'
|
|
700
|
+
| 'debugLinkDecision'
|
|
701
|
+
| 'debugLinkEraseSdCard'
|
|
702
|
+
| 'debugLinkFlashErase'
|
|
703
|
+
| 'debugLinkGetState'
|
|
704
|
+
| 'debugLinkMemoryRead'
|
|
705
|
+
| 'debugLinkMemoryWrite'
|
|
706
|
+
| 'debugLinkRecordScreen'
|
|
707
|
+
| 'debugLinkReseedRandom'
|
|
708
|
+
| 'debugLinkStop'
|
|
709
|
+
| 'debugLinkWatchLayout'
|
|
710
|
+
| 'firmwareErase'
|
|
711
|
+
| 'firmwareEraseEx'
|
|
712
|
+
| 'firmwareUpdateEmmcTest'
|
|
713
|
+
| 'firmwareUploadTest'
|
|
714
|
+
| 'reboot'
|
|
715
|
+
| 'selfTest'
|
|
716
|
+
| 'tezosGetAddress'
|
|
717
|
+
| 'tezosGetPublicKey'
|
|
718
|
+
| 'tezosSignTx'
|
|
719
|
+
| 'moneroGetAddress'
|
|
720
|
+
| 'moneroGetWatchKey'
|
|
721
|
+
| 'eosGetPublicKey'
|
|
722
|
+
| 'eosSignTx'
|
|
723
|
+
| 'binanceGetAddress'
|
|
724
|
+
| 'binanceGetPublicKey'
|
|
725
|
+
| 'binanceSignTx'
|
|
726
|
+
| 'webAuthnAddResidentCredential'
|
|
727
|
+
| 'webAuthnListResidentCredentials'
|
|
728
|
+
| 'webAuthnRemoveResidentCredential'
|
|
729
|
+
| 'getPublicKeyMultiple'
|
|
730
|
+
| 'listResDir'
|
|
731
|
+
| 'nftWriteData'
|
|
732
|
+
| 'nftWriteInfo'
|
|
733
|
+
| 'readSEPublicKey'
|
|
734
|
+
| 'resourceUpdate'
|
|
735
|
+
| 'bixinBackupDevice'
|
|
736
|
+
| 'bixinLoadDevice'
|
|
737
|
+
| 'bixinMessageSE'
|
|
738
|
+
| 'bixinVerifyDeviceRequest';
|
|
739
|
+
|
|
740
|
+
export type FactoryApiMethodName = 'deviceProvisionFactoryInfo' | 'deviceWriteFactoryCertificate';
|
|
741
|
+
|
|
742
|
+
export type TestApiMethods = Pick<CoreApiWithExtensions, TestApiMethodName>;
|
|
743
|
+
export type FactoryApi = Pick<CoreApiWithExtensions, FactoryApiMethodName>;
|
|
744
|
+
export type CoreApi = Omit<CoreApiWithExtensions, TestApiMethodName | FactoryApiMethodName>;
|
|
745
|
+
export type TestApi = CoreApi & TestApiMethods & FactoryApi;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { FileInfoList, ListResDir as HardwareListResDir } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export declare function listResDir(
|
|
5
|
+
connectId?: string,
|
|
6
|
+
deviceId?: string,
|
|
7
|
+
params?: CommonParams & HardwareListResDir
|
|
8
|
+
): Response<FileInfoList>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { MoneroAddress as HardwareMoneroAddress } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type MoneroAddress = {
|
|
5
|
+
path: string;
|
|
6
|
+
} & HardwareMoneroAddress;
|
|
7
|
+
|
|
8
|
+
export type MoneroGetAddressParams = {
|
|
9
|
+
path: string | number[];
|
|
10
|
+
showOnOneKey?: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export declare function moneroGetAddress(
|
|
14
|
+
connectId: string,
|
|
15
|
+
deviceId: string,
|
|
16
|
+
params: CommonParams & MoneroGetAddressParams
|
|
17
|
+
): Response<MoneroAddress>;
|
|
18
|
+
|
|
19
|
+
export declare function moneroGetAddress(
|
|
20
|
+
connectId: string,
|
|
21
|
+
deviceId: string,
|
|
22
|
+
params: CommonParams & { bundle?: MoneroGetAddressParams[] }
|
|
23
|
+
): Response<Array<MoneroAddress>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
MoneroWatchKey as HardwareMoneroWatchKey,
|
|
3
|
+
MoneroGetWatchKey,
|
|
4
|
+
} from '@onekeyfe/hd-transport';
|
|
5
|
+
import type { CommonParams, Response } from '../params';
|
|
6
|
+
|
|
7
|
+
export type MoneroAddress = {
|
|
8
|
+
path: string;
|
|
9
|
+
} & HardwareMoneroWatchKey;
|
|
10
|
+
|
|
11
|
+
export type MoneroGetWatchKeyParams = {
|
|
12
|
+
path: string | number[];
|
|
13
|
+
showOnOneKey?: boolean;
|
|
14
|
+
} & Omit<MoneroGetWatchKey, 'address_n'>;
|
|
15
|
+
|
|
16
|
+
export declare function moneroGetWatchKey(
|
|
17
|
+
connectId: string,
|
|
18
|
+
deviceId: string,
|
|
19
|
+
params: CommonParams & MoneroGetWatchKeyParams
|
|
20
|
+
): Response<MoneroAddress>;
|
|
21
|
+
|
|
22
|
+
export declare function moneroGetWatchKey(
|
|
23
|
+
connectId: string,
|
|
24
|
+
deviceId: string,
|
|
25
|
+
params: CommonParams & { bundle?: MoneroGetWatchKeyParams[] }
|
|
26
|
+
): Response<Array<MoneroAddress>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { NEMDecryptedMessage } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export type DecryptMessageParams = {
|
|
5
|
+
path: string | number[];
|
|
6
|
+
network?: number;
|
|
7
|
+
public_key?: string;
|
|
8
|
+
payload?: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export declare function nemDecryptMessage(
|
|
12
|
+
connectId: string,
|
|
13
|
+
deviceId: string,
|
|
14
|
+
params: CommonParams & DecryptMessageParams
|
|
15
|
+
): Response<NEMDecryptedMessage>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NFTWriteData as HardwareNFTWriteData, Success } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export declare function nftWriteData(
|
|
5
|
+
connectId: string,
|
|
6
|
+
deviceId: string,
|
|
7
|
+
params: CommonParams & HardwareNFTWriteData
|
|
8
|
+
): Response<Success>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { NFTWriteInfo, Success } from '@onekeyfe/hd-transport';
|
|
2
|
+
import type { CommonParams, Response } from '../params';
|
|
3
|
+
|
|
4
|
+
export declare function nftWriteInfo(
|
|
5
|
+
connectId: string,
|
|
6
|
+
deviceId: string,
|
|
7
|
+
params: CommonParams & NFTWriteInfo
|
|
8
|
+
): Response<Success>;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import type { CommonParams, Response } from '../params';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
2
|
+
import type {
|
|
3
|
+
DeviceCertificate,
|
|
4
|
+
DeviceCertificateSignature,
|
|
5
|
+
DeviceFactoryInfo,
|
|
6
|
+
OnboardingStatus,
|
|
7
|
+
Success,
|
|
8
|
+
} from '@onekeyfe/hd-transport';
|
|
9
|
+
import type {
|
|
10
|
+
DeviceFactoryCertificateWriteParams,
|
|
11
|
+
DeviceFactoryChallengeSignParams,
|
|
12
|
+
DeviceFactoryInfoSetParams,
|
|
13
|
+
DeviceRebootParams,
|
|
14
|
+
} from '../../api/protocol-v2/helpers';
|
|
4
15
|
import type {
|
|
5
16
|
DeviceUploadWallpaperParams,
|
|
6
17
|
DeviceUploadWallpaperResponse,
|
|
@@ -12,6 +23,11 @@ import type {
|
|
|
12
23
|
|
|
13
24
|
// Re-export implementation parameter types as the single source of truth.
|
|
14
25
|
export type { DeviceRebootParams, RebootTypeInput } from '../../api/protocol-v2/helpers';
|
|
26
|
+
export type {
|
|
27
|
+
DeviceFactoryCertificateWriteParams,
|
|
28
|
+
DeviceFactoryChallengeSignParams,
|
|
29
|
+
DeviceFactoryInfoSetParams,
|
|
30
|
+
} from '../../api/protocol-v2/helpers';
|
|
15
31
|
export type {
|
|
16
32
|
DeviceUploadWallpaperParams,
|
|
17
33
|
DeviceUploadWallpaperResponse,
|
|
@@ -55,6 +71,31 @@ export declare function deviceGetOnboardingStatus(
|
|
|
55
71
|
params?: CommonParams
|
|
56
72
|
): Response<OnboardingStatus>;
|
|
57
73
|
|
|
74
|
+
export declare function deviceProvisionFactoryInfo(
|
|
75
|
+
connectId: string,
|
|
76
|
+
params: CommonParams & DeviceFactoryInfoSetParams
|
|
77
|
+
): Response<Success>;
|
|
78
|
+
|
|
79
|
+
export declare function deviceReadFactoryInfo(
|
|
80
|
+
connectId: string,
|
|
81
|
+
params?: CommonParams
|
|
82
|
+
): Response<DeviceFactoryInfo>;
|
|
83
|
+
|
|
84
|
+
export declare function deviceWriteFactoryCertificate(
|
|
85
|
+
connectId: string,
|
|
86
|
+
params: CommonParams & DeviceFactoryCertificateWriteParams
|
|
87
|
+
): Response<Success>;
|
|
88
|
+
|
|
89
|
+
export declare function deviceReadFactoryCertificate(
|
|
90
|
+
connectId: string,
|
|
91
|
+
params?: CommonParams
|
|
92
|
+
): Response<DeviceCertificate>;
|
|
93
|
+
|
|
94
|
+
export declare function deviceSignFactoryChallenge(
|
|
95
|
+
connectId: string,
|
|
96
|
+
params: CommonParams & DeviceFactoryChallengeSignParams
|
|
97
|
+
): Response<DeviceCertificateSignature>;
|
|
98
|
+
|
|
58
99
|
export declare function deviceUploadWallpaper(
|
|
59
100
|
connectId: string,
|
|
60
101
|
params: CommonParams & DeviceUploadWallpaperParams
|