@ukeyfe/hardware-core 1.1.13
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/.eslintrc +6 -0
- package/README.md +32 -0
- package/__tests__/benfen.test.ts +68 -0
- package/__tests__/checkBootloaderReleast.test.ts +114 -0
- package/__tests__/evmSignTransaction.test.ts +418 -0
- package/dist/api/BaseMethod.d.ts +46 -0
- package/dist/api/BaseMethod.d.ts.map +1 -0
- package/dist/api/CheckAllFirmwareRelease.d.ts +7 -0
- package/dist/api/CheckAllFirmwareRelease.d.ts.map +1 -0
- package/dist/api/CheckBLEFirmwareRelease.d.ts +14 -0
- package/dist/api/CheckBLEFirmwareRelease.d.ts.map +1 -0
- package/dist/api/CheckBootloaderRelease.d.ts +15 -0
- package/dist/api/CheckBootloaderRelease.d.ts.map +1 -0
- package/dist/api/CheckBridgeRelease.d.ts +14 -0
- package/dist/api/CheckBridgeRelease.d.ts.map +1 -0
- package/dist/api/CheckBridgeStatus.d.ts +6 -0
- package/dist/api/CheckBridgeStatus.d.ts.map +1 -0
- package/dist/api/CheckFirmwareRelease.d.ts +14 -0
- package/dist/api/CheckFirmwareRelease.d.ts.map +1 -0
- package/dist/api/CipherKeyValue.d.ts +9 -0
- package/dist/api/CipherKeyValue.d.ts.map +1 -0
- package/dist/api/EmmcFileWrite.d.ts +13 -0
- package/dist/api/EmmcFileWrite.d.ts.map +1 -0
- package/dist/api/FirmwareUpdate.d.ts +16 -0
- package/dist/api/FirmwareUpdate.d.ts.map +1 -0
- package/dist/api/FirmwareUpdateV2.d.ts +24 -0
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -0
- package/dist/api/FirmwareUpdateV3.d.ts +20 -0
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -0
- package/dist/api/GetFeatures.d.ts +6 -0
- package/dist/api/GetFeatures.d.ts.map +1 -0
- package/dist/api/GetLogs.d.ts +12 -0
- package/dist/api/GetLogs.d.ts.map +1 -0
- package/dist/api/GetPassphraseState.d.ts +6 -0
- package/dist/api/GetPassphraseState.d.ts.map +1 -0
- package/dist/api/GetUkeyFeatures.d.ts +6 -0
- package/dist/api/GetUkeyFeatures.d.ts.map +1 -0
- package/dist/api/PromptWebDeviceAccess.d.ts +8 -0
- package/dist/api/PromptWebDeviceAccess.d.ts.map +1 -0
- package/dist/api/SearchDevices.d.ts +17 -0
- package/dist/api/SearchDevices.d.ts.map +1 -0
- package/dist/api/alephium/AlephiumGetAddress.d.ts +14 -0
- package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -0
- package/dist/api/alephium/AlephiumSignMessage.d.ts +12 -0
- package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -0
- package/dist/api/alephium/AlephiumSignTransaction.d.ts +16 -0
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -0
- package/dist/api/algo/AlgoGetAddress.d.ts +14 -0
- package/dist/api/algo/AlgoGetAddress.d.ts.map +1 -0
- package/dist/api/algo/AlgoSignTransaction.d.ts +16 -0
- package/dist/api/algo/AlgoSignTransaction.d.ts.map +1 -0
- package/dist/api/allnetwork/AllNetworkGetAddress.d.ts +6 -0
- package/dist/api/allnetwork/AllNetworkGetAddress.d.ts.map +1 -0
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts +47 -0
- package/dist/api/allnetwork/AllNetworkGetAddressBase.d.ts.map +1 -0
- package/dist/api/allnetwork/AllNetworkGetAddressByLoop.d.ts +8 -0
- package/dist/api/allnetwork/AllNetworkGetAddressByLoop.d.ts.map +1 -0
- package/dist/api/aptos/AptosGetAddress.d.ts +16 -0
- package/dist/api/aptos/AptosGetAddress.d.ts.map +1 -0
- package/dist/api/aptos/AptosGetPublicKey.d.ts +13 -0
- package/dist/api/aptos/AptosGetPublicKey.d.ts.map +1 -0
- package/dist/api/aptos/AptosSignInMessage.d.ts +13 -0
- package/dist/api/aptos/AptosSignInMessage.d.ts.map +1 -0
- package/dist/api/aptos/AptosSignMessage.d.ts +13 -0
- package/dist/api/aptos/AptosSignMessage.d.ts.map +1 -0
- package/dist/api/aptos/AptosSignTransaction.d.ts +24 -0
- package/dist/api/aptos/AptosSignTransaction.d.ts.map +1 -0
- package/dist/api/benfen/BenfenGetAddress.d.ts +19 -0
- package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -0
- package/dist/api/benfen/BenfenGetPublicKey.d.ts +17 -0
- package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -0
- package/dist/api/benfen/BenfenSignMessage.d.ts +15 -0
- package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -0
- package/dist/api/benfen/BenfenSignTransaction.d.ts +19 -0
- package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -0
- package/dist/api/benfen/normalize.d.ts +9 -0
- package/dist/api/benfen/normalize.d.ts.map +1 -0
- package/dist/api/btc/BTCGetAddress.d.ts +20 -0
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -0
- package/dist/api/btc/BTCGetPublicKey.d.ts +21 -0
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -0
- package/dist/api/btc/BTCSignMessage.d.ts +22 -0
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -0
- package/dist/api/btc/BTCSignPsbt.d.ts +15 -0
- package/dist/api/btc/BTCSignPsbt.d.ts.map +1 -0
- package/dist/api/btc/BTCSignTransaction.d.ts +28 -0
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -0
- package/dist/api/btc/BTCVerifyMessage.d.ts +18 -0
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -0
- package/dist/api/btc/helpers/btcParamsUtils.d.ts +11 -0
- package/dist/api/btc/helpers/btcParamsUtils.d.ts.map +1 -0
- package/dist/api/btc/helpers/signtx.d.ts +5 -0
- package/dist/api/btc/helpers/signtx.d.ts.map +1 -0
- package/dist/api/btc/helpers/signtxLegacy.d.ts +5 -0
- package/dist/api/btc/helpers/signtxLegacy.d.ts.map +1 -0
- package/dist/api/btc/helpers/versionLimit.d.ts +12 -0
- package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -0
- package/dist/api/btc/helpers/xpubUtils.d.ts +4 -0
- package/dist/api/btc/helpers/xpubUtils.d.ts.map +1 -0
- package/dist/api/cardano/CardanoGetAddress.d.ts +17 -0
- package/dist/api/cardano/CardanoGetAddress.d.ts.map +1 -0
- package/dist/api/cardano/CardanoGetPublicKey.d.ts +16 -0
- package/dist/api/cardano/CardanoGetPublicKey.d.ts.map +1 -0
- package/dist/api/cardano/CardanoSignMessage.d.ts +19 -0
- package/dist/api/cardano/CardanoSignMessage.d.ts.map +1 -0
- package/dist/api/cardano/CardanoSignTransaction.d.ts +21 -0
- package/dist/api/cardano/CardanoSignTransaction.d.ts.map +1 -0
- package/dist/api/cardano/helper/addressParameters.d.ts +7 -0
- package/dist/api/cardano/helper/addressParameters.d.ts.map +1 -0
- package/dist/api/cardano/helper/auxiliaryData.d.ts +5 -0
- package/dist/api/cardano/helper/auxiliaryData.d.ts.map +1 -0
- package/dist/api/cardano/helper/cardanoInputs.d.ts +14 -0
- package/dist/api/cardano/helper/cardanoInputs.d.ts.map +1 -0
- package/dist/api/cardano/helper/cardanoOutputs.d.ts +11 -0
- package/dist/api/cardano/helper/cardanoOutputs.d.ts.map +1 -0
- package/dist/api/cardano/helper/certificate.d.ts +9 -0
- package/dist/api/cardano/helper/certificate.d.ts.map +1 -0
- package/dist/api/cardano/helper/token.d.ts +3 -0
- package/dist/api/cardano/helper/token.d.ts.map +1 -0
- package/dist/api/cardano/helper/utils.d.ts +3 -0
- package/dist/api/cardano/helper/utils.d.ts.map +1 -0
- package/dist/api/cardano/helper/witnesses.d.ts +5 -0
- package/dist/api/cardano/helper/witnesses.d.ts.map +1 -0
- package/dist/api/conflux/ConfluxGetAddress.d.ts +14 -0
- package/dist/api/conflux/ConfluxGetAddress.d.ts.map +1 -0
- package/dist/api/conflux/ConfluxSignMessage.d.ts +12 -0
- package/dist/api/conflux/ConfluxSignMessage.d.ts.map +1 -0
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts +12 -0
- package/dist/api/conflux/ConfluxSignMessageCIP23.d.ts.map +1 -0
- package/dist/api/conflux/ConfluxSignTransaction.d.ts +17 -0
- package/dist/api/conflux/ConfluxSignTransaction.d.ts.map +1 -0
- package/dist/api/cosmos/CosmosGetAddress.d.ts +17 -0
- package/dist/api/cosmos/CosmosGetAddress.d.ts.map +1 -0
- package/dist/api/cosmos/CosmosGetPublicKey.d.ts +16 -0
- package/dist/api/cosmos/CosmosGetPublicKey.d.ts.map +1 -0
- package/dist/api/cosmos/CosmosSignTransaction.d.ts +19 -0
- package/dist/api/cosmos/CosmosSignTransaction.d.ts.map +1 -0
- package/dist/api/device/DeviceBackup.d.ts +7 -0
- package/dist/api/device/DeviceBackup.d.ts.map +1 -0
- package/dist/api/device/DeviceCancel.d.ts +7 -0
- package/dist/api/device/DeviceCancel.d.ts.map +1 -0
- package/dist/api/device/DeviceChangePin.d.ts +7 -0
- package/dist/api/device/DeviceChangePin.d.ts.map +1 -0
- package/dist/api/device/DeviceFlags.d.ts +7 -0
- package/dist/api/device/DeviceFlags.d.ts.map +1 -0
- package/dist/api/device/DeviceFullyUploadResource.d.ts +11 -0
- package/dist/api/device/DeviceFullyUploadResource.d.ts.map +1 -0
- package/dist/api/device/DeviceLock.d.ts +7 -0
- package/dist/api/device/DeviceLock.d.ts.map +1 -0
- package/dist/api/device/DeviceRebootToBoardloader.d.ts +15 -0
- package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -0
- package/dist/api/device/DeviceRebootToBootloader.d.ts +15 -0
- package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -0
- package/dist/api/device/DeviceRecovery.d.ts +7 -0
- package/dist/api/device/DeviceRecovery.d.ts.map +1 -0
- package/dist/api/device/DeviceReset.d.ts +7 -0
- package/dist/api/device/DeviceReset.d.ts.map +1 -0
- package/dist/api/device/DeviceSettings.d.ts +14 -0
- package/dist/api/device/DeviceSettings.d.ts.map +1 -0
- package/dist/api/device/DeviceSupportFeatures.d.ts +10 -0
- package/dist/api/device/DeviceSupportFeatures.d.ts.map +1 -0
- package/dist/api/device/DeviceUnlock.d.ts +7 -0
- package/dist/api/device/DeviceUnlock.d.ts.map +1 -0
- package/dist/api/device/DeviceUpdateBootloader.d.ts +12 -0
- package/dist/api/device/DeviceUpdateBootloader.d.ts.map +1 -0
- package/dist/api/device/DeviceUpdateReboot.d.ts +7 -0
- package/dist/api/device/DeviceUpdateReboot.d.ts.map +1 -0
- package/dist/api/device/DeviceUploadResource.d.ts +19 -0
- package/dist/api/device/DeviceUploadResource.d.ts.map +1 -0
- package/dist/api/device/DeviceVerify.d.ts +8 -0
- package/dist/api/device/DeviceVerify.d.ts.map +1 -0
- package/dist/api/device/DeviceWipe.d.ts +7 -0
- package/dist/api/device/DeviceWipe.d.ts.map +1 -0
- package/dist/api/dynex/DnxGetAddress.d.ts +14 -0
- package/dist/api/dynex/DnxGetAddress.d.ts.map +1 -0
- package/dist/api/dynex/DnxSignTransaction.d.ts +16 -0
- package/dist/api/dynex/DnxSignTransaction.d.ts.map +1 -0
- package/dist/api/evm/EVMGetAddress.d.ts +10 -0
- package/dist/api/evm/EVMGetAddress.d.ts.map +1 -0
- package/dist/api/evm/EVMGetPublicKey.d.ts +16 -0
- package/dist/api/evm/EVMGetPublicKey.d.ts.map +1 -0
- package/dist/api/evm/EVMSignMessage.d.ts +7 -0
- package/dist/api/evm/EVMSignMessage.d.ts.map +1 -0
- package/dist/api/evm/EVMSignMessageEIP712.d.ts +15 -0
- package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -0
- package/dist/api/evm/EVMSignTransaction.d.ts +28 -0
- package/dist/api/evm/EVMSignTransaction.d.ts.map +1 -0
- package/dist/api/evm/EVMSignTypedData.d.ts +44 -0
- package/dist/api/evm/EVMSignTypedData.d.ts.map +1 -0
- package/dist/api/evm/EVMVerifyMessage.d.ts +7 -0
- package/dist/api/evm/EVMVerifyMessage.d.ts.map +1 -0
- package/dist/api/evm/latest/getAddress.d.ts +6 -0
- package/dist/api/evm/latest/getAddress.d.ts.map +1 -0
- package/dist/api/evm/latest/getPublicKey.d.ts +6 -0
- package/dist/api/evm/latest/getPublicKey.d.ts.map +1 -0
- package/dist/api/evm/latest/signMessage.d.ts +6 -0
- package/dist/api/evm/latest/signMessage.d.ts.map +1 -0
- package/dist/api/evm/latest/signTransaction.d.ts +35 -0
- package/dist/api/evm/latest/signTransaction.d.ts.map +1 -0
- package/dist/api/evm/latest/signTypedData.d.ts +10 -0
- package/dist/api/evm/latest/signTypedData.d.ts.map +1 -0
- package/dist/api/evm/latest/signTypedHash.d.ts +11 -0
- package/dist/api/evm/latest/signTypedHash.d.ts.map +1 -0
- package/dist/api/evm/latest/verifyMessage.d.ts +6 -0
- package/dist/api/evm/latest/verifyMessage.d.ts.map +1 -0
- package/dist/api/evm/legacyV1/getAddress.d.ts +6 -0
- package/dist/api/evm/legacyV1/getAddress.d.ts.map +1 -0
- package/dist/api/evm/legacyV1/getPublicKey.d.ts +6 -0
- package/dist/api/evm/legacyV1/getPublicKey.d.ts.map +1 -0
- package/dist/api/evm/legacyV1/signMessage.d.ts +6 -0
- package/dist/api/evm/legacyV1/signMessage.d.ts.map +1 -0
- package/dist/api/evm/legacyV1/signTransaction.d.ts +10 -0
- package/dist/api/evm/legacyV1/signTransaction.d.ts.map +1 -0
- package/dist/api/evm/legacyV1/signTypedData.d.ts +10 -0
- package/dist/api/evm/legacyV1/signTypedData.d.ts.map +1 -0
- package/dist/api/evm/legacyV1/signTypedHash.d.ts +11 -0
- package/dist/api/evm/legacyV1/signTypedHash.d.ts.map +1 -0
- package/dist/api/evm/legacyV1/verifyMessage.d.ts +6 -0
- package/dist/api/evm/legacyV1/verifyMessage.d.ts.map +1 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts +17 -0
- package/dist/api/filecoin/FilecoinGetAddress.d.ts.map +1 -0
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts +19 -0
- package/dist/api/filecoin/FilecoinSignTransaction.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +31 -0
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -0
- package/dist/api/firmware/bootloaderHelper.d.ts +10 -0
- package/dist/api/firmware/bootloaderHelper.d.ts.map +1 -0
- package/dist/api/firmware/getBinary.d.ts +38 -0
- package/dist/api/firmware/getBinary.d.ts.map +1 -0
- package/dist/api/firmware/releaseHelper.d.ts +30 -0
- package/dist/api/firmware/releaseHelper.d.ts.map +1 -0
- package/dist/api/firmware/updateBootloader.d.ts +5 -0
- package/dist/api/firmware/updateBootloader.d.ts.map +1 -0
- package/dist/api/firmware/uploadFirmware.d.ts +13 -0
- package/dist/api/firmware/uploadFirmware.d.ts.map +1 -0
- package/dist/api/helpers/batchGetPublickeys.d.ts +7 -0
- package/dist/api/helpers/batchGetPublickeys.d.ts.map +1 -0
- package/dist/api/helpers/bigNumberUtils.d.ts +4 -0
- package/dist/api/helpers/bigNumberUtils.d.ts.map +1 -0
- package/dist/api/helpers/hexUtils.d.ts +10 -0
- package/dist/api/helpers/hexUtils.d.ts.map +1 -0
- package/dist/api/helpers/paramsValidator.d.ts +12 -0
- package/dist/api/helpers/paramsValidator.d.ts.map +1 -0
- package/dist/api/helpers/pathUtils.d.ts +16 -0
- package/dist/api/helpers/pathUtils.d.ts.map +1 -0
- package/dist/api/helpers/stringUtils.d.ts +3 -0
- package/dist/api/helpers/stringUtils.d.ts.map +1 -0
- package/dist/api/helpers/typeNameUtils.d.ts +9 -0
- package/dist/api/helpers/typeNameUtils.d.ts.map +1 -0
- package/dist/api/index.d.ts +129 -0
- package/dist/api/index.d.ts.map +1 -0
- package/dist/api/kaspa/KaspaGetAddress.d.ts +25 -0
- package/dist/api/kaspa/KaspaGetAddress.d.ts.map +1 -0
- package/dist/api/kaspa/KaspaSignTransaction.d.ts +27 -0
- package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -0
- package/dist/api/kaspa/helpers/BufferWriter.d.ts +28 -0
- package/dist/api/kaspa/helpers/BufferWriter.d.ts.map +1 -0
- package/dist/api/kaspa/helpers/HashWriter.d.ts +22 -0
- package/dist/api/kaspa/helpers/HashWriter.d.ts.map +1 -0
- package/dist/api/kaspa/helpers/SignatureType.d.ts +8 -0
- package/dist/api/kaspa/helpers/SignatureType.d.ts.map +1 -0
- package/dist/api/kaspa/helpers/TransferSerialize.d.ts +9 -0
- package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -0
- package/dist/api/lightning/LnurlAuth.d.ts +21 -0
- package/dist/api/lightning/LnurlAuth.d.ts.map +1 -0
- package/dist/api/near/NearGetAddress.d.ts +14 -0
- package/dist/api/near/NearGetAddress.d.ts.map +1 -0
- package/dist/api/near/NearSignTransaction.d.ts +12 -0
- package/dist/api/near/NearSignTransaction.d.ts.map +1 -0
- package/dist/api/nem/NEMGetAddress.d.ts +9 -0
- package/dist/api/nem/NEMGetAddress.d.ts.map +1 -0
- package/dist/api/nem/NEMSignTransaction.d.ts +20 -0
- package/dist/api/nem/NEMSignTransaction.d.ts.map +1 -0
- package/dist/api/neo/NeoGetAddress.d.ts +17 -0
- package/dist/api/neo/NeoGetAddress.d.ts.map +1 -0
- package/dist/api/neo/NeoSignTransaction.d.ts +18 -0
- package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -0
- package/dist/api/nervos/NervosGetAddress.d.ts +17 -0
- package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -0
- package/dist/api/nervos/NervosSignTransaction.d.ts +25 -0
- package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -0
- package/dist/api/nexa/NexaGetAddress.d.ts +24 -0
- package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -0
- package/dist/api/nexa/NexaSignTransaction.d.ts +19 -0
- package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -0
- package/dist/api/nostr/NostrDecryptMessage.d.ts +21 -0
- package/dist/api/nostr/NostrDecryptMessage.d.ts.map +1 -0
- package/dist/api/nostr/NostrEncryptMessage.d.ts +21 -0
- package/dist/api/nostr/NostrEncryptMessage.d.ts.map +1 -0
- package/dist/api/nostr/NostrGetPublicKey.d.ts +17 -0
- package/dist/api/nostr/NostrGetPublicKey.d.ts.map +1 -0
- package/dist/api/nostr/NostrSignEvent.d.ts +20 -0
- package/dist/api/nostr/NostrSignEvent.d.ts.map +1 -0
- package/dist/api/nostr/NostrSignSchnorr.d.ts +20 -0
- package/dist/api/nostr/NostrSignSchnorr.d.ts.map +1 -0
- package/dist/api/nostr/helper/index.d.ts +4 -0
- package/dist/api/nostr/helper/index.d.ts.map +1 -0
- package/dist/api/polkadot/PolkadotGetAddress.d.ts +17 -0
- package/dist/api/polkadot/PolkadotGetAddress.d.ts.map +1 -0
- package/dist/api/polkadot/PolkadotSignTransaction.d.ts +12 -0
- package/dist/api/polkadot/PolkadotSignTransaction.d.ts.map +1 -0
- package/dist/api/polkadot/networks.d.ts +20 -0
- package/dist/api/polkadot/networks.d.ts.map +1 -0
- package/dist/api/scdo/ScdoGetAddress.d.ts +14 -0
- package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -0
- package/dist/api/scdo/ScdoSignMessage.d.ts +12 -0
- package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -0
- package/dist/api/scdo/ScdoSignTransaction.d.ts +16 -0
- package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -0
- package/dist/api/solana/SolGetAddress.d.ts +9 -0
- package/dist/api/solana/SolGetAddress.d.ts.map +1 -0
- package/dist/api/solana/SolSignMessage.d.ts +24 -0
- package/dist/api/solana/SolSignMessage.d.ts.map +1 -0
- package/dist/api/solana/SolSignOffchainMessage.d.ts +18 -0
- package/dist/api/solana/SolSignOffchainMessage.d.ts.map +1 -0
- package/dist/api/solana/SolSignTransaction.d.ts +30 -0
- package/dist/api/solana/SolSignTransaction.d.ts.map +1 -0
- package/dist/api/starcoin/StarcoinGetAddress.d.ts +9 -0
- package/dist/api/starcoin/StarcoinGetAddress.d.ts.map +1 -0
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts +9 -0
- package/dist/api/starcoin/StarcoinGetPublicKey.d.ts.map +1 -0
- package/dist/api/starcoin/StarcoinSignMessage.d.ts +7 -0
- package/dist/api/starcoin/StarcoinSignMessage.d.ts.map +1 -0
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts +7 -0
- package/dist/api/starcoin/StarcoinSignTransaction.d.ts.map +1 -0
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts +7 -0
- package/dist/api/starcoin/StarcoinVerifyMessage.d.ts.map +1 -0
- package/dist/api/stellar/StellarGetAddress.d.ts +9 -0
- package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -0
- package/dist/api/stellar/StellarSignTransaction.d.ts +335 -0
- package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -0
- package/dist/api/sui/SuiGetAddress.d.ts +18 -0
- package/dist/api/sui/SuiGetAddress.d.ts.map +1 -0
- package/dist/api/sui/SuiGetPublicKey.d.ts +16 -0
- package/dist/api/sui/SuiGetPublicKey.d.ts.map +1 -0
- package/dist/api/sui/SuiSignMessage.d.ts +15 -0
- package/dist/api/sui/SuiSignMessage.d.ts.map +1 -0
- package/dist/api/sui/SuiSignTransaction.d.ts +22 -0
- package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -0
- package/dist/api/sui/normalize.d.ts +9 -0
- package/dist/api/sui/normalize.d.ts.map +1 -0
- package/dist/api/test/TestInitializeDeviceDuration.d.ts +6 -0
- package/dist/api/test/TestInitializeDeviceDuration.d.ts.map +1 -0
- package/dist/api/ton/TonGetAddress.d.ts +18 -0
- package/dist/api/ton/TonGetAddress.d.ts.map +1 -0
- package/dist/api/ton/TonSignMessage.d.ts +25 -0
- package/dist/api/ton/TonSignMessage.d.ts.map +1 -0
- package/dist/api/ton/TonSignProof.d.ts +15 -0
- package/dist/api/ton/TonSignProof.d.ts.map +1 -0
- package/dist/api/tron/TronGetAddress.d.ts +14 -0
- package/dist/api/tron/TronGetAddress.d.ts.map +1 -0
- package/dist/api/tron/TronSignMessage.d.ts +20 -0
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -0
- package/dist/api/tron/TronSignTransaction.d.ts +19 -0
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -0
- package/dist/api/u2f/GetNextU2FCounter.d.ts +7 -0
- package/dist/api/u2f/GetNextU2FCounter.d.ts.map +1 -0
- package/dist/api/u2f/SetU2FCounter.d.ts +7 -0
- package/dist/api/u2f/SetU2FCounter.d.ts.map +1 -0
- package/dist/api/utils.d.ts +5 -0
- package/dist/api/utils.d.ts.map +1 -0
- package/dist/api/xrp/XrpGetAddress.d.ts +17 -0
- package/dist/api/xrp/XrpGetAddress.d.ts.map +1 -0
- package/dist/api/xrp/XrpSignTransaction.d.ts +16 -0
- package/dist/api/xrp/XrpSignTransaction.d.ts.map +1 -0
- package/dist/constants/errors.d.ts +2 -0
- package/dist/constants/errors.d.ts.map +1 -0
- package/dist/constants/index.d.ts +3 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/ui-request.d.ts +3 -0
- package/dist/constants/ui-request.d.ts.map +1 -0
- package/dist/core/RequestQueue.d.ts +27 -0
- package/dist/core/RequestQueue.d.ts.map +1 -0
- package/dist/core/index.d.ts +28 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/data/config.d.ts +7 -0
- package/dist/data/config.d.ts.map +1 -0
- package/dist/data-manager/CoinManager.d.ts +13 -0
- package/dist/data-manager/CoinManager.d.ts.map +1 -0
- package/dist/data-manager/DataManager.d.ts +43 -0
- package/dist/data-manager/DataManager.d.ts.map +1 -0
- package/dist/data-manager/MessagesConfig.d.ts +11 -0
- package/dist/data-manager/MessagesConfig.d.ts.map +1 -0
- package/dist/data-manager/TransportManager.d.ts +20 -0
- package/dist/data-manager/TransportManager.d.ts.map +1 -0
- package/dist/data-manager/connectSettings.d.ts +11 -0
- package/dist/data-manager/connectSettings.d.ts.map +1 -0
- package/dist/data-manager/index.d.ts +4 -0
- package/dist/data-manager/index.d.ts.map +1 -0
- package/dist/device/Device.d.ts +100 -0
- package/dist/device/Device.d.ts.map +1 -0
- package/dist/device/DeviceCommands.d.ts +116 -0
- package/dist/device/DeviceCommands.d.ts.map +1 -0
- package/dist/device/DeviceConnector.d.ts +20 -0
- package/dist/device/DeviceConnector.d.ts.map +1 -0
- package/dist/device/DeviceList.d.ts +12 -0
- package/dist/device/DeviceList.d.ts.map +1 -0
- package/dist/device/DevicePool.d.ts +43 -0
- package/dist/device/DevicePool.d.ts.map +1 -0
- package/dist/events/call.d.ts +64 -0
- package/dist/events/call.d.ts.map +1 -0
- package/dist/events/core.d.ts +19 -0
- package/dist/events/core.d.ts.map +1 -0
- package/dist/events/device.d.ts +68 -0
- package/dist/events/device.d.ts.map +1 -0
- package/dist/events/firmware.d.ts +28 -0
- package/dist/events/firmware.d.ts.map +1 -0
- package/dist/events/iframe.d.ts +42 -0
- package/dist/events/iframe.d.ts.map +1 -0
- package/dist/events/index.d.ts +11 -0
- package/dist/events/index.d.ts.map +1 -0
- package/dist/events/log.d.ts +15 -0
- package/dist/events/log.d.ts.map +1 -0
- package/dist/events/logBlockEvent.d.ts +2 -0
- package/dist/events/logBlockEvent.d.ts.map +1 -0
- package/dist/events/ui-promise.d.ts +12 -0
- package/dist/events/ui-promise.d.ts.map +1 -0
- package/dist/events/ui-request.d.ts +152 -0
- package/dist/events/ui-request.d.ts.map +1 -0
- package/dist/events/ui-response.d.ts +32 -0
- package/dist/events/ui-response.d.ts.map +1 -0
- package/dist/events/utils.d.ts +15 -0
- package/dist/events/utils.d.ts.map +1 -0
- package/dist/index.d.ts +3269 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39955 -0
- package/dist/inject.d.ts +20 -0
- package/dist/inject.d.ts.map +1 -0
- package/dist/lowLevelInject.d.ts +22 -0
- package/dist/lowLevelInject.d.ts.map +1 -0
- package/dist/topLevelInject.d.ts +7 -0
- package/dist/topLevelInject.d.ts.map +1 -0
- package/dist/types/api/alephiumGetAddress.d.ts +19 -0
- package/dist/types/api/alephiumGetAddress.d.ts.map +1 -0
- package/dist/types/api/alephiumSignMessage.d.ts +9 -0
- package/dist/types/api/alephiumSignMessage.d.ts.map +1 -0
- package/dist/types/api/alephiumSignTransaction.d.ts +12 -0
- package/dist/types/api/alephiumSignTransaction.d.ts.map +1 -0
- package/dist/types/api/algoGetAddress.d.ts +14 -0
- package/dist/types/api/algoGetAddress.d.ts.map +1 -0
- package/dist/types/api/algoSignTransaction.d.ts +11 -0
- package/dist/types/api/algoSignTransaction.d.ts.map +1 -0
- package/dist/types/api/allNetworkGetAddress.d.ts +71 -0
- package/dist/types/api/allNetworkGetAddress.d.ts.map +1 -0
- package/dist/types/api/aptosGetAddress.d.ts +16 -0
- package/dist/types/api/aptosGetAddress.d.ts.map +1 -0
- package/dist/types/api/aptosGetPublicKey.d.ts +15 -0
- package/dist/types/api/aptosGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/aptosSignInMessage.d.ts +11 -0
- package/dist/types/api/aptosSignInMessage.d.ts.map +1 -0
- package/dist/types/api/aptosSignMessage.d.ts +20 -0
- package/dist/types/api/aptosSignMessage.d.ts.map +1 -0
- package/dist/types/api/aptosSignTransaction.d.ts +12 -0
- package/dist/types/api/aptosSignTransaction.d.ts.map +1 -0
- package/dist/types/api/benfenGetAddress.d.ts +15 -0
- package/dist/types/api/benfenGetAddress.d.ts.map +1 -0
- package/dist/types/api/benfenGetPublicKey.d.ts +14 -0
- package/dist/types/api/benfenGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/benfenSignMessage.d.ts +8 -0
- package/dist/types/api/benfenSignMessage.d.ts.map +1 -0
- package/dist/types/api/benfenSignTransaction.d.ts +13 -0
- package/dist/types/api/benfenSignTransaction.d.ts.map +1 -0
- package/dist/types/api/btcGetAddress.d.ts +17 -0
- package/dist/types/api/btcGetAddress.d.ts.map +1 -0
- package/dist/types/api/btcGetPublicKey.d.ts +17 -0
- package/dist/types/api/btcGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/btcSignMessage.d.ts +11 -0
- package/dist/types/api/btcSignMessage.d.ts.map +1 -0
- package/dist/types/api/btcSignPsbt.d.ts +8 -0
- package/dist/types/api/btcSignPsbt.d.ts.map +1 -0
- package/dist/types/api/btcSignTransaction.d.ts +74 -0
- package/dist/types/api/btcSignTransaction.d.ts.map +1 -0
- package/dist/types/api/btcVerifyMessage.d.ts +10 -0
- package/dist/types/api/btcVerifyMessage.d.ts.map +1 -0
- package/dist/types/api/cardano.d.ts +182 -0
- package/dist/types/api/cardano.d.ts.map +1 -0
- package/dist/types/api/cardanoGetAddress.d.ts +35 -0
- package/dist/types/api/cardanoGetAddress.d.ts.map +1 -0
- package/dist/types/api/cardanoGetPublicKey.d.ts +23 -0
- package/dist/types/api/cardanoGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/cardanoSignMessage.d.ts +19 -0
- package/dist/types/api/cardanoSignMessage.d.ts.map +1 -0
- package/dist/types/api/cardanoSignTransaction.d.ts +4 -0
- package/dist/types/api/cardanoSignTransaction.d.ts.map +1 -0
- package/dist/types/api/checkAllFirmwareRelease.d.ts +24 -0
- package/dist/types/api/checkAllFirmwareRelease.d.ts.map +1 -0
- package/dist/types/api/checkBLEFirmwareRelease.d.ts +15 -0
- package/dist/types/api/checkBLEFirmwareRelease.d.ts.map +1 -0
- package/dist/types/api/checkBootloaderRelease.d.ts +11 -0
- package/dist/types/api/checkBootloaderRelease.d.ts.map +1 -0
- package/dist/types/api/checkBridgeRelease.d.ts +10 -0
- package/dist/types/api/checkBridgeRelease.d.ts.map +1 -0
- package/dist/types/api/checkBridgeStatus.d.ts +3 -0
- package/dist/types/api/checkBridgeStatus.d.ts.map +1 -0
- package/dist/types/api/checkFirmwareRelease.d.ts +15 -0
- package/dist/types/api/checkFirmwareRelease.d.ts.map +1 -0
- package/dist/types/api/cipherKeyValue.d.ts +19 -0
- package/dist/types/api/cipherKeyValue.d.ts.map +1 -0
- package/dist/types/api/confluxGetAddress.d.ts +15 -0
- package/dist/types/api/confluxGetAddress.d.ts.map +1 -0
- package/dist/types/api/confluxSignMessage.d.ts +8 -0
- package/dist/types/api/confluxSignMessage.d.ts.map +1 -0
- package/dist/types/api/confluxSignMessageCIP23.d.ts +9 -0
- package/dist/types/api/confluxSignMessageCIP23.d.ts.map +1 -0
- package/dist/types/api/confluxSignTransaction.d.ts +25 -0
- package/dist/types/api/confluxSignTransaction.d.ts.map +1 -0
- package/dist/types/api/cosmosGetAddress.d.ts +15 -0
- package/dist/types/api/cosmosGetAddress.d.ts.map +1 -0
- package/dist/types/api/cosmosGetPublicKey.d.ts +16 -0
- package/dist/types/api/cosmosGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/cosmosSignTransaction.d.ts +11 -0
- package/dist/types/api/cosmosSignTransaction.d.ts.map +1 -0
- package/dist/types/api/deviceBackup.d.ts +4 -0
- package/dist/types/api/deviceBackup.d.ts.map +1 -0
- package/dist/types/api/deviceCancel.d.ts +4 -0
- package/dist/types/api/deviceCancel.d.ts.map +1 -0
- package/dist/types/api/deviceChangePin.d.ts +7 -0
- package/dist/types/api/deviceChangePin.d.ts.map +1 -0
- package/dist/types/api/deviceFlags.d.ts +7 -0
- package/dist/types/api/deviceFlags.d.ts.map +1 -0
- package/dist/types/api/deviceFullyUploadResource.d.ts +6 -0
- package/dist/types/api/deviceFullyUploadResource.d.ts.map +1 -0
- package/dist/types/api/deviceLock.d.ts +4 -0
- package/dist/types/api/deviceLock.d.ts.map +1 -0
- package/dist/types/api/deviceRebootToBoardloader.d.ts +5 -0
- package/dist/types/api/deviceRebootToBoardloader.d.ts.map +1 -0
- package/dist/types/api/deviceRebootToBootloader.d.ts +4 -0
- package/dist/types/api/deviceRebootToBootloader.d.ts.map +1 -0
- package/dist/types/api/deviceRecovery.d.ts +15 -0
- package/dist/types/api/deviceRecovery.d.ts.map +1 -0
- package/dist/types/api/deviceReset.d.ts +16 -0
- package/dist/types/api/deviceReset.d.ts.map +1 -0
- package/dist/types/api/deviceSettings.d.ts +16 -0
- package/dist/types/api/deviceSettings.d.ts.map +1 -0
- package/dist/types/api/deviceSupportFeatures.d.ts +7 -0
- package/dist/types/api/deviceSupportFeatures.d.ts.map +1 -0
- package/dist/types/api/deviceUnlock.d.ts +4 -0
- package/dist/types/api/deviceUnlock.d.ts.map +1 -0
- package/dist/types/api/deviceUpdateBootloader.d.ts +6 -0
- package/dist/types/api/deviceUpdateBootloader.d.ts.map +1 -0
- package/dist/types/api/deviceUpdateReboot.d.ts +3 -0
- package/dist/types/api/deviceUpdateReboot.d.ts.map +1 -0
- package/dist/types/api/deviceUploadResource.d.ts +12 -0
- package/dist/types/api/deviceUploadResource.d.ts.map +1 -0
- package/dist/types/api/deviceVerify.d.ts +10 -0
- package/dist/types/api/deviceVerify.d.ts.map +1 -0
- package/dist/types/api/deviceWipe.d.ts +4 -0
- package/dist/types/api/deviceWipe.d.ts.map +1 -0
- package/dist/types/api/dnxGetAddress.d.ts +14 -0
- package/dist/types/api/dnxGetAddress.d.ts.map +1 -0
- package/dist/types/api/dnxSignTransaction.d.ts +29 -0
- package/dist/types/api/dnxSignTransaction.d.ts.map +1 -0
- package/dist/types/api/emmcFileWrite.d.ts +8 -0
- package/dist/types/api/emmcFileWrite.d.ts.map +1 -0
- package/dist/types/api/event.d.ts +4 -0
- package/dist/types/api/event.d.ts.map +1 -0
- package/dist/types/api/evmGetAddress.d.ts +15 -0
- package/dist/types/api/evmGetAddress.d.ts.map +1 -0
- package/dist/types/api/evmGetPublicKey.d.ts +21 -0
- package/dist/types/api/evmGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/evmSignMessage.d.ts +9 -0
- package/dist/types/api/evmSignMessage.d.ts.map +1 -0
- package/dist/types/api/evmSignMessageEIP712.d.ts +9 -0
- package/dist/types/api/evmSignMessageEIP712.d.ts.map +1 -0
- package/dist/types/api/evmSignTransaction.d.ts +68 -0
- package/dist/types/api/evmSignTransaction.d.ts.map +1 -0
- package/dist/types/api/evmSignTypedData.d.ts +34 -0
- package/dist/types/api/evmSignTypedData.d.ts.map +1 -0
- package/dist/types/api/evmVerifyMessage.d.ts +10 -0
- package/dist/types/api/evmVerifyMessage.d.ts.map +1 -0
- package/dist/types/api/export.d.ts +89 -0
- package/dist/types/api/export.d.ts.map +1 -0
- package/dist/types/api/filecoinGetAddress.d.ts +15 -0
- package/dist/types/api/filecoinGetAddress.d.ts.map +1 -0
- package/dist/types/api/filecoinSignTransaction.d.ts +15 -0
- package/dist/types/api/filecoinSignTransaction.d.ts.map +1 -0
- package/dist/types/api/firmwareUpdate.d.ts +44 -0
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -0
- package/dist/types/api/getFeatures.d.ts +4 -0
- package/dist/types/api/getFeatures.d.ts.map +1 -0
- package/dist/types/api/getLogs.d.ts +3 -0
- package/dist/types/api/getLogs.d.ts.map +1 -0
- package/dist/types/api/getNextU2FCounter.d.ts +4 -0
- package/dist/types/api/getNextU2FCounter.d.ts.map +1 -0
- package/dist/types/api/getPassphraseState.d.ts +3 -0
- package/dist/types/api/getPassphraseState.d.ts.map +1 -0
- package/dist/types/api/getUkeyFeatures.d.ts +4 -0
- package/dist/types/api/getUkeyFeatures.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +274 -0
- package/dist/types/api/index.d.ts.map +1 -0
- package/dist/types/api/init.d.ts +6 -0
- package/dist/types/api/init.d.ts.map +1 -0
- package/dist/types/api/kaspaGetAddress.d.ts +17 -0
- package/dist/types/api/kaspaGetAddress.d.ts.map +1 -0
- package/dist/types/api/kaspaSignTransaction.d.ts +36 -0
- package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -0
- package/dist/types/api/lnurlAuth.d.ts +13 -0
- package/dist/types/api/lnurlAuth.d.ts.map +1 -0
- package/dist/types/api/nearGetAddress.d.ts +14 -0
- package/dist/types/api/nearGetAddress.d.ts.map +1 -0
- package/dist/types/api/nearSignTransaction.d.ts +8 -0
- package/dist/types/api/nearSignTransaction.d.ts.map +1 -0
- package/dist/types/api/nemGetAddress.d.ts +15 -0
- package/dist/types/api/nemGetAddress.d.ts.map +1 -0
- package/dist/types/api/nemSignTransaction.d.ts +93 -0
- package/dist/types/api/nemSignTransaction.d.ts.map +1 -0
- package/dist/types/api/neoGetAddress.d.ts +15 -0
- package/dist/types/api/neoGetAddress.d.ts.map +1 -0
- package/dist/types/api/neoSignTransaction.d.ts +12 -0
- package/dist/types/api/neoSignTransaction.d.ts.map +1 -0
- package/dist/types/api/nervosGetAddress.d.ts +15 -0
- package/dist/types/api/nervosGetAddress.d.ts.map +1 -0
- package/dist/types/api/nervosSignTransaction.d.ts +13 -0
- package/dist/types/api/nervosSignTransaction.d.ts.map +1 -0
- package/dist/types/api/nexaGetAddress.d.ts +17 -0
- package/dist/types/api/nexaGetAddress.d.ts.map +1 -0
- package/dist/types/api/nexaSignTransaction.d.ts +20 -0
- package/dist/types/api/nexaSignTransaction.d.ts.map +1 -0
- package/dist/types/api/nostrDecryptMessage.d.ts +18 -0
- package/dist/types/api/nostrDecryptMessage.d.ts.map +1 -0
- package/dist/types/api/nostrEncryptMessage.d.ts +18 -0
- package/dist/types/api/nostrEncryptMessage.d.ts.map +1 -0
- package/dist/types/api/nostrGetPublicKey.d.ts +16 -0
- package/dist/types/api/nostrGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/nostrSignEvent.d.ts +44 -0
- package/dist/types/api/nostrSignEvent.d.ts.map +1 -0
- package/dist/types/api/nostrSignSchnorr.d.ts +15 -0
- package/dist/types/api/nostrSignSchnorr.d.ts.map +1 -0
- package/dist/types/api/polkadotGetAddress.d.ts +18 -0
- package/dist/types/api/polkadotGetAddress.d.ts.map +1 -0
- package/dist/types/api/polkadotSignTransaction.d.ts +12 -0
- package/dist/types/api/polkadotSignTransaction.d.ts.map +1 -0
- package/dist/types/api/promptWebDeviceAccess.d.ts +8 -0
- package/dist/types/api/promptWebDeviceAccess.d.ts.map +1 -0
- package/dist/types/api/scdoGetAddress.d.ts +14 -0
- package/dist/types/api/scdoGetAddress.d.ts.map +1 -0
- package/dist/types/api/scdoSignMessage.d.ts +8 -0
- package/dist/types/api/scdoSignMessage.d.ts.map +1 -0
- package/dist/types/api/scdoSignTransaction.d.ts +18 -0
- package/dist/types/api/scdoSignTransaction.d.ts.map +1 -0
- package/dist/types/api/searchDevices.d.ts +4 -0
- package/dist/types/api/searchDevices.d.ts.map +1 -0
- package/dist/types/api/setU2FCounter.d.ts +4 -0
- package/dist/types/api/setU2FCounter.d.ts.map +1 -0
- package/dist/types/api/solGetAddress.d.ts +14 -0
- package/dist/types/api/solGetAddress.d.ts.map +1 -0
- package/dist/types/api/solSignMessage.d.ts +11 -0
- package/dist/types/api/solSignMessage.d.ts.map +1 -0
- package/dist/types/api/solSignOffchainMessage.d.ts +15 -0
- package/dist/types/api/solSignOffchainMessage.d.ts.map +1 -0
- package/dist/types/api/solSignTransaction.d.ts +14 -0
- package/dist/types/api/solSignTransaction.d.ts.map +1 -0
- package/dist/types/api/starcoinGetAddress.d.ts +14 -0
- package/dist/types/api/starcoinGetAddress.d.ts.map +1 -0
- package/dist/types/api/starcoinGetPublicKey.d.ts +14 -0
- package/dist/types/api/starcoinGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/starcoinSignMessage.d.ts +8 -0
- package/dist/types/api/starcoinSignMessage.d.ts.map +1 -0
- package/dist/types/api/starcoinSignTransaction.d.ts +8 -0
- package/dist/types/api/starcoinSignTransaction.d.ts.map +1 -0
- package/dist/types/api/starcoinVerifyMessage.d.ts +9 -0
- package/dist/types/api/starcoinVerifyMessage.d.ts.map +1 -0
- package/dist/types/api/stellarGetAddress.d.ts +14 -0
- package/dist/types/api/stellarGetAddress.d.ts.map +1 -0
- package/dist/types/api/stellarSignTransaction.d.ts +130 -0
- package/dist/types/api/stellarSignTransaction.d.ts.map +1 -0
- package/dist/types/api/suiGetAddress.d.ts +16 -0
- package/dist/types/api/suiGetAddress.d.ts.map +1 -0
- package/dist/types/api/suiGetPublicKey.d.ts +15 -0
- package/dist/types/api/suiGetPublicKey.d.ts.map +1 -0
- package/dist/types/api/suiSignMessage.d.ts +8 -0
- package/dist/types/api/suiSignMessage.d.ts.map +1 -0
- package/dist/types/api/suiSignTransaction.d.ts +11 -0
- package/dist/types/api/suiSignTransaction.d.ts.map +1 -0
- package/dist/types/api/testInitializeDeviceDuration.d.ts +3 -0
- package/dist/types/api/testInitializeDeviceDuration.d.ts.map +1 -0
- package/dist/types/api/tonGetAddress.d.ts +22 -0
- package/dist/types/api/tonGetAddress.d.ts.map +1 -0
- package/dist/types/api/tonSignMessage.d.ts +31 -0
- package/dist/types/api/tonSignMessage.d.ts.map +1 -0
- package/dist/types/api/tonSignProof.d.ts +15 -0
- package/dist/types/api/tonSignProof.d.ts.map +1 -0
- package/dist/types/api/tronGetAddress.d.ts +14 -0
- package/dist/types/api/tronGetAddress.d.ts.map +1 -0
- package/dist/types/api/tronSignMessage.d.ts +9 -0
- package/dist/types/api/tronSignMessage.d.ts.map +1 -0
- package/dist/types/api/tronSignTransaction.d.ts +72 -0
- package/dist/types/api/tronSignTransaction.d.ts.map +1 -0
- package/dist/types/api/uiResponse.d.ts +3 -0
- package/dist/types/api/uiResponse.d.ts.map +1 -0
- package/dist/types/api/xrpGetAddress.d.ts +16 -0
- package/dist/types/api/xrpGetAddress.d.ts.map +1 -0
- package/dist/types/api/xrpSignTransaction.d.ts +22 -0
- package/dist/types/api/xrpSignTransaction.d.ts.map +1 -0
- package/dist/types/device.d.ts +105 -0
- package/dist/types/device.d.ts.map +1 -0
- package/dist/types/firmware.d.ts +38 -0
- package/dist/types/firmware.d.ts.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/params.d.ts +29 -0
- package/dist/types/params.d.ts.map +1 -0
- package/dist/types/settings.d.ts +82 -0
- package/dist/types/settings.d.ts.map +1 -0
- package/dist/utils/arrayUtils.d.ts +2 -0
- package/dist/utils/arrayUtils.d.ts.map +1 -0
- package/dist/utils/assets.d.ts +3 -0
- package/dist/utils/assets.d.ts.map +1 -0
- package/dist/utils/bridgeUpdate.d.ts +15 -0
- package/dist/utils/bridgeUpdate.d.ts.map +1 -0
- package/dist/utils/capabilitieUtils.d.ts +5 -0
- package/dist/utils/capabilitieUtils.d.ts.map +1 -0
- package/dist/utils/deviceFeaturesUtils.d.ts +39 -0
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -0
- package/dist/utils/deviceInfoUtils.d.ts +10 -0
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -0
- package/dist/utils/deviceVersionUtils.d.ts +6 -0
- package/dist/utils/deviceVersionUtils.d.ts.map +1 -0
- package/dist/utils/findDefectiveBatchDevice.d.ts +8 -0
- package/dist/utils/findDefectiveBatchDevice.d.ts.map +1 -0
- package/dist/utils/getMutex.d.ts +2 -0
- package/dist/utils/getMutex.d.ts.map +1 -0
- package/dist/utils/getSynchronize.d.ts +4 -0
- package/dist/utils/getSynchronize.d.ts.map +1 -0
- package/dist/utils/homescreen.d.ts +22 -0
- package/dist/utils/homescreen.d.ts.map +1 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/logger.d.ts +64 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/networkUtils.d.ts +2 -0
- package/dist/utils/networkUtils.d.ts.map +1 -0
- package/dist/utils/patch.d.ts +3 -0
- package/dist/utils/patch.d.ts.map +1 -0
- package/dist/utils/promiseUtils.d.ts +2 -0
- package/dist/utils/promiseUtils.d.ts.map +1 -0
- package/dist/utils/release.d.ts +7 -0
- package/dist/utils/release.d.ts.map +1 -0
- package/dist/utils/versionUtils.d.ts +6 -0
- package/dist/utils/versionUtils.d.ts.map +1 -0
- package/jest.config.js +6 -0
- package/package.json +49 -0
- package/src/api/BaseMethod.ts +226 -0
- package/src/api/CheckAllFirmwareRelease.ts +65 -0
- package/src/api/CheckBLEFirmwareRelease.ts +24 -0
- package/src/api/CheckBootloaderRelease.ts +21 -0
- package/src/api/CheckBridgeRelease.ts +28 -0
- package/src/api/CheckBridgeStatus.ts +31 -0
- package/src/api/CheckFirmwareRelease.ts +24 -0
- package/src/api/CipherKeyValue.ts +67 -0
- package/src/api/EmmcFileWrite.ts +49 -0
- package/src/api/FirmwareUpdate.ts +216 -0
- package/src/api/FirmwareUpdateV2.ts +391 -0
- package/src/api/FirmwareUpdateV3.ts +437 -0
- package/src/api/GetFeatures.ts +22 -0
- package/src/api/GetLogs.ts +40 -0
- package/src/api/GetPassphraseState.ts +27 -0
- package/src/api/GetUkeyFeatures.ts +24 -0
- package/src/api/PromptWebDeviceAccess.ts +75 -0
- package/src/api/SearchDevices.ts +49 -0
- package/src/api/alephium/AlephiumGetAddress.ts +83 -0
- package/src/api/alephium/AlephiumSignMessage.ts +50 -0
- package/src/api/alephium/AlephiumSignTransaction.ts +134 -0
- package/src/api/algo/AlgoGetAddress.ts +73 -0
- package/src/api/algo/AlgoSignTransaction.ts +51 -0
- package/src/api/allnetwork/AllNetworkGetAddress.ts +87 -0
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +480 -0
- package/src/api/allnetwork/AllNetworkGetAddressByLoop.ts +161 -0
- package/src/api/aptos/AptosGetAddress.ts +128 -0
- package/src/api/aptos/AptosGetPublicKey.ts +63 -0
- package/src/api/aptos/AptosSignInMessage.ts +54 -0
- package/src/api/aptos/AptosSignMessage.ts +78 -0
- package/src/api/aptos/AptosSignTransaction.ts +71 -0
- package/src/api/benfen/BenfenGetAddress.ts +122 -0
- package/src/api/benfen/BenfenGetPublicKey.ts +67 -0
- package/src/api/benfen/BenfenSignMessage.ts +49 -0
- package/src/api/benfen/BenfenSignTransaction.ts +104 -0
- package/src/api/benfen/normalize.ts +51 -0
- package/src/api/btc/BTCGetAddress.ts +90 -0
- package/src/api/btc/BTCGetPublicKey.ts +172 -0
- package/src/api/btc/BTCSignMessage.ts +72 -0
- package/src/api/btc/BTCSignPsbt.ts +63 -0
- package/src/api/btc/BTCSignTransaction.ts +147 -0
- package/src/api/btc/BTCVerifyMessage.ts +46 -0
- package/src/api/btc/helpers/btcParamsUtils.ts +63 -0
- package/src/api/btc/helpers/signtx.ts +250 -0
- package/src/api/btc/helpers/signtxLegacy.ts +226 -0
- package/src/api/btc/helpers/versionLimit.ts +25 -0
- package/src/api/btc/helpers/xpubUtils.ts +131 -0
- package/src/api/cardano/CardanoGetAddress.ts +138 -0
- package/src/api/cardano/CardanoGetPublicKey.ts +71 -0
- package/src/api/cardano/CardanoSignMessage.ts +70 -0
- package/src/api/cardano/CardanoSignTransaction.ts +403 -0
- package/src/api/cardano/helper/addressParameters.ts +118 -0
- package/src/api/cardano/helper/auxiliaryData.ts +131 -0
- package/src/api/cardano/helper/cardanoInputs.ts +54 -0
- package/src/api/cardano/helper/cardanoOutputs.ts +88 -0
- package/src/api/cardano/helper/certificate.ts +244 -0
- package/src/api/cardano/helper/token.ts +43 -0
- package/src/api/cardano/helper/utils.ts +17 -0
- package/src/api/cardano/helper/witnesses.ts +61 -0
- package/src/api/conflux/ConfluxGetAddress.ts +77 -0
- package/src/api/conflux/ConfluxSignMessage.ts +48 -0
- package/src/api/conflux/ConfluxSignMessageCIP23.ts +48 -0
- package/src/api/conflux/ConfluxSignTransaction.ts +134 -0
- package/src/api/cosmos/CosmosGetAddress.ts +80 -0
- package/src/api/cosmos/CosmosGetPublicKey.ts +76 -0
- package/src/api/cosmos/CosmosSignTransaction.ts +54 -0
- package/src/api/device/DeviceBackup.ts +14 -0
- package/src/api/device/DeviceCancel.ts +14 -0
- package/src/api/device/DeviceChangePin.ts +24 -0
- package/src/api/device/DeviceFlags.ts +25 -0
- package/src/api/device/DeviceFullyUploadResource.ts +71 -0
- package/src/api/device/DeviceLock.ts +14 -0
- package/src/api/device/DeviceRebootToBoardloader.ts +29 -0
- package/src/api/device/DeviceRebootToBootloader.ts +27 -0
- package/src/api/device/DeviceRecovery.ts +43 -0
- package/src/api/device/DeviceReset.ts +45 -0
- package/src/api/device/DeviceSettings.ts +56 -0
- package/src/api/device/DeviceSupportFeatures.ts +28 -0
- package/src/api/device/DeviceUnlock.ts +12 -0
- package/src/api/device/DeviceUpdateBootloader.ts +78 -0
- package/src/api/device/DeviceUpdateReboot.ts +16 -0
- package/src/api/device/DeviceUploadResource.ts +140 -0
- package/src/api/device/DeviceVerify.ts +63 -0
- package/src/api/device/DeviceWipe.ts +14 -0
- package/src/api/dynex/DnxGetAddress.ts +75 -0
- package/src/api/dynex/DnxSignTransaction.ts +126 -0
- package/src/api/evm/EVMGetAddress.ts +87 -0
- package/src/api/evm/EVMGetPublicKey.ts +115 -0
- package/src/api/evm/EVMSignMessage.ts +48 -0
- package/src/api/evm/EVMSignMessageEIP712.ts +55 -0
- package/src/api/evm/EVMSignTransaction.ts +138 -0
- package/src/api/evm/EVMSignTypedData.ts +474 -0
- package/src/api/evm/EVMVerifyMessage.ts +45 -0
- package/src/api/evm/latest/getAddress.ts +13 -0
- package/src/api/evm/latest/getPublicKey.ts +13 -0
- package/src/api/evm/latest/signMessage.ts +19 -0
- package/src/api/evm/latest/signTransaction.ts +301 -0
- package/src/api/evm/latest/signTypedData.ts +34 -0
- package/src/api/evm/latest/signTypedHash.ts +44 -0
- package/src/api/evm/latest/verifyMessage.ts +15 -0
- package/src/api/evm/legacyV1/getAddress.ts +16 -0
- package/src/api/evm/legacyV1/getPublicKey.ts +16 -0
- package/src/api/evm/legacyV1/signMessage.ts +22 -0
- package/src/api/evm/legacyV1/signTransaction.ts +36 -0
- package/src/api/evm/legacyV1/signTypedData.ts +37 -0
- package/src/api/evm/legacyV1/signTypedHash.ts +48 -0
- package/src/api/evm/legacyV1/verifyMessage.ts +19 -0
- package/src/api/filecoin/FilecoinGetAddress.ts +79 -0
- package/src/api/filecoin/FilecoinSignTransaction.ts +56 -0
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +417 -0
- package/src/api/firmware/bootloaderHelper.ts +44 -0
- package/src/api/firmware/getBinary.ts +88 -0
- package/src/api/firmware/releaseHelper.ts +67 -0
- package/src/api/firmware/updateBootloader.ts +71 -0
- package/src/api/firmware/uploadFirmware.ts +453 -0
- package/src/api/helpers/batchGetPublickeys.ts +76 -0
- package/src/api/helpers/bigNumberUtils.ts +58 -0
- package/src/api/helpers/hexUtils.ts +111 -0
- package/src/api/helpers/paramsValidator.ts +148 -0
- package/src/api/helpers/pathUtils.ts +144 -0
- package/src/api/helpers/stringUtils.ts +11 -0
- package/src/api/helpers/typeNameUtils.ts +135 -0
- package/src/api/index.ts +161 -0
- package/src/api/kaspa/KaspaGetAddress.ts +102 -0
- package/src/api/kaspa/KaspaSignTransaction.ts +180 -0
- package/src/api/kaspa/helpers/BufferWriter.ts +177 -0
- package/src/api/kaspa/helpers/HashWriter.ts +72 -0
- package/src/api/kaspa/helpers/SignatureType.ts +7 -0
- package/src/api/kaspa/helpers/TransferSerialize.ts +143 -0
- package/src/api/lightning/LnurlAuth.ts +51 -0
- package/src/api/near/NearGetAddress.ts +74 -0
- package/src/api/near/NearSignTransaction.ts +45 -0
- package/src/api/nem/NEMGetAddress.ts +71 -0
- package/src/api/nem/NEMSignTransaction.ts +250 -0
- package/src/api/neo/NeoGetAddress.ts +79 -0
- package/src/api/neo/NeoSignTransaction.ts +59 -0
- package/src/api/nervos/NervosGetAddress.ts +80 -0
- package/src/api/nervos/NervosSignTransaction.ts +114 -0
- package/src/api/nexa/NexaGetAddress.ts +87 -0
- package/src/api/nexa/NexaSignTransaction.ts +105 -0
- package/src/api/nostr/NostrDecryptMessage.ts +56 -0
- package/src/api/nostr/NostrEncryptMessage.ts +56 -0
- package/src/api/nostr/NostrGetPublicKey.ts +73 -0
- package/src/api/nostr/NostrSignEvent.ts +63 -0
- package/src/api/nostr/NostrSignSchnorr.ts +51 -0
- package/src/api/nostr/helper/index.ts +28 -0
- package/src/api/polkadot/PolkadotGetAddress.ts +83 -0
- package/src/api/polkadot/PolkadotSignTransaction.ts +50 -0
- package/src/api/polkadot/networks.ts +56 -0
- package/src/api/scdo/ScdoGetAddress.ts +75 -0
- package/src/api/scdo/ScdoSignMessage.ts +44 -0
- package/src/api/scdo/ScdoSignTransaction.ts +100 -0
- package/src/api/solana/SolGetAddress.ts +67 -0
- package/src/api/solana/SolSignMessage.ts +60 -0
- package/src/api/solana/SolSignOffchainMessage.ts +60 -0
- package/src/api/solana/SolSignTransaction.ts +105 -0
- package/src/api/starcoin/StarcoinGetAddress.ts +68 -0
- package/src/api/starcoin/StarcoinGetPublicKey.ts +69 -0
- package/src/api/starcoin/StarcoinSignMessage.ts +41 -0
- package/src/api/starcoin/StarcoinSignTransaction.ts +37 -0
- package/src/api/starcoin/StarcoinVerifyMessage.ts +34 -0
- package/src/api/stellar/StellarGetAddress.ts +67 -0
- package/src/api/stellar/StellarSignTransaction.ts +218 -0
- package/src/api/sui/SuiGetAddress.ts +117 -0
- package/src/api/sui/SuiGetPublicKey.ts +65 -0
- package/src/api/sui/SuiSignMessage.ts +47 -0
- package/src/api/sui/SuiSignTransaction.ts +120 -0
- package/src/api/sui/normalize.ts +28 -0
- package/src/api/test/TestInitializeDeviceDuration.ts +22 -0
- package/src/api/ton/TonGetAddress.ts +96 -0
- package/src/api/ton/TonSignMessage.ts +214 -0
- package/src/api/ton/TonSignProof.ts +62 -0
- package/src/api/tron/TronGetAddress.ts +74 -0
- package/src/api/tron/TronSignMessage.ts +82 -0
- package/src/api/tron/TronSignTransaction.ts +203 -0
- package/src/api/u2f/GetNextU2FCounter.ts +14 -0
- package/src/api/u2f/SetU2FCounter.ts +18 -0
- package/src/api/utils.ts +21 -0
- package/src/api/xrp/XrpGetAddress.ts +114 -0
- package/src/api/xrp/XrpSignTransaction.ts +70 -0
- package/src/constants/errors.ts +15 -0
- package/src/constants/index.ts +2 -0
- package/src/constants/ui-request.ts +3 -0
- package/src/core/RequestQueue.ts +133 -0
- package/src/core/index.ts +1167 -0
- package/src/data/coins/bitcoin.json +44 -0
- package/src/data/config.ts +25 -0
- package/src/data/messages/messages.json +13066 -0
- package/src/data/messages/messages_legacy_v1.json +10270 -0
- package/src/data-manager/CoinManager.ts +31 -0
- package/src/data-manager/DataManager.ts +355 -0
- package/src/data-manager/MessagesConfig.ts +20 -0
- package/src/data-manager/TransportManager.ts +134 -0
- package/src/data-manager/connectSettings.ts +120 -0
- package/src/data-manager/index.ts +3 -0
- package/src/device/Device.ts +858 -0
- package/src/device/DeviceCommands.ts +589 -0
- package/src/device/DeviceConnector.ts +112 -0
- package/src/device/DeviceList.ts +37 -0
- package/src/device/DevicePool.ts +263 -0
- package/src/events/call.ts +94 -0
- package/src/events/core.ts +64 -0
- package/src/events/device.ts +91 -0
- package/src/events/firmware.ts +40 -0
- package/src/events/iframe.ts +54 -0
- package/src/events/index.ts +10 -0
- package/src/events/log.ts +23 -0
- package/src/events/logBlockEvent.ts +6 -0
- package/src/events/ui-promise.ts +14 -0
- package/src/events/ui-request.ts +205 -0
- package/src/events/ui-response.ts +48 -0
- package/src/events/utils.ts +19 -0
- package/src/index.ts +67 -0
- package/src/inject.ts +408 -0
- package/src/lowLevelInject.ts +60 -0
- package/src/topLevelInject.ts +60 -0
- package/src/types/api/alephiumGetAddress.ts +31 -0
- package/src/types/api/alephiumSignMessage.ts +14 -0
- package/src/types/api/alephiumSignTransaction.ts +18 -0
- package/src/types/api/algoGetAddress.ts +23 -0
- package/src/types/api/algoSignTransaction.ts +17 -0
- package/src/types/api/allNetworkGetAddress.ts +129 -0
- package/src/types/api/aptosGetAddress.ts +28 -0
- package/src/types/api/aptosGetPublicKey.ts +27 -0
- package/src/types/api/aptosSignInMessage.ts +17 -0
- package/src/types/api/aptosSignMessage.ts +26 -0
- package/src/types/api/aptosSignTransaction.ts +18 -0
- package/src/types/api/benfenGetAddress.ts +24 -0
- package/src/types/api/benfenGetPublicKey.ts +23 -0
- package/src/types/api/benfenSignMessage.ts +13 -0
- package/src/types/api/benfenSignTransaction.ts +19 -0
- package/src/types/api/btcGetAddress.ts +26 -0
- package/src/types/api/btcGetPublicKey.ts +26 -0
- package/src/types/api/btcSignMessage.ts +16 -0
- package/src/types/api/btcSignPsbt.ts +13 -0
- package/src/types/api/btcSignTransaction.ts +98 -0
- package/src/types/api/btcVerifyMessage.ts +15 -0
- package/src/types/api/cardano.ts +212 -0
- package/src/types/api/cardanoGetAddress.ts +49 -0
- package/src/types/api/cardanoGetPublicKey.ts +33 -0
- package/src/types/api/cardanoSignMessage.ts +25 -0
- package/src/types/api/cardanoSignTransaction.ts +8 -0
- package/src/types/api/checkAllFirmwareRelease.ts +30 -0
- package/src/types/api/checkBLEFirmwareRelease.ts +15 -0
- package/src/types/api/checkBootloaderRelease.ts +15 -0
- package/src/types/api/checkBridgeRelease.ts +14 -0
- package/src/types/api/checkBridgeStatus.ts +3 -0
- package/src/types/api/checkFirmwareRelease.ts +15 -0
- package/src/types/api/cipherKeyValue.ts +28 -0
- package/src/types/api/confluxGetAddress.ts +24 -0
- package/src/types/api/confluxSignMessage.ts +13 -0
- package/src/types/api/confluxSignMessageCIP23.ts +14 -0
- package/src/types/api/confluxSignTransaction.ts +32 -0
- package/src/types/api/cosmosGetAddress.ts +24 -0
- package/src/types/api/cosmosGetPublicKey.ts +28 -0
- package/src/types/api/cosmosSignTransaction.ts +17 -0
- package/src/types/api/deviceBackup.ts +4 -0
- package/src/types/api/deviceCancel.ts +4 -0
- package/src/types/api/deviceChangePin.ts +11 -0
- package/src/types/api/deviceFlags.ts +11 -0
- package/src/types/api/deviceFullyUploadResource.ts +9 -0
- package/src/types/api/deviceLock.ts +4 -0
- package/src/types/api/deviceRebootToBoardloader.ts +6 -0
- package/src/types/api/deviceRebootToBootloader.ts +4 -0
- package/src/types/api/deviceRecovery.ts +19 -0
- package/src/types/api/deviceReset.ts +20 -0
- package/src/types/api/deviceSettings.ts +20 -0
- package/src/types/api/deviceSupportFeatures.ts +6 -0
- package/src/types/api/deviceUnlock.ts +4 -0
- package/src/types/api/deviceUpdateBootloader.ts +9 -0
- package/src/types/api/deviceUpdateReboot.ts +3 -0
- package/src/types/api/deviceUploadResource.ts +16 -0
- package/src/types/api/deviceVerify.ts +15 -0
- package/src/types/api/deviceWipe.ts +4 -0
- package/src/types/api/dnxGetAddress.ts +23 -0
- package/src/types/api/dnxSignTransaction.ts +36 -0
- package/src/types/api/emmcFileWrite.ts +12 -0
- package/src/types/api/event.ts +8 -0
- package/src/types/api/evmGetAddress.ts +24 -0
- package/src/types/api/evmGetPublicKey.ts +36 -0
- package/src/types/api/evmSignMessage.ts +14 -0
- package/src/types/api/evmSignMessageEIP712.ts +14 -0
- package/src/types/api/evmSignTransaction.ts +80 -0
- package/src/types/api/evmSignTypedData.ts +42 -0
- package/src/types/api/evmVerifyMessage.ts +15 -0
- package/src/types/api/export.ts +191 -0
- package/src/types/api/filecoinGetAddress.ts +24 -0
- package/src/types/api/filecoinSignTransaction.ts +24 -0
- package/src/types/api/firmwareUpdate.ts +63 -0
- package/src/types/api/getFeatures.ts +4 -0
- package/src/types/api/getLogs.ts +3 -0
- package/src/types/api/getNextU2FCounter.ts +7 -0
- package/src/types/api/getPassphraseState.ts +6 -0
- package/src/types/api/getUkeyFeatures.ts +7 -0
- package/src/types/api/index.ts +437 -0
- package/src/types/api/init.ts +11 -0
- package/src/types/api/kaspaGetAddress.ts +26 -0
- package/src/types/api/kaspaSignTransaction.ts +44 -0
- package/src/types/api/lnurlAuth.ts +22 -0
- package/src/types/api/nearGetAddress.ts +23 -0
- package/src/types/api/nearSignTransaction.ts +13 -0
- package/src/types/api/nemGetAddress.ts +24 -0
- package/src/types/api/nemSignTransaction.ts +118 -0
- package/src/types/api/neoGetAddress.ts +24 -0
- package/src/types/api/neoSignTransaction.ts +18 -0
- package/src/types/api/nervosGetAddress.ts +24 -0
- package/src/types/api/nervosSignTransaction.ts +19 -0
- package/src/types/api/nexaGetAddress.ts +26 -0
- package/src/types/api/nexaSignTransaction.ts +28 -0
- package/src/types/api/nostrDecryptMessage.ts +25 -0
- package/src/types/api/nostrEncryptMessage.ts +25 -0
- package/src/types/api/nostrGetPublicKey.ts +28 -0
- package/src/types/api/nostrSignEvent.ts +52 -0
- package/src/types/api/nostrSignSchnorr.ts +22 -0
- package/src/types/api/polkadotGetAddress.ts +30 -0
- package/src/types/api/polkadotSignTransaction.ts +18 -0
- package/src/types/api/promptWebDeviceAccess.ts +6 -0
- package/src/types/api/scdoGetAddress.ts +23 -0
- package/src/types/api/scdoSignMessage.ts +13 -0
- package/src/types/api/scdoSignTransaction.ts +24 -0
- package/src/types/api/searchDevices.ts +5 -0
- package/src/types/api/setU2FCounter.ts +7 -0
- package/src/types/api/solGetAddress.ts +23 -0
- package/src/types/api/solSignMessage.ts +17 -0
- package/src/types/api/solSignOffchainMessage.ts +21 -0
- package/src/types/api/solSignTransaction.ts +23 -0
- package/src/types/api/starcoinGetAddress.ts +23 -0
- package/src/types/api/starcoinGetPublicKey.ts +23 -0
- package/src/types/api/starcoinSignMessage.ts +13 -0
- package/src/types/api/starcoinSignTransaction.ts +13 -0
- package/src/types/api/starcoinVerifyMessage.ts +14 -0
- package/src/types/api/stellarGetAddress.ts +23 -0
- package/src/types/api/stellarSignTransaction.ts +154 -0
- package/src/types/api/suiGetAddress.ts +28 -0
- package/src/types/api/suiGetPublicKey.ts +27 -0
- package/src/types/api/suiSignMessage.ts +13 -0
- package/src/types/api/suiSignTransaction.ts +17 -0
- package/src/types/api/testInitializeDeviceDuration.ts +6 -0
- package/src/types/api/tonGetAddress.ts +34 -0
- package/src/types/api/tonSignMessage.ts +42 -0
- package/src/types/api/tonSignProof.ts +25 -0
- package/src/types/api/tronGetAddress.ts +23 -0
- package/src/types/api/tronSignMessage.ts +14 -0
- package/src/types/api/tronSignTransaction.ts +89 -0
- package/src/types/api/uiResponse.ts +3 -0
- package/src/types/api/xrpGetAddress.ts +28 -0
- package/src/types/api/xrpSignTransaction.ts +29 -0
- package/src/types/device.ts +185 -0
- package/src/types/firmware.ts +41 -0
- package/src/types/global.d.ts +3 -0
- package/src/types/index.ts +5 -0
- package/src/types/params.ts +59 -0
- package/src/types/settings.ts +104 -0
- package/src/utils/arrayUtils.ts +7 -0
- package/src/utils/assets.ts +5 -0
- package/src/utils/bridgeUpdate.ts +77 -0
- package/src/utils/capabilitieUtils.ts +12 -0
- package/src/utils/deviceFeaturesUtils.ts +340 -0
- package/src/utils/deviceInfoUtils.ts +166 -0
- package/src/utils/deviceVersionUtils.ts +78 -0
- package/src/utils/findDefectiveBatchDevice.ts +38 -0
- package/src/utils/getMutex.ts +41 -0
- package/src/utils/getSynchronize.ts +25 -0
- package/src/utils/homescreen.ts +343 -0
- package/src/utils/index.ts +42 -0
- package/src/utils/logger.ts +187 -0
- package/src/utils/networkUtils.ts +25 -0
- package/src/utils/patch.ts +14 -0
- package/src/utils/promiseUtils.ts +4 -0
- package/src/utils/release.ts +41 -0
- package/src/utils/semver.test.js +53 -0
- package/src/utils/versionUtils.ts +120 -0
- package/tsconfig.json +11 -0
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EthereumAuthorizationSignature,
|
|
3
|
+
EthereumSignTx,
|
|
4
|
+
EthereumSignTxEIP1559,
|
|
5
|
+
EthereumSignTxEIP7702UKey,
|
|
6
|
+
EthereumTxRequest,
|
|
7
|
+
EthereumTxRequestUKey,
|
|
8
|
+
MessageResponse,
|
|
9
|
+
TypedCall,
|
|
10
|
+
} from '@ukeyfe/hardware-transport';
|
|
11
|
+
import { ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
12
|
+
import {
|
|
13
|
+
EVMSignedTx,
|
|
14
|
+
EVMTransaction,
|
|
15
|
+
EVMTransactionEIP1559,
|
|
16
|
+
EVMTransactionEIP7702,
|
|
17
|
+
} from '../../../types';
|
|
18
|
+
import { cutString } from '../../helpers/stringUtils';
|
|
19
|
+
import { stripHexStartZeroes, addHexPrefix } from '../../helpers/hexUtils';
|
|
20
|
+
|
|
21
|
+
export const processTxRequest = async ({
|
|
22
|
+
typedCall,
|
|
23
|
+
request,
|
|
24
|
+
data,
|
|
25
|
+
chainId,
|
|
26
|
+
supportTrezor,
|
|
27
|
+
}: {
|
|
28
|
+
typedCall: TypedCall;
|
|
29
|
+
request: EthereumTxRequestUKey | EthereumTxRequest;
|
|
30
|
+
data: string;
|
|
31
|
+
chainId?: number | undefined;
|
|
32
|
+
supportTrezor?: boolean;
|
|
33
|
+
}): Promise<EVMSignedTx> => {
|
|
34
|
+
if (!request.data_length) {
|
|
35
|
+
let v = request.signature_v;
|
|
36
|
+
const r = request.signature_r;
|
|
37
|
+
const s = request.signature_s;
|
|
38
|
+
const authorizationSignatures =
|
|
39
|
+
'authorization_signatures' in request ? request.authorization_signatures : undefined;
|
|
40
|
+
|
|
41
|
+
if (v == null || r == null || s == null) {
|
|
42
|
+
throw ERRORS.TypedError(
|
|
43
|
+
HardwareErrorCode.RuntimeError,
|
|
44
|
+
'processTxRequest: Unexpected request'
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// if v is not 27 or 28, it is a legacy transaction
|
|
49
|
+
if (chainId && v <= 1) {
|
|
50
|
+
v += 2 * chainId + 35;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const result: any = {
|
|
54
|
+
v: `0x${v.toString(16)}`,
|
|
55
|
+
r: `0x${r}`,
|
|
56
|
+
s: `0x${s}`,
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// Add authorization signatures for EIP7702 transactions with flattened yParity,r,s structure
|
|
60
|
+
if (authorizationSignatures && authorizationSignatures.length > 0) {
|
|
61
|
+
result.authorizationSignatures = authorizationSignatures.map(
|
|
62
|
+
(sig: EthereumAuthorizationSignature) => ({
|
|
63
|
+
yParity: sig.y_parity,
|
|
64
|
+
r: sig.r,
|
|
65
|
+
s: sig.s,
|
|
66
|
+
})
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
return Promise.resolve(result);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const [first, rest] = cutString(data, request.data_length * 2);
|
|
74
|
+
|
|
75
|
+
let response: MessageResponse<'EthereumTxRequestUKey'> | MessageResponse<'EthereumTxRequest'>;
|
|
76
|
+
if (supportTrezor) {
|
|
77
|
+
response = await typedCall('EthereumTxAck', 'EthereumTxRequest', {
|
|
78
|
+
data_chunk: first,
|
|
79
|
+
});
|
|
80
|
+
} else {
|
|
81
|
+
response = await typedCall('EthereumTxAckUKey', 'EthereumTxRequestUKey', {
|
|
82
|
+
data_chunk: first,
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
return processTxRequest({
|
|
87
|
+
typedCall,
|
|
88
|
+
request: response.message,
|
|
89
|
+
data: rest,
|
|
90
|
+
chainId,
|
|
91
|
+
supportTrezor,
|
|
92
|
+
});
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
export const evmSignTx = async ({
|
|
96
|
+
typedCall,
|
|
97
|
+
addressN,
|
|
98
|
+
tx,
|
|
99
|
+
supportTrezor,
|
|
100
|
+
}: {
|
|
101
|
+
typedCall: TypedCall;
|
|
102
|
+
addressN: number[];
|
|
103
|
+
tx: EVMTransaction;
|
|
104
|
+
supportTrezor?: boolean;
|
|
105
|
+
}) => {
|
|
106
|
+
const { to, value, gasPrice, gasLimit, nonce, data, chainId, txType } = tx;
|
|
107
|
+
|
|
108
|
+
const length = data == null ? 0 : data.length / 2;
|
|
109
|
+
|
|
110
|
+
const [first, rest] = cutString(data, 1024 * 2);
|
|
111
|
+
|
|
112
|
+
let message: EthereumSignTx = {
|
|
113
|
+
address_n: addressN,
|
|
114
|
+
nonce: stripHexStartZeroes(nonce),
|
|
115
|
+
gas_price: stripHexStartZeroes(gasPrice),
|
|
116
|
+
gas_limit: stripHexStartZeroes(gasLimit),
|
|
117
|
+
to,
|
|
118
|
+
value: stripHexStartZeroes(value),
|
|
119
|
+
chain_id: chainId,
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
if (length !== 0) {
|
|
123
|
+
message = {
|
|
124
|
+
...message,
|
|
125
|
+
data_length: length,
|
|
126
|
+
data_initial_chunk: first,
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (txType !== null) {
|
|
131
|
+
message = {
|
|
132
|
+
...message,
|
|
133
|
+
tx_type: txType,
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
let response;
|
|
138
|
+
if (supportTrezor) {
|
|
139
|
+
response = await typedCall('EthereumSignTx', 'EthereumTxRequest', message);
|
|
140
|
+
} else {
|
|
141
|
+
response = await typedCall('EthereumSignTxUKey', 'EthereumTxRequestUKey', message);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
return processTxRequest({
|
|
145
|
+
typedCall,
|
|
146
|
+
request: response.message,
|
|
147
|
+
data: rest,
|
|
148
|
+
chainId,
|
|
149
|
+
supportTrezor,
|
|
150
|
+
});
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
export const evmSignTxEip1559 = async ({
|
|
154
|
+
typedCall,
|
|
155
|
+
addressN,
|
|
156
|
+
tx,
|
|
157
|
+
supportTrezor,
|
|
158
|
+
}: {
|
|
159
|
+
typedCall: TypedCall;
|
|
160
|
+
addressN: number[];
|
|
161
|
+
tx: EVMTransactionEIP1559;
|
|
162
|
+
supportTrezor?: boolean;
|
|
163
|
+
}) => {
|
|
164
|
+
const {
|
|
165
|
+
to,
|
|
166
|
+
value,
|
|
167
|
+
gasLimit,
|
|
168
|
+
nonce,
|
|
169
|
+
data,
|
|
170
|
+
chainId,
|
|
171
|
+
maxFeePerGas,
|
|
172
|
+
maxPriorityFeePerGas,
|
|
173
|
+
accessList,
|
|
174
|
+
} = tx;
|
|
175
|
+
|
|
176
|
+
const length = data == null ? 0 : data.length / 2;
|
|
177
|
+
|
|
178
|
+
const [first, rest] = cutString(data, 1024 * 2);
|
|
179
|
+
|
|
180
|
+
const message: EthereumSignTxEIP1559 = {
|
|
181
|
+
address_n: addressN,
|
|
182
|
+
nonce: stripHexStartZeroes(nonce),
|
|
183
|
+
max_gas_fee: stripHexStartZeroes(maxFeePerGas),
|
|
184
|
+
max_priority_fee: stripHexStartZeroes(maxPriorityFeePerGas),
|
|
185
|
+
gas_limit: stripHexStartZeroes(gasLimit),
|
|
186
|
+
to,
|
|
187
|
+
value: stripHexStartZeroes(value),
|
|
188
|
+
data_length: length,
|
|
189
|
+
data_initial_chunk: first,
|
|
190
|
+
chain_id: chainId,
|
|
191
|
+
access_list: (accessList || []).map(a => ({
|
|
192
|
+
address: a.address,
|
|
193
|
+
storage_keys: a.storageKeys,
|
|
194
|
+
})),
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
let response;
|
|
198
|
+
if (supportTrezor) {
|
|
199
|
+
response = await typedCall('EthereumSignTxEIP1559', 'EthereumTxRequest', message);
|
|
200
|
+
} else {
|
|
201
|
+
response = await typedCall('EthereumSignTxEIP1559UKey', 'EthereumTxRequestUKey', message);
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return processTxRequest({ typedCall, request: response.message, data: rest, supportTrezor });
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
export const evmSignTxEip7702 = async ({
|
|
208
|
+
typedCall,
|
|
209
|
+
addressN,
|
|
210
|
+
tx,
|
|
211
|
+
supportTrezor,
|
|
212
|
+
}: {
|
|
213
|
+
typedCall: TypedCall;
|
|
214
|
+
addressN: number[];
|
|
215
|
+
tx: EVMTransactionEIP7702;
|
|
216
|
+
supportTrezor?: boolean;
|
|
217
|
+
}) => {
|
|
218
|
+
const {
|
|
219
|
+
to,
|
|
220
|
+
value,
|
|
221
|
+
gasLimit,
|
|
222
|
+
nonce,
|
|
223
|
+
data,
|
|
224
|
+
chainId,
|
|
225
|
+
maxFeePerGas,
|
|
226
|
+
maxPriorityFeePerGas,
|
|
227
|
+
accessList,
|
|
228
|
+
authorizationList,
|
|
229
|
+
} = tx;
|
|
230
|
+
|
|
231
|
+
const length = data == null ? 0 : data.length / 2;
|
|
232
|
+
|
|
233
|
+
const [first, rest] = cutString(data, 1024 * 2);
|
|
234
|
+
|
|
235
|
+
const message: EthereumSignTxEIP7702UKey = {
|
|
236
|
+
address_n: addressN,
|
|
237
|
+
nonce: stripHexStartZeroes(nonce),
|
|
238
|
+
max_gas_fee: stripHexStartZeroes(maxFeePerGas),
|
|
239
|
+
max_priority_fee: stripHexStartZeroes(maxPriorityFeePerGas),
|
|
240
|
+
gas_limit: stripHexStartZeroes(gasLimit),
|
|
241
|
+
to,
|
|
242
|
+
value: stripHexStartZeroes(value),
|
|
243
|
+
data_length: length,
|
|
244
|
+
data_initial_chunk: first,
|
|
245
|
+
chain_id: chainId,
|
|
246
|
+
access_list: (accessList || []).map(a => ({
|
|
247
|
+
address: a.address,
|
|
248
|
+
storage_keys: a.storageKeys,
|
|
249
|
+
})),
|
|
250
|
+
authorization_list: authorizationList.map(auth => ({
|
|
251
|
+
address_n: auth.addressN || [],
|
|
252
|
+
chain_id: auth.chainId,
|
|
253
|
+
address: addHexPrefix(auth.address),
|
|
254
|
+
nonce: stripHexStartZeroes(auth.nonce),
|
|
255
|
+
signature:
|
|
256
|
+
auth.yParity !== undefined && auth.r && auth.s
|
|
257
|
+
? {
|
|
258
|
+
y_parity: auth.yParity,
|
|
259
|
+
r: auth.r,
|
|
260
|
+
s: auth.s,
|
|
261
|
+
}
|
|
262
|
+
: undefined,
|
|
263
|
+
})),
|
|
264
|
+
};
|
|
265
|
+
|
|
266
|
+
let response;
|
|
267
|
+
if (supportTrezor) {
|
|
268
|
+
// Note: Trezor doesn't support EIP7702 yet, this is for future compatibility
|
|
269
|
+
throw ERRORS.TypedError(HardwareErrorCode.RuntimeError, 'EIP7702 not supported by Trezor');
|
|
270
|
+
} else {
|
|
271
|
+
response = await typedCall('EthereumSignTxEIP7702UKey', 'EthereumTxRequestUKey', message);
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
return processTxRequest({
|
|
275
|
+
typedCall,
|
|
276
|
+
request: response.message,
|
|
277
|
+
data: rest,
|
|
278
|
+
supportTrezor,
|
|
279
|
+
});
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
export const signTransaction = async ({
|
|
283
|
+
typedCall,
|
|
284
|
+
isEIP1559,
|
|
285
|
+
isEIP7702,
|
|
286
|
+
addressN,
|
|
287
|
+
tx,
|
|
288
|
+
}: {
|
|
289
|
+
addressN: number[];
|
|
290
|
+
tx: EVMTransaction | EVMTransactionEIP1559 | EVMTransactionEIP7702;
|
|
291
|
+
isEIP1559: boolean;
|
|
292
|
+
isEIP7702?: boolean;
|
|
293
|
+
typedCall: TypedCall;
|
|
294
|
+
}) => {
|
|
295
|
+
if (isEIP7702) {
|
|
296
|
+
return evmSignTxEip7702({ typedCall, addressN, tx: tx as EVMTransactionEIP7702 });
|
|
297
|
+
}
|
|
298
|
+
return isEIP1559
|
|
299
|
+
? evmSignTxEip1559({ typedCall, addressN, tx: tx as EVMTransactionEIP1559 })
|
|
300
|
+
: evmSignTx({ typedCall, addressN, tx: tx as EVMTransaction });
|
|
301
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TypedCall } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { EthereumSignTypedDataMessage, EthereumSignTypedDataTypes } from '../../../types';
|
|
3
|
+
|
|
4
|
+
export const signTypedData = async ({
|
|
5
|
+
typedCall,
|
|
6
|
+
addressN,
|
|
7
|
+
data,
|
|
8
|
+
metamaskV4Compat,
|
|
9
|
+
chainId,
|
|
10
|
+
}: {
|
|
11
|
+
typedCall: TypedCall;
|
|
12
|
+
addressN: number[];
|
|
13
|
+
data: EthereumSignTypedDataMessage<EthereumSignTypedDataTypes>;
|
|
14
|
+
metamaskV4Compat: boolean;
|
|
15
|
+
chainId?: number;
|
|
16
|
+
}) => {
|
|
17
|
+
const { primaryType }: EthereumSignTypedDataMessage<EthereumSignTypedDataTypes> = data;
|
|
18
|
+
return typedCall(
|
|
19
|
+
'EthereumSignTypedDataUKey',
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
[
|
|
22
|
+
'EthereumTypedDataStructRequestUKey',
|
|
23
|
+
'EthereumTypedDataValueRequestUKey',
|
|
24
|
+
'EthereumTypedDataSignatureUKey',
|
|
25
|
+
'EthereumGnosisSafeTxRequest',
|
|
26
|
+
],
|
|
27
|
+
{
|
|
28
|
+
address_n: addressN,
|
|
29
|
+
primary_type: primaryType as string,
|
|
30
|
+
metamask_v4_compat: metamaskV4Compat,
|
|
31
|
+
chain_id: chainId,
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { MessageResponse, TypedCall } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import semver from 'semver';
|
|
3
|
+
import { EDeviceType, ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
4
|
+
import { Device } from '../../../device/Device';
|
|
5
|
+
import { getDeviceFirmwareVersion, getDeviceType } from '../../../utils';
|
|
6
|
+
|
|
7
|
+
export const signTypedHash = async ({
|
|
8
|
+
typedCall,
|
|
9
|
+
addressN,
|
|
10
|
+
device,
|
|
11
|
+
chainId,
|
|
12
|
+
domainHash,
|
|
13
|
+
messageHash,
|
|
14
|
+
}: {
|
|
15
|
+
typedCall: TypedCall;
|
|
16
|
+
addressN: number[];
|
|
17
|
+
device: Device;
|
|
18
|
+
chainId: number | undefined;
|
|
19
|
+
domainHash: string;
|
|
20
|
+
messageHash: string | undefined;
|
|
21
|
+
}): Promise<MessageResponse<'EthereumTypedDataSignatureUKey'>> => {
|
|
22
|
+
const deviceType = getDeviceType(device.features);
|
|
23
|
+
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.Pro) {
|
|
24
|
+
// Touch Pro Sign NestedArrays
|
|
25
|
+
const currentVersion = getDeviceFirmwareVersion(device.features).join('.');
|
|
26
|
+
const supportNestedArraysSignVersion = '4.2.0';
|
|
27
|
+
|
|
28
|
+
// 4.2.0 is the first version that supports nested arrays in signTypedData
|
|
29
|
+
if (semver.lt(currentVersion, supportNestedArraysSignVersion)) {
|
|
30
|
+
throw ERRORS.TypedError(
|
|
31
|
+
HardwareErrorCode.CallMethodNeedUpgradeFirmware,
|
|
32
|
+
`Device firmware version is too low, please update to ${supportNestedArraysSignVersion}`,
|
|
33
|
+
{ current: currentVersion, require: supportNestedArraysSignVersion }
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
return typedCall('EthereumSignTypedHashUKey', 'EthereumTypedDataSignatureUKey', {
|
|
39
|
+
address_n: addressN,
|
|
40
|
+
domain_separator_hash: domainHash ?? '',
|
|
41
|
+
message_hash: messageHash,
|
|
42
|
+
chain_id: chainId,
|
|
43
|
+
});
|
|
44
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { EthereumVerifyMessageUKey, Success, TypedCall } from '@ukeyfe/hardware-transport';
|
|
2
|
+
|
|
3
|
+
export default async function ({
|
|
4
|
+
typedCall,
|
|
5
|
+
params,
|
|
6
|
+
}: {
|
|
7
|
+
typedCall: TypedCall;
|
|
8
|
+
params: EthereumVerifyMessageUKey;
|
|
9
|
+
}): Promise<Success> {
|
|
10
|
+
const res = await typedCall('EthereumVerifyMessageUKey', 'Success', {
|
|
11
|
+
...params,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
return Promise.resolve(res.message);
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EthereumGetAddressUKey, MessageResponse, TypedCall } from '@ukeyfe/hardware-transport';
|
|
2
|
+
|
|
3
|
+
export default async function ({
|
|
4
|
+
typedCall,
|
|
5
|
+
param,
|
|
6
|
+
}: {
|
|
7
|
+
typedCall: TypedCall;
|
|
8
|
+
param: EthereumGetAddressUKey;
|
|
9
|
+
}): Promise<MessageResponse<'EthereumAddress'>> {
|
|
10
|
+
return typedCall('EthereumGetAddress', 'EthereumAddress', {
|
|
11
|
+
address_n: param.address_n,
|
|
12
|
+
show_display: param.show_display,
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
chain_id: param.chain_id,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EthereumGetPublicKeyUKey, MessageResponse, TypedCall } from '@ukeyfe/hardware-transport';
|
|
2
|
+
|
|
3
|
+
export default async function ({
|
|
4
|
+
typedCall,
|
|
5
|
+
param,
|
|
6
|
+
}: {
|
|
7
|
+
typedCall: TypedCall;
|
|
8
|
+
param: EthereumGetPublicKeyUKey;
|
|
9
|
+
}): Promise<MessageResponse<'EthereumPublicKey'>> {
|
|
10
|
+
return typedCall('EthereumGetPublicKey', 'EthereumPublicKey', {
|
|
11
|
+
address_n: param.address_n,
|
|
12
|
+
show_display: param.show_display,
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
chain_id: param.chain_id,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
EthereumMessageSignature,
|
|
3
|
+
EthereumSignMessageUKey,
|
|
4
|
+
TypedCall,
|
|
5
|
+
} from '@ukeyfe/hardware-transport';
|
|
6
|
+
|
|
7
|
+
export default async function ({
|
|
8
|
+
typedCall,
|
|
9
|
+
params,
|
|
10
|
+
}: {
|
|
11
|
+
typedCall: TypedCall;
|
|
12
|
+
params: EthereumSignMessageUKey;
|
|
13
|
+
}): Promise<EthereumMessageSignature> {
|
|
14
|
+
const res = await typedCall('EthereumSignMessage', 'EthereumMessageSignature', {
|
|
15
|
+
address_n: params.address_n,
|
|
16
|
+
message: params.message,
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
chain_id: params.chain_id,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return Promise.resolve(res.message);
|
|
22
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { TypedCall } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702 } from '../../../types';
|
|
3
|
+
import { evmSignTx, evmSignTxEip1559, evmSignTxEip7702 } from '../latest/signTransaction';
|
|
4
|
+
|
|
5
|
+
export const signTransaction = async ({
|
|
6
|
+
typedCall,
|
|
7
|
+
isEIP1559,
|
|
8
|
+
isEIP7702,
|
|
9
|
+
addressN,
|
|
10
|
+
tx,
|
|
11
|
+
}: {
|
|
12
|
+
addressN: number[];
|
|
13
|
+
tx: EVMTransaction | EVMTransactionEIP1559 | EVMTransactionEIP7702;
|
|
14
|
+
isEIP1559: boolean;
|
|
15
|
+
isEIP7702: boolean;
|
|
16
|
+
typedCall: TypedCall;
|
|
17
|
+
}) => {
|
|
18
|
+
if (isEIP7702) {
|
|
19
|
+
return evmSignTxEip7702({
|
|
20
|
+
typedCall,
|
|
21
|
+
addressN,
|
|
22
|
+
tx: tx as EVMTransactionEIP7702,
|
|
23
|
+
supportTrezor: true,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (isEIP1559) {
|
|
27
|
+
return evmSignTxEip1559({
|
|
28
|
+
typedCall,
|
|
29
|
+
addressN,
|
|
30
|
+
tx: tx as EVMTransactionEIP1559,
|
|
31
|
+
supportTrezor: true,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return evmSignTx({ typedCall, addressN, tx: tx as EVMTransaction, supportTrezor: true });
|
|
36
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { TypedCall } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { EthereumSignTypedDataMessage, EthereumSignTypedDataTypes } from '../../../types';
|
|
3
|
+
|
|
4
|
+
export const signTypedData = async ({
|
|
5
|
+
typedCall,
|
|
6
|
+
addressN,
|
|
7
|
+
data,
|
|
8
|
+
metamaskV4Compat,
|
|
9
|
+
chainId,
|
|
10
|
+
}: {
|
|
11
|
+
typedCall: TypedCall;
|
|
12
|
+
addressN: number[];
|
|
13
|
+
data: EthereumSignTypedDataMessage<EthereumSignTypedDataTypes>;
|
|
14
|
+
metamaskV4Compat: boolean;
|
|
15
|
+
chainId?: number;
|
|
16
|
+
}) => {
|
|
17
|
+
const { primaryType }: EthereumSignTypedDataMessage<EthereumSignTypedDataTypes> = data;
|
|
18
|
+
|
|
19
|
+
const response = await typedCall(
|
|
20
|
+
'EthereumSignTypedData',
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
[
|
|
23
|
+
'EthereumTypedDataStructRequest',
|
|
24
|
+
'EthereumTypedDataValueRequest',
|
|
25
|
+
'EthereumTypedDataSignature',
|
|
26
|
+
'EthereumGnosisSafeTxRequest',
|
|
27
|
+
],
|
|
28
|
+
{
|
|
29
|
+
address_n: addressN,
|
|
30
|
+
primary_type: primaryType as string,
|
|
31
|
+
metamask_v4_compat: metamaskV4Compat,
|
|
32
|
+
// @ts-ignore
|
|
33
|
+
chain_id: chainId,
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
return response;
|
|
37
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { MessageResponse, TypedCall } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import semver from 'semver';
|
|
3
|
+
import { EDeviceType, ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
4
|
+
import { Device } from '../../../device/Device';
|
|
5
|
+
import { getDeviceFirmwareVersion, getDeviceType } from '../../../utils';
|
|
6
|
+
|
|
7
|
+
export const signTypedHash = async ({
|
|
8
|
+
typedCall,
|
|
9
|
+
addressN,
|
|
10
|
+
device,
|
|
11
|
+
chainId,
|
|
12
|
+
domainHash,
|
|
13
|
+
messageHash,
|
|
14
|
+
}: {
|
|
15
|
+
typedCall: TypedCall;
|
|
16
|
+
addressN: number[];
|
|
17
|
+
device: Device;
|
|
18
|
+
chainId: number | undefined;
|
|
19
|
+
domainHash: string;
|
|
20
|
+
messageHash: string | undefined;
|
|
21
|
+
}): Promise<
|
|
22
|
+
| MessageResponse<'EthereumTypedDataSignature'>
|
|
23
|
+
| MessageResponse<'EthereumTypedDataSignatureUKey'>
|
|
24
|
+
> => {
|
|
25
|
+
const deviceType = getDeviceType(device.features);
|
|
26
|
+
if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.Pro) {
|
|
27
|
+
// Touch Pro Sign NestedArrays
|
|
28
|
+
const currentVersion = getDeviceFirmwareVersion(device.features).join('.');
|
|
29
|
+
const supportNestedArraysSignVersion = '4.2.0';
|
|
30
|
+
|
|
31
|
+
// 4.2.0 is the first version that supports nested arrays in signTypedData
|
|
32
|
+
if (semver.lt(currentVersion, supportNestedArraysSignVersion)) {
|
|
33
|
+
throw ERRORS.TypedError(
|
|
34
|
+
HardwareErrorCode.CallMethodNeedUpgradeFirmware,
|
|
35
|
+
`Device firmware version is too low, please update to ${supportNestedArraysSignVersion}`,
|
|
36
|
+
{ current: currentVersion, require: supportNestedArraysSignVersion }
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return typedCall('EthereumSignTypedHash', 'EthereumTypedDataSignature', {
|
|
42
|
+
address_n: addressN,
|
|
43
|
+
domain_separator_hash: domainHash ?? '',
|
|
44
|
+
message_hash: messageHash,
|
|
45
|
+
// @ts-ignore
|
|
46
|
+
chain_id: chainId,
|
|
47
|
+
});
|
|
48
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { EthereumVerifyMessageUKey, Success, TypedCall } from '@ukeyfe/hardware-transport';
|
|
2
|
+
|
|
3
|
+
export default async function ({
|
|
4
|
+
typedCall,
|
|
5
|
+
params,
|
|
6
|
+
}: {
|
|
7
|
+
typedCall: TypedCall;
|
|
8
|
+
params: EthereumVerifyMessageUKey;
|
|
9
|
+
}): Promise<Success> {
|
|
10
|
+
const res = await typedCall('EthereumVerifyMessage', 'Success', {
|
|
11
|
+
signature: params.signature,
|
|
12
|
+
message: params.message,
|
|
13
|
+
address: params.address,
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
chain_id: params.chain_id,
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
return Promise.resolve(res.message);
|
|
19
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { FilecoinGetAddress as HardwareFilecoinGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
|
+
import { BaseMethod } from '../BaseMethod';
|
|
5
|
+
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
+
import { FilecoinAddress, FilecoinGetAddressParams } from '../../types';
|
|
7
|
+
|
|
8
|
+
export default class FilecoinGetAddress extends BaseMethod<HardwareFilecoinGetAddress[]> {
|
|
9
|
+
hasBundle = false;
|
|
10
|
+
|
|
11
|
+
init() {
|
|
12
|
+
this.checkDeviceId = true;
|
|
13
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
14
|
+
|
|
15
|
+
this.hasBundle = !!this.payload?.bundle;
|
|
16
|
+
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
17
|
+
|
|
18
|
+
// check payload
|
|
19
|
+
validateParams(payload, [{ name: 'bundle', type: 'array' }]);
|
|
20
|
+
|
|
21
|
+
// init params
|
|
22
|
+
this.params = [];
|
|
23
|
+
payload.bundle.forEach((batch: FilecoinGetAddressParams) => {
|
|
24
|
+
const addressN = validatePath(batch.path, 3);
|
|
25
|
+
|
|
26
|
+
validateParams(batch, [
|
|
27
|
+
{ name: 'path', required: true },
|
|
28
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
29
|
+
{ name: 'isTestnet', type: 'boolean' },
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
const showOnOneKey = batch.showOnOneKey ?? true;
|
|
33
|
+
|
|
34
|
+
this.params.push({
|
|
35
|
+
address_n: addressN,
|
|
36
|
+
show_display: showOnOneKey,
|
|
37
|
+
testnet: batch.isTestnet,
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
getVersionRange() {
|
|
43
|
+
return {
|
|
44
|
+
model_mini: {
|
|
45
|
+
min: '2.10.0',
|
|
46
|
+
},
|
|
47
|
+
model_touch: {
|
|
48
|
+
min: '3.5.0',
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
async run() {
|
|
54
|
+
const responses: FilecoinAddress[] = [];
|
|
55
|
+
|
|
56
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
57
|
+
const param = this.params[i];
|
|
58
|
+
|
|
59
|
+
const res = await this.device.commands.typedCall('FilecoinGetAddress', 'FilecoinAddress', {
|
|
60
|
+
...param,
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
const { address } = res.message;
|
|
64
|
+
|
|
65
|
+
const result = {
|
|
66
|
+
path: serializedPath(param.address_n),
|
|
67
|
+
address,
|
|
68
|
+
};
|
|
69
|
+
responses.push(result);
|
|
70
|
+
this.postPreviousAddressMessage(result);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
validateResult(responses, ['address'], {
|
|
74
|
+
expectedLength: this.params.length,
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
return Promise.resolve(this.hasBundle ? responses : responses[0]);
|
|
78
|
+
}
|
|
79
|
+
}
|