@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,46 @@
|
|
|
1
|
+
import { VerifyMessage } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
|
|
4
|
+
import { BaseMethod } from '../BaseMethod';
|
|
5
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
6
|
+
import { formatAnyHex } from '../helpers/hexUtils';
|
|
7
|
+
import { getCoinInfo } from './helpers/btcParamsUtils';
|
|
8
|
+
import { getBitcoinForkVersionRange } from './helpers/versionLimit';
|
|
9
|
+
|
|
10
|
+
export default class BTCVerifyMessage extends BaseMethod<VerifyMessage> {
|
|
11
|
+
init() {
|
|
12
|
+
this.checkDeviceId = true;
|
|
13
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
14
|
+
|
|
15
|
+
validateParams(this.payload, [
|
|
16
|
+
{ name: 'address', type: 'string', required: true },
|
|
17
|
+
{ name: 'messageHex', type: 'hexString', required: true },
|
|
18
|
+
{ name: 'signature', type: 'hexString', required: true },
|
|
19
|
+
{ name: 'coin', type: 'string', required: true },
|
|
20
|
+
]);
|
|
21
|
+
|
|
22
|
+
const { coin } = this.payload;
|
|
23
|
+
const { address, messageHex, signature } = formatAnyHex(this.payload);
|
|
24
|
+
|
|
25
|
+
const coinName = getCoinInfo(undefined, coin).name;
|
|
26
|
+
|
|
27
|
+
this.params = {
|
|
28
|
+
address,
|
|
29
|
+
message: messageHex,
|
|
30
|
+
signature,
|
|
31
|
+
coin_name: coinName,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
getVersionRange() {
|
|
36
|
+
return getBitcoinForkVersionRange([this.params.coin_name]);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
async run() {
|
|
40
|
+
const res = await this.device.commands.typedCall('VerifyMessage', 'Success', {
|
|
41
|
+
...this.params,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
return Promise.resolve(res.message);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
2
|
+
import { getScriptType, isMultisigPath, fromHardened } from '../../helpers/pathUtils';
|
|
3
|
+
import bitcoin from '../../../data/coins/bitcoin.json';
|
|
4
|
+
|
|
5
|
+
export type BitcoinInfo = {
|
|
6
|
+
name: string;
|
|
7
|
+
slip44: number;
|
|
8
|
+
label: string;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export const getCoinInfo = (path: number[] | undefined, coin: string | undefined) => {
|
|
12
|
+
let coinInfo: BitcoinInfo | undefined;
|
|
13
|
+
if (coin) {
|
|
14
|
+
const coinName = coin.toLowerCase();
|
|
15
|
+
coinInfo = bitcoin.find(
|
|
16
|
+
c => c.name.toLowerCase() === coinName || c.label.toLowerCase() === coinName
|
|
17
|
+
);
|
|
18
|
+
} else if (path) {
|
|
19
|
+
const slip44 = fromHardened(path[1]);
|
|
20
|
+
coinInfo = bitcoin.find(c => c.slip44 === slip44);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (!coinInfo) {
|
|
24
|
+
if (coin) {
|
|
25
|
+
throw ERRORS.TypedError(
|
|
26
|
+
HardwareErrorCode.CallMethodInvalidParameter,
|
|
27
|
+
`Invalid coin name: ${coin}`
|
|
28
|
+
);
|
|
29
|
+
} else if (path) {
|
|
30
|
+
throw ERRORS.TypedError(
|
|
31
|
+
HardwareErrorCode.CallMethodInvalidParameter,
|
|
32
|
+
`Invalid path: ${path[0]}`
|
|
33
|
+
);
|
|
34
|
+
} else {
|
|
35
|
+
throw ERRORS.TypedError(HardwareErrorCode.CallMethodInvalidParameter);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return coinInfo;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const getCoinAndScriptType = (
|
|
43
|
+
path: number[],
|
|
44
|
+
coin: string | undefined,
|
|
45
|
+
multisig?: boolean
|
|
46
|
+
) => {
|
|
47
|
+
const coinName = getCoinInfo(path, coin).name;
|
|
48
|
+
|
|
49
|
+
let isMultisig = multisig;
|
|
50
|
+
if (isMultisig === undefined) {
|
|
51
|
+
isMultisig = isMultisigPath(path);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
let scriptType = getScriptType(path);
|
|
55
|
+
if (scriptType === 'SPENDMULTISIG' && !isMultisig) {
|
|
56
|
+
scriptType = 'SPENDADDRESS';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return {
|
|
60
|
+
coinName,
|
|
61
|
+
scriptType: scriptType ?? 'SPENDADDRESS',
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TxInputType,
|
|
3
|
+
TxOutputType,
|
|
4
|
+
TxRequest,
|
|
5
|
+
TxRequestSerializedType,
|
|
6
|
+
TypedCall,
|
|
7
|
+
} from '@ukeyfe/hardware-transport';
|
|
8
|
+
import {
|
|
9
|
+
RefTransaction,
|
|
10
|
+
SignedTransaction,
|
|
11
|
+
TransactionOptions,
|
|
12
|
+
} from '@ukeyfe/hardware-core/src/types/api/btcSignTransaction';
|
|
13
|
+
import { ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
14
|
+
|
|
15
|
+
type RefTxs = { [hash: string]: RefTransaction };
|
|
16
|
+
type Props = {
|
|
17
|
+
typedCall: TypedCall;
|
|
18
|
+
txRequest: TxRequest;
|
|
19
|
+
refTxs: RefTxs;
|
|
20
|
+
inputs: TxInputType[];
|
|
21
|
+
outputs: TxOutputType[];
|
|
22
|
+
serializedTx: string[];
|
|
23
|
+
signatures: string[];
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
const requestPrevTxInfo = ({ typedCall, txRequest: { request_type, details }, refTxs }: Props) => {
|
|
27
|
+
const { tx_hash } = details;
|
|
28
|
+
if (!tx_hash) {
|
|
29
|
+
throw ERRORS.TypedError(
|
|
30
|
+
HardwareErrorCode.RuntimeError,
|
|
31
|
+
'requestPrevTxInfo: unknown details.tx_hash'
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
const tx = refTxs[tx_hash.toLowerCase()];
|
|
35
|
+
if (!tx) {
|
|
36
|
+
throw ERRORS.TypedError(
|
|
37
|
+
HardwareErrorCode.RuntimeError,
|
|
38
|
+
`requestPrevTxInfo: Requested unknown tx: ${tx_hash}`
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
if (request_type === 'TXINPUT') {
|
|
42
|
+
// bin_outputs not present in tx = invalid RefTransaction object
|
|
43
|
+
if (!tx.bin_outputs)
|
|
44
|
+
throw ERRORS.TypedError(
|
|
45
|
+
HardwareErrorCode.RuntimeError,
|
|
46
|
+
`requestPrevTxInfo: Requested unknown TXINPUT: ${tx_hash}`
|
|
47
|
+
);
|
|
48
|
+
return typedCall('TxAckPrevInput', 'TxRequest', {
|
|
49
|
+
tx: { input: tx.inputs[details.request_index] },
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
if (request_type === 'TXOUTPUT') {
|
|
53
|
+
// bin_outputs not present in tx = invalid RefTransaction object
|
|
54
|
+
if (!tx.bin_outputs)
|
|
55
|
+
throw ERRORS.TypedError(
|
|
56
|
+
HardwareErrorCode.RuntimeError,
|
|
57
|
+
`requestPrevTxInfo: Requested unknown TXOUTPUT: ${tx_hash}`
|
|
58
|
+
);
|
|
59
|
+
return typedCall('TxAckPrevOutput', 'TxRequest', {
|
|
60
|
+
tx: { output: tx.bin_outputs[details.request_index] },
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
if (request_type === 'TXORIGINPUT') {
|
|
64
|
+
// outputs not present in tx = invalid RefTransaction object
|
|
65
|
+
if (!tx.outputs)
|
|
66
|
+
throw ERRORS.TypedError(
|
|
67
|
+
HardwareErrorCode.RuntimeError,
|
|
68
|
+
`requestPrevTxInfo: Requested unknown TXORIGINPUT: ${tx_hash}`
|
|
69
|
+
);
|
|
70
|
+
return typedCall('TxAckInput', 'TxRequest', {
|
|
71
|
+
tx: { input: tx.inputs[details.request_index] },
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
if (request_type === 'TXORIGOUTPUT') {
|
|
75
|
+
// outputs not present in tx = invalid RefTransaction object
|
|
76
|
+
if (!tx.outputs)
|
|
77
|
+
throw ERRORS.TypedError(
|
|
78
|
+
HardwareErrorCode.RuntimeError,
|
|
79
|
+
`requestPrevTxInfo: Requested unknown TXORIGOUTPUT: ${tx_hash}`
|
|
80
|
+
);
|
|
81
|
+
return typedCall('TxAckOutput', 'TxRequest', {
|
|
82
|
+
tx: { output: tx.outputs[details.request_index] },
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (request_type === 'TXEXTRADATA') {
|
|
86
|
+
if (typeof details.extra_data_len !== 'number') {
|
|
87
|
+
throw ERRORS.TypedError(
|
|
88
|
+
HardwareErrorCode.RuntimeError,
|
|
89
|
+
'requestPrevTxInfo: Missing extra_data_len'
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
if (typeof details.extra_data_offset !== 'number') {
|
|
93
|
+
throw ERRORS.TypedError(
|
|
94
|
+
HardwareErrorCode.RuntimeError,
|
|
95
|
+
'requestPrevTxInfo: Missing extra_data_offset'
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
if (typeof tx.extra_data !== 'string') {
|
|
99
|
+
throw ERRORS.TypedError(
|
|
100
|
+
HardwareErrorCode.RuntimeError,
|
|
101
|
+
`requestPrevTxInfo: No extra data for transaction ${tx.hash}`
|
|
102
|
+
);
|
|
103
|
+
}
|
|
104
|
+
const data = tx.extra_data;
|
|
105
|
+
const dataLen = details.extra_data_len;
|
|
106
|
+
const dataOffset = details.extra_data_offset;
|
|
107
|
+
const extra_data_chunk = data.substring(dataOffset * 2, (dataOffset + dataLen) * 2);
|
|
108
|
+
return typedCall('TxAckPrevExtraData', 'TxRequest', { tx: { extra_data_chunk } });
|
|
109
|
+
}
|
|
110
|
+
if (request_type === 'TXMETA') {
|
|
111
|
+
const data = tx.extra_data;
|
|
112
|
+
const meta = {
|
|
113
|
+
version: tx.version,
|
|
114
|
+
lock_time: tx.lock_time,
|
|
115
|
+
inputs_count: tx.inputs.length,
|
|
116
|
+
outputs_count: tx.outputs ? tx.outputs.length : tx.bin_outputs.length,
|
|
117
|
+
timestamp: tx.timestamp,
|
|
118
|
+
version_group_id: tx.version_group_id,
|
|
119
|
+
expiry: tx.expiry,
|
|
120
|
+
branch_id: tx.branch_id,
|
|
121
|
+
extra_data_len: data ? data.length / 2 : undefined,
|
|
122
|
+
};
|
|
123
|
+
return typedCall('TxAckPrevMeta', 'TxRequest', { tx: meta });
|
|
124
|
+
}
|
|
125
|
+
throw ERRORS.TypedError(
|
|
126
|
+
HardwareErrorCode.RuntimeError,
|
|
127
|
+
`requestPrevTxInfo: Unknown request type: ${request_type}`
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const requestSignedTxInfo = ({
|
|
132
|
+
typedCall,
|
|
133
|
+
txRequest: { request_type, details },
|
|
134
|
+
inputs,
|
|
135
|
+
outputs,
|
|
136
|
+
}: Props) => {
|
|
137
|
+
if (request_type === 'TXINPUT') {
|
|
138
|
+
return typedCall('TxAckInput', 'TxRequest', { tx: { input: inputs[details.request_index] } });
|
|
139
|
+
}
|
|
140
|
+
if (request_type === 'TXOUTPUT') {
|
|
141
|
+
return typedCall('TxAckOutput', 'TxRequest', {
|
|
142
|
+
tx: { output: outputs[details.request_index] },
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
if (request_type === 'TXMETA') {
|
|
146
|
+
throw ERRORS.TypedError(
|
|
147
|
+
HardwareErrorCode.RuntimeError,
|
|
148
|
+
'requestSignedTxInfo: Cannot read TXMETA from signed transaction'
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
if (request_type === 'TXEXTRADATA') {
|
|
152
|
+
throw ERRORS.TypedError(
|
|
153
|
+
HardwareErrorCode.RuntimeError,
|
|
154
|
+
'requestSignedTxInfo: Cannot read TXEXTRADATA from signed transaction'
|
|
155
|
+
);
|
|
156
|
+
}
|
|
157
|
+
throw ERRORS.TypedError(
|
|
158
|
+
HardwareErrorCode.RuntimeError,
|
|
159
|
+
`requestSignedTxInfo: Unknown request type: ${request_type}`
|
|
160
|
+
);
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
// requests information about a transaction
|
|
164
|
+
// can be either signed transaction itself of prev transaction
|
|
165
|
+
const requestTxAck = (props: Props) => {
|
|
166
|
+
const { tx_hash } = props.txRequest.details;
|
|
167
|
+
if (tx_hash) {
|
|
168
|
+
return requestPrevTxInfo(props);
|
|
169
|
+
}
|
|
170
|
+
return requestSignedTxInfo(props);
|
|
171
|
+
};
|
|
172
|
+
|
|
173
|
+
const saveTxSignatures = (
|
|
174
|
+
serializedTx: string[],
|
|
175
|
+
signatures: string[],
|
|
176
|
+
txRequest?: TxRequestSerializedType
|
|
177
|
+
) => {
|
|
178
|
+
if (!txRequest) return;
|
|
179
|
+
const { signature_index, signature, serialized_tx } = txRequest;
|
|
180
|
+
if (serialized_tx) {
|
|
181
|
+
serializedTx.push(serialized_tx);
|
|
182
|
+
}
|
|
183
|
+
if (typeof signature_index === 'number') {
|
|
184
|
+
if (!signature) {
|
|
185
|
+
throw ERRORS.TypedError(
|
|
186
|
+
HardwareErrorCode.RuntimeError,
|
|
187
|
+
'saveTxSignatures: Unexpected null in trezor:TxRequestSerialized signature.'
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
signatures[signature_index] = signature;
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const processTxRequest = async (
|
|
195
|
+
props: Props
|
|
196
|
+
): Promise<{
|
|
197
|
+
signatures: string[];
|
|
198
|
+
serializedTx: string;
|
|
199
|
+
}> => {
|
|
200
|
+
const { typedCall, txRequest, refTxs, inputs, outputs, serializedTx, signatures } = props;
|
|
201
|
+
saveTxSignatures(serializedTx, signatures, txRequest.serialized);
|
|
202
|
+
if (txRequest.request_type === 'TXFINISHED') {
|
|
203
|
+
return Promise.resolve({
|
|
204
|
+
signatures,
|
|
205
|
+
serializedTx: serializedTx.join(''),
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
const { message } = await requestTxAck(props);
|
|
210
|
+
return processTxRequest({
|
|
211
|
+
typedCall,
|
|
212
|
+
txRequest: message,
|
|
213
|
+
refTxs,
|
|
214
|
+
inputs,
|
|
215
|
+
outputs,
|
|
216
|
+
serializedTx,
|
|
217
|
+
signatures,
|
|
218
|
+
});
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
export default async (
|
|
222
|
+
typedCall: TypedCall,
|
|
223
|
+
inputs: TxInputType[],
|
|
224
|
+
outputs: TxOutputType[],
|
|
225
|
+
refTxsArray: RefTransaction[],
|
|
226
|
+
options: TransactionOptions,
|
|
227
|
+
coinName: string
|
|
228
|
+
): Promise<SignedTransaction> => {
|
|
229
|
+
const refTxs: RefTxs = {};
|
|
230
|
+
refTxsArray.forEach(tx => {
|
|
231
|
+
refTxs[tx.hash.toLowerCase()] = tx;
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
const { message } = await typedCall('SignTx', 'TxRequest', {
|
|
235
|
+
...options,
|
|
236
|
+
inputs_count: inputs.length,
|
|
237
|
+
outputs_count: outputs.length,
|
|
238
|
+
coin_name: coinName,
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
return processTxRequest({
|
|
242
|
+
typedCall,
|
|
243
|
+
txRequest: message,
|
|
244
|
+
refTxs,
|
|
245
|
+
inputs,
|
|
246
|
+
outputs,
|
|
247
|
+
serializedTx: [],
|
|
248
|
+
signatures: [],
|
|
249
|
+
});
|
|
250
|
+
};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import {
|
|
2
|
+
TxAckResponse,
|
|
3
|
+
TxInputType,
|
|
4
|
+
TxOutputType,
|
|
5
|
+
TxRequest,
|
|
6
|
+
TxRequestSerializedType,
|
|
7
|
+
TypedCall,
|
|
8
|
+
} from '@ukeyfe/hardware-transport';
|
|
9
|
+
import { ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
10
|
+
import {
|
|
11
|
+
RefTransaction,
|
|
12
|
+
SignedTransaction,
|
|
13
|
+
TransactionOptions,
|
|
14
|
+
} from '../../../types/api/btcSignTransaction';
|
|
15
|
+
|
|
16
|
+
type RefTxs = { [hash: string]: RefTransaction };
|
|
17
|
+
type Props = {
|
|
18
|
+
typedCall: TypedCall;
|
|
19
|
+
txRequest: TxRequest;
|
|
20
|
+
refTxs: RefTxs;
|
|
21
|
+
inputs: TxInputType[];
|
|
22
|
+
outputs: TxOutputType[];
|
|
23
|
+
serializedTx: string[];
|
|
24
|
+
signatures: string[];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const requestPrevTxInfo = ({
|
|
28
|
+
txRequest: { request_type, details },
|
|
29
|
+
refTxs,
|
|
30
|
+
}: Props): TxAckResponse => {
|
|
31
|
+
const { tx_hash } = details;
|
|
32
|
+
if (!tx_hash) {
|
|
33
|
+
throw ERRORS.TypedError(
|
|
34
|
+
HardwareErrorCode.RuntimeError,
|
|
35
|
+
'requestPrevTxInfo: unknown details.tx_hash'
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
const tx = refTxs[tx_hash.toLowerCase()];
|
|
39
|
+
if (!tx) {
|
|
40
|
+
throw ERRORS.TypedError(
|
|
41
|
+
HardwareErrorCode.RuntimeError,
|
|
42
|
+
`requestPrevTxInfo: Requested unknown tx: ${tx_hash}`
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
if (!tx.bin_outputs) {
|
|
46
|
+
throw ERRORS.TypedError(
|
|
47
|
+
HardwareErrorCode.RuntimeError,
|
|
48
|
+
`requestPrevTxInfo: bin_outputs not set tx: ${tx_hash}`
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
if (request_type === 'TXINPUT') {
|
|
52
|
+
return { inputs: [tx.inputs[details.request_index]] };
|
|
53
|
+
}
|
|
54
|
+
if (request_type === 'TXOUTPUT') {
|
|
55
|
+
return { bin_outputs: [tx.bin_outputs[details.request_index]] };
|
|
56
|
+
}
|
|
57
|
+
if (request_type === 'TXEXTRADATA') {
|
|
58
|
+
if (typeof details.extra_data_len !== 'number') {
|
|
59
|
+
throw ERRORS.TypedError(
|
|
60
|
+
HardwareErrorCode.RuntimeError,
|
|
61
|
+
'requestPrevTxInfo: Missing extra_data_len'
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
if (typeof details.extra_data_offset !== 'number') {
|
|
65
|
+
throw ERRORS.TypedError(
|
|
66
|
+
HardwareErrorCode.RuntimeError,
|
|
67
|
+
'requestPrevTxInfo: Missing extra_data_offset'
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
if (typeof tx.extra_data !== 'string') {
|
|
71
|
+
throw ERRORS.TypedError(
|
|
72
|
+
HardwareErrorCode.RuntimeError,
|
|
73
|
+
`requestPrevTxInfo: No extra data for transaction ${tx.hash}`
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
const data = tx.extra_data;
|
|
77
|
+
const dataLen = details.extra_data_len;
|
|
78
|
+
const dataOffset = details.extra_data_offset;
|
|
79
|
+
const extra_data = data.substring(dataOffset * 2, (dataOffset + dataLen) * 2);
|
|
80
|
+
return { extra_data };
|
|
81
|
+
}
|
|
82
|
+
if (request_type === 'TXMETA') {
|
|
83
|
+
const data = tx.extra_data;
|
|
84
|
+
const meta = {
|
|
85
|
+
version: tx.version,
|
|
86
|
+
lock_time: tx.lock_time,
|
|
87
|
+
inputs_cnt: tx.inputs.length,
|
|
88
|
+
outputs_cnt: tx.bin_outputs.length,
|
|
89
|
+
timestamp: tx.timestamp,
|
|
90
|
+
version_group_id: tx.version_group_id,
|
|
91
|
+
expiry: tx.expiry,
|
|
92
|
+
branch_id: tx.branch_id,
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
if (typeof data === 'string' && data.length !== 0) {
|
|
96
|
+
return {
|
|
97
|
+
...meta,
|
|
98
|
+
extra_data_len: data.length / 2,
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
return meta;
|
|
102
|
+
}
|
|
103
|
+
throw ERRORS.TypedError(
|
|
104
|
+
HardwareErrorCode.RuntimeError,
|
|
105
|
+
`requestPrevTxInfo: Unknown request type: ${request_type}`
|
|
106
|
+
);
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const requestSignedTxInfo = ({
|
|
110
|
+
txRequest: { request_type, details },
|
|
111
|
+
inputs,
|
|
112
|
+
outputs,
|
|
113
|
+
}: Props): TxAckResponse => {
|
|
114
|
+
if (request_type === 'TXINPUT') {
|
|
115
|
+
return { inputs: [inputs[details.request_index]] };
|
|
116
|
+
}
|
|
117
|
+
if (request_type === 'TXOUTPUT') {
|
|
118
|
+
return { outputs: [outputs[details.request_index]] };
|
|
119
|
+
}
|
|
120
|
+
if (request_type === 'TXMETA') {
|
|
121
|
+
throw ERRORS.TypedError(
|
|
122
|
+
HardwareErrorCode.RuntimeError,
|
|
123
|
+
'requestSignedTxInfo: Cannot read TXMETA from signed transaction'
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
if (request_type === 'TXEXTRADATA') {
|
|
127
|
+
throw ERRORS.TypedError(
|
|
128
|
+
HardwareErrorCode.RuntimeError,
|
|
129
|
+
'requestSignedTxInfo: Cannot read TXEXTRADATA from signed transaction'
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
throw ERRORS.TypedError(
|
|
133
|
+
HardwareErrorCode.RuntimeError,
|
|
134
|
+
`requestSignedTxInfo: Unknown request type: ${request_type}`
|
|
135
|
+
);
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// requests information about a transaction
|
|
139
|
+
// can be either signed transaction itself of prev transaction
|
|
140
|
+
const requestTxAck = (props: Props) => {
|
|
141
|
+
const { tx_hash } = props.txRequest.details;
|
|
142
|
+
if (tx_hash) {
|
|
143
|
+
return requestPrevTxInfo(props);
|
|
144
|
+
}
|
|
145
|
+
return requestSignedTxInfo(props);
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
const saveTxSignatures = (
|
|
149
|
+
serializedTx: string[],
|
|
150
|
+
signatures: string[],
|
|
151
|
+
txRequest?: TxRequestSerializedType
|
|
152
|
+
) => {
|
|
153
|
+
if (!txRequest) return;
|
|
154
|
+
const { signature_index, signature, serialized_tx } = txRequest;
|
|
155
|
+
if (serialized_tx) {
|
|
156
|
+
serializedTx.push(serialized_tx);
|
|
157
|
+
}
|
|
158
|
+
if (typeof signature_index === 'number') {
|
|
159
|
+
if (!signature) {
|
|
160
|
+
throw ERRORS.TypedError(
|
|
161
|
+
HardwareErrorCode.RuntimeError,
|
|
162
|
+
'saveTxSignatures: Unexpected null in uKey:TxRequestSerialized signature.'
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
signatures[signature_index] = signature;
|
|
166
|
+
}
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
const processTxRequest = async (
|
|
170
|
+
props: Props
|
|
171
|
+
): Promise<{
|
|
172
|
+
signatures: string[];
|
|
173
|
+
serializedTx: string;
|
|
174
|
+
}> => {
|
|
175
|
+
const { typedCall, txRequest, refTxs, inputs, outputs, serializedTx, signatures } = props;
|
|
176
|
+
saveTxSignatures(serializedTx, signatures, txRequest.serialized);
|
|
177
|
+
if (txRequest.request_type === 'TXFINISHED') {
|
|
178
|
+
return Promise.resolve({
|
|
179
|
+
signatures,
|
|
180
|
+
serializedTx: serializedTx.join(''),
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
const txAck = requestTxAck(props);
|
|
185
|
+
const { message } = await typedCall('TxAck', 'TxRequest', { tx: txAck });
|
|
186
|
+
return processTxRequest({
|
|
187
|
+
typedCall,
|
|
188
|
+
txRequest: message,
|
|
189
|
+
refTxs,
|
|
190
|
+
inputs,
|
|
191
|
+
outputs,
|
|
192
|
+
serializedTx,
|
|
193
|
+
signatures,
|
|
194
|
+
});
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export default async (
|
|
198
|
+
typedCall: TypedCall,
|
|
199
|
+
inputs: TxInputType[],
|
|
200
|
+
outputs: TxOutputType[],
|
|
201
|
+
refTxsArray: RefTransaction[],
|
|
202
|
+
options: TransactionOptions,
|
|
203
|
+
coinName: string
|
|
204
|
+
): Promise<SignedTransaction> => {
|
|
205
|
+
const refTxs: RefTxs = {};
|
|
206
|
+
refTxsArray.forEach(tx => {
|
|
207
|
+
refTxs[tx.hash.toLowerCase()] = tx;
|
|
208
|
+
});
|
|
209
|
+
|
|
210
|
+
const { message } = await typedCall('SignTx', 'TxRequest', {
|
|
211
|
+
...options,
|
|
212
|
+
inputs_count: inputs.length,
|
|
213
|
+
outputs_count: outputs.length,
|
|
214
|
+
coin_name: coinName,
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
return processTxRequest({
|
|
218
|
+
typedCall,
|
|
219
|
+
txRequest: message,
|
|
220
|
+
refTxs,
|
|
221
|
+
inputs,
|
|
222
|
+
outputs,
|
|
223
|
+
serializedTx: [],
|
|
224
|
+
signatures: [],
|
|
225
|
+
});
|
|
226
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
function isCoinNameInList(coinName: string, coinNames: (string | undefined)[]) {
|
|
2
|
+
for (let i = 0; i < coinNames.length; i++) {
|
|
3
|
+
const coin_name = coinNames[i];
|
|
4
|
+
if (coin_name?.toLowerCase() === coinName?.toLowerCase()) {
|
|
5
|
+
return true;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
return false;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function getBitcoinForkVersionRange(params: (string | undefined)[]) {
|
|
12
|
+
if (isCoinNameInList('Neurai', params)) {
|
|
13
|
+
return {
|
|
14
|
+
model_mini: {
|
|
15
|
+
min: '3.7.0',
|
|
16
|
+
},
|
|
17
|
+
model_touch: {
|
|
18
|
+
min: '4.9.0',
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// No version restrictions for other coins
|
|
24
|
+
return {};
|
|
25
|
+
}
|