@onekeyfe/hd-transport 1.1.20-alpha.0 → 1.1.20-alpha.1
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/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/types/transport.d.ts +6 -2
- package/dist/types/transport.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +2 -0
- package/src/types/transport.ts +18 -2
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ declare namespace decodeProtocol {
|
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
+
type OneKeyDeviceCommunicationType = 'usb' | 'webusb' | 'ble' | 'webble' | 'electron-ble' | 'bridge' | 'emulator';
|
|
37
38
|
type OneKeyUsbDeviceInfo = {
|
|
38
39
|
path: string;
|
|
39
40
|
};
|
|
@@ -46,7 +47,10 @@ type OneKeyMobileDeviceInfo = {
|
|
|
46
47
|
id: string;
|
|
47
48
|
name: string | null;
|
|
48
49
|
};
|
|
49
|
-
type
|
|
50
|
+
type OneKeyDeviceInfoBase = {
|
|
51
|
+
type: OneKeyDeviceCommunicationType;
|
|
52
|
+
};
|
|
53
|
+
type OneKeyDeviceInfo = OneKeyDeviceInfoBase & OneKeyDeviceInfoWithSession & OneKeyMobileDeviceInfo;
|
|
50
54
|
type AcquireInput = {
|
|
51
55
|
path?: string;
|
|
52
56
|
previous?: string | null;
|
|
@@ -77,7 +81,7 @@ type Transport = {
|
|
|
77
81
|
activeName?: string;
|
|
78
82
|
isOutdated: boolean;
|
|
79
83
|
};
|
|
80
|
-
type LowLevelDevice = {
|
|
84
|
+
type LowLevelDevice = OneKeyDeviceInfoBase & {
|
|
81
85
|
id: string;
|
|
82
86
|
name: string;
|
|
83
87
|
};
|
|
@@ -5215,4 +5219,4 @@ declare const _default: {
|
|
|
5215
5219
|
decodeProtocol: typeof decodeProtocol;
|
|
5216
5220
|
};
|
|
5217
5221
|
|
|
5218
|
-
export { AcquireInput, Address, AlephiumAddress, AlephiumBytecodeAck, AlephiumBytecodeRequest, AlephiumGetAddress, AlephiumMessageSignature, AlephiumSignMessage, AlephiumSignTx, AlephiumSignedTx, AlephiumTxAck, AlephiumTxRequest, AlgorandAddress, AlgorandGetAddress, AlgorandSignTx, AlgorandSignedTx, AmountUnit, ApplyFlags, ApplySettings, AptosAddress, AptosGetAddress, AptosMessagePayload, AptosMessageSignature, AptosSignMessage, AptosSignSIWAMessage, AptosSignTx, AptosSignedTx, AptosTransactionType, AuthorizeCoinJoin, BIP32Address, BUFFER_SIZE, BackupDevice, BackupType, BatchGetPublickeys, BenfenAddress, BenfenGetAddress, BenfenMessageSignature, BenfenSignMessage, BenfenSignTx, BenfenSignedTx, BenfenTxAck, BenfenTxRequest, BinanceAddress, BinanceCancelMsg, BinanceCoin, BinanceGetAddress, BinanceGetPublicKey, BinanceInputOutput, BinanceOrderMsg, BinanceOrderSide, BinanceOrderType, BinancePublicKey, BinanceSignTx, BinanceSignedTx, BinanceTimeInForce, BinanceTransferMsg, BinanceTxRequest, BixinBackupAck, BixinBackupDevice, BixinBackupDeviceAck, BixinBackupRequest, BixinLoadDevice, BixinMessageSE, BixinOutMessageSE, BixinPinInputOnDevice, BixinRestoreAck, BixinRestoreRequest, BixinSeedOperate, BixinVerifyDeviceAck, BixinVerifyDeviceRequest, BixinWhiteListAck, BixinWhiteListRequest, BlurRequest, ButtonAck, ButtonRequest, ButtonRequestType, COMMON_HEADER_SIZE, Cancel, CancelAuthorization, Capability, CardanoAddress, CardanoAddressParametersType, CardanoAddressType, CardanoAssetGroup, CardanoBlockchainPointerType, CardanoCVoteRegistrationDelegation, CardanoCVoteRegistrationFormat, CardanoCVoteRegistrationParametersType, CardanoCertificateType, CardanoDRep, CardanoDRepType, CardanoDerivationType, CardanoGetAddress, CardanoGetNativeScriptHash, CardanoGetPublicKey, CardanoMessageSignature, CardanoNativeScript, CardanoNativeScriptHash, CardanoNativeScriptHashDisplayFormat, CardanoNativeScriptType, CardanoPoolMetadataType, CardanoPoolOwner, CardanoPoolParametersType, CardanoPoolRelayParameters, CardanoPoolRelayType, CardanoPublicKey, CardanoSignMessage, CardanoSignTxFinished, CardanoSignTxInit, CardanoToken, CardanoTxAuxiliaryData, CardanoTxAuxiliaryDataSupplement, CardanoTxAuxiliaryDataSupplementType, CardanoTxBodyHash, CardanoTxCertificate, CardanoTxCollateralInput, CardanoTxHostAck, CardanoTxInlineDatumChunk, CardanoTxInput, CardanoTxItemAck, CardanoTxMint, CardanoTxOutput, CardanoTxOutputSerializationFormat, CardanoTxReferenceInput, CardanoTxReferenceScriptChunk, CardanoTxRequiredSigner, CardanoTxSigningMode, CardanoTxWithdrawal, CardanoTxWitnessRequest, CardanoTxWitnessResponse, CardanoTxWitnessType, ChangeOutputScriptType, ChangePin, ChangeWipeCode, CipherKeyValue, CipheredKeyValue, CommandFlags, ConfluxAddress, ConfluxGetAddress, ConfluxMessageSignature, ConfluxSignMessage, ConfluxSignMessageCIP23, ConfluxSignTx, ConfluxTxAck, ConfluxTxRequest, CosmosAddress, CosmosGetAddress, CosmosSignTx, CosmosSignedTx, DecredStakingSpendType, Deprecated_PassphraseStateAck, Deprecated_PassphraseStateRequest, DeviceBackToBoot, DeviceEraseSector, DeviceInfo, DeviceInfoSettings, DnxAddress, DnxComputedKeyImage, DnxGetAddress, DnxInputAck, DnxInputRequest, DnxRTSigsRequest, DnxSignTx, DnxSignedTx, DnxTxKey, DoPreauthorized, ECDHSessionKey, EcdsaPublicKeys, EmmcDir, EmmcDirList, EmmcDirMake, EmmcDirRemove, EmmcFile, EmmcFileDelete, EmmcFileRead, EmmcFileWrite, EmmcFixPermission, EmmcPath, EmmcPathInfo, EndSession, Entropy, EntropyAck, EntropyRequest, Enum_BackupType, Enum_ButtonRequestType, Enum_Capability, Enum_InputScriptType, Enum_OutputScriptType, Enum_PinMatrixRequestType, Enum_RequestType, Enum_SafetyCheckLevel, Enum_WordRequestType, EosActionBuyRam, EosActionBuyRamBytes, EosActionCommon, EosActionDelegate, EosActionDeleteAuth, EosActionLinkAuth, EosActionNewAccount, EosActionRefund, EosActionSellRam, EosActionTransfer, EosActionUndelegate, EosActionUnknown, EosActionUnlinkAuth, EosActionUpdateAuth, EosActionVoteProducer, EosAsset, EosAuthorization, EosAuthorizationAccount, EosAuthorizationKey, EosAuthorizationWait, EosGetPublicKey, EosPermissionLevel, EosPublicKey, EosSignTx, EosSignedTx, EosTxActionAck, EosTxActionRequest, EosTxHeader, EthereumAccessList, EthereumAccessListOneKey, EthereumAddress, EthereumAddressOneKey, EthereumAuthorizationOneKey, EthereumAuthorizationSignature, EthereumDataType, EthereumDataTypeOneKey, EthereumDefinitionType, EthereumDefinitions, EthereumFieldType, EthereumFieldTypeOneKey, EthereumGetAddress, EthereumGetAddressOneKey, EthereumGetPublicKey, EthereumGetPublicKeyOneKey, EthereumGnosisSafeTxAck, EthereumGnosisSafeTxOperation, EthereumGnosisSafeTxRequest, EthereumMessageSignature, EthereumMessageSignatureOneKey, EthereumNetworkInfo, EthereumPublicKey, EthereumPublicKeyOneKey, EthereumSignMessage, EthereumSignMessageEIP712, EthereumSignMessageOneKey, EthereumSignTx, EthereumSignTxEIP1559, EthereumSignTxEIP1559OneKey, EthereumSignTxEIP7702OneKey, EthereumSignTxOneKey, EthereumSignTypedData, EthereumSignTypedDataOneKey, EthereumSignTypedHash, EthereumSignTypedHashOneKey, EthereumStructMember, EthereumStructMemberOneKey, EthereumTokenInfo, EthereumTxAck, EthereumTxAckOneKey, EthereumTxRequest, EthereumTxRequestOneKey, EthereumTypedDataSignature, EthereumTypedDataSignatureOneKey, EthereumTypedDataStructAck, EthereumTypedDataStructAckOneKey, EthereumTypedDataStructRequest, EthereumTypedDataStructRequestOneKey, EthereumTypedDataValueAck, EthereumTypedDataValueAckOneKey, EthereumTypedDataValueRequest, EthereumTypedDataValueRequestOneKey, EthereumVerifyMessage, EthereumVerifyMessageOneKey, ExportType, Failure, FailureType, Features, FileInfo, FileInfoList, FilecoinAddress, FilecoinGetAddress, FilecoinSignTx, FilecoinSignedTx, FirmwareErase, FirmwareErase_ex, FirmwareRequest, FirmwareUpdateEmmc, FirmwareUpload, GetAddress, GetDeviceInfo, GetECDHSessionKey, GetEntropy, GetFeatures, GetNextU2FCounter, GetOwnershipId, GetOwnershipProof, GetPassphraseState, GetPublicKey, GetPublicKeyMultiple, HDNodePathType, HDNodeType, HEADER_SIZE, IdentityType, Initialize, InputScriptType, InternalInputScriptType, KaspaAddress, KaspaGetAddress, KaspaSignTx, KaspaSignedTx, KaspaTxInputAck, KaspaTxInputRequest, ListResDir, LnurlAuth, LnurlAuthResp, LockDevice, LogBlockCommand, LowLevelDevice, LowlevelTransportSharedPlugin, MESSAGE_HEADER_BYTE, MESSAGE_TOP_CHAR, MessageFromOneKey, MessageKey, MessageResponse, MessageSignature, MessageType, messages as Messages, MoneroAccountPublicAddress, MoneroAddress, MoneroExportedKeyImage, MoneroGetAddress, MoneroGetTxKeyAck, MoneroGetTxKeyRequest, MoneroGetWatchKey, MoneroKeyImageExportInitAck, MoneroKeyImageExportInitRequest, MoneroKeyImageSyncFinalAck, MoneroKeyImageSyncFinalRequest, MoneroKeyImageSyncStepAck, MoneroKeyImageSyncStepRequest, MoneroLiveRefreshFinalAck, MoneroLiveRefreshFinalRequest, MoneroLiveRefreshStartAck, MoneroLiveRefreshStartRequest, MoneroLiveRefreshStepAck, MoneroLiveRefreshStepRequest, MoneroMultisigKLRki, MoneroOutputEntry, MoneroRctKeyPublic, MoneroRingCtSig, MoneroSubAddressIndicesList, MoneroTransactionAllInputsSetAck, MoneroTransactionAllInputsSetRequest, MoneroTransactionAllOutSetAck, MoneroTransactionAllOutSetRequest, MoneroTransactionData, MoneroTransactionDestinationEntry, MoneroTransactionFinalAck, MoneroTransactionFinalRequest, MoneroTransactionInitAck, MoneroTransactionInitRequest, MoneroTransactionInputViniAck, MoneroTransactionInputViniRequest, MoneroTransactionInputsPermutationAck, MoneroTransactionInputsPermutationRequest, MoneroTransactionRsigData, MoneroTransactionSetInputAck, MoneroTransactionSetInputRequest, MoneroTransactionSetOutputAck, MoneroTransactionSetOutputRequest, MoneroTransactionSignInputAck, MoneroTransactionSignInputRequest, MoneroTransactionSourceEntry, MoneroTransferDetails, MoneroWatchKey, MultisigRedeemScriptType, NEMAddress, NEMAggregateModification, NEMCosignatoryModification, NEMDecryptMessage, NEMDecryptedMessage, NEMGetAddress, NEMImportanceTransfer, NEMImportanceTransferMode, NEMModificationType, NEMMosaic, NEMMosaicCreation, NEMMosaicDefinition, NEMMosaicLevy, NEMMosaicSupplyChange, NEMProvisionNamespace, NEMSignTx, NEMSignedTx, NEMSupplyChangeType, NEMTransactionCommon, NEMTransfer, NFTWriteData, NFTWriteInfo, NearAddress, NearGetAddress, NearSignTx, NearSignedTx, NeoAddress, NeoGetAddress, NeoSignTx, NeoSignedTx, NervosAddress, NervosGetAddress, NervosSignTx, NervosSignedTx, NervosTxAck, NervosTxRequest, NexaAddress, NexaGetAddress, NexaSignTx, NexaSignedTx, NexaTxInputAck, NexaTxInputRequest, NextU2FCounter, NostrDecryptMessage, NostrDecryptedMessage, NostrEncryptMessage, NostrEncryptedMessage, NostrGetPublicKey, NostrPublicKey, NostrSignEvent, NostrSignSchnorr, NostrSignedEvent, NostrSignedSchnorr, OneKeyDeviceInfo, OneKeyDeviceInfoWithSession, OneKeyDeviceType, OneKeyMobileDeviceInfo, OneKeySEState, OneKeySeType, OnekeyFeatures, OnekeyGetFeatures, OutputScriptType, OwnershipId, OwnershipProof, PassphraseAck, PassphraseRequest, PassphraseState, Path, PinMatrixAck, PinMatrixRequest, PinMatrixRequestType, Ping, PolkadotAddress, PolkadotGetAddress, PolkadotSignTx, PolkadotSignedTx, PreauthorizedRequest, PrevInput, PrevOutput, PrevTx, PublicKey, PublicKeyMultiple, ReadSEPublicCert, ReadSEPublicKey, Reboot, RebootToBoardloader, RebootToBootloader, RebootType, RecoveryDevice, RecoveryDeviceType, RequestType, ResetDevice, ResourceAck, ResourceRequest, ResourceType, ResourceUpdate, ResourceUpload, RippleAddress, RippleGetAddress, RipplePayment, RippleSignTx, RippleSignedTx, SEMessageSignature, SEPublicCert, SEPublicKey, SESignMessage, SafetyCheckLevel, ScdoAddress, ScdoGetAddress, ScdoSignMessage, ScdoSignTx, ScdoSignedMessage, ScdoSignedTx, ScdoTxAck, SdProtect, SdProtectOperationType, SeedRequestType, SelfTest, SetU2FCounter, SignIdentity, SignMessage, SignPsbt, SignTx, SignedIdentity, SignedPsbt, SolanaAddress, SolanaGetAddress, SolanaMessageSignature, SolanaOffChainMessageFormat, SolanaOffChainMessageVersion, SolanaSignOffChainMessage, SolanaSignTx, SolanaSignUnsafeMessage, SolanaSignedTx, SpiFlashData, SpiFlashRead, SpiFlashWrite, StarcoinAddress, StarcoinGetAddress, StarcoinGetPublicKey, StarcoinMessageSignature, StarcoinPublicKey, StarcoinSignMessage, StarcoinSignTx, StarcoinSignedTx, StarcoinVerifyMessage, StellarAccountMergeOp, StellarAddress, StellarAllowTrustOp, StellarAsset, StellarAssetType, StellarBumpSequenceOp, StellarChangeTrustOp, StellarCreateAccountOp, StellarCreatePassiveSellOfferOp, StellarGetAddress, StellarManageBuyOfferOp, StellarManageDataOp, StellarManageSellOfferOp, StellarMemoType, StellarPathPaymentStrictReceiveOp, StellarPathPaymentStrictSendOp, StellarPaymentOp, StellarSetOptionsOp, StellarSignTx, StellarSignedTx, StellarSignerType, StellarTxOpRequest, Success, SuiAddress, SuiGetAddress, SuiMessageSignature, SuiSignMessage, SuiSignTx, SuiSignedTx, SuiTxAck, SuiTxRequest, TezosAddress, TezosBallotOp, TezosBallotType, TezosContractID, TezosContractType, TezosDelegationOp, TezosGetAddress, TezosGetPublicKey, TezosManagerTransfer, TezosOriginationOp, TezosParametersManager, TezosProposalOp, TezosPublicKey, TezosRevealOp, TezosSignTx, TezosSignedTx, TezosTransactionOp, TonAddress, TonGetAddress, TonSignMessage, TonSignProof, TonSignedMessage, TonSignedProof, TonTxAck, TonWalletVersion, TonWorkChain, Transport, TronAddress, TronCancelAllUnfreezeV2Contract, TronContract, TronDelegateResourceContract, TronFreezeBalanceContract, TronFreezeBalanceV2Contract, TronGetAddress, TronMessageSignature, TronMessageType, TronResourceCode, TronSignMessage, TronSignTx, TronSignedTx, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceContract, TronUnfreezeBalanceV2Contract, TronVoteWitnessContract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, TxAck, TxAckInput, TxAckInputWrapper, TxAckOutput, TxAckOutputWrapper, TxAckPrevExtraData, TxAckPrevExtraDataWrapper, TxAckPrevInput, TxAckPrevInputWrapper, TxAckPrevMeta, TxAckPrevOutput, TxAckPrevOutputWrapper, TxAckResponse, TxInput, TxInputType, TxOutput, TxOutputBinType, TxOutputType, TxRequest, TxRequestDetailsType, TxRequestSerializedType, TypedCall, UintType, UnLockDevice, UnLockDeviceResponse, UpgradeFileHeader, VerifyMessage, Vote, WL_OperationType, WipeDevice, WordAck, WordRequest, WordRequestType, WriteSEPublicCert, ZoomRequest, _default as default, facotry };
|
|
5222
|
+
export { AcquireInput, Address, AlephiumAddress, AlephiumBytecodeAck, AlephiumBytecodeRequest, AlephiumGetAddress, AlephiumMessageSignature, AlephiumSignMessage, AlephiumSignTx, AlephiumSignedTx, AlephiumTxAck, AlephiumTxRequest, AlgorandAddress, AlgorandGetAddress, AlgorandSignTx, AlgorandSignedTx, AmountUnit, ApplyFlags, ApplySettings, AptosAddress, AptosGetAddress, AptosMessagePayload, AptosMessageSignature, AptosSignMessage, AptosSignSIWAMessage, AptosSignTx, AptosSignedTx, AptosTransactionType, AuthorizeCoinJoin, BIP32Address, BUFFER_SIZE, BackupDevice, BackupType, BatchGetPublickeys, BenfenAddress, BenfenGetAddress, BenfenMessageSignature, BenfenSignMessage, BenfenSignTx, BenfenSignedTx, BenfenTxAck, BenfenTxRequest, BinanceAddress, BinanceCancelMsg, BinanceCoin, BinanceGetAddress, BinanceGetPublicKey, BinanceInputOutput, BinanceOrderMsg, BinanceOrderSide, BinanceOrderType, BinancePublicKey, BinanceSignTx, BinanceSignedTx, BinanceTimeInForce, BinanceTransferMsg, BinanceTxRequest, BixinBackupAck, BixinBackupDevice, BixinBackupDeviceAck, BixinBackupRequest, BixinLoadDevice, BixinMessageSE, BixinOutMessageSE, BixinPinInputOnDevice, BixinRestoreAck, BixinRestoreRequest, BixinSeedOperate, BixinVerifyDeviceAck, BixinVerifyDeviceRequest, BixinWhiteListAck, BixinWhiteListRequest, BlurRequest, ButtonAck, ButtonRequest, ButtonRequestType, COMMON_HEADER_SIZE, Cancel, CancelAuthorization, Capability, CardanoAddress, CardanoAddressParametersType, CardanoAddressType, CardanoAssetGroup, CardanoBlockchainPointerType, CardanoCVoteRegistrationDelegation, CardanoCVoteRegistrationFormat, CardanoCVoteRegistrationParametersType, CardanoCertificateType, CardanoDRep, CardanoDRepType, CardanoDerivationType, CardanoGetAddress, CardanoGetNativeScriptHash, CardanoGetPublicKey, CardanoMessageSignature, CardanoNativeScript, CardanoNativeScriptHash, CardanoNativeScriptHashDisplayFormat, CardanoNativeScriptType, CardanoPoolMetadataType, CardanoPoolOwner, CardanoPoolParametersType, CardanoPoolRelayParameters, CardanoPoolRelayType, CardanoPublicKey, CardanoSignMessage, CardanoSignTxFinished, CardanoSignTxInit, CardanoToken, CardanoTxAuxiliaryData, CardanoTxAuxiliaryDataSupplement, CardanoTxAuxiliaryDataSupplementType, CardanoTxBodyHash, CardanoTxCertificate, CardanoTxCollateralInput, CardanoTxHostAck, CardanoTxInlineDatumChunk, CardanoTxInput, CardanoTxItemAck, CardanoTxMint, CardanoTxOutput, CardanoTxOutputSerializationFormat, CardanoTxReferenceInput, CardanoTxReferenceScriptChunk, CardanoTxRequiredSigner, CardanoTxSigningMode, CardanoTxWithdrawal, CardanoTxWitnessRequest, CardanoTxWitnessResponse, CardanoTxWitnessType, ChangeOutputScriptType, ChangePin, ChangeWipeCode, CipherKeyValue, CipheredKeyValue, CommandFlags, ConfluxAddress, ConfluxGetAddress, ConfluxMessageSignature, ConfluxSignMessage, ConfluxSignMessageCIP23, ConfluxSignTx, ConfluxTxAck, ConfluxTxRequest, CosmosAddress, CosmosGetAddress, CosmosSignTx, CosmosSignedTx, DecredStakingSpendType, Deprecated_PassphraseStateAck, Deprecated_PassphraseStateRequest, DeviceBackToBoot, DeviceEraseSector, DeviceInfo, DeviceInfoSettings, DnxAddress, DnxComputedKeyImage, DnxGetAddress, DnxInputAck, DnxInputRequest, DnxRTSigsRequest, DnxSignTx, DnxSignedTx, DnxTxKey, DoPreauthorized, ECDHSessionKey, EcdsaPublicKeys, EmmcDir, EmmcDirList, EmmcDirMake, EmmcDirRemove, EmmcFile, EmmcFileDelete, EmmcFileRead, EmmcFileWrite, EmmcFixPermission, EmmcPath, EmmcPathInfo, EndSession, Entropy, EntropyAck, EntropyRequest, Enum_BackupType, Enum_ButtonRequestType, Enum_Capability, Enum_InputScriptType, Enum_OutputScriptType, Enum_PinMatrixRequestType, Enum_RequestType, Enum_SafetyCheckLevel, Enum_WordRequestType, EosActionBuyRam, EosActionBuyRamBytes, EosActionCommon, EosActionDelegate, EosActionDeleteAuth, EosActionLinkAuth, EosActionNewAccount, EosActionRefund, EosActionSellRam, EosActionTransfer, EosActionUndelegate, EosActionUnknown, EosActionUnlinkAuth, EosActionUpdateAuth, EosActionVoteProducer, EosAsset, EosAuthorization, EosAuthorizationAccount, EosAuthorizationKey, EosAuthorizationWait, EosGetPublicKey, EosPermissionLevel, EosPublicKey, EosSignTx, EosSignedTx, EosTxActionAck, EosTxActionRequest, EosTxHeader, EthereumAccessList, EthereumAccessListOneKey, EthereumAddress, EthereumAddressOneKey, EthereumAuthorizationOneKey, EthereumAuthorizationSignature, EthereumDataType, EthereumDataTypeOneKey, EthereumDefinitionType, EthereumDefinitions, EthereumFieldType, EthereumFieldTypeOneKey, EthereumGetAddress, EthereumGetAddressOneKey, EthereumGetPublicKey, EthereumGetPublicKeyOneKey, EthereumGnosisSafeTxAck, EthereumGnosisSafeTxOperation, EthereumGnosisSafeTxRequest, EthereumMessageSignature, EthereumMessageSignatureOneKey, EthereumNetworkInfo, EthereumPublicKey, EthereumPublicKeyOneKey, EthereumSignMessage, EthereumSignMessageEIP712, EthereumSignMessageOneKey, EthereumSignTx, EthereumSignTxEIP1559, EthereumSignTxEIP1559OneKey, EthereumSignTxEIP7702OneKey, EthereumSignTxOneKey, EthereumSignTypedData, EthereumSignTypedDataOneKey, EthereumSignTypedHash, EthereumSignTypedHashOneKey, EthereumStructMember, EthereumStructMemberOneKey, EthereumTokenInfo, EthereumTxAck, EthereumTxAckOneKey, EthereumTxRequest, EthereumTxRequestOneKey, EthereumTypedDataSignature, EthereumTypedDataSignatureOneKey, EthereumTypedDataStructAck, EthereumTypedDataStructAckOneKey, EthereumTypedDataStructRequest, EthereumTypedDataStructRequestOneKey, EthereumTypedDataValueAck, EthereumTypedDataValueAckOneKey, EthereumTypedDataValueRequest, EthereumTypedDataValueRequestOneKey, EthereumVerifyMessage, EthereumVerifyMessageOneKey, ExportType, Failure, FailureType, Features, FileInfo, FileInfoList, FilecoinAddress, FilecoinGetAddress, FilecoinSignTx, FilecoinSignedTx, FirmwareErase, FirmwareErase_ex, FirmwareRequest, FirmwareUpdateEmmc, FirmwareUpload, GetAddress, GetDeviceInfo, GetECDHSessionKey, GetEntropy, GetFeatures, GetNextU2FCounter, GetOwnershipId, GetOwnershipProof, GetPassphraseState, GetPublicKey, GetPublicKeyMultiple, HDNodePathType, HDNodeType, HEADER_SIZE, IdentityType, Initialize, InputScriptType, InternalInputScriptType, KaspaAddress, KaspaGetAddress, KaspaSignTx, KaspaSignedTx, KaspaTxInputAck, KaspaTxInputRequest, ListResDir, LnurlAuth, LnurlAuthResp, LockDevice, LogBlockCommand, LowLevelDevice, LowlevelTransportSharedPlugin, MESSAGE_HEADER_BYTE, MESSAGE_TOP_CHAR, MessageFromOneKey, MessageKey, MessageResponse, MessageSignature, MessageType, messages as Messages, MoneroAccountPublicAddress, MoneroAddress, MoneroExportedKeyImage, MoneroGetAddress, MoneroGetTxKeyAck, MoneroGetTxKeyRequest, MoneroGetWatchKey, MoneroKeyImageExportInitAck, MoneroKeyImageExportInitRequest, MoneroKeyImageSyncFinalAck, MoneroKeyImageSyncFinalRequest, MoneroKeyImageSyncStepAck, MoneroKeyImageSyncStepRequest, MoneroLiveRefreshFinalAck, MoneroLiveRefreshFinalRequest, MoneroLiveRefreshStartAck, MoneroLiveRefreshStartRequest, MoneroLiveRefreshStepAck, MoneroLiveRefreshStepRequest, MoneroMultisigKLRki, MoneroOutputEntry, MoneroRctKeyPublic, MoneroRingCtSig, MoneroSubAddressIndicesList, MoneroTransactionAllInputsSetAck, MoneroTransactionAllInputsSetRequest, MoneroTransactionAllOutSetAck, MoneroTransactionAllOutSetRequest, MoneroTransactionData, MoneroTransactionDestinationEntry, MoneroTransactionFinalAck, MoneroTransactionFinalRequest, MoneroTransactionInitAck, MoneroTransactionInitRequest, MoneroTransactionInputViniAck, MoneroTransactionInputViniRequest, MoneroTransactionInputsPermutationAck, MoneroTransactionInputsPermutationRequest, MoneroTransactionRsigData, MoneroTransactionSetInputAck, MoneroTransactionSetInputRequest, MoneroTransactionSetOutputAck, MoneroTransactionSetOutputRequest, MoneroTransactionSignInputAck, MoneroTransactionSignInputRequest, MoneroTransactionSourceEntry, MoneroTransferDetails, MoneroWatchKey, MultisigRedeemScriptType, NEMAddress, NEMAggregateModification, NEMCosignatoryModification, NEMDecryptMessage, NEMDecryptedMessage, NEMGetAddress, NEMImportanceTransfer, NEMImportanceTransferMode, NEMModificationType, NEMMosaic, NEMMosaicCreation, NEMMosaicDefinition, NEMMosaicLevy, NEMMosaicSupplyChange, NEMProvisionNamespace, NEMSignTx, NEMSignedTx, NEMSupplyChangeType, NEMTransactionCommon, NEMTransfer, NFTWriteData, NFTWriteInfo, NearAddress, NearGetAddress, NearSignTx, NearSignedTx, NeoAddress, NeoGetAddress, NeoSignTx, NeoSignedTx, NervosAddress, NervosGetAddress, NervosSignTx, NervosSignedTx, NervosTxAck, NervosTxRequest, NexaAddress, NexaGetAddress, NexaSignTx, NexaSignedTx, NexaTxInputAck, NexaTxInputRequest, NextU2FCounter, NostrDecryptMessage, NostrDecryptedMessage, NostrEncryptMessage, NostrEncryptedMessage, NostrGetPublicKey, NostrPublicKey, NostrSignEvent, NostrSignSchnorr, NostrSignedEvent, NostrSignedSchnorr, OneKeyDeviceCommunicationType, OneKeyDeviceInfo, OneKeyDeviceInfoBase, OneKeyDeviceInfoWithSession, OneKeyDeviceType, OneKeyMobileDeviceInfo, OneKeySEState, OneKeySeType, OnekeyFeatures, OnekeyGetFeatures, OutputScriptType, OwnershipId, OwnershipProof, PassphraseAck, PassphraseRequest, PassphraseState, Path, PinMatrixAck, PinMatrixRequest, PinMatrixRequestType, Ping, PolkadotAddress, PolkadotGetAddress, PolkadotSignTx, PolkadotSignedTx, PreauthorizedRequest, PrevInput, PrevOutput, PrevTx, PublicKey, PublicKeyMultiple, ReadSEPublicCert, ReadSEPublicKey, Reboot, RebootToBoardloader, RebootToBootloader, RebootType, RecoveryDevice, RecoveryDeviceType, RequestType, ResetDevice, ResourceAck, ResourceRequest, ResourceType, ResourceUpdate, ResourceUpload, RippleAddress, RippleGetAddress, RipplePayment, RippleSignTx, RippleSignedTx, SEMessageSignature, SEPublicCert, SEPublicKey, SESignMessage, SafetyCheckLevel, ScdoAddress, ScdoGetAddress, ScdoSignMessage, ScdoSignTx, ScdoSignedMessage, ScdoSignedTx, ScdoTxAck, SdProtect, SdProtectOperationType, SeedRequestType, SelfTest, SetU2FCounter, SignIdentity, SignMessage, SignPsbt, SignTx, SignedIdentity, SignedPsbt, SolanaAddress, SolanaGetAddress, SolanaMessageSignature, SolanaOffChainMessageFormat, SolanaOffChainMessageVersion, SolanaSignOffChainMessage, SolanaSignTx, SolanaSignUnsafeMessage, SolanaSignedTx, SpiFlashData, SpiFlashRead, SpiFlashWrite, StarcoinAddress, StarcoinGetAddress, StarcoinGetPublicKey, StarcoinMessageSignature, StarcoinPublicKey, StarcoinSignMessage, StarcoinSignTx, StarcoinSignedTx, StarcoinVerifyMessage, StellarAccountMergeOp, StellarAddress, StellarAllowTrustOp, StellarAsset, StellarAssetType, StellarBumpSequenceOp, StellarChangeTrustOp, StellarCreateAccountOp, StellarCreatePassiveSellOfferOp, StellarGetAddress, StellarManageBuyOfferOp, StellarManageDataOp, StellarManageSellOfferOp, StellarMemoType, StellarPathPaymentStrictReceiveOp, StellarPathPaymentStrictSendOp, StellarPaymentOp, StellarSetOptionsOp, StellarSignTx, StellarSignedTx, StellarSignerType, StellarTxOpRequest, Success, SuiAddress, SuiGetAddress, SuiMessageSignature, SuiSignMessage, SuiSignTx, SuiSignedTx, SuiTxAck, SuiTxRequest, TezosAddress, TezosBallotOp, TezosBallotType, TezosContractID, TezosContractType, TezosDelegationOp, TezosGetAddress, TezosGetPublicKey, TezosManagerTransfer, TezosOriginationOp, TezosParametersManager, TezosProposalOp, TezosPublicKey, TezosRevealOp, TezosSignTx, TezosSignedTx, TezosTransactionOp, TonAddress, TonGetAddress, TonSignMessage, TonSignProof, TonSignedMessage, TonSignedProof, TonTxAck, TonWalletVersion, TonWorkChain, Transport, TronAddress, TronCancelAllUnfreezeV2Contract, TronContract, TronDelegateResourceContract, TronFreezeBalanceContract, TronFreezeBalanceV2Contract, TronGetAddress, TronMessageSignature, TronMessageType, TronResourceCode, TronSignMessage, TronSignTx, TronSignedTx, TronTransferContract, TronTriggerSmartContract, TronUnDelegateResourceContract, TronUnfreezeBalanceContract, TronUnfreezeBalanceV2Contract, TronVoteWitnessContract, TronWithdrawBalanceContract, TronWithdrawExpireUnfreezeContract, TxAck, TxAckInput, TxAckInputWrapper, TxAckOutput, TxAckOutputWrapper, TxAckPrevExtraData, TxAckPrevExtraDataWrapper, TxAckPrevInput, TxAckPrevInputWrapper, TxAckPrevMeta, TxAckPrevOutput, TxAckPrevOutputWrapper, TxAckResponse, TxInput, TxInputType, TxOutput, TxOutputBinType, TxOutputType, TxRequest, TxRequestDetailsType, TxRequestSerializedType, TypedCall, UintType, UnLockDevice, UnLockDeviceResponse, UpgradeFileHeader, VerifyMessage, Vote, WL_OperationType, WipeDevice, WordAck, WordRequest, WordRequestType, WriteSEPublicCert, ZoomRequest, _default as default, facotry };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAGL,QAAQ,EACR,cAAc,EACd,cAAc,EACd,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAKlD,YAAY,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,6BAA6B,EAC7B,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAE7C,OAAO,EAGL,QAAQ,EACR,cAAc,EACd,cAAc,EACd,UAAU,EACX,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAKlD,YAAY,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,6BAA6B,EAC7B,cAAc,EACd,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AAExC,cAAc,aAAa,CAAC;;;;;;;;;;AAE5B,wBAQE"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
/// <reference types="web-bluetooth" />
|
|
3
3
|
/// <reference types="node" />
|
|
4
4
|
import type EventEmitter from 'events';
|
|
5
|
+
export type OneKeyDeviceCommunicationType = 'usb' | 'webusb' | 'ble' | 'webble' | 'electron-ble' | 'bridge' | 'emulator';
|
|
5
6
|
export type OneKeyUsbDeviceInfo = {
|
|
6
7
|
path: string;
|
|
7
8
|
};
|
|
@@ -14,7 +15,10 @@ export type OneKeyMobileDeviceInfo = {
|
|
|
14
15
|
id: string;
|
|
15
16
|
name: string | null;
|
|
16
17
|
};
|
|
17
|
-
export type
|
|
18
|
+
export type OneKeyDeviceInfoBase = {
|
|
19
|
+
type: OneKeyDeviceCommunicationType;
|
|
20
|
+
};
|
|
21
|
+
export type OneKeyDeviceInfo = OneKeyDeviceInfoBase & OneKeyDeviceInfoWithSession & OneKeyMobileDeviceInfo;
|
|
18
22
|
export type AcquireInput = {
|
|
19
23
|
path?: string;
|
|
20
24
|
previous?: string | null;
|
|
@@ -45,7 +49,7 @@ export type Transport = {
|
|
|
45
49
|
activeName?: string;
|
|
46
50
|
isOutdated: boolean;
|
|
47
51
|
};
|
|
48
|
-
export type LowLevelDevice = {
|
|
52
|
+
export type LowLevelDevice = OneKeyDeviceInfoBase & {
|
|
49
53
|
id: string;
|
|
50
54
|
name: string;
|
|
51
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../src/types/transport.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAAK,YAAY,MAAM,QAAQ,CAAC;AAEvC,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG,mBAAmB,GAAG;IAC9D,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;CAChB,CAAC;AAEF,MAA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AEb,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,UAAU,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,oBAAoB,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AACjF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,SAAS,EAAE,MAAM,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAC3C,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpD,OAAO,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,UAAU,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5C,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hd-transport",
|
|
3
|
-
"version": "1.1.20-alpha.
|
|
3
|
+
"version": "1.1.20-alpha.1",
|
|
4
4
|
"description": "Transport layer abstractions and utilities for OneKey hardware SDK.",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
|
|
@@ -28,5 +28,5 @@
|
|
|
28
28
|
"long": "^4.0.0",
|
|
29
29
|
"protobufjs": "^6.11.2"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "4a835d088a44adaeb6b1088816ece1bc1e8474e2"
|
|
32
32
|
}
|
package/src/index.ts
CHANGED
package/src/types/transport.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import type EventEmitter from 'events';
|
|
2
2
|
|
|
3
|
+
export type OneKeyDeviceCommunicationType =
|
|
4
|
+
| 'usb'
|
|
5
|
+
| 'webusb'
|
|
6
|
+
| 'ble'
|
|
7
|
+
| 'webble'
|
|
8
|
+
| 'electron-ble'
|
|
9
|
+
| 'bridge'
|
|
10
|
+
| 'emulator';
|
|
11
|
+
|
|
3
12
|
export type OneKeyUsbDeviceInfo = {
|
|
4
13
|
path: string;
|
|
5
14
|
};
|
|
@@ -15,7 +24,14 @@ export type OneKeyMobileDeviceInfo = {
|
|
|
15
24
|
name: string | null;
|
|
16
25
|
};
|
|
17
26
|
|
|
18
|
-
export type
|
|
27
|
+
export type OneKeyDeviceInfoBase = {
|
|
28
|
+
type: OneKeyDeviceCommunicationType;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// TODO: sorting type by communication type
|
|
32
|
+
export type OneKeyDeviceInfo = OneKeyDeviceInfoBase &
|
|
33
|
+
OneKeyDeviceInfoWithSession &
|
|
34
|
+
OneKeyMobileDeviceInfo;
|
|
19
35
|
|
|
20
36
|
export type AcquireInput = {
|
|
21
37
|
path?: string;
|
|
@@ -58,7 +74,7 @@ export type Transport = {
|
|
|
58
74
|
isOutdated: boolean;
|
|
59
75
|
};
|
|
60
76
|
|
|
61
|
-
export type LowLevelDevice = { id: string; name: string };
|
|
77
|
+
export type LowLevelDevice = OneKeyDeviceInfoBase & { id: string; name: string };
|
|
62
78
|
export type LowlevelTransportSharedPlugin = {
|
|
63
79
|
enumerate: () => Promise<LowLevelDevice[]>;
|
|
64
80
|
send: (uuid: string, data: string) => Promise<void>;
|