@onekeyfe/hd-transport 1.2.8-alpha.111 → 1.2.8-alpha.113
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/__tests__/protocol-v2-file-write-pipeline.test.js +417 -0
- package/__tests__/transport-log.test.js +0 -44
- package/dist/constants.d.ts +1 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/index.d.ts +42 -68
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +187 -57
- package/dist/protocols/v2/session.d.ts +4 -1
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/types/messages.d.ts +0 -47
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/transport.d.ts +5 -0
- package/dist/types/transport.d.ts.map +1 -1
- package/dist/utils/transportLog.d.ts.map +1 -1
- package/messages-protocol-v2.json +1 -138
- package/package.json +2 -2
- package/src/constants.ts +7 -0
- package/src/index.ts +1 -0
- package/src/protocols/v2/session.ts +300 -63
- package/src/types/messages.ts +0 -63
- package/src/types/transport.ts +19 -0
- package/src/utils/transportLog.ts +1 -6
package/dist/index.d.ts
CHANGED
|
@@ -353,6 +353,18 @@ type TransportWriteMetrics = {
|
|
|
353
353
|
elapsedMs: number;
|
|
354
354
|
frameBytes: number;
|
|
355
355
|
};
|
|
356
|
+
/**
|
|
357
|
+
* Supplies the remaining chunks of one file for an ordered FilesystemFileWrite pipeline.
|
|
358
|
+
* The call's request data is the first chunk; `next` returns the following chunk in offset
|
|
359
|
+
* order, or undefined to stop. The call then resolves with the last confirmation (or the
|
|
360
|
+
* device Failure), so the caller must check `processed_byte` for completeness. Callbacks
|
|
361
|
+
* should not throw: an error escapes with chunks still in flight and invalidates the link.
|
|
362
|
+
*/
|
|
363
|
+
type ProtocolV2FileWritePipeline = {
|
|
364
|
+
next: () => Promise<Record<string, unknown> | undefined>;
|
|
365
|
+
/** Called for each chunk after the device confirms it, in offset order. */
|
|
366
|
+
onResponse: (response: MessageFromOneKey) => void;
|
|
367
|
+
};
|
|
356
368
|
type TransportCallOptions = {
|
|
357
369
|
timeoutMs?: number;
|
|
358
370
|
expectedTypes?: string[];
|
|
@@ -366,6 +378,12 @@ type TransportCallOptions = {
|
|
|
366
378
|
onResponseAfterWrite?: (response: MessageFromOneKey) => void;
|
|
367
379
|
/** Prefer acknowledged BLE characteristic writes for this call when supported. */
|
|
368
380
|
writeWithResponse?: boolean;
|
|
381
|
+
/**
|
|
382
|
+
* Protocol V2 only: keep up to PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW ordered
|
|
383
|
+
* FilesystemFileWrite frames of one file in flight within this call. `timeoutMs`
|
|
384
|
+
* bounds each frame write and each response instead of the whole file.
|
|
385
|
+
*/
|
|
386
|
+
fileWritePipeline?: ProtocolV2FileWritePipeline;
|
|
369
387
|
};
|
|
370
388
|
type ITransportInitFn = (logger?: any, emitter?: EventEmitter, plugin?: LowlevelTransportSharedPlugin) => Promise<string>;
|
|
371
389
|
type Transport = {
|
|
@@ -3922,23 +3940,6 @@ type UiAnimationRequest = {
|
|
|
3922
3940
|
command: UiAnimationCommand;
|
|
3923
3941
|
type?: UiAnimationType;
|
|
3924
3942
|
};
|
|
3925
|
-
type ZcashSignPczt = {
|
|
3926
|
-
pczt_length: number;
|
|
3927
|
-
pczt_initial_chunk: string;
|
|
3928
|
-
};
|
|
3929
|
-
type ZcashPcztChunkRequest = {
|
|
3930
|
-
chunk_length: number;
|
|
3931
|
-
};
|
|
3932
|
-
type ZcashPcztChunkAck = {
|
|
3933
|
-
data_chunk: string;
|
|
3934
|
-
};
|
|
3935
|
-
type ZcashSignedPczt = {
|
|
3936
|
-
pczt_length: number;
|
|
3937
|
-
pczt_initial_chunk: string;
|
|
3938
|
-
};
|
|
3939
|
-
type ZcashSignedPcztChunkRequest = {
|
|
3940
|
-
chunk_length: number;
|
|
3941
|
-
};
|
|
3942
3943
|
type experimental_message = {};
|
|
3943
3944
|
type experimental_field = {};
|
|
3944
3945
|
type ProtocolInfoRequest = {
|
|
@@ -4458,29 +4459,6 @@ type ViewVerifyPage = {
|
|
|
4458
4459
|
chain_id?: number;
|
|
4459
4460
|
content?: ViewContentPreview;
|
|
4460
4461
|
};
|
|
4461
|
-
declare enum ZcashAddressType {
|
|
4462
|
-
UNIFIED_ORCHARD_P2PKH = 0,
|
|
4463
|
-
TRANSPARENT_P2PKH = 1,
|
|
4464
|
-
UNIFIED_ORCHARD = 2
|
|
4465
|
-
}
|
|
4466
|
-
declare enum ZcashAddressScope {
|
|
4467
|
-
EXTERNAL = 0,
|
|
4468
|
-
INTERNAL = 1
|
|
4469
|
-
}
|
|
4470
|
-
type ZcashGetAddress = {
|
|
4471
|
-
address_n: number[];
|
|
4472
|
-
show_display?: boolean;
|
|
4473
|
-
include_seed_fingerprint?: boolean;
|
|
4474
|
-
include_ufvk?: boolean;
|
|
4475
|
-
diversifier_index?: number;
|
|
4476
|
-
address_type?: ZcashAddressType;
|
|
4477
|
-
scope?: ZcashAddressScope;
|
|
4478
|
-
};
|
|
4479
|
-
type ZcashAddress = {
|
|
4480
|
-
address: string;
|
|
4481
|
-
ufvk?: string;
|
|
4482
|
-
seed_fingerprint?: string;
|
|
4483
|
-
};
|
|
4484
4462
|
declare enum ProtocolV2FailureType {
|
|
4485
4463
|
Failure_InvalidMessage = 1,
|
|
4486
4464
|
Failure_UndefinedError = 2,
|
|
@@ -5092,11 +5070,6 @@ type MessageType = {
|
|
|
5092
5070
|
UnlockPath: UnlockPath;
|
|
5093
5071
|
UnlockedPathRequest: UnlockedPathRequest;
|
|
5094
5072
|
UiAnimationRequest: UiAnimationRequest;
|
|
5095
|
-
ZcashSignPczt: ZcashSignPczt;
|
|
5096
|
-
ZcashPcztChunkRequest: ZcashPcztChunkRequest;
|
|
5097
|
-
ZcashPcztChunkAck: ZcashPcztChunkAck;
|
|
5098
|
-
ZcashSignedPczt: ZcashSignedPczt;
|
|
5099
|
-
ZcashSignedPcztChunkRequest: ZcashSignedPcztChunkRequest;
|
|
5100
5073
|
experimental_message: experimental_message;
|
|
5101
5074
|
experimental_field: experimental_field;
|
|
5102
5075
|
ProtocolInfoRequest: ProtocolInfoRequest;
|
|
@@ -5173,8 +5146,6 @@ type MessageType = {
|
|
|
5173
5146
|
ViewSignPage: ViewSignPage;
|
|
5174
5147
|
ViewWarningPage: ViewWarningPage;
|
|
5175
5148
|
ViewVerifyPage: ViewVerifyPage;
|
|
5176
|
-
ZcashGetAddress: ZcashGetAddress;
|
|
5177
|
-
ZcashAddress: ZcashAddress;
|
|
5178
5149
|
};
|
|
5179
5150
|
type MessageKey = keyof MessageType;
|
|
5180
5151
|
type MessageResponse<T extends MessageKey> = {
|
|
@@ -5923,11 +5894,6 @@ declare const messages_UiAnimationType: typeof UiAnimationType;
|
|
|
5923
5894
|
type messages_UiAnimationCommand = UiAnimationCommand;
|
|
5924
5895
|
declare const messages_UiAnimationCommand: typeof UiAnimationCommand;
|
|
5925
5896
|
type messages_UiAnimationRequest = UiAnimationRequest;
|
|
5926
|
-
type messages_ZcashSignPczt = ZcashSignPczt;
|
|
5927
|
-
type messages_ZcashPcztChunkRequest = ZcashPcztChunkRequest;
|
|
5928
|
-
type messages_ZcashPcztChunkAck = ZcashPcztChunkAck;
|
|
5929
|
-
type messages_ZcashSignedPczt = ZcashSignedPczt;
|
|
5930
|
-
type messages_ZcashSignedPcztChunkRequest = ZcashSignedPcztChunkRequest;
|
|
5931
5897
|
type messages_experimental_message = experimental_message;
|
|
5932
5898
|
type messages_experimental_field = experimental_field;
|
|
5933
5899
|
type messages_ProtocolInfoRequest = ProtocolInfoRequest;
|
|
@@ -6047,12 +6013,6 @@ declare const messages_ViewSignLayout: typeof ViewSignLayout;
|
|
|
6047
6013
|
type messages_ViewSignPage = ViewSignPage;
|
|
6048
6014
|
type messages_ViewWarningPage = ViewWarningPage;
|
|
6049
6015
|
type messages_ViewVerifyPage = ViewVerifyPage;
|
|
6050
|
-
type messages_ZcashAddressType = ZcashAddressType;
|
|
6051
|
-
declare const messages_ZcashAddressType: typeof ZcashAddressType;
|
|
6052
|
-
type messages_ZcashAddressScope = ZcashAddressScope;
|
|
6053
|
-
declare const messages_ZcashAddressScope: typeof ZcashAddressScope;
|
|
6054
|
-
type messages_ZcashGetAddress = ZcashGetAddress;
|
|
6055
|
-
type messages_ZcashAddress = ZcashAddress;
|
|
6056
6016
|
type messages_ProtocolV2FailureType = ProtocolV2FailureType;
|
|
6057
6017
|
declare const messages_ProtocolV2FailureType: typeof ProtocolV2FailureType;
|
|
6058
6018
|
type messages_Enum_ProtocolV2Capability = Enum_ProtocolV2Capability;
|
|
@@ -6732,11 +6692,6 @@ declare namespace messages {
|
|
|
6732
6692
|
messages_UiAnimationType as UiAnimationType,
|
|
6733
6693
|
messages_UiAnimationCommand as UiAnimationCommand,
|
|
6734
6694
|
messages_UiAnimationRequest as UiAnimationRequest,
|
|
6735
|
-
messages_ZcashSignPczt as ZcashSignPczt,
|
|
6736
|
-
messages_ZcashPcztChunkRequest as ZcashPcztChunkRequest,
|
|
6737
|
-
messages_ZcashPcztChunkAck as ZcashPcztChunkAck,
|
|
6738
|
-
messages_ZcashSignedPczt as ZcashSignedPczt,
|
|
6739
|
-
messages_ZcashSignedPcztChunkRequest as ZcashSignedPcztChunkRequest,
|
|
6740
6695
|
messages_experimental_message as experimental_message,
|
|
6741
6696
|
messages_experimental_field as experimental_field,
|
|
6742
6697
|
messages_ProtocolInfoRequest as ProtocolInfoRequest,
|
|
@@ -6835,10 +6790,6 @@ declare namespace messages {
|
|
|
6835
6790
|
messages_ViewSignPage as ViewSignPage,
|
|
6836
6791
|
messages_ViewWarningPage as ViewWarningPage,
|
|
6837
6792
|
messages_ViewVerifyPage as ViewVerifyPage,
|
|
6838
|
-
messages_ZcashAddressType as ZcashAddressType,
|
|
6839
|
-
messages_ZcashAddressScope as ZcashAddressScope,
|
|
6840
|
-
messages_ZcashGetAddress as ZcashGetAddress,
|
|
6841
|
-
messages_ZcashAddress as ZcashAddress,
|
|
6842
6793
|
messages_ProtocolV2FailureType as ProtocolV2FailureType,
|
|
6843
6794
|
messages_Enum_ProtocolV2Capability as Enum_ProtocolV2Capability,
|
|
6844
6795
|
messages_ProtocolV2Capability as ProtocolV2Capability,
|
|
@@ -6894,6 +6845,7 @@ type ProtocolV2CallOptions = {
|
|
|
6894
6845
|
returnAfterWrite?: boolean;
|
|
6895
6846
|
onResponseAfterWrite?: (response: MessageFromOneKey) => void;
|
|
6896
6847
|
writeWithResponse?: boolean;
|
|
6848
|
+
fileWritePipeline?: ProtocolV2FileWritePipeline;
|
|
6897
6849
|
};
|
|
6898
6850
|
|
|
6899
6851
|
declare function hexToBytes(hex: string): Uint8Array;
|
|
@@ -6918,6 +6870,22 @@ declare class ProtocolV2Session {
|
|
|
6918
6870
|
sendFlowControl(name: string, data: Record<string, unknown>): Promise<MessageFromOneKey>;
|
|
6919
6871
|
private serializeWrite;
|
|
6920
6872
|
private executeCall;
|
|
6873
|
+
/**
|
|
6874
|
+
* Validates one received frame for this session. Returns undefined for an ACK of one of
|
|
6875
|
+
* `ackSequences`, otherwise the decoded response.
|
|
6876
|
+
*/
|
|
6877
|
+
private parseResponseFrame;
|
|
6878
|
+
/**
|
|
6879
|
+
* Writes one file as ordered FilesystemFileWrite chunks while keeping up to
|
|
6880
|
+
* PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW chunks in flight. Firmware still processes and
|
|
6881
|
+
* answers every chunk in order, so responses are matched to chunks by position. Upstream
|
|
6882
|
+
* bootloaders append at their own cursor without checking the request offset, so the echoed
|
|
6883
|
+
* offset is what exposes a lost chunk. A device Failure, or `next` returning undefined, stops
|
|
6884
|
+
* sending; the remaining in-flight responses are drained so the link stays usable. The call
|
|
6885
|
+
* then returns the Failure like a serial call, or the last confirmation, which the caller
|
|
6886
|
+
* checks for completeness.
|
|
6887
|
+
*/
|
|
6888
|
+
private executeFileWritePipeline;
|
|
6921
6889
|
}
|
|
6922
6890
|
declare function probeProtocolV2({ call, timeoutMs, logger, logPrefix, onBeforeProbe, onProbeFailed, shouldRethrow, }: {
|
|
6923
6891
|
call: (name: string, data: Record<string, unknown>, options?: ProtocolV2CallOptions) => Promise<MessageFromOneKey>;
|
|
@@ -7060,6 +7028,12 @@ declare const PROTOCOL_V2_BLE_FIRMWARE_FILE_CHUNK_SIZE = 1960;
|
|
|
7060
7028
|
declare const PROTOCOL_V2_BLE_FILE_READ_CHUNK_SIZE = 900;
|
|
7061
7029
|
/** Pro2 BLE/UART RX FIFO must hold a complete Proto Link frame. */
|
|
7062
7030
|
declare const PROTOCOL_V2_BLE_FRAME_MAX_BYTES = 2048;
|
|
7031
|
+
/**
|
|
7032
|
+
* FilesystemFileWrite frames kept in flight by a file write pipeline. The main MCU copies a
|
|
7033
|
+
* complete frame out of its UART FIFO before handling it, but a frame waiting to be parsed and
|
|
7034
|
+
* the next one being received can both be resident: two full frames must fit (4096-byte FIFO).
|
|
7035
|
+
*/
|
|
7036
|
+
declare const PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW = 2;
|
|
7063
7037
|
/** @deprecated Use the transport-specific WebUSB or BLE file chunk constant. */
|
|
7064
7038
|
declare const PROTOCOL_V2_FILE_CHUNK_SIZE = 4000;
|
|
7065
7039
|
/**
|
|
@@ -7170,4 +7144,4 @@ declare const _default: {
|
|
|
7170
7144
|
withProtocolTimeout: typeof withProtocolTimeout;
|
|
7171
7145
|
};
|
|
7172
7146
|
|
|
7173
|
-
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, BabylonDeriveContextHash, BabylonDerivedContextHash, 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, Cancel, CancelAuthorization, CanonicalBitcoinNetwork, 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, CoinJoinRequest, CoinPurchaseMemo, CommandFlags, ConfluxAddress, ConfluxGetAddress, ConfluxMessageSignature, ConfluxSignMessage, ConfluxSignMessageCIP23, ConfluxSignTx, ConfluxTxAck, ConfluxTxRequest, CosmosAddress, CosmosGetAddress, CosmosSignTx, CosmosSignedTx, DecredStakingSpendType, Deprecated_PassphraseStateAck, Deprecated_PassphraseStateRequest, DeviceAnimationAction, DeviceAnimationControl, DeviceBackToBoot, DeviceCertificate, DeviceCertificateRead, DeviceCertificateSign, DeviceCertificateSignature, DeviceCertificateWrite, DeviceCoprocessorInfo, DeviceEraseSector, DeviceErrorCode, DeviceFactoryAck, DeviceFactoryInfo, DeviceFactoryInfoGet, DeviceFactoryInfoManufactureTime, DeviceFactoryInfoSet, DeviceFactoryPermanentLock, DeviceFactoryTest, DeviceFindMyTokenState, DeviceFindMyTokenStateGet, DeviceFindMyTokenUpdate, DeviceFirmwareImageInfo, DeviceFirmwareTarget, DeviceFirmwareTargetType, DeviceFirmwareUpdatePhase, DeviceFirmwareUpdatePhaseInfo, DeviceFirmwareUpdateRecord, DeviceFirmwareUpdateRecordFields, DeviceFirmwareUpdateRequest, DeviceFirmwareUpdateStage, DeviceFirmwareUpdateStatus, DeviceFirmwareUpdateStatusGet, DeviceFirmwareUpdateTaskStatus, DeviceHardwareInfo, DeviceInfo, DeviceInfoGet, DeviceInfoSettings, DeviceInfoTargets, DeviceInfoTypes, DeviceMainMcuInfo, DeviceMiscUsbMscControl, DeviceReboot, DeviceRebootType, DeviceSEInfo, DeviceSEState, DeviceSeType, DeviceSession, DeviceSessionAskPassphrase, DeviceSessionAskPin, DeviceSessionAskPin_FailureSubCodes, DeviceSessionErrorCode, DeviceSessionGet, DeviceSessionPinType, DeviceSessionSeedDomain, DeviceSettings, DeviceSettingsGet, DeviceSettingsPage, DeviceSettingsPageShow, DeviceSettingsSet, DeviceStatus, DeviceStatusGet, DeviceType, 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_CanonicalBitcoinNetwork, Enum_Capability, Enum_InputScriptType, Enum_KaspaInputScriptType, Enum_KaspaOutputScriptType, Enum_KaspaRequestType, Enum_OutputScriptType, Enum_PinMatrixRequestType, Enum_ProtocolV2Capability, 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, EthereumSignTypedDataQR, 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, FilesystemDir, FilesystemDirList, FilesystemDirMake, FilesystemDirRemove, FilesystemFile, FilesystemFileDelete, FilesystemFileRead, FilesystemFileWrite, FilesystemFormat, FilesystemPathInfo, FilesystemPathInfoQuery, FilesystemPermissionFix, FirmwareErase, FirmwareErase_ex, FirmwareHash, FirmwareRequest, FirmwareUpdateEmmc, FirmwareUpload, GetAddress, GetDeviceInfo, GetECDHSessionKey, GetEntropy, GetFeatures, GetFirmwareHash, GetNextU2FCounter, GetNonce, GetOwnershipId, GetOwnershipProof, GetPassphraseState, GetPublicKey, GetPublicKeyMultiple, HDNodePathType, HDNodeType, IdentityType, Initialize, InputScriptType, InternalInputScriptType, InternalMyAddressRequest, KaspaAddress, KaspaGetAddress, KaspaInputScriptType, KaspaOutpoint, KaspaOutputScriptType, KaspaRequestType, KaspaSignTx, KaspaSignedTx, KaspaTxAckInput, KaspaTxAckOutput, KaspaTxAckPayloadChunk, KaspaTxAckPrevInput, KaspaTxAckPrevMeta, KaspaTxAckPrevOutput, KaspaTxInputAck, KaspaTxInputRequest, KaspaTxRequest, KaspaTxRequestSignature, ListResDir, LnurlAuth, LnurlAuthResp, LockDevice, LogBlockCommand, LowLevelDevice, LowlevelTransportSharedPlugin, MessageFromOneKey, MessageKey, MessageResponse, MessageResponseMap, 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, MoneroNetworkType, 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, NftUpdate, Nonce, NostrDecryptMessage, NostrDecryptedMessage, NostrEncryptMessage, NostrEncryptedMessage, NostrGetPublicKey, NostrPublicKey, NostrSignEvent, NostrSignSchnorr, NostrSignedEvent, NostrSignedSchnorr, OnboardingPhase, OnboardingSetupKind, OnboardingSetupMethod, OnboardingSetupStatus, OnboardingStatus, OnboardingStatusGet, OnboardingStep, OneKeyDeviceCommType, OneKeyDeviceInfo, OneKeyDeviceInfoBase, OneKeyDeviceInfoWithSession, OneKeyDeviceType, OneKeyMobileDeviceInfo, OneKeySEState, OneKeySeType, OnekeyFeatures, OnekeyGetFeatures, OutputScriptType, OwnershipId, OwnershipProof, PROTOCOL_V1_CHUNK_PAYLOAD_SIZE, PROTOCOL_V1_ENVELOPE_HEADER_SIZE, PROTOCOL_V1_HEADER_BYTE, PROTOCOL_V1_MESSAGE_HEADER_SIZE, PROTOCOL_V1_REPORT_ID, PROTOCOL_V1_USB_PACKET_SIZE, PROTOCOL_V2_BLE_FILE_CHUNK_SIZE, PROTOCOL_V2_BLE_FILE_READ_CHUNK_SIZE, PROTOCOL_V2_BLE_FIRMWARE_FILE_CHUNK_SIZE, PROTOCOL_V2_BLE_FRAME_MAX_BYTES, PROTOCOL_V2_CHANNEL_BLE_UART, PROTOCOL_V2_CHANNEL_SOCKET, PROTOCOL_V2_CHANNEL_USB, PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS, PROTOCOL_V2_FILE_CHUNK_SIZE, PROTOCOL_V2_FRAME_MAX_BYTES, PROTOCOL_V2_PACKET_SRC_COMMAND, PROTOCOL_V2_SYS_MESSAGE_THRESHOLD, PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE, PassphraseAck, PassphraseRequest, PassphraseState, Path, PaymentRequestMemo, PinMatrixAck, PinMatrixRequest, PinMatrixRequestType, Ping, PolkadotAddress, PolkadotGetAddress, PolkadotSignTx, PolkadotSignedTx, PortfolioUpdate, PreauthorizedRequest, PrevInput, PrevOutput, PrevTx, ProtocolInfo, ProtocolInfoRequest, ProtocolType, ProtocolV1, ProtocolV2, ProtocolV2BleFrameWriterOptions, ProtocolV2CallContext, ProtocolV2CallOptions, ProtocolV2Capability, ProtocolV2DeviceInfo, ProtocolV2FailureType, ProtocolV2FrameAssembler, ProtocolV2LinkAdapter, ProtocolV2LinkDisabledError, ProtocolV2LinkError, ProtocolV2LinkErrorClassification, ProtocolV2LinkErrorCode, ProtocolV2LinkManager, ProtocolV2LinkManagerOptions, ProtocolV2Schemas, ProtocolV2SequenceCursor, ProtocolV2Session, ProtocolV2SessionOptions, ProtocolV2UsbTransportBase, ProtocolV2UsbTransportBaseOptions, PublicKey, PublicKeyMultiple, ReadSEPublicCert, ReadSEPublicKey, Reboot, RebootToBoardloader, RebootToBootloader, RebootType, RecoveryDevice, RecoveryDeviceType, RefundMemo, 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, SetBusy, SetU2FCounter, SignIdentity, SignMessage, SignPsbt, SignTx, SignedIdentity, SignedPsbt, SolanaAddress, SolanaGetAddress, SolanaMessageSignature, SolanaOffChainMessageFormat, SolanaOffChainMessageVersion, SolanaSignOffChainMessage, SolanaSignTx, SolanaSignUnsafeMessage, SolanaSignedTx, SolanaTxATADetails, SolanaTxExtraInfo, SpiFlashData, SpiFlashRead, SpiFlashWrite, StarcoinAddress, StarcoinGetAddress, StarcoinGetPublicKey, StarcoinMessageSignature, StarcoinPublicKey, StarcoinSignMessage, StarcoinSignTx, StarcoinSignedTx, StarcoinVerifyMessage, StellarAccountMergeOp, StellarAddress, StellarAllowTrustOp, StellarAsset, StellarAssetType, StellarBumpSequenceOp, StellarChangeTrustOp, StellarCreateAccountOp, StellarCreatePassiveSellOfferOp, StellarGetAddress, StellarInvokeHostFunctionOp, StellarManageBuyOfferOp, StellarManageDataOp, StellarManageSellOfferOp, StellarMemoType, StellarPathPaymentStrictReceiveOp, StellarPathPaymentStrictSendOp, StellarPaymentOp, StellarRequestType, StellarSetOptionsOp, StellarSignTx, StellarSignedTx, StellarSignerType, StellarSorobanDataAck, StellarSorobanDataRequest, StellarTxOpRequest, Success, SuiAddress, SuiGetAddress, SuiMessageSignature, SuiSignMessage, SuiSignTx, SuiSignedTx, SuiTxAck, SuiTxRequest, TRANSPORT_EVENT, TextMemo, TezosAddress, TezosBallotOp, TezosBallotType, TezosContractID, TezosContractType, TezosDelegationOp, TezosGetAddress, TezosGetPublicKey, TezosManagerTransfer, TezosOriginationOp, TezosParametersManager, TezosProposalOp, TezosPublicKey, TezosRevealOp, TezosSignTx, TezosSignedTx, TezosTransactionOp, TonAddress, TonGetAddress, TonSignData, TonSignDataType, TonSignMessage, TonSignProof, TonSignedData, TonSignedMessage, TonSignedProof, TonTxAck, TonWalletVersion, TonWorkChain, Transport, TransportCallOptions, TransportDeviceDisconnectEvent, TransportWriteMetrics, 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, TxAckPaymentRequest, TxAckPrevExtraData, TxAckPrevExtraDataWrapper, TxAckPrevInput, TxAckPrevInputWrapper, TxAckPrevMeta, TxAckPrevOutput, TxAckPrevOutputWrapper, TxAckResponse, TxInput, TxInputType, TxOutput, TxOutputBinType, TxOutputType, TxRequest, TxRequestDetailsType, TxRequestSerializedType, TypedCall, UiAnimationCommand, UiAnimationRequest, UiAnimationType, UintType, UnLockDevice, UnLockDeviceResponse, UnlockPath, UnlockedPathRequest, UpgradeFileHeader, VerifyMessage, ViewActionCard, ViewAmount, ViewContentEntry, ViewContentPage, ViewContentPreview, ViewCustomField, ViewDetail, ViewSignLayout, ViewSignPage, ViewTip, ViewTipType, ViewVerifyPage, ViewWarningPage, Vote, WL_OperationType, WipeDevice, WordAck, WordRequest, WordRequestType, WriteSEPrivateKey, WriteSEPublicCert, ZcashAddress, ZcashAddressScope, ZcashAddressType, ZcashGetAddress, ZcashPcztChunkAck, ZcashPcztChunkRequest, ZcashSignPczt, ZcashSignedPczt, ZcashSignedPcztChunkRequest, ZoomRequest, bytesToHex, concatUint8Arrays, createProtocolV2LinkDisabledError, createTransportCallLog, _default as default, detectProtocolV2LinkDisabledError, experimental_field, experimental_message, facotry, getErrorMessage, getSafeTransportLogPayload, hexToBytes, isProtocolV2HighThroughputCall, isProtocolV2LinkDisabledError, isProtocolV2LinkDisabledFailure, isProtocolV2LinkError, probeProtocolV2, index as protocolV1, protocolV2Codec as protocolV2, shouldSuppressHighVolumeCallLog, withProtocolTimeout, writeProtocolV2BleFrame };
|
|
7147
|
+
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, BabylonDeriveContextHash, BabylonDerivedContextHash, 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, Cancel, CancelAuthorization, CanonicalBitcoinNetwork, 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, CoinJoinRequest, CoinPurchaseMemo, CommandFlags, ConfluxAddress, ConfluxGetAddress, ConfluxMessageSignature, ConfluxSignMessage, ConfluxSignMessageCIP23, ConfluxSignTx, ConfluxTxAck, ConfluxTxRequest, CosmosAddress, CosmosGetAddress, CosmosSignTx, CosmosSignedTx, DecredStakingSpendType, Deprecated_PassphraseStateAck, Deprecated_PassphraseStateRequest, DeviceAnimationAction, DeviceAnimationControl, DeviceBackToBoot, DeviceCertificate, DeviceCertificateRead, DeviceCertificateSign, DeviceCertificateSignature, DeviceCertificateWrite, DeviceCoprocessorInfo, DeviceEraseSector, DeviceErrorCode, DeviceFactoryAck, DeviceFactoryInfo, DeviceFactoryInfoGet, DeviceFactoryInfoManufactureTime, DeviceFactoryInfoSet, DeviceFactoryPermanentLock, DeviceFactoryTest, DeviceFindMyTokenState, DeviceFindMyTokenStateGet, DeviceFindMyTokenUpdate, DeviceFirmwareImageInfo, DeviceFirmwareTarget, DeviceFirmwareTargetType, DeviceFirmwareUpdatePhase, DeviceFirmwareUpdatePhaseInfo, DeviceFirmwareUpdateRecord, DeviceFirmwareUpdateRecordFields, DeviceFirmwareUpdateRequest, DeviceFirmwareUpdateStage, DeviceFirmwareUpdateStatus, DeviceFirmwareUpdateStatusGet, DeviceFirmwareUpdateTaskStatus, DeviceHardwareInfo, DeviceInfo, DeviceInfoGet, DeviceInfoSettings, DeviceInfoTargets, DeviceInfoTypes, DeviceMainMcuInfo, DeviceMiscUsbMscControl, DeviceReboot, DeviceRebootType, DeviceSEInfo, DeviceSEState, DeviceSeType, DeviceSession, DeviceSessionAskPassphrase, DeviceSessionAskPin, DeviceSessionAskPin_FailureSubCodes, DeviceSessionErrorCode, DeviceSessionGet, DeviceSessionPinType, DeviceSessionSeedDomain, DeviceSettings, DeviceSettingsGet, DeviceSettingsPage, DeviceSettingsPageShow, DeviceSettingsSet, DeviceStatus, DeviceStatusGet, DeviceType, 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_CanonicalBitcoinNetwork, Enum_Capability, Enum_InputScriptType, Enum_KaspaInputScriptType, Enum_KaspaOutputScriptType, Enum_KaspaRequestType, Enum_OutputScriptType, Enum_PinMatrixRequestType, Enum_ProtocolV2Capability, 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, EthereumSignTypedDataQR, 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, FilesystemDir, FilesystemDirList, FilesystemDirMake, FilesystemDirRemove, FilesystemFile, FilesystemFileDelete, FilesystemFileRead, FilesystemFileWrite, FilesystemFormat, FilesystemPathInfo, FilesystemPathInfoQuery, FilesystemPermissionFix, FirmwareErase, FirmwareErase_ex, FirmwareHash, FirmwareRequest, FirmwareUpdateEmmc, FirmwareUpload, GetAddress, GetDeviceInfo, GetECDHSessionKey, GetEntropy, GetFeatures, GetFirmwareHash, GetNextU2FCounter, GetNonce, GetOwnershipId, GetOwnershipProof, GetPassphraseState, GetPublicKey, GetPublicKeyMultiple, HDNodePathType, HDNodeType, IdentityType, Initialize, InputScriptType, InternalInputScriptType, InternalMyAddressRequest, KaspaAddress, KaspaGetAddress, KaspaInputScriptType, KaspaOutpoint, KaspaOutputScriptType, KaspaRequestType, KaspaSignTx, KaspaSignedTx, KaspaTxAckInput, KaspaTxAckOutput, KaspaTxAckPayloadChunk, KaspaTxAckPrevInput, KaspaTxAckPrevMeta, KaspaTxAckPrevOutput, KaspaTxInputAck, KaspaTxInputRequest, KaspaTxRequest, KaspaTxRequestSignature, ListResDir, LnurlAuth, LnurlAuthResp, LockDevice, LogBlockCommand, LowLevelDevice, LowlevelTransportSharedPlugin, MessageFromOneKey, MessageKey, MessageResponse, MessageResponseMap, 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, MoneroNetworkType, 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, NftUpdate, Nonce, NostrDecryptMessage, NostrDecryptedMessage, NostrEncryptMessage, NostrEncryptedMessage, NostrGetPublicKey, NostrPublicKey, NostrSignEvent, NostrSignSchnorr, NostrSignedEvent, NostrSignedSchnorr, OnboardingPhase, OnboardingSetupKind, OnboardingSetupMethod, OnboardingSetupStatus, OnboardingStatus, OnboardingStatusGet, OnboardingStep, OneKeyDeviceCommType, OneKeyDeviceInfo, OneKeyDeviceInfoBase, OneKeyDeviceInfoWithSession, OneKeyDeviceType, OneKeyMobileDeviceInfo, OneKeySEState, OneKeySeType, OnekeyFeatures, OnekeyGetFeatures, OutputScriptType, OwnershipId, OwnershipProof, PROTOCOL_V1_CHUNK_PAYLOAD_SIZE, PROTOCOL_V1_ENVELOPE_HEADER_SIZE, PROTOCOL_V1_HEADER_BYTE, PROTOCOL_V1_MESSAGE_HEADER_SIZE, PROTOCOL_V1_REPORT_ID, PROTOCOL_V1_USB_PACKET_SIZE, PROTOCOL_V2_BLE_FILE_CHUNK_SIZE, PROTOCOL_V2_BLE_FILE_READ_CHUNK_SIZE, PROTOCOL_V2_BLE_FIRMWARE_FILE_CHUNK_SIZE, PROTOCOL_V2_BLE_FRAME_MAX_BYTES, PROTOCOL_V2_CHANNEL_BLE_UART, PROTOCOL_V2_CHANNEL_SOCKET, PROTOCOL_V2_CHANNEL_USB, PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS, PROTOCOL_V2_FILE_CHUNK_SIZE, PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW, PROTOCOL_V2_FRAME_MAX_BYTES, PROTOCOL_V2_PACKET_SRC_COMMAND, PROTOCOL_V2_SYS_MESSAGE_THRESHOLD, PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE, PassphraseAck, PassphraseRequest, PassphraseState, Path, PaymentRequestMemo, PinMatrixAck, PinMatrixRequest, PinMatrixRequestType, Ping, PolkadotAddress, PolkadotGetAddress, PolkadotSignTx, PolkadotSignedTx, PortfolioUpdate, PreauthorizedRequest, PrevInput, PrevOutput, PrevTx, ProtocolInfo, ProtocolInfoRequest, ProtocolType, ProtocolV1, ProtocolV2, ProtocolV2BleFrameWriterOptions, ProtocolV2CallContext, ProtocolV2CallOptions, ProtocolV2Capability, ProtocolV2DeviceInfo, ProtocolV2FailureType, ProtocolV2FileWritePipeline, ProtocolV2FrameAssembler, ProtocolV2LinkAdapter, ProtocolV2LinkDisabledError, ProtocolV2LinkError, ProtocolV2LinkErrorClassification, ProtocolV2LinkErrorCode, ProtocolV2LinkManager, ProtocolV2LinkManagerOptions, ProtocolV2Schemas, ProtocolV2SequenceCursor, ProtocolV2Session, ProtocolV2SessionOptions, ProtocolV2UsbTransportBase, ProtocolV2UsbTransportBaseOptions, PublicKey, PublicKeyMultiple, ReadSEPublicCert, ReadSEPublicKey, Reboot, RebootToBoardloader, RebootToBootloader, RebootType, RecoveryDevice, RecoveryDeviceType, RefundMemo, 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, SetBusy, SetU2FCounter, SignIdentity, SignMessage, SignPsbt, SignTx, SignedIdentity, SignedPsbt, SolanaAddress, SolanaGetAddress, SolanaMessageSignature, SolanaOffChainMessageFormat, SolanaOffChainMessageVersion, SolanaSignOffChainMessage, SolanaSignTx, SolanaSignUnsafeMessage, SolanaSignedTx, SolanaTxATADetails, SolanaTxExtraInfo, SpiFlashData, SpiFlashRead, SpiFlashWrite, StarcoinAddress, StarcoinGetAddress, StarcoinGetPublicKey, StarcoinMessageSignature, StarcoinPublicKey, StarcoinSignMessage, StarcoinSignTx, StarcoinSignedTx, StarcoinVerifyMessage, StellarAccountMergeOp, StellarAddress, StellarAllowTrustOp, StellarAsset, StellarAssetType, StellarBumpSequenceOp, StellarChangeTrustOp, StellarCreateAccountOp, StellarCreatePassiveSellOfferOp, StellarGetAddress, StellarInvokeHostFunctionOp, StellarManageBuyOfferOp, StellarManageDataOp, StellarManageSellOfferOp, StellarMemoType, StellarPathPaymentStrictReceiveOp, StellarPathPaymentStrictSendOp, StellarPaymentOp, StellarRequestType, StellarSetOptionsOp, StellarSignTx, StellarSignedTx, StellarSignerType, StellarSorobanDataAck, StellarSorobanDataRequest, StellarTxOpRequest, Success, SuiAddress, SuiGetAddress, SuiMessageSignature, SuiSignMessage, SuiSignTx, SuiSignedTx, SuiTxAck, SuiTxRequest, TRANSPORT_EVENT, TextMemo, TezosAddress, TezosBallotOp, TezosBallotType, TezosContractID, TezosContractType, TezosDelegationOp, TezosGetAddress, TezosGetPublicKey, TezosManagerTransfer, TezosOriginationOp, TezosParametersManager, TezosProposalOp, TezosPublicKey, TezosRevealOp, TezosSignTx, TezosSignedTx, TezosTransactionOp, TonAddress, TonGetAddress, TonSignData, TonSignDataType, TonSignMessage, TonSignProof, TonSignedData, TonSignedMessage, TonSignedProof, TonTxAck, TonWalletVersion, TonWorkChain, Transport, TransportCallOptions, TransportDeviceDisconnectEvent, TransportWriteMetrics, 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, TxAckPaymentRequest, TxAckPrevExtraData, TxAckPrevExtraDataWrapper, TxAckPrevInput, TxAckPrevInputWrapper, TxAckPrevMeta, TxAckPrevOutput, TxAckPrevOutputWrapper, TxAckResponse, TxInput, TxInputType, TxOutput, TxOutputBinType, TxOutputType, TxRequest, TxRequestDetailsType, TxRequestSerializedType, TypedCall, UiAnimationCommand, UiAnimationRequest, UiAnimationType, UintType, UnLockDevice, UnLockDeviceResponse, UnlockPath, UnlockedPathRequest, UpgradeFileHeader, VerifyMessage, ViewActionCard, ViewAmount, ViewContentEntry, ViewContentPage, ViewContentPreview, ViewCustomField, ViewDetail, ViewSignLayout, ViewSignPage, ViewTip, ViewTipType, ViewVerifyPage, ViewWarningPage, Vote, WL_OperationType, WipeDevice, WordAck, WordRequest, WordRequestType, WriteSEPrivateKey, WriteSEPublicCert, ZoomRequest, bytesToHex, concatUint8Arrays, createProtocolV2LinkDisabledError, createTransportCallLog, _default as default, detectProtocolV2LinkDisabledError, experimental_field, experimental_message, facotry, getErrorMessage, getSafeTransportLogPayload, hexToBytes, isProtocolV2HighThroughputCall, isProtocolV2LinkDisabledError, isProtocolV2LinkDisabledFailure, isProtocolV2LinkError, probeProtocolV2, index as protocolV1, protocolV2Codec as protocolV2, shouldSuppressHighVolumeCallLog, withProtocolTimeout, writeProtocolV2BleFrame };
|
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;AAG7C,OAAO,EAKL,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAEL,wBAAwB,EACxB,iBAAiB,EACjB,UAAU,EAEV,eAAe,EACf,UAAU,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAKlD,YAAY,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,6BAA6B,EAC7B,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,8BAA8B,GAC/B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACpD,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAErC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElD,wBAsBE"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAKL,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAEL,wBAAwB,EACxB,iBAAiB,EACjB,UAAU,EAEV,eAAe,EACf,UAAU,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAKlD,YAAY,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,2BAA2B,EAC3B,6BAA6B,EAC7B,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,8BAA8B,GAC/B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACpD,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAErC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElD,wBAsBE"}
|
package/dist/index.js
CHANGED
|
@@ -276,6 +276,7 @@ const PROTOCOL_V2_BLE_FILE_CHUNK_SIZE = 1800;
|
|
|
276
276
|
const PROTOCOL_V2_BLE_FIRMWARE_FILE_CHUNK_SIZE = 1960;
|
|
277
277
|
const PROTOCOL_V2_BLE_FILE_READ_CHUNK_SIZE = 900;
|
|
278
278
|
const PROTOCOL_V2_BLE_FRAME_MAX_BYTES = 2048;
|
|
279
|
+
const PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW = 2;
|
|
279
280
|
const PROTOCOL_V2_FILE_CHUNK_SIZE = PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE;
|
|
280
281
|
const PROTOCOL_V2_CHANNEL_USB = 0;
|
|
281
282
|
const PROTOCOL_V2_CHANNEL_BLE_UART = 1;
|
|
@@ -1107,6 +1108,23 @@ function withProtocolTimeout(promise, timeoutMs, createTimeoutError, onTimeout,
|
|
|
1107
1108
|
}
|
|
1108
1109
|
});
|
|
1109
1110
|
}
|
|
1111
|
+
function readFileWriteChunk(request) {
|
|
1112
|
+
var _a;
|
|
1113
|
+
const file = request.file;
|
|
1114
|
+
const offset = Number(file === null || file === void 0 ? void 0 : file.offset);
|
|
1115
|
+
const totalSize = Number(file === null || file === void 0 ? void 0 : file.total_size);
|
|
1116
|
+
const length = Number((_a = file === null || file === void 0 ? void 0 : file.data) === null || _a === void 0 ? void 0 : _a.byteLength);
|
|
1117
|
+
if (typeof (file === null || file === void 0 ? void 0 : file.path) !== 'string' ||
|
|
1118
|
+
!Number.isSafeInteger(offset) ||
|
|
1119
|
+
offset < 0 ||
|
|
1120
|
+
!Number.isSafeInteger(totalSize) ||
|
|
1121
|
+
!Number.isSafeInteger(length) ||
|
|
1122
|
+
length <= 0 ||
|
|
1123
|
+
offset + length > totalSize) {
|
|
1124
|
+
throw new Error('Protocol V2 file write pipeline chunk is invalid');
|
|
1125
|
+
}
|
|
1126
|
+
return { path: file.path, offset, end: offset + length, totalSize };
|
|
1127
|
+
}
|
|
1110
1128
|
class ProtocolV2Session {
|
|
1111
1129
|
constructor(options) {
|
|
1112
1130
|
var _a;
|
|
@@ -1150,6 +1168,9 @@ class ProtocolV2Session {
|
|
|
1150
1168
|
return result;
|
|
1151
1169
|
}
|
|
1152
1170
|
executeCall(name, data, callOptions) {
|
|
1171
|
+
if (callOptions.fileWritePipeline) {
|
|
1172
|
+
return this.executeFileWritePipeline(name, data, callOptions, callOptions.fileWritePipeline);
|
|
1173
|
+
}
|
|
1153
1174
|
const { schemas, router, packetSrc = PROTOCOL_V2_PACKET_SRC_COMMAND, maxFrameBytes, prepareCall, writeFrame, readFrame, logger, logPrefix = 'ProtocolV2', createTimeoutError, generation = 0, } = this.options;
|
|
1154
1175
|
const timeoutMs = callOptions.timeoutMs && callOptions.timeoutMs > 0
|
|
1155
1176
|
? callOptions.timeoutMs
|
|
@@ -1197,44 +1218,8 @@ class ProtocolV2Session {
|
|
|
1197
1218
|
const rxFrame = yield readFrame(baseCallContext);
|
|
1198
1219
|
if (abortController.signal.aborted)
|
|
1199
1220
|
break;
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
header = ProtocolV2.inspectFrameHeader(rxFrame);
|
|
1203
|
-
}
|
|
1204
|
-
catch (cause) {
|
|
1205
|
-
throw new ProtocolV2LinkError('frame', `Protocol V2 frame validation failed: ${getErrorMessage(cause)}`, cause);
|
|
1206
|
-
}
|
|
1207
|
-
if (header.router !== router) {
|
|
1208
|
-
throw new ProtocolV2LinkError('router', `Protocol V2 router mismatch: expected ${router}, got ${header.router}`);
|
|
1209
|
-
}
|
|
1210
|
-
if (header.packetSrc !== packetSrc) {
|
|
1211
|
-
throw new ProtocolV2LinkError('packet-source', `Protocol V2 packet source mismatch: expected ${packetSrc}, got ${header.packetSrc}`);
|
|
1212
|
-
}
|
|
1213
|
-
let isAck;
|
|
1214
|
-
try {
|
|
1215
|
-
isAck = ProtocolV2.isAckFrame(rxFrame);
|
|
1216
|
-
}
|
|
1217
|
-
catch (cause) {
|
|
1218
|
-
throw new ProtocolV2LinkError('frame', `Protocol V2 ACK validation failed: ${getErrorMessage(cause)}`, cause);
|
|
1219
|
-
}
|
|
1220
|
-
if (isAck) {
|
|
1221
|
-
if (header.seq !== protoSeq) {
|
|
1222
|
-
throw new ProtocolV2LinkError('ack-sequence', `Protocol V2 ACK sequence mismatch: expected ${protoSeq}, got ${header.seq}`);
|
|
1223
|
-
}
|
|
1224
|
-
}
|
|
1225
|
-
else {
|
|
1226
|
-
let decoded;
|
|
1227
|
-
try {
|
|
1228
|
-
decoded = ProtocolV2.decodeFrame(schemas, rxFrame);
|
|
1229
|
-
}
|
|
1230
|
-
catch (cause) {
|
|
1231
|
-
throw new ProtocolV2LinkError('frame', `Protocol V2 frame decode failed: ${getErrorMessage(cause)}`, cause);
|
|
1232
|
-
}
|
|
1233
|
-
if (this.lastResponseSequence === decoded.seq) {
|
|
1234
|
-
throw new ProtocolV2LinkError('response-sequence', `Protocol V2 duplicate response sequence: ${decoded.seq}`);
|
|
1235
|
-
}
|
|
1236
|
-
this.lastResponseSequence = decoded.seq;
|
|
1237
|
-
const response = call(decoded);
|
|
1221
|
+
const response = this.parseResponseFrame(rxFrame, [protoSeq]);
|
|
1222
|
+
if (response) {
|
|
1238
1223
|
const { pendingResponseAfterWrite } = this;
|
|
1239
1224
|
let belongsToWriteOnlyCall = false;
|
|
1240
1225
|
if (pendingResponseAfterWrite) {
|
|
@@ -1271,6 +1256,168 @@ class ProtocolV2Session {
|
|
|
1271
1256
|
abortController.abort();
|
|
1272
1257
|
});
|
|
1273
1258
|
}
|
|
1259
|
+
parseResponseFrame(rxFrame, ackSequences) {
|
|
1260
|
+
const { schemas, router, packetSrc = PROTOCOL_V2_PACKET_SRC_COMMAND } = this.options;
|
|
1261
|
+
let header;
|
|
1262
|
+
try {
|
|
1263
|
+
header = ProtocolV2.inspectFrameHeader(rxFrame);
|
|
1264
|
+
}
|
|
1265
|
+
catch (cause) {
|
|
1266
|
+
throw new ProtocolV2LinkError('frame', `Protocol V2 frame validation failed: ${getErrorMessage(cause)}`, cause);
|
|
1267
|
+
}
|
|
1268
|
+
if (header.router !== router) {
|
|
1269
|
+
throw new ProtocolV2LinkError('router', `Protocol V2 router mismatch: expected ${router}, got ${header.router}`);
|
|
1270
|
+
}
|
|
1271
|
+
if (header.packetSrc !== packetSrc) {
|
|
1272
|
+
throw new ProtocolV2LinkError('packet-source', `Protocol V2 packet source mismatch: expected ${packetSrc}, got ${header.packetSrc}`);
|
|
1273
|
+
}
|
|
1274
|
+
let isAck;
|
|
1275
|
+
try {
|
|
1276
|
+
isAck = ProtocolV2.isAckFrame(rxFrame);
|
|
1277
|
+
}
|
|
1278
|
+
catch (cause) {
|
|
1279
|
+
throw new ProtocolV2LinkError('frame', `Protocol V2 ACK validation failed: ${getErrorMessage(cause)}`, cause);
|
|
1280
|
+
}
|
|
1281
|
+
if (isAck) {
|
|
1282
|
+
if (!ackSequences.includes(header.seq)) {
|
|
1283
|
+
throw new ProtocolV2LinkError('ack-sequence', `Protocol V2 ACK sequence mismatch: expected ${ackSequences.join('|')}, got ${header.seq}`);
|
|
1284
|
+
}
|
|
1285
|
+
return undefined;
|
|
1286
|
+
}
|
|
1287
|
+
let decoded;
|
|
1288
|
+
try {
|
|
1289
|
+
decoded = ProtocolV2.decodeFrame(schemas, rxFrame);
|
|
1290
|
+
}
|
|
1291
|
+
catch (cause) {
|
|
1292
|
+
throw new ProtocolV2LinkError('frame', `Protocol V2 frame decode failed: ${getErrorMessage(cause)}`, cause);
|
|
1293
|
+
}
|
|
1294
|
+
if (this.lastResponseSequence === decoded.seq) {
|
|
1295
|
+
throw new ProtocolV2LinkError('response-sequence', `Protocol V2 duplicate response sequence: ${decoded.seq}`);
|
|
1296
|
+
}
|
|
1297
|
+
this.lastResponseSequence = decoded.seq;
|
|
1298
|
+
return call(decoded);
|
|
1299
|
+
}
|
|
1300
|
+
executeFileWritePipeline(name, data, callOptions, pipeline) {
|
|
1301
|
+
var _a;
|
|
1302
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1303
|
+
if (name !== 'FilesystemFileWrite') {
|
|
1304
|
+
throw new Error(`Protocol V2 file write pipeline does not support ${name}`);
|
|
1305
|
+
}
|
|
1306
|
+
if (this.pendingResponseAfterWrite) {
|
|
1307
|
+
throw new Error('Protocol V2 file write pipeline cannot start while a response is pending');
|
|
1308
|
+
}
|
|
1309
|
+
const { schemas, router, packetSrc = PROTOCOL_V2_PACKET_SRC_COMMAND, maxFrameBytes, prepareCall, writeFrame, readFrame, logger, logPrefix = 'ProtocolV2', createTimeoutError, generation = 0, } = this.options;
|
|
1310
|
+
const timeoutMs = callOptions.timeoutMs && callOptions.timeoutMs > 0
|
|
1311
|
+
? callOptions.timeoutMs
|
|
1312
|
+
: PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS;
|
|
1313
|
+
const abortController = new AbortController();
|
|
1314
|
+
const context = Object.assign(Object.assign({ messageName: name, timeoutMs, highThroughput: true }, (callOptions.writeWithResponse === undefined
|
|
1315
|
+
? {}
|
|
1316
|
+
: { writeWithResponse: callOptions.writeWithResponse })), { generation, signal: abortController.signal });
|
|
1317
|
+
const withStepTimeout = (promise, stepTimeoutMs = timeoutMs) => withProtocolTimeout(promise, stepTimeoutMs, () => createTimeoutError
|
|
1318
|
+
? createTimeoutError(name, timeoutMs)
|
|
1319
|
+
: new Error(`Protocol V2 response timeout after ${timeoutMs}ms for ${name}`), () => {
|
|
1320
|
+
abortController.abort();
|
|
1321
|
+
});
|
|
1322
|
+
let progressDeadline = 0;
|
|
1323
|
+
const markProgress = () => {
|
|
1324
|
+
progressDeadline = Date.now() + timeoutMs;
|
|
1325
|
+
};
|
|
1326
|
+
const inFlight = [];
|
|
1327
|
+
let firstRequest = data;
|
|
1328
|
+
let path;
|
|
1329
|
+
let totalSize;
|
|
1330
|
+
let nextOffset;
|
|
1331
|
+
let sourceDone = false;
|
|
1332
|
+
let failure;
|
|
1333
|
+
let lastConfirmed;
|
|
1334
|
+
const sendNextChunk = () => __awaiter(this, void 0, void 0, function* () {
|
|
1335
|
+
var _b, _c;
|
|
1336
|
+
const request = firstRequest !== null && firstRequest !== void 0 ? firstRequest : (yield pipeline.next());
|
|
1337
|
+
firstRequest = undefined;
|
|
1338
|
+
if (!request) {
|
|
1339
|
+
sourceDone = true;
|
|
1340
|
+
return;
|
|
1341
|
+
}
|
|
1342
|
+
const chunk = readFileWriteChunk(request);
|
|
1343
|
+
if ((path !== undefined && chunk.path !== path) ||
|
|
1344
|
+
(totalSize !== undefined && chunk.totalSize !== totalSize) ||
|
|
1345
|
+
(nextOffset !== undefined && chunk.offset !== nextOffset)) {
|
|
1346
|
+
throw new Error(`Protocol V2 file write pipeline chunk out of order: expected offset ${String(nextOffset)}, got ${chunk.offset}`);
|
|
1347
|
+
}
|
|
1348
|
+
path = chunk.path;
|
|
1349
|
+
totalSize = chunk.totalSize;
|
|
1350
|
+
nextOffset = chunk.end;
|
|
1351
|
+
const seq = this.sequenceCursor.next();
|
|
1352
|
+
const frame = ProtocolV2.encodeFrame(schemas, name, request, {
|
|
1353
|
+
packetSrc,
|
|
1354
|
+
router,
|
|
1355
|
+
seq,
|
|
1356
|
+
});
|
|
1357
|
+
if (maxFrameBytes !== undefined && frame.length > maxFrameBytes) {
|
|
1358
|
+
throw new Error(`Protocol V2 frame too large for transport: ${frame.length} > ${maxFrameBytes}`);
|
|
1359
|
+
}
|
|
1360
|
+
const writeStartedAt = Date.now();
|
|
1361
|
+
yield withStepTimeout(this.serializeWrite(() => writeFrame(frame, context)));
|
|
1362
|
+
inFlight.push({ seq, path: chunk.path, offset: chunk.offset, end: chunk.end });
|
|
1363
|
+
markProgress();
|
|
1364
|
+
try {
|
|
1365
|
+
(_b = callOptions.onWriteCompleted) === null || _b === void 0 ? void 0 : _b.call(callOptions, {
|
|
1366
|
+
elapsedMs: Math.max(Date.now() - writeStartedAt, 0),
|
|
1367
|
+
frameBytes: frame.byteLength,
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1370
|
+
catch (error) {
|
|
1371
|
+
(_c = logger === null || logger === void 0 ? void 0 : logger.error) === null || _c === void 0 ? void 0 : _c.call(logger, `${logPrefix} write metrics callback failed: ${String(error)}`);
|
|
1372
|
+
}
|
|
1373
|
+
});
|
|
1374
|
+
yield withStepTimeout(Promise.resolve().then(() => prepareCall === null || prepareCall === void 0 ? void 0 : prepareCall(context)));
|
|
1375
|
+
while (!sourceDone && inFlight.length < PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW) {
|
|
1376
|
+
yield sendNextChunk();
|
|
1377
|
+
}
|
|
1378
|
+
while (inFlight.length > 0) {
|
|
1379
|
+
const rxFrame = yield withStepTimeout(readFrame(context), Math.max(progressDeadline - Date.now(), 1));
|
|
1380
|
+
const response = this.parseResponseFrame(rxFrame, inFlight.map(item => item.seq));
|
|
1381
|
+
if (!response) ;
|
|
1382
|
+
else if (response.type === 'FilesystemFile') {
|
|
1383
|
+
const [expected] = inFlight;
|
|
1384
|
+
const { message } = response;
|
|
1385
|
+
if (Number(message.processed_byte) !== expected.end ||
|
|
1386
|
+
message.path !== expected.path ||
|
|
1387
|
+
Number(message.offset) !== expected.offset ||
|
|
1388
|
+
Number(message.total_size) !== totalSize) {
|
|
1389
|
+
throw new ProtocolV2LinkError('frame', `Protocol V2 file write response does not match chunk ${expected.offset}-${expected.end}: got offset ${String(message.offset)} processed_byte ${String(message.processed_byte)}`);
|
|
1390
|
+
}
|
|
1391
|
+
inFlight.shift();
|
|
1392
|
+
markProgress();
|
|
1393
|
+
if (!failure) {
|
|
1394
|
+
lastConfirmed = response;
|
|
1395
|
+
pipeline.onResponse(response);
|
|
1396
|
+
if (!sourceDone) {
|
|
1397
|
+
yield sendNextChunk();
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
}
|
|
1401
|
+
else if (response.type === 'Failure') {
|
|
1402
|
+
inFlight.shift();
|
|
1403
|
+
markProgress();
|
|
1404
|
+
failure = failure !== null && failure !== void 0 ? failure : response;
|
|
1405
|
+
sourceDone = true;
|
|
1406
|
+
}
|
|
1407
|
+
else if (COMMON_TERMINAL_RESPONSE_TYPES.has(response.type)) {
|
|
1408
|
+
throw new ProtocolV2LinkError('frame', `Protocol V2 file write pipeline received unexpected ${response.type}`);
|
|
1409
|
+
}
|
|
1410
|
+
else {
|
|
1411
|
+
(_a = logger === null || logger === void 0 ? void 0 : logger.debug) === null || _a === void 0 ? void 0 : _a.call(logger, `[${logPrefix}] skip unexpected response for ${name}: expected=FilesystemFile got=${response.type}`);
|
|
1412
|
+
}
|
|
1413
|
+
}
|
|
1414
|
+
const terminal = failure !== null && failure !== void 0 ? failure : lastConfirmed;
|
|
1415
|
+
if (!terminal) {
|
|
1416
|
+
throw new ProtocolV2LinkError('frame', 'Protocol V2 file write pipeline ended unconfirmed');
|
|
1417
|
+
}
|
|
1418
|
+
return terminal;
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1274
1421
|
}
|
|
1275
1422
|
function probeProtocolV2({ call, timeoutMs, logger, logPrefix = 'ProtocolV2', onBeforeProbe, onProbeFailed, shouldRethrow, }) {
|
|
1276
1423
|
var _a, _b, _c;
|
|
@@ -2304,17 +2451,6 @@ exports.ViewSignLayout = void 0;
|
|
|
2304
2451
|
ViewSignLayout[ViewSignLayout["LayoutFlat"] = 4] = "LayoutFlat";
|
|
2305
2452
|
ViewSignLayout[ViewSignLayout["LayoutEthApprove"] = 5] = "LayoutEthApprove";
|
|
2306
2453
|
})(exports.ViewSignLayout || (exports.ViewSignLayout = {}));
|
|
2307
|
-
exports.ZcashAddressType = void 0;
|
|
2308
|
-
(function (ZcashAddressType) {
|
|
2309
|
-
ZcashAddressType[ZcashAddressType["UNIFIED_ORCHARD_P2PKH"] = 0] = "UNIFIED_ORCHARD_P2PKH";
|
|
2310
|
-
ZcashAddressType[ZcashAddressType["TRANSPARENT_P2PKH"] = 1] = "TRANSPARENT_P2PKH";
|
|
2311
|
-
ZcashAddressType[ZcashAddressType["UNIFIED_ORCHARD"] = 2] = "UNIFIED_ORCHARD";
|
|
2312
|
-
})(exports.ZcashAddressType || (exports.ZcashAddressType = {}));
|
|
2313
|
-
exports.ZcashAddressScope = void 0;
|
|
2314
|
-
(function (ZcashAddressScope) {
|
|
2315
|
-
ZcashAddressScope[ZcashAddressScope["EXTERNAL"] = 0] = "EXTERNAL";
|
|
2316
|
-
ZcashAddressScope[ZcashAddressScope["INTERNAL"] = 1] = "INTERNAL";
|
|
2317
|
-
})(exports.ZcashAddressScope || (exports.ZcashAddressScope = {}));
|
|
2318
2454
|
exports.ProtocolV2FailureType = void 0;
|
|
2319
2455
|
(function (ProtocolV2FailureType) {
|
|
2320
2456
|
ProtocolV2FailureType[ProtocolV2FailureType["Failure_InvalidMessage"] = 1] = "Failure_InvalidMessage";
|
|
@@ -2436,8 +2572,6 @@ var messages = /*#__PURE__*/Object.freeze({
|
|
|
2436
2572
|
get OnboardingSetupMethod () { return exports.OnboardingSetupMethod; },
|
|
2437
2573
|
get ViewTipType () { return exports.ViewTipType; },
|
|
2438
2574
|
get ViewSignLayout () { return exports.ViewSignLayout; },
|
|
2439
|
-
get ZcashAddressType () { return exports.ZcashAddressType; },
|
|
2440
|
-
get ZcashAddressScope () { return exports.ZcashAddressScope; },
|
|
2441
2575
|
get ProtocolV2FailureType () { return exports.ProtocolV2FailureType; },
|
|
2442
2576
|
get Enum_ProtocolV2Capability () { return exports.Enum_ProtocolV2Capability; }
|
|
2443
2577
|
});
|
|
@@ -2448,7 +2582,6 @@ const SENSITIVE_LOG_KEYS = new Set([
|
|
|
2448
2582
|
'address',
|
|
2449
2583
|
'apikey',
|
|
2450
2584
|
'connectid',
|
|
2451
|
-
'datachunk',
|
|
2452
2585
|
'devicestate',
|
|
2453
2586
|
'deviceid',
|
|
2454
2587
|
'entropy',
|
|
@@ -2457,20 +2590,16 @@ const SENSITIVE_LOG_KEYS = new Set([
|
|
|
2457
2590
|
'passphrase',
|
|
2458
2591
|
'passphrasestate',
|
|
2459
2592
|
'password',
|
|
2460
|
-
'pczt',
|
|
2461
2593
|
'pin',
|
|
2462
2594
|
'privatekey',
|
|
2463
2595
|
'publickey',
|
|
2464
2596
|
'seed',
|
|
2465
2597
|
'secret',
|
|
2466
|
-
'seedfingerprint',
|
|
2467
2598
|
'serialnumber',
|
|
2468
2599
|
'session',
|
|
2469
2600
|
'sessionid',
|
|
2470
2601
|
'signature',
|
|
2471
|
-
'signedpczt',
|
|
2472
2602
|
'token',
|
|
2473
|
-
'ufvk',
|
|
2474
2603
|
'uuid',
|
|
2475
2604
|
'walletsessionid',
|
|
2476
2605
|
'xprv',
|
|
@@ -2485,7 +2614,7 @@ const isSensitiveLogKey = (key) => {
|
|
|
2485
2614
|
normalizedKey.endsWith('publickey') ||
|
|
2486
2615
|
normalizedKey.endsWith('signature'));
|
|
2487
2616
|
};
|
|
2488
|
-
const isSigningMessage = (messageName) => Boolean(messageName && /(?:sign|txack|transaction
|
|
2617
|
+
const isSigningMessage = (messageName) => Boolean(messageName && /(?:sign|txack|transaction)/i.test(messageName));
|
|
2489
2618
|
const redactLogValue = (value, seen) => {
|
|
2490
2619
|
if (ArrayBuffer.isView(value)) {
|
|
2491
2620
|
return `[BINARY:${value.byteLength}]`;
|
|
@@ -2573,6 +2702,7 @@ exports.PROTOCOL_V2_CHANNEL_SOCKET = PROTOCOL_V2_CHANNEL_SOCKET;
|
|
|
2573
2702
|
exports.PROTOCOL_V2_CHANNEL_USB = PROTOCOL_V2_CHANNEL_USB;
|
|
2574
2703
|
exports.PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS = PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS;
|
|
2575
2704
|
exports.PROTOCOL_V2_FILE_CHUNK_SIZE = PROTOCOL_V2_FILE_CHUNK_SIZE;
|
|
2705
|
+
exports.PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW = PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW;
|
|
2576
2706
|
exports.PROTOCOL_V2_FRAME_MAX_BYTES = PROTOCOL_V2_FRAME_MAX_BYTES;
|
|
2577
2707
|
exports.PROTOCOL_V2_PACKET_SRC_COMMAND = PROTOCOL_V2_PACKET_SRC_COMMAND;
|
|
2578
2708
|
exports.PROTOCOL_V2_SYS_MESSAGE_THRESHOLD = PROTOCOL_V2_SYS_MESSAGE_THRESHOLD;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProtocolV2FrameAssembler, concatUint8Arrays } from './frame-assembler';
|
|
2
2
|
import { ProtocolV2SequenceCursor } from './sequence-cursor';
|
|
3
3
|
import type { Root } from 'protobufjs/light';
|
|
4
|
-
import type { MessageFromOneKey, TransportWriteMetrics } from '../../types';
|
|
4
|
+
import type { MessageFromOneKey, ProtocolV2FileWritePipeline, TransportWriteMetrics } from '../../types';
|
|
5
5
|
export * from './errors';
|
|
6
6
|
export type ProtocolV2Schemas = {
|
|
7
7
|
protocolV1: Root;
|
|
@@ -42,6 +42,7 @@ export type ProtocolV2CallOptions = {
|
|
|
42
42
|
returnAfterWrite?: boolean;
|
|
43
43
|
onResponseAfterWrite?: (response: MessageFromOneKey) => void;
|
|
44
44
|
writeWithResponse?: boolean;
|
|
45
|
+
fileWritePipeline?: ProtocolV2FileWritePipeline;
|
|
45
46
|
};
|
|
46
47
|
export { concatUint8Arrays, ProtocolV2FrameAssembler };
|
|
47
48
|
export { ProtocolV2SequenceCursor };
|
|
@@ -67,6 +68,8 @@ export declare class ProtocolV2Session {
|
|
|
67
68
|
sendFlowControl(name: string, data: Record<string, unknown>): Promise<MessageFromOneKey>;
|
|
68
69
|
private serializeWrite;
|
|
69
70
|
private executeCall;
|
|
71
|
+
private parseResponseFrame;
|
|
72
|
+
private executeFileWritePipeline;
|
|
70
73
|
}
|
|
71
74
|
export declare function probeProtocolV2({ call, timeoutMs, logger, logPrefix, onBeforeProbe, onProbeFailed, shouldRethrow, }: {
|
|
72
75
|
call: (name: string, data: Record<string, unknown>, options?: ProtocolV2CallOptions) => Promise<MessageFromOneKey>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/protocols/v2/session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/protocols/v2/session.ts"],"names":[],"mappings":"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"}
|