@onekeyfe/hd-transport 1.2.8-alpha.120 → 1.2.8-alpha.121

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.
@@ -10,7 +10,6 @@ export declare const PROTOCOL_V2_BLE_FILE_CHUNK_SIZE = 1800;
10
10
  export declare const PROTOCOL_V2_BLE_FIRMWARE_FILE_CHUNK_SIZE = 1960;
11
11
  export declare const PROTOCOL_V2_BLE_FILE_READ_CHUNK_SIZE = 900;
12
12
  export declare const PROTOCOL_V2_BLE_FRAME_MAX_BYTES = 2048;
13
- export declare const PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW = 2;
14
13
  export declare const PROTOCOL_V2_FILE_CHUNK_SIZE = 4000;
15
14
  export declare const PROTOCOL_V2_CHANNEL_USB = 0;
16
15
  export declare const PROTOCOL_V2_CHANNEL_BLE_UART = 1;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,KAAO,CAAC;AAG1C,eAAO,MAAM,uBAAuB,KAAO,CAAC;AAG5C,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAGjD,eAAO,MAAM,2BAA2B,QAAqC,CAAC;AAG9E,eAAO,MAAM,+BAA+B,QAAQ,CAAC;AAGrD,eAAO,MAAM,gCAAgC,QAA0C,CAAC;AAKxF,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAGhD,eAAO,MAAM,kCAAkC,OAAO,CAAC;AAGvD,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAOpD,eAAO,MAAM,wCAAwC,OAAO,CAAC;AAG7D,eAAO,MAAM,oCAAoC,MAAM,CAAC;AAGxD,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAQpD,eAAO,MAAM,sCAAsC,IAAI,CAAC;AAGxD,eAAO,MAAM,2BAA2B,OAAqC,CAAC;AAM9E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAG5C,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAQhD,eAAO,MAAM,uCAAuC,QAAgB,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,qBAAqB,KAAO,CAAC;AAG1C,eAAO,MAAM,uBAAuB,KAAO,CAAC;AAG5C,eAAO,MAAM,8BAA8B,KAAK,CAAC;AAGjD,eAAO,MAAM,2BAA2B,QAAqC,CAAC;AAG9E,eAAO,MAAM,+BAA+B,QAAQ,CAAC;AAGrD,eAAO,MAAM,gCAAgC,QAA0C,CAAC;AAKxF,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAGhD,eAAO,MAAM,kCAAkC,OAAO,CAAC;AAGvD,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAMpD,eAAO,MAAM,wCAAwC,OAAO,CAAC;AAG7D,eAAO,MAAM,oCAAoC,MAAM,CAAC;AAGxD,eAAO,MAAM,+BAA+B,OAAO,CAAC;AAGpD,eAAO,MAAM,2BAA2B,OAAqC,CAAC;AAM9E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAG5C,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAQhD,eAAO,MAAM,uCAAuC,QAAgB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -359,18 +359,6 @@ type TransportWriteMetrics = {
359
359
  elapsedMs: number;
360
360
  frameBytes: number;
361
361
  };
