@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/dist/index.d.ts
ADDED
|
@@ -0,0 +1,3269 @@
|
|
|
1
|
+
import EventEmitter$1, { EventEmitter } from 'events';
|
|
2
|
+
import * as _ukeyfe_hardware_transport from '@ukeyfe/hardware-transport';
|
|
3
|
+
import { Messages, LowlevelTransportSharedPlugin, Success as Success$1, RecoveryDeviceType, SafetyCheckLevel, ResourceType, Features as Features$1, NextU2FCounter, SetU2FCounter, CipheredKeyValue as CipheredKeyValue$1, UintType, EthereumPublicKey, EthereumMessageSignature, Address, MultisigRedeemScriptType, InputScriptType, PublicKey, MessageSignature, SignedPsbt, PrevInput, TxOutputBinType, TxInput, TxOutputType, TxInputType, StarcoinAddress as StarcoinAddress$1, StarcoinPublicKey as StarcoinPublicKey$1, StarcoinMessageSignature, StarcoinSignedTx, NEMAddress as NEMAddress$1, NEMSignedTx, SolanaAddress as SolanaAddress$1, SolanaSignedTx as SolanaSignedTx$1, SolanaOffChainMessageVersion, SolanaOffChainMessageFormat, StellarAddress as StellarAddress$1, StellarSignedTx, TronAddress as TronAddress$1, TronResourceCode, TronSignedTx, TronMessageSignature, ConfluxAddress as ConfluxAddress$1, ConfluxMessageSignature, NearAddress as NearAddress$1, NearSignedTx, AptosAddress as AptosAddress$1, AptosMessageSignature as AptosMessageSignature$1, AptosSignedTx as AptosSignedTx$1, AlgorandAddress, AlgorandSignedTx, CosmosAddress as CosmosAddress$1, CosmosSignedTx as CosmosSignedTx$1, SuiAddress as SuiAddress$1, SuiMessageSignature, CardanoAddressParametersType, CardanoMessageSignature, FilecoinAddress as FilecoinAddress$1, FilecoinSignedTx as FilecoinSignedTx$1, PolkadotAddress as PolkadotAddress$1, PolkadotSignedTx as PolkadotSignedTx$1, KaspaAddress as KaspaAddress$1, NervosAddress as NervosAddress$1, NervosSignedTx as NervosSignedTx$1, DnxAddress as DnxAddress$1, TonWalletVersion, TonWorkChain, TonSignedMessage, TonSignedProof, ScdoAddress as ScdoAddress$1, ScdoSignedMessage, ScdoSignedTx as ScdoSignedTx$1, AlephiumMessageSignature, AlephiumSignedTx as AlephiumSignedTx$1, BenfenAddress as BenfenAddress$1, BenfenMessageSignature, UKeyDeviceInfo, Transport, ChangeOutputScriptType } from '@ukeyfe/hardware-transport';
|
|
4
|
+
export { Messages as PROTO } from '@ukeyfe/hardware-transport';
|
|
5
|
+
import { EDeviceType, Deferred, EFirmwareType } from '@ukeyfe/hardware-shared';
|
|
6
|
+
|
|
7
|
+
interface CommonParams {
|
|
8
|
+
keepSession?: boolean;
|
|
9
|
+
retryCount?: number;
|
|
10
|
+
pollIntervalTime?: number;
|
|
11
|
+
timeout?: number;
|
|
12
|
+
passphraseState?: string;
|
|
13
|
+
useEmptyPassphrase?: boolean;
|
|
14
|
+
initSession?: boolean;
|
|
15
|
+
deriveCardano?: boolean;
|
|
16
|
+
detectBootloaderDevice?: boolean;
|
|
17
|
+
skipWebDevicePrompt?: boolean;
|
|
18
|
+
skipPassphraseCheck?: boolean;
|
|
19
|
+
}
|
|
20
|
+
type Params<T> = CommonParams & T & {
|
|
21
|
+
bundle?: undefined;
|
|
22
|
+
};
|
|
23
|
+
interface Unsuccessful {
|
|
24
|
+
success: false;
|
|
25
|
+
payload: {
|
|
26
|
+
error: string;
|
|
27
|
+
code?: string | number;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
interface Success<T> {
|
|
31
|
+
success: true;
|
|
32
|
+
payload: T;
|
|
33
|
+
}
|
|
34
|
+
type Response<T> = Promise<Success<T> | Unsuccessful>;
|
|
35
|
+
|
|
36
|
+
declare const on: <T extends string, P extends (...args: any[]) => any>(type: T, fn: P) => void;
|
|
37
|
+
declare const off: (type: any, fn: any) => void;
|
|
38
|
+
declare const removeAllListeners: (type: any) => void;
|
|
39
|
+
|
|
40
|
+
declare function uiResponse(response: UiResponseEvent): void;
|
|
41
|
+
|
|
42
|
+
type IAddHardwareGlobalEventListener = (coreMessage: CoreMessage) => void;
|
|
43
|
+
interface LowLevelInjectApi {
|
|
44
|
+
call: CallMethod;
|
|
45
|
+
eventEmitter: EventEmitter;
|
|
46
|
+
init: CoreApi['init'];
|
|
47
|
+
dispose: CoreApi['dispose'];
|
|
48
|
+
uiResponse: CoreApi['uiResponse'];
|
|
49
|
+
cancel: CoreApi['cancel'];
|
|
50
|
+
updateSettings: CoreApi['updateSettings'];
|
|
51
|
+
switchTransport: CoreApi['switchTransport'];
|
|
52
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
53
|
+
}
|
|
54
|
+
type LowLevelCoreApi = Omit<CoreApi, 'on' | 'off'> & {
|
|
55
|
+
addHardwareGlobalEventListener: (listener: IAddHardwareGlobalEventListener) => void;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
declare const safeThrowError: (error: any) => never;
|
|
59
|
+
|
|
60
|
+
type DeviceStatus = 'available' | 'occupied' | 'used';
|
|
61
|
+
declare enum EUKeyDeviceMode {
|
|
62
|
+
bootloader = "bootloader",
|
|
63
|
+
normal = "normal",
|
|
64
|
+
notInitialized = "notInitialized",
|
|
65
|
+
backupMode = "backupMode"
|
|
66
|
+
}
|
|
67
|
+
type UnavailableCapability = 'no-capability' | 'no-support' | 'update-required' | 'trezor-connect-outdated';
|
|
68
|
+
type UnavailableCapabilities = {
|
|
69
|
+
[key: string]: UnavailableCapability;
|
|
70
|
+
};
|
|
71
|
+
type KnownDevice = {
|
|
72
|
+
connectId: string | null;
|
|
73
|
+
uuid: string;
|
|
74
|
+
deviceId: string | null;
|
|
75
|
+
deviceType: IDeviceType | null;
|
|
76
|
+
path: string;
|
|
77
|
+
label: string;
|
|
78
|
+
bleName: string | null;
|
|
79
|
+
name: string;
|
|
80
|
+
error?: typeof undefined;
|
|
81
|
+
mode: EUKeyDeviceMode;
|
|
82
|
+
features: Messages.Features;
|
|
83
|
+
unavailableCapabilities: UnavailableCapabilities;
|
|
84
|
+
bleFirmwareVersion: IVersionArray | null;
|
|
85
|
+
firmwareVersion: IVersionArray | null;
|
|
86
|
+
};
|
|
87
|
+
type SearchDevice = {
|
|
88
|
+
connectId: string | null;
|
|
89
|
+
uuid: string;
|
|
90
|
+
deviceId: string | null;
|
|
91
|
+
deviceType: IDeviceType;
|
|
92
|
+
name: string;
|
|
93
|
+
};
|
|
94
|
+
type Device$1 = KnownDevice;
|
|
95
|
+
type Features = Messages.Features;
|
|
96
|
+
type UkeyFeatures = Messages.UkeyFeatures;
|
|
97
|
+
type IDeviceType = EDeviceType.Unknown | EDeviceType.Classic | EDeviceType.Classic1s | EDeviceType.ClassicPure | EDeviceType.Mini | EDeviceType.Touch | EDeviceType.Pro;
|
|
98
|
+
type IDeviceModel = 'model_classic' | 'model_mini' | 'model_touch' | 'model_classic1s';
|
|
99
|
+
declare const DeviceModelToTypes: {
|
|
100
|
+
[deviceModel in IDeviceModel]: IDeviceType[];
|
|
101
|
+
};
|
|
102
|
+
declare const DeviceTypeToModels: {
|
|
103
|
+
[deviceType in IDeviceType]: IDeviceModel[];
|
|
104
|
+
};
|
|
105
|
+
type IDeviceFirmwareStatus = 'valid' | 'outdated' | 'required' | 'unknown' | 'none';
|
|
106
|
+
type IDeviceBLEFirmwareStatus = 'valid' | 'outdated' | 'required' | 'unknown' | 'none';
|
|
107
|
+
type ITransportStatus = 'valid' | 'outdated';
|
|
108
|
+
type IVersionRange = {
|
|
109
|
+
min: string;
|
|
110
|
+
max?: string;
|
|
111
|
+
};
|
|
112
|
+
type DeviceFirmwareRange = {
|
|
113
|
+
[deviceType in IDeviceType | IDeviceModel]?: IVersionRange;
|
|
114
|
+
};
|
|
115
|
+
type FeaturesNarrowing = {
|
|
116
|
+
major_version: 2;
|
|
117
|
+
fw_major: null;
|
|
118
|
+
fw_minor: null;
|
|
119
|
+
fw_patch: null;
|
|
120
|
+
bootloader_mode: true;
|
|
121
|
+
firmware_present: false;
|
|
122
|
+
} | {
|
|
123
|
+
major_version: 2;
|
|
124
|
+
fw_major: null;
|
|
125
|
+
fw_minor: null;
|
|
126
|
+
fw_patch: null;
|
|
127
|
+
bootloader_mode: null;
|
|
128
|
+
firmware_present: null;
|
|
129
|
+
} | {
|
|
130
|
+
major_version: 2;
|
|
131
|
+
fw_major: 2;
|
|
132
|
+
fw_minor: number;
|
|
133
|
+
fw_patch: number;
|
|
134
|
+
bootloader_mode: true;
|
|
135
|
+
firmware_present: true;
|
|
136
|
+
} | {
|
|
137
|
+
major_version: 1;
|
|
138
|
+
fw_major: null;
|
|
139
|
+
fw_minor: null;
|
|
140
|
+
fw_patch: null;
|
|
141
|
+
bootloader_mode: true;
|
|
142
|
+
firmware_present: false;
|
|
143
|
+
} | {
|
|
144
|
+
major_version: 1;
|
|
145
|
+
fw_major: null;
|
|
146
|
+
fw_minor: null;
|
|
147
|
+
fw_patch: null;
|
|
148
|
+
bootloader_mode: true;
|
|
149
|
+
firmware_present: true;
|
|
150
|
+
};
|
|
151
|
+
type StrictFeatures = Features & FeaturesNarrowing;
|
|
152
|
+
type SupportFeatureType = {
|
|
153
|
+
support: boolean;
|
|
154
|
+
require?: string;
|
|
155
|
+
};
|
|
156
|
+
type SupportFeatures = {
|
|
157
|
+
inputPinOnSoftware: SupportFeatureType;
|
|
158
|
+
modifyHomescreen: SupportFeatureType;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
type ConnectSettings = {
|
|
162
|
+
connectSrc?: string;
|
|
163
|
+
debug?: boolean;
|
|
164
|
+
transportReconnect?: boolean;
|
|
165
|
+
lazyLoad?: boolean;
|
|
166
|
+
origin?: string;
|
|
167
|
+
parentOrigin?: string;
|
|
168
|
+
configSrc: string;
|
|
169
|
+
iframeSrc: string;
|
|
170
|
+
version: string;
|
|
171
|
+
priority: number;
|
|
172
|
+
trustedHost: boolean;
|
|
173
|
+
supportedBrowser?: boolean;
|
|
174
|
+
env: 'node' | 'web' | 'webextension' | 'electron' | 'react-native' | 'webusb' | 'emulator' | 'desktop-web-ble' | 'lowlevel';
|
|
175
|
+
timestamp: number;
|
|
176
|
+
isFrame?: boolean;
|
|
177
|
+
preRelease?: boolean;
|
|
178
|
+
fetchConfig?: boolean;
|
|
179
|
+
extension?: string;
|
|
180
|
+
};
|
|
181
|
+
type IVersionArray = [number, number, number];
|
|
182
|
+
type ILocale = 'zh-CN' | 'en-US';
|
|
183
|
+
type IFirmwareReleaseInfo = {
|
|
184
|
+
required: boolean;
|
|
185
|
+
url: string;
|
|
186
|
+
resource?: string;
|
|
187
|
+
fullResource?: string;
|
|
188
|
+
fullResourceRange?: string[];
|
|
189
|
+
bootloaderResource?: string;
|
|
190
|
+
bootloaderVersion?: IVersionArray;
|
|
191
|
+
displayBootloaderVersion?: IVersionArray;
|
|
192
|
+
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
193
|
+
bootloaderChangelog?: {
|
|
194
|
+
[k in ILocale]: string;
|
|
195
|
+
};
|
|
196
|
+
fingerprint: string;
|
|
197
|
+
version: IVersionArray;
|
|
198
|
+
changelog: {
|
|
199
|
+
[k in ILocale]: string;
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
type IBLEFirmwareReleaseInfo = {
|
|
203
|
+
required: boolean;
|
|
204
|
+
url: string;
|
|
205
|
+
webUpdate: string;
|
|
206
|
+
fingerprint: string;
|
|
207
|
+
fingerprintWeb: string;
|
|
208
|
+
version: IVersionArray;
|
|
209
|
+
changelog: {
|
|
210
|
+
[k in ILocale]: string;
|
|
211
|
+
};
|
|
212
|
+
};
|
|
213
|
+
type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
|
|
214
|
+
type DeviceTypeMap = {
|
|
215
|
+
[k in IKnownDevice]: {
|
|
216
|
+
firmware: IFirmwareReleaseInfo[];
|
|
217
|
+
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
218
|
+
'firmware-v7'?: IFirmwareReleaseInfo[];
|
|
219
|
+
ble: IBLEFirmwareReleaseInfo[];
|
|
220
|
+
};
|
|
221
|
+
};
|
|
222
|
+
type AssetsMap = {
|
|
223
|
+
bridge: {
|
|
224
|
+
version: IVersionArray;
|
|
225
|
+
linux32Rpm: string;
|
|
226
|
+
linux64Rpm: string;
|
|
227
|
+
linux32Deb: string;
|
|
228
|
+
linux64Deb: string;
|
|
229
|
+
win: string;
|
|
230
|
+
mac: string;
|
|
231
|
+
sha256sumAsc: string;
|
|
232
|
+
changelog: {
|
|
233
|
+
[k in ILocale]: string;
|
|
234
|
+
};
|
|
235
|
+
};
|
|
236
|
+
};
|
|
237
|
+
type RemoteConfigResponse = {
|
|
238
|
+
bridge: AssetsMap['bridge'];
|
|
239
|
+
} & DeviceTypeMap;
|
|
240
|
+
|
|
241
|
+
declare function init$1(settings: Partial<ConnectSettings>, lowLevelApi?: LowLevelCoreApi, pulgin?: LowlevelTransportSharedPlugin): Promise<boolean>;
|
|
242
|
+
declare function updateSettings(settings: Partial<ConnectSettings>): Promise<boolean>;
|
|
243
|
+
|
|
244
|
+
declare function testInitializeDeviceDuration(connectId?: string, params?: CommonParams): Response<number>;
|
|
245
|
+
|
|
246
|
+
declare function getLogs(): Response<string[]>;
|
|
247
|
+
|
|
248
|
+
declare function checkBridgeStatus(): Response<boolean>;
|
|
249
|
+
|
|
250
|
+
type CheckBridgeReleaseResponse = {
|
|
251
|
+
shouldUpdate: boolean;
|
|
252
|
+
status: 'outdated' | 'valid';
|
|
253
|
+
releaseVersion: string;
|
|
254
|
+
} | null;
|
|
255
|
+
declare function checkBridgeRelease(connectId?: string, params?: CommonParams & {
|
|
256
|
+
willUpdateFirmwareVersion?: string;
|
|
257
|
+
}): Response<CheckBridgeReleaseResponse>;
|
|
258
|
+
|
|
259
|
+
type CheckBootloaderReleaseResponse = {
|
|
260
|
+
shouldUpdate: boolean;
|
|
261
|
+
status: 'outdated' | 'valid';
|
|
262
|
+
release: string | undefined;
|
|
263
|
+
bootloaderMode: boolean;
|
|
264
|
+
} | null;
|
|
265
|
+
declare function checkBootloaderRelease(connectId?: string, params?: CommonParams & {
|
|
266
|
+
willUpdateFirmwareVersion?: string;
|
|
267
|
+
}): Response<CheckBootloaderReleaseResponse>;
|
|
268
|
+
|
|
269
|
+
type FirmwareRelease$2 = {
|
|
270
|
+
shouldUpdate?: boolean;
|
|
271
|
+
status: IDeviceFirmwareStatus;
|
|
272
|
+
changelog?: {
|
|
273
|
+
'zh-CN': string;
|
|
274
|
+
'en-US': string;
|
|
275
|
+
}[];
|
|
276
|
+
release: IDeviceBLEFirmwareStatus | IBLEFirmwareReleaseInfo;
|
|
277
|
+
bootloaderMode?: boolean;
|
|
278
|
+
};
|
|
279
|
+
type AllFirmwareRelease = {
|
|
280
|
+
firmware: FirmwareRelease$2;
|
|
281
|
+
ble: FirmwareRelease$2;
|
|
282
|
+
bootloader?: FirmwareRelease$2;
|
|
283
|
+
bridge?: FirmwareRelease$2;
|
|
284
|
+
};
|
|
285
|
+
type CheckAllFirmwareReleaseParams = {
|
|
286
|
+
checkBridgeRelease?: boolean;
|
|
287
|
+
};
|
|
288
|
+
declare function checkAllFirmwareRelease(connectId?: string, params?: CommonParams & CheckAllFirmwareReleaseParams): Response<AllFirmwareRelease>;
|
|
289
|
+
|
|
290
|
+
declare function searchDevices(): Response<SearchDevice[]>;
|
|
291
|
+
|
|
292
|
+
declare function getFeatures(connectId?: string, params?: CommonParams): Response<Features>;
|
|
293
|
+
|
|
294
|
+
declare function getUkeyFeatures(connectId?: string, params?: CommonParams): Response<UkeyFeatures>;
|
|
295
|
+
|
|
296
|
+
declare function getPassphraseState(connectId?: string, params?: CommonParams): Response<string>;
|
|
297
|
+
|
|
298
|
+
type FirmwareRelease$1 = {
|
|
299
|
+
status: IDeviceFirmwareStatus;
|
|
300
|
+
changelog: {
|
|
301
|
+
'en-US': string;
|
|
302
|
+
'zh-CN': string;
|
|
303
|
+
}[];
|
|
304
|
+
release: IFirmwareReleaseInfo;
|
|
305
|
+
bootloaderMode: boolean;
|
|
306
|
+
};
|
|
307
|
+
declare function checkFirmwareRelease(connectId?: string): Response<FirmwareRelease$1>;
|
|
308
|
+
|
|
309
|
+
type BleFirmwareRelease = {
|
|
310
|
+
status: IDeviceBLEFirmwareStatus;
|
|
311
|
+
changelog: {
|
|
312
|
+
'zh-CN': string;
|
|
313
|
+
'en-US': string;
|
|
314
|
+
}[];
|
|
315
|
+
release: IBLEFirmwareReleaseInfo;
|
|
316
|
+
bootloaderMode: boolean;
|
|
317
|
+
};
|
|
318
|
+
declare function checkBLEFirmwareRelease(connectId?: string): Response<BleFirmwareRelease>;
|
|
319
|
+
|
|
320
|
+
type IUpdateType = 'firmware' | 'ble';
|
|
321
|
+
interface FirmwareUpdateBinaryParams {
|
|
322
|
+
binary: ArrayBuffer;
|
|
323
|
+
updateType: IUpdateType;
|
|
324
|
+
}
|
|
325
|
+
interface FirmwareUpdateParams {
|
|
326
|
+
version?: number[];
|
|
327
|
+
btcOnly?: boolean;
|
|
328
|
+
updateType: IUpdateType;
|
|
329
|
+
forcedUpdateRes?: boolean;
|
|
330
|
+
isUpdateBootloader?: boolean;
|
|
331
|
+
}
|
|
332
|
+
declare function firmwareUpdate(connectId: string | undefined, params: Params<FirmwareUpdateParams> & {
|
|
333
|
+
rebootOnSuccess?: boolean;
|
|
334
|
+
}): Response<Messages.Success>;
|
|
335
|
+
declare function firmwareUpdate(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams> & {
|
|
336
|
+
rebootOnSuccess?: boolean;
|
|
337
|
+
}): Response<Messages.Success>;
|
|
338
|
+
type IPlatform = 'native' | 'desktop' | 'ext' | 'web' | 'web-embed';
|
|
339
|
+
type Platform = {
|
|
340
|
+
platform: IPlatform;
|
|
341
|
+
};
|
|
342
|
+
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateParams & Platform>): Response<Messages.Success>;
|
|
343
|
+
declare function firmwareUpdateV2(connectId: string | undefined, params: Params<FirmwareUpdateBinaryParams & Platform>): Response<Messages.Success>;
|
|
344
|
+
interface FirmwareUpdateV3Params {
|
|
345
|
+
bleVersion?: number[];
|
|
346
|
+
bleBinary?: ArrayBuffer;
|
|
347
|
+
firmwareVersion?: number[];
|
|
348
|
+
firmwareBinary?: ArrayBuffer;
|
|
349
|
+
bootloaderVersion?: number[];
|
|
350
|
+
bootloaderBinary?: ArrayBuffer;
|
|
351
|
+
resourceBinary?: ArrayBuffer;
|
|
352
|
+
forcedUpdateRes?: boolean;
|
|
353
|
+
platform: IPlatform;
|
|
354
|
+
}
|
|
355
|
+
declare function firmwareUpdateV3(connectId: string | undefined, params: Params<FirmwareUpdateV3Params>): Response<{
|
|
356
|
+
bleVersion: string;
|
|
357
|
+
firmwareVersion: string;
|
|
358
|
+
bootloaderVersion: string;
|
|
359
|
+
}>;
|
|
360
|
+
|
|
361
|
+
interface EmmcFileWriteParams {
|
|
362
|
+
payload: ArrayBuffer;
|
|
363
|
+
filePath: string;
|
|
364
|
+
hash?: string;
|
|
365
|
+
}
|
|
366
|
+
declare function emmcFileWrite(connectId: string | undefined, params: Params<EmmcFileWriteParams>): Response<number>;
|
|
367
|
+
|
|
368
|
+
declare function promptWebDeviceAccess(options?: {
|
|
369
|
+
deviceSerialNumberFromUI?: string;
|
|
370
|
+
}): Response<{
|
|
371
|
+
device: KnownDevice | null;
|
|
372
|
+
}>;
|
|
373
|
+
|
|
374
|
+
type DeviceResetParams = {
|
|
375
|
+
displayRandom?: boolean;
|
|
376
|
+
strength?: number;
|
|
377
|
+
passphraseProtection?: boolean;
|
|
378
|
+
pinProtection?: boolean;
|
|
379
|
+
language?: string;
|
|
380
|
+
label?: string;
|
|
381
|
+
u2fCounter?: number;
|
|
382
|
+
skipBackup?: boolean;
|
|
383
|
+
noBackup?: boolean;
|
|
384
|
+
backupType?: string | number;
|
|
385
|
+
};
|
|
386
|
+
declare function deviceReset(connectId: string, params: CommonParams & DeviceResetParams): Response<Success$1>;
|
|
387
|
+
|
|
388
|
+
type DeviceRecoveryParams = {
|
|
389
|
+
wordCount?: number;
|
|
390
|
+
passphraseProtection?: boolean;
|
|
391
|
+
pinProtection?: boolean;
|
|
392
|
+
language?: string;
|
|
393
|
+
label?: string;
|
|
394
|
+
enforceWordlist?: boolean;
|
|
395
|
+
type?: RecoveryDeviceType;
|
|
396
|
+
u2fCounter?: number;
|
|
397
|
+
dryRun?: boolean;
|
|
398
|
+
};
|
|
399
|
+
declare function deviceRecovery(connectId: string, params: CommonParams & DeviceRecoveryParams): Response<Success$1>;
|
|
400
|
+
|
|
401
|
+
type DeviceVerifyParams = {
|
|
402
|
+
dataHex: string;
|
|
403
|
+
};
|
|
404
|
+
type DeviceVerifySignature = {
|
|
405
|
+
cert: string;
|
|
406
|
+
signature: string;
|
|
407
|
+
};
|
|
408
|
+
declare function deviceVerify(connectId: string, params: CommonParams & DeviceVerifyParams): Response<DeviceVerifySignature>;
|
|
409
|
+
|
|
410
|
+
declare function deviceWipe(connectId: string): Response<Success$1>;
|
|
411
|
+
|
|
412
|
+
declare function deviceRebootToBootloader(connectId: string): Response<Success$1>;
|
|
413
|
+
|
|
414
|
+
declare function deviceRebootToBoardloader(connectId: string): Response<Success$1>;
|
|
415
|
+
|
|
416
|
+
declare function deviceBackup(connectId: string): Response<Success$1>;
|
|
417
|
+
|
|
418
|
+
type DeviceChangePinParams = {
|
|
419
|
+
remove?: boolean;
|
|
420
|
+
};
|
|
421
|
+
declare function deviceChangePin(connectId: string, params: CommonParams & DeviceChangePinParams): Response<Success$1>;
|
|
422
|
+
|
|
423
|
+
type DeviceSettingsParams = {
|
|
424
|
+
language?: string;
|
|
425
|
+
label?: string;
|
|
426
|
+
usePassphrase?: boolean;
|
|
427
|
+
homescreen?: string;
|
|
428
|
+
passphraseSource?: number;
|
|
429
|
+
autoLockDelayMs?: number;
|
|
430
|
+
displayRotation?: number;
|
|
431
|
+
passphraseAlwaysOnDevice?: boolean;
|
|
432
|
+
safetyChecks?: SafetyCheckLevel;
|
|
433
|
+
experimentalFeatures?: boolean;
|
|
434
|
+
};
|
|
435
|
+
declare function deviceSettings(connectId: string, params: CommonParams & DeviceSettingsParams): Response<Success$1>;
|
|
436
|
+
|
|
437
|
+
type DeviceFlagsParams = {
|
|
438
|
+
flags?: number;
|
|
439
|
+
};
|
|
440
|
+
declare function deviceFlags(connectId: string, params: CommonParams & DeviceFlagsParams): Response<Success$1>;
|
|
441
|
+
|
|
442
|
+
declare function deviceUpdateReboot(connectId: string): Response<boolean>;
|
|
443
|
+
|
|
444
|
+
type DeviceUploadResourceParams = {
|
|
445
|
+
suffix: string;
|
|
446
|
+
dataHex: string;
|
|
447
|
+
thumbnailDataHex: string;
|
|
448
|
+
resType: ResourceType;
|
|
449
|
+
nftMetaData: string;
|
|
450
|
+
fileNameNoExt?: string;
|
|
451
|
+
};
|
|
452
|
+
declare function deviceUploadResource(connectId: string, params: CommonParams & DeviceUploadResourceParams): Response<Success$1>;
|
|
453
|
+
|
|
454
|
+
type DeviceSupportFeatures = SupportFeatures & {
|
|
455
|
+
device: Device$1 | null;
|
|
456
|
+
};
|
|
457
|
+
declare function deviceSupportFeatures(connectId?: string): Response<DeviceSupportFeatures>;
|
|
458
|
+
|
|
459
|
+
declare function deviceFullyUploadResource(connectId: string, params: CommonParams & {
|
|
460
|
+
binary?: ArrayBuffer;
|
|
461
|
+
}): Response<Success$1>;
|
|
462
|
+
|
|
463
|
+
declare function deviceUpdateBootloader(connectId: string, params?: {
|
|
464
|
+
binary?: ArrayBuffer;
|
|
465
|
+
}): Response<Success$1>;
|
|
466
|
+
|
|
467
|
+
declare function deviceLock(connectId: string, params: CommonParams): Response<Success$1>;
|
|
468
|
+
|
|
469
|
+
declare function deviceUnlock(connectId: string, params?: CommonParams): Response<Features$1>;
|
|
470
|
+
|
|
471
|
+
declare function deviceCancel(connectId: string, params: CommonParams): Response<Success$1>;
|
|
472
|
+
|
|
473
|
+
declare function getNextU2FCounter(connectId?: string, params?: CommonParams): Response<NextU2FCounter>;
|
|
474
|
+
|
|
475
|
+
declare function setU2FCounter(connectId?: string, params?: CommonParams & SetU2FCounter): Response<Success$1>;
|
|
476
|
+
|
|
477
|
+
type CipheredKeyValue = {
|
|
478
|
+
path: string;
|
|
479
|
+
} & CipheredKeyValue$1;
|
|
480
|
+
type CipheredKeyValueParams = {
|
|
481
|
+
path: string | number[];
|
|
482
|
+
key: string;
|
|
483
|
+
value: string;
|
|
484
|
+
encrypt?: boolean;
|
|
485
|
+
askOnEncrypt?: boolean;
|
|
486
|
+
askOnDecrypt?: boolean;
|
|
487
|
+
iv?: string;
|
|
488
|
+
};
|
|
489
|
+
declare function cipherKeyValue(connectId: string, deviceId: string, params: CommonParams & CipheredKeyValueParams): Response<CipheredKeyValue>;
|
|
490
|
+
declare function cipherKeyValue(connectId: string, deviceId: string, params: CommonParams & {
|
|
491
|
+
bundle?: CipheredKeyValueParams[];
|
|
492
|
+
}): Response<Array<CipheredKeyValue>>;
|
|
493
|
+
|
|
494
|
+
interface CardanoAddressParameters {
|
|
495
|
+
addressType: Messages.CardanoAddressType;
|
|
496
|
+
path?: string | number[];
|
|
497
|
+
stakingPath?: string | number[];
|
|
498
|
+
stakingKeyHash?: string;
|
|
499
|
+
certificatePointer?: CardanoCertificatePointer;
|
|
500
|
+
paymentScriptHash?: string;
|
|
501
|
+
stakingScriptHash?: string;
|
|
502
|
+
}
|
|
503
|
+
interface CardanoCertificatePointer {
|
|
504
|
+
blockIndex: number;
|
|
505
|
+
txIndex: number;
|
|
506
|
+
certificateIndex: number;
|
|
507
|
+
}
|
|
508
|
+
interface CardanoToken {
|
|
509
|
+
assetNameBytes: string;
|
|
510
|
+
amount?: string;
|
|
511
|
+
mintAmount?: string;
|
|
512
|
+
}
|
|
513
|
+
interface CardanoAssetGroup {
|
|
514
|
+
policyId: string;
|
|
515
|
+
tokenAmounts: CardanoToken[];
|
|
516
|
+
}
|
|
517
|
+
interface CardanoDRep {
|
|
518
|
+
type: Messages.CardanoDRepType;
|
|
519
|
+
keyHash?: string;
|
|
520
|
+
scriptHash?: string;
|
|
521
|
+
}
|
|
522
|
+
interface CardanoCertificate {
|
|
523
|
+
type: Messages.CardanoCertificateType;
|
|
524
|
+
path?: string | number[];
|
|
525
|
+
pool?: string;
|
|
526
|
+
poolParameters?: CardanoPoolParameters;
|
|
527
|
+
scriptHash?: string;
|
|
528
|
+
keyHash?: string;
|
|
529
|
+
deposit?: UintType;
|
|
530
|
+
dRep?: CardanoDRep;
|
|
531
|
+
}
|
|
532
|
+
interface CardanoPoolOwner {
|
|
533
|
+
stakingKeyPath?: string | number[];
|
|
534
|
+
stakingKeyHash?: string;
|
|
535
|
+
}
|
|
536
|
+
interface CardanoPoolRelay {
|
|
537
|
+
type: Messages.CardanoPoolRelayType;
|
|
538
|
+
ipv4Address?: string;
|
|
539
|
+
ipv6Address?: string;
|
|
540
|
+
port?: number;
|
|
541
|
+
hostName?: string;
|
|
542
|
+
}
|
|
543
|
+
interface CardanoPoolMetadata {
|
|
544
|
+
url: string;
|
|
545
|
+
hash: string;
|
|
546
|
+
}
|
|
547
|
+
interface CardanoPoolMargin {
|
|
548
|
+
numerator: string;
|
|
549
|
+
denominator: string;
|
|
550
|
+
}
|
|
551
|
+
interface CardanoPoolParameters {
|
|
552
|
+
poolId: string;
|
|
553
|
+
vrfKeyHash: string;
|
|
554
|
+
pledge: string;
|
|
555
|
+
cost: string;
|
|
556
|
+
margin: CardanoPoolMargin;
|
|
557
|
+
rewardAccount: string;
|
|
558
|
+
owners: CardanoPoolOwner[];
|
|
559
|
+
relays: CardanoPoolRelay[];
|
|
560
|
+
metadata: CardanoPoolMetadata;
|
|
561
|
+
}
|
|
562
|
+
interface CardanoInput {
|
|
563
|
+
path?: string | number[];
|
|
564
|
+
prev_hash: string;
|
|
565
|
+
prev_index: number;
|
|
566
|
+
}
|
|
567
|
+
type CardanoOutput = ({
|
|
568
|
+
addressParameters: CardanoAddressParameters;
|
|
569
|
+
} | {
|
|
570
|
+
address: string;
|
|
571
|
+
}) & {
|
|
572
|
+
amount: string;
|
|
573
|
+
tokenBundle?: CardanoAssetGroup[];
|
|
574
|
+
datumHash?: string;
|
|
575
|
+
format?: Messages.CardanoTxOutputSerializationFormat;
|
|
576
|
+
inlineDatum?: string;
|
|
577
|
+
referenceScript?: string;
|
|
578
|
+
};
|
|
579
|
+
interface CardanoWithdrawal {
|
|
580
|
+
path?: string | number[];
|
|
581
|
+
amount: string;
|
|
582
|
+
scriptHash?: string;
|
|
583
|
+
keyHash?: string;
|
|
584
|
+
}
|
|
585
|
+
type CardanoMint = CardanoAssetGroup[];
|
|
586
|
+
interface CardanoCollateralInput {
|
|
587
|
+
path?: string | number[];
|
|
588
|
+
prev_hash: string;
|
|
589
|
+
prev_index: number;
|
|
590
|
+
}
|
|
591
|
+
interface CardanoRequiredSigner {
|
|
592
|
+
keyPath?: string | number[];
|
|
593
|
+
keyHash?: string;
|
|
594
|
+
}
|
|
595
|
+
interface CardanoReferenceInput {
|
|
596
|
+
prev_hash: string;
|
|
597
|
+
prev_index: number;
|
|
598
|
+
}
|
|
599
|
+
interface CardanoCVoteRegistrationDelegation {
|
|
600
|
+
votePublicKey: string;
|
|
601
|
+
weight: number;
|
|
602
|
+
}
|
|
603
|
+
interface CardanoCVoteRegistrationParameters {
|
|
604
|
+
votePublicKey?: string;
|
|
605
|
+
stakingPath: string | number[];
|
|
606
|
+
paymentAddressParameters: CardanoAddressParameters;
|
|
607
|
+
nonce: string;
|
|
608
|
+
format?: Messages.CardanoCVoteRegistrationFormat;
|
|
609
|
+
delegations?: CardanoCVoteRegistrationDelegation[];
|
|
610
|
+
votingPurpose?: number;
|
|
611
|
+
paymentAddress?: string;
|
|
612
|
+
}
|
|
613
|
+
interface CardanoAuxiliaryData {
|
|
614
|
+
hash?: string;
|
|
615
|
+
cVoteRegistrationParameters?: CardanoCVoteRegistrationParameters;
|
|
616
|
+
}
|
|
617
|
+
interface CardanoSignTransaction {
|
|
618
|
+
inputs: CardanoInput[];
|
|
619
|
+
outputs: CardanoOutput[];
|
|
620
|
+
fee: string;
|
|
621
|
+
ttl?: string;
|
|
622
|
+
certificates?: CardanoCertificate[];
|
|
623
|
+
withdrawals?: CardanoWithdrawal[];
|
|
624
|
+
validityIntervalStart?: string;
|
|
625
|
+
auxiliaryData?: CardanoAuxiliaryData;
|
|
626
|
+
mint?: CardanoMint;
|
|
627
|
+
scriptDataHash?: string;
|
|
628
|
+
collateralInputs?: CardanoCollateralInput[];
|
|
629
|
+
requiredSigners?: CardanoRequiredSigner[];
|
|
630
|
+
collateralReturn?: CardanoOutput;
|
|
631
|
+
totalCollateral?: string;
|
|
632
|
+
referenceInputs?: CardanoReferenceInput[];
|
|
633
|
+
additionalWitnessRequests?: (string | number[])[];
|
|
634
|
+
protocolMagic: number;
|
|
635
|
+
networkId: number;
|
|
636
|
+
signingMode: Messages.CardanoTxSigningMode;
|
|
637
|
+
derivationType?: Messages.CardanoDerivationType;
|
|
638
|
+
includeNetworkId?: boolean;
|
|
639
|
+
chunkify?: boolean;
|
|
640
|
+
tagCborSets?: boolean;
|
|
641
|
+
}
|
|
642
|
+
interface CardanoSignedTxWitness {
|
|
643
|
+
type: Messages.CardanoTxWitnessType;
|
|
644
|
+
pubKey: string;
|
|
645
|
+
signature: string;
|
|
646
|
+
chainCode?: string;
|
|
647
|
+
}
|
|
648
|
+
interface CardanoAuxiliaryDataSupplement {
|
|
649
|
+
type: Messages.CardanoTxAuxiliaryDataSupplementType;
|
|
650
|
+
auxiliaryDataHash: string;
|
|
651
|
+
cVoteRegistrationSignature?: string;
|
|
652
|
+
}
|
|
653
|
+
interface CardanoSignedTxData {
|
|
654
|
+
hash: string;
|
|
655
|
+
witnesses: CardanoSignedTxWitness[];
|
|
656
|
+
auxiliaryDataSupplement?: CardanoAuxiliaryDataSupplement;
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
type INetwork = 'evm' | 'btc' | 'tbtc' | 'doge' | 'neurai' | 'ltc' | 'bch' | 'sol' | 'algo' | 'near' | 'stc' | 'cfx' | 'tron' | 'aptos' | 'xrp' | 'cosmos' | 'ada' | 'sui' | 'fil' | 'dot' | 'kaspa' | 'nexa' | 'dynex' | 'nervos' | 'scdo' | 'ton' | 'alph' | 'nostr' | 'benfen' | 'neo';
|
|
660
|
+
type AllNetworkAddressParams = {
|
|
661
|
+
path: string | number[];
|
|
662
|
+
network: INetwork;
|
|
663
|
+
chainName?: string;
|
|
664
|
+
prefix?: string;
|
|
665
|
+
showOnOneKey?: boolean;
|
|
666
|
+
includePublicKey?: boolean;
|
|
667
|
+
group?: string;
|
|
668
|
+
useTweak?: boolean;
|
|
669
|
+
};
|
|
670
|
+
type AllNetworkAddressPayload = {
|
|
671
|
+
address: string;
|
|
672
|
+
pub?: string;
|
|
673
|
+
publicKey?: string;
|
|
674
|
+
npub?: string;
|
|
675
|
+
} | {
|
|
676
|
+
addressParameters: CardanoAddressParameters;
|
|
677
|
+
protocolMagic: number;
|
|
678
|
+
networkId: number;
|
|
679
|
+
serializedPath: string;
|
|
680
|
+
serializedStakingPath: string;
|
|
681
|
+
address: string;
|
|
682
|
+
xpub?: string;
|
|
683
|
+
stakeAddress?: string;
|
|
684
|
+
} | {
|
|
685
|
+
node: {
|
|
686
|
+
depth: number;
|
|
687
|
+
fingerprint: number;
|
|
688
|
+
child_num: number;
|
|
689
|
+
chain_code: string;
|
|
690
|
+
private_key: string | null;
|
|
691
|
+
public_key: string;
|
|
692
|
+
};
|
|
693
|
+
xpub: string;
|
|
694
|
+
root_fingerprint: number;
|
|
695
|
+
xpubSegwit: string;
|
|
696
|
+
};
|
|
697
|
+
type AllNetworkAddress = AllNetworkAddressParams & {
|
|
698
|
+
success: boolean;
|
|
699
|
+
payload?: (AllNetworkAddressPayload & {
|
|
700
|
+
rootFingerprint: number;
|
|
701
|
+
}) | {
|
|
702
|
+
error: string;
|
|
703
|
+
code: number;
|
|
704
|
+
connectId?: string;
|
|
705
|
+
deviceId?: string;
|
|
706
|
+
params: any;
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
type AllNetworkGetAddressParams = {
|
|
710
|
+
bundle: AllNetworkAddressParams[];
|
|
711
|
+
};
|
|
712
|
+
type AllNetworkGetAddressParamsByLoop = AllNetworkGetAddressParams & {
|
|
713
|
+
callbackId?: string;
|
|
714
|
+
callbackIdFinish?: string;
|
|
715
|
+
onLoopItemResponse: (data?: AllNetworkAddress) => void;
|
|
716
|
+
onAllItemsResponse: (data?: AllNetworkAddress[], error?: Unsuccessful) => void;
|
|
717
|
+
};
|
|
718
|
+
declare function allNetworkGetAddress(connectId: string, deviceId: string, params: CommonParams & AllNetworkGetAddressParams): Response<AllNetworkAddress[]>;
|
|
719
|
+
declare function allNetworkGetAddressByLoop(connectId: string, deviceId: string, params: CommonParams & AllNetworkGetAddressParamsByLoop): Response<AllNetworkAddress[]>;
|
|
720
|
+
|
|
721
|
+
type EVMAddress = {
|
|
722
|
+
path: string;
|
|
723
|
+
address: string;
|
|
724
|
+
};
|
|
725
|
+
type EVMGetAddressParams = {
|
|
726
|
+
path: string | number[];
|
|
727
|
+
showOnOneKey?: boolean;
|
|
728
|
+
chainId?: number;
|
|
729
|
+
};
|
|
730
|
+
declare function evmGetAddress(connectId: string, deviceId: string, params: CommonParams & EVMGetAddressParams): Response<EVMAddress>;
|
|
731
|
+
declare function evmGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
732
|
+
bundle?: EVMGetAddressParams[];
|
|
733
|
+
}): Response<Array<EVMAddress>>;
|
|
734
|
+
|
|
735
|
+
type EVMPublicKey = {
|
|
736
|
+
path: string;
|
|
737
|
+
pub: string;
|
|
738
|
+
publicKey?: string;
|
|
739
|
+
} & EthereumPublicKey;
|
|
740
|
+
type EVMGetPublicKeyParams = {
|
|
741
|
+
path: string | number[];
|
|
742
|
+
showOnOneKey?: boolean;
|
|
743
|
+
chainId?: number;
|
|
744
|
+
useBatch?: boolean;
|
|
745
|
+
};
|
|
746
|
+
declare function evmGetPublicKey(connectId: string, deviceId: string, params: CommonParams & EVMGetPublicKeyParams): Response<EVMPublicKey>;
|
|
747
|
+
declare function evmGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
748
|
+
bundle?: EVMGetPublicKeyParams[];
|
|
749
|
+
}): Response<Array<EVMPublicKey>>;
|
|
750
|
+
declare function evmGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
751
|
+
bundle?: EVMGetPublicKeyParams[];
|
|
752
|
+
}): Response<Omit<EVMPublicKey, 'node' | 'xpub'>>;
|
|
753
|
+
|
|
754
|
+
type EVMSignMessageParams = {
|
|
755
|
+
path: string | number[];
|
|
756
|
+
messageHex: string;
|
|
757
|
+
chainId?: number;
|
|
758
|
+
};
|
|
759
|
+
declare function evmSignMessage(connectId: string, deviceId: string, params: CommonParams & EVMSignMessageParams): Response<EthereumMessageSignature>;
|
|
760
|
+
|
|
761
|
+
type EVMSignMessageEIP712Params = {
|
|
762
|
+
path: string | number[];
|
|
763
|
+
domainHash: string;
|
|
764
|
+
messageHash: string;
|
|
765
|
+
};
|
|
766
|
+
declare function evmSignMessageEIP712(connectId: string, deviceId: string, params: CommonParams & EVMSignMessageEIP712Params): Response<EthereumMessageSignature>;
|
|
767
|
+
|
|
768
|
+
type EVMSignedTx = {
|
|
769
|
+
v: string;
|
|
770
|
+
r: string;
|
|
771
|
+
s: string;
|
|
772
|
+
authorizationSignatures?: EVMAuthorizationSignature[];
|
|
773
|
+
};
|
|
774
|
+
type EVMTransaction = {
|
|
775
|
+
to: string;
|
|
776
|
+
value: string;
|
|
777
|
+
gasPrice: string;
|
|
778
|
+
gasLimit: string;
|
|
779
|
+
maxFeePerGas?: typeof undefined;
|
|
780
|
+
maxPriorityFeePerGas?: typeof undefined;
|
|
781
|
+
nonce: string;
|
|
782
|
+
data?: string;
|
|
783
|
+
chainId: number;
|
|
784
|
+
txType?: number;
|
|
785
|
+
};
|
|
786
|
+
type EVMAccessList = {
|
|
787
|
+
address: string;
|
|
788
|
+
storageKeys: string[];
|
|
789
|
+
};
|
|
790
|
+
type EVMTransactionEIP1559 = {
|
|
791
|
+
to: string;
|
|
792
|
+
value: string;
|
|
793
|
+
gasLimit: string;
|
|
794
|
+
gasPrice?: typeof undefined;
|
|
795
|
+
nonce: string;
|
|
796
|
+
data?: string;
|
|
797
|
+
chainId: number;
|
|
798
|
+
maxFeePerGas: string;
|
|
799
|
+
maxPriorityFeePerGas: string;
|
|
800
|
+
accessList?: EVMAccessList[];
|
|
801
|
+
};
|
|
802
|
+
type EVMAuthorizationSignature = {
|
|
803
|
+
yParity: number;
|
|
804
|
+
r: string;
|
|
805
|
+
s: string;
|
|
806
|
+
};
|
|
807
|
+
type EVMAuthorization = {
|
|
808
|
+
chainId: number;
|
|
809
|
+
address: string;
|
|
810
|
+
nonce: string;
|
|
811
|
+
addressN?: number[];
|
|
812
|
+
yParity?: number;
|
|
813
|
+
r?: string;
|
|
814
|
+
s?: string;
|
|
815
|
+
};
|
|
816
|
+
type EVMTransactionEIP7702 = {
|
|
817
|
+
to: string;
|
|
818
|
+
value: string;
|
|
819
|
+
gasLimit: string;
|
|
820
|
+
gasPrice?: typeof undefined;
|
|
821
|
+
nonce: string;
|
|
822
|
+
data?: string;
|
|
823
|
+
chainId: number;
|
|
824
|
+
maxFeePerGas: string;
|
|
825
|
+
maxPriorityFeePerGas: string;
|
|
826
|
+
accessList?: EVMAccessList[];
|
|
827
|
+
authorizationList: EVMAuthorization[];
|
|
828
|
+
};
|
|
829
|
+
type EVMSignTransactionParams = {
|
|
830
|
+
path: string | number[];
|
|
831
|
+
transaction: EVMTransaction | EVMTransactionEIP1559 | EVMTransactionEIP7702;
|
|
832
|
+
};
|
|
833
|
+
declare function evmSignTransaction(connectId: string, deviceId: string, params: CommonParams & EVMSignTransactionParams): Response<EVMSignedTx>;
|
|
834
|
+
|
|
835
|
+
type EthereumSignTypedDataTypeProperty = {
|
|
836
|
+
name: string;
|
|
837
|
+
type: string;
|
|
838
|
+
};
|
|
839
|
+
type EthereumSignTypedDataTypes = {
|
|
840
|
+
EIP712Domain: EthereumSignTypedDataTypeProperty[];
|
|
841
|
+
[additionalProperties: string]: EthereumSignTypedDataTypeProperty[];
|
|
842
|
+
};
|
|
843
|
+
type EthereumSignTypedDataMessage<T extends EthereumSignTypedDataTypes> = {
|
|
844
|
+
types: T;
|
|
845
|
+
primaryType: keyof T;
|
|
846
|
+
domain: {
|
|
847
|
+
name?: string;
|
|
848
|
+
version?: string;
|
|
849
|
+
chainId?: number;
|
|
850
|
+
verifyingContract?: string;
|
|
851
|
+
salt?: ArrayBuffer;
|
|
852
|
+
};
|
|
853
|
+
message: {
|
|
854
|
+
[fieldName: string]: any;
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
type EVMSignTypedDataParams = {
|
|
858
|
+
path: string | number[];
|
|
859
|
+
metamaskV4Compat: boolean;
|
|
860
|
+
data: EthereumSignTypedDataMessage<EthereumSignTypedDataTypes>;
|
|
861
|
+
domainHash?: string;
|
|
862
|
+
messageHash?: string;
|
|
863
|
+
chainId?: number;
|
|
864
|
+
};
|
|
865
|
+
declare function evmSignTypedData(connectId: string, deviceId: string, params: CommonParams & EVMSignTypedDataParams): Response<EthereumMessageSignature>;
|
|
866
|
+
|
|
867
|
+
type EVMVerifyMessageParams = {
|
|
868
|
+
address: string;
|
|
869
|
+
messageHex: string;
|
|
870
|
+
signature: string;
|
|
871
|
+
chainId?: number;
|
|
872
|
+
};
|
|
873
|
+
declare function evmVerifyMessage(connectId: string, deviceId: string, params: CommonParams & EVMVerifyMessageParams): Response<Success$1>;
|
|
874
|
+
|
|
875
|
+
type BTCAddress = {
|
|
876
|
+
path: string;
|
|
877
|
+
} & Address;
|
|
878
|
+
type BTCGetAddressParams = {
|
|
879
|
+
path: string | number[];
|
|
880
|
+
coin?: string;
|
|
881
|
+
showOnOneKey?: boolean;
|
|
882
|
+
multisig?: MultisigRedeemScriptType;
|
|
883
|
+
scriptType?: InputScriptType;
|
|
884
|
+
};
|
|
885
|
+
declare function btcGetAddress(connectId: string, deviceId: string, params: CommonParams & BTCGetAddressParams): Response<BTCAddress>;
|
|
886
|
+
declare function btcGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
887
|
+
bundle?: BTCGetAddressParams[];
|
|
888
|
+
}): Response<Array<BTCAddress>>;
|
|
889
|
+
|
|
890
|
+
type BTCPublicKey = {
|
|
891
|
+
path: string;
|
|
892
|
+
xpubSegwit?: string;
|
|
893
|
+
} & PublicKey;
|
|
894
|
+
type BTCGetPublicKeyParams = {
|
|
895
|
+
path: string | number[];
|
|
896
|
+
coin?: string;
|
|
897
|
+
showOnOneKey?: boolean;
|
|
898
|
+
scriptType?: InputScriptType;
|
|
899
|
+
};
|
|
900
|
+
declare function btcGetPublicKey(connectId: string, deviceId: string, params: CommonParams & BTCGetPublicKeyParams): Response<BTCPublicKey>;
|
|
901
|
+
declare function btcGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
902
|
+
bundle?: BTCGetPublicKeyParams[];
|
|
903
|
+
}): Response<Array<BTCPublicKey>>;
|
|
904
|
+
|
|
905
|
+
type BTCSignMessageParams = {
|
|
906
|
+
path: string | number[];
|
|
907
|
+
messageHex: string;
|
|
908
|
+
coin?: string;
|
|
909
|
+
noScriptType?: boolean;
|
|
910
|
+
dAppSignType?: 'ecdsa' | 'bip322-simple';
|
|
911
|
+
};
|
|
912
|
+
declare function btcSignMessage(connectId: string, deviceId: string, params: CommonParams & BTCSignMessageParams): Response<MessageSignature>;
|
|
913
|
+
|
|
914
|
+
type BTCSignPsbtParams = {
|
|
915
|
+
psbt: string;
|
|
916
|
+
coin?: string;
|
|
917
|
+
};
|
|
918
|
+
declare function btcSignPsbt(connectId: string, deviceId: string, params: CommonParams & BTCSignPsbtParams): Response<SignedPsbt>;
|
|
919
|
+
|
|
920
|
+
type SignedTransaction = {
|
|
921
|
+
signatures: string[];
|
|
922
|
+
serializedTx: string;
|
|
923
|
+
txid?: string;
|
|
924
|
+
};
|
|
925
|
+
type TransactionOptions = {
|
|
926
|
+
version?: number;
|
|
927
|
+
lock_time?: number;
|
|
928
|
+
expiry?: number;
|
|
929
|
+
overwintered?: boolean;
|
|
930
|
+
version_group_id?: number;
|
|
931
|
+
timestamp?: number;
|
|
932
|
+
branch_id?: number;
|
|
933
|
+
};
|
|
934
|
+
type RefTransaction = {
|
|
935
|
+
hash: string;
|
|
936
|
+
version: number;
|
|
937
|
+
inputs: PrevInput[];
|
|
938
|
+
bin_outputs: TxOutputBinType[];
|
|
939
|
+
outputs?: typeof undefined;
|
|
940
|
+
lock_time: number;
|
|
941
|
+
extra_data?: string;
|
|
942
|
+
expiry?: number;
|
|
943
|
+
overwintered?: boolean;
|
|
944
|
+
version_group_id?: number;
|
|
945
|
+
timestamp?: number;
|
|
946
|
+
branch_id?: number;
|
|
947
|
+
} | {
|
|
948
|
+
hash: string;
|
|
949
|
+
version: number;
|
|
950
|
+
inputs: TxInput[];
|
|
951
|
+
bin_outputs?: typeof undefined;
|
|
952
|
+
outputs: TxOutputType[];
|
|
953
|
+
lock_time: number;
|
|
954
|
+
extra_data?: string;
|
|
955
|
+
expiry?: number;
|
|
956
|
+
overwintered?: boolean;
|
|
957
|
+
version_group_id?: number;
|
|
958
|
+
timestamp?: number;
|
|
959
|
+
branch_id?: number;
|
|
960
|
+
};
|
|
961
|
+
type AccountAddress = {
|
|
962
|
+
address: string;
|
|
963
|
+
path: string;
|
|
964
|
+
transfers?: number;
|
|
965
|
+
balance?: string;
|
|
966
|
+
sent?: string;
|
|
967
|
+
received?: string;
|
|
968
|
+
};
|
|
969
|
+
type AccountAddresses = {
|
|
970
|
+
change: AccountAddress[];
|
|
971
|
+
used: AccountAddress[];
|
|
972
|
+
unused: AccountAddress[];
|
|
973
|
+
};
|
|
974
|
+
type BTCSignTransactionParams = {
|
|
975
|
+
coin: string;
|
|
976
|
+
inputs: TxInputType[];
|
|
977
|
+
outputs: TxOutputType[];
|
|
978
|
+
refTxs: RefTransaction[];
|
|
979
|
+
account?: {
|
|
980
|
+
addresses: AccountAddresses;
|
|
981
|
+
};
|
|
982
|
+
locktime?: number;
|
|
983
|
+
version?: number;
|
|
984
|
+
expiry?: number;
|
|
985
|
+
overwintered?: boolean;
|
|
986
|
+
versionGroupId?: number;
|
|
987
|
+
branchId?: number;
|
|
988
|
+
timestamp?: number;
|
|
989
|
+
};
|
|
990
|
+
declare function btcSignTransaction(connectId: string, deviceId: string, params: CommonParams & BTCSignTransactionParams): Response<SignedTransaction>;
|
|
991
|
+
|
|
992
|
+
type BTCVerifyMessageParams = {
|
|
993
|
+
address: string;
|
|
994
|
+
messageHex: string;
|
|
995
|
+
signature: string;
|
|
996
|
+
coin: string;
|
|
997
|
+
};
|
|
998
|
+
declare function btcVerifyMessage(connectId: string, deviceId: string, params: CommonParams & BTCVerifyMessageParams): Response<Success$1>;
|
|
999
|
+
|
|
1000
|
+
type StarcoinAddress = {
|
|
1001
|
+
path: string;
|
|
1002
|
+
} & StarcoinAddress$1;
|
|
1003
|
+
type StarcoinGetAddressParams = {
|
|
1004
|
+
path: string | number[];
|
|
1005
|
+
showOnOneKey?: boolean;
|
|
1006
|
+
};
|
|
1007
|
+
declare function starcoinGetAddress(connectId: string, deviceId: string, params: CommonParams & StarcoinGetAddressParams): Response<StarcoinAddress>;
|
|
1008
|
+
declare function starcoinGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1009
|
+
bundle?: StarcoinGetAddressParams[];
|
|
1010
|
+
}): Response<Array<StarcoinAddress>>;
|
|
1011
|
+
|
|
1012
|
+
type StarcoinPublicKey = {
|
|
1013
|
+
path: string;
|
|
1014
|
+
} & StarcoinPublicKey$1;
|
|
1015
|
+
type StarcoinGetPublicKeyParams = {
|
|
1016
|
+
path: string | number[];
|
|
1017
|
+
showOnOneKey?: boolean;
|
|
1018
|
+
};
|
|
1019
|
+
declare function starcoinGetPublicKey(connectId: string, deviceId: string, params: CommonParams & StarcoinGetPublicKeyParams): Response<StarcoinPublicKey>;
|
|
1020
|
+
declare function starcoinGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
1021
|
+
bundle?: StarcoinGetPublicKeyParams[];
|
|
1022
|
+
}): Response<Array<StarcoinPublicKey>>;
|
|
1023
|
+
|
|
1024
|
+
type StarcoinSignMessageParams = {
|
|
1025
|
+
path: string | number[];
|
|
1026
|
+
messageHex: string;
|
|
1027
|
+
};
|
|
1028
|
+
declare function starcoinSignMessage(connectId: string, deviceId: string, params: CommonParams & StarcoinSignMessageParams): Response<StarcoinMessageSignature>;
|
|
1029
|
+
|
|
1030
|
+
type StarcoinSignTransactionParams = {
|
|
1031
|
+
path: string | number[];
|
|
1032
|
+
rawTx: string;
|
|
1033
|
+
};
|
|
1034
|
+
declare function starcoinSignTransaction(connectId: string, deviceId: string, params: CommonParams & StarcoinSignTransactionParams): Response<StarcoinSignedTx>;
|
|
1035
|
+
|
|
1036
|
+
type StarcoinVerifyMessageParams = {
|
|
1037
|
+
publicKey: string;
|
|
1038
|
+
messageHex: string;
|
|
1039
|
+
signature: string;
|
|
1040
|
+
};
|
|
1041
|
+
declare function starcoinVerifyMessage(connectId: string, deviceId: string, params: CommonParams & StarcoinVerifyMessageParams): Response<Success$1>;
|
|
1042
|
+
|
|
1043
|
+
type NEMAddress = {
|
|
1044
|
+
path: string;
|
|
1045
|
+
} & NEMAddress$1;
|
|
1046
|
+
type NEMGetAddressParams = {
|
|
1047
|
+
path: string | number[];
|
|
1048
|
+
network?: number;
|
|
1049
|
+
showOnOneKey?: boolean;
|
|
1050
|
+
};
|
|
1051
|
+
declare function nemGetAddress(connectId: string, deviceId: string, params: CommonParams & NEMGetAddressParams): Response<NEMAddress>;
|
|
1052
|
+
declare function nemGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1053
|
+
bundle?: NEMGetAddressParams[];
|
|
1054
|
+
}): Response<Array<NEMAddress>>;
|
|
1055
|
+
|
|
1056
|
+
type MosaicID = {
|
|
1057
|
+
namespaceId: string;
|
|
1058
|
+
name: string;
|
|
1059
|
+
};
|
|
1060
|
+
type MosaicDefinition = {
|
|
1061
|
+
levy?: {
|
|
1062
|
+
type?: number;
|
|
1063
|
+
fee?: number;
|
|
1064
|
+
recipient?: string;
|
|
1065
|
+
mosaicId?: MosaicID;
|
|
1066
|
+
};
|
|
1067
|
+
id: MosaicID;
|
|
1068
|
+
description: string;
|
|
1069
|
+
properties?: Array<{
|
|
1070
|
+
name: 'divisibility' | 'initialSupply' | 'supplyMutable' | 'transferable';
|
|
1071
|
+
value: string;
|
|
1072
|
+
}>;
|
|
1073
|
+
};
|
|
1074
|
+
type NEMMosaic = {
|
|
1075
|
+
mosaicId: MosaicID;
|
|
1076
|
+
quantity: number;
|
|
1077
|
+
};
|
|
1078
|
+
type Modification = {
|
|
1079
|
+
modificationType: number;
|
|
1080
|
+
cosignatoryAccount: string;
|
|
1081
|
+
};
|
|
1082
|
+
type Message = {
|
|
1083
|
+
payload?: string;
|
|
1084
|
+
type?: number;
|
|
1085
|
+
publicKey?: string;
|
|
1086
|
+
};
|
|
1087
|
+
type TransactionCommon = {
|
|
1088
|
+
version: number;
|
|
1089
|
+
timeStamp: number;
|
|
1090
|
+
fee: number;
|
|
1091
|
+
deadline?: number;
|
|
1092
|
+
signer?: string;
|
|
1093
|
+
};
|
|
1094
|
+
type NEMTransferTransaction = TransactionCommon & {
|
|
1095
|
+
type: 0x0101;
|
|
1096
|
+
recipient: string;
|
|
1097
|
+
amount: number | string;
|
|
1098
|
+
mosaics?: NEMMosaic[];
|
|
1099
|
+
message?: Message;
|
|
1100
|
+
};
|
|
1101
|
+
type NEMImportanceTransaction = TransactionCommon & {
|
|
1102
|
+
type: 0x0801;
|
|
1103
|
+
importanceTransfer: {
|
|
1104
|
+
mode: number;
|
|
1105
|
+
publicKey: string;
|
|
1106
|
+
};
|
|
1107
|
+
};
|
|
1108
|
+
type NEMAggregateModificationTransaction = TransactionCommon & {
|
|
1109
|
+
type: 0x1001;
|
|
1110
|
+
modifications?: Modification[];
|
|
1111
|
+
minCosignatories: {
|
|
1112
|
+
relativeChange: number;
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
type NEMProvisionNamespaceTransaction = TransactionCommon & {
|
|
1116
|
+
type: 0x2001;
|
|
1117
|
+
newPart?: string;
|
|
1118
|
+
parent?: string;
|
|
1119
|
+
rentalFeeSink?: string;
|
|
1120
|
+
rentalFee?: number;
|
|
1121
|
+
};
|
|
1122
|
+
type NEMMosaicCreationTransaction = TransactionCommon & {
|
|
1123
|
+
type: 0x4001;
|
|
1124
|
+
mosaicDefinition: MosaicDefinition;
|
|
1125
|
+
creationFeeSink?: string;
|
|
1126
|
+
creationFee?: number;
|
|
1127
|
+
};
|
|
1128
|
+
type NEMSupplyChangeTransaction = TransactionCommon & {
|
|
1129
|
+
type: 0x4002;
|
|
1130
|
+
mosaicId: MosaicID;
|
|
1131
|
+
supplyType: number;
|
|
1132
|
+
delta?: number;
|
|
1133
|
+
};
|
|
1134
|
+
type Transaction = NEMTransferTransaction | NEMImportanceTransaction | NEMAggregateModificationTransaction | NEMProvisionNamespaceTransaction | NEMMosaicCreationTransaction | NEMSupplyChangeTransaction;
|
|
1135
|
+
type NEMMultisigTransaction = TransactionCommon & {
|
|
1136
|
+
type: 0x0102 | 0x1002 | 0x1004;
|
|
1137
|
+
otherTrans: Transaction;
|
|
1138
|
+
};
|
|
1139
|
+
type NEMTransaction = Transaction | NEMMultisigTransaction;
|
|
1140
|
+
type NEMSignTransactionParams = {
|
|
1141
|
+
path: string | number[];
|
|
1142
|
+
transaction: NEMTransaction;
|
|
1143
|
+
};
|
|
1144
|
+
declare function nemSignTransaction(connectId: string, deviceId: string, params: CommonParams & NEMSignTransactionParams): Response<NEMSignedTx>;
|
|
1145
|
+
|
|
1146
|
+
type SolanaAddress = {
|
|
1147
|
+
path: string;
|
|
1148
|
+
} & SolanaAddress$1;
|
|
1149
|
+
type SolanaGetAddressParams = {
|
|
1150
|
+
path: string | number[];
|
|
1151
|
+
showOnOneKey?: boolean;
|
|
1152
|
+
};
|
|
1153
|
+
declare function solGetAddress(connectId: string, deviceId: string, params: CommonParams & SolanaGetAddressParams): Response<SolanaAddress>;
|
|
1154
|
+
declare function solGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1155
|
+
bundle?: SolanaGetAddressParams[];
|
|
1156
|
+
}): Response<Array<SolanaAddress>>;
|
|
1157
|
+
|
|
1158
|
+
type SolanaSignedTx = {
|
|
1159
|
+
path: string;
|
|
1160
|
+
} & SolanaSignedTx$1;
|
|
1161
|
+
type SolanaSignTransactionParams = {
|
|
1162
|
+
path: string | number[];
|
|
1163
|
+
rawTx?: string;
|
|
1164
|
+
};
|
|
1165
|
+
declare function solSignTransaction(connectId: string, deviceId: string, params: CommonParams & SolanaSignTransactionParams): Response<SolanaSignedTx>;
|
|
1166
|
+
declare function solSignTransaction(connectId: string, deviceId: string, params: CommonParams & {
|
|
1167
|
+
bundle?: SolanaSignTransactionParams[];
|
|
1168
|
+
}): Response<Array<SolanaSignedTx>>;
|
|
1169
|
+
|
|
1170
|
+
type SolSignOffchainMessageResponse = {
|
|
1171
|
+
signature: string;
|
|
1172
|
+
pub?: string;
|
|
1173
|
+
};
|
|
1174
|
+
type SolSignOffchainMessageParams = {
|
|
1175
|
+
path: string | number[];
|
|
1176
|
+
messageHex: string;
|
|
1177
|
+
messageVersion?: SolanaOffChainMessageVersion;
|
|
1178
|
+
messageFormat?: SolanaOffChainMessageFormat;
|
|
1179
|
+
applicationDomainHex?: string;
|
|
1180
|
+
};
|
|
1181
|
+
declare function solSignOffchainMessage(connectId: string, deviceId: string, params: CommonParams & SolSignOffchainMessageParams): Response<SolSignOffchainMessageResponse>;
|
|
1182
|
+
|
|
1183
|
+
type SolSignMessageResponse = {
|
|
1184
|
+
signature: string;
|
|
1185
|
+
pub?: string;
|
|
1186
|
+
};
|
|
1187
|
+
type SolSignMessageParams = {
|
|
1188
|
+
path: string | number[];
|
|
1189
|
+
messageHex: string;
|
|
1190
|
+
};
|
|
1191
|
+
declare function solSignMessage(connectId: string, deviceId: string, params: CommonParams & SolSignMessageParams): Response<SolSignMessageResponse>;
|
|
1192
|
+
|
|
1193
|
+
type StellarAddress = {
|
|
1194
|
+
path: string;
|
|
1195
|
+
} & StellarAddress$1;
|
|
1196
|
+
type StellarGetAddressParams = {
|
|
1197
|
+
path: string | number[];
|
|
1198
|
+
showOnOneKey?: boolean;
|
|
1199
|
+
};
|
|
1200
|
+
declare function stellarGetAddress(connectId: string, deviceId: string, params: CommonParams & StellarGetAddressParams): Response<StellarAddress>;
|
|
1201
|
+
declare function stellarGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1202
|
+
bundle?: StellarGetAddressParams[];
|
|
1203
|
+
}): Response<Array<StellarAddress>>;
|
|
1204
|
+
|
|
1205
|
+
type StellarAsset = {
|
|
1206
|
+
type: 0 | 1 | 2;
|
|
1207
|
+
code: string;
|
|
1208
|
+
issuer?: string;
|
|
1209
|
+
};
|
|
1210
|
+
type StellarCreateAccountOperation = {
|
|
1211
|
+
type: 'createAccount';
|
|
1212
|
+
source?: string;
|
|
1213
|
+
destination: string;
|
|
1214
|
+
startingBalance: string;
|
|
1215
|
+
};
|
|
1216
|
+
type StellarPaymentOperation = {
|
|
1217
|
+
type: 'payment';
|
|
1218
|
+
source?: string;
|
|
1219
|
+
destination: string;
|
|
1220
|
+
asset?: StellarAsset | typeof undefined;
|
|
1221
|
+
amount: string;
|
|
1222
|
+
};
|
|
1223
|
+
type StellarPathPaymentOperation = {
|
|
1224
|
+
type: 'pathPayment';
|
|
1225
|
+
source?: string;
|
|
1226
|
+
sendAsset: StellarAsset;
|
|
1227
|
+
sendMax: string;
|
|
1228
|
+
destination: string;
|
|
1229
|
+
destAsset: StellarAsset;
|
|
1230
|
+
destAmount: string;
|
|
1231
|
+
path?: StellarAsset[];
|
|
1232
|
+
};
|
|
1233
|
+
type StellarPassiveOfferOperation = {
|
|
1234
|
+
type: 'createPassiveOffer';
|
|
1235
|
+
source?: string;
|
|
1236
|
+
buying: StellarAsset;
|
|
1237
|
+
selling: StellarAsset;
|
|
1238
|
+
amount: string;
|
|
1239
|
+
price: {
|
|
1240
|
+
n: number;
|
|
1241
|
+
d: number;
|
|
1242
|
+
};
|
|
1243
|
+
};
|
|
1244
|
+
type StellarManageOfferOperation = {
|
|
1245
|
+
type: 'manageOffer';
|
|
1246
|
+
source?: string;
|
|
1247
|
+
buying: StellarAsset;
|
|
1248
|
+
selling: StellarAsset;
|
|
1249
|
+
amount: string;
|
|
1250
|
+
offerId?: string;
|
|
1251
|
+
price: {
|
|
1252
|
+
n: number;
|
|
1253
|
+
d: number;
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1256
|
+
type StellarSetOptionsOperation = {
|
|
1257
|
+
type: 'setOptions';
|
|
1258
|
+
source?: string;
|
|
1259
|
+
signer?: {
|
|
1260
|
+
type: 0 | 1 | 2;
|
|
1261
|
+
key: string | Buffer;
|
|
1262
|
+
weight?: number;
|
|
1263
|
+
};
|
|
1264
|
+
inflationDest?: string;
|
|
1265
|
+
clearFlags?: number;
|
|
1266
|
+
setFlags?: number;
|
|
1267
|
+
masterWeight?: number | string;
|
|
1268
|
+
lowThreshold?: number | string;
|
|
1269
|
+
medThreshold?: number | string;
|
|
1270
|
+
highThreshold?: number | string;
|
|
1271
|
+
homeDomain?: string;
|
|
1272
|
+
};
|
|
1273
|
+
type StellarChangeTrustOperation = {
|
|
1274
|
+
type: 'changeTrust';
|
|
1275
|
+
source?: string;
|
|
1276
|
+
line: StellarAsset;
|
|
1277
|
+
limit?: string;
|
|
1278
|
+
};
|
|
1279
|
+
type StellarAllowTrustOperation = {
|
|
1280
|
+
type: 'allowTrust';
|
|
1281
|
+
source?: string;
|
|
1282
|
+
trustor: string;
|
|
1283
|
+
assetCode: string;
|
|
1284
|
+
assetType: number;
|
|
1285
|
+
authorize?: boolean | typeof undefined;
|
|
1286
|
+
};
|
|
1287
|
+
type StellarAccountMergeOperation = {
|
|
1288
|
+
type: 'accountMerge';
|
|
1289
|
+
source?: string;
|
|
1290
|
+
destination: string;
|
|
1291
|
+
};
|
|
1292
|
+
type StellarManageDataOperation = {
|
|
1293
|
+
type: 'manageData';
|
|
1294
|
+
source?: string;
|
|
1295
|
+
name: string;
|
|
1296
|
+
value?: Buffer | string;
|
|
1297
|
+
};
|
|
1298
|
+
type StellarBumpSequenceOperation = {
|
|
1299
|
+
type: 'bumpSequence';
|
|
1300
|
+
source?: string;
|
|
1301
|
+
bumpTo: string;
|
|
1302
|
+
};
|
|
1303
|
+
type StellarInflationOperation = {
|
|
1304
|
+
type: 'inflation';
|
|
1305
|
+
source?: string;
|
|
1306
|
+
};
|
|
1307
|
+
type StellarOperation = StellarCreateAccountOperation | StellarPaymentOperation | StellarPathPaymentOperation | StellarPassiveOfferOperation | StellarManageOfferOperation | StellarSetOptionsOperation | StellarChangeTrustOperation | StellarAllowTrustOperation | StellarAccountMergeOperation | StellarInflationOperation | StellarManageDataOperation | StellarBumpSequenceOperation;
|
|
1308
|
+
type StellarTransaction = {
|
|
1309
|
+
source: string;
|
|
1310
|
+
fee: number;
|
|
1311
|
+
sequence: string | number;
|
|
1312
|
+
timebounds?: {
|
|
1313
|
+
minTime: number;
|
|
1314
|
+
maxTime: number;
|
|
1315
|
+
};
|
|
1316
|
+
memo?: {
|
|
1317
|
+
type: 0 | 1 | 2 | 3 | 4;
|
|
1318
|
+
id?: string;
|
|
1319
|
+
text?: string;
|
|
1320
|
+
hash?: string | Buffer;
|
|
1321
|
+
};
|
|
1322
|
+
operations: StellarOperation[];
|
|
1323
|
+
};
|
|
1324
|
+
type StellarSignTransactionParams = {
|
|
1325
|
+
path: string | number[];
|
|
1326
|
+
networkPassphrase: string;
|
|
1327
|
+
transaction: StellarTransaction;
|
|
1328
|
+
};
|
|
1329
|
+
declare function stellarSignTransaction(connectId: string, deviceId: string, params: CommonParams & StellarSignTransactionParams): Response<StellarSignedTx>;
|
|
1330
|
+
|
|
1331
|
+
type TronAddress = {
|
|
1332
|
+
path: string;
|
|
1333
|
+
} & TronAddress$1;
|
|
1334
|
+
type TronGetAddressParams = {
|
|
1335
|
+
path: string | number[];
|
|
1336
|
+
showOnOneKey?: boolean;
|
|
1337
|
+
};
|
|
1338
|
+
declare function tronGetAddress(connectId: string, deviceId: string, params: CommonParams & TronGetAddressParams): Response<TronAddress>;
|
|
1339
|
+
declare function tronGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1340
|
+
bundle?: TronGetAddressParams[];
|
|
1341
|
+
}): Response<Array<TronAddress>>;
|
|
1342
|
+
|
|
1343
|
+
type TronTransferContract = {
|
|
1344
|
+
toAddress?: string;
|
|
1345
|
+
amount?: UintType;
|
|
1346
|
+
};
|
|
1347
|
+
type TronTriggerSmartContract = {
|
|
1348
|
+
contractAddress?: string;
|
|
1349
|
+
callValue?: number;
|
|
1350
|
+
data?: string;
|
|
1351
|
+
callTokenValue?: number;
|
|
1352
|
+
assetId?: number;
|
|
1353
|
+
};
|
|
1354
|
+
type TronFreezeBalanceV2Contract = {
|
|
1355
|
+
frozenBalance?: number;
|
|
1356
|
+
resource?: TronResourceCode;
|
|
1357
|
+
};
|
|
1358
|
+
type TronUnfreezeBalanceV2Contract = {
|
|
1359
|
+
resource?: TronResourceCode;
|
|
1360
|
+
unfreezeBalance?: number;
|
|
1361
|
+
};
|
|
1362
|
+
type TronDelegateResourceContract = {
|
|
1363
|
+
resource?: TronResourceCode;
|
|
1364
|
+
balance?: number;
|
|
1365
|
+
receiverAddress?: string;
|
|
1366
|
+
lock?: boolean;
|
|
1367
|
+
lockPeriod?: number;
|
|
1368
|
+
};
|
|
1369
|
+
type TronUnDelegateResourceContract = {
|
|
1370
|
+
resource?: TronResourceCode;
|
|
1371
|
+
balance?: number;
|
|
1372
|
+
receiverAddress?: string;
|
|
1373
|
+
};
|
|
1374
|
+
type TronWithdrawBalanceContract = {
|
|
1375
|
+
ownerAddress?: string;
|
|
1376
|
+
};
|
|
1377
|
+
type TronWithdrawExpireUnfreezeContract = undefined;
|
|
1378
|
+
type TronVoteWitnessContract = {
|
|
1379
|
+
votes?: {
|
|
1380
|
+
voteAddress?: string;
|
|
1381
|
+
voteCount?: number;
|
|
1382
|
+
}[];
|
|
1383
|
+
support?: boolean;
|
|
1384
|
+
};
|
|
1385
|
+
type TronCancelAllUnfreezeV2Contract = undefined;
|
|
1386
|
+
type TronTransactionContract = {
|
|
1387
|
+
transferContract?: TronTransferContract;
|
|
1388
|
+
triggerSmartContract?: TronTriggerSmartContract;
|
|
1389
|
+
freezeBalanceV2Contract?: TronFreezeBalanceV2Contract;
|
|
1390
|
+
unfreezeBalanceV2Contract?: TronUnfreezeBalanceV2Contract;
|
|
1391
|
+
cancelAllUnfreezeV2Contract?: TronCancelAllUnfreezeV2Contract;
|
|
1392
|
+
delegateResourceContract?: TronDelegateResourceContract;
|
|
1393
|
+
unDelegateResourceContract?: TronUnDelegateResourceContract;
|
|
1394
|
+
withdrawBalanceContract?: TronWithdrawBalanceContract;
|
|
1395
|
+
withdrawExpireUnfreezeContract?: TronWithdrawExpireUnfreezeContract;
|
|
1396
|
+
voteWitnessContract?: TronVoteWitnessContract;
|
|
1397
|
+
};
|
|
1398
|
+
type TronTransaction = {
|
|
1399
|
+
refBlockBytes: string;
|
|
1400
|
+
refBlockHash: string;
|
|
1401
|
+
expiration: number;
|
|
1402
|
+
data?: string;
|
|
1403
|
+
contract: TronTransactionContract;
|
|
1404
|
+
timestamp: number;
|
|
1405
|
+
feeLimit?: number;
|
|
1406
|
+
};
|
|
1407
|
+
type TronSignTransactionParams = {
|
|
1408
|
+
path: string | number[];
|
|
1409
|
+
transaction: TronTransaction;
|
|
1410
|
+
};
|
|
1411
|
+
declare function tronSignTransaction(connectId: string, deviceId: string, params: CommonParams & TronSignTransactionParams): Response<TronSignedTx>;
|
|
1412
|
+
|
|
1413
|
+
type TronSignMessageParams = {
|
|
1414
|
+
path: string | number[];
|
|
1415
|
+
messageHex: string;
|
|
1416
|
+
messageType?: 'V1' | 'V2';
|
|
1417
|
+
};
|
|
1418
|
+
declare function tronSignMessage(connectId: string, deviceId: string, params: CommonParams & TronSignMessageParams): Response<TronMessageSignature>;
|
|
1419
|
+
|
|
1420
|
+
type ConfluxAddress = {
|
|
1421
|
+
path: string;
|
|
1422
|
+
} & ConfluxAddress$1;
|
|
1423
|
+
type ConfluxGetAddressParams = {
|
|
1424
|
+
path: string | number[];
|
|
1425
|
+
chainId?: number;
|
|
1426
|
+
showOnOneKey?: boolean;
|
|
1427
|
+
};
|
|
1428
|
+
declare function confluxGetAddress(connectId: string, deviceId: string, params: CommonParams & ConfluxGetAddressParams): Response<ConfluxAddress>;
|
|
1429
|
+
declare function confluxGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1430
|
+
bundle?: ConfluxGetAddressParams[];
|
|
1431
|
+
}): Response<Array<ConfluxAddress>>;
|
|
1432
|
+
|
|
1433
|
+
type ConfluxSignMessageParams = {
|
|
1434
|
+
path: string | number[];
|
|
1435
|
+
messageHex: string;
|
|
1436
|
+
};
|
|
1437
|
+
declare function confluxSignMessage(connectId: string, deviceId: string, params: CommonParams & ConfluxSignMessageParams): Response<ConfluxMessageSignature>;
|
|
1438
|
+
|
|
1439
|
+
type ConfluxSignMessageCIP23Params = {
|
|
1440
|
+
path: string | number[];
|
|
1441
|
+
domainHash: string;
|
|
1442
|
+
messageHash: string;
|
|
1443
|
+
};
|
|
1444
|
+
declare function confluxSignMessageCIP23(connectId: string, deviceId: string, params: CommonParams & ConfluxSignMessageCIP23Params): Response<ConfluxMessageSignature>;
|
|
1445
|
+
|
|
1446
|
+
type ConfluxSignedTx = {
|
|
1447
|
+
v: string;
|
|
1448
|
+
r: string;
|
|
1449
|
+
s: string;
|
|
1450
|
+
};
|
|
1451
|
+
type ConfluxTransaction = {
|
|
1452
|
+
to: string;
|
|
1453
|
+
value: string;
|
|
1454
|
+
gasLimit: string;
|
|
1455
|
+
gasPrice: string;
|
|
1456
|
+
nonce: string;
|
|
1457
|
+
epochHeight: string;
|
|
1458
|
+
storageLimit: string;
|
|
1459
|
+
chainId?: number;
|
|
1460
|
+
data?: string;
|
|
1461
|
+
data_initial_chunk?: string;
|
|
1462
|
+
data_length?: string;
|
|
1463
|
+
};
|
|
1464
|
+
type ConfluxSignTransactionParams = {
|
|
1465
|
+
path: string | number[];
|
|
1466
|
+
transaction: ConfluxTransaction;
|
|
1467
|
+
};
|
|
1468
|
+
declare function confluxSignTransaction(connectId: string, deviceId: string, params: CommonParams & ConfluxSignTransactionParams): Response<ConfluxSignedTx>;
|
|
1469
|
+
|
|
1470
|
+
type NearAddress = {
|
|
1471
|
+
path: string;
|
|
1472
|
+
} & NearAddress$1;
|
|
1473
|
+
type NearGetAddressParams = {
|
|
1474
|
+
path: string | number[];
|
|
1475
|
+
showOnOneKey?: boolean;
|
|
1476
|
+
};
|
|
1477
|
+
declare function nearGetAddress(connectId: string, deviceId: string, params: CommonParams & NearGetAddressParams): Response<NearAddress>;
|
|
1478
|
+
declare function nearGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1479
|
+
bundle?: NearGetAddressParams[];
|
|
1480
|
+
}): Response<Array<NearAddress>>;
|
|
1481
|
+
|
|
1482
|
+
type NearSignTransactionParams = {
|
|
1483
|
+
path: string | number[];
|
|
1484
|
+
rawTx: string;
|
|
1485
|
+
};
|
|
1486
|
+
declare function nearSignTransaction(connectId: string, deviceId: string, params: CommonParams & NearSignTransactionParams): Response<NearSignedTx>;
|
|
1487
|
+
|
|
1488
|
+
type AptosAddress = {
|
|
1489
|
+
path: string;
|
|
1490
|
+
pub?: string;
|
|
1491
|
+
publicKey?: string;
|
|
1492
|
+
} & AptosAddress$1;
|
|
1493
|
+
type AptosGetAddressParams = {
|
|
1494
|
+
path: string | number[];
|
|
1495
|
+
showOnOneKey?: boolean;
|
|
1496
|
+
};
|
|
1497
|
+
declare function aptosGetAddress(connectId: string, deviceId: string, params: CommonParams & AptosGetAddressParams): Response<AptosAddress>;
|
|
1498
|
+
declare function aptosGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1499
|
+
bundle?: AptosGetAddressParams[];
|
|
1500
|
+
}): Response<Array<AptosAddress>>;
|
|
1501
|
+
|
|
1502
|
+
type AptosPublicKey = {
|
|
1503
|
+
path: string;
|
|
1504
|
+
pub: string;
|
|
1505
|
+
publicKey?: string;
|
|
1506
|
+
};
|
|
1507
|
+
type AptosGetPublicKeyParams = {
|
|
1508
|
+
path: string | number[];
|
|
1509
|
+
showOnOneKey?: boolean;
|
|
1510
|
+
};
|
|
1511
|
+
declare function aptosGetPublicKey(connectId: string, deviceId: string, params: CommonParams & AptosGetPublicKeyParams): Response<AptosPublicKey>;
|
|
1512
|
+
declare function aptosGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
1513
|
+
bundle?: AptosGetPublicKeyParams[];
|
|
1514
|
+
}): Response<Array<AptosPublicKey>>;
|
|
1515
|
+
|
|
1516
|
+
type AptosMessageSignature = {
|
|
1517
|
+
path: string;
|
|
1518
|
+
fullMessage: string;
|
|
1519
|
+
} & AptosMessageSignature$1;
|
|
1520
|
+
declare type AptosMessagePayload = {
|
|
1521
|
+
address?: string;
|
|
1522
|
+
chainId?: string;
|
|
1523
|
+
application?: string;
|
|
1524
|
+
nonce: string;
|
|
1525
|
+
message: string;
|
|
1526
|
+
};
|
|
1527
|
+
type AptosSignMessageParams = {
|
|
1528
|
+
path: string | number[];
|
|
1529
|
+
payload: AptosMessagePayload;
|
|
1530
|
+
};
|
|
1531
|
+
declare function aptosSignMessage(connectId: string, deviceId: string, params: CommonParams & AptosSignMessageParams): Response<AptosMessageSignature>;
|
|
1532
|
+
|
|
1533
|
+
type AptosSignInMessageSignature = {
|
|
1534
|
+
path: string;
|
|
1535
|
+
} & AptosMessageSignature$1;
|
|
1536
|
+
type AptosSignInMessageParams = {
|
|
1537
|
+
path: string | number[];
|
|
1538
|
+
payload: string;
|
|
1539
|
+
};
|
|
1540
|
+
declare function aptosSignInMessage(connectId: string, deviceId: string, params: CommonParams & AptosSignInMessageParams): Response<AptosSignInMessageSignature>;
|
|
1541
|
+
|
|
1542
|
+
type AptosSignedTx = {
|
|
1543
|
+
path: string;
|
|
1544
|
+
} & AptosSignedTx$1;
|
|
1545
|
+
type AptosSignTransactionParams = {
|
|
1546
|
+
path: string;
|
|
1547
|
+
rawTx?: string;
|
|
1548
|
+
transactionType?: number;
|
|
1549
|
+
};
|
|
1550
|
+
declare function aptosSignTransaction(connectId: string, deviceId: string, params: CommonParams & AptosSignTransactionParams): Response<AptosSignedTx>;
|
|
1551
|
+
|
|
1552
|
+
type AlgoAddress = {
|
|
1553
|
+
path: string;
|
|
1554
|
+
} & AlgorandAddress;
|
|
1555
|
+
type AlgoGetAddressParams = {
|
|
1556
|
+
path: string | number[];
|
|
1557
|
+
showOnOneKey?: boolean;
|
|
1558
|
+
};
|
|
1559
|
+
declare function algoGetAddress(connectId: string, deviceId: string, params: CommonParams & AlgoGetAddressParams): Response<AlgoAddress>;
|
|
1560
|
+
declare function algoGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1561
|
+
bundle?: AlgoGetAddressParams[];
|
|
1562
|
+
}): Response<Array<AlgoAddress>>;
|
|
1563
|
+
|
|
1564
|
+
type AlgoSignedTx = {
|
|
1565
|
+
path: string;
|
|
1566
|
+
} & AlgorandSignedTx;
|
|
1567
|
+
type AlgoSignTransactionParams = {
|
|
1568
|
+
path: string | number[];
|
|
1569
|
+
rawTx?: string;
|
|
1570
|
+
};
|
|
1571
|
+
declare function algoSignTransaction(connectId: string, deviceId: string, params: CommonParams & AlgoSignTransactionParams): Response<AlgoSignedTx>;
|
|
1572
|
+
|
|
1573
|
+
type CosmosAddress = {
|
|
1574
|
+
path: string;
|
|
1575
|
+
} & CosmosAddress$1;
|
|
1576
|
+
type CosmosGetAddressParams = {
|
|
1577
|
+
path: string | number[];
|
|
1578
|
+
hrp?: string;
|
|
1579
|
+
showOnOneKey?: boolean;
|
|
1580
|
+
};
|
|
1581
|
+
declare function cosmosGetAddress(connectId: string, deviceId: string, params: CommonParams & CosmosGetAddressParams): Response<CosmosAddress>;
|
|
1582
|
+
declare function cosmosGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1583
|
+
bundle?: CosmosGetAddressParams[];
|
|
1584
|
+
}): Response<Array<CosmosAddress>>;
|
|
1585
|
+
|
|
1586
|
+
type CosmosPublicKey = {
|
|
1587
|
+
path: string;
|
|
1588
|
+
pub: string;
|
|
1589
|
+
publicKey?: string;
|
|
1590
|
+
};
|
|
1591
|
+
type CosmosGetPublicKeyParams = {
|
|
1592
|
+
path: string | number[];
|
|
1593
|
+
curve?: string;
|
|
1594
|
+
showOnOneKey?: boolean;
|
|
1595
|
+
};
|
|
1596
|
+
declare function cosmosGetPublicKey(connectId: string, deviceId: string, params: CommonParams & CosmosGetPublicKeyParams): Response<CosmosPublicKey>;
|
|
1597
|
+
declare function cosmosGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
1598
|
+
bundle?: CosmosGetPublicKeyParams[];
|
|
1599
|
+
}): Response<Array<CosmosPublicKey>>;
|
|
1600
|
+
|
|
1601
|
+
type CosmosSignedTx = {
|
|
1602
|
+
path: string;
|
|
1603
|
+
} & CosmosSignedTx$1;
|
|
1604
|
+
type CosmosSignTransactionParams = {
|
|
1605
|
+
path: string | number[];
|
|
1606
|
+
rawTx?: string;
|
|
1607
|
+
};
|
|
1608
|
+
declare function cosmosSignTransaction(connectId: string, deviceId: string, params: CommonParams & CosmosSignTransactionParams): Response<CosmosSignedTx>;
|
|
1609
|
+
|
|
1610
|
+
type XrpAddress = {
|
|
1611
|
+
path: string;
|
|
1612
|
+
pub?: string;
|
|
1613
|
+
publicKey?: string;
|
|
1614
|
+
address: string;
|
|
1615
|
+
};
|
|
1616
|
+
type XrpGetAddressParams = {
|
|
1617
|
+
path: string | number[];
|
|
1618
|
+
showOnOneKey?: boolean;
|
|
1619
|
+
};
|
|
1620
|
+
declare function xrpGetAddress(connectId: string, deviceId: string, params: CommonParams & XrpGetAddressParams): Response<XrpAddress>;
|
|
1621
|
+
declare function xrpGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1622
|
+
bundle?: XrpGetAddressParams[];
|
|
1623
|
+
}): Response<XrpAddress[]>;
|
|
1624
|
+
|
|
1625
|
+
type XrpSignTransactionResponse = {
|
|
1626
|
+
serializedTx: string;
|
|
1627
|
+
signature: string;
|
|
1628
|
+
};
|
|
1629
|
+
type XrpPayment = {
|
|
1630
|
+
amount: string;
|
|
1631
|
+
destination: string;
|
|
1632
|
+
destinationTag?: number;
|
|
1633
|
+
};
|
|
1634
|
+
type XrpTransaction = {
|
|
1635
|
+
fee: string;
|
|
1636
|
+
flags?: number;
|
|
1637
|
+
sequence: number;
|
|
1638
|
+
maxLedgerVersion?: number;
|
|
1639
|
+
payment: XrpPayment;
|
|
1640
|
+
};
|
|
1641
|
+
declare function xrpSignTransaction(connectId: string, deviceId: string, params: CommonParams & XrpTransaction): Response<XrpSignTransactionResponse>;
|
|
1642
|
+
|
|
1643
|
+
type SuiAddress = {
|
|
1644
|
+
path: string;
|
|
1645
|
+
pub?: string;
|
|
1646
|
+
publicKey?: string;
|
|
1647
|
+
} & SuiAddress$1;
|
|
1648
|
+
type SuiGetAddressParams = {
|
|
1649
|
+
path: string | number[];
|
|
1650
|
+
showOnOneKey?: boolean;
|
|
1651
|
+
};
|
|
1652
|
+
declare function suiGetAddress(connectId: string, deviceId: string, params: CommonParams & SuiGetAddressParams): Response<SuiAddress>;
|
|
1653
|
+
declare function suiGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1654
|
+
bundle?: SuiGetAddressParams[];
|
|
1655
|
+
}): Response<Array<SuiAddress>>;
|
|
1656
|
+
|
|
1657
|
+
type SuiPublicKey = {
|
|
1658
|
+
path: string;
|
|
1659
|
+
pub: string;
|
|
1660
|
+
publicKey?: string;
|
|
1661
|
+
};
|
|
1662
|
+
type SuiGetPublicKeyParams = {
|
|
1663
|
+
path: string | number[];
|
|
1664
|
+
showOnOneKey?: boolean;
|
|
1665
|
+
};
|
|
1666
|
+
declare function suiGetPublicKey(connectId: string, deviceId: string, params: CommonParams & SuiGetPublicKeyParams): Response<SuiPublicKey>;
|
|
1667
|
+
declare function suiGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
1668
|
+
bundle?: SuiGetPublicKeyParams[];
|
|
1669
|
+
}): Response<Array<SuiPublicKey>>;
|
|
1670
|
+
|
|
1671
|
+
type SuiSignMessageParams = {
|
|
1672
|
+
path: string | number[];
|
|
1673
|
+
messageHex: string;
|
|
1674
|
+
};
|
|
1675
|
+
declare function suiSignMessage(connectId: string, deviceId: string, params: CommonParams & SuiSignMessageParams): Response<SuiMessageSignature>;
|
|
1676
|
+
|
|
1677
|
+
type SuiSignedTx = {
|
|
1678
|
+
path: string;
|
|
1679
|
+
} & AptosSignedTx$1;
|
|
1680
|
+
type SuiSignTransactionParams = {
|
|
1681
|
+
path: string | number[];
|
|
1682
|
+
rawTx?: string;
|
|
1683
|
+
};
|
|
1684
|
+
declare function suiSignTransaction(connectId: string, deviceId: string, params: CommonParams & SuiSignTransactionParams): Response<SuiSignedTx>;
|
|
1685
|
+
|
|
1686
|
+
type CardanoGetAddressMethodParams = {
|
|
1687
|
+
addressParameters: CardanoAddressParameters;
|
|
1688
|
+
networkId: number;
|
|
1689
|
+
protocolMagic: number;
|
|
1690
|
+
derivationType: number;
|
|
1691
|
+
address?: string;
|
|
1692
|
+
isCheck?: boolean;
|
|
1693
|
+
showOnOneKey: boolean;
|
|
1694
|
+
};
|
|
1695
|
+
type CardanoGetAddressParams = {
|
|
1696
|
+
address_parameters: CardanoAddressParametersType;
|
|
1697
|
+
network_id: number;
|
|
1698
|
+
protocol_magic: number;
|
|
1699
|
+
derivation_type: number;
|
|
1700
|
+
address: string;
|
|
1701
|
+
show_display: boolean;
|
|
1702
|
+
};
|
|
1703
|
+
type CardanoAddress = {
|
|
1704
|
+
addressParameters: CardanoAddressParameters;
|
|
1705
|
+
protocolMagic: number;
|
|
1706
|
+
networkId: number;
|
|
1707
|
+
serializedPath: string;
|
|
1708
|
+
serializedStakingPath: string;
|
|
1709
|
+
address: string;
|
|
1710
|
+
xpub?: string;
|
|
1711
|
+
stakeAddress?: string;
|
|
1712
|
+
};
|
|
1713
|
+
declare function cardanoGetAddress(connectId: string, deviceId: string, params: CommonParams & CardanoGetAddressMethodParams): Response<CardanoAddress>;
|
|
1714
|
+
declare function cardanoGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1715
|
+
bundle?: CardanoGetAddressMethodParams[];
|
|
1716
|
+
}): Response<CardanoAddress[]>;
|
|
1717
|
+
|
|
1718
|
+
type CardanoPublicKey = {
|
|
1719
|
+
path: number[];
|
|
1720
|
+
serializedPath: string;
|
|
1721
|
+
xpub: string;
|
|
1722
|
+
node: Messages.HDNodeType;
|
|
1723
|
+
};
|
|
1724
|
+
type CardanoPublicKeyMethodParams = {
|
|
1725
|
+
path: string | number[];
|
|
1726
|
+
derivationType?: number;
|
|
1727
|
+
showOnOneKey?: boolean;
|
|
1728
|
+
};
|
|
1729
|
+
declare function cardanoGetPublicKey(connectId: string, deviceId: string, params: CommonParams & CardanoPublicKeyMethodParams): Response<CardanoPublicKey>;
|
|
1730
|
+
declare function cardanoGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
1731
|
+
bundle?: CardanoPublicKeyMethodParams[];
|
|
1732
|
+
}): Response<CardanoPublicKey[]>;
|
|
1733
|
+
|
|
1734
|
+
declare function cardanoSignTransaction(connectId: string, deviceId: string, params: CommonParams & CardanoSignTransaction): Response<CardanoSignedTxData>;
|
|
1735
|
+
|
|
1736
|
+
type CardanoSignMessageParams = {
|
|
1737
|
+
address_n: number[];
|
|
1738
|
+
message: string;
|
|
1739
|
+
derivation_type: number;
|
|
1740
|
+
network_id: number;
|
|
1741
|
+
address_type: number;
|
|
1742
|
+
};
|
|
1743
|
+
type CardanoSignMessageMethodParams = {
|
|
1744
|
+
path: string;
|
|
1745
|
+
message: string;
|
|
1746
|
+
derivationType: number;
|
|
1747
|
+
networkId: number;
|
|
1748
|
+
addressType?: Messages.CardanoAddressType;
|
|
1749
|
+
};
|
|
1750
|
+
declare function cardanoSignMessage(connectId: string, deviceId: string, params: CommonParams & CardanoSignMessageMethodParams): Response<CardanoMessageSignature>;
|
|
1751
|
+
|
|
1752
|
+
type FilecoinAddress = {
|
|
1753
|
+
path: string;
|
|
1754
|
+
} & FilecoinAddress$1;
|
|
1755
|
+
type FilecoinGetAddressParams = {
|
|
1756
|
+
path: string | number[];
|
|
1757
|
+
showOnOneKey?: boolean;
|
|
1758
|
+
isTestnet?: boolean;
|
|
1759
|
+
};
|
|
1760
|
+
declare function filecoinGetAddress(connectId: string, deviceId: string, params: CommonParams & FilecoinGetAddressParams): Response<FilecoinAddress>;
|
|
1761
|
+
declare function filecoinGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1762
|
+
bundle?: FilecoinGetAddressParams[];
|
|
1763
|
+
}): Response<Array<FilecoinAddress>>;
|
|
1764
|
+
|
|
1765
|
+
type FilecoinSignedTx = {
|
|
1766
|
+
path: string;
|
|
1767
|
+
} & FilecoinSignedTx$1;
|
|
1768
|
+
type FilecoinSignTransactionParams = {
|
|
1769
|
+
path: string | number[];
|
|
1770
|
+
rawTx?: string;
|
|
1771
|
+
isTestnet?: boolean;
|
|
1772
|
+
};
|
|
1773
|
+
declare function filecoinSignTransaction(connectId: string, deviceId: string, params: CommonParams & FilecoinSignTransactionParams): Response<FilecoinSignedTx>;
|
|
1774
|
+
declare function filecoinSignTransaction(connectId: string, deviceId: string, params: CommonParams & {
|
|
1775
|
+
bundle?: FilecoinSignTransactionParams[];
|
|
1776
|
+
}): Response<Array<FilecoinSignedTx>>;
|
|
1777
|
+
|
|
1778
|
+
type PolkadotAddress = {
|
|
1779
|
+
path: string;
|
|
1780
|
+
pub: string;
|
|
1781
|
+
publicKey?: string;
|
|
1782
|
+
} & PolkadotAddress$1;
|
|
1783
|
+
type PolkadotGetAddressParams = {
|
|
1784
|
+
path: string | number[];
|
|
1785
|
+
prefix: number;
|
|
1786
|
+
network: string;
|
|
1787
|
+
showOnOneKey?: boolean;
|
|
1788
|
+
};
|
|
1789
|
+
declare function polkadotGetAddress(connectId: string, deviceId: string, params: CommonParams & PolkadotGetAddressParams): Response<PolkadotAddress>;
|
|
1790
|
+
declare function polkadotGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1791
|
+
bundle?: PolkadotGetAddressParams[];
|
|
1792
|
+
}): Response<Array<PolkadotAddress>>;
|
|
1793
|
+
|
|
1794
|
+
type PolkadotSignedTx = {
|
|
1795
|
+
path: string;
|
|
1796
|
+
} & PolkadotSignedTx$1;
|
|
1797
|
+
type PolkadotSignTransactionParams = {
|
|
1798
|
+
path: string | number[];
|
|
1799
|
+
network: string;
|
|
1800
|
+
rawTx?: string;
|
|
1801
|
+
};
|
|
1802
|
+
declare function polkadotSignTransaction(connectId: string, deviceId: string, params: CommonParams & PolkadotSignTransactionParams): Response<PolkadotSignedTx>;
|
|
1803
|
+
|
|
1804
|
+
type KaspaAddress = {
|
|
1805
|
+
path: string;
|
|
1806
|
+
} & KaspaAddress$1;
|
|
1807
|
+
type KaspaGetAddressParams = {
|
|
1808
|
+
path: string | number[];
|
|
1809
|
+
prefix?: string;
|
|
1810
|
+
scheme?: string;
|
|
1811
|
+
showOnOneKey?: boolean;
|
|
1812
|
+
useTweak?: boolean;
|
|
1813
|
+
};
|
|
1814
|
+
declare function kaspaGetAddress(connectId: string, deviceId: string, params: CommonParams & KaspaGetAddressParams): Response<KaspaAddress>;
|
|
1815
|
+
declare function kaspaGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1816
|
+
bundle?: KaspaGetAddressParams[];
|
|
1817
|
+
}): Response<Array<KaspaAddress>>;
|
|
1818
|
+
|
|
1819
|
+
declare enum SignatureType {
|
|
1820
|
+
SIGHASH_ALL = 1,
|
|
1821
|
+
SIGHASH_NONE = 2,
|
|
1822
|
+
SIGHASH_SINGLE = 3,
|
|
1823
|
+
SIGHASH_FORKID = 64,
|
|
1824
|
+
SIGHASH_ANYONECANPAY = 128
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
type KaspaSignature = {
|
|
1828
|
+
index: number;
|
|
1829
|
+
signature: string;
|
|
1830
|
+
};
|
|
1831
|
+
type KaspaSignInputParams = {
|
|
1832
|
+
path: string | number[];
|
|
1833
|
+
prevTxId: string;
|
|
1834
|
+
outputIndex: number;
|
|
1835
|
+
sequenceNumber: number | string;
|
|
1836
|
+
output: {
|
|
1837
|
+
satoshis: number | string;
|
|
1838
|
+
script: string;
|
|
1839
|
+
};
|
|
1840
|
+
sigOpCount?: number;
|
|
1841
|
+
};
|
|
1842
|
+
type KaspaSignOutputParams = {
|
|
1843
|
+
satoshis: number | string;
|
|
1844
|
+
script: string;
|
|
1845
|
+
scriptVersion: number;
|
|
1846
|
+
};
|
|
1847
|
+
type KaspaSignTransactionParams = {
|
|
1848
|
+
version: number;
|
|
1849
|
+
inputs: KaspaSignInputParams[];
|
|
1850
|
+
outputs: KaspaSignOutputParams[];
|
|
1851
|
+
lockTime: number | string;
|
|
1852
|
+
sigHashType?: SignatureType;
|
|
1853
|
+
sigOpCount?: number;
|
|
1854
|
+
subNetworkID?: string;
|
|
1855
|
+
scheme?: string;
|
|
1856
|
+
prefix?: string;
|
|
1857
|
+
useTweak?: boolean;
|
|
1858
|
+
};
|
|
1859
|
+
declare function kaspaSignTransaction(connectId: string, deviceId: string, params: CommonParams & KaspaSignTransactionParams): Response<KaspaSignature[]>;
|
|
1860
|
+
|
|
1861
|
+
type NexaAddress = {
|
|
1862
|
+
path: string;
|
|
1863
|
+
pub: string;
|
|
1864
|
+
address: string;
|
|
1865
|
+
};
|
|
1866
|
+
type NexaGetAddressParams = {
|
|
1867
|
+
path: string | number[];
|
|
1868
|
+
prefix?: string;
|
|
1869
|
+
scheme?: string;
|
|
1870
|
+
showOnOneKey?: boolean;
|
|
1871
|
+
};
|
|
1872
|
+
declare function nexaGetAddress(connectId: string, deviceId: string, params: CommonParams & NexaGetAddressParams): Response<NexaAddress>;
|
|
1873
|
+
declare function nexaGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
1874
|
+
bundle?: NexaGetAddressParams[];
|
|
1875
|
+
}): Response<Array<NexaAddress>>;
|
|
1876
|
+
|
|
1877
|
+
type NexaSignature = {
|
|
1878
|
+
index: number;
|
|
1879
|
+
signature: string;
|
|
1880
|
+
};
|
|
1881
|
+
type NexaSignInputParams = {
|
|
1882
|
+
path: string;
|
|
1883
|
+
message: string;
|
|
1884
|
+
prefix: string;
|
|
1885
|
+
};
|
|
1886
|
+
type NexaSignOutputParams = {
|
|
1887
|
+
satoshis: number | string;
|
|
1888
|
+
script: string;
|
|
1889
|
+
scriptVersion: number;
|
|
1890
|
+
};
|
|
1891
|
+
type NexaSignTransactionParams = {
|
|
1892
|
+
inputs: NexaSignInputParams[];
|
|
1893
|
+
};
|
|
1894
|
+
declare function nexaSignTransaction(connectId: string, deviceId: string, params: CommonParams & NexaSignTransactionParams): Response<NexaSignature[]>;
|
|
1895
|
+
|
|
1896
|
+
type NostrPublicKey = {
|
|
1897
|
+
npub?: string;
|
|
1898
|
+
pub?: string;
|
|
1899
|
+
publicKey?: string;
|
|
1900
|
+
path: string;
|
|
1901
|
+
};
|
|
1902
|
+
interface NostrPublicKeyParams {
|
|
1903
|
+
path: string | number[];
|
|
1904
|
+
showOnOneKey?: boolean;
|
|
1905
|
+
}
|
|
1906
|
+
declare function nostrGetPublicKey(connectId: string, deviceId: string, params: CommonParams & NostrPublicKeyParams): Response<NostrPublicKey>;
|
|
1907
|
+
declare function nostrGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
1908
|
+
bundle?: NostrPublicKeyParams[];
|
|
1909
|
+
}): Response<Array<NostrPublicKey>>;
|
|
1910
|
+
|
|
1911
|
+
declare enum EventKind {
|
|
1912
|
+
Metadata = 0,
|
|
1913
|
+
Text = 1,
|
|
1914
|
+
RelayRec = 2,
|
|
1915
|
+
Contacts = 3,
|
|
1916
|
+
DM = 4,
|
|
1917
|
+
Deleted = 5,
|
|
1918
|
+
Reaction = 7,
|
|
1919
|
+
BadgeAward = 8,
|
|
1920
|
+
ChannelCreation = 40,
|
|
1921
|
+
ChannelMetadata = 41,
|
|
1922
|
+
ChannelMessage = 42,
|
|
1923
|
+
ChannelHideMessage = 43,
|
|
1924
|
+
Reporting = 1984,
|
|
1925
|
+
ZapRequest = 9734,
|
|
1926
|
+
Zap = 9735,
|
|
1927
|
+
RelayListMetadata = 10002,
|
|
1928
|
+
ClientAuthentication = 22242,
|
|
1929
|
+
NostrConnect = 24133,
|
|
1930
|
+
ProfileBadges = 30008,
|
|
1931
|
+
BadgeDefinition = 30009,
|
|
1932
|
+
LongFormContent = 30023,
|
|
1933
|
+
ApplicationSpecificData = 30078
|
|
1934
|
+
}
|
|
1935
|
+
type NostrEvent = {
|
|
1936
|
+
id?: string;
|
|
1937
|
+
kind: EventKind;
|
|
1938
|
+
pubkey?: string;
|
|
1939
|
+
content: string;
|
|
1940
|
+
tags: string[][];
|
|
1941
|
+
created_at: number;
|
|
1942
|
+
sig?: string;
|
|
1943
|
+
};
|
|
1944
|
+
type NostrSignedEvent = {
|
|
1945
|
+
path: string;
|
|
1946
|
+
event: NostrEvent;
|
|
1947
|
+
};
|
|
1948
|
+
interface NostrSignEventParams {
|
|
1949
|
+
path: string | number[];
|
|
1950
|
+
event: NostrEvent;
|
|
1951
|
+
}
|
|
1952
|
+
declare function nostrSignEvent(connectId: string, deviceId: string, params: CommonParams & NostrSignEventParams): Response<NostrSignedEvent>;
|
|
1953
|
+
|
|
1954
|
+
interface NostrEncryptMessageParams {
|
|
1955
|
+
path: string | number[];
|
|
1956
|
+
pubkey: string;
|
|
1957
|
+
plaintext: string;
|
|
1958
|
+
showOnOneKey?: boolean;
|
|
1959
|
+
}
|
|
1960
|
+
type NostrEncryptedMessageResponse = {
|
|
1961
|
+
path: string;
|
|
1962
|
+
pubkey: string;
|
|
1963
|
+
plaintext: string;
|
|
1964
|
+
encryptedMessage: string;
|
|
1965
|
+
};
|
|
1966
|
+
declare function nostrEncryptMessage(connectId: string, deviceId: string, params: CommonParams & NostrEncryptMessageParams): Response<NostrEncryptedMessageResponse>;
|
|
1967
|
+
|
|
1968
|
+
interface NostrDecryptMessageParams {
|
|
1969
|
+
path: string | number[];
|
|
1970
|
+
pubkey: string;
|
|
1971
|
+
ciphertext: string;
|
|
1972
|
+
showOnOneKey?: boolean;
|
|
1973
|
+
}
|
|
1974
|
+
type NostrDecryptedMessageResponse = {
|
|
1975
|
+
path: string;
|
|
1976
|
+
pubkey: string;
|
|
1977
|
+
ciphertext: string;
|
|
1978
|
+
decryptedMessage: string;
|
|
1979
|
+
};
|
|
1980
|
+
declare function nostrDecryptMessage(connectId: string, deviceId: string, params: CommonParams & NostrDecryptMessageParams): Response<NostrDecryptedMessageResponse>;
|
|
1981
|
+
|
|
1982
|
+
interface NostrSignSchnorrParams {
|
|
1983
|
+
path: string | number[];
|
|
1984
|
+
hash: string;
|
|
1985
|
+
}
|
|
1986
|
+
type NostrSignedSchnorrResponse = {
|
|
1987
|
+
path: string;
|
|
1988
|
+
rawHash: string;
|
|
1989
|
+
signature: string;
|
|
1990
|
+
};
|
|
1991
|
+
declare function nostrSignSchnorr(connectId: string, deviceId: string, params: CommonParams & NostrSignSchnorrParams): Response<NostrSignedSchnorrResponse>;
|
|
1992
|
+
|
|
1993
|
+
interface LnurlAuth {
|
|
1994
|
+
pub?: string;
|
|
1995
|
+
publickey?: string;
|
|
1996
|
+
path?: string;
|
|
1997
|
+
signature?: string;
|
|
1998
|
+
}
|
|
1999
|
+
interface LnurlAuthParams {
|
|
2000
|
+
domain: string;
|
|
2001
|
+
k1: string;
|
|
2002
|
+
}
|
|
2003
|
+
declare function lnurlAuth(connectId: string, deviceId: string, params: CommonParams & LnurlAuthParams): Response<LnurlAuth>;
|
|
2004
|
+
|
|
2005
|
+
type NervosAddress = {
|
|
2006
|
+
path: string;
|
|
2007
|
+
} & NervosAddress$1;
|
|
2008
|
+
type NervosGetAddressParams = {
|
|
2009
|
+
path: string | number[];
|
|
2010
|
+
network: string;
|
|
2011
|
+
showOnOneKey?: boolean;
|
|
2012
|
+
};
|
|
2013
|
+
declare function nervosGetAddress(connectId: string, deviceId: string, params: CommonParams & NervosGetAddressParams): Response<NervosAddress>;
|
|
2014
|
+
declare function nervosGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
2015
|
+
bundle?: NervosGetAddressParams[];
|
|
2016
|
+
}): Response<Array<NervosAddress>>;
|
|
2017
|
+
|
|
2018
|
+
type NervosSignedTx = {
|
|
2019
|
+
path: string;
|
|
2020
|
+
} & NervosSignedTx$1;
|
|
2021
|
+
type NervosSignTransactionParams = {
|
|
2022
|
+
path: string | number[];
|
|
2023
|
+
network: string;
|
|
2024
|
+
rawTx: string;
|
|
2025
|
+
witnessHex: string;
|
|
2026
|
+
};
|
|
2027
|
+
declare function nervosSignTransaction(connectId: string, deviceId: string, params: CommonParams & NervosSignTransactionParams): Response<NervosSignedTx>;
|
|
2028
|
+
|
|
2029
|
+
type DnxAddress = {
|
|
2030
|
+
path: string;
|
|
2031
|
+
} & DnxAddress$1;
|
|
2032
|
+
type DnxGetAddressParams = {
|
|
2033
|
+
path: string | number[];
|
|
2034
|
+
showOnOneKey?: boolean;
|
|
2035
|
+
};
|
|
2036
|
+
declare function dnxGetAddress(connectId: string, deviceId: string, params: CommonParams & DnxGetAddressParams): Response<DnxAddress>;
|
|
2037
|
+
declare function dnxGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
2038
|
+
bundle?: DnxGetAddressParams[];
|
|
2039
|
+
}): Response<Array<DnxAddress>>;
|
|
2040
|
+
|
|
2041
|
+
type DnxTxKey = {
|
|
2042
|
+
ephemeralTxSecKey: string;
|
|
2043
|
+
ephemeralTxPubKey: string;
|
|
2044
|
+
};
|
|
2045
|
+
type DnxSignTransactionParams = {
|
|
2046
|
+
path: string | number[];
|
|
2047
|
+
inputs: {
|
|
2048
|
+
prevIndex: number;
|
|
2049
|
+
globalIndex: number;
|
|
2050
|
+
txPubkey: string;
|
|
2051
|
+
prevOutPubkey: string;
|
|
2052
|
+
amount: UintType;
|
|
2053
|
+
}[];
|
|
2054
|
+
toAddress: string;
|
|
2055
|
+
amount: UintType;
|
|
2056
|
+
fee: UintType;
|
|
2057
|
+
paymentIdHex?: string;
|
|
2058
|
+
};
|
|
2059
|
+
type DnxSignature = {
|
|
2060
|
+
path: string;
|
|
2061
|
+
txKey: DnxTxKey;
|
|
2062
|
+
computedKeyImages: string[];
|
|
2063
|
+
signatures: string[];
|
|
2064
|
+
outputKeys: string[];
|
|
2065
|
+
};
|
|
2066
|
+
declare function dnxSignTransaction(connectId: string, deviceId: string, params: CommonParams & DnxSignTransactionParams): Response<DnxSignature>;
|
|
2067
|
+
|
|
2068
|
+
type TonAddress = {
|
|
2069
|
+
path: string;
|
|
2070
|
+
pub: string;
|
|
2071
|
+
publicKey?: string;
|
|
2072
|
+
address: string;
|
|
2073
|
+
};
|
|
2074
|
+
type TonGetAddressParams = {
|
|
2075
|
+
path: string | number[];
|
|
2076
|
+
showOnOneKey?: boolean;
|
|
2077
|
+
walletVersion?: TonWalletVersion;
|
|
2078
|
+
isBounceable?: boolean;
|
|
2079
|
+
isTestnetOnly?: boolean;
|
|
2080
|
+
workchain?: TonWorkChain;
|
|
2081
|
+
walletId?: number;
|
|
2082
|
+
};
|
|
2083
|
+
declare function tonGetAddress(connectId: string, deviceId: string, params: CommonParams & TonGetAddressParams): Response<TonAddress>;
|
|
2084
|
+
declare function tonGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
2085
|
+
bundle?: TonGetAddressParams[];
|
|
2086
|
+
}): Response<Array<TonAddress>>;
|
|
2087
|
+
|
|
2088
|
+
type TonSignMessageParams = {
|
|
2089
|
+
path: string | number[];
|
|
2090
|
+
destination: string;
|
|
2091
|
+
jettonMasterAddress?: string;
|
|
2092
|
+
jettonWalletAddress?: string;
|
|
2093
|
+
tonAmount: UintType;
|
|
2094
|
+
jettonAmount?: UintType;
|
|
2095
|
+
fwdFee?: UintType;
|
|
2096
|
+
comment?: string;
|
|
2097
|
+
isRawData?: boolean;
|
|
2098
|
+
mode?: number;
|
|
2099
|
+
seqno: number;
|
|
2100
|
+
expireAt: UintType;
|
|
2101
|
+
walletVersion?: TonWalletVersion;
|
|
2102
|
+
walletId?: number;
|
|
2103
|
+
workchain?: TonWorkChain;
|
|
2104
|
+
isBounceable?: boolean;
|
|
2105
|
+
isTestnetOnly?: boolean;
|
|
2106
|
+
extDestination?: string[];
|
|
2107
|
+
extTonAmount?: UintType[];
|
|
2108
|
+
extPayload?: string[];
|
|
2109
|
+
initState?: string;
|
|
2110
|
+
signingMessageRepr?: string;
|
|
2111
|
+
};
|
|
2112
|
+
type TonSignedMessageResponse = {
|
|
2113
|
+
skip_validate: boolean;
|
|
2114
|
+
} & TonSignedMessage;
|
|
2115
|
+
declare function tonSignMessage(connectId: string, deviceId: string, params: CommonParams & TonSignMessageParams): Response<TonSignedMessageResponse>;
|
|
2116
|
+
|
|
2117
|
+
type TonSignProofParams = {
|
|
2118
|
+
path: string | number[];
|
|
2119
|
+
appdomain: string;
|
|
2120
|
+
comment?: string;
|
|
2121
|
+
expireAt: UintType;
|
|
2122
|
+
walletVersion?: TonWalletVersion;
|
|
2123
|
+
walletId?: number;
|
|
2124
|
+
workchain?: TonWorkChain;
|
|
2125
|
+
isBounceable?: boolean;
|
|
2126
|
+
isTestnetOnly?: boolean;
|
|
2127
|
+
};
|
|
2128
|
+
declare function tonSignProof(connectId: string, deviceId: string, params: CommonParams & TonSignProofParams): Response<TonSignedProof>;
|
|
2129
|
+
|
|
2130
|
+
type ScdoAddress = {
|
|
2131
|
+
path: string;
|
|
2132
|
+
} & ScdoAddress$1;
|
|
2133
|
+
type ScdoGetAddressParams = {
|
|
2134
|
+
path: string | number[];
|
|
2135
|
+
showOnOneKey?: boolean;
|
|
2136
|
+
};
|
|
2137
|
+
declare function scdoGetAddress(connectId: string, deviceId: string, params: CommonParams & ScdoGetAddressParams): Response<ScdoAddress>;
|
|
2138
|
+
declare function scdoGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
2139
|
+
bundle?: ScdoGetAddressParams[];
|
|
2140
|
+
}): Response<Array<ScdoAddress>>;
|
|
2141
|
+
|
|
2142
|
+
type ScdoSignMessageParams = {
|
|
2143
|
+
path: string | number[];
|
|
2144
|
+
messageHex: string;
|
|
2145
|
+
};
|
|
2146
|
+
declare function scdoSignMessage(connectId: string, deviceId: string, params: CommonParams & ScdoSignMessageParams): Response<ScdoSignedMessage>;
|
|
2147
|
+
|
|
2148
|
+
type ScdoSignedTx = {
|
|
2149
|
+
path: string;
|
|
2150
|
+
} & ScdoSignedTx$1;
|
|
2151
|
+
type ScdoSignTransactionParams = {
|
|
2152
|
+
path: string | number[];
|
|
2153
|
+
nonce: string;
|
|
2154
|
+
gasPrice: string;
|
|
2155
|
+
gasLimit: string;
|
|
2156
|
+
to: string;
|
|
2157
|
+
value: string;
|
|
2158
|
+
timestamp?: string;
|
|
2159
|
+
data?: string;
|
|
2160
|
+
txType?: number;
|
|
2161
|
+
};
|
|
2162
|
+
declare function scdoSignTransaction(connectId: string, deviceId: string, params: CommonParams & ScdoSignTransactionParams): Response<ScdoSignedTx>;
|
|
2163
|
+
|
|
2164
|
+
type AlephiumAddress = {
|
|
2165
|
+
path: string;
|
|
2166
|
+
publicKey?: string;
|
|
2167
|
+
pub?: string;
|
|
2168
|
+
address: string;
|
|
2169
|
+
derivedPath: string;
|
|
2170
|
+
};
|
|
2171
|
+
type AlephiumGetAddressParams = {
|
|
2172
|
+
path: string | number[];
|
|
2173
|
+
showOnOneKey?: boolean;
|
|
2174
|
+
includePublicKey?: boolean;
|
|
2175
|
+
group: number | undefined | null;
|
|
2176
|
+
};
|
|
2177
|
+
declare function alephiumGetAddress(connectId: string, deviceId: string, params: CommonParams & AlephiumGetAddressParams): Response<AlephiumAddress>;
|
|
2178
|
+
declare function alephiumGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
2179
|
+
bundle?: AlephiumGetAddressParams[];
|
|
2180
|
+
}): Response<Array<AlephiumAddress>>;
|
|
2181
|
+
|
|
2182
|
+
type AlephiumSignMessageParams = {
|
|
2183
|
+
path: string | number[];
|
|
2184
|
+
messageHex: string;
|
|
2185
|
+
messageType: 'alephium' | 'sha256' | 'blake2b' | 'identity';
|
|
2186
|
+
};
|
|
2187
|
+
declare function alephiumSignMessage(connectId: string, deviceId: string, params: CommonParams & AlephiumSignMessageParams): Response<AlephiumMessageSignature>;
|
|
2188
|
+
|
|
2189
|
+
type AlephiumSignedTx = {
|
|
2190
|
+
path: string;
|
|
2191
|
+
} & AlephiumSignedTx$1;
|
|
2192
|
+
type AlephiumSignTransactionParams = {
|
|
2193
|
+
path: string | number[];
|
|
2194
|
+
rawTx: string;
|
|
2195
|
+
scriptOpt?: string;
|
|
2196
|
+
};
|
|
2197
|
+
declare function alephiumSignTransaction(connectId: string, deviceId: string, params: CommonParams & AlephiumSignTransactionParams): Response<AlephiumSignedTx>;
|
|
2198
|
+
|
|
2199
|
+
type BenfenAddress = {
|
|
2200
|
+
path: string;
|
|
2201
|
+
pub?: string;
|
|
2202
|
+
} & BenfenAddress$1;
|
|
2203
|
+
type BenfenGetAddressParams = {
|
|
2204
|
+
path: string | number[];
|
|
2205
|
+
showOnOneKey?: boolean;
|
|
2206
|
+
};
|
|
2207
|
+
declare function benfenGetAddress(connectId: string, deviceId: string, params: CommonParams & BenfenGetAddressParams): Response<BenfenAddress>;
|
|
2208
|
+
declare function benfenGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
2209
|
+
bundle?: BenfenGetAddressParams[];
|
|
2210
|
+
}): Response<Array<BenfenAddress>>;
|
|
2211
|
+
|
|
2212
|
+
type BenfenPublicKey = {
|
|
2213
|
+
path: string;
|
|
2214
|
+
pub: string;
|
|
2215
|
+
};
|
|
2216
|
+
type BenfenGetPublicKeyParams = {
|
|
2217
|
+
path: string | number[];
|
|
2218
|
+
showOnOneKey?: boolean;
|
|
2219
|
+
};
|
|
2220
|
+
declare function benfenGetPublicKey(connectId: string, deviceId: string, params: CommonParams & BenfenGetPublicKeyParams): Response<BenfenPublicKey>;
|
|
2221
|
+
declare function benfenGetPublicKey(connectId: string, deviceId: string, params: CommonParams & {
|
|
2222
|
+
bundle?: BenfenGetPublicKeyParams[];
|
|
2223
|
+
}): Response<Array<BenfenPublicKey>>;
|
|
2224
|
+
|
|
2225
|
+
type BenfenSignedTx = {
|
|
2226
|
+
path: string;
|
|
2227
|
+
coinType?: string;
|
|
2228
|
+
} & AptosSignedTx$1;
|
|
2229
|
+
type BenfenSignTransactionParams = {
|
|
2230
|
+
path: string | number[];
|
|
2231
|
+
coinType?: string;
|
|
2232
|
+
rawTx?: string;
|
|
2233
|
+
};
|
|
2234
|
+
declare function benfenSignTransaction(connectId: string, deviceId: string, params: CommonParams & BenfenSignTransactionParams): Response<BenfenSignedTx>;
|
|
2235
|
+
|
|
2236
|
+
type BenfenSignMessageParams = {
|
|
2237
|
+
path: string | number[];
|
|
2238
|
+
messageHex: string;
|
|
2239
|
+
};
|
|
2240
|
+
declare function benfenSignMessage(connectId: string, deviceId: string, params: CommonParams & BenfenSignMessageParams): Response<BenfenMessageSignature>;
|
|
2241
|
+
|
|
2242
|
+
type NeoAddress = {
|
|
2243
|
+
path: string;
|
|
2244
|
+
address: string;
|
|
2245
|
+
pub: string;
|
|
2246
|
+
};
|
|
2247
|
+
type NeoGetAddressParams = {
|
|
2248
|
+
path: string | number[];
|
|
2249
|
+
showOnOneKey?: boolean;
|
|
2250
|
+
};
|
|
2251
|
+
declare function neoGetAddress(connectId: string, deviceId: string, params: CommonParams & NeoGetAddressParams): Response<NeoAddress>;
|
|
2252
|
+
declare function neoGetAddress(connectId: string, deviceId: string, params: CommonParams & {
|
|
2253
|
+
bundle?: NeoGetAddressParams[];
|
|
2254
|
+
}): Response<Array<NeoAddress>>;
|
|
2255
|
+
|
|
2256
|
+
type NeoUnsignedTx = {
|
|
2257
|
+
path: string;
|
|
2258
|
+
rawTx: string;
|
|
2259
|
+
magicNumber?: number;
|
|
2260
|
+
};
|
|
2261
|
+
type NeoSignedTx = {
|
|
2262
|
+
publicKey: string;
|
|
2263
|
+
signature: string;
|
|
2264
|
+
};
|
|
2265
|
+
declare function neoSignTransaction(connectId: string, deviceId: string, params: CommonParams & NeoUnsignedTx): Response<NeoSignedTx>;
|
|
2266
|
+
|
|
2267
|
+
type CoreApi = {
|
|
2268
|
+
init: typeof init$1;
|
|
2269
|
+
on: typeof on;
|
|
2270
|
+
off: typeof off;
|
|
2271
|
+
emit: (event: string, ...args: any[]) => void;
|
|
2272
|
+
removeAllListeners: typeof removeAllListeners;
|
|
2273
|
+
dispose: () => void;
|
|
2274
|
+
call: (params: any) => Promise<any>;
|
|
2275
|
+
uiResponse: typeof uiResponse;
|
|
2276
|
+
cancel: (connectId?: string) => void;
|
|
2277
|
+
updateSettings: typeof updateSettings;
|
|
2278
|
+
switchTransport: (env: ConnectSettings['env']) => Promise<{
|
|
2279
|
+
success: boolean;
|
|
2280
|
+
}>;
|
|
2281
|
+
getLogs: typeof getLogs;
|
|
2282
|
+
testInitializeDeviceDuration: typeof testInitializeDeviceDuration;
|
|
2283
|
+
checkAllFirmwareRelease: typeof checkAllFirmwareRelease;
|
|
2284
|
+
checkBridgeStatus: typeof checkBridgeStatus;
|
|
2285
|
+
checkBridgeRelease: typeof checkBridgeRelease;
|
|
2286
|
+
checkBootloaderRelease: typeof checkBootloaderRelease;
|
|
2287
|
+
searchDevices: typeof searchDevices;
|
|
2288
|
+
promptWebDeviceAccess: typeof promptWebDeviceAccess;
|
|
2289
|
+
getFeatures: typeof getFeatures;
|
|
2290
|
+
getUkeyFeatures: typeof getUkeyFeatures;
|
|
2291
|
+
getPassphraseState: typeof getPassphraseState;
|
|
2292
|
+
deviceBackup: typeof deviceBackup;
|
|
2293
|
+
deviceChangePin: typeof deviceChangePin;
|
|
2294
|
+
deviceFlags: typeof deviceFlags;
|
|
2295
|
+
deviceRebootToBoardloader: typeof deviceRebootToBoardloader;
|
|
2296
|
+
deviceRebootToBootloader: typeof deviceRebootToBootloader;
|
|
2297
|
+
deviceRecovery: typeof deviceRecovery;
|
|
2298
|
+
deviceReset: typeof deviceReset;
|
|
2299
|
+
deviceSettings: typeof deviceSettings;
|
|
2300
|
+
deviceUpdateReboot: typeof deviceUpdateReboot;
|
|
2301
|
+
deviceUploadResource: typeof deviceUploadResource;
|
|
2302
|
+
deviceSupportFeatures: typeof deviceSupportFeatures;
|
|
2303
|
+
deviceVerify: typeof deviceVerify;
|
|
2304
|
+
deviceWipe: typeof deviceWipe;
|
|
2305
|
+
deviceFullyUploadResource: typeof deviceFullyUploadResource;
|
|
2306
|
+
deviceUpdateBootloader: typeof deviceUpdateBootloader;
|
|
2307
|
+
deviceLock: typeof deviceLock;
|
|
2308
|
+
deviceUnlock: typeof deviceUnlock;
|
|
2309
|
+
deviceCancel: typeof deviceCancel;
|
|
2310
|
+
getNextU2FCounter: typeof getNextU2FCounter;
|
|
2311
|
+
setU2FCounter: typeof setU2FCounter;
|
|
2312
|
+
checkFirmwareRelease: typeof checkFirmwareRelease;
|
|
2313
|
+
checkBLEFirmwareRelease: typeof checkBLEFirmwareRelease;
|
|
2314
|
+
firmwareUpdate: typeof firmwareUpdate;
|
|
2315
|
+
firmwareUpdateV2: typeof firmwareUpdateV2;
|
|
2316
|
+
firmwareUpdateV3: typeof firmwareUpdateV3;
|
|
2317
|
+
emmcFileWrite: typeof emmcFileWrite;
|
|
2318
|
+
cipherKeyValue: typeof cipherKeyValue;
|
|
2319
|
+
allNetworkGetAddress: typeof allNetworkGetAddress;
|
|
2320
|
+
allNetworkGetAddressByLoop: typeof allNetworkGetAddressByLoop;
|
|
2321
|
+
evmGetAddress: typeof evmGetAddress;
|
|
2322
|
+
evmGetPublicKey: typeof evmGetPublicKey;
|
|
2323
|
+
evmSignMessage: typeof evmSignMessage;
|
|
2324
|
+
evmSignMessageEIP712: typeof evmSignMessageEIP712;
|
|
2325
|
+
evmSignTransaction: typeof evmSignTransaction;
|
|
2326
|
+
evmSignTypedData: typeof evmSignTypedData;
|
|
2327
|
+
evmVerifyMessage: typeof evmVerifyMessage;
|
|
2328
|
+
btcGetAddress: typeof btcGetAddress;
|
|
2329
|
+
btcGetPublicKey: typeof btcGetPublicKey;
|
|
2330
|
+
btcSignMessage: typeof btcSignMessage;
|
|
2331
|
+
btcSignPsbt: typeof btcSignPsbt;
|
|
2332
|
+
btcSignTransaction: typeof btcSignTransaction;
|
|
2333
|
+
btcVerifyMessage: typeof btcVerifyMessage;
|
|
2334
|
+
starcoinGetAddress: typeof starcoinGetAddress;
|
|
2335
|
+
starcoinGetPublicKey: typeof starcoinGetPublicKey;
|
|
2336
|
+
starcoinSignMessage: typeof starcoinSignMessage;
|
|
2337
|
+
starcoinSignTransaction: typeof starcoinSignTransaction;
|
|
2338
|
+
starcoinVerifyMessage: typeof starcoinVerifyMessage;
|
|
2339
|
+
nemGetAddress: typeof nemGetAddress;
|
|
2340
|
+
nemSignTransaction: typeof nemSignTransaction;
|
|
2341
|
+
solGetAddress: typeof solGetAddress;
|
|
2342
|
+
solSignTransaction: typeof solSignTransaction;
|
|
2343
|
+
solSignOffchainMessage: typeof solSignOffchainMessage;
|
|
2344
|
+
solSignMessage: typeof solSignMessage;
|
|
2345
|
+
stellarGetAddress: typeof stellarGetAddress;
|
|
2346
|
+
stellarSignTransaction: typeof stellarSignTransaction;
|
|
2347
|
+
tronGetAddress: typeof tronGetAddress;
|
|
2348
|
+
tronSignMessage: typeof tronSignMessage;
|
|
2349
|
+
tronSignTransaction: typeof tronSignTransaction;
|
|
2350
|
+
confluxGetAddress: typeof confluxGetAddress;
|
|
2351
|
+
confluxSignMessage: typeof confluxSignMessage;
|
|
2352
|
+
confluxSignMessageCIP23: typeof confluxSignMessageCIP23;
|
|
2353
|
+
confluxSignTransaction: typeof confluxSignTransaction;
|
|
2354
|
+
nearGetAddress: typeof nearGetAddress;
|
|
2355
|
+
nearSignTransaction: typeof nearSignTransaction;
|
|
2356
|
+
aptosGetAddress: typeof aptosGetAddress;
|
|
2357
|
+
aptosGetPublicKey: typeof aptosGetPublicKey;
|
|
2358
|
+
aptosSignMessage: typeof aptosSignMessage;
|
|
2359
|
+
aptosSignInMessage: typeof aptosSignInMessage;
|
|
2360
|
+
aptosSignTransaction: typeof aptosSignTransaction;
|
|
2361
|
+
algoGetAddress: typeof algoGetAddress;
|
|
2362
|
+
algoSignTransaction: typeof algoSignTransaction;
|
|
2363
|
+
cosmosGetAddress: typeof cosmosGetAddress;
|
|
2364
|
+
cosmosGetPublicKey: typeof cosmosGetPublicKey;
|
|
2365
|
+
cosmosSignTransaction: typeof cosmosSignTransaction;
|
|
2366
|
+
xrpGetAddress: typeof xrpGetAddress;
|
|
2367
|
+
xrpSignTransaction: typeof xrpSignTransaction;
|
|
2368
|
+
suiGetAddress: typeof suiGetAddress;
|
|
2369
|
+
suiGetPublicKey: typeof suiGetPublicKey;
|
|
2370
|
+
suiSignMessage: typeof suiSignMessage;
|
|
2371
|
+
suiSignTransaction: typeof suiSignTransaction;
|
|
2372
|
+
cardanoGetAddress: typeof cardanoGetAddress;
|
|
2373
|
+
cardanoGetPublicKey: typeof cardanoGetPublicKey;
|
|
2374
|
+
cardanoSignTransaction: typeof cardanoSignTransaction;
|
|
2375
|
+
cardanoSignMessage: typeof cardanoSignMessage;
|
|
2376
|
+
filecoinGetAddress: typeof filecoinGetAddress;
|
|
2377
|
+
filecoinSignTransaction: typeof filecoinSignTransaction;
|
|
2378
|
+
polkadotGetAddress: typeof polkadotGetAddress;
|
|
2379
|
+
polkadotSignTransaction: typeof polkadotSignTransaction;
|
|
2380
|
+
kaspaGetAddress: typeof kaspaGetAddress;
|
|
2381
|
+
kaspaSignTransaction: typeof kaspaSignTransaction;
|
|
2382
|
+
nexaGetAddress: typeof nexaGetAddress;
|
|
2383
|
+
nexaSignTransaction: typeof nexaSignTransaction;
|
|
2384
|
+
nostrGetPublicKey: typeof nostrGetPublicKey;
|
|
2385
|
+
nostrSignEvent: typeof nostrSignEvent;
|
|
2386
|
+
nostrEncryptMessage: typeof nostrEncryptMessage;
|
|
2387
|
+
nostrDecryptMessage: typeof nostrDecryptMessage;
|
|
2388
|
+
nostrSignSchnorr: typeof nostrSignSchnorr;
|
|
2389
|
+
lnurlAuth: typeof lnurlAuth;
|
|
2390
|
+
nervosGetAddress: typeof nervosGetAddress;
|
|
2391
|
+
nervosSignTransaction: typeof nervosSignTransaction;
|
|
2392
|
+
dnxGetAddress: typeof dnxGetAddress;
|
|
2393
|
+
dnxSignTransaction: typeof dnxSignTransaction;
|
|
2394
|
+
tonGetAddress: typeof tonGetAddress;
|
|
2395
|
+
tonSignMessage: typeof tonSignMessage;
|
|
2396
|
+
tonSignProof: typeof tonSignProof;
|
|
2397
|
+
scdoGetAddress: typeof scdoGetAddress;
|
|
2398
|
+
scdoSignMessage: typeof scdoSignMessage;
|
|
2399
|
+
scdoSignTransaction: typeof scdoSignTransaction;
|
|
2400
|
+
alephiumGetAddress: typeof alephiumGetAddress;
|
|
2401
|
+
alephiumSignMessage: typeof alephiumSignMessage;
|
|
2402
|
+
alephiumSignTransaction: typeof alephiumSignTransaction;
|
|
2403
|
+
benfenGetAddress: typeof benfenGetAddress;
|
|
2404
|
+
benfenGetPublicKey: typeof benfenGetPublicKey;
|
|
2405
|
+
benfenSignTransaction: typeof benfenSignTransaction;
|
|
2406
|
+
benfenSignMessage: typeof benfenSignMessage;
|
|
2407
|
+
neoGetAddress: typeof neoGetAddress;
|
|
2408
|
+
neoSignTransaction: typeof neoSignTransaction;
|
|
2409
|
+
};
|
|
2410
|
+
|
|
2411
|
+
interface FirmwareRange {
|
|
2412
|
+
'1': {
|
|
2413
|
+
min: string;
|
|
2414
|
+
max: string;
|
|
2415
|
+
};
|
|
2416
|
+
'2': {
|
|
2417
|
+
min: string;
|
|
2418
|
+
max: string;
|
|
2419
|
+
};
|
|
2420
|
+
}
|
|
2421
|
+
type MajorVersion = 1 | 2;
|
|
2422
|
+
type VersionArray = [MajorVersion, number, number];
|
|
2423
|
+
type FirmwareRelease = {
|
|
2424
|
+
required: boolean;
|
|
2425
|
+
url: string;
|
|
2426
|
+
fingerprint: string;
|
|
2427
|
+
changelog: string;
|
|
2428
|
+
min_bridge_version: [number, number, number];
|
|
2429
|
+
version: VersionArray;
|
|
2430
|
+
min_firmware_version: VersionArray;
|
|
2431
|
+
min_bootloader_version: VersionArray;
|
|
2432
|
+
bootloader_version?: VersionArray;
|
|
2433
|
+
url_bitcoinonly?: string;
|
|
2434
|
+
fingerprint_bitcoinonly?: string;
|
|
2435
|
+
notes?: string;
|
|
2436
|
+
rollout?: number;
|
|
2437
|
+
channel?: string;
|
|
2438
|
+
};
|
|
2439
|
+
type ReleaseInfo = {
|
|
2440
|
+
changelog: FirmwareRelease[] | null;
|
|
2441
|
+
release: FirmwareRelease;
|
|
2442
|
+
isLatest: boolean;
|
|
2443
|
+
latest: FirmwareRelease;
|
|
2444
|
+
isRequired: boolean | null;
|
|
2445
|
+
isNewer: boolean | null;
|
|
2446
|
+
};
|
|
2447
|
+
type TransportReleaseStatus = 'valid' | 'outdated';
|
|
2448
|
+
|
|
2449
|
+
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
2450
|
+
type MessageFactoryFn<Group, Event> = UnionToIntersection<Event extends {
|
|
2451
|
+
type: string;
|
|
2452
|
+
} ? Event extends {
|
|
2453
|
+
payload: any;
|
|
2454
|
+
} ? (type: Event['type'], payload: Event['payload']) => {
|
|
2455
|
+
event: Group;
|
|
2456
|
+
type: Event['type'];
|
|
2457
|
+
payload: Event['payload'];
|
|
2458
|
+
} : (type: Event['type'], payload?: undefined) => {
|
|
2459
|
+
event: Group;
|
|
2460
|
+
type: Event['type'];
|
|
2461
|
+
payload: undefined;
|
|
2462
|
+
} : never>;
|
|
2463
|
+
|
|
2464
|
+
declare const DEVICE_EVENT = "DEVICE_EVENT";
|
|
2465
|
+
declare const DEVICE: {
|
|
2466
|
+
readonly CONNECT: "device-connect";
|
|
2467
|
+
readonly CONNECT_UNACQUIRED: "device-connect_unacquired";
|
|
2468
|
+
readonly DISCONNECT: "device-disconnect";
|
|
2469
|
+
readonly CHANGED: "device-changed";
|
|
2470
|
+
readonly ACQUIRE: "device-acquire";
|
|
2471
|
+
readonly RELEASE: "device-release";
|
|
2472
|
+
readonly ACQUIRED: "device-acquired";
|
|
2473
|
+
readonly RELEASED: "device-released";
|
|
2474
|
+
readonly USED_ELSEWHERE: "device-used_elsewhere";
|
|
2475
|
+
readonly UNREADABLE: "unreadable-device";
|
|
2476
|
+
readonly LOADING: "device-loading";
|
|
2477
|
+
readonly BUTTON: "button";
|
|
2478
|
+
readonly PIN: "pin";
|
|
2479
|
+
readonly PASSPHRASE: "passphrase";
|
|
2480
|
+
readonly PASSPHRASE_ON_DEVICE: "passphrase_on_device";
|
|
2481
|
+
readonly WORD: "word";
|
|
2482
|
+
readonly SUPPORT_FEATURES: "support_features";
|
|
2483
|
+
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "select_device_in_bootloader_for_web_device";
|
|
2484
|
+
readonly FEATURES: "features";
|
|
2485
|
+
};
|
|
2486
|
+
interface DeviceConnnectRequest {
|
|
2487
|
+
type: typeof DEVICE.CONNECT;
|
|
2488
|
+
payload: {
|
|
2489
|
+
device: KnownDevice;
|
|
2490
|
+
};
|
|
2491
|
+
}
|
|
2492
|
+
interface DeviceDisconnnectRequest {
|
|
2493
|
+
type: typeof DEVICE.DISCONNECT;
|
|
2494
|
+
payload: {
|
|
2495
|
+
device: KnownDevice;
|
|
2496
|
+
};
|
|
2497
|
+
}
|
|
2498
|
+
interface DeviceButtonRequestPayload extends Omit<Messages.ButtonRequest, 'code'> {
|
|
2499
|
+
code?: Messages.ButtonRequest['code'] | 'ButtonRequest_FirmwareUpdate';
|
|
2500
|
+
}
|
|
2501
|
+
type PassphraseRequestPayload = {
|
|
2502
|
+
existsAttachPinUser?: boolean;
|
|
2503
|
+
};
|
|
2504
|
+
interface DeviceButtonRequest {
|
|
2505
|
+
type: typeof DEVICE.BUTTON;
|
|
2506
|
+
payload: DeviceButtonRequestPayload & {
|
|
2507
|
+
device: KnownDevice | null;
|
|
2508
|
+
};
|
|
2509
|
+
}
|
|
2510
|
+
type DeviceFeaturesPayload = Features;
|
|
2511
|
+
interface DeviceSendFeatures {
|
|
2512
|
+
type: typeof DEVICE.FEATURES;
|
|
2513
|
+
payload: DeviceFeaturesPayload;
|
|
2514
|
+
}
|
|
2515
|
+
type DeviceSupportFeaturesPayload = SupportFeatures & {
|
|
2516
|
+
device: KnownDevice | null;
|
|
2517
|
+
};
|
|
2518
|
+
interface DeviceSendSupportFeatures {
|
|
2519
|
+
type: typeof DEVICE.SUPPORT_FEATURES;
|
|
2520
|
+
payload: DeviceSupportFeaturesPayload;
|
|
2521
|
+
}
|
|
2522
|
+
type DeviceEvent = DeviceButtonRequest | DeviceSendFeatures | DeviceSendSupportFeatures | DeviceDisconnnectRequest | DeviceConnnectRequest;
|
|
2523
|
+
type DeviceEventMessage = DeviceEvent & {
|
|
2524
|
+
event: typeof DEVICE_EVENT;
|
|
2525
|
+
};
|
|
2526
|
+
type DeviceEventListenerFn = (type: typeof DEVICE_EVENT, cb: (event: DeviceEventMessage) => void) => void;
|
|
2527
|
+
declare const createDeviceMessage: MessageFactoryFn<typeof DEVICE_EVENT, DeviceEvent>;
|
|
2528
|
+
|
|
2529
|
+
declare const UI_EVENT = "UI_EVENT";
|
|
2530
|
+
declare const UI_REQUEST: {
|
|
2531
|
+
readonly REQUEST_PIN: "ui-request_pin";
|
|
2532
|
+
readonly INVALID_PIN: "ui-invalid_pin";
|
|
2533
|
+
readonly REQUEST_BUTTON: "ui-button";
|
|
2534
|
+
readonly REQUEST_PASSPHRASE: "ui-request_passphrase";
|
|
2535
|
+
readonly REQUEST_PASSPHRASE_ON_DEVICE: "ui-request_passphrase_on_device";
|
|
2536
|
+
readonly REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-request_select_device_in_bootloader_for_web_device";
|
|
2537
|
+
readonly CLOSE_UI_WINDOW: "ui-close_window";
|
|
2538
|
+
readonly CLOSE_UI_PIN_WINDOW: "ui-close_pin_window";
|
|
2539
|
+
readonly DEVICE_PROGRESS: "ui-device_progress";
|
|
2540
|
+
readonly BLUETOOTH_PERMISSION: "ui-bluetooth_permission";
|
|
2541
|
+
readonly BLUETOOTH_UNSUPPORTED: "ui-bluetooth_unsupported";
|
|
2542
|
+
readonly BLUETOOTH_POWERED_OFF: "ui-bluetooth_powered_off";
|
|
2543
|
+
readonly BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE: "ui-bluetooth_characteristic_notify_change_failure";
|
|
2544
|
+
readonly LOCATION_PERMISSION: "ui-location_permission";
|
|
2545
|
+
readonly LOCATION_SERVICE_PERMISSION: "ui-location_service_permission";
|
|
2546
|
+
readonly FIRMWARE_PROCESSING: "ui-firmware-processing";
|
|
2547
|
+
readonly FIRMWARE_PROGRESS: "ui-firmware-progress";
|
|
2548
|
+
readonly FIRMWARE_TIP: "ui-firmware-tip";
|
|
2549
|
+
readonly PREVIOUS_ADDRESS_RESULT: "ui-previous_address_result";
|
|
2550
|
+
readonly WEB_DEVICE_PROMPT_ACCESS_PERMISSION: "ui-web_device_prompt_access_permission";
|
|
2551
|
+
readonly BOOTLOADER: "ui-device_bootloader_mode";
|
|
2552
|
+
readonly NOT_IN_BOOTLOADER: "ui-device_not_in_bootloader_mode";
|
|
2553
|
+
readonly REQUIRE_MODE: "ui-device_require_mode";
|
|
2554
|
+
readonly NOT_INITIALIZE: "ui-device_not_initialized";
|
|
2555
|
+
readonly SEEDLESS: "ui-device_seedless";
|
|
2556
|
+
readonly FIRMWARE_OLD: "ui-device_firmware_old";
|
|
2557
|
+
readonly FIRMWARE_NOT_SUPPORTED: "ui-device_firmware_unsupported";
|
|
2558
|
+
readonly FIRMWARE_NOT_COMPATIBLE: "ui-device_firmware_not_compatible";
|
|
2559
|
+
readonly FIRMWARE_NOT_INSTALLED: "ui-device_firmware_not_installed";
|
|
2560
|
+
readonly NOT_USE_UKEY_DEVICE: "ui-device_please_use_ukey_device";
|
|
2561
|
+
};
|
|
2562
|
+
interface UiRequestWithoutPayload {
|
|
2563
|
+
type: typeof UI_REQUEST.CLOSE_UI_WINDOW | typeof UI_REQUEST.CLOSE_UI_PIN_WINDOW | typeof UI_REQUEST.BLUETOOTH_PERMISSION | typeof UI_REQUEST.BLUETOOTH_UNSUPPORTED | typeof UI_REQUEST.BLUETOOTH_POWERED_OFF | typeof UI_REQUEST.BLUETOOTH_CHARACTERISTIC_NOTIFY_CHANGE_FAILURE | typeof UI_REQUEST.LOCATION_PERMISSION | typeof UI_REQUEST.LOCATION_SERVICE_PERMISSION | typeof UI_REQUEST.FIRMWARE_PROCESSING | typeof UI_REQUEST.WEB_DEVICE_PROMPT_ACCESS_PERMISSION;
|
|
2564
|
+
payload?: typeof undefined;
|
|
2565
|
+
}
|
|
2566
|
+
interface UiRequestFirmwareProgressing {
|
|
2567
|
+
type: typeof UI_REQUEST.FIRMWARE_PROCESSING;
|
|
2568
|
+
payload: {
|
|
2569
|
+
type: 'firmware' | 'ble' | 'bootloader' | 'resource';
|
|
2570
|
+
};
|
|
2571
|
+
}
|
|
2572
|
+
type UiRequestDeviceAction = {
|
|
2573
|
+
type: typeof UI_REQUEST.REQUEST_PIN;
|
|
2574
|
+
payload: {
|
|
2575
|
+
device: Device$1;
|
|
2576
|
+
type?: Messages.PinMatrixRequestType | 'ButtonRequest_PinEntry' | 'ButtonRequest_AttachPin';
|
|
2577
|
+
};
|
|
2578
|
+
};
|
|
2579
|
+
interface UiRequestButton {
|
|
2580
|
+
type: typeof UI_REQUEST.REQUEST_BUTTON;
|
|
2581
|
+
payload: DeviceButtonRequest['payload'];
|
|
2582
|
+
}
|
|
2583
|
+
interface UiRequestPassphrase {
|
|
2584
|
+
type: typeof UI_REQUEST.REQUEST_PASSPHRASE;
|
|
2585
|
+
payload: {
|
|
2586
|
+
device: Device$1;
|
|
2587
|
+
passphraseState?: string;
|
|
2588
|
+
existsAttachPinUser?: boolean;
|
|
2589
|
+
};
|
|
2590
|
+
}
|
|
2591
|
+
interface UiRequestPassphraseOnDevice {
|
|
2592
|
+
type: typeof UI_REQUEST.REQUEST_PASSPHRASE_ON_DEVICE;
|
|
2593
|
+
payload: {
|
|
2594
|
+
device: Device$1;
|
|
2595
|
+
passphraseState?: string;
|
|
2596
|
+
};
|
|
2597
|
+
}
|
|
2598
|
+
interface UiRequestSelectDeviceInBootloaderForWebDevice {
|
|
2599
|
+
type: typeof UI_REQUEST.REQUEST_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
2600
|
+
payload: {
|
|
2601
|
+
device: Device$1;
|
|
2602
|
+
};
|
|
2603
|
+
}
|
|
2604
|
+
interface FirmwareProcessing {
|
|
2605
|
+
type: typeof UI_REQUEST.FIRMWARE_PROCESSING;
|
|
2606
|
+
payload: {
|
|
2607
|
+
type: 'firmware' | 'ble' | 'bootloader' | 'resource';
|
|
2608
|
+
};
|
|
2609
|
+
}
|
|
2610
|
+
type IFirmwareUpdateProgressType = 'transferData' | 'installingFirmware';
|
|
2611
|
+
interface FirmwareProgress {
|
|
2612
|
+
type: typeof UI_REQUEST.FIRMWARE_PROGRESS;
|
|
2613
|
+
payload: {
|
|
2614
|
+
device: Device$1;
|
|
2615
|
+
progress: number;
|
|
2616
|
+
progressType: IFirmwareUpdateProgressType;
|
|
2617
|
+
};
|
|
2618
|
+
}
|
|
2619
|
+
interface FirmwareTip {
|
|
2620
|
+
type: typeof UI_REQUEST.FIRMWARE_TIP;
|
|
2621
|
+
payload: {
|
|
2622
|
+
device: Device$1;
|
|
2623
|
+
data: {
|
|
2624
|
+
message: string;
|
|
2625
|
+
};
|
|
2626
|
+
};
|
|
2627
|
+
}
|
|
2628
|
+
interface DeviceProgress {
|
|
2629
|
+
type: typeof UI_REQUEST.DEVICE_PROGRESS;
|
|
2630
|
+
payload: {
|
|
2631
|
+
progress?: number;
|
|
2632
|
+
};
|
|
2633
|
+
}
|
|
2634
|
+
interface PreviousAddressResult {
|
|
2635
|
+
type: typeof UI_REQUEST.PREVIOUS_ADDRESS_RESULT;
|
|
2636
|
+
payload: {
|
|
2637
|
+
device: Device$1;
|
|
2638
|
+
data: {
|
|
2639
|
+
address?: string;
|
|
2640
|
+
path?: string;
|
|
2641
|
+
};
|
|
2642
|
+
};
|
|
2643
|
+
}
|
|
2644
|
+
type UiEvent = UiRequestWithoutPayload | UiRequestDeviceAction | UiRequestButton | UiRequestPassphraseOnDevice | UiRequestPassphrase | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProcessing | UiRequestSelectDeviceInBootloaderForWebDevice | FirmwareProgress | FirmwareTip | DeviceProgress | PreviousAddressResult;
|
|
2645
|
+
declare enum FirmwareUpdateTipMessage {
|
|
2646
|
+
CheckLatestUiResource = "CheckLatestUiResource",
|
|
2647
|
+
StartDownloadFirmware = "StartDownloadFirmware",
|
|
2648
|
+
FinishDownloadFirmware = "FinishDownloadFirmware",
|
|
2649
|
+
DownloadLatestUiResource = "DownloadLatestUiResource",
|
|
2650
|
+
DownloadFirmware = "DownloadFirmware",
|
|
2651
|
+
DownloadBleFirmware = "DownloadBleFirmware",
|
|
2652
|
+
DownloadLatestBootloaderResource = "DownloadLatestBootloaderResource",
|
|
2653
|
+
DownloadLatestUiResourceSuccess = "DownloadLatestUiResourceSuccess",
|
|
2654
|
+
DownloadFirmwareSuccess = "DownloadFirmwareSuccess",
|
|
2655
|
+
DownloadBleFirmwareSuccess = "DownloadBleFirmwareSuccess",
|
|
2656
|
+
DownloadLatestBootloaderResourceSuccess = "DownloadLatestBootloaderResourceSuccess",
|
|
2657
|
+
AutoRebootToBootloader = "AutoRebootToBootloader",
|
|
2658
|
+
GoToBootloaderSuccess = "GoToBootloaderSuccess",
|
|
2659
|
+
SelectDeviceInBootloaderForWebDevice = "SelectDeviceInBootloaderForWebDevice",
|
|
2660
|
+
ConfirmOnDevice = "ConfirmOnDevice",
|
|
2661
|
+
FirmwareEraseSuccess = "FirmwareEraseSuccess",
|
|
2662
|
+
StartTransferData = "StartTransferData",
|
|
2663
|
+
InstallingFirmware = "InstallingFirmware",
|
|
2664
|
+
UpdateBootloader = "UpdateBootloader",
|
|
2665
|
+
UpdateBootloaderSuccess = "UpdateBootloaderSuccess",
|
|
2666
|
+
UpdateSysResource = "UpdateSysResource",
|
|
2667
|
+
UpdateSysResourceSuccess = "UpdateSysResourceSuccess",
|
|
2668
|
+
FirmwareUpdating = "FirmwareUpdating",
|
|
2669
|
+
FirmwareUpdateCompleted = "FirmwareUpdateCompleted"
|
|
2670
|
+
}
|
|
2671
|
+
type IFirmwareUpdateTipMessage = `${FirmwareUpdateTipMessage}`;
|
|
2672
|
+
type UiEventMessage = UiEvent & {
|
|
2673
|
+
event: typeof UI_EVENT;
|
|
2674
|
+
};
|
|
2675
|
+
declare const createUiMessage: MessageFactoryFn<typeof UI_EVENT, UiEvent>;
|
|
2676
|
+
|
|
2677
|
+
declare const IFRAME: {
|
|
2678
|
+
readonly INIT: "iframe-init";
|
|
2679
|
+
readonly INIT_BRIDGE: "iframe-init-bridge";
|
|
2680
|
+
readonly CALL: "iframe-call";
|
|
2681
|
+
readonly CANCEL: "iframe-cancel";
|
|
2682
|
+
readonly SWITCH_TRANSPORT: "iframe-switch-transport";
|
|
2683
|
+
readonly CALLBACK: "iframe-callback";
|
|
2684
|
+
};
|
|
2685
|
+
interface IFrameInit {
|
|
2686
|
+
type: typeof IFRAME.INIT;
|
|
2687
|
+
payload: {
|
|
2688
|
+
settings: ConnectSettings;
|
|
2689
|
+
};
|
|
2690
|
+
}
|
|
2691
|
+
interface IFrameBridge {
|
|
2692
|
+
type: typeof IFRAME.INIT_BRIDGE;
|
|
2693
|
+
payload: unknown;
|
|
2694
|
+
}
|
|
2695
|
+
interface IFrameSwitchTransport {
|
|
2696
|
+
type: typeof IFRAME.SWITCH_TRANSPORT;
|
|
2697
|
+
payload: {
|
|
2698
|
+
env: ConnectSettings['env'];
|
|
2699
|
+
};
|
|
2700
|
+
}
|
|
2701
|
+
interface IFrameCallback {
|
|
2702
|
+
type: typeof IFRAME.CALLBACK;
|
|
2703
|
+
payload: {
|
|
2704
|
+
callbackId: string;
|
|
2705
|
+
data?: any;
|
|
2706
|
+
error?: any;
|
|
2707
|
+
finished?: boolean;
|
|
2708
|
+
};
|
|
2709
|
+
}
|
|
2710
|
+
type IFrameEvent = IFrameInit | IFrameBridge | IFrameSwitchTransport | IFrameCallback;
|
|
2711
|
+
type IFrameEventMessage = IFrameEvent & {
|
|
2712
|
+
event: typeof UI_EVENT;
|
|
2713
|
+
};
|
|
2714
|
+
declare const createIFrameMessage: MessageFactoryFn<typeof UI_EVENT, IFrameEvent>;
|
|
2715
|
+
|
|
2716
|
+
type UnwrappedResponse<T> = T extends Promise<infer R> ? R extends {
|
|
2717
|
+
success: true;
|
|
2718
|
+
payload: infer P;
|
|
2719
|
+
} ? P : never : void;
|
|
2720
|
+
type OverloadedMethod<T, E extends Record<string, string>> = T extends {
|
|
2721
|
+
(params: infer P1): infer R1;
|
|
2722
|
+
(params: infer P2): infer R2;
|
|
2723
|
+
} ? ((params: P1 & E) => R1) | ((params: P2 & E) => R2) : T extends (...args: infer P) => infer R ? (params: E & P[0]) => R : never;
|
|
2724
|
+
type UnwrappedMethod<T, M extends Record<string, string>> = T extends () => infer R ? (params: M & CommonParams) => R : OverloadedMethod<T, M>;
|
|
2725
|
+
type IsMethodCallable<T> = T extends (...args: any[]) => infer R ? R extends Promise<{
|
|
2726
|
+
success: boolean;
|
|
2727
|
+
}> ? R : never : never;
|
|
2728
|
+
type CallApi = {
|
|
2729
|
+
[K in keyof CoreApi]: IsMethodCallable<CoreApi[K]> extends never ? never : UnwrappedMethod<CoreApi[K], {
|
|
2730
|
+
method: K;
|
|
2731
|
+
}>;
|
|
2732
|
+
};
|
|
2733
|
+
type CallMethodUnion = CallApi[keyof CallApi];
|
|
2734
|
+
type CallMethodPayload = Parameters<CallMethodUnion>[0];
|
|
2735
|
+
type CallMethodResponse<M extends keyof CallApi> = UnwrappedResponse<ReturnType<CallApi[M]>>;
|
|
2736
|
+
type CallMethodAnyResponse = ReturnType<CallMethodUnion>;
|
|
2737
|
+
type CallMethod = (params: CallMethodPayload) => Promise<any>;
|
|
2738
|
+
interface IFrameCallMessage {
|
|
2739
|
+
event: typeof IFRAME.CALL;
|
|
2740
|
+
type: typeof IFRAME.CALL;
|
|
2741
|
+
payload: CallMethodPayload;
|
|
2742
|
+
}
|
|
2743
|
+
interface IFrameCancelMessage {
|
|
2744
|
+
event: typeof IFRAME.CANCEL;
|
|
2745
|
+
type: typeof IFRAME.CANCEL;
|
|
2746
|
+
payload: {
|
|
2747
|
+
connectId?: string;
|
|
2748
|
+
};
|
|
2749
|
+
}
|
|
2750
|
+
interface IFrameSwitchTransportMessage {
|
|
2751
|
+
event: typeof IFRAME.SWITCH_TRANSPORT;
|
|
2752
|
+
type: typeof IFRAME.SWITCH_TRANSPORT;
|
|
2753
|
+
payload: {
|
|
2754
|
+
env: ConnectSettings['env'];
|
|
2755
|
+
};
|
|
2756
|
+
}
|
|
2757
|
+
interface IFrameCallbackMessage {
|
|
2758
|
+
event: typeof IFRAME.CALLBACK;
|
|
2759
|
+
type: typeof IFRAME.CALLBACK;
|
|
2760
|
+
payload: {
|
|
2761
|
+
callbackId: string;
|
|
2762
|
+
data?: any;
|
|
2763
|
+
error?: any;
|
|
2764
|
+
};
|
|
2765
|
+
}
|
|
2766
|
+
declare const RESPONSE_EVENT = "RESPONSE_EVENT";
|
|
2767
|
+
interface MethodResponseMessage {
|
|
2768
|
+
event: typeof RESPONSE_EVENT;
|
|
2769
|
+
type: typeof RESPONSE_EVENT;
|
|
2770
|
+
id: number;
|
|
2771
|
+
success: boolean;
|
|
2772
|
+
payload: any;
|
|
2773
|
+
}
|
|
2774
|
+
declare const createResponseMessage: (id: number, success: boolean, payload: any) => MethodResponseMessage;
|
|
2775
|
+
type CallMethodKeys = keyof CoreApi;
|
|
2776
|
+
|
|
2777
|
+
declare const UI_RESPONSE: {
|
|
2778
|
+
readonly RECEIVE_PIN: "ui-receive_pin";
|
|
2779
|
+
readonly RECEIVE_PASSPHRASE: "ui-receive_passphrase";
|
|
2780
|
+
readonly SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE: "ui-receive_select-device-in-bootloader-for-web-device";
|
|
2781
|
+
};
|
|
2782
|
+
interface UiResponsePin {
|
|
2783
|
+
type: typeof UI_RESPONSE.RECEIVE_PIN;
|
|
2784
|
+
payload: string;
|
|
2785
|
+
}
|
|
2786
|
+
interface UiResponsePassphrase {
|
|
2787
|
+
type: typeof UI_RESPONSE.RECEIVE_PASSPHRASE;
|
|
2788
|
+
payload: {
|
|
2789
|
+
value: string;
|
|
2790
|
+
passphraseOnDevice?: boolean;
|
|
2791
|
+
attachPinOnDevice?: boolean;
|
|
2792
|
+
save?: boolean;
|
|
2793
|
+
};
|
|
2794
|
+
}
|
|
2795
|
+
interface UiResponseSelectDeviceInBootloaderForWebDevice {
|
|
2796
|
+
type: typeof UI_RESPONSE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE;
|
|
2797
|
+
payload: {
|
|
2798
|
+
deviceId: string;
|
|
2799
|
+
};
|
|
2800
|
+
}
|
|
2801
|
+
type UiResponseEvent = UiResponsePin | UiResponsePassphrase | UiResponseSelectDeviceInBootloaderForWebDevice;
|
|
2802
|
+
type UiResponseMessage = UiResponseEvent & {
|
|
2803
|
+
event: typeof UI_EVENT;
|
|
2804
|
+
};
|
|
2805
|
+
declare const createUiResponse: MessageFactoryFn<typeof UI_EVENT, UiResponseEvent>;
|
|
2806
|
+
|
|
2807
|
+
declare const LOG_EVENT = "LOG_EVENT";
|
|
2808
|
+
declare const LOG: {
|
|
2809
|
+
readonly OUTPUT: "log-output";
|
|
2810
|
+
};
|
|
2811
|
+
interface LogOutput {
|
|
2812
|
+
type: typeof LOG.OUTPUT;
|
|
2813
|
+
payload: any;
|
|
2814
|
+
}
|
|
2815
|
+
type LogEvent = LogOutput;
|
|
2816
|
+
type LogEventMessage = LogEvent & {
|
|
2817
|
+
event: typeof LOG_EVENT;
|
|
2818
|
+
};
|
|
2819
|
+
declare const createLogMessage: MessageFactoryFn<typeof LOG_EVENT, LogEvent>;
|
|
2820
|
+
|
|
2821
|
+
declare const getFirmwareReleaseInfo: (features: Features) => {
|
|
2822
|
+
status: IDeviceFirmwareStatus;
|
|
2823
|
+
changelog: {
|
|
2824
|
+
"zh-CN": string;
|
|
2825
|
+
"en-US": string;
|
|
2826
|
+
}[];
|
|
2827
|
+
release: IFirmwareReleaseInfo | undefined;
|
|
2828
|
+
bootloaderMode: boolean;
|
|
2829
|
+
};
|
|
2830
|
+
declare const getBleFirmwareReleaseInfo: (features: Features) => {
|
|
2831
|
+
status: IDeviceBLEFirmwareStatus;
|
|
2832
|
+
changelog: {
|
|
2833
|
+
"zh-CN": string;
|
|
2834
|
+
"en-US": string;
|
|
2835
|
+
}[];
|
|
2836
|
+
release: IBLEFirmwareReleaseInfo | undefined;
|
|
2837
|
+
bootloaderMode: boolean;
|
|
2838
|
+
};
|
|
2839
|
+
|
|
2840
|
+
declare const FIRMWARE_EVENT = "FIRMWARE_EVENT";
|
|
2841
|
+
declare const FIRMWARE: {
|
|
2842
|
+
readonly RELEASE_INFO: "firmware-release-info";
|
|
2843
|
+
readonly BLE_RELEASE_INFO: "ble-firmware-release-info";
|
|
2844
|
+
};
|
|
2845
|
+
type ReleaseInfoPayload = ReturnType<typeof getFirmwareReleaseInfo> & {
|
|
2846
|
+
device?: KnownDevice | null;
|
|
2847
|
+
};
|
|
2848
|
+
interface ReleaseInfoEvent {
|
|
2849
|
+
type: typeof FIRMWARE.RELEASE_INFO;
|
|
2850
|
+
payload: ReleaseInfoPayload;
|
|
2851
|
+
}
|
|
2852
|
+
type BleReleaseInfoPayload = ReturnType<typeof getBleFirmwareReleaseInfo> & {
|
|
2853
|
+
device?: KnownDevice | null;
|
|
2854
|
+
};
|
|
2855
|
+
interface BleReleaseInfoEvent {
|
|
2856
|
+
type: typeof FIRMWARE.BLE_RELEASE_INFO;
|
|
2857
|
+
payload: BleReleaseInfoPayload;
|
|
2858
|
+
}
|
|
2859
|
+
type FirmwareEvent = ReleaseInfoEvent | BleReleaseInfoEvent;
|
|
2860
|
+
type FirmwareMessage = FirmwareEvent & {
|
|
2861
|
+
event: typeof FIRMWARE_EVENT;
|
|
2862
|
+
};
|
|
2863
|
+
declare const createFirmwareMessage: MessageFactoryFn<typeof FIRMWARE_EVENT, FirmwareEvent>;
|
|
2864
|
+
|
|
2865
|
+
declare const CORE_EVENT = "CORE_EVENT";
|
|
2866
|
+
type CoreMessage = {
|
|
2867
|
+
id?: string;
|
|
2868
|
+
success?: true | false;
|
|
2869
|
+
} & (IFrameEventMessage | IFrameCallMessage | IFrameCancelMessage | IFrameSwitchTransportMessage | IFrameCallbackMessage | UiResponseMessage | UiEventMessage | DeviceEventMessage | LogEventMessage | FirmwareMessage);
|
|
2870
|
+
type PostMessageEvent = MessageEvent<any>;
|
|
2871
|
+
declare const parseMessage: (messageData: any) => CoreMessage;
|
|
2872
|
+
declare const createErrorMessage: (error: Error & {
|
|
2873
|
+
code?: string | number;
|
|
2874
|
+
}) => Unsuccessful;
|
|
2875
|
+
|
|
2876
|
+
type DeviceDescriptorDiff = {
|
|
2877
|
+
didUpdate: boolean;
|
|
2878
|
+
connected: UKeyDeviceInfo[];
|
|
2879
|
+
disconnected: UKeyDeviceInfo[];
|
|
2880
|
+
changedSessions: UKeyDeviceInfo[];
|
|
2881
|
+
changedDebugSessions: UKeyDeviceInfo[];
|
|
2882
|
+
acquired: UKeyDeviceInfo[];
|
|
2883
|
+
debugAcquired: UKeyDeviceInfo[];
|
|
2884
|
+
released: UKeyDeviceInfo[];
|
|
2885
|
+
debugReleased: UKeyDeviceInfo[];
|
|
2886
|
+
descriptors: UKeyDeviceInfo[];
|
|
2887
|
+
};
|
|
2888
|
+
|
|
2889
|
+
declare class DeviceConnector {
|
|
2890
|
+
transport: Transport;
|
|
2891
|
+
listenTimestamp: number;
|
|
2892
|
+
current: UKeyDeviceInfo[] | null;
|
|
2893
|
+
upcoming: UKeyDeviceInfo[];
|
|
2894
|
+
listening: boolean;
|
|
2895
|
+
constructor();
|
|
2896
|
+
enumerate(): Promise<DeviceDescriptorDiff | undefined>;
|
|
2897
|
+
listen(): Promise<void>;
|
|
2898
|
+
stop(): void;
|
|
2899
|
+
acquire(path: string, session?: string | null, forceCleanRunPromise?: boolean): Promise<string | undefined>;
|
|
2900
|
+
release(session: string, onclose: boolean): Promise<void>;
|
|
2901
|
+
promptDeviceAccess(): Promise<USBDevice | BluetoothDevice | null>;
|
|
2902
|
+
_reportDevicesChange(): void;
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
type PassphrasePromptResponse = {
|
|
2906
|
+
passphrase?: string;
|
|
2907
|
+
passphraseOnDevice?: boolean;
|
|
2908
|
+
attachPinOnDevice?: boolean;
|
|
2909
|
+
cache?: boolean;
|
|
2910
|
+
};
|
|
2911
|
+
type MessageType = Messages.MessageType;
|
|
2912
|
+
type MessageKey = keyof MessageType;
|
|
2913
|
+
type TypedResponseMessage<T extends MessageKey> = {
|
|
2914
|
+
type: T;
|
|
2915
|
+
message: MessageType[T];
|
|
2916
|
+
};
|
|
2917
|
+
type TypedCallResponseMap = {
|
|
2918
|
+
[K in keyof MessageType]: TypedResponseMessage<K>;
|
|
2919
|
+
};
|
|
2920
|
+
type DefaultMessageResponse = TypedCallResponseMap[keyof MessageType];
|
|
2921
|
+
declare class DeviceCommands {
|
|
2922
|
+
device: Device;
|
|
2923
|
+
transport: Transport;
|
|
2924
|
+
mainId: string;
|
|
2925
|
+
disposed: boolean;
|
|
2926
|
+
callPromise?: Promise<DefaultMessageResponse>;
|
|
2927
|
+
constructor(device: Device, mainId: string);
|
|
2928
|
+
dispose(_cancelRequest: boolean): Promise<void>;
|
|
2929
|
+
checkDisposed(): void;
|
|
2930
|
+
cancelDeviceOnUKeyDevice(): Promise<{
|
|
2931
|
+
readonly success: false;
|
|
2932
|
+
readonly error: 800;
|
|
2933
|
+
readonly payload: {
|
|
2934
|
+
readonly message: "Device disconnected or acquired by someone else";
|
|
2935
|
+
};
|
|
2936
|
+
} | {
|
|
2937
|
+
success: boolean;
|
|
2938
|
+
error: null;
|
|
2939
|
+
payload: {
|
|
2940
|
+
message: string;
|
|
2941
|
+
};
|
|
2942
|
+
} | {
|
|
2943
|
+
success: boolean;
|
|
2944
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 900 | 901 | 902;
|
|
2945
|
+
payload: {
|
|
2946
|
+
message: string;
|
|
2947
|
+
};
|
|
2948
|
+
} | undefined>;
|
|
2949
|
+
cancelDevice(): Promise<{
|
|
2950
|
+
readonly success: false;
|
|
2951
|
+
readonly error: 800;
|
|
2952
|
+
readonly payload: {
|
|
2953
|
+
readonly message: "Device disconnected or acquired by someone else";
|
|
2954
|
+
};
|
|
2955
|
+
} | {
|
|
2956
|
+
success: boolean;
|
|
2957
|
+
error: null;
|
|
2958
|
+
payload: {
|
|
2959
|
+
message: string;
|
|
2960
|
+
};
|
|
2961
|
+
} | {
|
|
2962
|
+
success: boolean;
|
|
2963
|
+
error: 0 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 200 | 300 | 301 | 302 | 303 | 304 | 305 | 400 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 500 | 600 | 601 | 602 | 603 | 700 | 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 714 | 715 | 716 | 717 | 718 | 719 | 720 | 721 | 722 | 800 | 801 | 802 | 803 | 804 | 805 | 806 | 807 | 808 | 809 | 810 | 811 | 812 | 813 | 814 | 815 | 816 | 817 | 818 | 819 | 820 | 821 | 900 | 901 | 902;
|
|
2964
|
+
payload: {
|
|
2965
|
+
message: string;
|
|
2966
|
+
};
|
|
2967
|
+
} | undefined>;
|
|
2968
|
+
cancel(): Promise<void>;
|
|
2969
|
+
call(type: MessageKey, msg?: DefaultMessageResponse['message']): Promise<DefaultMessageResponse>;
|
|
2970
|
+
typedCall<T extends MessageKey, R extends MessageKey[]>(type: T, resType: R, msg?: MessageType[T]): Promise<TypedCallResponseMap[R[number]]>;
|
|
2971
|
+
typedCall<T extends MessageKey, R extends MessageKey>(type: T, resType: R, msg?: MessageType[T]): Promise<TypedResponseMessage<R>>;
|
|
2972
|
+
_commonCall(type: MessageKey, msg?: DefaultMessageResponse['message']): Promise<DefaultMessageResponse>;
|
|
2973
|
+
_filterCommonTypes(res: DefaultMessageResponse, callType: MessageKey): Promise<DefaultMessageResponse>;
|
|
2974
|
+
_promptPin(type?: Messages.PinMatrixRequestType): Promise<string>;
|
|
2975
|
+
_promptPassphrase(options: PassphraseRequestPayload): Promise<PassphrasePromptResponse>;
|
|
2976
|
+
}
|
|
2977
|
+
|
|
2978
|
+
type InitOptions = {
|
|
2979
|
+
initSession?: boolean;
|
|
2980
|
+
deviceId?: string;
|
|
2981
|
+
passphraseState?: string;
|
|
2982
|
+
deriveCardano?: boolean;
|
|
2983
|
+
};
|
|
2984
|
+
type RunOptions = {
|
|
2985
|
+
keepSession?: boolean;
|
|
2986
|
+
} & InitOptions;
|
|
2987
|
+
interface DeviceEvents {
|
|
2988
|
+
[DEVICE.PIN]: [Device, Messages.PinMatrixRequestType | undefined, (err: any, pin: string) => void];
|
|
2989
|
+
[DEVICE.PASSPHRASE_ON_DEVICE]: [Device, ((response: any) => void)?];
|
|
2990
|
+
[DEVICE.BUTTON]: [Device, DeviceButtonRequestPayload];
|
|
2991
|
+
[DEVICE.FEATURES]: [Device, DeviceFeaturesPayload];
|
|
2992
|
+
[DEVICE.PASSPHRASE]: [
|
|
2993
|
+
Device,
|
|
2994
|
+
PassphraseRequestPayload,
|
|
2995
|
+
(response: PassphrasePromptResponse, error?: Error) => void
|
|
2996
|
+
];
|
|
2997
|
+
[DEVICE.SELECT_DEVICE_IN_BOOTLOADER_FOR_WEB_DEVICE]: [
|
|
2998
|
+
Device,
|
|
2999
|
+
(err: any, deviceId: string) => void
|
|
3000
|
+
];
|
|
3001
|
+
}
|
|
3002
|
+
interface Device {
|
|
3003
|
+
on<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
3004
|
+
off<K extends keyof DeviceEvents>(type: K, listener: (...event: DeviceEvents[K]) => void): this;
|
|
3005
|
+
emit<K extends keyof DeviceEvents>(type: K, ...args: DeviceEvents[K]): boolean;
|
|
3006
|
+
}
|
|
3007
|
+
declare class Device extends EventEmitter$1 {
|
|
3008
|
+
originalDescriptor: UKeyDeviceInfo;
|
|
3009
|
+
mainId?: string | null;
|
|
3010
|
+
deviceConnector?: DeviceConnector | null;
|
|
3011
|
+
commands: DeviceCommands;
|
|
3012
|
+
private cancelableAction?;
|
|
3013
|
+
private deviceAcquired;
|
|
3014
|
+
features: Features | undefined;
|
|
3015
|
+
featuresNeedsReload: boolean;
|
|
3016
|
+
runPromise?: Deferred<void> | null;
|
|
3017
|
+
externalState: string[];
|
|
3018
|
+
unavailableCapabilities: UnavailableCapabilities;
|
|
3019
|
+
instance: number;
|
|
3020
|
+
internalState: string[];
|
|
3021
|
+
needReloadDevice: boolean;
|
|
3022
|
+
keepSession: boolean;
|
|
3023
|
+
passphraseState: string | undefined;
|
|
3024
|
+
pendingCallbackPromise?: Deferred<void>;
|
|
3025
|
+
constructor(descriptor: UKeyDeviceInfo);
|
|
3026
|
+
static fromDescriptor(originalDescriptor: UKeyDeviceInfo): Device;
|
|
3027
|
+
toMessageObject(): Device$1 | null;
|
|
3028
|
+
connect(): Promise<boolean>;
|
|
3029
|
+
acquire(): Promise<void>;
|
|
3030
|
+
release(): Promise<void>;
|
|
3031
|
+
getCommands(): DeviceCommands;
|
|
3032
|
+
private generateStateKey;
|
|
3033
|
+
getInternalState(_deviceId?: string): string | undefined;
|
|
3034
|
+
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
3035
|
+
private setInternalState;
|
|
3036
|
+
clearInternalState(_deviceId?: string): void;
|
|
3037
|
+
initialize(options?: InitOptions): Promise<void>;
|
|
3038
|
+
getFeatures(): Promise<void>;
|
|
3039
|
+
_updateFeatures(feat: Features, initSession?: boolean): void;
|
|
3040
|
+
updateDescriptor(descriptor: UKeyDeviceInfo, forceUpdate?: boolean): void;
|
|
3041
|
+
updateFromCache(device: Device): void;
|
|
3042
|
+
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
3043
|
+
_runInner<T>(fn: (() => Promise<T>) | undefined, options: RunOptions): Promise<undefined>;
|
|
3044
|
+
interruptionFromOutside(): Promise<void>;
|
|
3045
|
+
interruptionFromUser(): Promise<void>;
|
|
3046
|
+
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
3047
|
+
clearCancelableAction(): void;
|
|
3048
|
+
getMode(): EUKeyDeviceMode;
|
|
3049
|
+
getFirmwareVersion(): IVersionArray | null;
|
|
3050
|
+
getBLEFirmwareVersion(): IVersionArray | null;
|
|
3051
|
+
isUsed(): boolean;
|
|
3052
|
+
hasDeviceAcquire(): boolean;
|
|
3053
|
+
isUsedHere(): boolean;
|
|
3054
|
+
isUsedElsewhere(): boolean;
|
|
3055
|
+
isBootloader(): boolean | undefined;
|
|
3056
|
+
isInitialized(): boolean | undefined;
|
|
3057
|
+
isSeedless(): boolean | undefined;
|
|
3058
|
+
isUnacquired(): boolean;
|
|
3059
|
+
hasUnexpectedMode(allow: string[], require: string[]): "ui-device_bootloader_mode" | "ui-device_not_in_bootloader_mode" | "ui-device_not_initialized" | "ui-device_seedless" | null;
|
|
3060
|
+
hasUsePassphrase(): boolean | undefined;
|
|
3061
|
+
checkDeviceId(deviceId: string): boolean;
|
|
3062
|
+
lockDevice(): Promise<_ukeyfe_hardware_transport.Success>;
|
|
3063
|
+
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
3064
|
+
unlockDevice(): Promise<_ukeyfe_hardware_transport.Features>;
|
|
3065
|
+
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
3066
|
+
}
|
|
3067
|
+
|
|
3068
|
+
type UiPromiseResponse = UiResponseEvent | {
|
|
3069
|
+
type: typeof DEVICE.DISCONNECT;
|
|
3070
|
+
payload?: undefined;
|
|
3071
|
+
};
|
|
3072
|
+
type UiPromise<T extends UiPromiseResponse['type']> = Deferred<Extract<UiPromiseResponse, {
|
|
3073
|
+
type: T;
|
|
3074
|
+
}>, T, Device>;
|
|
3075
|
+
|
|
3076
|
+
declare const LogBlockEvent: Set<string>;
|
|
3077
|
+
|
|
3078
|
+
declare const executeCallback: (id: string, ...args: any[]) => void;
|
|
3079
|
+
declare const cleanupCallback: (id: string) => void;
|
|
3080
|
+
|
|
3081
|
+
interface InjectApi {
|
|
3082
|
+
call: CallMethod;
|
|
3083
|
+
eventEmitter: EventEmitter;
|
|
3084
|
+
init: CoreApi['init'];
|
|
3085
|
+
updateSettings: CoreApi['updateSettings'];
|
|
3086
|
+
dispose: CoreApi['dispose'];
|
|
3087
|
+
uiResponse: CoreApi['uiResponse'];
|
|
3088
|
+
cancel: CoreApi['cancel'];
|
|
3089
|
+
switchTransport: CoreApi['switchTransport'];
|
|
3090
|
+
}
|
|
3091
|
+
|
|
3092
|
+
interface TopLevelInjectApi {
|
|
3093
|
+
init: CoreApi['init'];
|
|
3094
|
+
call: CoreApi['call'];
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
declare class Core extends EventEmitter$1 {
|
|
3098
|
+
private requestQueue;
|
|
3099
|
+
private prePendingCallPromise;
|
|
3100
|
+
private methodSynchronize;
|
|
3101
|
+
private getCoreContext;
|
|
3102
|
+
handleMessage(message: CoreMessage): Promise<any>;
|
|
3103
|
+
dispose(): void;
|
|
3104
|
+
}
|
|
3105
|
+
declare const init: (settings: ConnectSettings, Transport: any, plugin?: LowlevelTransportSharedPlugin) => Promise<Core | undefined>;
|
|
3106
|
+
declare const switchTransport: ({ env, Transport, plugin, }: {
|
|
3107
|
+
env: ConnectSettings['env'];
|
|
3108
|
+
Transport: any;
|
|
3109
|
+
plugin?: LowlevelTransportSharedPlugin | undefined;
|
|
3110
|
+
}) => void;
|
|
3111
|
+
|
|
3112
|
+
type LogMessage = {
|
|
3113
|
+
level: string;
|
|
3114
|
+
prefix: string;
|
|
3115
|
+
message: any[];
|
|
3116
|
+
timestamp: number;
|
|
3117
|
+
};
|
|
3118
|
+
declare class Log {
|
|
3119
|
+
prefix: string;
|
|
3120
|
+
enabled: boolean;
|
|
3121
|
+
messages: LogMessage[];
|
|
3122
|
+
constructor(prefix: string, enabled: boolean);
|
|
3123
|
+
addMessage(level: string, prefix: string, ...args: any[]): void;
|
|
3124
|
+
log(...args: any[]): void;
|
|
3125
|
+
error(...args: any[]): void;
|
|
3126
|
+
warn(...args: any[]): void;
|
|
3127
|
+
debug(...args: any[]): void;
|
|
3128
|
+
}
|
|
3129
|
+
declare const enableLog: (enabled?: boolean) => void;
|
|
3130
|
+
declare const getLog: () => LogMessage[];
|
|
3131
|
+
declare const setLoggerPostMessage: (postMessageFn: (message: CoreMessage) => void) => void;
|
|
3132
|
+
declare enum LoggerNames {
|
|
3133
|
+
Core = "@ukey/hd-core",
|
|
3134
|
+
Transport = "Transport",
|
|
3135
|
+
Device = "Device",
|
|
3136
|
+
DeviceCommands = "DeviceCommands",
|
|
3137
|
+
DeviceConnector = "DeviceConnector",
|
|
3138
|
+
DeviceList = "DeviceList",
|
|
3139
|
+
DevicePool = "DevicePool",
|
|
3140
|
+
HdCommonConnectSdk = "@ukey/common-connect-sdk",
|
|
3141
|
+
HdBleSdk = "@ukey/hd-ble-sdk",
|
|
3142
|
+
HdTransportHttp = "@ukey/hd-transport-http",
|
|
3143
|
+
HdTransportLowLevel = "@ukey/hd-transport-lowlevel",
|
|
3144
|
+
HdBleTransport = "@ukey/hd-ble-transport",
|
|
3145
|
+
HdWebBleTransport = "@ukey/hd-web-ble-transport",
|
|
3146
|
+
Connect = "@ukey/connect",
|
|
3147
|
+
Iframe = "IFrame",
|
|
3148
|
+
SendMessage = "[SendMessage]",
|
|
3149
|
+
Method = "[Method]"
|
|
3150
|
+
}
|
|
3151
|
+
declare const getLogger: (key: LoggerNames) => Log;
|
|
3152
|
+
|
|
3153
|
+
declare const httpRequest: (url: string, type: string) => any;
|
|
3154
|
+
declare const getTimeStamp: () => number;
|
|
3155
|
+
|
|
3156
|
+
declare const isValidVersionString: (version: string) => boolean;
|
|
3157
|
+
declare const isValidVersionArray: (version: number[]) => boolean;
|
|
3158
|
+
declare const normalizeVersionArray: (version: number[]) => number[];
|
|
3159
|
+
declare const versionSplit: (version: string) => number[];
|
|
3160
|
+
declare const versionCompare: (a: string | number[], b: string | number[]) => 0 | 1 | -1;
|
|
3161
|
+
|
|
3162
|
+
declare function patchFeatures(response: DefaultMessageResponse): TypedResponseMessage<"PassphraseState"> | TypedResponseMessage<"Address"> | TypedResponseMessage<"AptosMessagePayload"> | TypedResponseMessage<"BinanceInputOutput"> | TypedResponseMessage<"BinanceCoin"> | TypedResponseMessage<"HDNodePathType"> | TypedResponseMessage<"HDNodeType"> | TypedResponseMessage<"MultisigRedeemScriptType"> | TypedResponseMessage<"TxRequestDetailsType"> | TypedResponseMessage<"TxRequestSerializedType"> | TypedResponseMessage<"TxInputType"> | TypedResponseMessage<"TxOutputBinType"> | TypedResponseMessage<"TxOutputType"> | TypedResponseMessage<"TxAckInputWrapper"> | TypedResponseMessage<"TxAckOutputWrapper"> | TypedResponseMessage<"PrevTx"> | TypedResponseMessage<"TxAckPrevInputWrapper"> | TypedResponseMessage<"PrevInput"> | TypedResponseMessage<"TxAckPrevOutputWrapper"> | TypedResponseMessage<"PrevOutput"> | TypedResponseMessage<"TxAckPrevExtraDataWrapper"> | TypedResponseMessage<"BIP32Address"> | TypedResponseMessage<"CardanoNativeScript"> | TypedResponseMessage<"CardanoBlockchainPointerType"> | TypedResponseMessage<"CardanoAddressParametersType"> | TypedResponseMessage<"CardanoPoolMetadataType"> | TypedResponseMessage<"CardanoPoolParametersType"> | TypedResponseMessage<"CardanoDRep"> | TypedResponseMessage<"CardanoCVoteRegistrationDelegation"> | TypedResponseMessage<"CardanoCVoteRegistrationParametersType"> | TypedResponseMessage<"IdentityType"> | TypedResponseMessage<"Path"> | TypedResponseMessage<"DnxTxKey"> | TypedResponseMessage<"DnxComputedKeyImage"> | TypedResponseMessage<"EmmcFile"> | TypedResponseMessage<"EosTxHeader"> | TypedResponseMessage<"EosActionCommon"> | TypedResponseMessage<"EosActionTransfer"> | TypedResponseMessage<"EosActionDelegate"> | TypedResponseMessage<"EosActionUndelegate"> | TypedResponseMessage<"EosActionRefund"> | TypedResponseMessage<"EosActionBuyRam"> | TypedResponseMessage<"EosActionBuyRamBytes"> | TypedResponseMessage<"EosActionSellRam"> | TypedResponseMessage<"EosActionVoteProducer"> | TypedResponseMessage<"EosActionUpdateAuth"> | TypedResponseMessage<"EosActionDeleteAuth"> | TypedResponseMessage<"EosActionLinkAuth"> | TypedResponseMessage<"EosActionUnlinkAuth"> | TypedResponseMessage<"EosActionNewAccount"> | TypedResponseMessage<"EosActionUnknown"> | TypedResponseMessage<"EosPermissionLevel"> | TypedResponseMessage<"EosAuthorizationKey"> | TypedResponseMessage<"EosAuthorizationAccount"> | TypedResponseMessage<"EosAuthorizationWait"> | TypedResponseMessage<"EosAsset"> | TypedResponseMessage<"EosAuthorization"> | TypedResponseMessage<"EthereumStructMemberUKey"> | TypedResponseMessage<"EthereumFieldTypeUKey"> | TypedResponseMessage<"EthereumDefinitions"> | TypedResponseMessage<"EthereumStructMember"> | TypedResponseMessage<"EthereumFieldType"> | TypedResponseMessage<"EthereumAccessListUKey"> | TypedResponseMessage<"EthereumAuthorizationUKey"> | TypedResponseMessage<"EthereumAuthorizationSignature"> | TypedResponseMessage<"EthereumAccessList"> | TypedResponseMessage<"FileInfo"> | TypedResponseMessage<"MoneroOutputEntry"> | TypedResponseMessage<"MoneroMultisigKLRki"> | TypedResponseMessage<"MoneroRctKeyPublic"> | TypedResponseMessage<"MoneroAccountPublicAddress"> | TypedResponseMessage<"MoneroTransactionData"> | TypedResponseMessage<"MoneroTransactionDestinationEntry"> | TypedResponseMessage<"MoneroTransactionRsigData"> | TypedResponseMessage<"MoneroTransactionSourceEntry"> | TypedResponseMessage<"MoneroRingCtSig"> | TypedResponseMessage<"MoneroSubAddressIndicesList"> | TypedResponseMessage<"MoneroTransferDetails"> | TypedResponseMessage<"MoneroExportedKeyImage"> | TypedResponseMessage<"NEMTransactionCommon"> | TypedResponseMessage<"NEMTransfer"> | TypedResponseMessage<"NEMProvisionNamespace"> | TypedResponseMessage<"NEMMosaicCreation"> | TypedResponseMessage<"NEMMosaicSupplyChange"> | TypedResponseMessage<"NEMAggregateModification"> | TypedResponseMessage<"NEMImportanceTransfer"> | TypedResponseMessage<"NEMMosaic"> | TypedResponseMessage<"NEMMosaicDefinition"> | TypedResponseMessage<"NEMCosignatoryModification"> | TypedResponseMessage<"RipplePayment"> | TypedResponseMessage<"StellarAsset"> | TypedResponseMessage<"TezosRevealOp"> | TypedResponseMessage<"TezosTransactionOp"> | TypedResponseMessage<"TezosOriginationOp"> | TypedResponseMessage<"TezosDelegationOp"> | TypedResponseMessage<"TezosProposalOp"> | TypedResponseMessage<"TezosBallotOp"> | TypedResponseMessage<"TezosContractID"> | TypedResponseMessage<"TezosParametersManager"> | TypedResponseMessage<"TezosManagerTransfer"> | TypedResponseMessage<"TronContract"> | TypedResponseMessage<"TronTransferContract"> | TypedResponseMessage<"TronVoteWitnessContract"> | TypedResponseMessage<"TronFreezeBalanceContract"> | TypedResponseMessage<"TronUnfreezeBalanceContract"> | TypedResponseMessage<"TronWithdrawBalanceContract"> | TypedResponseMessage<"TronTriggerSmartContract"> | TypedResponseMessage<"TronFreezeBalanceV2Contract"> | TypedResponseMessage<"TronUnfreezeBalanceV2Contract"> | TypedResponseMessage<"TronWithdrawExpireUnfreezeContract"> | TypedResponseMessage<"TronDelegateResourceContract"> | TypedResponseMessage<"TronUnDelegateResourceContract"> | TypedResponseMessage<"TronCancelAllUnfreezeV2Contract"> | TypedResponseMessage<"Vote"> | TypedResponseMessage<"AlephiumGetAddress"> | TypedResponseMessage<"AlephiumAddress"> | TypedResponseMessage<"AlephiumSignTx"> | TypedResponseMessage<"AlephiumSignedTx"> | TypedResponseMessage<"AlephiumTxRequest"> | TypedResponseMessage<"AlephiumTxAck"> | TypedResponseMessage<"AlephiumBytecodeRequest"> | TypedResponseMessage<"AlephiumBytecodeAck"> | TypedResponseMessage<"AlephiumSignMessage"> | TypedResponseMessage<"AlephiumMessageSignature"> | TypedResponseMessage<"AlgorandGetAddress"> | TypedResponseMessage<"AlgorandAddress"> | TypedResponseMessage<"AlgorandSignTx"> | TypedResponseMessage<"AlgorandSignedTx"> | TypedResponseMessage<"AptosGetAddress"> | TypedResponseMessage<"AptosAddress"> | TypedResponseMessage<"AptosSignTx"> | TypedResponseMessage<"AptosSignedTx"> | TypedResponseMessage<"AptosSignMessage"> | TypedResponseMessage<"AptosMessageSignature"> | TypedResponseMessage<"AptosSignSIWAMessage"> | TypedResponseMessage<"BenfenGetAddress"> | TypedResponseMessage<"BenfenAddress"> | TypedResponseMessage<"BenfenSignTx"> | TypedResponseMessage<"BenfenSignedTx"> | TypedResponseMessage<"BenfenTxRequest"> | TypedResponseMessage<"BenfenTxAck"> | TypedResponseMessage<"BenfenSignMessage"> | TypedResponseMessage<"BenfenMessageSignature"> | TypedResponseMessage<"BinanceGetAddress"> | TypedResponseMessage<"BinanceAddress"> | TypedResponseMessage<"BinanceGetPublicKey"> | TypedResponseMessage<"BinancePublicKey"> | TypedResponseMessage<"BinanceSignTx"> | TypedResponseMessage<"BinanceTxRequest"> | TypedResponseMessage<"BinanceTransferMsg"> | TypedResponseMessage<"BinanceOrderMsg"> | TypedResponseMessage<"BinanceCancelMsg"> | TypedResponseMessage<"BinanceSignedTx"> | TypedResponseMessage<"GetPublicKey"> | TypedResponseMessage<"PublicKey"> | TypedResponseMessage<"GetAddress"> | TypedResponseMessage<"GetOwnershipId"> | TypedResponseMessage<"OwnershipId"> | TypedResponseMessage<"SignMessage"> | TypedResponseMessage<"MessageSignature"> | TypedResponseMessage<"VerifyMessage"> | TypedResponseMessage<"SignTx"> | TypedResponseMessage<"TxRequest"> | TypedResponseMessage<"TxAck"> | TypedResponseMessage<"TxAckInput"> | TypedResponseMessage<"TxAckOutput"> | TypedResponseMessage<"TxAckPrevMeta"> | TypedResponseMessage<"TxAckPrevInput"> | TypedResponseMessage<"TxAckPrevOutput"> | TypedResponseMessage<"TxAckPrevExtraData"> | TypedResponseMessage<"GetOwnershipProof"> | TypedResponseMessage<"OwnershipProof"> | TypedResponseMessage<"AuthorizeCoinJoin"> | TypedResponseMessage<"GetPublicKeyMultiple"> | TypedResponseMessage<"PublicKeyMultiple"> | TypedResponseMessage<"SignPsbt"> | TypedResponseMessage<"SignedPsbt"> | TypedResponseMessage<"FirmwareErase"> | TypedResponseMessage<"FirmwareRequest"> | TypedResponseMessage<"FirmwareUpload"> | TypedResponseMessage<"SelfTest"> | TypedResponseMessage<"FirmwareErase_ex"> | TypedResponseMessage<"Reboot"> | TypedResponseMessage<"FirmwareUpdateEmmc"> | TypedResponseMessage<"CardanoGetNativeScriptHash"> | TypedResponseMessage<"CardanoNativeScriptHash"> | TypedResponseMessage<"CardanoGetAddress"> | TypedResponseMessage<"CardanoAddress"> | TypedResponseMessage<"CardanoGetPublicKey"> | TypedResponseMessage<"CardanoPublicKey"> | TypedResponseMessage<"CardanoSignTxInit"> | TypedResponseMessage<"CardanoTxInput"> | TypedResponseMessage<"CardanoTxOutput"> | TypedResponseMessage<"CardanoAssetGroup"> | TypedResponseMessage<"CardanoToken"> | TypedResponseMessage<"CardanoTxInlineDatumChunk"> | TypedResponseMessage<"CardanoTxReferenceScriptChunk"> | TypedResponseMessage<"CardanoPoolOwner"> | TypedResponseMessage<"CardanoPoolRelayParameters"> | TypedResponseMessage<"CardanoTxCertificate"> | TypedResponseMessage<"CardanoTxWithdrawal"> | TypedResponseMessage<"CardanoTxAuxiliaryData"> | TypedResponseMessage<"CardanoTxMint"> | TypedResponseMessage<"CardanoTxCollateralInput"> | TypedResponseMessage<"CardanoTxRequiredSigner"> | TypedResponseMessage<"CardanoTxReferenceInput"> | TypedResponseMessage<"CardanoTxItemAck"> | TypedResponseMessage<"CardanoTxAuxiliaryDataSupplement"> | TypedResponseMessage<"CardanoTxWitnessRequest"> | TypedResponseMessage<"CardanoTxWitnessResponse"> | TypedResponseMessage<"CardanoTxHostAck"> | TypedResponseMessage<"CardanoTxBodyHash"> | TypedResponseMessage<"CardanoSignTxFinished"> | TypedResponseMessage<"CardanoSignMessage"> | TypedResponseMessage<"CardanoMessageSignature"> | TypedResponseMessage<"Success"> | TypedResponseMessage<"Failure"> | TypedResponseMessage<"ButtonRequest"> | TypedResponseMessage<"ButtonAck"> | TypedResponseMessage<"PinMatrixRequest"> | TypedResponseMessage<"PinMatrixAck"> | TypedResponseMessage<"PassphraseRequest"> | TypedResponseMessage<"PassphraseAck"> | TypedResponseMessage<"Deprecated_PassphraseStateRequest"> | TypedResponseMessage<"Deprecated_PassphraseStateAck"> | TypedResponseMessage<"BixinPinInputOnDevice"> | TypedResponseMessage<"ConfluxGetAddress"> | TypedResponseMessage<"ConfluxAddress"> | TypedResponseMessage<"ConfluxSignTx"> | TypedResponseMessage<"ConfluxTxRequest"> | TypedResponseMessage<"ConfluxTxAck"> | TypedResponseMessage<"ConfluxSignMessage"> | TypedResponseMessage<"ConfluxMessageSignature"> | TypedResponseMessage<"ConfluxSignMessageCIP23"> | TypedResponseMessage<"CosmosGetAddress"> | TypedResponseMessage<"CosmosAddress"> | TypedResponseMessage<"CosmosSignTx"> | TypedResponseMessage<"CosmosSignedTx"> | TypedResponseMessage<"CipherKeyValue"> | TypedResponseMessage<"CipheredKeyValue"> | TypedResponseMessage<"SignIdentity"> | TypedResponseMessage<"SignedIdentity"> | TypedResponseMessage<"GetECDHSessionKey"> | TypedResponseMessage<"ECDHSessionKey"> | TypedResponseMessage<"BatchGetPublickeys"> | TypedResponseMessage<"EcdsaPublicKeys"> | TypedResponseMessage<"DnxGetAddress"> | TypedResponseMessage<"DnxAddress"> | TypedResponseMessage<"DnxSignTx"> | TypedResponseMessage<"DnxInputRequest"> | TypedResponseMessage<"DnxInputAck"> | TypedResponseMessage<"DnxRTSigsRequest"> | TypedResponseMessage<"DnxSignedTx"> | TypedResponseMessage<"EmmcFixPermission"> | TypedResponseMessage<"EmmcPath"> | TypedResponseMessage<"EmmcPathInfo"> | TypedResponseMessage<"EmmcFileRead"> | TypedResponseMessage<"EmmcFileWrite"> | TypedResponseMessage<"EmmcFileDelete"> | TypedResponseMessage<"EmmcDir"> | TypedResponseMessage<"EmmcDirList"> | TypedResponseMessage<"EmmcDirMake"> | TypedResponseMessage<"EmmcDirRemove"> | TypedResponseMessage<"EosGetPublicKey"> | TypedResponseMessage<"EosPublicKey"> | TypedResponseMessage<"EosSignTx"> | TypedResponseMessage<"EosTxActionRequest"> | TypedResponseMessage<"EosTxActionAck"> | TypedResponseMessage<"EosSignedTx"> | TypedResponseMessage<"EthereumNetworkInfo"> | TypedResponseMessage<"EthereumTokenInfo"> | TypedResponseMessage<"EthereumSignTypedDataUKey"> | TypedResponseMessage<"EthereumGnosisSafeTxRequest"> | TypedResponseMessage<"EthereumGnosisSafeTxAck"> | TypedResponseMessage<"EthereumTypedDataStructRequestUKey"> | TypedResponseMessage<"EthereumTypedDataStructAckUKey"> | TypedResponseMessage<"EthereumTypedDataValueRequestUKey"> | TypedResponseMessage<"EthereumTypedDataValueAckUKey"> | TypedResponseMessage<"EthereumSignTypedData"> | TypedResponseMessage<"EthereumTypedDataStructRequest"> | TypedResponseMessage<"EthereumTypedDataStructAck"> | TypedResponseMessage<"EthereumTypedDataValueRequest"> | TypedResponseMessage<"EthereumTypedDataValueAck"> | TypedResponseMessage<"EthereumGetPublicKeyUKey"> | TypedResponseMessage<"EthereumPublicKeyUKey"> | TypedResponseMessage<"EthereumGetAddressUKey"> | TypedResponseMessage<"EthereumAddressUKey"> | TypedResponseMessage<"EthereumSignTxUKey"> | TypedResponseMessage<"EthereumSignTxEIP1559UKey"> | TypedResponseMessage<"EthereumSignTxEIP7702UKey"> | TypedResponseMessage<"EthereumTxRequestUKey"> | TypedResponseMessage<"EthereumTxAckUKey"> | TypedResponseMessage<"EthereumSignMessageUKey"> | TypedResponseMessage<"EthereumMessageSignatureUKey"> | TypedResponseMessage<"EthereumVerifyMessageUKey"> | TypedResponseMessage<"EthereumSignTypedHashUKey"> | TypedResponseMessage<"EthereumTypedDataSignatureUKey"> | TypedResponseMessage<"EthereumSignMessageEIP712"> | TypedResponseMessage<"EthereumGetPublicKey"> | TypedResponseMessage<"EthereumPublicKey"> | TypedResponseMessage<"EthereumGetAddress"> | TypedResponseMessage<"EthereumAddress"> | TypedResponseMessage<"EthereumSignTx"> | TypedResponseMessage<"EthereumSignTxEIP1559"> | TypedResponseMessage<"EthereumTxRequest"> | TypedResponseMessage<"EthereumTxAck"> | TypedResponseMessage<"EthereumSignMessage"> | TypedResponseMessage<"EthereumMessageSignature"> | TypedResponseMessage<"EthereumVerifyMessage"> | TypedResponseMessage<"EthereumSignTypedHash"> | TypedResponseMessage<"EthereumTypedDataSignature"> | TypedResponseMessage<"FilecoinGetAddress"> | TypedResponseMessage<"FilecoinAddress"> | TypedResponseMessage<"FilecoinSignTx"> | TypedResponseMessage<"FilecoinSignedTx"> | TypedResponseMessage<"KaspaGetAddress"> | TypedResponseMessage<"KaspaAddress"> | TypedResponseMessage<"KaspaSignTx"> | TypedResponseMessage<"KaspaTxInputRequest"> | TypedResponseMessage<"KaspaTxInputAck"> | TypedResponseMessage<"KaspaSignedTx"> | TypedResponseMessage<"LnurlAuth"> | TypedResponseMessage<"LnurlAuthResp"> | TypedResponseMessage<"Initialize"> | TypedResponseMessage<"GetFeatures"> | TypedResponseMessage<"UkeyGetFeatures"> | TypedResponseMessage<"Features"> | TypedResponseMessage<"UkeyFeatures"> | TypedResponseMessage<"LockDevice"> | TypedResponseMessage<"EndSession"> | TypedResponseMessage<"ApplySettings"> | TypedResponseMessage<"ApplyFlags"> | TypedResponseMessage<"ChangePin"> | TypedResponseMessage<"ChangeWipeCode"> | TypedResponseMessage<"SdProtect"> | TypedResponseMessage<"Ping"> | TypedResponseMessage<"Cancel"> | TypedResponseMessage<"GetEntropy"> | TypedResponseMessage<"Entropy"> | TypedResponseMessage<"WipeDevice"> | TypedResponseMessage<"ResetDevice"> | TypedResponseMessage<"BackupDevice"> | TypedResponseMessage<"EntropyRequest"> | TypedResponseMessage<"EntropyAck"> | TypedResponseMessage<"RecoveryDevice"> | TypedResponseMessage<"WordRequest"> | TypedResponseMessage<"WordAck"> | TypedResponseMessage<"SetU2FCounter"> | TypedResponseMessage<"GetNextU2FCounter"> | TypedResponseMessage<"NextU2FCounter"> | TypedResponseMessage<"DoPreauthorized"> | TypedResponseMessage<"PreauthorizedRequest"> | TypedResponseMessage<"CancelAuthorization"> | TypedResponseMessage<"BixinSeedOperate"> | TypedResponseMessage<"BixinMessageSE"> | TypedResponseMessage<"BixinOutMessageSE"> | TypedResponseMessage<"DeviceBackToBoot"> | TypedResponseMessage<"BixinBackupRequest"> | TypedResponseMessage<"BixinBackupAck"> | TypedResponseMessage<"BixinRestoreRequest"> | TypedResponseMessage<"BixinRestoreAck"> | TypedResponseMessage<"BixinVerifyDeviceRequest"> | TypedResponseMessage<"BixinVerifyDeviceAck"> | TypedResponseMessage<"BixinWhiteListRequest"> | TypedResponseMessage<"BixinWhiteListAck"> | TypedResponseMessage<"BixinLoadDevice"> | TypedResponseMessage<"BixinBackupDevice"> | TypedResponseMessage<"BixinBackupDeviceAck"> | TypedResponseMessage<"DeviceInfoSettings"> | TypedResponseMessage<"GetDeviceInfo"> | TypedResponseMessage<"DeviceInfo"> | TypedResponseMessage<"ReadSEPublicKey"> | TypedResponseMessage<"SEPublicKey"> | TypedResponseMessage<"WriteSEPublicCert"> | TypedResponseMessage<"ReadSEPublicCert"> | TypedResponseMessage<"SEPublicCert"> | TypedResponseMessage<"SpiFlashWrite"> | TypedResponseMessage<"SpiFlashRead"> | TypedResponseMessage<"SpiFlashData"> | TypedResponseMessage<"SESignMessage"> | TypedResponseMessage<"SEMessageSignature"> | TypedResponseMessage<"ResourceUpload"> | TypedResponseMessage<"ZoomRequest"> | TypedResponseMessage<"ResourceRequest"> | TypedResponseMessage<"ResourceAck"> | TypedResponseMessage<"ResourceUpdate"> | TypedResponseMessage<"NFTWriteInfo"> | TypedResponseMessage<"NFTWriteData"> | TypedResponseMessage<"RebootToBootloader"> | TypedResponseMessage<"RebootToBoardloader"> | TypedResponseMessage<"ListResDir"> | TypedResponseMessage<"FileInfoList"> | TypedResponseMessage<"DeviceEraseSector"> | TypedResponseMessage<"UnLockDevice"> | TypedResponseMessage<"UnLockDeviceResponse"> | TypedResponseMessage<"GetPassphraseState"> | TypedResponseMessage<"MoneroGetAddress"> | TypedResponseMessage<"MoneroAddress"> | TypedResponseMessage<"MoneroGetWatchKey"> | TypedResponseMessage<"MoneroWatchKey"> | TypedResponseMessage<"MoneroTransactionInitRequest"> | TypedResponseMessage<"MoneroTransactionInitAck"> | TypedResponseMessage<"MoneroTransactionSetInputRequest"> | TypedResponseMessage<"MoneroTransactionSetInputAck"> | TypedResponseMessage<"MoneroTransactionInputsPermutationRequest"> | TypedResponseMessage<"MoneroTransactionInputsPermutationAck"> | TypedResponseMessage<"MoneroTransactionInputViniRequest"> | TypedResponseMessage<"MoneroTransactionInputViniAck"> | TypedResponseMessage<"MoneroTransactionAllInputsSetRequest"> | TypedResponseMessage<"MoneroTransactionAllInputsSetAck"> | TypedResponseMessage<"MoneroTransactionSetOutputRequest"> | TypedResponseMessage<"MoneroTransactionSetOutputAck"> | TypedResponseMessage<"MoneroTransactionAllOutSetRequest"> | TypedResponseMessage<"MoneroTransactionAllOutSetAck"> | TypedResponseMessage<"MoneroTransactionSignInputRequest"> | TypedResponseMessage<"MoneroTransactionSignInputAck"> | TypedResponseMessage<"MoneroTransactionFinalRequest"> | TypedResponseMessage<"MoneroTransactionFinalAck"> | TypedResponseMessage<"MoneroKeyImageExportInitRequest"> | TypedResponseMessage<"MoneroKeyImageExportInitAck"> | TypedResponseMessage<"MoneroKeyImageSyncStepRequest"> | TypedResponseMessage<"MoneroKeyImageSyncStepAck"> | TypedResponseMessage<"MoneroKeyImageSyncFinalRequest"> | TypedResponseMessage<"MoneroKeyImageSyncFinalAck"> | TypedResponseMessage<"MoneroGetTxKeyRequest"> | TypedResponseMessage<"MoneroGetTxKeyAck"> | TypedResponseMessage<"MoneroLiveRefreshStartRequest"> | TypedResponseMessage<"MoneroLiveRefreshStartAck"> | TypedResponseMessage<"MoneroLiveRefreshStepRequest"> | TypedResponseMessage<"MoneroLiveRefreshStepAck"> | TypedResponseMessage<"MoneroLiveRefreshFinalRequest"> | TypedResponseMessage<"MoneroLiveRefreshFinalAck"> | TypedResponseMessage<"NearGetAddress"> | TypedResponseMessage<"NearAddress"> | TypedResponseMessage<"NearSignTx"> | TypedResponseMessage<"NearSignedTx"> | TypedResponseMessage<"NEMGetAddress"> | TypedResponseMessage<"NEMAddress"> | TypedResponseMessage<"NEMSignTx"> | TypedResponseMessage<"NEMSignedTx"> | TypedResponseMessage<"NEMDecryptMessage"> | TypedResponseMessage<"NEMDecryptedMessage"> | TypedResponseMessage<"NeoGetAddress"> | TypedResponseMessage<"NeoAddress"> | TypedResponseMessage<"NeoSignTx"> | TypedResponseMessage<"NeoSignedTx"> | TypedResponseMessage<"NervosGetAddress"> | TypedResponseMessage<"NervosAddress"> | TypedResponseMessage<"NervosSignTx"> | TypedResponseMessage<"NervosSignedTx"> | TypedResponseMessage<"NervosTxRequest"> | TypedResponseMessage<"NervosTxAck"> | TypedResponseMessage<"NexaGetAddress"> | TypedResponseMessage<"NexaAddress"> | TypedResponseMessage<"NexaSignTx"> | TypedResponseMessage<"NexaTxInputRequest"> | TypedResponseMessage<"NexaTxInputAck"> | TypedResponseMessage<"NexaSignedTx"> | TypedResponseMessage<"NostrGetPublicKey"> | TypedResponseMessage<"NostrPublicKey"> | TypedResponseMessage<"NostrSignEvent"> | TypedResponseMessage<"NostrSignedEvent"> | TypedResponseMessage<"NostrSignSchnorr"> | TypedResponseMessage<"NostrSignedSchnorr"> | TypedResponseMessage<"NostrEncryptMessage"> | TypedResponseMessage<"NostrEncryptedMessage"> | TypedResponseMessage<"NostrDecryptMessage"> | TypedResponseMessage<"NostrDecryptedMessage"> | TypedResponseMessage<"PolkadotGetAddress"> | TypedResponseMessage<"PolkadotAddress"> | TypedResponseMessage<"PolkadotSignTx"> | TypedResponseMessage<"PolkadotSignedTx"> | TypedResponseMessage<"RippleGetAddress"> | TypedResponseMessage<"RippleAddress"> | TypedResponseMessage<"RippleSignTx"> | TypedResponseMessage<"RippleSignedTx"> | TypedResponseMessage<"ScdoGetAddress"> | TypedResponseMessage<"ScdoAddress"> | TypedResponseMessage<"ScdoSignTx"> | TypedResponseMessage<"ScdoSignedTx"> | TypedResponseMessage<"ScdoTxAck"> | TypedResponseMessage<"ScdoSignMessage"> | TypedResponseMessage<"ScdoSignedMessage"> | TypedResponseMessage<"SolanaGetAddress"> | TypedResponseMessage<"SolanaAddress"> | TypedResponseMessage<"SolanaSignTx"> | TypedResponseMessage<"SolanaSignedTx"> | TypedResponseMessage<"SolanaSignOffChainMessage"> | TypedResponseMessage<"SolanaSignUnsafeMessage"> | TypedResponseMessage<"SolanaMessageSignature"> | TypedResponseMessage<"StarcoinGetAddress"> | TypedResponseMessage<"StarcoinAddress"> | TypedResponseMessage<"StarcoinGetPublicKey"> | TypedResponseMessage<"StarcoinPublicKey"> | TypedResponseMessage<"StarcoinSignTx"> | TypedResponseMessage<"StarcoinSignedTx"> | TypedResponseMessage<"StarcoinSignMessage"> | TypedResponseMessage<"StarcoinMessageSignature"> | TypedResponseMessage<"StarcoinVerifyMessage"> | TypedResponseMessage<"StellarGetAddress"> | TypedResponseMessage<"StellarAddress"> | TypedResponseMessage<"StellarSignTx"> | TypedResponseMessage<"StellarTxOpRequest"> | TypedResponseMessage<"StellarPaymentOp"> | TypedResponseMessage<"StellarCreateAccountOp"> | TypedResponseMessage<"StellarPathPaymentStrictReceiveOp"> | TypedResponseMessage<"StellarPathPaymentStrictSendOp"> | TypedResponseMessage<"StellarManageSellOfferOp"> | TypedResponseMessage<"StellarManageBuyOfferOp"> | TypedResponseMessage<"StellarCreatePassiveSellOfferOp"> | TypedResponseMessage<"StellarSetOptionsOp"> | TypedResponseMessage<"StellarChangeTrustOp"> | TypedResponseMessage<"StellarAllowTrustOp"> | TypedResponseMessage<"StellarAccountMergeOp"> | TypedResponseMessage<"StellarManageDataOp"> | TypedResponseMessage<"StellarBumpSequenceOp"> | TypedResponseMessage<"StellarSignedTx"> | TypedResponseMessage<"SuiGetAddress"> | TypedResponseMessage<"SuiAddress"> | TypedResponseMessage<"SuiSignTx"> | TypedResponseMessage<"SuiSignedTx"> | TypedResponseMessage<"SuiTxRequest"> | TypedResponseMessage<"SuiTxAck"> | TypedResponseMessage<"SuiSignMessage"> | TypedResponseMessage<"SuiMessageSignature"> | TypedResponseMessage<"TezosGetAddress"> | TypedResponseMessage<"TezosAddress"> | TypedResponseMessage<"TezosGetPublicKey"> | TypedResponseMessage<"TezosPublicKey"> | TypedResponseMessage<"TezosSignTx"> | TypedResponseMessage<"TezosSignedTx"> | TypedResponseMessage<"TonGetAddress"> | TypedResponseMessage<"TonAddress"> | TypedResponseMessage<"TonSignMessage"> | TypedResponseMessage<"TonTxAck"> | TypedResponseMessage<"TonSignedMessage"> | TypedResponseMessage<"TonSignProof"> | TypedResponseMessage<"TonSignedProof"> | TypedResponseMessage<"TronGetAddress"> | TypedResponseMessage<"TronAddress"> | TypedResponseMessage<"TronSignTx"> | TypedResponseMessage<"TronSignedTx"> | TypedResponseMessage<"TronSignMessage"> | TypedResponseMessage<"TronMessageSignature"> | TypedResponseMessage<"facotry">;
|
|
3163
|
+
|
|
3164
|
+
declare const getDeviceType: (features?: Features) => IDeviceType;
|
|
3165
|
+
declare const getDeviceTypeByBleName: (name?: string) => IDeviceType;
|
|
3166
|
+
declare const getDeviceBleName: (features?: Features) => string | null;
|
|
3167
|
+
declare const getDeviceUUID: (features: Features) => string;
|
|
3168
|
+
declare const getDeviceLabel: (features?: Features) => string | null;
|
|
3169
|
+
declare const getMethodVersionRange: (features: Features | undefined, getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined) => IVersionRange | undefined;
|
|
3170
|
+
declare const getFirmwareType: (features: Features | undefined) => EFirmwareType;
|
|
3171
|
+
|
|
3172
|
+
declare const getDeviceFirmwareVersion: (features: Features | undefined) => IVersionArray;
|
|
3173
|
+
declare const getDeviceBLEFirmwareVersion: (features: Features) => IVersionArray;
|
|
3174
|
+
declare const getDeviceBootloaderVersion: (features: Features | undefined) => IVersionArray;
|
|
3175
|
+
declare const getDeviceBoardloaderVersion: (features: Features) => IVersionArray;
|
|
3176
|
+
|
|
3177
|
+
type IFirmwareField = 'firmware' | 'firmware-v2' | 'firmware-v7';
|
|
3178
|
+
type MessageVersion = 'latest' | 'v1';
|
|
3179
|
+
declare class DataManager {
|
|
3180
|
+
static deviceMap: DeviceTypeMap;
|
|
3181
|
+
static assets: AssetsMap | null;
|
|
3182
|
+
static settings: ConnectSettings;
|
|
3183
|
+
static messages: {
|
|
3184
|
+
[version in MessageVersion]: JSON;
|
|
3185
|
+
};
|
|
3186
|
+
static lastCheckTimestamp: number;
|
|
3187
|
+
static getFirmwareStatus: (features: Features) => IDeviceFirmwareStatus;
|
|
3188
|
+
static getSysResourcesLatestRelease: (features: Features, forcedUpdateRes?: boolean) => string | undefined;
|
|
3189
|
+
static getSysFullResource: (features: Features) => string | undefined;
|
|
3190
|
+
static getBootloaderResource: (features: Features) => string | undefined;
|
|
3191
|
+
static getBootloaderTargetVersion: (features: Features) => IVersionArray | undefined;
|
|
3192
|
+
static getBootloaderRelatedFirmwareVersion: (features: Features) => IVersionArray | undefined;
|
|
3193
|
+
static getFirmwareChangelog: (features: Features) => {
|
|
3194
|
+
"zh-CN": string;
|
|
3195
|
+
"en-US": string;
|
|
3196
|
+
}[];
|
|
3197
|
+
static getFirmwareLatestRelease: (features: Features) => IFirmwareReleaseInfo | undefined;
|
|
3198
|
+
static getBLEFirmwareStatus: (features: Features) => IDeviceBLEFirmwareStatus;
|
|
3199
|
+
static getBleFirmwareChangelog: (features: Features) => {
|
|
3200
|
+
"zh-CN": string;
|
|
3201
|
+
"en-US": string;
|
|
3202
|
+
}[];
|
|
3203
|
+
static getBleFirmwareLatestRelease: (features: Features) => IBLEFirmwareReleaseInfo | undefined;
|
|
3204
|
+
static getTransportStatus: (localVersion: string) => ITransportStatus;
|
|
3205
|
+
static getBridgeChangelog: () => {
|
|
3206
|
+
"zh-CN": string;
|
|
3207
|
+
"en-US": string;
|
|
3208
|
+
} | undefined;
|
|
3209
|
+
static load(settings: ConnectSettings): Promise<void>;
|
|
3210
|
+
static updateEnv(newEnv: ConnectSettings['env']): void;
|
|
3211
|
+
static checkAndReloadData(): Promise<void>;
|
|
3212
|
+
static getProtobufMessages(messageVersion?: MessageVersion): JSON;
|
|
3213
|
+
static getSettings(key?: undefined): ConnectSettings;
|
|
3214
|
+
static getSettings<T extends keyof ConnectSettings>(key: T): ConnectSettings[T];
|
|
3215
|
+
static isBleConnect: (env: ConnectSettings['env']) => boolean;
|
|
3216
|
+
static isWebUsbConnect: (env: ConnectSettings['env']) => boolean;
|
|
3217
|
+
}
|
|
3218
|
+
|
|
3219
|
+
declare const supportInputPinOnSoftware: (features: Features) => SupportFeatureType;
|
|
3220
|
+
declare const getFirmwareUpdateField: ({ features, updateType, targetVersion, }: {
|
|
3221
|
+
features: Features;
|
|
3222
|
+
updateType: 'firmware' | 'ble';
|
|
3223
|
+
targetVersion?: string | undefined;
|
|
3224
|
+
}) => 'ble' | IFirmwareField;
|
|
3225
|
+
declare const getFirmwareUpdateFieldArray: (features: Features, updateType: 'firmware' | 'ble' | 'bootloader') => ('firmware' | 'ble' | 'firmware-v2' | 'firmware-v7')[];
|
|
3226
|
+
|
|
3227
|
+
declare function checkNeedUpdateBootForTouch(features: Features): boolean;
|
|
3228
|
+
declare function checkNeedUpdateBootForClassicAndMini(features: Features, willUpdateFirmware?: string): boolean;
|
|
3229
|
+
|
|
3230
|
+
declare const getHDPath: (path: string) => Array<number>;
|
|
3231
|
+
declare const getScriptType: (path: Array<number>) => InputScriptType;
|
|
3232
|
+
declare const getOutputScriptType: (path?: number[]) => ChangeOutputScriptType;
|
|
3233
|
+
|
|
3234
|
+
declare const getHomeScreenHex: (deviceType: IDeviceType, name: string) => string;
|
|
3235
|
+
declare const getHomeScreenDefaultList: (features: Features) => string[];
|
|
3236
|
+
type SizeConfig = {
|
|
3237
|
+
width: number;
|
|
3238
|
+
height: number;
|
|
3239
|
+
radius?: number;
|
|
3240
|
+
};
|
|
3241
|
+
declare const getHomeScreenSize: ({ deviceType, homeScreenType, thumbnail, }: {
|
|
3242
|
+
deviceType: IDeviceType;
|
|
3243
|
+
homeScreenType: 'WallPaper' | 'Nft';
|
|
3244
|
+
thumbnail?: boolean | undefined;
|
|
3245
|
+
}) => SizeConfig | undefined;
|
|
3246
|
+
|
|
3247
|
+
declare const isBleConnect: (env: string) => boolean;
|
|
3248
|
+
|
|
3249
|
+
declare const wait: (ms: number) => Promise<unknown>;
|
|
3250
|
+
|
|
3251
|
+
declare const getSDKVersion: () => any;
|
|
3252
|
+
declare const whitelist: {
|
|
3253
|
+
origin: string;
|
|
3254
|
+
}[];
|
|
3255
|
+
declare const whitelistExtension: string[];
|
|
3256
|
+
|
|
3257
|
+
declare const DEFAULT_PRIORITY = 2;
|
|
3258
|
+
declare global {
|
|
3259
|
+
var UKEY_CONNECT_SRC: string;
|
|
3260
|
+
}
|
|
3261
|
+
declare const getEnv: () => "web" | "webextension" | "electron" | "react-native";
|
|
3262
|
+
declare const corsValidator: (url?: string) => string | undefined;
|
|
3263
|
+
declare const parseConnectSettings: (input?: Partial<ConnectSettings>) => ConnectSettings;
|
|
3264
|
+
|
|
3265
|
+
declare const HardwareSdk: ({ init, call, dispose, eventEmitter, uiResponse, cancel, updateSettings, switchTransport, }: InjectApi) => CoreApi;
|
|
3266
|
+
declare const HardwareSDKLowLevel: ({ init, call, dispose, eventEmitter, addHardwareGlobalEventListener, uiResponse, cancel, updateSettings, switchTransport, }: LowLevelInjectApi) => LowLevelCoreApi;
|
|
3267
|
+
declare const HardwareTopLevelSdk: () => CoreApi;
|
|
3268
|
+
|
|
3269
|
+
export { AccountAddress, AccountAddresses, AlephiumAddress, AlephiumGetAddressParams, AlephiumSignMessageParams, AlephiumSignTransactionParams, AlephiumSignedTx, AlgoAddress, AlgoGetAddressParams, AlgoSignTransactionParams, AlgoSignedTx, AllNetworkAddressParams, AllNetworkGetAddressParams, AptosAddress, AptosGetAddressParams, AptosGetPublicKeyParams, AptosMessageSignature, AptosPublicKey, AptosSignInMessageParams, AptosSignInMessageSignature, AptosSignMessageParams, AptosSignTransactionParams, AptosSignedTx, AssetsMap, BTCAddress, BTCGetAddressParams, BTCGetPublicKeyParams, BTCPublicKey, BTCSignMessageParams, BTCSignTransactionParams, BTCVerifyMessageParams, BenfenAddress, BenfenGetAddressParams, BenfenGetPublicKeyParams, BenfenPublicKey, BenfenSignMessageParams, BenfenSignTransactionParams, BenfenSignedTx, BleReleaseInfoEvent, BleReleaseInfoPayload, CORE_EVENT, CallMethod, CallMethodAnyResponse, CallMethodKeys, CallMethodPayload, CallMethodResponse, CallMethodUnion, CardanoAddress, CardanoGetAddressMethodParams, CardanoGetAddressParams, CardanoSignMessageMethodParams, CardanoSignMessageParams, CardanoSignTransaction, CardanoSignedTxData, CipheredKeyValue, CipheredKeyValueParams, CommonParams, ConfluxAddress, ConfluxGetAddressParams, ConfluxSignMessageCIP23Params, ConfluxSignMessageParams, ConfluxSignTransactionParams, ConfluxSignedTx, ConfluxTransaction, ConnectSettings, Core, CoreApi, CoreMessage, CosmosAddress, CosmosGetAddressParams, CosmosGetPublicKeyParams, CosmosPublicKey, CosmosSignTransactionParams, CosmosSignedTx, DEFAULT_PRIORITY, DEVICE, DEVICE_EVENT, DataManager, Device$1 as Device, DeviceButtonRequest, DeviceButtonRequestPayload, DeviceChangePinParams, DeviceConnnectRequest, DeviceDisconnnectRequest, DeviceEvent, DeviceEventListenerFn, DeviceEventMessage, DeviceFeaturesPayload, DeviceFirmwareRange, DeviceFlagsParams, DeviceModelToTypes, DeviceProgress, DeviceRecoveryParams, DeviceResetParams, DeviceSendFeatures, DeviceSendSupportFeatures, DeviceSettingsParams, DeviceStatus, DeviceSupportFeatures, DeviceSupportFeaturesPayload, DeviceTypeMap, DeviceTypeToModels, DeviceUploadResourceParams, DeviceVerifyParams, DeviceVerifySignature, DnxAddress, DnxGetAddressParams, DnxSignTransactionParams, DnxSignature, DnxTxKey, EUKeyDeviceMode, EVMAccessList, EVMAddress, EVMAuthorization, EVMAuthorizationSignature, EVMGetAddressParams, EVMGetPublicKeyParams, EVMPublicKey, EVMSignMessageEIP712Params, EVMSignMessageParams, EVMSignTransactionParams, EVMSignTypedDataParams, EVMSignedTx, EVMTransaction, EVMTransactionEIP1559, EVMTransactionEIP7702, EVMVerifyMessageParams, EmmcFileWriteParams, EthereumSignTypedDataMessage, EthereumSignTypedDataTypeProperty, EthereumSignTypedDataTypes, FIRMWARE, FIRMWARE_EVENT, Features, FilecoinAddress, FilecoinGetAddressParams, FilecoinSignTransactionParams, FilecoinSignedTx, FirmwareEvent, FirmwareMessage, FirmwareProcessing, FirmwareProgress, FirmwareRange, FirmwareRelease, FirmwareTip, FirmwareUpdateBinaryParams, FirmwareUpdateParams, FirmwareUpdateTipMessage, FirmwareUpdateV3Params, HardwareSDKLowLevel, HardwareTopLevelSdk, IBLEFirmwareReleaseInfo, IDeviceBLEFirmwareStatus, IDeviceFirmwareStatus, IDeviceModel, IDeviceType, IFRAME, IFirmwareField, IFirmwareReleaseInfo, IFirmwareUpdateProgressType, IFirmwareUpdateTipMessage, IFrameBridge, IFrameCallMessage, IFrameCallback, IFrameCallbackMessage, IFrameCancelMessage, IFrameEvent, IFrameEventMessage, IFrameInit, IFrameSwitchTransport, IFrameSwitchTransportMessage, ILocale, ITransportStatus, IVersionArray, IVersionRange, KaspaAddress, KaspaGetAddressParams, KaspaSignInputParams, KaspaSignOutputParams, KaspaSignTransactionParams, KaspaSignature, KnownDevice, LOG, LOG_EVENT, LogBlockEvent, LogEvent, LogEventMessage, LogOutput, LoggerNames, LowLevelCoreApi, LowLevelInjectApi, MajorVersion, MethodResponseMessage, NEMAddress, NEMAggregateModificationTransaction, NEMGetAddressParams, NEMImportanceTransaction, NEMMosaic, NEMMosaicCreationTransaction, NEMMultisigTransaction, NEMProvisionNamespaceTransaction, NEMSignTransactionParams, NEMSupplyChangeTransaction, NEMTransaction, NEMTransferTransaction, NearAddress, NearGetAddressParams, NearSignTransactionParams, NervosAddress, NervosGetAddressParams, NervosSignTransactionParams, NervosSignedTx, NexaAddress, NexaGetAddressParams, NexaSignInputParams, NexaSignOutputParams, NexaSignTransactionParams, NexaSignature, Params, PassphraseRequestPayload, PolkadotAddress, PolkadotGetAddressParams, PolkadotSignTransactionParams, PolkadotSignedTx, PostMessageEvent, PreviousAddressResult, RESPONSE_EVENT, RefTransaction, ReleaseInfo, ReleaseInfoEvent, ReleaseInfoPayload, RemoteConfigResponse, Response, ScdoAddress, ScdoGetAddressParams, ScdoSignMessageParams, ScdoSignTransactionParams, ScdoSignedTx, SearchDevice, SignedTransaction, SolSignMessageParams, SolSignMessageResponse, SolSignOffchainMessageParams, SolSignOffchainMessageResponse, SolanaAddress, SolanaGetAddressParams, SolanaSignTransactionParams, SolanaSignedTx, StarcoinAddress, StarcoinGetAddressParams, StarcoinGetPublicKeyParams, StarcoinPublicKey, StarcoinSignMessageParams, StarcoinSignTransactionParams, StarcoinVerifyMessageParams, StellarAddress, StellarAsset, StellarGetAddressParams, StellarOperation, StellarSignTransactionParams, StellarTransaction, StrictFeatures, Success, SuiAddress, SuiGetAddressParams, SuiGetPublicKeyParams, SuiPublicKey, SuiSignMessageParams, SuiSignTransactionParams, SuiSignedTx, SupportFeatureType, SupportFeatures, TonAddress, TonGetAddressParams, TonSignMessageParams, TonSignProofParams, TopLevelInjectApi, TransactionOptions, TransportReleaseStatus, TronAddress, TronDelegateResourceContract, TronFreezeBalanceV2Contract, TronGetAddressParams, TronSignMessageParams, TronSignTransactionParams, TronTransaction, TronTransactionContract, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceV2Contract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, UI_EVENT, UI_REQUEST, UI_RESPONSE, UiEvent, UiEventMessage, UiPromise, UiPromiseResponse, UiRequestButton, UiRequestDeviceAction, UiRequestFirmwareProgressing, UiRequestPassphrase, UiRequestPassphraseOnDevice, UiRequestSelectDeviceInBootloaderForWebDevice, UiRequestWithoutPayload, UiResponseEvent, UiResponseMessage, UiResponsePassphrase, UiResponsePin, UiResponseSelectDeviceInBootloaderForWebDevice, UkeyFeatures, UnavailableCapabilities, UnavailableCapability, Unsuccessful, VersionArray, checkNeedUpdateBootForClassicAndMini, checkNeedUpdateBootForTouch, cleanupCallback, corsValidator, createDeviceMessage, createErrorMessage, createFirmwareMessage, createIFrameMessage, createLogMessage, createResponseMessage, createUiMessage, createUiResponse, HardwareSdk as default, enableLog, executeCallback, getDeviceBLEFirmwareVersion, getDeviceBleName, getDeviceBoardloaderVersion, getDeviceBootloaderVersion, getDeviceFirmwareVersion, getDeviceLabel, getDeviceType, getDeviceTypeByBleName, getDeviceUUID, getEnv, getFirmwareType, getFirmwareUpdateField, getFirmwareUpdateFieldArray, getHDPath, getHomeScreenDefaultList, getHomeScreenHex, getHomeScreenSize, getLog, getLogger, getMethodVersionRange, getOutputScriptType, getSDKVersion, getScriptType, getTimeStamp, httpRequest, init as initCore, isBleConnect, isValidVersionArray, isValidVersionString, normalizeVersionArray, parseConnectSettings, parseMessage, patchFeatures, safeThrowError, setLoggerPostMessage, supportInputPinOnSoftware, switchTransport, versionCompare, versionSplit, wait, whitelist, whitelistExtension };
|