@ukeyfe/hardware-core 1.1.25 → 1.1.27
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/README.md +1 -1
- package/__tests__/benfen.test.ts +1 -1
- package/__tests__/checkBootloaderReleast.test.ts +3 -2
- package/__tests__/evmSignTransaction.test.ts +3 -2
- package/dist/api/BaseMethod.d.ts +9 -4
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/CheckAllFirmwareRelease.d.ts +1 -1
- package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CheckBLEFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CheckBootloaderRelease.d.ts.map +1 -1
- package/dist/api/CheckBridgeStatus.d.ts.map +1 -1
- package/dist/api/CheckFirmwareRelease.d.ts.map +1 -1
- package/dist/api/CheckFirmwareTypeAvailable.d.ts +6 -0
- package/dist/api/CheckFirmwareTypeAvailable.d.ts.map +1 -0
- package/dist/api/CipherKeyValue.d.ts +2 -2
- package/dist/api/CipherKeyValue.d.ts.map +1 -1
- package/dist/api/FirmwareUpdate.d.ts +1 -1
- package/dist/api/FirmwareUpdate.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV2.d.ts +3 -2
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV3.d.ts +7 -2
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/GetFeatures.d.ts.map +1 -1
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/GetUkeyFeatures.d.ts.map +1 -1
- package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -1
- package/dist/api/SearchDevices.d.ts +2 -1
- package/dist/api/SearchDevices.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumGetAddress.d.ts +2 -2
- package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignMessage.d.ts +1 -1
- package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
- package/dist/api/algo/AlgoGetAddress.d.ts +2 -2
- package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -1
- package/dist/api/algo/AlgoSignTransaction.d.ts +1 -1
- package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -1
- package/dist/api/allnetwork/AllNetworkGetAddress.d.ts +1 -1
- package/dist/api/allnetwork/AllNetworkGetAddress.d.ts.map +1 -1
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +2 -2
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -1
- package/dist/api/allnetwork/AllNetworkGetAddressByLoop.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetAddress.d.ts +2 -2
- package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -1
- package/dist/api/aptos/AptosGetPublicKey.d.ts +1 -1
- package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignInMessage.d.ts +2 -2
- package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignMessage.d.ts +2 -2
- package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -1
- package/dist/api/aptos/AptosSignTransaction.d.ts +1 -1
- package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetAddress.d.ts +2 -2
- package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts +1 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts +1 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts +1 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCGetAddress.d.ts +2 -2
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts +2 -2
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
- package/dist/api/btc/BTCSignPsbt.d.ts +1 -1
- package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -1
- package/dist/api/btc/BTCSignTransaction.d.ts +2 -2
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
- package/dist/api/btc/helpers/btcParamsUtils.d.ts.map +1 -1
- package/dist/api/btc/helpers/signtx.d.ts +2 -2
- package/dist/api/btc/helpers/signtx.d.ts.map +1 -1
- package/dist/api/btc/helpers/signtxLegacy.d.ts +2 -2
- package/dist/api/btc/helpers/signtxLegacy.d.ts.map +1 -1
- package/dist/api/btc/helpers/xpubUtils.d.ts.map +1 -1
- package/dist/api/cardano/CardanoGetAddress.d.ts +1 -1
- package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -1
- package/dist/api/cardano/CardanoGetPublicKey.d.ts +1 -1
- package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignMessage.d.ts +1 -1
- package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -1
- package/dist/api/cardano/CardanoSignTransaction.d.ts +1 -1
- package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -1
- package/dist/api/cardano/helper/addressParameters.d.ts.map +1 -1
- package/dist/api/cardano/helper/auxiliaryData.d.ts +1 -1
- package/dist/api/cardano/helper/auxiliaryData.d.ts.map +1 -1
- package/dist/api/cardano/helper/cardanoInputs.d.ts.map +1 -1
- package/dist/api/cardano/helper/cardanoOutputs.d.ts.map +1 -1
- package/dist/api/cardano/helper/certificate.d.ts +1 -1
- package/dist/api/cardano/helper/certificate.d.ts.map +1 -1
- package/dist/api/cardano/helper/token.d.ts +1 -1
- package/dist/api/cardano/helper/token.d.ts.map +1 -1
- package/dist/api/cardano/helper/witnesses.d.ts +2 -2
- package/dist/api/cardano/helper/witnesses.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxGetAddress.d.ts +2 -2
- package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignMessage.d.ts +1 -1
- package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +1 -1
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -1
- package/dist/api/conflux/ConfluxSignTransaction.d.ts +2 -2
- package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -1
- package/dist/api/cosmos/CosmosGetAddress.d.ts +2 -2
- package/dist/api/cosmos/CosmosGetAddress.d.ts.map +1 -1
- package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -1
- package/dist/api/cosmos/CosmosSignTransaction.d.ts +1 -1
- package/dist/api/cosmos/CosmosSignTransaction.d.ts.map +1 -1
- package/dist/api/device/DeviceBackup.d.ts +1 -1
- package/dist/api/device/DeviceBackup.d.ts.map +1 -1
- package/dist/api/device/DeviceCancel.d.ts +1 -1
- package/dist/api/device/DeviceCancel.d.ts.map +1 -1
- package/dist/api/device/DeviceChangePin.d.ts +1 -1
- package/dist/api/device/DeviceChangePin.d.ts.map +1 -1
- package/dist/api/device/DeviceFlags.d.ts +1 -1
- package/dist/api/device/DeviceFlags.d.ts.map +1 -1
- package/dist/api/device/DeviceFullyUploadResource.d.ts +1 -1
- package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -1
- package/dist/api/device/DeviceLock.d.ts +1 -1
- package/dist/api/device/DeviceLock.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts +1 -1
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
- package/dist/api/device/DeviceRecovery.d.ts +1 -1
- package/dist/api/device/DeviceRecovery.d.ts.map +1 -1
- package/dist/api/device/DeviceReset.d.ts +1 -1
- package/dist/api/device/DeviceReset.d.ts.map +1 -1
- package/dist/api/device/DeviceSettings.d.ts +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 +10 -7
- package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -1
- package/dist/api/device/DeviceUpdateReboot.d.ts +1 -1
- package/dist/api/device/DeviceUpdateReboot.d.ts.map +1 -1
- package/dist/api/device/DeviceUploadResource.d.ts +9 -4
- package/dist/api/device/DeviceUploadResource.d.ts.map +1 -1
- package/dist/api/device/DeviceVerify.d.ts +1 -1
- package/dist/api/device/DeviceVerify.d.ts.map +1 -1
- package/dist/api/device/DeviceWipe.d.ts +1 -1
- package/dist/api/device/DeviceWipe.d.ts.map +1 -1
- package/dist/api/dynex/DnxGetAddress.d.ts +1 -1
- package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -1
- package/dist/api/dynex/DnxSignTransaction.d.ts +2 -2
- package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -1
- package/dist/api/evm/EVMGetAddress.d.ts +2 -2
- package/dist/api/evm/EVMGetAddress.d.ts.map +1 -1
- package/dist/api/evm/EVMGetPublicKey.d.ts +2 -2
- package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessage.d.ts +1 -1
- package/dist/api/evm/EVMSignMessage.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessageEIP712.d.ts +1 -1
- package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTransaction.d.ts +1 -1
- package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -1
- package/dist/api/evm/EVMSignTypedData.d.ts +1 -1
- package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -1
- package/dist/api/evm/EVMVerifyMessage.d.ts +1 -1
- package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -1
- package/dist/api/evm/latest/getAddress.d.ts +1 -1
- package/dist/api/evm/latest/getAddress.d.ts.map +1 -1
- package/dist/api/evm/latest/getPublicKey.d.ts +1 -1
- package/dist/api/evm/latest/getPublicKey.d.ts.map +1 -1
- package/dist/api/evm/latest/signMessage.d.ts +1 -1
- package/dist/api/evm/latest/signMessage.d.ts.map +1 -1
- package/dist/api/evm/latest/signTransaction.d.ts +2 -2
- package/dist/api/evm/latest/signTransaction.d.ts.map +1 -1
- package/dist/api/evm/latest/signTypedData.d.ts +2 -2
- package/dist/api/evm/latest/signTypedData.d.ts.map +1 -1
- package/dist/api/evm/latest/signTypedHash.d.ts +2 -2
- package/dist/api/evm/latest/signTypedHash.d.ts.map +1 -1
- package/dist/api/evm/latest/verifyMessage.d.ts +1 -1
- package/dist/api/evm/latest/verifyMessage.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/getAddress.d.ts +1 -1
- package/dist/api/evm/legacyV1/getAddress.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/getPublicKey.d.ts +1 -1
- package/dist/api/evm/legacyV1/getPublicKey.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/signMessage.d.ts +1 -1
- package/dist/api/evm/legacyV1/signMessage.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/signTransaction.d.ts +2 -2
- package/dist/api/evm/legacyV1/signTransaction.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/signTypedData.d.ts +2 -2
- package/dist/api/evm/legacyV1/signTypedData.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/signTypedHash.d.ts +2 -2
- package/dist/api/evm/legacyV1/signTypedHash.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/verifyMessage.d.ts +1 -1
- package/dist/api/evm/legacyV1/verifyMessage.d.ts.map +1 -1
- package/dist/api/filecoin/FilecoinGetAddress.d.ts +2 -2
- package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -1
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts +1 -1
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -1
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +8 -6
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
- package/dist/api/firmware/bootloaderHelper.d.ts +1 -1
- package/dist/api/firmware/bootloaderHelper.d.ts.map +1 -1
- package/dist/api/firmware/getBinary.d.ts +6 -3
- package/dist/api/firmware/getBinary.d.ts.map +1 -1
- package/dist/api/firmware/releaseHelper.d.ts +7 -2
- package/dist/api/firmware/releaseHelper.d.ts.map +1 -1
- package/dist/api/firmware/updateBootloader.d.ts +8 -3
- package/dist/api/firmware/updateBootloader.d.ts.map +1 -1
- package/dist/api/firmware/uploadFirmware.d.ts +5 -5
- package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
- package/dist/api/helpers/batchGetPublickeys.d.ts +2 -2
- package/dist/api/helpers/batchGetPublickeys.d.ts.map +1 -1
- package/dist/api/helpers/paramsValidator.d.ts.map +1 -1
- package/dist/api/helpers/pathUtils.d.ts +1 -1
- package/dist/api/helpers/pathUtils.d.ts.map +1 -1
- package/dist/api/helpers/typeNameUtils.d.ts +2 -2
- package/dist/api/helpers/typeNameUtils.d.ts.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaGetAddress.d.ts +2 -2
- package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -1
- package/dist/api/kaspa/KaspaSignTransaction.d.ts +3 -3
- package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
- package/dist/api/kaspa/helpers/HashWriter.d.ts.map +1 -1
- package/dist/api/kaspa/helpers/TransferSerialize.d.ts +1 -1
- package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -1
- package/dist/api/lightning/LnurlAuth.d.ts +1 -1
- package/dist/api/lightning/LnurlAuth.d.ts.map +1 -1
- package/dist/api/near/NearGetAddress.d.ts +2 -2
- package/dist/api/near/NearGetAddress.d.ts.map +1 -1
- package/dist/api/near/NearSignTransaction.d.ts +1 -1
- package/dist/api/near/NearSignTransaction.d.ts.map +1 -1
- package/dist/api/nem/NEMGetAddress.d.ts +2 -2
- package/dist/api/nem/NEMGetAddress.d.ts.map +1 -1
- package/dist/api/nem/NEMSignTransaction.d.ts +2 -2
- package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -1
- package/dist/api/neo/NeoGetAddress.d.ts +2 -2
- package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
- package/dist/api/neo/NeoSignTransaction.d.ts +1 -1
- package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
- package/dist/api/nervos/NervosGetAddress.d.ts +1 -1
- package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
- package/dist/api/nervos/NervosSignTransaction.d.ts +1 -1
- package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
- package/dist/api/nexa/NexaGetAddress.d.ts +1 -1
- package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
- package/dist/api/nexa/NexaSignTransaction.d.ts +3 -3
- package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
- package/dist/api/nostr/NostrDecryptMessage.d.ts +1 -1
- package/dist/api/nostr/NostrDecryptMessage.d.ts.map +1 -1
- package/dist/api/nostr/NostrEncryptMessage.d.ts +1 -1
- package/dist/api/nostr/NostrEncryptMessage.d.ts.map +1 -1
- package/dist/api/nostr/NostrGetPublicKey.d.ts +2 -2
- package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -1
- package/dist/api/nostr/NostrSignEvent.d.ts +1 -1
- package/dist/api/nostr/NostrSignEvent.d.ts.map +1 -1
- package/dist/api/nostr/NostrSignSchnorr.d.ts +1 -1
- package/dist/api/nostr/NostrSignSchnorr.d.ts.map +1 -1
- package/dist/api/nostr/helper/index.d.ts +1 -1
- package/dist/api/nostr/helper/index.d.ts.map +1 -1
- package/dist/api/polkadot/PolkadotGetAddress.d.ts +2 -2
- package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -1
- package/dist/api/polkadot/PolkadotSignTransaction.d.ts +1 -1
- package/dist/api/polkadot/PolkadotSignTransaction.d.ts.map +1 -1
- package/dist/api/polkadot/networks.d.ts +7 -1
- package/dist/api/polkadot/networks.d.ts.map +1 -1
- package/dist/api/scdo/ScdoGetAddress.d.ts +2 -2
- package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignMessage.d.ts +1 -1
- package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignTransaction.d.ts +1 -1
- package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
- package/dist/api/solana/SolGetAddress.d.ts +2 -2
- package/dist/api/solana/SolGetAddress.d.ts.map +1 -1
- package/dist/api/solana/SolSignMessage.d.ts +1 -1
- package/dist/api/solana/SolSignMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts +1 -1
- package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -1
- package/dist/api/solana/SolSignTransaction.d.ts +2 -2
- package/dist/api/solana/SolSignTransaction.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinGetAddress.d.ts +2 -2
- package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +2 -2
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinSignMessage.d.ts +1 -1
- package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts +1 -1
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -1
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +1 -1
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -1
- package/dist/api/stellar/StellarGetAddress.d.ts +2 -2
- package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts +3 -3
- package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
- package/dist/api/sui/SuiGetAddress.d.ts +2 -2
- package/dist/api/sui/SuiGetAddress.d.ts.map +1 -1
- package/dist/api/sui/SuiGetPublicKey.d.ts +1 -1
- package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -1
- package/dist/api/sui/SuiSignMessage.d.ts +1 -1
- package/dist/api/sui/SuiSignMessage.d.ts.map +1 -1
- package/dist/api/sui/SuiSignTransaction.d.ts +1 -1
- package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
- package/dist/api/ton/TonGetAddress.d.ts +2 -2
- package/dist/api/ton/TonGetAddress.d.ts.map +1 -1
- package/dist/api/ton/TonSignMessage.d.ts +2 -2
- package/dist/api/ton/TonSignMessage.d.ts.map +1 -1
- package/dist/api/ton/TonSignProof.d.ts +1 -1
- package/dist/api/ton/TonSignProof.d.ts.map +1 -1
- package/dist/api/tron/TronGetAddress.d.ts +2 -2
- package/dist/api/tron/TronGetAddress.d.ts.map +1 -1
- package/dist/api/tron/TronSignMessage.d.ts +4 -1
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts +3 -3
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
- package/dist/api/u2f/GetNextU2FCounter.d.ts +1 -1
- package/dist/api/u2f/GetNextU2FCounter.d.ts.map +1 -1
- package/dist/api/u2f/SetU2FCounter.d.ts +1 -1
- package/dist/api/u2f/SetU2FCounter.d.ts.map +1 -1
- package/dist/api/utils.d.ts +1 -1
- package/dist/api/utils.d.ts.map +1 -1
- package/dist/api/xrp/XrpGetAddress.d.ts +1 -1
- package/dist/api/xrp/XrpGetAddress.d.ts.map +1 -1
- package/dist/api/xrp/XrpSignTransaction.d.ts +1 -1
- package/dist/api/xrp/XrpSignTransaction.d.ts.map +1 -1
- package/dist/core/RequestQueue.d.ts +1 -1
- package/dist/core/RequestQueue.d.ts.map +1 -1
- package/dist/core/index.d.ts +6 -3
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data/config.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +18 -10
- 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 +3 -3
- package/dist/data-manager/TransportManager.d.ts.map +1 -1
- package/dist/data-manager/connectSettings.d.ts +1 -1
- package/dist/data-manager/connectSettings.d.ts.map +1 -1
- package/dist/device/Device.d.ts +17 -8
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +8 -6
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DeviceConnector.d.ts +3 -2
- package/dist/device/DeviceConnector.d.ts.map +1 -1
- package/dist/device/DeviceList.d.ts +2 -2
- package/dist/device/DeviceList.d.ts.map +1 -1
- package/dist/device/DevicePool.d.ts +3 -2
- package/dist/device/DevicePool.d.ts.map +1 -1
- package/dist/events/call.d.ts +2 -2
- package/dist/events/call.d.ts.map +1 -1
- package/dist/events/core.d.ts +8 -8
- package/dist/events/core.d.ts.map +1 -1
- package/dist/events/device.d.ts +3 -2
- package/dist/events/device.d.ts.map +1 -1
- package/dist/events/firmware.d.ts +2 -2
- package/dist/events/firmware.d.ts.map +1 -1
- package/dist/events/iframe.d.ts +2 -2
- package/dist/events/iframe.d.ts.map +1 -1
- package/dist/events/ui-request.d.ts +9 -1
- package/dist/events/ui-request.d.ts.map +1 -1
- package/dist/events/ui-response.d.ts +8 -1
- package/dist/events/ui-response.d.ts.map +1 -1
- package/dist/index.d.ts +188 -74
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1647 -634
- package/dist/inject.d.ts +3 -3
- package/dist/inject.d.ts.map +1 -1
- package/dist/lowLevelInject.d.ts +3 -3
- package/dist/lowLevelInject.d.ts.map +1 -1
- package/dist/topLevelInject.d.ts +1 -1
- package/dist/topLevelInject.d.ts.map +1 -1
- package/dist/types/api/alephiumSignMessage.d.ts +1 -1
- package/dist/types/api/alephiumSignMessage.d.ts.map +1 -1
- package/dist/types/api/alephiumSignTransaction.d.ts +1 -1
- package/dist/types/api/alephiumSignTransaction.d.ts.map +1 -1
- package/dist/types/api/algoGetAddress.d.ts +1 -1
- package/dist/types/api/algoGetAddress.d.ts.map +1 -1
- package/dist/types/api/algoSignTransaction.d.ts +1 -1
- package/dist/types/api/algoSignTransaction.d.ts.map +1 -1
- package/dist/types/api/allNetworkGetAddress.d.ts +1 -1
- package/dist/types/api/allNetworkGetAddress.d.ts.map +1 -1
- package/dist/types/api/aptosGetAddress.d.ts +1 -1
- package/dist/types/api/aptosGetAddress.d.ts.map +1 -1
- package/dist/types/api/aptosSignInMessage.d.ts +1 -1
- package/dist/types/api/aptosSignInMessage.d.ts.map +1 -1
- package/dist/types/api/aptosSignMessage.d.ts +1 -1
- package/dist/types/api/aptosSignMessage.d.ts.map +1 -1
- package/dist/types/api/aptosSignTransaction.d.ts +1 -1
- package/dist/types/api/aptosSignTransaction.d.ts.map +1 -1
- package/dist/types/api/benfenGetAddress.d.ts +1 -1
- package/dist/types/api/benfenGetAddress.d.ts.map +1 -1
- package/dist/types/api/benfenSignMessage.d.ts +1 -1
- package/dist/types/api/benfenSignMessage.d.ts.map +1 -1
- package/dist/types/api/benfenSignTransaction.d.ts +1 -1
- package/dist/types/api/benfenSignTransaction.d.ts.map +1 -1
- package/dist/types/api/btcGetAddress.d.ts +1 -1
- package/dist/types/api/btcGetAddress.d.ts.map +1 -1
- package/dist/types/api/btcGetPublicKey.d.ts +1 -1
- package/dist/types/api/btcGetPublicKey.d.ts.map +1 -1
- package/dist/types/api/btcSignMessage.d.ts +1 -1
- package/dist/types/api/btcSignMessage.d.ts.map +1 -1
- package/dist/types/api/btcSignPsbt.d.ts +1 -1
- package/dist/types/api/btcSignPsbt.d.ts.map +1 -1
- package/dist/types/api/btcSignTransaction.d.ts +1 -1
- package/dist/types/api/btcSignTransaction.d.ts.map +1 -1
- package/dist/types/api/btcVerifyMessage.d.ts +1 -1
- package/dist/types/api/btcVerifyMessage.d.ts.map +1 -1
- package/dist/types/api/cardanoGetPublicKey.d.ts +1 -1
- package/dist/types/api/cardanoGetPublicKey.d.ts.map +1 -1
- package/dist/types/api/cardanoSignMessage.d.ts +1 -1
- package/dist/types/api/cardanoSignMessage.d.ts.map +1 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts +5 -1
- package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/checkBLEFirmwareRelease.d.ts +1 -1
- package/dist/types/api/checkBLEFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/checkBootloaderRelease.d.ts +5 -2
- package/dist/types/api/checkBootloaderRelease.d.ts.map +1 -1
- package/dist/types/api/checkFirmwareRelease.d.ts +6 -2
- package/dist/types/api/checkFirmwareRelease.d.ts.map +1 -1
- package/dist/types/api/checkFirmwareTypeAvailable.d.ts +9 -0
- package/dist/types/api/checkFirmwareTypeAvailable.d.ts.map +1 -0
- package/dist/types/api/cipherKeyValue.d.ts +1 -1
- package/dist/types/api/cipherKeyValue.d.ts.map +1 -1
- package/dist/types/api/confluxGetAddress.d.ts +1 -1
- package/dist/types/api/confluxGetAddress.d.ts.map +1 -1
- package/dist/types/api/confluxSignMessage.d.ts +1 -1
- package/dist/types/api/confluxSignMessage.d.ts.map +1 -1
- package/dist/types/api/confluxSignMessageCIP23.d.ts +1 -1
- package/dist/types/api/confluxSignMessageCIP23.d.ts.map +1 -1
- package/dist/types/api/cosmosGetAddress.d.ts +1 -1
- package/dist/types/api/cosmosGetAddress.d.ts.map +1 -1
- package/dist/types/api/cosmosSignTransaction.d.ts +1 -1
- package/dist/types/api/cosmosSignTransaction.d.ts.map +1 -1
- package/dist/types/api/deviceBackup.d.ts +1 -1
- package/dist/types/api/deviceBackup.d.ts.map +1 -1
- package/dist/types/api/deviceCancel.d.ts +1 -1
- package/dist/types/api/deviceCancel.d.ts.map +1 -1
- package/dist/types/api/deviceChangePin.d.ts +1 -1
- package/dist/types/api/deviceChangePin.d.ts.map +1 -1
- package/dist/types/api/deviceFlags.d.ts +1 -1
- package/dist/types/api/deviceFlags.d.ts.map +1 -1
- package/dist/types/api/deviceFullyUploadResource.d.ts +6 -1
- package/dist/types/api/deviceFullyUploadResource.d.ts.map +1 -1
- package/dist/types/api/deviceLock.d.ts +1 -1
- package/dist/types/api/deviceLock.d.ts.map +1 -1
- package/dist/types/api/deviceRebootToBoardloader.d.ts +1 -1
- package/dist/types/api/deviceRebootToBoardloader.d.ts.map +1 -1
- package/dist/types/api/deviceRebootToBootloader.d.ts +1 -1
- package/dist/types/api/deviceRebootToBootloader.d.ts.map +1 -1
- package/dist/types/api/deviceRecovery.d.ts +1 -1
- package/dist/types/api/deviceRecovery.d.ts.map +1 -1
- package/dist/types/api/deviceReset.d.ts +1 -1
- package/dist/types/api/deviceReset.d.ts.map +1 -1
- package/dist/types/api/deviceSettings.d.ts +4 -1
- 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 +6 -3
- package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -1
- package/dist/types/api/deviceUploadResource.d.ts +6 -2
- package/dist/types/api/deviceUploadResource.d.ts.map +1 -1
- package/dist/types/api/deviceWipe.d.ts +1 -1
- package/dist/types/api/deviceWipe.d.ts.map +1 -1
- package/dist/types/api/dnxSignTransaction.d.ts +1 -1
- package/dist/types/api/dnxSignTransaction.d.ts.map +1 -1
- package/dist/types/api/evmGetPublicKey.d.ts +1 -1
- package/dist/types/api/evmGetPublicKey.d.ts.map +1 -1
- package/dist/types/api/evmSignMessage.d.ts +1 -1
- package/dist/types/api/evmSignMessage.d.ts.map +1 -1
- package/dist/types/api/evmSignMessageEIP712.d.ts +1 -1
- package/dist/types/api/evmSignMessageEIP712.d.ts.map +1 -1
- package/dist/types/api/evmSignTypedData.d.ts +1 -1
- package/dist/types/api/evmSignTypedData.d.ts.map +1 -1
- package/dist/types/api/evmVerifyMessage.d.ts +1 -1
- package/dist/types/api/evmVerifyMessage.d.ts.map +1 -1
- package/dist/types/api/export.d.ts +2 -2
- package/dist/types/api/export.d.ts.map +1 -1
- package/dist/types/api/filecoinGetAddress.d.ts +1 -1
- package/dist/types/api/filecoinGetAddress.d.ts.map +1 -1
- package/dist/types/api/filecoinSignTransaction.d.ts +1 -1
- package/dist/types/api/filecoinSignTransaction.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +3 -1
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/getNextU2FCounter.d.ts +1 -1
- package/dist/types/api/getNextU2FCounter.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +130 -130
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/init.d.ts +1 -1
- package/dist/types/api/init.d.ts.map +1 -1
- package/dist/types/api/kaspaGetAddress.d.ts +1 -1
- package/dist/types/api/kaspaGetAddress.d.ts.map +1 -1
- package/dist/types/api/kaspaSignTransaction.d.ts +1 -1
- package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
- package/dist/types/api/nearGetAddress.d.ts +1 -1
- package/dist/types/api/nearGetAddress.d.ts.map +1 -1
- package/dist/types/api/nearSignTransaction.d.ts +1 -1
- package/dist/types/api/nearSignTransaction.d.ts.map +1 -1
- package/dist/types/api/nemGetAddress.d.ts +1 -1
- package/dist/types/api/nemGetAddress.d.ts.map +1 -1
- package/dist/types/api/nemSignTransaction.d.ts +1 -1
- package/dist/types/api/nemSignTransaction.d.ts.map +1 -1
- package/dist/types/api/polkadotGetAddress.d.ts +1 -1
- package/dist/types/api/polkadotGetAddress.d.ts.map +1 -1
- package/dist/types/api/polkadotSignTransaction.d.ts +2 -1
- package/dist/types/api/polkadotSignTransaction.d.ts.map +1 -1
- package/dist/types/api/promptWebDeviceAccess.d.ts +2 -2
- package/dist/types/api/promptWebDeviceAccess.d.ts.map +1 -1
- package/dist/types/api/scdoGetAddress.d.ts +1 -1
- package/dist/types/api/scdoGetAddress.d.ts.map +1 -1
- package/dist/types/api/scdoSignMessage.d.ts +1 -1
- package/dist/types/api/scdoSignMessage.d.ts.map +1 -1
- package/dist/types/api/scdoSignTransaction.d.ts +1 -1
- package/dist/types/api/scdoSignTransaction.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/api/setU2FCounter.d.ts +1 -1
- package/dist/types/api/setU2FCounter.d.ts.map +1 -1
- package/dist/types/api/solGetAddress.d.ts +1 -1
- package/dist/types/api/solGetAddress.d.ts.map +1 -1
- package/dist/types/api/solSignOffchainMessage.d.ts +1 -1
- package/dist/types/api/solSignOffchainMessage.d.ts.map +1 -1
- package/dist/types/api/solSignTransaction.d.ts +2 -1
- package/dist/types/api/solSignTransaction.d.ts.map +1 -1
- package/dist/types/api/starcoinGetAddress.d.ts +1 -1
- package/dist/types/api/starcoinGetAddress.d.ts.map +1 -1
- package/dist/types/api/starcoinGetPublicKey.d.ts +1 -1
- package/dist/types/api/starcoinGetPublicKey.d.ts.map +1 -1
- package/dist/types/api/starcoinSignMessage.d.ts +1 -1
- package/dist/types/api/starcoinSignMessage.d.ts.map +1 -1
- package/dist/types/api/starcoinSignTransaction.d.ts +1 -1
- package/dist/types/api/starcoinSignTransaction.d.ts.map +1 -1
- package/dist/types/api/starcoinVerifyMessage.d.ts +1 -1
- package/dist/types/api/starcoinVerifyMessage.d.ts.map +1 -1
- package/dist/types/api/stellarGetAddress.d.ts +1 -1
- package/dist/types/api/stellarGetAddress.d.ts.map +1 -1
- package/dist/types/api/stellarSignTransaction.d.ts +2 -2
- package/dist/types/api/stellarSignTransaction.d.ts.map +1 -1
- package/dist/types/api/suiGetAddress.d.ts +1 -1
- package/dist/types/api/suiGetAddress.d.ts.map +1 -1
- package/dist/types/api/suiSignMessage.d.ts +1 -1
- package/dist/types/api/suiSignMessage.d.ts.map +1 -1
- package/dist/types/api/suiSignTransaction.d.ts +1 -1
- package/dist/types/api/suiSignTransaction.d.ts.map +1 -1
- package/dist/types/api/tonGetAddress.d.ts +1 -1
- package/dist/types/api/tonGetAddress.d.ts.map +1 -1
- package/dist/types/api/tronGetAddress.d.ts +1 -1
- package/dist/types/api/tronGetAddress.d.ts.map +1 -1
- package/dist/types/api/tronSignMessage.d.ts +1 -1
- package/dist/types/api/tronSignMessage.d.ts.map +1 -1
- package/dist/types/api/tronSignTransaction.d.ts +1 -1
- package/dist/types/api/tronSignTransaction.d.ts.map +1 -1
- package/dist/types/device.d.ts +7 -1
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/params.d.ts +1 -0
- package/dist/types/params.d.ts.map +1 -1
- package/dist/types/settings.d.ts +7 -2
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/bridgeUpdate.d.ts +1 -1
- package/dist/utils/bridgeUpdate.d.ts.map +1 -1
- package/dist/utils/capabilitieUtils.d.ts +2 -2
- package/dist/utils/capabilitieUtils.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts +8 -5
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/deviceSettings.d.ts +29 -0
- package/dist/utils/deviceSettings.d.ts.map +1 -0
- package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
- package/dist/utils/findDefectiveBatchDevice.d.ts.map +1 -1
- package/dist/utils/homescreen.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/logger.d.ts +3 -1
- package/dist/utils/logger.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/release.d.ts +1 -1
- package/dist/utils/release.d.ts.map +1 -1
- package/dist/utils/tracing.d.ts +34 -0
- package/dist/utils/tracing.d.ts.map +1 -0
- package/package.json +7 -9
- package/src/api/BaseMethod.ts +63 -14
- package/src/api/CheckAllFirmwareRelease.ts +14 -6
- package/src/api/CheckBLEFirmwareRelease.ts +0 -1
- package/src/api/CheckBootloaderRelease.ts +13 -2
- package/src/api/CheckBridgeRelease.ts +1 -1
- package/src/api/CheckBridgeStatus.ts +1 -0
- package/src/api/CheckFirmwareRelease.ts +9 -2
- package/src/api/CheckFirmwareTypeAvailable.tsx +30 -0
- package/src/api/CipherKeyValue.ts +3 -2
- package/src/api/FirmwareUpdate.ts +9 -6
- package/src/api/FirmwareUpdateV2.ts +33 -16
- package/src/api/FirmwareUpdateV3.ts +154 -31
- package/src/api/GetFeatures.ts +1 -0
- package/src/api/GetPassphraseState.ts +1 -0
- package/src/api/GetUkeyFeatures.ts +1 -0
- package/src/api/PromptWebDeviceAccess.ts +4 -2
- package/src/api/SearchDevices.ts +2 -1
- package/src/api/alephium/AlephiumGetAddress.ts +3 -2
- package/src/api/alephium/AlephiumSignMessage.ts +2 -1
- package/src/api/alephium/AlephiumSignTransaction.ts +2 -1
- package/src/api/algo/AlgoGetAddress.ts +3 -3
- package/src/api/algo/AlgoSignTransaction.ts +3 -2
- package/src/api/allnetwork/AllNetworkGetAddress.ts +5 -4
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +81 -32
- package/src/api/allnetwork/AllNetworkGetAddressByLoop.ts +6 -5
- package/src/api/aptos/AptosGetAddress.ts +4 -3
- package/src/api/aptos/AptosGetPublicKey.ts +2 -1
- package/src/api/aptos/AptosSignInMessage.ts +3 -2
- package/src/api/aptos/AptosSignMessage.ts +3 -2
- package/src/api/aptos/AptosSignTransaction.ts +2 -1
- package/src/api/benfen/BenfenGetAddress.ts +3 -3
- package/src/api/benfen/BenfenGetPublicKey.ts +2 -1
- package/src/api/benfen/BenfenSignMessage.ts +2 -1
- package/src/api/benfen/BenfenSignTransaction.ts +3 -2
- package/src/api/btc/BTCGetAddress.ts +3 -2
- package/src/api/btc/BTCGetPublicKey.ts +5 -3
- package/src/api/btc/BTCSignMessage.ts +2 -1
- package/src/api/btc/BTCSignPsbt.ts +4 -2
- package/src/api/btc/BTCSignTransaction.ts +8 -7
- package/src/api/btc/BTCVerifyMessage.ts +2 -2
- package/src/api/btc/helpers/btcParamsUtils.ts +2 -1
- package/src/api/btc/helpers/signtx.ts +4 -3
- package/src/api/btc/helpers/signtxLegacy.ts +4 -3
- package/src/api/btc/helpers/xpubUtils.ts +1 -0
- package/src/api/cardano/CardanoGetAddress.ts +5 -4
- package/src/api/cardano/CardanoGetPublicKey.ts +2 -1
- package/src/api/cardano/CardanoSignMessage.ts +2 -1
- package/src/api/cardano/CardanoSignTransaction.ts +11 -10
- package/src/api/cardano/helper/addressParameters.ts +2 -0
- package/src/api/cardano/helper/auxiliaryData.ts +5 -3
- package/src/api/cardano/helper/cardanoInputs.ts +1 -0
- package/src/api/cardano/helper/cardanoOutputs.ts +1 -0
- package/src/api/cardano/helper/certificate.ts +7 -5
- package/src/api/cardano/helper/token.ts +2 -1
- package/src/api/cardano/helper/witnesses.ts +3 -2
- package/src/api/conflux/ConfluxGetAddress.ts +3 -2
- package/src/api/conflux/ConfluxSignMessage.ts +2 -1
- package/src/api/conflux/ConfluxSignMessageCIP23.ts +2 -1
- package/src/api/conflux/ConfluxSignTransaction.ts +9 -8
- package/src/api/cosmos/CosmosGetAddress.ts +3 -3
- package/src/api/cosmos/CosmosGetPublicKey.ts +2 -1
- package/src/api/cosmos/CosmosSignTransaction.ts +24 -10
- package/src/api/device/DeviceBackup.ts +2 -1
- package/src/api/device/DeviceCancel.ts +2 -1
- package/src/api/device/DeviceChangePin.ts +2 -1
- package/src/api/device/DeviceFlags.ts +2 -1
- package/src/api/device/DeviceFullyUploadResource.ts +13 -4
- package/src/api/device/DeviceLock.ts +2 -1
- package/src/api/device/DeviceRebootToBoardloader.ts +1 -0
- package/src/api/device/DeviceRebootToBootloader.ts +2 -1
- package/src/api/device/DeviceRecovery.ts +2 -1
- package/src/api/device/DeviceReset.ts +2 -1
- package/src/api/device/DeviceSettings.ts +45 -5
- package/src/api/device/DeviceSupportFeatures.ts +1 -0
- package/src/api/device/DeviceUnlock.ts +2 -1
- package/src/api/device/DeviceUpdateBootloader.ts +72 -39
- package/src/api/device/DeviceUpdateReboot.ts +2 -1
- package/src/api/device/DeviceUploadResource.ts +87 -23
- package/src/api/device/DeviceVerify.ts +3 -1
- package/src/api/device/DeviceWipe.ts +2 -1
- package/src/api/dynex/DnxGetAddress.ts +2 -2
- package/src/api/dynex/DnxSignTransaction.ts +3 -3
- package/src/api/evm/EVMGetAddress.ts +3 -2
- package/src/api/evm/EVMGetPublicKey.ts +3 -2
- package/src/api/evm/EVMSignMessage.ts +2 -1
- package/src/api/evm/EVMSignMessageEIP712.ts +2 -1
- package/src/api/evm/EVMSignTransaction.ts +9 -6
- package/src/api/evm/EVMSignTypedData.ts +25 -22
- package/src/api/evm/EVMVerifyMessage.ts +2 -1
- package/src/api/evm/latest/getAddress.ts +1 -1
- package/src/api/evm/latest/getPublicKey.ts +5 -1
- package/src/api/evm/latest/signMessage.ts +1 -1
- package/src/api/evm/latest/signTransaction.ts +12 -10
- package/src/api/evm/latest/signTypedData.ts +2 -2
- package/src/api/evm/latest/signTypedHash.ts +4 -2
- package/src/api/evm/latest/verifyMessage.ts +1 -1
- package/src/api/evm/legacyV1/getAddress.ts +1 -1
- package/src/api/evm/legacyV1/getPublicKey.ts +5 -1
- package/src/api/evm/legacyV1/signMessage.ts +1 -1
- package/src/api/evm/legacyV1/signTransaction.ts +3 -2
- package/src/api/evm/legacyV1/signTypedData.ts +2 -2
- package/src/api/evm/legacyV1/signTypedHash.ts +4 -2
- package/src/api/evm/legacyV1/verifyMessage.ts +1 -1
- package/src/api/filecoin/FilecoinGetAddress.ts +3 -2
- package/src/api/filecoin/FilecoinSignTransaction.ts +3 -2
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +87 -28
- package/src/api/firmware/bootloaderHelper.ts +3 -1
- package/src/api/firmware/getBinary.ts +15 -4
- package/src/api/firmware/releaseHelper.ts +22 -11
- package/src/api/firmware/updateBootloader.ts +22 -11
- package/src/api/firmware/uploadFirmware.ts +113 -25
- package/src/api/helpers/batchGetPublickeys.ts +14 -6
- package/src/api/helpers/paramsValidator.ts +23 -6
- package/src/api/helpers/pathUtils.ts +2 -1
- package/src/api/helpers/typeNameUtils.ts +5 -3
- package/src/api/index.ts +1 -1
- package/src/api/kaspa/KaspaGetAddress.ts +3 -2
- package/src/api/kaspa/KaspaSignTransaction.ts +7 -5
- package/src/api/kaspa/helpers/HashWriter.ts +3 -1
- package/src/api/kaspa/helpers/TransferSerialize.ts +5 -4
- package/src/api/lightning/LnurlAuth.ts +2 -1
- package/src/api/near/NearGetAddress.ts +3 -2
- package/src/api/near/NearSignTransaction.ts +2 -1
- package/src/api/nem/NEMGetAddress.ts +4 -3
- package/src/api/nem/NEMSignTransaction.ts +9 -8
- package/src/api/neo/NeoGetAddress.ts +3 -2
- package/src/api/neo/NeoSignTransaction.ts +2 -2
- package/src/api/nervos/NervosGetAddress.ts +2 -2
- package/src/api/nervos/NervosSignTransaction.ts +4 -2
- package/src/api/nexa/NexaGetAddress.ts +3 -2
- package/src/api/nexa/NexaSignTransaction.ts +5 -3
- package/src/api/nostr/NostrDecryptMessage.ts +2 -1
- package/src/api/nostr/NostrEncryptMessage.ts +2 -1
- package/src/api/nostr/NostrGetPublicKey.ts +4 -3
- package/src/api/nostr/NostrSignEvent.ts +3 -1
- package/src/api/nostr/NostrSignSchnorr.ts +2 -1
- package/src/api/nostr/helper/index.ts +1 -1
- package/src/api/polkadot/PolkadotGetAddress.ts +5 -5
- package/src/api/polkadot/PolkadotSignTransaction.ts +8 -5
- package/src/api/polkadot/networks.ts +16 -0
- package/src/api/scdo/ScdoGetAddress.ts +3 -2
- package/src/api/scdo/ScdoSignMessage.ts +2 -1
- package/src/api/scdo/ScdoSignTransaction.ts +9 -3
- package/src/api/solana/SolGetAddress.ts +3 -2
- package/src/api/solana/SolSignMessage.ts +2 -1
- package/src/api/solana/SolSignOffchainMessage.ts +2 -1
- package/src/api/solana/SolSignTransaction.ts +5 -2
- package/src/api/starcoin/StarcoinGetAddress.ts +4 -3
- package/src/api/starcoin/StarcoinGetPublicKey.ts +5 -4
- package/src/api/starcoin/StarcoinSignMessage.ts +2 -1
- package/src/api/starcoin/StarcoinSignTransaction.ts +2 -1
- package/src/api/starcoin/StarcoinVerifyMessage.ts +2 -1
- package/src/api/stellar/StellarGetAddress.ts +3 -2
- package/src/api/stellar/StellarSignTransaction.ts +8 -6
- package/src/api/sui/SuiGetAddress.ts +3 -3
- package/src/api/sui/SuiGetPublicKey.ts +2 -1
- package/src/api/sui/SuiSignMessage.ts +2 -1
- package/src/api/sui/SuiSignTransaction.ts +7 -1
- package/src/api/ton/TonGetAddress.ts +3 -3
- package/src/api/ton/TonSignMessage.ts +10 -7
- package/src/api/ton/TonSignProof.ts +3 -3
- package/src/api/tron/TronGetAddress.ts +3 -2
- package/src/api/tron/TronSignMessage.ts +12 -8
- package/src/api/tron/TronSignTransaction.ts +14 -3
- package/src/api/u2f/GetNextU2FCounter.ts +2 -1
- package/src/api/u2f/SetU2FCounter.ts +2 -1
- package/src/api/utils.ts +3 -1
- package/src/api/xrp/XrpGetAddress.ts +2 -20
- package/src/api/xrp/XrpSignTransaction.ts +2 -1
- package/src/constants/errors.ts +1 -1
- package/src/core/RequestQueue.ts +3 -2
- package/src/core/index.ts +203 -50
- package/src/data/config.ts +4 -4
- package/src/data/messages/messages.json +98 -1
- package/src/data/messages/messages_legacy_v1.json +12 -0
- package/src/data-manager/DataManager.ts +180 -36
- package/src/data-manager/MessagesConfig.ts +12 -4
- package/src/data-manager/TransportManager.ts +12 -6
- package/src/data-manager/connectSettings.ts +3 -2
- package/src/device/Device.ts +54 -28
- package/src/device/DeviceCommands.ts +56 -14
- package/src/device/DeviceConnector.ts +15 -3
- package/src/device/DeviceList.ts +4 -2
- package/src/device/DevicePool.ts +6 -3
- package/src/events/call.ts +3 -2
- package/src/events/core.ts +10 -9
- package/src/events/device.ts +3 -2
- package/src/events/firmware.ts +5 -2
- package/src/events/iframe.ts +3 -2
- package/src/events/ui-request.ts +11 -0
- package/src/events/ui-response.ts +12 -1
- package/src/index.ts +6 -3
- package/src/inject.ts +5 -5
- package/src/lowLevelInject.ts +4 -3
- package/src/topLevelInject.ts +4 -2
- package/src/types/api/alephiumSignMessage.ts +1 -1
- package/src/types/api/alephiumSignTransaction.ts +1 -1
- package/src/types/api/algoGetAddress.ts +1 -1
- package/src/types/api/algoSignTransaction.ts +1 -1
- package/src/types/api/allNetworkGetAddress.ts +2 -1
- package/src/types/api/aptosGetAddress.ts +1 -1
- package/src/types/api/aptosSignInMessage.ts +1 -1
- package/src/types/api/aptosSignMessage.ts +1 -1
- package/src/types/api/aptosSignTransaction.ts +1 -1
- package/src/types/api/benfenGetAddress.ts +1 -1
- package/src/types/api/benfenSignMessage.ts +1 -1
- package/src/types/api/benfenSignTransaction.ts +1 -1
- package/src/types/api/btcGetAddress.ts +1 -1
- package/src/types/api/btcGetPublicKey.ts +1 -1
- package/src/types/api/btcSignMessage.ts +1 -1
- package/src/types/api/btcSignPsbt.ts +1 -1
- package/src/types/api/btcSignTransaction.ts +2 -2
- package/src/types/api/btcVerifyMessage.ts +1 -1
- package/src/types/api/cardanoGetPublicKey.ts +1 -1
- package/src/types/api/cardanoSignMessage.ts +1 -1
- package/src/types/api/checkAllFirmwareRelease.ts +5 -1
- package/src/types/api/checkBLEFirmwareRelease.ts +1 -1
- package/src/types/api/checkBootloaderRelease.ts +7 -3
- package/src/types/api/checkFirmwareRelease.ts +10 -2
- package/src/types/api/checkFirmwareTypeAvailable.ts +12 -0
- package/src/types/api/cipherKeyValue.ts +1 -1
- package/src/types/api/confluxGetAddress.ts +1 -1
- package/src/types/api/confluxSignMessage.ts +1 -1
- package/src/types/api/confluxSignMessageCIP23.ts +1 -1
- package/src/types/api/cosmosGetAddress.ts +1 -1
- package/src/types/api/cosmosSignTransaction.ts +1 -1
- package/src/types/api/deviceBackup.ts +1 -1
- package/src/types/api/deviceCancel.ts +1 -1
- package/src/types/api/deviceChangePin.ts +1 -1
- package/src/types/api/deviceFlags.ts +1 -1
- package/src/types/api/deviceFullyUploadResource.ts +7 -1
- package/src/types/api/deviceLock.ts +1 -1
- package/src/types/api/deviceRebootToBoardloader.ts +1 -1
- package/src/types/api/deviceRebootToBootloader.ts +1 -1
- package/src/types/api/deviceRecovery.ts +1 -1
- package/src/types/api/deviceReset.ts +1 -1
- package/src/types/api/deviceSettings.ts +4 -1
- package/src/types/api/deviceUnlock.ts +1 -1
- package/src/types/api/deviceUpdateBootloader.ts +8 -4
- package/src/types/api/deviceUploadResource.ts +7 -2
- package/src/types/api/deviceWipe.ts +1 -1
- package/src/types/api/dnxSignTransaction.ts +1 -1
- package/src/types/api/evmGetPublicKey.ts +1 -1
- package/src/types/api/evmSignMessage.ts +1 -1
- package/src/types/api/evmSignMessageEIP712.ts +1 -1
- package/src/types/api/evmSignTypedData.ts +1 -1
- package/src/types/api/evmVerifyMessage.ts +1 -1
- package/src/types/api/export.ts +5 -2
- package/src/types/api/filecoinGetAddress.ts +1 -1
- package/src/types/api/filecoinSignTransaction.ts +1 -1
- package/src/types/api/firmwareUpdate.ts +4 -1
- package/src/types/api/getNextU2FCounter.ts +1 -1
- package/src/types/api/index.ts +130 -163
- package/src/types/api/init.ts +1 -1
- package/src/types/api/kaspaGetAddress.ts +1 -1
- package/src/types/api/kaspaSignTransaction.ts +1 -1
- package/src/types/api/nearGetAddress.ts +1 -1
- package/src/types/api/nearSignTransaction.ts +1 -1
- package/src/types/api/nemGetAddress.ts +1 -1
- package/src/types/api/nemSignTransaction.ts +1 -1
- package/src/types/api/polkadotGetAddress.ts +1 -1
- package/src/types/api/polkadotSignTransaction.ts +2 -1
- package/src/types/api/promptWebDeviceAccess.ts +2 -2
- package/src/types/api/scdoGetAddress.ts +1 -1
- package/src/types/api/scdoSignMessage.ts +1 -1
- package/src/types/api/scdoSignTransaction.ts +1 -1
- package/src/types/api/searchDevices.ts +2 -3
- package/src/types/api/setU2FCounter.ts +1 -1
- package/src/types/api/solGetAddress.ts +1 -1
- package/src/types/api/solSignOffchainMessage.ts +4 -1
- package/src/types/api/solSignTransaction.ts +5 -1
- package/src/types/api/starcoinGetAddress.ts +1 -1
- package/src/types/api/starcoinGetPublicKey.ts +1 -1
- package/src/types/api/starcoinSignMessage.ts +1 -1
- package/src/types/api/starcoinSignTransaction.ts +1 -1
- package/src/types/api/starcoinVerifyMessage.ts +1 -1
- package/src/types/api/stellarGetAddress.ts +1 -1
- package/src/types/api/stellarSignTransaction.ts +2 -2
- package/src/types/api/suiGetAddress.ts +1 -1
- package/src/types/api/suiSignMessage.ts +1 -1
- package/src/types/api/suiSignTransaction.ts +1 -1
- package/src/types/api/tonGetAddress.ts +1 -1
- package/src/types/api/tronGetAddress.ts +1 -1
- package/src/types/api/tronSignMessage.ts +1 -1
- package/src/types/api/tronSignTransaction.ts +1 -1
- package/src/types/device.ts +10 -1
- package/src/types/params.ts +5 -0
- package/src/types/settings.ts +51 -11
- package/src/utils/bridgeUpdate.ts +4 -1
- package/src/utils/capabilitieUtils.ts +2 -2
- package/src/utils/deviceFeaturesUtils.ts +27 -15
- package/src/utils/deviceInfoUtils.ts +2 -1
- package/src/utils/deviceSettings.ts +109 -0
- package/src/utils/deviceVersionUtils.ts +1 -0
- package/src/utils/findDefectiveBatchDevice.ts +2 -1
- package/src/utils/homescreen.ts +3 -1
- package/src/utils/index.ts +2 -0
- package/src/utils/logger.ts +5 -2
- package/src/utils/release.ts +2 -1
- package/src/utils/tracing.ts +238 -0
- package/dist/api/EmmcFileWrite.d.ts +0 -13
- package/dist/api/EmmcFileWrite.d.ts.map +0 -1
- package/dist/types/api/emmcFileWrite.d.ts +0 -8
- package/dist/types/api/emmcFileWrite.d.ts.map +0 -1
- package/src/api/EmmcFileWrite.ts +0 -49
- package/src/types/api/emmcFileWrite.ts +0 -12
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { PolkadotGetAddress as HardwarePolkadotGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
|
-
|
|
3
1
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
2
|
import { BaseMethod } from '../BaseMethod';
|
|
5
3
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
-
import {
|
|
7
|
-
|
|
4
|
+
import { getPolkadotVersionRangeWithBundle, parseNetwork } from './networks';
|
|
5
|
+
|
|
6
|
+
import type { PolkadotGetAddress as HardwarePolkadotGetAddress } from '@ukeyfe/hardware-transport';
|
|
7
|
+
import type { PolkadotAddress, PolkadotGetAddressParams } from '../../types';
|
|
8
8
|
|
|
9
9
|
export default class PolkadotGetAddress extends BaseMethod<HardwarePolkadotGetAddress[]> {
|
|
10
10
|
hasBundle = false;
|
|
@@ -37,7 +37,7 @@ export default class PolkadotGetAddress extends BaseMethod<HardwarePolkadotGetAd
|
|
|
37
37
|
this.params.push({
|
|
38
38
|
address_n: addressN,
|
|
39
39
|
prefix,
|
|
40
|
-
network,
|
|
40
|
+
network: parseNetwork(network),
|
|
41
41
|
show_display: showOnUKey,
|
|
42
42
|
});
|
|
43
43
|
});
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { PolkadotSignTx as HardwarePolkadotSignTx } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
3
2
|
import { BaseMethod } from '../BaseMethod';
|
|
4
3
|
import { validateParams } from '../helpers/paramsValidator';
|
|
5
|
-
import { PolkadotSignTransactionParams } from '../../types';
|
|
6
4
|
import { formatAnyHex } from '../helpers/hexUtils';
|
|
7
|
-
import { getPolkadotVersionRange } from './networks';
|
|
5
|
+
import { getPolkadotVersionRange, parseNetwork } from './networks';
|
|
6
|
+
|
|
7
|
+
import type { PolkadotSignTransactionParams } from '../../types';
|
|
8
|
+
import type { PolkadotSignTx as HardwarePolkadotSignTx } from '@ukeyfe/hardware-transport';
|
|
8
9
|
|
|
9
10
|
export default class PolkadotSignTransaction extends BaseMethod<HardwarePolkadotSignTx> {
|
|
10
11
|
hasBundle = false;
|
|
@@ -17,16 +18,18 @@ export default class PolkadotSignTransaction extends BaseMethod<HardwarePolkadot
|
|
|
17
18
|
validateParams(this.payload, [
|
|
18
19
|
{ name: 'path', required: true },
|
|
19
20
|
{ name: 'network', required: true },
|
|
21
|
+
{ name: 'prefix' },
|
|
20
22
|
{ name: 'rawTx', type: 'hexString', required: true },
|
|
21
23
|
]);
|
|
22
24
|
|
|
23
25
|
// init params
|
|
24
|
-
const { path, rawTx, network } = this.payload as PolkadotSignTransactionParams;
|
|
26
|
+
const { path, rawTx, network, prefix } = this.payload as PolkadotSignTransactionParams;
|
|
25
27
|
const addressN = validatePath(path, 3);
|
|
26
28
|
|
|
27
29
|
this.params = {
|
|
28
30
|
address_n: addressN,
|
|
29
|
-
network,
|
|
31
|
+
network: parseNetwork(network),
|
|
32
|
+
prefix,
|
|
30
33
|
raw_tx: formatAnyHex(rawTx),
|
|
31
34
|
};
|
|
32
35
|
}
|
|
@@ -8,6 +8,11 @@ enum Networks {
|
|
|
8
8
|
Astar = 'astar',
|
|
9
9
|
JoyStream = 'joystream',
|
|
10
10
|
Manta = 'manta',
|
|
11
|
+
Hydration = 'hydration',
|
|
12
|
+
Bifrost = 'bifrost',
|
|
13
|
+
BifrostKusama = 'bifrost-ksm',
|
|
14
|
+
PolkadotAssetHub = 'polkadot-assethub',
|
|
15
|
+
KusamaAssetHub = 'kusama-assethub',
|
|
11
16
|
}
|
|
12
17
|
|
|
13
18
|
// All polkadot networks are included in no special case
|
|
@@ -54,3 +59,14 @@ export function getPolkadotVersionRangeWithBundle(networks: string[]) {
|
|
|
54
59
|
}
|
|
55
60
|
return baseVersionRange;
|
|
56
61
|
}
|
|
62
|
+
|
|
63
|
+
export function parseNetwork(network: string) {
|
|
64
|
+
switch (network) {
|
|
65
|
+
case Networks.PolkadotAssetHub:
|
|
66
|
+
return Networks.Polkadot;
|
|
67
|
+
case Networks.KusamaAssetHub:
|
|
68
|
+
return Networks.Kusama;
|
|
69
|
+
default:
|
|
70
|
+
return network;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ScdoGetAddress as HardwareScdoGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
import type { ScdoGetAddress as HardwareScdoGetAddress } from '@ukeyfe/hardware-transport';
|
|
7
|
+
import type { ScdoAddress, ScdoGetAddressParams } from '../../types';
|
|
7
8
|
|
|
8
9
|
export default class ScdoGetAddress extends BaseMethod<HardwareScdoGetAddress[]> {
|
|
9
10
|
hasBundle = false;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ScdoSignMessage as HardwareScdoSignMessage } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams } from '../helpers/paramsValidator';
|
|
6
5
|
import { stripHexPrefix } from '../helpers/hexUtils';
|
|
7
6
|
|
|
7
|
+
import type { ScdoSignMessage as HardwareScdoSignMessage } from '@ukeyfe/hardware-transport';
|
|
8
|
+
|
|
8
9
|
export default class ScdoSignMessage extends BaseMethod<HardwareScdoSignMessage> {
|
|
9
10
|
init() {
|
|
10
11
|
this.checkDeviceId = true;
|
|
@@ -1,13 +1,19 @@
|
|
|
1
|
-
import { ScdoSignTx as HardwareScdoSignTx, TypedCall, ScdoSignedTx } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { bytesToHex } from '@noble/hashes/utils';
|
|
2
|
+
|
|
3
3
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
4
4
|
import { validatePath } from '../helpers/pathUtils';
|
|
5
5
|
import { BaseMethod } from '../BaseMethod';
|
|
6
6
|
import { validateParams } from '../helpers/paramsValidator';
|
|
7
|
-
import { ScdoSignTransactionParams } from '../../types';
|
|
8
|
-
import type { TypedResponseMessage } from '../../device/DeviceCommands';
|
|
9
7
|
import { formatAnyHex, stripHexStartZeroes } from '../helpers/hexUtils';
|
|
10
8
|
|
|
9
|
+
import type { ScdoSignTransactionParams } from '../../types';
|
|
10
|
+
import type {
|
|
11
|
+
ScdoSignTx as HardwareScdoSignTx,
|
|
12
|
+
ScdoSignedTx,
|
|
13
|
+
TypedCall,
|
|
14
|
+
} from '@ukeyfe/hardware-transport';
|
|
15
|
+
import type { TypedResponseMessage } from '../../device/DeviceCommands';
|
|
16
|
+
|
|
11
17
|
export default class ScdoSignTransaction extends BaseMethod<HardwareScdoSignTx> {
|
|
12
18
|
init() {
|
|
13
19
|
this.checkDeviceId = true;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { SolanaGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
import type { SolanaGetAddress } from '@ukeyfe/hardware-transport';
|
|
7
|
+
import type { SolanaAddress, SolanaGetAddressParams } from '../../types';
|
|
7
8
|
|
|
8
9
|
export default class SolGetAddress extends BaseMethod<SolanaGetAddress[]> {
|
|
9
10
|
hasBundle = false;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { SolanaSignUnsafeMessage as HardwareSolSignUnsafeMessage } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams } from '../helpers/paramsValidator';
|
|
6
5
|
import { stripHexPrefix } from '../helpers/hexUtils';
|
|
7
6
|
|
|
7
|
+
import type { SolanaSignUnsafeMessage as HardwareSolSignUnsafeMessage } from '@ukeyfe/hardware-transport';
|
|
8
|
+
|
|
8
9
|
export default class SolSignMessage extends BaseMethod<HardwareSolSignUnsafeMessage> {
|
|
9
10
|
init() {
|
|
10
11
|
this.checkDeviceId = true;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { SolanaSignOffChainMessage as HardwareSolSignOffChainMessage } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams } from '../helpers/paramsValidator';
|
|
6
5
|
import { stripHexPrefix } from '../helpers/hexUtils';
|
|
7
6
|
|
|
7
|
+
import type { SolanaSignOffChainMessage as HardwareSolSignOffChainMessage } from '@ukeyfe/hardware-transport';
|
|
8
|
+
|
|
8
9
|
export default class SolSignOffchainMessage extends BaseMethod<HardwareSolSignOffChainMessage> {
|
|
9
10
|
init() {
|
|
10
11
|
this.checkDeviceId = true;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { SolanaSignTx as HardwareSolanaSignTx } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams } from '../helpers/paramsValidator';
|
|
6
|
-
import { SolanaSignedTx, SolanaSignTransactionParams } from '../../types';
|
|
7
5
|
import { formatAnyHex } from '../helpers/hexUtils';
|
|
8
6
|
|
|
7
|
+
import type { SolanaSignTransactionParams, SolanaSignedTx } from '../../types';
|
|
8
|
+
import type { SolanaSignTx as HardwareSolanaSignTx } from '@ukeyfe/hardware-transport';
|
|
9
|
+
|
|
9
10
|
export default class SolSignTransaction extends BaseMethod<HardwareSolanaSignTx[]> {
|
|
10
11
|
hasBundle = false;
|
|
11
12
|
|
|
@@ -27,11 +28,13 @@ export default class SolSignTransaction extends BaseMethod<HardwareSolanaSignTx[
|
|
|
27
28
|
validateParams(batch, [
|
|
28
29
|
{ name: 'path', required: true },
|
|
29
30
|
{ name: 'rawTx', type: 'hexString', required: true },
|
|
31
|
+
{ name: 'extraInfo', type: 'object' },
|
|
30
32
|
]);
|
|
31
33
|
|
|
32
34
|
this.params.push({
|
|
33
35
|
address_n: addressN,
|
|
34
36
|
raw_tx: formatAnyHex(batch.rawTx),
|
|
37
|
+
...(batch.extraInfo ? { extra_info: batch.extraInfo } : undefined),
|
|
35
38
|
});
|
|
36
39
|
});
|
|
37
40
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { StarcoinGetAddress as HardwareStarcoinGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
-
import {
|
|
2
|
+
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
import type { StarcoinGetAddress as HardwareStarcoinGetAddress } from '@ukeyfe/hardware-transport';
|
|
7
|
+
import type { StarcoinAddress, StarcoinGetAddressParams } from '../../types/api/starcoinGetAddress';
|
|
7
8
|
|
|
8
9
|
export default class StarcoinGetAddress extends BaseMethod<HardwareStarcoinGetAddress[]> {
|
|
9
10
|
hasBundle = false;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { StarcoinGetPublicKey as HardwareStarcoinGetPublicKey } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
-
import {
|
|
2
|
+
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
|
|
6
|
+
import type { StarcoinGetPublicKey as HardwareStarcoinGetPublicKey } from '@ukeyfe/hardware-transport';
|
|
7
|
+
import type {
|
|
8
8
|
StarcoinGetPublicKeyParams,
|
|
9
|
+
StarcoinPublicKey,
|
|
9
10
|
} from '../../types/api/starcoinGetPublicKey';
|
|
10
11
|
|
|
11
12
|
export default class StarcoinGetPublicKey extends BaseMethod<HardwareStarcoinGetPublicKey[]> {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { StarcoinSignMessage as HardwareStarcoinSignMessage } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams } from '../helpers/paramsValidator';
|
|
6
5
|
import { formatAnyHex } from '../helpers/hexUtils';
|
|
7
6
|
|
|
7
|
+
import type { StarcoinSignMessage as HardwareStarcoinSignMessage } from '@ukeyfe/hardware-transport';
|
|
8
|
+
|
|
8
9
|
export default class StarcoinSignMessage extends BaseMethod<HardwareStarcoinSignMessage> {
|
|
9
10
|
init() {
|
|
10
11
|
this.checkDeviceId = true;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { StarcoinSignTx } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams } from '../helpers/paramsValidator';
|
|
6
5
|
import { formatAnyHex } from '../helpers/hexUtils';
|
|
7
6
|
|
|
7
|
+
import type { StarcoinSignTx } from '@ukeyfe/hardware-transport';
|
|
8
|
+
|
|
8
9
|
export default class StarcoinSignTransaction extends BaseMethod<StarcoinSignTx> {
|
|
9
10
|
init() {
|
|
10
11
|
this.checkDeviceId = true;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { StarcoinVerifyMessage as HardwareStarcoinVerifyMessage } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { BaseMethod } from '../BaseMethod';
|
|
4
3
|
import { validateParams } from '../helpers/paramsValidator';
|
|
5
4
|
import { formatAnyHex } from '../helpers/hexUtils';
|
|
6
5
|
|
|
6
|
+
import type { StarcoinVerifyMessage as HardwareStarcoinVerifyMessage } from '@ukeyfe/hardware-transport';
|
|
7
|
+
|
|
7
8
|
export default class EVMSignMessage extends BaseMethod<HardwareStarcoinVerifyMessage> {
|
|
8
9
|
init() {
|
|
9
10
|
this.checkDeviceId = true;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { StellarGetAddress as HardwareStellarGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
import type { StellarGetAddress as HardwareStellarGetAddress } from '@ukeyfe/hardware-transport';
|
|
7
|
+
import type { StellarAddress, StellarGetAddressParams } from '../../types';
|
|
7
8
|
|
|
8
9
|
export default class StellarGetAddress extends BaseMethod<HardwareStellarGetAddress[]> {
|
|
9
10
|
hasBundle = false;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
import {
|
|
2
|
-
StellarMemoType,
|
|
3
|
-
StellarSignedTx,
|
|
4
|
-
StellarSignTx as HardwareStellarSignTx,
|
|
5
|
-
} from '@ukeyfe/hardware-transport';
|
|
1
|
+
import { StellarMemoType } from '@ukeyfe/hardware-transport';
|
|
6
2
|
import { ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
3
|
+
|
|
7
4
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
8
5
|
import { validatePath } from '../helpers/pathUtils';
|
|
9
6
|
import { BaseMethod } from '../BaseMethod';
|
|
10
7
|
import { validateParams } from '../helpers/paramsValidator';
|
|
11
|
-
|
|
8
|
+
|
|
9
|
+
import type {
|
|
10
|
+
StellarSignTx as HardwareStellarSignTx,
|
|
11
|
+
StellarSignedTx,
|
|
12
|
+
} from '@ukeyfe/hardware-transport';
|
|
13
|
+
import type { StellarOperation, StellarSignTransactionParams } from '../../types';
|
|
12
14
|
|
|
13
15
|
export default class StellarSignTransaction extends BaseMethod<HardwareStellarSignTx> {
|
|
14
16
|
operations: any[] = [];
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { SuiGetAddress as HardwareSuiGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
|
-
|
|
3
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
4
2
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
5
3
|
import { BaseMethod } from '../BaseMethod';
|
|
6
4
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
7
|
-
import { SuiAddress, SuiGetAddressParams } from '../../types';
|
|
8
5
|
import { supportBatchPublicKey } from '../../utils/deviceFeaturesUtils';
|
|
9
6
|
import { publicKeyToAddress } from './normalize';
|
|
10
7
|
import { batchGetPublickeys } from '../helpers/batchGetPublickeys';
|
|
11
8
|
|
|
9
|
+
import type { SuiAddress, SuiGetAddressParams } from '../../types';
|
|
10
|
+
import type { SuiGetAddress as HardwareSuiGetAddress } from '@ukeyfe/hardware-transport';
|
|
11
|
+
|
|
12
12
|
export default class SuiGetAddress extends BaseMethod<HardwareSuiGetAddress[]> {
|
|
13
13
|
hasBundle = false;
|
|
14
14
|
|
|
@@ -2,9 +2,10 @@ import { UI_REQUEST } from '../../constants/ui-request';
|
|
|
2
2
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
3
3
|
import { BaseMethod } from '../BaseMethod';
|
|
4
4
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
5
|
-
import { SuiGetAddressParams, SuiPublicKey } from '../../types';
|
|
6
5
|
import { batchGetPublickeys } from '../helpers/batchGetPublickeys';
|
|
7
6
|
|
|
7
|
+
import type { SuiGetAddressParams, SuiPublicKey } from '../../types';
|
|
8
|
+
|
|
8
9
|
export default class SuiGetPublicKey extends BaseMethod<any> {
|
|
9
10
|
hasBundle = false;
|
|
10
11
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { SuiSignMessage as HardwareSuiSignMessage } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams } from '../helpers/paramsValidator';
|
|
6
5
|
import { stripHexPrefix } from '../helpers/hexUtils';
|
|
7
6
|
|
|
7
|
+
import type { SuiSignMessage as HardwareSuiSignMessage } from '@ukeyfe/hardware-transport';
|
|
8
|
+
|
|
8
9
|
export default class SuiSignMessage extends BaseMethod<HardwareSuiSignMessage> {
|
|
9
10
|
init() {
|
|
10
11
|
this.checkDeviceId = true;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { SuiSignTx as HardwareSuiSignTx, TypedCall, SuiSignedTx } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import semver from 'semver';
|
|
3
2
|
import { bytesToHex } from '@noble/hashes/utils';
|
|
3
|
+
|
|
4
4
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
5
5
|
import { validatePath } from '../helpers/pathUtils';
|
|
6
6
|
import { BaseMethod } from '../BaseMethod';
|
|
@@ -8,6 +8,12 @@ import { validateParams } from '../helpers/paramsValidator';
|
|
|
8
8
|
import { formatAnyHex } from '../helpers/hexUtils';
|
|
9
9
|
import { getDeviceFirmwareVersion, getDeviceType } from '../../utils';
|
|
10
10
|
import { DeviceModelToTypes } from '../../types';
|
|
11
|
+
|
|
12
|
+
import type {
|
|
13
|
+
SuiSignTx as HardwareSuiSignTx,
|
|
14
|
+
SuiSignedTx,
|
|
15
|
+
TypedCall,
|
|
16
|
+
} from '@ukeyfe/hardware-transport';
|
|
11
17
|
import type { TypedResponseMessage } from '../../device/DeviceCommands';
|
|
12
18
|
|
|
13
19
|
type SuiSignTx = Omit<HardwareSuiSignTx, 'data_initial_chunk' | 'data_length'> & HardwareSuiSignTx;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TonGetAddress as HardwareTonGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
|
-
|
|
3
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
4
2
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
5
3
|
import { BaseMethod } from '../BaseMethod';
|
|
6
4
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
7
|
-
|
|
5
|
+
|
|
6
|
+
import type { TonGetAddress as HardwareTonGetAddress } from '@ukeyfe/hardware-transport';
|
|
7
|
+
import type { TonAddress, TonGetAddressParams } from '../../types';
|
|
8
8
|
|
|
9
9
|
export default class TonGetAddress extends BaseMethod<HardwareTonGetAddress[]> {
|
|
10
10
|
hasBundle = false;
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TonSignMessage as HardwareTonSignMessage,
|
|
3
|
-
TonSignedMessage,
|
|
4
|
-
TonTxAck,
|
|
5
|
-
} from '@ukeyfe/hardware-transport';
|
|
6
1
|
import semver from 'semver';
|
|
7
2
|
import BigNumber from 'bignumber.js';
|
|
8
3
|
import { isEmpty } from 'lodash';
|
|
4
|
+
|
|
9
5
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
10
6
|
import { validatePath } from '../helpers/pathUtils';
|
|
11
7
|
import { BaseMethod } from '../BaseMethod';
|
|
12
8
|
import { validateParams } from '../helpers/paramsValidator';
|
|
13
|
-
import {
|
|
9
|
+
import { DeviceModelToTypes } from '../../types';
|
|
14
10
|
import { getDeviceFirmwareVersion, getDeviceType, getMethodVersionRange } from '../../utils';
|
|
15
11
|
import { formatAnyHex, stripHexStartZeroes } from '../helpers/hexUtils';
|
|
16
|
-
import type { TonSignedMessageResponse } from '../../types/api/tonSignMessage';
|
|
17
12
|
import { cutString } from '../helpers/stringUtils';
|
|
18
13
|
|
|
14
|
+
import type { DeviceFirmwareRange, TonSignMessageParams } from '../../types';
|
|
15
|
+
import type {
|
|
16
|
+
TonSignMessage as HardwareTonSignMessage,
|
|
17
|
+
TonSignedMessage,
|
|
18
|
+
TonTxAck,
|
|
19
|
+
} from '@ukeyfe/hardware-transport';
|
|
20
|
+
import type { TonSignedMessageResponse } from '../../types/api/tonSignMessage';
|
|
21
|
+
|
|
19
22
|
export default class TonSignMessage extends BaseMethod<HardwareTonSignMessage> {
|
|
20
23
|
initState: string | null = null;
|
|
21
24
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TonSignProof as HardwareTonSignProof } from '@ukeyfe/hardware-transport';
|
|
2
|
-
|
|
3
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
4
2
|
import { validatePath } from '../helpers/pathUtils';
|
|
5
3
|
import { BaseMethod } from '../BaseMethod';
|
|
6
4
|
import { validateParams } from '../helpers/paramsValidator';
|
|
7
|
-
|
|
5
|
+
|
|
6
|
+
import type { TonSignProof as HardwareTonSignProof } from '@ukeyfe/hardware-transport';
|
|
7
|
+
import type { TonSignProofParams } from '../../types';
|
|
8
8
|
|
|
9
9
|
export default class TonSignProof extends BaseMethod<HardwareTonSignProof> {
|
|
10
10
|
init() {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { TronGetAddress as HardwareTronGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
2
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
3
|
import { BaseMethod } from '../BaseMethod';
|
|
5
4
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
-
|
|
5
|
+
|
|
6
|
+
import type { TronGetAddress as HardwareTronGetAddress } from '@ukeyfe/hardware-transport';
|
|
7
|
+
import type { TronAddress, TronGetAddressParams } from '../../types';
|
|
7
8
|
|
|
8
9
|
export default class TronGetAddress extends BaseMethod<HardwareTronGetAddress[]> {
|
|
9
10
|
hasBundle = false;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
} from '@ukeyfe/hardware-transport';
|
|
5
|
-
import { ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
1
|
+
import { TronMessageType } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { createDeviceNotSupportMethodError } from '@ukeyfe/hardware-shared';
|
|
3
|
+
|
|
6
4
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
7
5
|
import { validatePath } from '../helpers/pathUtils';
|
|
8
6
|
import { BaseMethod } from '../BaseMethod';
|
|
9
7
|
import { validateParams } from '../helpers/paramsValidator';
|
|
10
8
|
import { stripHexPrefix } from '../helpers/hexUtils';
|
|
9
|
+
import { getFirmwareType } from '../../utils';
|
|
10
|
+
|
|
11
|
+
import type { TronSignMessage as HardwareTronSignMessage } from '@ukeyfe/hardware-transport';
|
|
11
12
|
|
|
12
13
|
export default class TronSignMessage extends BaseMethod<HardwareTronSignMessage> {
|
|
13
14
|
init() {
|
|
@@ -25,9 +26,9 @@ export default class TronSignMessage extends BaseMethod<HardwareTronSignMessage>
|
|
|
25
26
|
const addressN = validatePath(path, 3);
|
|
26
27
|
|
|
27
28
|
if (this.payload.messageType === 'V1' || this.payload.messageType == null) {
|
|
28
|
-
throw
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
throw createDeviceNotSupportMethodError(
|
|
30
|
+
'TronSignMessage',
|
|
31
|
+
getFirmwareType(this.device.features)
|
|
31
32
|
);
|
|
32
33
|
}
|
|
33
34
|
|
|
@@ -54,6 +55,9 @@ export default class TronSignMessage extends BaseMethod<HardwareTronSignMessage>
|
|
|
54
55
|
pro: {
|
|
55
56
|
min: '4.16.0',
|
|
56
57
|
},
|
|
58
|
+
touch: {
|
|
59
|
+
min: '4.12.0',
|
|
60
|
+
},
|
|
57
61
|
classic1s: {
|
|
58
62
|
min: '3.13.0',
|
|
59
63
|
},
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { TronSignTx } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { isEmpty } from 'lodash';
|
|
2
|
+
|
|
3
3
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
4
4
|
import { validatePath } from '../helpers/pathUtils';
|
|
5
5
|
import { BaseMethod } from '../BaseMethod';
|
|
6
6
|
import { validateParams } from '../helpers/paramsValidator';
|
|
7
|
-
import { TronTransaction } from '../../types/api/tronSignTransaction';
|
|
8
7
|
import { formatAnyHex } from '../helpers/hexUtils';
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
import type { TronTransaction } from '../../types/api/tronSignTransaction';
|
|
10
|
+
import type { TronSignTx } from '@ukeyfe/hardware-transport';
|
|
11
|
+
import type { DeviceFirmwareRange } from '../../types';
|
|
10
12
|
|
|
11
13
|
export default class TronSignTransaction extends BaseMethod<TronSignTx> {
|
|
12
14
|
parseTx(tx: TronTransaction, address_n: number[]): TronSignTx {
|
|
@@ -156,6 +158,9 @@ export default class TronSignTransaction extends BaseMethod<TronSignTx> {
|
|
|
156
158
|
pro: {
|
|
157
159
|
min: '4.13.0',
|
|
158
160
|
},
|
|
161
|
+
touch: {
|
|
162
|
+
min: '4.12.0',
|
|
163
|
+
},
|
|
159
164
|
model_classic1s: {
|
|
160
165
|
min: '3.12.0',
|
|
161
166
|
},
|
|
@@ -176,6 +181,12 @@ export default class TronSignTransaction extends BaseMethod<TronSignTx> {
|
|
|
176
181
|
pro: {
|
|
177
182
|
min: '4.15.0',
|
|
178
183
|
},
|
|
184
|
+
touch: {
|
|
185
|
+
min: '4.12.0',
|
|
186
|
+
},
|
|
187
|
+
model_classic1s: {
|
|
188
|
+
min: '3.13.0',
|
|
189
|
+
},
|
|
179
190
|
};
|
|
180
191
|
}
|
|
181
192
|
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { GetNextU2FCounter as HardwareGetNextU2FCounter } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { BaseMethod } from '../BaseMethod';
|
|
3
2
|
|
|
3
|
+
import type { GetNextU2FCounter as HardwareGetNextU2FCounter } from '@ukeyfe/hardware-transport';
|
|
4
|
+
|
|
4
5
|
export default class GetNextU2FCounter extends BaseMethod<HardwareGetNextU2FCounter> {
|
|
5
6
|
init() {
|
|
6
7
|
this.useDevicePassphraseState = false;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { SetU2FCounter as HardwareSetU2FCounter } from '@ukeyfe/hardware-transport';
|
|
2
1
|
import { BaseMethod } from '../BaseMethod';
|
|
3
2
|
|
|
3
|
+
import type { SetU2FCounter as HardwareSetU2FCounter } from '@ukeyfe/hardware-transport';
|
|
4
|
+
|
|
4
5
|
export default class SetU2FCounter extends BaseMethod<HardwareSetU2FCounter> {
|
|
5
6
|
init() {
|
|
6
7
|
this.useDevicePassphraseState = false;
|
package/src/api/utils.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
2
|
+
|
|
2
3
|
import * as ApiMethods from './index';
|
|
3
|
-
|
|
4
|
+
|
|
5
|
+
import type { IFrameCallMessage } from '../events';
|
|
4
6
|
|
|
5
7
|
export function findMethod(message: IFrameCallMessage & { id?: number }) {
|
|
6
8
|
const { method } = message.payload;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { deriveAddress } from 'ripple-keypairs';
|
|
2
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
-
import { XrpAddress, XrpGetAddressParams } from '../../types/api/xrpGetAddress';
|
|
4
|
-
import { supportBatchPublicKey } from '../../utils/deviceFeaturesUtils';
|
|
5
2
|
import { BaseMethod } from '../BaseMethod';
|
|
6
3
|
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
7
4
|
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
8
|
-
|
|
5
|
+
|
|
6
|
+
import type { XrpAddress, XrpGetAddressParams } from '../../types/api/xrpGetAddress';
|
|
9
7
|
|
|
10
8
|
export default class XrpGetAddress extends BaseMethod<
|
|
11
9
|
{
|
|
@@ -57,22 +55,6 @@ export default class XrpGetAddress extends BaseMethod<
|
|
|
57
55
|
}
|
|
58
56
|
|
|
59
57
|
async run() {
|
|
60
|
-
if (this.hasBundle && supportBatchPublicKey(this.device?.features) && !this.shouldConfirm) {
|
|
61
|
-
const res = await batchGetPublickeys(this.device, this.params, 'secp256k1', 144);
|
|
62
|
-
const result = res.public_keys.map((publicKey: string, index: number) => ({
|
|
63
|
-
path: serializedPath((this.params as unknown as any[])[index].address_n),
|
|
64
|
-
address: deriveAddress(publicKey),
|
|
65
|
-
publicKey,
|
|
66
|
-
pub: publicKey,
|
|
67
|
-
}));
|
|
68
|
-
|
|
69
|
-
validateResult(result, ['address', 'publicKey'], {
|
|
70
|
-
expectedLength: this.params.length,
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
return Promise.resolve(result);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
58
|
const responses: XrpAddress[] = [];
|
|
77
59
|
for (let i = 0; i < this.params.length; i++) {
|
|
78
60
|
const param = this.params[i];
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { UI_REQUEST } from '../../constants/ui-request';
|
|
2
|
-
import { XrpSignTransactionParams } from '../../types/api/xrpSignTransaction';
|
|
3
2
|
import { BaseMethod } from '../BaseMethod';
|
|
4
3
|
import { validateParams } from '../helpers/paramsValidator';
|
|
5
4
|
import { validatePath } from '../helpers/pathUtils';
|
|
6
5
|
|
|
6
|
+
import type { XrpSignTransactionParams } from '../../types/api/xrpSignTransaction';
|
|
7
|
+
|
|
7
8
|
export default class XrpGetAddress extends BaseMethod<XrpSignTransactionParams> {
|
|
8
9
|
hasBundle = false;
|
|
9
10
|
|