@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
package/src/api/index.ts
ADDED
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
export { default as testInitializeDeviceDuration } from './test/TestInitializeDeviceDuration';
|
|
2
|
+
|
|
3
|
+
export { default as searchDevices } from './SearchDevices';
|
|
4
|
+
export { default as getFeatures } from './GetFeatures';
|
|
5
|
+
export { default as getUkeyFeatures } from './GetUkeyFeatures';
|
|
6
|
+
export { default as getPassphraseState } from './GetPassphraseState';
|
|
7
|
+
export { default as getLogs } from './GetLogs';
|
|
8
|
+
export { default as checkFirmwareRelease } from './CheckFirmwareRelease';
|
|
9
|
+
export { default as checkBLEFirmwareRelease } from './CheckBLEFirmwareRelease';
|
|
10
|
+
export { default as checkBridgeStatus } from './CheckBridgeStatus';
|
|
11
|
+
export { default as checkBridgeRelease } from './CheckBridgeRelease';
|
|
12
|
+
export { default as checkBootloaderRelease } from './CheckBootloaderRelease';
|
|
13
|
+
export { default as checkAllFirmwareRelease } from './CheckAllFirmwareRelease';
|
|
14
|
+
export { default as deviceBackup } from './device/DeviceBackup';
|
|
15
|
+
export { default as deviceChangePin } from './device/DeviceChangePin';
|
|
16
|
+
export { default as deviceFlags } from './device/DeviceFlags';
|
|
17
|
+
export { default as deviceRebootToBootloader } from './device/DeviceRebootToBootloader';
|
|
18
|
+
export { default as deviceRebootToBoardloader } from './device/DeviceRebootToBoardloader';
|
|
19
|
+
export { default as deviceRecovery } from './device/DeviceRecovery';
|
|
20
|
+
export { default as deviceReset } from './device/DeviceReset';
|
|
21
|
+
export { default as deviceSettings } from './device/DeviceSettings';
|
|
22
|
+
export { default as deviceUpdateReboot } from './device/DeviceUpdateReboot';
|
|
23
|
+
export { default as deviceUploadResource } from './device/DeviceUploadResource';
|
|
24
|
+
export { default as deviceSupportFeatures } from './device/DeviceSupportFeatures';
|
|
25
|
+
export { default as deviceVerify } from './device/DeviceVerify';
|
|
26
|
+
export { default as deviceWipe } from './device/DeviceWipe';
|
|
27
|
+
export { default as deviceFullyUploadResource } from './device/DeviceFullyUploadResource';
|
|
28
|
+
export { default as deviceUpdateBootloader } from './device/DeviceUpdateBootloader';
|
|
29
|
+
export { default as deviceLock } from './device/DeviceLock';
|
|
30
|
+
export { default as deviceUnlock } from './device/DeviceUnlock';
|
|
31
|
+
export { default as deviceCancel } from './device/DeviceCancel';
|
|
32
|
+
|
|
33
|
+
export { default as setU2FCounter } from './u2f/SetU2FCounter';
|
|
34
|
+
export { default as getNextU2FCounter } from './u2f/GetNextU2FCounter';
|
|
35
|
+
|
|
36
|
+
export { default as firmwareUpdate } from './FirmwareUpdate';
|
|
37
|
+
export { default as firmwareUpdateV2 } from './FirmwareUpdateV2';
|
|
38
|
+
export { default as firmwareUpdateV3 } from './FirmwareUpdateV3';
|
|
39
|
+
export { default as promptWebDeviceAccess } from './PromptWebDeviceAccess';
|
|
40
|
+
export { default as emmcFileWrite } from './EmmcFileWrite';
|
|
41
|
+
|
|
42
|
+
export { default as cipherKeyValue } from './CipherKeyValue';
|
|
43
|
+
|
|
44
|
+
export { default as allNetworkGetAddress } from './allnetwork/AllNetworkGetAddress';
|
|
45
|
+
export { default as allNetworkGetAddressByLoop } from './allnetwork/AllNetworkGetAddressByLoop';
|
|
46
|
+
|
|
47
|
+
export { default as btcGetAddress } from './btc/BTCGetAddress';
|
|
48
|
+
export { default as btcGetPublicKey } from './btc/BTCGetPublicKey';
|
|
49
|
+
export { default as btcSignMessage } from './btc/BTCSignMessage';
|
|
50
|
+
export { default as btcSignPsbt } from './btc/BTCSignPsbt';
|
|
51
|
+
export { default as btcSignTransaction } from './btc/BTCSignTransaction';
|
|
52
|
+
export { default as btcVerifyMessage } from './btc/BTCVerifyMessage';
|
|
53
|
+
|
|
54
|
+
export { default as confluxGetAddress } from './conflux/ConfluxGetAddress';
|
|
55
|
+
export { default as confluxSignMessage } from './conflux/ConfluxSignMessage';
|
|
56
|
+
export { default as confluxSignMessageCIP23 } from './conflux/ConfluxSignMessageCIP23';
|
|
57
|
+
export { default as confluxSignTransaction } from './conflux/ConfluxSignTransaction';
|
|
58
|
+
|
|
59
|
+
export { default as evmGetAddress } from './evm/EVMGetAddress';
|
|
60
|
+
export { default as evmGetPublicKey } from './evm/EVMGetPublicKey';
|
|
61
|
+
export { default as evmSignMessage } from './evm/EVMSignMessage';
|
|
62
|
+
export { default as evmSignMessageEIP712 } from './evm/EVMSignMessageEIP712';
|
|
63
|
+
export { default as evmSignTransaction } from './evm/EVMSignTransaction';
|
|
64
|
+
export { default as evmSignTypedData } from './evm/EVMSignTypedData';
|
|
65
|
+
export { default as evmVerifyMessage } from './evm/EVMVerifyMessage';
|
|
66
|
+
|
|
67
|
+
export { default as starcoinGetAddress } from './starcoin/StarcoinGetAddress';
|
|
68
|
+
export { default as starcoinGetPublicKey } from './starcoin/StarcoinGetPublicKey';
|
|
69
|
+
export { default as starcoinSignMessage } from './starcoin/StarcoinSignMessage';
|
|
70
|
+
export { default as starcoinSignTransaction } from './starcoin/StarcoinSignTransaction';
|
|
71
|
+
export { default as starcoinVerifyMessage } from './starcoin/StarcoinVerifyMessage';
|
|
72
|
+
|
|
73
|
+
export { default as nemGetAddress } from './nem/NEMGetAddress';
|
|
74
|
+
export { default as nemSignTransaction } from './nem/NEMSignTransaction';
|
|
75
|
+
|
|
76
|
+
export { default as solGetAddress } from './solana/SolGetAddress';
|
|
77
|
+
export { default as solSignTransaction } from './solana/SolSignTransaction';
|
|
78
|
+
export { default as solSignOffchainMessage } from './solana/SolSignOffchainMessage';
|
|
79
|
+
export { default as solSignMessage } from './solana/SolSignMessage';
|
|
80
|
+
|
|
81
|
+
export { default as stellarGetAddress } from './stellar/StellarGetAddress';
|
|
82
|
+
export { default as stellarSignTransaction } from './stellar/StellarSignTransaction';
|
|
83
|
+
|
|
84
|
+
export { default as tronGetAddress } from './tron/TronGetAddress';
|
|
85
|
+
export { default as tronSignMessage } from './tron/TronSignMessage';
|
|
86
|
+
export { default as tronSignTransaction } from './tron/TronSignTransaction';
|
|
87
|
+
|
|
88
|
+
export { default as nearGetAddress } from './near/NearGetAddress';
|
|
89
|
+
export { default as nearSignTransaction } from './near/NearSignTransaction';
|
|
90
|
+
|
|
91
|
+
export { default as aptosGetAddress } from './aptos/AptosGetAddress';
|
|
92
|
+
export { default as aptosGetPublicKey } from './aptos/AptosGetPublicKey';
|
|
93
|
+
export { default as aptosSignTransaction } from './aptos/AptosSignTransaction';
|
|
94
|
+
export { default as aptosSignMessage } from './aptos/AptosSignMessage';
|
|
95
|
+
export { default as aptosSignInMessage } from './aptos/AptosSignInMessage';
|
|
96
|
+
|
|
97
|
+
export { default as algoGetAddress } from './algo/AlgoGetAddress';
|
|
98
|
+
export { default as algoSignTransaction } from './algo/AlgoSignTransaction';
|
|
99
|
+
|
|
100
|
+
export { default as cosmosGetAddress } from './cosmos/CosmosGetAddress';
|
|
101
|
+
export { default as cosmosGetPublicKey } from './cosmos/CosmosGetPublicKey';
|
|
102
|
+
export { default as cosmosSignTransaction } from './cosmos/CosmosSignTransaction';
|
|
103
|
+
|
|
104
|
+
export { default as xrpGetAddress } from './xrp/XrpGetAddress';
|
|
105
|
+
export { default as xrpSignTransaction } from './xrp/XrpSignTransaction';
|
|
106
|
+
|
|
107
|
+
export { default as suiGetAddress } from './sui/SuiGetAddress';
|
|
108
|
+
export { default as suiGetPublicKey } from './sui/SuiGetPublicKey';
|
|
109
|
+
export { default as suiSignMessage } from './sui/SuiSignMessage';
|
|
110
|
+
export { default as suiSignTransaction } from './sui/SuiSignTransaction';
|
|
111
|
+
|
|
112
|
+
export { default as cardanoGetAddress } from './cardano/CardanoGetAddress';
|
|
113
|
+
export { default as cardanoGetPublicKey } from './cardano/CardanoGetPublicKey';
|
|
114
|
+
export { default as cardanoSignTransaction } from './cardano/CardanoSignTransaction';
|
|
115
|
+
export { default as cardanoSignMessage } from './cardano/CardanoSignMessage';
|
|
116
|
+
|
|
117
|
+
export { default as filecoinGetAddress } from './filecoin/FilecoinGetAddress';
|
|
118
|
+
export { default as filecoinSignTransaction } from './filecoin/FilecoinSignTransaction';
|
|
119
|
+
|
|
120
|
+
export { default as polkadotGetAddress } from './polkadot/PolkadotGetAddress';
|
|
121
|
+
export { default as polkadotSignTransaction } from './polkadot/PolkadotSignTransaction';
|
|
122
|
+
|
|
123
|
+
export { default as kaspaGetAddress } from './kaspa/KaspaGetAddress';
|
|
124
|
+
export { default as kaspaSignTransaction } from './kaspa/KaspaSignTransaction';
|
|
125
|
+
|
|
126
|
+
export { default as nexaGetAddress } from './nexa/NexaGetAddress';
|
|
127
|
+
export { default as nexaSignTransaction } from './nexa/NexaSignTransaction';
|
|
128
|
+
|
|
129
|
+
export { default as nostrGetPublicKey } from './nostr/NostrGetPublicKey';
|
|
130
|
+
export { default as nostrSignEvent } from './nostr/NostrSignEvent';
|
|
131
|
+
export { default as nostrEncryptMessage } from './nostr/NostrEncryptMessage';
|
|
132
|
+
export { default as nostrDecryptMessage } from './nostr/NostrDecryptMessage';
|
|
133
|
+
export { default as nostrSignSchnorr } from './nostr/NostrSignSchnorr';
|
|
134
|
+
|
|
135
|
+
export { default as lnurlAuth } from './lightning/LnurlAuth';
|
|
136
|
+
|
|
137
|
+
export { default as nervosGetAddress } from './nervos/NervosGetAddress';
|
|
138
|
+
export { default as nervosSignTransaction } from './nervos/NervosSignTransaction';
|
|
139
|
+
|
|
140
|
+
export { default as dnxGetAddress } from './dynex/DnxGetAddress';
|
|
141
|
+
export { default as dnxSignTransaction } from './dynex/DnxSignTransaction';
|
|
142
|
+
|
|
143
|
+
export { default as tonGetAddress } from './ton/TonGetAddress';
|
|
144
|
+
export { default as tonSignMessage } from './ton/TonSignMessage';
|
|
145
|
+
export { default as tonSignProof } from './ton/TonSignProof';
|
|
146
|
+
|
|
147
|
+
export { default as scdoGetAddress } from './scdo/ScdoGetAddress';
|
|
148
|
+
export { default as scdoSignTransaction } from './scdo/ScdoSignTransaction';
|
|
149
|
+
export { default as scdoSignMessage } from './scdo/ScdoSignMessage';
|
|
150
|
+
|
|
151
|
+
export { default as alephiumGetAddress } from './alephium/AlephiumGetAddress';
|
|
152
|
+
export { default as alephiumSignTransaction } from './alephium/AlephiumSignTransaction';
|
|
153
|
+
export { default as alephiumSignMessage } from './alephium/AlephiumSignMessage';
|
|
154
|
+
|
|
155
|
+
export { default as benfenGetAddress } from './benfen/BenfenGetAddress';
|
|
156
|
+
export { default as benfenGetPublicKey } from './benfen/BenfenGetPublicKey';
|
|
157
|
+
export { default as benfenSignMessage } from './benfen/BenfenSignMessage';
|
|
158
|
+
export { default as benfenSignTransaction } from './benfen/BenfenSignTransaction';
|
|
159
|
+
|
|
160
|
+
export { default as neoGetAddress } from './neo/NeoGetAddress';
|
|
161
|
+
export { default as neoSignTransaction } from './neo/NeoSignTransaction';
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { KaspaGetAddress as HardwareKaspaGetAddress } from '@ukeyfe/hardware-transport';
|
|
2
|
+
import { UI_REQUEST } from '../../constants/ui-request';
|
|
3
|
+
import { serializedPath, validatePath } from '../helpers/pathUtils';
|
|
4
|
+
import { BaseMethod } from '../BaseMethod';
|
|
5
|
+
import { validateParams, validateResult } from '../helpers/paramsValidator';
|
|
6
|
+
import { KaspaGetAddressParams, KaspaAddress } from '../../types';
|
|
7
|
+
|
|
8
|
+
export default class KaspaGetAddress extends BaseMethod<HardwareKaspaGetAddress[]> {
|
|
9
|
+
hasBundle = false;
|
|
10
|
+
|
|
11
|
+
init() {
|
|
12
|
+
this.checkDeviceId = true;
|
|
13
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
14
|
+
|
|
15
|
+
this.hasBundle = !!this.payload?.bundle;
|
|
16
|
+
const payload = this.hasBundle ? this.payload : { bundle: [this.payload] };
|
|
17
|
+
|
|
18
|
+
// check payload
|
|
19
|
+
validateParams(payload, [{ name: 'bundle', type: 'array' }]);
|
|
20
|
+
|
|
21
|
+
// init params
|
|
22
|
+
this.params = [];
|
|
23
|
+
payload.bundle.forEach((batch: KaspaGetAddressParams) => {
|
|
24
|
+
const addressN = validatePath(batch.path, 3);
|
|
25
|
+
|
|
26
|
+
validateParams(batch, [
|
|
27
|
+
{ name: 'path', required: true },
|
|
28
|
+
{ name: 'showOnOneKey', type: 'boolean' },
|
|
29
|
+
{ name: 'prefix', type: 'string' },
|
|
30
|
+
{ name: 'scheme', type: 'string' },
|
|
31
|
+
{ name: 'useTweak', type: 'boolean' },
|
|
32
|
+
]);
|
|
33
|
+
|
|
34
|
+
const showOnOneKey = batch.showOnOneKey ?? true;
|
|
35
|
+
|
|
36
|
+
this.params.push({
|
|
37
|
+
address_n: addressN,
|
|
38
|
+
show_display: showOnOneKey,
|
|
39
|
+
prefix: batch.prefix,
|
|
40
|
+
scheme: batch.scheme,
|
|
41
|
+
use_tweak: batch.useTweak,
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
getVersionRange() {
|
|
47
|
+
return {
|
|
48
|
+
model_mini: {
|
|
49
|
+
min: '3.0.0',
|
|
50
|
+
},
|
|
51
|
+
model_touch: {
|
|
52
|
+
min: '4.3.0',
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
getUseTweakVersionRange() {
|
|
58
|
+
return {
|
|
59
|
+
pro: {
|
|
60
|
+
min: '4.14.0',
|
|
61
|
+
},
|
|
62
|
+
model_classic1s: {
|
|
63
|
+
min: '3.12.0',
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async run() {
|
|
69
|
+
this.checkFeatureVersionLimit(
|
|
70
|
+
// exists use_tweak is false check firmware version
|
|
71
|
+
() => this.params.some(param => param.use_tweak === false),
|
|
72
|
+
() => this.getUseTweakVersionRange(),
|
|
73
|
+
{
|
|
74
|
+
strictCheckDeviceSupport: true,
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
const responses: KaspaAddress[] = [];
|
|
79
|
+
|
|
80
|
+
for (let i = 0; i < this.params.length; i++) {
|
|
81
|
+
const param = this.params[i];
|
|
82
|
+
const res = await this.device.commands.typedCall('KaspaGetAddress', 'KaspaAddress', {
|
|
83
|
+
...param,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
const { address } = res.message;
|
|
87
|
+
|
|
88
|
+
const result = {
|
|
89
|
+
path: serializedPath(param.address_n),
|
|
90
|
+
address,
|
|
91
|
+
};
|
|
92
|
+
responses.push(result);
|
|
93
|
+
this.postPreviousAddressMessage(result);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
validateResult(responses, ['address'], {
|
|
97
|
+
expectedLength: this.params.length,
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
return Promise.resolve(this.hasBundle ? responses : responses[0]);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import { bytesToHex } from '@noble/hashes/utils';
|
|
2
|
+
import { TypedCall } from '@ukeyfe/hardware-transport';
|
|
3
|
+
import { TypedResponseMessage } from '../../device/DeviceCommands';
|
|
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 {
|
|
9
|
+
KaspaSignInputParams,
|
|
10
|
+
KaspaSignOutputParams,
|
|
11
|
+
KaspaSignTransactionParams,
|
|
12
|
+
KaspaSignature,
|
|
13
|
+
} from '../../types';
|
|
14
|
+
import { zeroSubnetworkID, serialize } from './helpers/TransferSerialize';
|
|
15
|
+
import { SignatureType } from './helpers/SignatureType';
|
|
16
|
+
|
|
17
|
+
export default class KaspaSignTransaction extends BaseMethod<KaspaSignTransactionParams> {
|
|
18
|
+
hasBundle = false;
|
|
19
|
+
|
|
20
|
+
init() {
|
|
21
|
+
this.checkDeviceId = true;
|
|
22
|
+
this.allowDeviceMode = [...this.allowDeviceMode, UI_REQUEST.NOT_INITIALIZE];
|
|
23
|
+
|
|
24
|
+
const payload = this.payload as KaspaSignTransactionParams;
|
|
25
|
+
|
|
26
|
+
// check payload
|
|
27
|
+
validateParams(payload, [
|
|
28
|
+
{ name: 'version', type: 'number' },
|
|
29
|
+
{ name: 'sigHashType', type: 'number', required: true },
|
|
30
|
+
{ name: 'inputs', type: 'array', required: true },
|
|
31
|
+
{ name: 'outputs', type: 'array', required: true },
|
|
32
|
+
{ name: 'lockTime', required: true },
|
|
33
|
+
{ name: 'sigOpCount', type: 'number' },
|
|
34
|
+
{ name: 'subNetworkID', type: 'string' },
|
|
35
|
+
{ name: 'useTweak', type: 'boolean' },
|
|
36
|
+
]);
|
|
37
|
+
|
|
38
|
+
// if(!payload.inputs.length) throw
|
|
39
|
+
|
|
40
|
+
const inputs: KaspaSignInputParams[] = payload.inputs.map(input => {
|
|
41
|
+
validateParams(input, [
|
|
42
|
+
{ name: 'path', type: 'string', required: true },
|
|
43
|
+
{ name: 'prevTxId', type: 'string', required: true },
|
|
44
|
+
{ name: 'outputIndex', type: 'number', required: true },
|
|
45
|
+
{ name: 'sequenceNumber', required: true },
|
|
46
|
+
]);
|
|
47
|
+
|
|
48
|
+
const addressN = validatePath(input.path, 3);
|
|
49
|
+
|
|
50
|
+
return {
|
|
51
|
+
...input,
|
|
52
|
+
path: addressN,
|
|
53
|
+
sigOpCount: input.sigOpCount ?? 1, // input.script.getSignatureOperationsCount()) //sigOpCount
|
|
54
|
+
};
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const outputs: KaspaSignOutputParams[] = payload.outputs.map(output => {
|
|
58
|
+
validateParams(output, [
|
|
59
|
+
{ name: 'satoshis', required: true },
|
|
60
|
+
{ name: 'script', type: 'string', required: true },
|
|
61
|
+
{ name: 'scriptVersion', type: 'number' },
|
|
62
|
+
]);
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
...output,
|
|
66
|
+
scriptVersion: output.scriptVersion ?? 0,
|
|
67
|
+
};
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
this.params = {
|
|
71
|
+
...payload,
|
|
72
|
+
inputs,
|
|
73
|
+
outputs,
|
|
74
|
+
scheme: payload.scheme ?? 'schnorr',
|
|
75
|
+
prefix: payload.prefix ?? 'kaspa',
|
|
76
|
+
// eslint-disable-next-line no-bitwise
|
|
77
|
+
sigHashType: payload.sigHashType ?? SignatureType.SIGHASH_ALL | SignatureType.SIGHASH_FORKID,
|
|
78
|
+
sigOpCount: payload.sigOpCount ?? 1,
|
|
79
|
+
subNetworkID: payload.subNetworkID ?? bytesToHex(zeroSubnetworkID()),
|
|
80
|
+
useTweak: payload.useTweak,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
getVersionRange() {
|
|
85
|
+
return {
|
|
86
|
+
model_mini: {
|
|
87
|
+
min: '3.0.0',
|
|
88
|
+
},
|
|
89
|
+
model_touch: {
|
|
90
|
+
min: '4.3.0',
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
getUseTweakVersionRange() {
|
|
96
|
+
return {
|
|
97
|
+
pro: {
|
|
98
|
+
min: '4.14.0',
|
|
99
|
+
},
|
|
100
|
+
model_classic1s: {
|
|
101
|
+
min: '3.12.0',
|
|
102
|
+
},
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async processTxRequest(
|
|
107
|
+
typedCall: TypedCall,
|
|
108
|
+
res: TypedResponseMessage<'KaspaTxInputRequest'> | TypedResponseMessage<'KaspaSignedTx'>,
|
|
109
|
+
index: number,
|
|
110
|
+
signature: KaspaSignature[]
|
|
111
|
+
): Promise<KaspaSignature[]> {
|
|
112
|
+
if (res.type === 'KaspaSignedTx') {
|
|
113
|
+
signature.push({
|
|
114
|
+
index,
|
|
115
|
+
signature: res.message.signature,
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
return signature;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if (res.type === 'KaspaTxInputRequest') {
|
|
122
|
+
signature.push({
|
|
123
|
+
index,
|
|
124
|
+
signature: res.message.signature ?? '',
|
|
125
|
+
});
|
|
126
|
+
|
|
127
|
+
const nextIndex = res.message.request_index;
|
|
128
|
+
|
|
129
|
+
const { raw: rawMessage } = serialize(this.params, nextIndex);
|
|
130
|
+
const input = this.params.inputs[nextIndex];
|
|
131
|
+
|
|
132
|
+
const response = await typedCall(
|
|
133
|
+
'KaspaTxInputAck',
|
|
134
|
+
// @ts-expect-error
|
|
135
|
+
['KaspaTxInputRequest', 'KaspaSignedTx'],
|
|
136
|
+
{
|
|
137
|
+
address_n: input.path,
|
|
138
|
+
raw_message: bytesToHex(rawMessage),
|
|
139
|
+
}
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
// @ts-expect-error
|
|
143
|
+
return this.processTxRequest(typedCall, response, nextIndex, signature);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return signature;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
async run() {
|
|
150
|
+
this.checkFeatureVersionLimit(
|
|
151
|
+
// exists use_tweak is false check firmware version
|
|
152
|
+
() => this.params.useTweak === false,
|
|
153
|
+
() => this.getUseTweakVersionRange(),
|
|
154
|
+
{
|
|
155
|
+
strictCheckDeviceSupport: true,
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
|
|
159
|
+
const { raw: rawMessage } = serialize(this.params, 0);
|
|
160
|
+
const input = this.params.inputs[0];
|
|
161
|
+
|
|
162
|
+
const { device, params } = this;
|
|
163
|
+
|
|
164
|
+
// @ts-expect-error
|
|
165
|
+
const response = await device.commands.typedCall(
|
|
166
|
+
'KaspaSignTx',
|
|
167
|
+
['KaspaTxInputRequest', 'KaspaSignedTx'],
|
|
168
|
+
{
|
|
169
|
+
address_n: input.path,
|
|
170
|
+
raw_message: bytesToHex(rawMessage),
|
|
171
|
+
scheme: params.scheme,
|
|
172
|
+
prefix: params.prefix,
|
|
173
|
+
input_count: params.inputs.length,
|
|
174
|
+
use_tweak: params.useTweak,
|
|
175
|
+
}
|
|
176
|
+
);
|
|
177
|
+
|
|
178
|
+
return this.processTxRequest(device.commands.typedCall.bind(device.commands), response, 0, []);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { Buffer } from 'buffer';
|
|
3
|
+
|
|
4
|
+
function isBuffer(arg: any) {
|
|
5
|
+
return Buffer.isBuffer(arg) || arg instanceof Uint8Array;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function bigNumberToBuffer(bn: BigNumber, options: { size: number }): Buffer {
|
|
9
|
+
const hex = bn.toString(16);
|
|
10
|
+
const paddedHex = hex.padStart(options.size * 2, '0');
|
|
11
|
+
return Buffer.from(paddedHex, 'hex');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class BufferWriter {
|
|
15
|
+
bufLen: number;
|
|
16
|
+
|
|
17
|
+
// @ts-expect-error
|
|
18
|
+
bufs: Buffer[];
|
|
19
|
+
|
|
20
|
+
constructor(obj?: Partial<BufferWriter>) {
|
|
21
|
+
this.bufLen = 0;
|
|
22
|
+
if (obj) {
|
|
23
|
+
this.set(obj);
|
|
24
|
+
} else {
|
|
25
|
+
this.bufs = [];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public set(obj: Partial<BufferWriter>): this {
|
|
30
|
+
this.bufs = obj.bufs || this.bufs || [];
|
|
31
|
+
this.bufLen = this.bufs.reduce((prev, buf) => prev + buf.length, 0);
|
|
32
|
+
return this;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public toBuffer(): Buffer {
|
|
36
|
+
return this.concat();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public concat(): Buffer {
|
|
40
|
+
return Buffer.concat(this.bufs, this.bufLen);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public write(buf: Buffer): this {
|
|
44
|
+
if (!isBuffer(buf)) throw new Error('BufferWriter.write: Invalid type');
|
|
45
|
+
this.bufs.push(buf);
|
|
46
|
+
this.bufLen += buf.length;
|
|
47
|
+
return this;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public writeReverse(buf: Buffer): this {
|
|
51
|
+
if (!isBuffer(buf)) throw new Error('BufferWriter.write: Invalid type');
|
|
52
|
+
this.bufs.push(buf.reverse());
|
|
53
|
+
this.bufLen += buf.length;
|
|
54
|
+
return this;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
public writeVarBytes(buf: Buffer): this {
|
|
58
|
+
if (!isBuffer(buf)) throw new Error('BufferWriter.write: Invalid type');
|
|
59
|
+
this.writeUInt64LE(new BigNumber(buf.length));
|
|
60
|
+
this.write(buf);
|
|
61
|
+
return this;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
public writeUInt8(n: number): this {
|
|
65
|
+
const buf = Buffer.alloc(1);
|
|
66
|
+
buf.writeUInt8(n, 0);
|
|
67
|
+
this.write(buf);
|
|
68
|
+
return this;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public writeUInt16BE(n: number): this {
|
|
72
|
+
const buf = Buffer.alloc(2);
|
|
73
|
+
buf.writeUInt16BE(n, 0);
|
|
74
|
+
this.write(buf);
|
|
75
|
+
return this;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
public writeUInt16LE(n: number): this {
|
|
79
|
+
const buf = Buffer.alloc(2);
|
|
80
|
+
buf.writeUInt16LE(n, 0);
|
|
81
|
+
this.write(buf);
|
|
82
|
+
return this;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
public writeUInt32BE(n: number): this {
|
|
86
|
+
const buf = Buffer.alloc(4);
|
|
87
|
+
buf.writeUInt32BE(n, 0);
|
|
88
|
+
this.write(buf);
|
|
89
|
+
return this;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
public writeInt32LE(n: number): this {
|
|
93
|
+
const buf = Buffer.alloc(4);
|
|
94
|
+
buf.writeInt32LE(n, 0);
|
|
95
|
+
this.write(buf);
|
|
96
|
+
return this;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public writeUInt32LE(n: number): this {
|
|
100
|
+
const buf = Buffer.alloc(4);
|
|
101
|
+
buf.writeUInt32LE(n, 0);
|
|
102
|
+
this.write(buf);
|
|
103
|
+
return this;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
public writeUInt64BEBN(bn: BigNumber): this {
|
|
107
|
+
const buf = bigNumberToBuffer(bn, { size: 8 });
|
|
108
|
+
this.write(buf);
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
public writeUInt64LE(bn: BigNumber): this {
|
|
113
|
+
const buf = bigNumberToBuffer(bn, { size: 8 });
|
|
114
|
+
this.writeReverse(buf);
|
|
115
|
+
return this;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
public writeVarintNum(n: number): this {
|
|
119
|
+
const buf = BufferWriter.varintBufNum(n);
|
|
120
|
+
this.write(buf);
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
public writeVarintBN(bn: BigNumber): this {
|
|
125
|
+
const buf = BufferWriter.varintBufBN(bn);
|
|
126
|
+
this.write(buf);
|
|
127
|
+
return this;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
public static varintBufNum(n: number): Buffer {
|
|
131
|
+
let buf: Buffer;
|
|
132
|
+
if (n < 253) {
|
|
133
|
+
buf = Buffer.alloc(1);
|
|
134
|
+
buf.writeUInt8(n, 0);
|
|
135
|
+
} else if (n < 0x10000) {
|
|
136
|
+
buf = Buffer.alloc(1 + 2);
|
|
137
|
+
buf.writeUInt8(253, 0);
|
|
138
|
+
buf.writeUInt16LE(n, 1);
|
|
139
|
+
} else if (n < 0x100000000) {
|
|
140
|
+
buf = Buffer.alloc(1 + 4);
|
|
141
|
+
buf.writeUInt8(254, 0);
|
|
142
|
+
buf.writeUInt32LE(n, 1);
|
|
143
|
+
} else {
|
|
144
|
+
buf = Buffer.alloc(1 + 8);
|
|
145
|
+
buf.writeUInt8(255, 0);
|
|
146
|
+
// eslint-disable-next-line no-bitwise
|
|
147
|
+
buf.writeInt32LE(n & -1, 1);
|
|
148
|
+
buf.writeUInt32LE(Math.floor(n / 0x100000000), 5);
|
|
149
|
+
}
|
|
150
|
+
return buf;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
public static varintBufBN(bn: BigNumber): Buffer {
|
|
154
|
+
let buf: Buffer;
|
|
155
|
+
const n = bn.toNumber();
|
|
156
|
+
if (n < 253) {
|
|
157
|
+
buf = Buffer.alloc(1);
|
|
158
|
+
buf.writeUInt8(n, 0);
|
|
159
|
+
} else if (n < 0x10000) {
|
|
160
|
+
buf = Buffer.alloc(1 + 2);
|
|
161
|
+
buf.writeUInt8(253, 0);
|
|
162
|
+
buf.writeUInt16LE(n, 1);
|
|
163
|
+
} else if (n < 0x100000000) {
|
|
164
|
+
buf = Buffer.alloc(1 + 4);
|
|
165
|
+
buf.writeUInt8(254, 0);
|
|
166
|
+
buf.writeUInt32LE(n, 1);
|
|
167
|
+
} else {
|
|
168
|
+
const bw = new BufferWriter();
|
|
169
|
+
bw.writeUInt8(255);
|
|
170
|
+
bw.writeUInt64LE(bn);
|
|
171
|
+
buf = bw.concat();
|
|
172
|
+
}
|
|
173
|
+
return buf;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
export default BufferWriter;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { blake2b } from '@noble/hashes/blake2b';
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { Hash } from '@noble/hashes/utils';
|
|
4
|
+
import BufferWriter from './BufferWriter';
|
|
5
|
+
|
|
6
|
+
const TransactionSigningHashKey = Buffer.from('TransactionSigningHash');
|
|
7
|
+
|
|
8
|
+
class HashWriter {
|
|
9
|
+
private blake2b: Hash<any>;
|
|
10
|
+
|
|
11
|
+
bw: BufferWriter;
|
|
12
|
+
|
|
13
|
+
hash: {
|
|
14
|
+
update: (buf: Buffer) => void;
|
|
15
|
+
digest: () => Buffer;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
constructor() {
|
|
19
|
+
this.bw = new BufferWriter();
|
|
20
|
+
this.blake2b = blake2b.create({ dkLen: 32, key: TransactionSigningHashKey });
|
|
21
|
+
this.hash = {
|
|
22
|
+
update: (buf: Buffer) => {
|
|
23
|
+
this.bw.write(buf);
|
|
24
|
+
this.blake2b.update(buf);
|
|
25
|
+
},
|
|
26
|
+
digest: () => Buffer.from(this.blake2b.digest()),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
writeUInt8(value: number): void {
|
|
31
|
+
const buf = new BufferWriter();
|
|
32
|
+
buf.writeUInt8(value);
|
|
33
|
+
this.hash.update(buf.toBuffer());
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
writeUInt16LE(value: number): void {
|
|
37
|
+
const buf = new BufferWriter();
|
|
38
|
+
buf.writeUInt16LE(value);
|
|
39
|
+
this.hash.update(buf.toBuffer());
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
writeUInt32LE(value: number): void {
|
|
43
|
+
const buf = new BufferWriter();
|
|
44
|
+
buf.writeUInt32LE(value);
|
|
45
|
+
this.hash.update(buf.toBuffer());
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
writeUInt64LE(value: BigNumber.Value): void {
|
|
49
|
+
const buf = new BufferWriter();
|
|
50
|
+
buf.writeUInt64LE(new BigNumber(value));
|
|
51
|
+
this.hash.update(buf.toBuffer());
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
writeVarBytes(buf: Buffer): void {
|
|
55
|
+
this.writeUInt64LE(buf.length);
|
|
56
|
+
this.hash.update(buf);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
writeHash(buf: Buffer): void {
|
|
60
|
+
this.hash.update(buf);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
finalize(): Buffer {
|
|
64
|
+
return this.hash.digest();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
toBuffer(): Buffer {
|
|
68
|
+
return this.bw.toBuffer();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export { HashWriter };
|