@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,104 @@
|
|
|
1
|
+
import { BenfenSignTx, TypedCall, BenfenSignedTx, MessageType } from '@ukeyfe/hardware-transport';
|
|
2
|
+
|
|
3
|
+
import { bytesToHex } from '@noble/hashes/utils';
|
|
4
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
5
|
+
import { validatePath } from '../helpers/pathUtils';
|
|
6
|
+
import { BaseMethod } from '../BaseMethod';
|
|
7
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
8
|
+
import { formatAnyHex } from '../helpers/hexUtils';
|
|
9
|
+
import type { TypedResponseMessage } from '../../device/DeviceCommands';
|
|
10
|
+
|
|
11
|
+
export default class BenfenSignTransaction extends BaseMethod<BenfenSignTx> {
|
|
12
|
+
init() {
|
|
13
|
+
this.checkDeviceId = true;
|
|
14
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
15
|
+
|
|
16
|
+
validateParams(this.payload, [
|
|
17
|
+
{ name: 'path', required: true },
|
|
18
|
+
{ name: 'rawTx', type: 'hexString', required: true },
|
|
19
|
+
{ name: 'coinType', type: 'string', required: false },
|
|
20
|
+
]);
|
|
21
|
+
|
|
22
|
+
const { path, rawTx, coinType } = this.payload;
|
|
23
|
+
const addressN = validatePath(path, 3);
|
|
24
|
+
|
|
25
|
+
this.params = {
|
|
26
|
+
address_n: addressN,
|
|
27
|
+
raw_tx: formatAnyHex(rawTx),
|
|
28
|
+
...(coinType && {
|
|
29
|
+
coin_type: formatAnyHex(Buffer.from(coinType).toString('hex')),
|
|
30
|
+
}),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
getVersionRange() {
|
|
35
|
+
return {
|
|
36
|
+
pro: {
|
|
37
|
+
min: '4.12.0',
|
|
38
|
+
},
|
|
39
|
+
model_classic1s: {
|
|
40
|
+
min: '3.11.0',
|
|
41
|
+
},
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
chunkByteSize = 1024;
|
|
46
|
+
|
|
47
|
+
processTxRequest = async (
|
|
48
|
+
typedCall: TypedCall,
|
|
49
|
+
res: TypedResponseMessage<'BenfenSignedTx'> | TypedResponseMessage<'BenfenTxRequest'>,
|
|
50
|
+
data: Buffer,
|
|
51
|
+
offset = 0
|
|
52
|
+
): Promise<BenfenSignedTx> => {
|
|
53
|
+
if (res.type === 'BenfenSignedTx') {
|
|
54
|
+
return res.message;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const { data_length } = res.message;
|
|
58
|
+
|
|
59
|
+
if (!data_length) {
|
|
60
|
+
// @ts-expect-error
|
|
61
|
+
return res.message;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const payload = data.subarray(offset, offset + data_length);
|
|
65
|
+
const newOffset = offset + payload.length;
|
|
66
|
+
const resourceAckParams = {
|
|
67
|
+
data_chunk: bytesToHex(new Uint8Array(payload)),
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const response = await typedCall(
|
|
71
|
+
'BenfenTxAck',
|
|
72
|
+
['BenfenSignedTx', 'BenfenTxRequest'] as unknown as keyof MessageType,
|
|
73
|
+
{
|
|
74
|
+
...resourceAckParams,
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
return this.processTxRequest(
|
|
79
|
+
typedCall,
|
|
80
|
+
response as TypedResponseMessage<'BenfenSignedTx'> | TypedResponseMessage<'BenfenTxRequest'>,
|
|
81
|
+
data,
|
|
82
|
+
newOffset
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
async run() {
|
|
87
|
+
const typedCall = this.device.getCommands().typedCall.bind(this.device.getCommands());
|
|
88
|
+
const offset = this.chunkByteSize;
|
|
89
|
+
const data = Buffer.from(this.params.raw_tx, 'hex');
|
|
90
|
+
this.params = {
|
|
91
|
+
address_n: this.params.address_n,
|
|
92
|
+
coin_type: this.params.coin_type,
|
|
93
|
+
raw_tx: '',
|
|
94
|
+
data_initial_chunk: bytesToHex(new Uint8Array(data.buffer).subarray(0, this.chunkByteSize)),
|
|
95
|
+
data_length: data.length,
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const res = await typedCall('BenfenSignTx', ['BenfenSignedTx', 'BenfenTxRequest'], {
|
|
99
|
+
...this.params,
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
return this.processTxRequest(typedCall, res, data, offset);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { bytesToHex, hexToBytes } from '@noble/hashes/utils';
|
|
2
|
+
import { blake2b } from '@noble/hashes/blake2b';
|
|
3
|
+
import { sha256 } from '@noble/hashes/sha256';
|
|
4
|
+
|
|
5
|
+
export const BENFEN_ADDRESS_LENGTH = 32;
|
|
6
|
+
export const PUBLIC_KEY_SIZE = 32;
|
|
7
|
+
|
|
8
|
+
export const SIGNATURE_SCHEME_TO_FLAG = {
|
|
9
|
+
ED25519: 0x00,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export function normalizeBenfenAddress(value: string, forceAdd0x = false): string {
|
|
13
|
+
let address = value.toLowerCase();
|
|
14
|
+
if (!forceAdd0x && address.startsWith('0x')) {
|
|
15
|
+
address = address.slice(2);
|
|
16
|
+
}
|
|
17
|
+
return `0x${address.padStart(BENFEN_ADDRESS_LENGTH * 2, '0')}`.toLowerCase();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export function publicKeyToAddress(publicKey: string) {
|
|
21
|
+
const tmp = new Uint8Array(PUBLIC_KEY_SIZE + 1);
|
|
22
|
+
tmp.set([SIGNATURE_SCHEME_TO_FLAG.ED25519]);
|
|
23
|
+
tmp.set(hexToBytes(publicKey), 1);
|
|
24
|
+
|
|
25
|
+
return normalizeBenfenAddress(
|
|
26
|
+
bytesToHex(blake2b(tmp, { dkLen: 32 })).slice(0, BENFEN_ADDRESS_LENGTH * 2)
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 将十六进制地址转换为 BFC 格式地址
|
|
32
|
+
* @param hexAddress - 输入的十六进制地址(可以带有0x前缀)
|
|
33
|
+
* @returns BFC格式的地址,格式为:BFC + 64位地址 + 4位校验和
|
|
34
|
+
* @throws {Error} 当输入地址格式无效时
|
|
35
|
+
*/
|
|
36
|
+
export function hex2BfcAddress(hexAddress: string): string {
|
|
37
|
+
// 如果已经是BFC格式,直接返回
|
|
38
|
+
if (/^BFC/i.test(hexAddress)) {
|
|
39
|
+
return hexAddress;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// 移除0x前缀,补齐64位,转小写
|
|
43
|
+
const hex = hexAddress.replace(/^0x/, '').padStart(64, '0').toLowerCase();
|
|
44
|
+
|
|
45
|
+
// 使用SHA-256计算校验和
|
|
46
|
+
const hash = sha256(new TextEncoder().encode(hex));
|
|
47
|
+
const checksumHex = bytesToHex(hash).slice(0, 4);
|
|
48
|
+
|
|
49
|
+
// 返回BFC格式地址
|
|
50
|
+
return `BFC${hex}${checksumHex}`;
|
|
51
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { GetAddress } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
import { getScriptType, serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
|
+
import { BaseMethod } from '../BaseMethod';
|
|
5
|
+
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
+
import { BTCAddress, BTCGetAddressParams } from '../../types/api/btcGetAddress';
|
|
7
|
+
import { getCoinInfo } from './helpers/btcParamsUtils';
|
|
8
|
+
import { getBitcoinForkVersionRange } from './helpers/versionLimit';
|
|
9
|
+
|
|
10
|
+
export default class BTCGetAddress extends BaseMethod<GetAddress[]> {
|
|
11
|
+
hasBundle = false;
|
|
12
|
+
|
|
13
|
+
init() {
|
|
14
|
+
this.checkDeviceId = true;
|
|
15
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
16
|
+
|
|
17
|
+
this.hasBundle = Object.prototype.hasOwnProperty.call(this.payload, 'bundle');
|
|
18
|
+
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
19
|
+
|
|
20
|
+
validateParams(payload, [{ name: 'bundle', type: 'array' }]);
|
|
21
|
+
|
|
22
|
+
this.params = [];
|
|
23
|
+
payload.bundle.forEach((batch: BTCGetAddressParams) => {
|
|
24
|
+
const addressN = validatePath(batch.path, 1);
|
|
25
|
+
|
|
26
|
+
validateParams(batch, [
|
|
27
|
+
{ name: 'path', required: true },
|
|
28
|
+
{ name: 'coin', type: 'string' },
|
|
29
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
30
|
+
{ name: 'multisig', type: 'object' },
|
|
31
|
+
{ name: 'scriptType', type: 'string' },
|
|
32
|
+
]);
|
|
33
|
+
|
|
34
|
+
const showOnOneKey = batch.showOnOneKey ?? true;
|
|
35
|
+
|
|
36
|
+
const { multisig, coin } = batch;
|
|
37
|
+
|
|
38
|
+
let { scriptType } = batch;
|
|
39
|
+
if (!scriptType) {
|
|
40
|
+
scriptType = getScriptType(addressN);
|
|
41
|
+
if (scriptType === 'SPENDMULTISIG' && !multisig) {
|
|
42
|
+
scriptType = 'SPENDADDRESS';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const coinName = getCoinInfo(addressN, coin).name;
|
|
47
|
+
|
|
48
|
+
this.params.push({
|
|
49
|
+
address_n: addressN,
|
|
50
|
+
show_display: showOnOneKey,
|
|
51
|
+
coin_name: coinName,
|
|
52
|
+
multisig,
|
|
53
|
+
script_type: scriptType || 'SPENDADDRESS',
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
getVersionRange() {
|
|
59
|
+
return getBitcoinForkVersionRange(this.params.map(param => param.coin_name));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
async run() {
|
|
63
|
+
const responses: BTCAddress[] = [];
|
|
64
|
+
|
|
65
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
66
|
+
const param = this.params[i];
|
|
67
|
+
|
|
68
|
+
const res = await this.device.commands.typedCall('GetAddress', 'Address', {
|
|
69
|
+
...param,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const path = serializedPath(param.address_n);
|
|
73
|
+
responses.push({
|
|
74
|
+
path,
|
|
75
|
+
...res.message,
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
this.postPreviousAddressMessage({
|
|
79
|
+
address: res.message.address,
|
|
80
|
+
path,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
validateResult(responses, ['address'], {
|
|
85
|
+
expectedLength: this.params.length,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
return Promise.resolve(this.hasBundle ? responses : responses[0]);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import type { GetPublicKey } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { HardwareError, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
3
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
4
|
+
import { getScriptType, isTaprootPath, serializedPath, validatePath } from '../helpers/pathUtils';
|
|
5
|
+
import { BaseMethod } from '../BaseMethod';
|
|
6
|
+
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
7
|
+
import { BTCGetAddressParams } from '../../types/api/btcGetAddress';
|
|
8
|
+
import { getCoinInfo } from './helpers/btcParamsUtils';
|
|
9
|
+
import { BTCPublicKey } from '../../types/api/btcGetPublicKey';
|
|
10
|
+
import { getBitcoinForkVersionRange } from './helpers/versionLimit';
|
|
11
|
+
import { batchGetPublickeys } from '../helpers/batchGetPublickeys';
|
|
12
|
+
import { createExtendedPublicKey, getVersionBytes } from './helpers/xpubUtils';
|
|
13
|
+
|
|
14
|
+
export default class BTCGetPublicKey extends BaseMethod<GetPublicKey[]> {
|
|
15
|
+
hasBundle = false;
|
|
16
|
+
|
|
17
|
+
init() {
|
|
18
|
+
this.checkDeviceId = true;
|
|
19
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
20
|
+
|
|
21
|
+
this.hasBundle = Object.prototype.hasOwnProperty.call(this.payload, 'bundle');
|
|
22
|
+
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
23
|
+
|
|
24
|
+
validateParams(payload, [{ name: 'bundle', type: 'array' }]);
|
|
25
|
+
|
|
26
|
+
this.params = [];
|
|
27
|
+
|
|
28
|
+
payload.bundle.forEach((batch: BTCGetAddressParams) => {
|
|
29
|
+
const addressN = validatePath(batch.path, 1);
|
|
30
|
+
|
|
31
|
+
validateParams(batch, [
|
|
32
|
+
{ name: 'path', required: true },
|
|
33
|
+
{ name: 'coin', type: 'string' },
|
|
34
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
35
|
+
{ name: 'scriptType', type: 'string' },
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
const showOnOneKey = batch.showOnOneKey ?? true;
|
|
39
|
+
|
|
40
|
+
const { multisig, coin } = batch;
|
|
41
|
+
|
|
42
|
+
let { scriptType } = batch;
|
|
43
|
+
if (!scriptType) {
|
|
44
|
+
scriptType = getScriptType(addressN);
|
|
45
|
+
if (scriptType === 'SPENDMULTISIG' && !multisig) {
|
|
46
|
+
scriptType = 'SPENDADDRESS';
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const coinName = getCoinInfo(addressN, coin).name;
|
|
51
|
+
|
|
52
|
+
this.params.push({
|
|
53
|
+
address_n: addressN,
|
|
54
|
+
show_display: showOnOneKey,
|
|
55
|
+
coin_name: coinName,
|
|
56
|
+
script_type: scriptType || 'SPENDADDRESS',
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
private isBtcNetwork(param: GetPublicKey) {
|
|
62
|
+
return param.coin_name === 'Testnet' || param.coin_name === 'Bitcoin';
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
getVersionRange() {
|
|
66
|
+
return getBitcoinForkVersionRange(this.params.map(param => param.coin_name));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
async run() {
|
|
70
|
+
let responses: BTCPublicKey[] = [];
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
const existsShowDisplay = this.params.some(param => param.show_display);
|
|
74
|
+
if (existsShowDisplay || !this.hasBundle) {
|
|
75
|
+
throw new Error('Goto getPublickey');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
for (const param of this.params) {
|
|
79
|
+
const versionBytes = getVersionBytes(param.coin_name, param.script_type);
|
|
80
|
+
if (!versionBytes) {
|
|
81
|
+
throw new Error(
|
|
82
|
+
`Invalid coinName, not support generate xpub for scriptType: ${param.script_type}`
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const res = await batchGetPublickeys(this.device, this.params, 'secp256k1', 0, {
|
|
88
|
+
includeNode: true,
|
|
89
|
+
ignoreCoinType: true,
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
if (!res?.hd_nodes || this.params.length !== res.hd_nodes.length) {
|
|
93
|
+
throw new Error('Invalid response from Publickeys');
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
97
|
+
const param = this.params[i];
|
|
98
|
+
const node = res.hd_nodes[i];
|
|
99
|
+
|
|
100
|
+
const path = serializedPath(param.address_n);
|
|
101
|
+
|
|
102
|
+
const xpub = createExtendedPublicKey(node, param.coin_name, param.script_type);
|
|
103
|
+
|
|
104
|
+
const rootFingerprint = res.root_fingerprint;
|
|
105
|
+
|
|
106
|
+
let xpubSegwit = xpub;
|
|
107
|
+
if (this.isBtcNetwork(param) && isTaprootPath(param.address_n)) {
|
|
108
|
+
// wrap regular xpub into bitcoind native descriptor
|
|
109
|
+
const fingerprint = Number(rootFingerprint || 0)
|
|
110
|
+
.toString(16)
|
|
111
|
+
.padStart(8, '0');
|
|
112
|
+
const descriptorPath = `${fingerprint}${path.substring(1)}`;
|
|
113
|
+
xpubSegwit = `tr([${descriptorPath}]${xpub}/<0;1>/*)`;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
responses.push({
|
|
117
|
+
path,
|
|
118
|
+
node,
|
|
119
|
+
xpub,
|
|
120
|
+
root_fingerprint: rootFingerprint,
|
|
121
|
+
xpubSegwit,
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
} catch (error) {
|
|
125
|
+
if (error instanceof HardwareError) {
|
|
126
|
+
const { errorCode } = error;
|
|
127
|
+
if (
|
|
128
|
+
errorCode === HardwareErrorCode.PinCancelled ||
|
|
129
|
+
errorCode === HardwareErrorCode.ActionCancelled ||
|
|
130
|
+
errorCode === HardwareErrorCode.ResponseUnexpectTypeError ||
|
|
131
|
+
errorCode === HardwareErrorCode.PinInvalid
|
|
132
|
+
) {
|
|
133
|
+
throw error;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// clear responses
|
|
138
|
+
responses = [];
|
|
139
|
+
|
|
140
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
141
|
+
const param = this.params[i];
|
|
142
|
+
|
|
143
|
+
const res = await this.device.commands.typedCall('GetPublicKey', 'PublicKey', {
|
|
144
|
+
...param,
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
const response = {
|
|
148
|
+
path: serializedPath(param.address_n),
|
|
149
|
+
...res.message,
|
|
150
|
+
xpubSegwit: res.message.xpub,
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
if (this.isBtcNetwork(param) && isTaprootPath(param.address_n)) {
|
|
154
|
+
// wrap regular xpub into bitcoind native descriptor
|
|
155
|
+
const fingerprint = Number(response.root_fingerprint || 0)
|
|
156
|
+
.toString(16)
|
|
157
|
+
.padStart(8, '0');
|
|
158
|
+
const descriptorPath = `${fingerprint}${response.path.substring(1)}`;
|
|
159
|
+
response.xpubSegwit = `tr([${descriptorPath}]${response.xpub}/<0;1>/*)`;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
responses.push(response);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
validateResult(responses, ['xpub'], {
|
|
167
|
+
expectedLength: this.params.length,
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
return Promise.resolve(this.hasBundle ? responses : responses[0]);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { SignMessage } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
import { validatePath } from '../helpers/pathUtils';
|
|
4
|
+
import { BaseMethod } from '../BaseMethod';
|
|
5
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
6
|
+
import { formatAnyHex } from '../helpers/hexUtils';
|
|
7
|
+
import { getCoinAndScriptType } from './helpers/btcParamsUtils';
|
|
8
|
+
import { getBitcoinForkVersionRange } from './helpers/versionLimit';
|
|
9
|
+
|
|
10
|
+
export default class BTCSignMessage extends BaseMethod<SignMessage> {
|
|
11
|
+
init() {
|
|
12
|
+
this.checkDeviceId = true;
|
|
13
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
14
|
+
|
|
15
|
+
validateParams(this.payload, [
|
|
16
|
+
{ name: 'path', required: true },
|
|
17
|
+
{ name: 'messageHex', type: 'hexString', required: true },
|
|
18
|
+
{ name: 'coin', type: 'string' },
|
|
19
|
+
{ name: 'noScriptType', type: 'boolean' },
|
|
20
|
+
{ name: 'dAppSignType', type: 'string' },
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
const { path, messageHex, coin, noScriptType: _noScriptType, dAppSignType } = this.payload;
|
|
24
|
+
|
|
25
|
+
let noScriptType = _noScriptType;
|
|
26
|
+
let isBip322Simple = false;
|
|
27
|
+
|
|
28
|
+
const addressN = validatePath(path);
|
|
29
|
+
|
|
30
|
+
const { coinName, scriptType } = getCoinAndScriptType(addressN, coin, false);
|
|
31
|
+
let finalScriptType: undefined | typeof scriptType = scriptType;
|
|
32
|
+
|
|
33
|
+
if (dAppSignType === 'ecdsa' || dAppSignType === 'bip322-simple') {
|
|
34
|
+
if (dAppSignType === 'ecdsa') {
|
|
35
|
+
noScriptType = true;
|
|
36
|
+
} else {
|
|
37
|
+
isBip322Simple = true;
|
|
38
|
+
noScriptType = false;
|
|
39
|
+
}
|
|
40
|
+
} else {
|
|
41
|
+
finalScriptType = scriptType;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
this.params = {
|
|
45
|
+
address_n: addressN,
|
|
46
|
+
message: formatAnyHex(messageHex),
|
|
47
|
+
coin_name: coinName,
|
|
48
|
+
script_type: finalScriptType,
|
|
49
|
+
no_script_type: noScriptType,
|
|
50
|
+
is_bip322_simple: isBip322Simple,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
getVersionRange() {
|
|
55
|
+
if (this.payload.dAppSignType) {
|
|
56
|
+
return {
|
|
57
|
+
pro: {
|
|
58
|
+
min: '4.9.3',
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return getBitcoinForkVersionRange([this.params.coin_name]);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
async run() {
|
|
66
|
+
const res = await this.device.commands.typedCall('SignMessage', 'MessageSignature', {
|
|
67
|
+
...this.params,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
return Promise.resolve(res.message);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { SignPsbt } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { HardwareErrorCode, TypedError, EDeviceType } from '@ukeyfe/hardware-shared';
|
|
3
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
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 { getDeviceType } from '../../utils';
|
|
9
|
+
|
|
10
|
+
export default class BTCSignPsbt extends BaseMethod<SignPsbt> {
|
|
11
|
+
init() {
|
|
12
|
+
this.checkDeviceId = true;
|
|
13
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
14
|
+
|
|
15
|
+
validateParams(this.payload, [
|
|
16
|
+
{ name: 'psbt', type: 'hexString', required: true },
|
|
17
|
+
{ name: 'coin', type: 'string' },
|
|
18
|
+
]);
|
|
19
|
+
|
|
20
|
+
const { psbt, coin } = this.payload;
|
|
21
|
+
|
|
22
|
+
const coinInfo = getCoinInfo(undefined, coin);
|
|
23
|
+
|
|
24
|
+
this.params = {
|
|
25
|
+
psbt: formatAnyHex(psbt),
|
|
26
|
+
coin_name: coinInfo.name,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
getVersionRange() {
|
|
31
|
+
return {
|
|
32
|
+
pro: {
|
|
33
|
+
min: '4.9.3',
|
|
34
|
+
},
|
|
35
|
+
model_classic1s: {
|
|
36
|
+
min: '3.10.1',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async run() {
|
|
42
|
+
try {
|
|
43
|
+
const res = await this.device.commands.typedCall('SignPsbt', 'SignedPsbt', {
|
|
44
|
+
...this.params,
|
|
45
|
+
});
|
|
46
|
+
return res.message;
|
|
47
|
+
} catch (error) {
|
|
48
|
+
const { message } = error;
|
|
49
|
+
|
|
50
|
+
const deviceType = getDeviceType(this.device.features);
|
|
51
|
+
if (
|
|
52
|
+
message.includes('PSBT parse failed') &&
|
|
53
|
+
(deviceType === EDeviceType.Classic1s || deviceType === EDeviceType.ClassicPure)
|
|
54
|
+
) {
|
|
55
|
+
throw TypedError(HardwareErrorCode.BTCPsbtTooManyUtxos, 'PSBT too many utxos', {
|
|
56
|
+
count: 5,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { TxInputType, TxOutputType } from '@ukeyfe/hardware-transport';
|
|
2
|
+
|
|
3
|
+
import { ERRORS, HardwareErrorCode } from '@ukeyfe/hardware-shared';
|
|
4
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
5
|
+
import { getOutputScriptType, isSegwitPath, validatePath } from '../helpers/pathUtils';
|
|
6
|
+
import { BaseMethod } from '../BaseMethod';
|
|
7
|
+
import { validateParams } from '../helpers/paramsValidator';
|
|
8
|
+
import {
|
|
9
|
+
AccountAddresses,
|
|
10
|
+
BTCSignTransactionParams,
|
|
11
|
+
RefTransaction,
|
|
12
|
+
TransactionOptions,
|
|
13
|
+
} from '../../types/api/btcSignTransaction';
|
|
14
|
+
import signtx from './helpers/signtx';
|
|
15
|
+
import signtxLegacy from './helpers/signtxLegacy';
|
|
16
|
+
import { getCoinInfo } from './helpers/btcParamsUtils';
|
|
17
|
+
import { getBitcoinForkVersionRange } from './helpers/versionLimit';
|
|
18
|
+
|
|
19
|
+
type Params = {
|
|
20
|
+
inputs: TxInputType[];
|
|
21
|
+
outputs: TxOutputType[];
|
|
22
|
+
refTxs: RefTransaction[];
|
|
23
|
+
addresses?: AccountAddresses;
|
|
24
|
+
options: TransactionOptions;
|
|
25
|
+
coinName: string;
|
|
26
|
+
};
|
|
27
|
+
export default class BTCSignTransaction extends BaseMethod<Params> {
|
|
28
|
+
init() {
|
|
29
|
+
this.checkDeviceId = true;
|
|
30
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
31
|
+
|
|
32
|
+
validateParams(this.payload, [
|
|
33
|
+
{ name: 'coin', type: 'string', required: true },
|
|
34
|
+
{ name: 'inputs', type: 'array', required: true },
|
|
35
|
+
{ name: 'outputs', type: 'array', required: true },
|
|
36
|
+
{ name: 'refTxs', type: 'array', required: true, allowEmpty: true },
|
|
37
|
+
{ name: 'locktime', type: 'number' },
|
|
38
|
+
{ name: 'version', type: 'number' },
|
|
39
|
+
{ name: 'expiry', type: 'number' },
|
|
40
|
+
{ name: 'overwintered', type: 'boolean' },
|
|
41
|
+
{ name: 'versionGroupId', type: 'number' },
|
|
42
|
+
{ name: 'branchId', type: 'number' },
|
|
43
|
+
{ name: 'timestamp', type: 'number' },
|
|
44
|
+
]);
|
|
45
|
+
|
|
46
|
+
this.payload.refTxs.forEach((tx: RefTransaction) => {
|
|
47
|
+
validateParams(tx, [
|
|
48
|
+
{ name: 'hash', type: 'hexString', required: true },
|
|
49
|
+
{ name: 'inputs', type: 'array', required: true },
|
|
50
|
+
{ name: 'bin_outputs', type: 'array', required: !Array.isArray(tx.outputs) },
|
|
51
|
+
{ name: 'outputs', type: 'array' },
|
|
52
|
+
{ name: 'version', type: 'number', required: true },
|
|
53
|
+
{ name: 'lock_time', type: 'number', required: true },
|
|
54
|
+
{ name: 'extra_data', type: 'string' },
|
|
55
|
+
{ name: 'timestamp', type: 'number' },
|
|
56
|
+
{ name: 'version_group_id', type: 'number' },
|
|
57
|
+
]);
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
this.payload.inputs.forEach((input: any) => {
|
|
61
|
+
validatePath(input.address_n);
|
|
62
|
+
const useAmount = isSegwitPath(input.address_n);
|
|
63
|
+
validateParams(input, [
|
|
64
|
+
{ name: 'prev_hash', type: 'hexString', required: true },
|
|
65
|
+
{ name: 'prev_index', type: 'number', required: true },
|
|
66
|
+
{ name: 'script_type', type: 'string' },
|
|
67
|
+
{ name: 'amount', type: 'string', required: useAmount },
|
|
68
|
+
{ name: 'sequence', type: 'number' },
|
|
69
|
+
{ name: 'multisig', type: 'object' },
|
|
70
|
+
]);
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
this.payload.outputs.forEach((output: any) => {
|
|
74
|
+
validateParams(output, [
|
|
75
|
+
{ name: 'address_n', type: 'array' },
|
|
76
|
+
{ name: 'address', type: 'string' },
|
|
77
|
+
{ name: 'amount', type: 'string' },
|
|
78
|
+
{ name: 'op_return_data', type: 'string' },
|
|
79
|
+
{ name: 'multisig', type: 'object' },
|
|
80
|
+
]);
|
|
81
|
+
|
|
82
|
+
if (
|
|
83
|
+
Object.prototype.hasOwnProperty.call(output, 'address_n') &&
|
|
84
|
+
Object.prototype.hasOwnProperty.call(output, 'address')
|
|
85
|
+
) {
|
|
86
|
+
throw ERRORS.TypedError(
|
|
87
|
+
HardwareErrorCode.CallMethodInvalidParameter,
|
|
88
|
+
'Cannot use address and address_n in one output'
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (output.address_n) {
|
|
93
|
+
const scriptType = getOutputScriptType(output.address_n);
|
|
94
|
+
if (output.script_type !== scriptType)
|
|
95
|
+
throw ERRORS.TypedError(
|
|
96
|
+
HardwareErrorCode.CallMethodInvalidParameter,
|
|
97
|
+
`Output change script_type should be set to ${scriptType}`
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
const { inputs, outputs, refTxs, account, coin } = this.payload as BTCSignTransactionParams;
|
|
103
|
+
|
|
104
|
+
const coinName = getCoinInfo(undefined, coin).name;
|
|
105
|
+
|
|
106
|
+
this.params = {
|
|
107
|
+
inputs,
|
|
108
|
+
outputs,
|
|
109
|
+
refTxs,
|
|
110
|
+
addresses: account ? account.addresses : undefined,
|
|
111
|
+
options: {
|
|
112
|
+
lock_time: this.payload.locktime,
|
|
113
|
+
timestamp: this.payload.timestamp,
|
|
114
|
+
version: this.payload.version,
|
|
115
|
+
expiry: this.payload.expiry,
|
|
116
|
+
overwintered: this.payload.overwintered,
|
|
117
|
+
version_group_id: this.payload.versionGroupId,
|
|
118
|
+
branch_id: this.payload.branchId,
|
|
119
|
+
},
|
|
120
|
+
coinName,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
getVersionRange() {
|
|
125
|
+
return getBitcoinForkVersionRange([this.params.coinName]);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
async run() {
|
|
129
|
+
const { device, params } = this;
|
|
130
|
+
|
|
131
|
+
const useLegacySignProcess = device.unavailableCapabilities.replaceTransaction;
|
|
132
|
+
|
|
133
|
+
const { refTxs } = params;
|
|
134
|
+
|
|
135
|
+
const signTxMethod = !useLegacySignProcess ? signtx : signtxLegacy;
|
|
136
|
+
const response = await signTxMethod(
|
|
137
|
+
device.commands.typedCall.bind(device.commands),
|
|
138
|
+
params.inputs,
|
|
139
|
+
params.outputs,
|
|
140
|
+
refTxs,
|
|
141
|
+
params.options,
|
|
142
|
+
params.coinName
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
return response;
|
|
146
|
+
}
|
|
147
|
+
}
|