362
- /**
363
- * Supplies the remaining chunks of one file for an ordered FilesystemFileWrite pipeline.
364
- * The call's request data is the first chunk; `next` returns the following chunk in offset
365
- * order, or undefined to stop. The call then resolves with the last confirmation (or the
366
- * device Failure), so the caller must check `processed_byte` for completeness. Callbacks
367
- * should not throw: an error escapes with chunks still in flight and invalidates the link.
368
- */
369
- type ProtocolV2FileWritePipeline = {
370
- next: () => Promise<Record<string, unknown> | undefined>;
371
- /** Called for each chunk after the device confirms it, in offset order. */
372
- onResponse: (response: MessageFromOneKey) => void;
373
- };
374
362
  type TransportCallOptions = {
375
363
  timeoutMs?: number;
376
364
  expectedTypes?: string[];
@@ -384,12 +372,6 @@ type TransportCallOptions = {
384
372
  onResponseAfterWrite?: (response: MessageFromOneKey) => void;
385
373
  /** Prefer acknowledged BLE characteristic writes for this call when supported. */
386
374
  writeWithResponse?: boolean;
387
- /**
388
- * Protocol V2 only: keep up to PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW ordered
389
- * FilesystemFileWrite frames of one file in flight within this call. `timeoutMs`
390
- * bounds each frame write and each response instead of the whole file.
391
- */
392
- fileWritePipeline?: ProtocolV2FileWritePipeline;
393
375
  };
394
376
  type ITransportInitFn = (logger?: any, emitter?: EventEmitter, plugin?: LowlevelTransportSharedPlugin) => Promise<string>;
395
377
  type Transport = {
@@ -6851,7 +6833,6 @@ type ProtocolV2CallOptions = {
6851
6833
  returnAfterWrite?: boolean;
6852
6834
  onResponseAfterWrite?: (response: MessageFromOneKey) => void;
6853
6835
  writeWithResponse?: boolean;
6854
- fileWritePipeline?: ProtocolV2FileWritePipeline;
6855
6836
  };
6856
6837
 
6857
6838
  declare function hexToBytes(hex: string): Uint8Array;
@@ -6875,24 +6856,7 @@ declare class ProtocolV2Session {
6875
6856
  call(name: string, data: Record<string, unknown>, callOptions?: ProtocolV2CallOptions): Promise<MessageFromOneKey>;
6876
6857
  sendFlowControl(name: string, data: Record<string, unknown>): Promise<MessageFromOneKey>;
6877
6858
  private serializeWrite;
6878
- private reportWriteCompleted;
6879
- private createCallTimeoutError;
6880
6859
  private executeCall;
6881
- private encodeRequestFrame;
6882
- /**
6883
- * Validates one received frame for this session. Returns undefined for an ACK of one of
6884
- * `ackSequences`, otherwise the decoded response.
6885
- */
6886
- private parseResponseFrame;
6887
- /**
6888
- * Writes one file as ordered FilesystemFileWrite chunks while keeping up to
6889
- * PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW chunks in flight. Firmware still processes and
6890
- * answers every chunk in order, so responses are matched to chunks by position. Upstream
6891
- * bootloaders append at their own cursor without checking the request offset, so the echoed
6892
- * offset is what exposes a lost chunk. A device Failure, or `next` returning undefined, stops
6893
- * sending; the remaining in-flight responses are drained so the link stays usable.
6894
- */
6895
- private executeFileWritePipeline;
6896
6860
  }
6897
6861
  declare function probeProtocolV2({ call, timeoutMs, logger, logPrefix, onBeforeProbe, onProbeFailed, shouldRethrow, }: {
6898
6862
  call: (name: string, data: Record<string, unknown>, options?: ProtocolV2CallOptions) => Promise<MessageFromOneKey>;
@@ -7027,22 +6991,14 @@ declare const PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE = 4000;
7027
6991
  /** Generic FilesystemFileWrite chunk size over BLE, including support for long filesystem paths. */
7028
6992
  declare const PROTOCOL_V2_BLE_FILE_CHUNK_SIZE = 1800;
7029
6993
  /**
7030
- * FirmwareUpdateV4 chunk size for its fixed BLE staging paths when writes are serial.
6994
+ * FirmwareUpdateV4 chunk size for its fixed BLE staging paths.
7031
6995
  * The longest current path still leaves 28 bytes below the 2048-byte BLE frame limit.
7032
- * Pipelined writes use PROTOCOL_V2_BLE_FILE_CHUNK_SIZE so two frames fit the UART FIFO.
7033
6996
  */
7034
6997
  declare const PROTOCOL_V2_BLE_FIRMWARE_FILE_CHUNK_SIZE = 1960;
7035
6998
  /** BLE FilesystemFileRead chunk size, limited by the Pro2 1024-byte UART TX buffer. */
7036
6999
  declare const PROTOCOL_V2_BLE_FILE_READ_CHUNK_SIZE = 900;
7037
7000
  /** Pro2 BLE/UART RX FIFO must hold a complete Proto Link frame. */
7038
7001
  declare const PROTOCOL_V2_BLE_FRAME_MAX_BYTES = 2048;
7039
- /**
7040
- * FilesystemFileWrite frames kept in flight by a file write pipeline. The main MCU copies a
7041
- * complete frame out of its UART FIFO before handling it, but a frame waiting to be parsed and
7042
- * the next one being received can both be resident: two full frames must fit (4096-byte FIFO).
7043
- * With 1800-byte chunks two frames take about 3.75 KB.
7044
- */
7045
- declare const PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW = 2;
7046
7002
  /** @deprecated Use the transport-specific WebUSB or BLE file chunk constant. */
7047
7003
  declare const PROTOCOL_V2_FILE_CHUNK_SIZE = 4000;
7048
7004
  /**
@@ -7153,4 +7109,4 @@ declare const _default: {
7153
7109
  withProtocolTimeout: typeof withProtocolTimeout;
7154
7110
  };
7155
7111
 
7156
- 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 };
7112
+ 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, 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 };
@@ -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;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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"}
package/dist/index.js CHANGED
@@ -276,7 +276,6 @@ 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;
280
279
  const PROTOCOL_V2_FILE_CHUNK_SIZE = PROTOCOL_V2_WEBUSB_FILE_CHUNK_SIZE;
281
280
  const PROTOCOL_V2_CHANNEL_USB = 0;
282
281
  const PROTOCOL_V2_CHANNEL_BLE_UART = 1;
@@ -1108,24 +1107,6 @@ function withProtocolTimeout(promise, timeoutMs, createTimeoutError, onTimeout,
1108
1107
  }
1109
1108
  });
1110
1109
  }
1111
- const resolveProtocolV2CallTimeoutMs = (timeoutMs) => timeoutMs && timeoutMs > 0 ? timeoutMs : PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS;
1112
- function parseFileWriteChunk(request) {
1113
- var _a;
1114
- const file = request.file;
1115
- const offset = Number(file === null || file === void 0 ? void 0 : file.offset);
1116
- const totalSize = Number(file === null || file === void 0 ? void 0 : file.total_size);
1117
- const length = Number((_a = file === null || file === void 0 ? void 0 : file.data) === null || _a === void 0 ? void 0 : _a.byteLength);
1118
- if (typeof (file === null || file === void 0 ? void 0 : file.path) !== 'string' ||
1119
- !Number.isSafeInteger(offset) ||
1120
- offset < 0 ||
1121
- !Number.isSafeInteger(totalSize) ||
1122
- !Number.isSafeInteger(length) ||
1123
- length <= 0 ||
1124
- offset + length > totalSize) {
1125
- throw new Error('Protocol V2 file write pipeline chunk is invalid');
1126
- }
1127
- return { path: file.path, offset, end: offset + length, totalSize };
1128
- }
1129
1110
  class ProtocolV2Session {
1130
1111
  constructor(options) {
1131
1112
  var _a;
@@ -1168,47 +1149,43 @@ class ProtocolV2Session {
1168
1149
  this.pendingWrite = result.catch(() => undefined);
1169
1150
  return result;
1170
1151
  }
1171
- reportWriteCompleted(callOptions, writeStartedAt, frameBytes) {
1172
- var _a, _b;
1173
- try {
1174
- (_a = callOptions.onWriteCompleted) === null || _a === void 0 ? void 0 : _a.call(callOptions, {
1175
- elapsedMs: Math.max(Date.now() - writeStartedAt, 0),
1176
- frameBytes,
1177
- });
1178
- }
1179
- catch (error) {
1180
- const { logger, logPrefix = 'ProtocolV2' } = this.options;
1181
- (_b = logger === null || logger === void 0 ? void 0 : logger.error) === null || _b === void 0 ? void 0 : _b.call(logger, `${logPrefix} write metrics callback failed: ${String(error)}`);
1182
- }
1183
- }
1184
- createCallTimeoutError(name, timeoutMs) {
1185
- const { createTimeoutError } = this.options;
1186
- return createTimeoutError
1187
- ? createTimeoutError(name, timeoutMs)
1188
- : new Error(`Protocol V2 response timeout after ${timeoutMs}ms for ${name}`);
1189
- }
1190
1152
  executeCall(name, data, callOptions) {
1191
- if (callOptions.fileWritePipeline) {
1192
- return this.executeFileWritePipeline(name, data, callOptions, callOptions.fileWritePipeline);
1193
- }
1194
- const { prepareCall, writeFrame, readFrame, logger, logPrefix = 'ProtocolV2', generation = 0, } = this.options;
1195
- const timeoutMs = resolveProtocolV2CallTimeoutMs(callOptions.timeoutMs);
1153
+ const { schemas, router, packetSrc = PROTOCOL_V2_PACKET_SRC_COMMAND, maxFrameBytes, prepareCall, writeFrame, readFrame, logger, logPrefix = 'ProtocolV2', createTimeoutError, generation = 0, } = this.options;
1154
+ const timeoutMs = callOptions.timeoutMs && callOptions.timeoutMs > 0
1155
+ ? callOptions.timeoutMs
1156
+ : PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS;
1196
1157
  const abortController = new AbortController();
1197
1158
  const shouldReduceDebug = shouldReduceProtocolV2Debug(name);
1198
1159
  const baseCallContext = Object.assign(Object.assign({ messageName: name, timeoutMs, highThroughput: isProtocolV2HighThroughputCall(name) }, (callOptions.writeWithResponse === undefined
1199
1160
  ? {}
1200
1161
  : { writeWithResponse: callOptions.writeWithResponse })), { generation, signal: abortController.signal });
1201
1162
  const runCall = () => __awaiter(this, void 0, void 0, function* () {
1202
- var _a, _b, _c, _d, _e, _f, _g;
1163
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
1203
1164
  if (!this.pendingResponseAfterWrite) {
1204
1165
  yield (prepareCall === null || prepareCall === void 0 ? void 0 : prepareCall(baseCallContext));
1205
1166
  }
1206
- const { seq: protoSeq, frame } = this.encodeRequestFrame(name, data);
1167
+ const protoSeq = this.sequenceCursor.next();
1168
+ const frame = ProtocolV2.encodeFrame(schemas, name, data, {
1169
+ packetSrc,
1170
+ router,
1171
+ seq: protoSeq,
1172
+ });
1173
+ if (maxFrameBytes !== undefined && frame.length > maxFrameBytes) {
1174
+ throw new Error(`Protocol V2 frame too large for transport: ${frame.length} > ${maxFrameBytes}`);
1175
+ }
1207
1176
  const writeStartedAt = Date.now();
1208
1177
  yield this.serializeWrite(() => writeFrame(frame, baseCallContext));
1209
- this.reportWriteCompleted(callOptions, writeStartedAt, frame.byteLength);
1178
+ try {
1179
+ (_a = callOptions.onWriteCompleted) === null || _a === void 0 ? void 0 : _a.call(callOptions, {
1180
+ elapsedMs: Math.max(Date.now() - writeStartedAt, 0),
1181
+ frameBytes: frame.byteLength,
1182
+ });
1183
+ }
1184
+ catch (error) {
1185
+ (_b = logger === null || logger === void 0 ? void 0 : logger.error) === null || _b === void 0 ? void 0 : _b.call(logger, `${logPrefix} write metrics callback failed: ${String(error)}`);
1186
+ }
1210
1187
  if (callOptions.returnAfterWrite) {
1211
- if ((_a = callOptions.expectedTypes) === null || _a === void 0 ? void 0 : _a.length) {
1188
+ if ((_c = callOptions.expectedTypes) === null || _c === void 0 ? void 0 : _c.length) {
1212
1189
  this.pendingResponseAfterWrite = {
1213
1190
  expectedTypes: new Set(callOptions.expectedTypes),
1214
1191
  onResponse: callOptions.onResponseAfterWrite,
@@ -1220,8 +1197,44 @@ class ProtocolV2Session {
1220
1197
  const rxFrame = yield readFrame(baseCallContext);
1221
1198
  if (abortController.signal.aborted)
1222
1199
  break;
1223
- const response = this.parseResponseFrame(rxFrame, [protoSeq]);
1224
- if (response) {
1200
+ let header;
1201
+ try {
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);
1225
1238
  const { pendingResponseAfterWrite } = this;
1226
1239
  let belongsToWriteOnlyCall = false;
1227
1240
  if (pendingResponseAfterWrite) {
@@ -1230,194 +1243,34 @@ class ProtocolV2Session {
1230
1243
  this.pendingResponseAfterWrite = undefined;
1231
1244
  if (belongsToWriteOnlyCall) {
1232
1245
  try {
1233
- (_b = pendingResponseAfterWrite.onResponse) === null || _b === void 0 ? void 0 : _b.call(pendingResponseAfterWrite, response);
1246
+ (_d = pendingResponseAfterWrite.onResponse) === null || _d === void 0 ? void 0 : _d.call(pendingResponseAfterWrite, response);
1234
1247
  }
1235
1248
  catch (error) {
1236
- (_c = logger === null || logger === void 0 ? void 0 : logger.error) === null || _c === void 0 ? void 0 : _c.call(logger, `${logPrefix} delayed response callback failed: ${String(error)}`);
1249
+ (_e = logger === null || logger === void 0 ? void 0 : logger.error) === null || _e === void 0 ? void 0 : _e.call(logger, `${logPrefix} delayed response callback failed: ${String(error)}`);
1237
1250
  }
1238
1251
  }
1239
1252
  }
1240
1253
  }
1241
1254
  if (belongsToWriteOnlyCall) ;
1242
- else if ((_d = callOptions.intermediateTypes) === null || _d === void 0 ? void 0 : _d.includes(response.type)) {
1243
- (_e = callOptions.onIntermediateResponse) === null || _e === void 0 ? void 0 : _e.call(callOptions, response);
1255
+ else if ((_f = callOptions.intermediateTypes) === null || _f === void 0 ? void 0 : _f.includes(response.type)) {
1256
+ (_g = callOptions.onIntermediateResponse) === null || _g === void 0 ? void 0 : _g.call(callOptions, response);
1244
1257
  }
1245
1258
  else if (isExpectedTerminalResponse(response, callOptions.expectedTypes)) {
1246
1259
  return response;
1247
1260
  }
1248
1261
  else if (!shouldReduceDebug) {
1249
- (_f = logger === null || logger === void 0 ? void 0 : logger.debug) === null || _f === void 0 ? void 0 : _f.call(logger, `[${logPrefix}] skip unexpected response for ${name}: expected=${(_g = callOptions.expectedTypes) === null || _g === void 0 ? void 0 : _g.join('|')} got=${response.type}`);
1262
+ (_h = logger === null || logger === void 0 ? void 0 : logger.debug) === null || _h === void 0 ? void 0 : _h.call(logger, `[${logPrefix}] skip unexpected response for ${name}: expected=${(_j = callOptions.expectedTypes) === null || _j === void 0 ? void 0 : _j.join('|')} got=${response.type}`);
1250
1263
  }
1251
1264
  }
1252
1265
  }
1253
1266
  throw new Error(`Protocol V2 read loop cancelled after timeout for ${name}`);
1254
1267
  });
1255
- return withProtocolTimeout(runCall(), timeoutMs, () => this.createCallTimeoutError(name, timeoutMs), () => {
1268
+ return withProtocolTimeout(runCall(), timeoutMs, () => createTimeoutError
1269
+ ? createTimeoutError(name, timeoutMs)
1270
+ : new Error(`Protocol V2 response timeout after ${timeoutMs}ms for ${name}`), () => {
1256
1271
  abortController.abort();
1257
1272
  });
1258
1273
  }
1259
- encodeRequestFrame(name, data) {
1260
- const { schemas, router, packetSrc = PROTOCOL_V2_PACKET_SRC_COMMAND, maxFrameBytes, } = this.options;
1261
- const seq = this.sequenceCursor.next();
1262
- const frame = ProtocolV2.encodeFrame(schemas, name, data, { packetSrc, router, seq });
1263
- if (maxFrameBytes !== undefined && frame.length > maxFrameBytes) {
1264
- throw new Error(`Protocol V2 frame too large for transport: ${frame.length} > ${maxFrameBytes}`);
1265
- }
1266
- return { seq, frame };
1267
- }
1268
- parseResponseFrame(rxFrame, ackSequences) {
1269
- const { schemas, router, packetSrc = PROTOCOL_V2_PACKET_SRC_COMMAND } = this.options;
1270
- let header;
1271
- try {
1272
- header = ProtocolV2.inspectFrameHeader(rxFrame);
1273
- }
1274
- catch (cause) {
1275
- throw new ProtocolV2LinkError('frame', `Protocol V2 frame validation failed: ${getErrorMessage(cause)}`, cause);
1276
- }
1277
- if (header.router !== router) {
1278
- throw new ProtocolV2LinkError('router', `Protocol V2 router mismatch: expected ${router}, got ${header.router}`);
1279
- }
1280
- if (header.packetSrc !== packetSrc) {
1281
- throw new ProtocolV2LinkError('packet-source', `Protocol V2 packet source mismatch: expected ${packetSrc}, got ${header.packetSrc}`);
1282
- }
1283
- let isAck;
1284
- try {
1285
- isAck = ProtocolV2.isAckFrame(rxFrame);
1286
- }
1287
- catch (cause) {
1288
- throw new ProtocolV2LinkError('frame', `Protocol V2 ACK validation failed: ${getErrorMessage(cause)}`, cause);
1289
- }
1290
- if (isAck) {
1291
- if (!ackSequences.includes(header.seq)) {
1292
- throw new ProtocolV2LinkError('ack-sequence', `Protocol V2 ACK sequence mismatch: expected ${ackSequences.join('|')}, got ${header.seq}`);
1293
- }
1294
- return undefined;
1295
- }
1296
- let decoded;
1297
- try {
1298
- decoded = ProtocolV2.decodeFrame(schemas, rxFrame);
1299
- }
1300
- catch (cause) {
1301
- throw new ProtocolV2LinkError('frame', `Protocol V2 frame decode failed: ${getErrorMessage(cause)}`, cause);
1302
- }
1303
- if (this.lastResponseSequence === decoded.seq) {
1304
- throw new ProtocolV2LinkError('response-sequence', `Protocol V2 duplicate response sequence: ${decoded.seq}`);
1305
- }
1306
- this.lastResponseSequence = decoded.seq;
1307
- return call(decoded);
1308
- }
1309
- executeFileWritePipeline(name, data, callOptions, pipeline) {
1310
- return __awaiter(this, void 0, void 0, function* () {
1311
- if (name !== 'FilesystemFileWrite') {
1312
- throw new Error(`Protocol V2 file write pipeline does not support ${name}`);
1313
- }
1314
- if (this.pendingResponseAfterWrite) {
1315
- throw new Error('Protocol V2 file write pipeline cannot start while a response is pending');
1316
- }
1317
- const { prepareCall, writeFrame, readFrame, generation = 0 } = this.options;
1318
- const timeoutMs = resolveProtocolV2CallTimeoutMs(callOptions.timeoutMs);
1319
- const abortController = new AbortController();
1320
- const context = Object.assign(Object.assign({ messageName: name, timeoutMs, highThroughput: true }, (callOptions.writeWithResponse === undefined
1321
- ? {}
1322
- : { writeWithResponse: callOptions.writeWithResponse })), { generation, signal: abortController.signal });
1323
- let transportFailure;
1324
- const withStepTimeout = (promise, stepTimeoutMs = timeoutMs) => withProtocolTimeout(promise, stepTimeoutMs, () => this.createCallTimeoutError(name, timeoutMs), () => {
1325
- abortController.abort();
1326
- }).catch((error) => {
1327
- transportFailure = error;
1328
- throw error;
1329
- });
1330
- let progressDeadline = 0;
1331
- const markProgress = () => {
1332
- progressDeadline = Date.now() + timeoutMs;
1333
- };
1334
- const inFlight = [];
1335
- let path;
1336
- let totalSize;
1337
- let nextOffset;
1338
- let sourceDone = false;
1339
- let failure;
1340
- let lastConfirmed;
1341
- const sendChunk = (request) => __awaiter(this, void 0, void 0, function* () {
1342
- const chunk = parseFileWriteChunk(request);
1343
- if (path !== undefined && (chunk.path !== path || chunk.totalSize !== totalSize)) {
1344
- throw new Error('Protocol V2 file write pipeline chunk belongs to a different file');
1345
- }
1346
- if (nextOffset !== undefined && chunk.offset !== nextOffset) {
1347
- throw new Error(`Protocol V2 file write pipeline chunk out of order: expected offset ${nextOffset}, got ${chunk.offset}`);
1348
- }
1349
- path = chunk.path;
1350
- totalSize = chunk.totalSize;
1351
- nextOffset = chunk.end;
1352
- const { seq, frame } = this.encodeRequestFrame(name, request);
1353
- const writeStartedAt = Date.now();
1354
- yield withStepTimeout(this.serializeWrite(() => writeFrame(frame, context)));
1355
- inFlight.push({ seq, offset: chunk.offset, end: chunk.end });
1356
- markProgress();
1357
- this.reportWriteCompleted(callOptions, writeStartedAt, frame.byteLength);
1358
- });
1359
- const sendNextChunk = () => __awaiter(this, void 0, void 0, function* () {
1360
- const request = yield pipeline.next();
1361
- if (!request) {
1362
- sourceDone = true;
1363
- return;
1364
- }
1365
- yield sendChunk(request);
1366
- });
1367
- yield withStepTimeout(Promise.resolve().then(() => prepareCall === null || prepareCall === void 0 ? void 0 : prepareCall(context)));
1368
- try {
1369
- yield sendChunk(data);
1370
- while (!sourceDone && inFlight.length < PROTOCOL_V2_FILE_WRITE_PIPELINE_WINDOW) {
1371
- yield sendNextChunk();
1372
- }
1373
- while (inFlight.length > 0) {
1374
- const rxFrame = yield withStepTimeout(readFrame(context), Math.max(progressDeadline - Date.now(), 1));
1375
- const response = this.parseResponseFrame(rxFrame, inFlight.map(item => item.seq));
1376
- if (!response) {
1377
- }
1378
- else if (response.type === 'FilesystemFile') {
1379
- const [expected] = inFlight;
1380
- const { message } = response;
1381
- if (Number(message.processed_byte) !== expected.end ||
1382
- message.path !== path ||
1383
- Number(message.offset) !== expected.offset ||
1384
- Number(message.total_size) !== totalSize) {
1385
- 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)}`);
1386
- }
1387
- inFlight.shift();
1388
- markProgress();
1389
- if (!failure) {
1390
- lastConfirmed = response;
1391
- pipeline.onResponse(response);
1392
- if (!sourceDone) {
1393
- yield sendNextChunk();
1394
- }
1395
- }
1396
- }
1397
- else if (response.type === 'Failure') {
1398
- inFlight.shift();
1399
- markProgress();
1400
- failure = failure !== null && failure !== void 0 ? failure : response;
1401
- sourceDone = true;
1402
- }
1403
- else if (COMMON_TERMINAL_RESPONSE_TYPES.has(response.type)) {
1404
- throw new ProtocolV2LinkError('frame', `Protocol V2 file write pipeline received unexpected ${response.type}`);
1405
- }
1406
- }
1407
- }
1408
- catch (error) {
1409
- if (inFlight.length === 0 || error === transportFailure || isProtocolV2LinkError(error)) {
1410
- throw error;
1411
- }
1412
- throw new ProtocolV2LinkError('frame', `Protocol V2 file write pipeline aborted with chunks in flight: ${getErrorMessage(error)}`, error);
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
- }
1421
1274
  }
1422
1275
  function probeProtocolV2({ call, timeoutMs, logger, logPrefix = 'ProtocolV2', onBeforeProbe, onProbeFailed, shouldRethrow, }) {
1423
1276
  var _a, _b, _c;
@@ -2702,7 +2555,6 @@ exports.PROTOCOL_V2_CHANNEL_SOCKET = PROTOCOL_V2_CHANNEL_SOCKET;
2702
2555
  exports.PROTOCOL_V2_CHANNEL_USB = PROTOCOL_V2_CHANNEL_USB;
2703
2556
  exports.PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS = PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS;
2704
2557
  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;
2706
2558
  exports.PROTOCOL_V2_FRAME_MAX_BYTES = PROTOCOL_V2_FRAME_MAX_BYTES;
2707
2559
  exports.PROTOCOL_V2_PACKET_SRC_COMMAND = PROTOCOL_V2_PACKET_SRC_COMMAND;
2708
2560
  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, ProtocolV2FileWritePipeline, TransportWriteMetrics } from '../../types';
4
+ import type { MessageFromOneKey, TransportWriteMetrics } from '../../types';
5
5
  export * from './errors';
6
6
  export type ProtocolV2Schemas = {
7
7
  protocolV1: Root;
@@ -42,7 +42,6 @@ export type ProtocolV2CallOptions = {
42
42
  returnAfterWrite?: boolean;
43
43
  onResponseAfterWrite?: (response: MessageFromOneKey) => void;
44
44
  writeWithResponse?: boolean;
45
- fileWritePipeline?: ProtocolV2FileWritePipeline;
46
45
  };
47
46
  export { concatUint8Arrays, ProtocolV2FrameAssembler };
48
47
  export { ProtocolV2SequenceCursor };
@@ -67,12 +66,7 @@ export declare class ProtocolV2Session {
67
66
  call(name: string, data: Record<string, unknown>, callOptions?: ProtocolV2CallOptions): Promise<MessageFromOneKey>;
68
67
  sendFlowControl(name: string, data: Record<string, unknown>): Promise<MessageFromOneKey>;
69
68
  private serializeWrite;
70
- private reportWriteCompleted;
71
- private createCallTimeoutError;
72
69
  private executeCall;
73
- private encodeRequestFrame;
74
- private parseResponseFrame;
75
- private executeFileWritePipeline;
76
70
  }
77
71
  export declare function probeProtocolV2({ call, timeoutMs, logger, logPrefix, onBeforeProbe, onProbeFailed, shouldRethrow, }: {
78
72
  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":"AAKA,OAAO,EAAE,wBA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BAA0B,GACtC,OAAO,CAAC,iBAAiB,CAAC;IAS7B,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAmCxF,OAAO,CAAC,cAAc;IAMtB,OAAO,CAAC,WAAW;CAiMpB;AAED,wBAAsB,eAAe,CAAC,EACpC,IAAI,EACJ,SAAS,EACT,MAAM,EACN,SAAwB,EACxB,aAAa,EACb,aAAa,EACb,aAAa,GACd,EAAE;IACD,IAAI,EAAE,CACJ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,OAAO,CAAC,EAAE,qBAAqB,KAC5B,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IAC3C,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC;CAC7C,oBAiCA"}
@@ -49,10 +49,6 @@ export type TransportWriteMetrics = {
49
49
  elapsedMs: number;
50
50
  frameBytes: number;
51
51
  };
52
- export type ProtocolV2FileWritePipeline = {
53
- next: () => Promise<Record<string, unknown> | undefined>;
54
- onResponse: (response: MessageFromOneKey) => void;
55
- };
56
52
  export type TransportCallOptions = {
57
53
  timeoutMs?: number;
58
54
  expectedTypes?: string[];
@@ -62,7 +58,6 @@ export type TransportCallOptions = {
62
58
  returnAfterWrite?: boolean;
63
59
  onResponseAfterWrite?: (response: MessageFromOneKey) => void;
64
60
  writeWithResponse?: boolean;
65
- fileWritePipeline?: ProtocolV2FileWritePipeline;
66
61
  };
67
62
  type ITransportInitFn = (logger?: any, emitter?: EventEmitter, plugin?: LowlevelTransportSharedPlugin) => Promise<string>;
68
63
  export type Transport = {