@onekeyfe/hd-transport 1.2.0-alpha.183 → 1.2.0-alpha.185
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/README.md +1 -1
- package/__tests__/messages.test.js +25 -0
- package/__tests__/protocol-v2.test.js +15 -0
- package/dist/index.d.ts +52 -3
- package/dist/index.js +9 -2
- package/dist/protocols/v2/session.d.ts +2 -1
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/types/messages.d.ts +38 -1
- package/dist/types/messages.d.ts.map +1 -1
- package/messages-protocol-v2.json +111 -1
- package/package.json +2 -2
- package/src/protocols/v2/session.ts +3 -1
- package/src/types/messages.ts +47 -1
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ In order to be able to use new features of onekey-firmware you need to update pr
|
|
|
20
20
|
1. `yarn update-submodules` to update firmware submodule
|
|
21
21
|
1. `yarn update-protobuf` to generate new `./messages.json`, `./messages-protocol-v2.json` and `./src/types/messages.ts`
|
|
22
22
|
|
|
23
|
-
The same task can be run from the repository root with `yarn update-protobuf`. The Protocol V2 schema requires the `firmware-pro2` submodule checked out on branch `
|
|
23
|
+
The same task can be run from the repository root with `yarn update-protobuf`. The Protocol V2 schema requires the `firmware-pro2` submodule checked out on branch `main`.
|
|
24
24
|
|
|
25
25
|
## Docs
|
|
26
26
|
|
|
@@ -88,6 +88,31 @@ describe('messages', () => {
|
|
|
88
88
|
});
|
|
89
89
|
});
|
|
90
90
|
|
|
91
|
+
test('Protocol V2 firmware update progress matches firmware-pro2 main', () => {
|
|
92
|
+
expect(v2Messages.nested.MessageType.values).toMatchObject({
|
|
93
|
+
MessageType_DeviceFindMyTokenState: 60450,
|
|
94
|
+
MessageType_DeviceFindMyTokenUpdate: 60451,
|
|
95
|
+
MessageType_DeviceFindMyTokenStateGet: 60452,
|
|
96
|
+
});
|
|
97
|
+
expect(v2Messages.nested.DeviceFirmwareUpdatePhase.values).toEqual({
|
|
98
|
+
FW_MGMT_UPDATER_PHASE_PREPARE: 0,
|
|
99
|
+
FW_MGMT_UPDATER_PHASE_INSTALL: 1,
|
|
100
|
+
FW_MGMT_UPDATER_PHASE_VERIFY: 2,
|
|
101
|
+
});
|
|
102
|
+
expect(v2Messages.nested.DeviceFirmwareUpdateRequest.fields.reboot_after_update).toMatchObject({
|
|
103
|
+
id: 1,
|
|
104
|
+
type: 'bool',
|
|
105
|
+
});
|
|
106
|
+
expect(v2Messages.nested.DeviceFirmwareUpdateRecord.fields).toMatchObject({
|
|
107
|
+
progress_percent: { id: 11, type: 'uint32' },
|
|
108
|
+
phase_info: { id: 12, type: 'DeviceFirmwareUpdatePhaseInfo' },
|
|
109
|
+
});
|
|
110
|
+
expect(v2Messages.nested.DeviceFirmwareUpdateRecordFields.fields).toMatchObject({
|
|
111
|
+
progress_percent: { id: 11, type: 'bool' },
|
|
112
|
+
phase_info: { id: 12, type: 'bool' },
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
|
|
91
116
|
test('Protocol V2 conflicting enums keep their own wire values', () => {
|
|
92
117
|
expect(generatedTypes.ProtocolV2FailureType).toMatchObject({
|
|
93
118
|
Failure_DataError: 4,
|
|
@@ -1108,6 +1108,21 @@ describe('Protocol V2 framing and session', () => {
|
|
|
1108
1108
|
expect(readFrame).toHaveBeenCalledTimes(1);
|
|
1109
1109
|
});
|
|
1110
1110
|
|
|
1111
|
+
test('probeProtocolV2 rethrows caller-selected fatal errors without treating them as a miss', async () => {
|
|
1112
|
+
const onProbeFailed = jest.fn();
|
|
1113
|
+
const staleBond = Object.assign(new Error('Bluetooth pairing failed'), { errorCode: 715 });
|
|
1114
|
+
|
|
1115
|
+
await expect(
|
|
1116
|
+
probeProtocolV2({
|
|
1117
|
+
call: () => Promise.reject(staleBond),
|
|
1118
|
+
timeoutMs: 1,
|
|
1119
|
+
onProbeFailed,
|
|
1120
|
+
shouldRethrow: error => error?.errorCode === 715,
|
|
1121
|
+
})
|
|
1122
|
+
).rejects.toBe(staleBond);
|
|
1123
|
+
expect(onProbeFailed).not.toHaveBeenCalled();
|
|
1124
|
+
});
|
|
1125
|
+
|
|
1111
1126
|
test('probeProtocolV2 accepts Success as a normal V2 probe response', async () => {
|
|
1112
1127
|
await expect(
|
|
1113
1128
|
probeProtocolV2({
|
package/dist/index.d.ts
CHANGED
|
@@ -1867,6 +1867,8 @@ type EthereumSignTxOneKey = {
|
|
|
1867
1867
|
data_length?: number;
|
|
1868
1868
|
chain_id: number;
|
|
1869
1869
|
tx_type?: number;
|
|
1870
|
+
expected_address?: string;
|
|
1871
|
+
source_fingerprint?: number;
|
|
1870
1872
|
};
|
|
1871
1873
|
type EthereumAccessListOneKey = {
|
|
1872
1874
|
address: string;
|
|
@@ -1884,6 +1886,8 @@ type EthereumSignTxEIP1559OneKey = {
|
|
|
1884
1886
|
data_length: number;
|
|
1885
1887
|
chain_id: number;
|
|
1886
1888
|
access_list: EthereumAccessListOneKey[];
|
|
1889
|
+
expected_address?: string;
|
|
1890
|
+
source_fingerprint?: number;
|
|
1887
1891
|
};
|
|
1888
1892
|
type EthereumAuthorizationSignature = {
|
|
1889
1893
|
y_parity: number;
|
|
@@ -1925,6 +1929,7 @@ type EthereumSignMessageOneKey = {
|
|
|
1925
1929
|
address_n: number[];
|
|
1926
1930
|
message: string;
|
|
1927
1931
|
chain_id?: number;
|
|
1932
|
+
source_fingerprint?: number;
|
|
1928
1933
|
};
|
|
1929
1934
|
type EthereumMessageSignatureOneKey = {
|
|
1930
1935
|
signature: string;
|
|
@@ -3257,6 +3262,7 @@ type SolanaSignTx = {
|
|
|
3257
3262
|
address_n: number[];
|
|
3258
3263
|
raw_tx: string;
|
|
3259
3264
|
extra_info?: SolanaTxExtraInfo;
|
|
3265
|
+
source_fingerprint?: number;
|
|
3260
3266
|
};
|
|
3261
3267
|
type SolanaSignedTx = {
|
|
3262
3268
|
signature?: string;
|
|
@@ -3274,10 +3280,12 @@ type SolanaSignOffChainMessage = {
|
|
|
3274
3280
|
message_version?: SolanaOffChainMessageVersion;
|
|
3275
3281
|
message_format?: SolanaOffChainMessageFormat;
|
|
3276
3282
|
application_domain?: string;
|
|
3283
|
+
source_fingerprint?: number;
|
|
3277
3284
|
};
|
|
3278
3285
|
type SolanaSignUnsafeMessage = {
|
|
3279
3286
|
address_n: number[];
|
|
3280
3287
|
message: string;
|
|
3288
|
+
source_fingerprint?: number;
|
|
3281
3289
|
};
|
|
3282
3290
|
type SolanaMessageSignature = {
|
|
3283
3291
|
signature: string;
|
|
@@ -3857,6 +3865,7 @@ type EthereumSignTypedDataQR = {
|
|
|
3857
3865
|
chain_id?: number;
|
|
3858
3866
|
metamask_v4_compat?: boolean;
|
|
3859
3867
|
request_id?: string;
|
|
3868
|
+
source_fingerprint?: number;
|
|
3860
3869
|
};
|
|
3861
3870
|
type SetBusy = {
|
|
3862
3871
|
expiry_ms?: number;
|
|
@@ -3978,6 +3987,13 @@ type DeviceCertificateSign = {
|
|
|
3978
3987
|
type DeviceMiscUsbMscControl = {
|
|
3979
3988
|
enable: boolean;
|
|
3980
3989
|
};
|
|
3990
|
+
type DeviceFindMyTokenUpdate = {
|
|
3991
|
+
token: string;
|
|
3992
|
+
};
|
|
3993
|
+
type DeviceFindMyTokenStateGet = {};
|
|
3994
|
+
type DeviceFindMyTokenState = {
|
|
3995
|
+
burned: boolean;
|
|
3996
|
+
};
|
|
3981
3997
|
declare enum DeviceFactoryAck {
|
|
3982
3998
|
FACTORY_ACK_SUCCESS = 0,
|
|
3983
3999
|
FACTORY_ACK_FAIL = 1
|
|
@@ -4034,6 +4050,11 @@ declare enum DeviceFirmwareUpdateTaskStatus {
|
|
|
4034
4050
|
FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
|
|
4035
4051
|
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10
|
|
4036
4052
|
}
|
|
4053
|
+
declare enum DeviceFirmwareUpdatePhase {
|
|
4054
|
+
FW_MGMT_UPDATER_PHASE_PREPARE = 0,
|
|
4055
|
+
FW_MGMT_UPDATER_PHASE_INSTALL = 1,
|
|
4056
|
+
FW_MGMT_UPDATER_PHASE_VERIFY = 2
|
|
4057
|
+
}
|
|
4037
4058
|
type DeviceFirmwareTarget = {
|
|
4038
4059
|
target_id: DeviceFirmwareTargetType;
|
|
4039
4060
|
path: string;
|
|
@@ -4041,15 +4062,25 @@ type DeviceFirmwareTarget = {
|
|
|
4041
4062
|
type DeviceFirmwareUpdateStage = {
|
|
4042
4063
|
targets: DeviceFirmwareTarget[];
|
|
4043
4064
|
};
|
|
4044
|
-
type DeviceFirmwareUpdateRequest = {
|
|
4065
|
+
type DeviceFirmwareUpdateRequest = {
|
|
4066
|
+
reboot_after_update?: boolean;
|
|
4067
|
+
};
|
|
4068
|
+
type DeviceFirmwareUpdatePhaseInfo = {
|
|
4069
|
+
phase: DeviceFirmwareUpdatePhase;
|
|
4070
|
+
progress_percent: number;
|
|
4071
|
+
};
|
|
4045
4072
|
type DeviceFirmwareUpdateRecord = {
|
|
4046
4073
|
target_id: DeviceFirmwareTargetType;
|
|
4047
4074
|
status?: DeviceFirmwareUpdateTaskStatus;
|
|
4075
|
+
progress_percent?: number;
|
|
4076
|
+
phase_info?: DeviceFirmwareUpdatePhaseInfo;
|
|
4048
4077
|
payload_version?: number;
|
|
4049
4078
|
path?: string;
|
|
4050
4079
|
};
|
|
4051
4080
|
type DeviceFirmwareUpdateRecordFields = {
|
|
4052
4081
|
status?: boolean;
|
|
4082
|
+
progress_percent?: boolean;
|
|
4083
|
+
phase_info?: boolean;
|
|
4053
4084
|
payload_version?: boolean;
|
|
4054
4085
|
path?: boolean;
|
|
4055
4086
|
};
|
|
@@ -4320,6 +4351,7 @@ type ViewTip = {
|
|
|
4320
4351
|
type: ViewTipType;
|
|
4321
4352
|
text?: string;
|
|
4322
4353
|
text_id?: number;
|
|
4354
|
+
text_arg?: string;
|
|
4323
4355
|
};
|
|
4324
4356
|
type ViewRawData = {
|
|
4325
4357
|
initial_data: string;
|
|
@@ -4342,6 +4374,7 @@ type ViewSignPage = {
|
|
|
4342
4374
|
slide_to_confirm?: boolean;
|
|
4343
4375
|
layout?: ViewSignLayout;
|
|
4344
4376
|
title_id?: number;
|
|
4377
|
+
title_arg?: string;
|
|
4345
4378
|
};
|
|
4346
4379
|
type ViewVerifyPage = {
|
|
4347
4380
|
title?: string;
|
|
@@ -4977,6 +5010,9 @@ type MessageType = {
|
|
|
4977
5010
|
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
4978
5011
|
DeviceCertificateSign: DeviceCertificateSign;
|
|
4979
5012
|
DeviceMiscUsbMscControl: DeviceMiscUsbMscControl;
|
|
5013
|
+
DeviceFindMyTokenUpdate: DeviceFindMyTokenUpdate;
|
|
5014
|
+
DeviceFindMyTokenStateGet: DeviceFindMyTokenStateGet;
|
|
5015
|
+
DeviceFindMyTokenState: DeviceFindMyTokenState;
|
|
4980
5016
|
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
4981
5017
|
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
4982
5018
|
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
@@ -4986,6 +5022,7 @@ type MessageType = {
|
|
|
4986
5022
|
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
4987
5023
|
DeviceFirmwareUpdateStage: DeviceFirmwareUpdateStage;
|
|
4988
5024
|
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
5025
|
+
DeviceFirmwareUpdatePhaseInfo: DeviceFirmwareUpdatePhaseInfo;
|
|
4989
5026
|
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
4990
5027
|
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
4991
5028
|
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|
|
@@ -5792,6 +5829,9 @@ type messages_DeviceCertificateRead = DeviceCertificateRead;
|
|
|
5792
5829
|
type messages_DeviceCertificateSignature = DeviceCertificateSignature;
|
|
5793
5830
|
type messages_DeviceCertificateSign = DeviceCertificateSign;
|
|
5794
5831
|
type messages_DeviceMiscUsbMscControl = DeviceMiscUsbMscControl;
|
|
5832
|
+
type messages_DeviceFindMyTokenUpdate = DeviceFindMyTokenUpdate;
|
|
5833
|
+
type messages_DeviceFindMyTokenStateGet = DeviceFindMyTokenStateGet;
|
|
5834
|
+
type messages_DeviceFindMyTokenState = DeviceFindMyTokenState;
|
|
5795
5835
|
type messages_DeviceFactoryAck = DeviceFactoryAck;
|
|
5796
5836
|
declare const messages_DeviceFactoryAck: typeof DeviceFactoryAck;
|
|
5797
5837
|
type messages_DeviceFactoryInfoManufactureTime = DeviceFactoryInfoManufactureTime;
|
|
@@ -5804,9 +5844,12 @@ type messages_DeviceFirmwareTargetType = DeviceFirmwareTargetType;
|
|
|
5804
5844
|
declare const messages_DeviceFirmwareTargetType: typeof DeviceFirmwareTargetType;
|
|
5805
5845
|
type messages_DeviceFirmwareUpdateTaskStatus = DeviceFirmwareUpdateTaskStatus;
|
|
5806
5846
|
declare const messages_DeviceFirmwareUpdateTaskStatus: typeof DeviceFirmwareUpdateTaskStatus;
|
|
5847
|
+
type messages_DeviceFirmwareUpdatePhase = DeviceFirmwareUpdatePhase;
|
|
5848
|
+
declare const messages_DeviceFirmwareUpdatePhase: typeof DeviceFirmwareUpdatePhase;
|
|
5807
5849
|
type messages_DeviceFirmwareTarget = DeviceFirmwareTarget;
|
|
5808
5850
|
type messages_DeviceFirmwareUpdateStage = DeviceFirmwareUpdateStage;
|
|
5809
5851
|
type messages_DeviceFirmwareUpdateRequest = DeviceFirmwareUpdateRequest;
|
|
5852
|
+
type messages_DeviceFirmwareUpdatePhaseInfo = DeviceFirmwareUpdatePhaseInfo;
|
|
5810
5853
|
type messages_DeviceFirmwareUpdateRecord = DeviceFirmwareUpdateRecord;
|
|
5811
5854
|
type messages_DeviceFirmwareUpdateRecordFields = DeviceFirmwareUpdateRecordFields;
|
|
5812
5855
|
type messages_DeviceFirmwareUpdateStatusGet = DeviceFirmwareUpdateStatusGet;
|
|
@@ -6569,6 +6612,9 @@ declare namespace messages {
|
|
|
6569
6612
|
messages_DeviceCertificateSignature as DeviceCertificateSignature,
|
|
6570
6613
|
messages_DeviceCertificateSign as DeviceCertificateSign,
|
|
6571
6614
|
messages_DeviceMiscUsbMscControl as DeviceMiscUsbMscControl,
|
|
6615
|
+
messages_DeviceFindMyTokenUpdate as DeviceFindMyTokenUpdate,
|
|
6616
|
+
messages_DeviceFindMyTokenStateGet as DeviceFindMyTokenStateGet,
|
|
6617
|
+
messages_DeviceFindMyTokenState as DeviceFindMyTokenState,
|
|
6572
6618
|
messages_DeviceFactoryAck as DeviceFactoryAck,
|
|
6573
6619
|
messages_DeviceFactoryInfoManufactureTime as DeviceFactoryInfoManufactureTime,
|
|
6574
6620
|
messages_DeviceFactoryInfo as DeviceFactoryInfo,
|
|
@@ -6578,9 +6624,11 @@ declare namespace messages {
|
|
|
6578
6624
|
messages_DeviceFactoryTest as DeviceFactoryTest,
|
|
6579
6625
|
messages_DeviceFirmwareTargetType as DeviceFirmwareTargetType,
|
|
6580
6626
|
messages_DeviceFirmwareUpdateTaskStatus as DeviceFirmwareUpdateTaskStatus,
|
|
6627
|
+
messages_DeviceFirmwareUpdatePhase as DeviceFirmwareUpdatePhase,
|
|
6581
6628
|
messages_DeviceFirmwareTarget as DeviceFirmwareTarget,
|
|
6582
6629
|
messages_DeviceFirmwareUpdateStage as DeviceFirmwareUpdateStage,
|
|
6583
6630
|
messages_DeviceFirmwareUpdateRequest as DeviceFirmwareUpdateRequest,
|
|
6631
|
+
messages_DeviceFirmwareUpdatePhaseInfo as DeviceFirmwareUpdatePhaseInfo,
|
|
6584
6632
|
messages_DeviceFirmwareUpdateRecord as DeviceFirmwareUpdateRecord,
|
|
6585
6633
|
messages_DeviceFirmwareUpdateRecordFields as DeviceFirmwareUpdateRecordFields,
|
|
6586
6634
|
messages_DeviceFirmwareUpdateStatusGet as DeviceFirmwareUpdateStatusGet,
|
|
@@ -6712,13 +6760,14 @@ declare class ProtocolV2Session {
|
|
|
6712
6760
|
private serializeWrite;
|
|
6713
6761
|
private executeCall;
|
|
6714
6762
|
}
|
|
6715
|
-
declare function probeProtocolV2({ call, timeoutMs, logger, logPrefix, onBeforeProbe, onProbeFailed, }: {
|
|
6763
|
+
declare function probeProtocolV2({ call, timeoutMs, logger, logPrefix, onBeforeProbe, onProbeFailed, shouldRethrow, }: {
|
|
6716
6764
|
call: (name: string, data: Record<string, unknown>, options?: ProtocolV2CallOptions) => Promise<MessageFromOneKey>;
|
|
6717
6765
|
timeoutMs: number;
|
|
6718
6766
|
logger?: ProtocolLogger;
|
|
6719
6767
|
logPrefix?: string;
|
|
6720
6768
|
onBeforeProbe?: () => Promise<void> | void;
|
|
6721
6769
|
onProbeFailed?: (error: unknown) => Promise<void> | void;
|
|
6770
|
+
shouldRethrow?: (error: unknown) => boolean;
|
|
6722
6771
|
}): Promise<boolean>;
|
|
6723
6772
|
|
|
6724
6773
|
type ProtocolV2LinkErrorClassification = 'link-fatal' | 'recoverable';
|
|
@@ -6962,4 +7011,4 @@ declare const _default: {
|
|
|
6962
7011
|
withProtocolTimeout: typeof withProtocolTimeout;
|
|
6963
7012
|
};
|
|
6964
7013
|
|
|
6965
|
-
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, 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, 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, DeviceBackToBoot, DeviceCertificate, DeviceCertificateRead, DeviceCertificateSign, DeviceCertificateSignature, DeviceCertificateWrite, DeviceCoprocessorInfo, DeviceEraseSector, DeviceErrorCode, DeviceFactoryAck, DeviceFactoryInfo, DeviceFactoryInfoGet, DeviceFactoryInfoManufactureTime, DeviceFactoryInfoSet, DeviceFactoryPermanentLock, DeviceFactoryTest, DeviceFirmwareImageInfo, DeviceFirmwareTarget, DeviceFirmwareTargetType, 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_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, ViewAmount, ViewDetail, ViewRawData, ViewSignLayout, ViewSignPage, ViewTip, ViewTipType, ViewVerifyPage, Vote, WL_OperationType, WipeDevice, WordAck, WordRequest, WordRequestType, WriteSEPrivateKey, WriteSEPublicCert, ZoomRequest, bytesToHex, concatUint8Arrays, createProtocolV2LinkDisabledError, createTransportCallLog, _default as default, experimental_field, experimental_message, facotry, getErrorMessage, getSafeTransportLogPayload, hexToBytes, isProtocolV2HighThroughputCall, isProtocolV2LinkDisabledError, isProtocolV2LinkDisabledFailure, isProtocolV2LinkError, probeProtocolV2, index as protocolV1, protocolV2Codec as protocolV2, shouldSuppressHighVolumeCallLog, withProtocolTimeout, writeProtocolV2BleFrame };
|
|
7014
|
+
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, 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, 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, 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_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, ViewAmount, ViewDetail, ViewRawData, ViewSignLayout, ViewSignPage, ViewTip, ViewTipType, ViewVerifyPage, Vote, WL_OperationType, WipeDevice, WordAck, WordRequest, WordRequestType, WriteSEPrivateKey, WriteSEPublicCert, ZoomRequest, bytesToHex, concatUint8Arrays, createProtocolV2LinkDisabledError, createTransportCallLog, _default as default, 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.js
CHANGED
|
@@ -1253,7 +1253,7 @@ class ProtocolV2Session {
|
|
|
1253
1253
|
});
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
|
-
function probeProtocolV2({ call, timeoutMs, logger, logPrefix = 'ProtocolV2', onBeforeProbe, onProbeFailed, }) {
|
|
1256
|
+
function probeProtocolV2({ call, timeoutMs, logger, logPrefix = 'ProtocolV2', onBeforeProbe, onProbeFailed, shouldRethrow, }) {
|
|
1257
1257
|
var _a, _b, _c;
|
|
1258
1258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1259
1259
|
let probeError;
|
|
@@ -1276,7 +1276,7 @@ function probeProtocolV2({ call, timeoutMs, logger, logPrefix = 'ProtocolV2', on
|
|
|
1276
1276
|
probeError = new Error(`unexpected response type ${response.type}`);
|
|
1277
1277
|
}
|
|
1278
1278
|
catch (error) {
|
|
1279
|
-
if (isProtocolV2LinkDisabledError(error)) {
|
|
1279
|
+
if (isProtocolV2LinkDisabledError(error) || (shouldRethrow === null || shouldRethrow === void 0 ? void 0 : shouldRethrow(error))) {
|
|
1280
1280
|
throw error;
|
|
1281
1281
|
}
|
|
1282
1282
|
probeError = error;
|
|
@@ -2163,6 +2163,12 @@ exports.DeviceFirmwareUpdateTaskStatus = void 0;
|
|
|
2163
2163
|
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY"] = 9] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY";
|
|
2164
2164
|
DeviceFirmwareUpdateTaskStatus[DeviceFirmwareUpdateTaskStatus["FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS"] = 10] = "FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS";
|
|
2165
2165
|
})(exports.DeviceFirmwareUpdateTaskStatus || (exports.DeviceFirmwareUpdateTaskStatus = {}));
|
|
2166
|
+
exports.DeviceFirmwareUpdatePhase = void 0;
|
|
2167
|
+
(function (DeviceFirmwareUpdatePhase) {
|
|
2168
|
+
DeviceFirmwareUpdatePhase[DeviceFirmwareUpdatePhase["FW_MGMT_UPDATER_PHASE_PREPARE"] = 0] = "FW_MGMT_UPDATER_PHASE_PREPARE";
|
|
2169
|
+
DeviceFirmwareUpdatePhase[DeviceFirmwareUpdatePhase["FW_MGMT_UPDATER_PHASE_INSTALL"] = 1] = "FW_MGMT_UPDATER_PHASE_INSTALL";
|
|
2170
|
+
DeviceFirmwareUpdatePhase[DeviceFirmwareUpdatePhase["FW_MGMT_UPDATER_PHASE_VERIFY"] = 2] = "FW_MGMT_UPDATER_PHASE_VERIFY";
|
|
2171
|
+
})(exports.DeviceFirmwareUpdatePhase || (exports.DeviceFirmwareUpdatePhase = {}));
|
|
2166
2172
|
exports.DeviceType = void 0;
|
|
2167
2173
|
(function (DeviceType) {
|
|
2168
2174
|
DeviceType[DeviceType["CLASSIC1"] = 0] = "CLASSIC1";
|
|
@@ -2370,6 +2376,7 @@ var messages = /*#__PURE__*/Object.freeze({
|
|
|
2370
2376
|
get DeviceFactoryAck () { return exports.DeviceFactoryAck; },
|
|
2371
2377
|
get DeviceFirmwareTargetType () { return exports.DeviceFirmwareTargetType; },
|
|
2372
2378
|
get DeviceFirmwareUpdateTaskStatus () { return exports.DeviceFirmwareUpdateTaskStatus; },
|
|
2379
|
+
get DeviceFirmwareUpdatePhase () { return exports.DeviceFirmwareUpdatePhase; },
|
|
2373
2380
|
get DeviceType () { return exports.DeviceType; },
|
|
2374
2381
|
get DeviceSeType () { return exports.DeviceSeType; },
|
|
2375
2382
|
get DeviceSEState () { return exports.DeviceSEState; },
|
|
@@ -63,12 +63,13 @@ export declare class ProtocolV2Session {
|
|
|
63
63
|
private serializeWrite;
|
|
64
64
|
private executeCall;
|
|
65
65
|
}
|
|
66
|
-
export declare function probeProtocolV2({ call, timeoutMs, logger, logPrefix, onBeforeProbe, onProbeFailed, }: {
|
|
66
|
+
export declare function probeProtocolV2({ call, timeoutMs, logger, logPrefix, onBeforeProbe, onProbeFailed, shouldRethrow, }: {
|
|
67
67
|
call: (name: string, data: Record<string, unknown>, options?: ProtocolV2CallOptions) => Promise<MessageFromOneKey>;
|
|
68
68
|
timeoutMs: number;
|
|
69
69
|
logger?: ProtocolLogger;
|
|
70
70
|
logPrefix?: string;
|
|
71
71
|
onBeforeProbe?: () => Promise<void> | void;
|
|
72
72
|
onProbeFailed?: (error: unknown) => Promise<void> | void;
|
|
73
|
+
shouldRethrow?: (error: unknown) => boolean;
|
|
73
74
|
}): Promise<boolean>;
|
|
74
75
|
//# sourceMappingURL=session.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/protocols/v2/session.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,wBAAwB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAW7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE5E,cAAc,UAAU,CAAC;AAEzB,MAAM,MAAM,iBAAiB,GAAG;IAC9B,UAAU,EAAE,IAAI,CAAC;IACjB,UAAU,EAAE,IAAI,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;CACrB,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE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AC,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"}
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -1455,6 +1455,8 @@ export type EthereumSignTxOneKey = {
|
|
|
1455
1455
|
data_length?: number;
|
|
1456
1456
|
chain_id: number;
|
|
1457
1457
|
tx_type?: number;
|
|
1458
|
+
expected_address?: string;
|
|
1459
|
+
source_fingerprint?: number;
|
|
1458
1460
|
};
|
|
1459
1461
|
export type EthereumAccessListOneKey = {
|
|
1460
1462
|
address: string;
|
|
@@ -1472,6 +1474,8 @@ export type EthereumSignTxEIP1559OneKey = {
|
|
|
1472
1474
|
data_length: number;
|
|
1473
1475
|
chain_id: number;
|
|
1474
1476
|
access_list: EthereumAccessListOneKey[];
|
|
1477
|
+
expected_address?: string;
|
|
1478
|
+
source_fingerprint?: number;
|
|
1475
1479
|
};
|
|
1476
1480
|
export type EthereumAuthorizationSignature = {
|
|
1477
1481
|
y_parity: number;
|
|
@@ -1513,6 +1517,7 @@ export type EthereumSignMessageOneKey = {
|
|
|
1513
1517
|
address_n: number[];
|
|
1514
1518
|
message: string;
|
|
1515
1519
|
chain_id?: number;
|
|
1520
|
+
source_fingerprint?: number;
|
|
1516
1521
|
};
|
|
1517
1522
|
export type EthereumMessageSignatureOneKey = {
|
|
1518
1523
|
signature: string;
|
|
@@ -2845,6 +2850,7 @@ export type SolanaSignTx = {
|
|
|
2845
2850
|
address_n: number[];
|
|
2846
2851
|
raw_tx: string;
|
|
2847
2852
|
extra_info?: SolanaTxExtraInfo;
|
|
2853
|
+
source_fingerprint?: number;
|
|
2848
2854
|
};
|
|
2849
2855
|
export type SolanaSignedTx = {
|
|
2850
2856
|
signature?: string;
|
|
@@ -2862,10 +2868,12 @@ export type SolanaSignOffChainMessage = {
|
|
|
2862
2868
|
message_version?: SolanaOffChainMessageVersion;
|
|
2863
2869
|
message_format?: SolanaOffChainMessageFormat;
|
|
2864
2870
|
application_domain?: string;
|
|
2871
|
+
source_fingerprint?: number;
|
|
2865
2872
|
};
|
|
2866
2873
|
export type SolanaSignUnsafeMessage = {
|
|
2867
2874
|
address_n: number[];
|
|
2868
2875
|
message: string;
|
|
2876
|
+
source_fingerprint?: number;
|
|
2869
2877
|
};
|
|
2870
2878
|
export type SolanaMessageSignature = {
|
|
2871
2879
|
signature: string;
|
|
@@ -3445,6 +3453,7 @@ export type EthereumSignTypedDataQR = {
|
|
|
3445
3453
|
chain_id?: number;
|
|
3446
3454
|
metamask_v4_compat?: boolean;
|
|
3447
3455
|
request_id?: string;
|
|
3456
|
+
source_fingerprint?: number;
|
|
3448
3457
|
};
|
|
3449
3458
|
export type SetBusy = {
|
|
3450
3459
|
expiry_ms?: number;
|
|
@@ -3566,6 +3575,13 @@ export type DeviceCertificateSign = {
|
|
|
3566
3575
|
export type DeviceMiscUsbMscControl = {
|
|
3567
3576
|
enable: boolean;
|
|
3568
3577
|
};
|
|
3578
|
+
export type DeviceFindMyTokenUpdate = {
|
|
3579
|
+
token: string;
|
|
3580
|
+
};
|
|
3581
|
+
export type DeviceFindMyTokenStateGet = {};
|
|
3582
|
+
export type DeviceFindMyTokenState = {
|
|
3583
|
+
burned: boolean;
|
|
3584
|
+
};
|
|
3569
3585
|
export declare enum DeviceFactoryAck {
|
|
3570
3586
|
FACTORY_ACK_SUCCESS = 0,
|
|
3571
3587
|
FACTORY_ACK_FAIL = 1
|
|
@@ -3622,6 +3638,11 @@ export declare enum DeviceFirmwareUpdateTaskStatus {
|
|
|
3622
3638
|
FW_MGMT_UPDATER_TASK_STATUS_FAILED_BUSY = 9,
|
|
3623
3639
|
FW_MGMT_UPDATER_TASK_STATUS_FAILED_ENTRY_OUT_OF_BOUNDS = 10
|
|
3624
3640
|
}
|
|
3641
|
+
export declare enum DeviceFirmwareUpdatePhase {
|
|
3642
|
+
FW_MGMT_UPDATER_PHASE_PREPARE = 0,
|
|
3643
|
+
FW_MGMT_UPDATER_PHASE_INSTALL = 1,
|
|
3644
|
+
FW_MGMT_UPDATER_PHASE_VERIFY = 2
|
|
3645
|
+
}
|
|
3625
3646
|
export type DeviceFirmwareTarget = {
|
|
3626
3647
|
target_id: DeviceFirmwareTargetType;
|
|
3627
3648
|
path: string;
|
|
@@ -3629,15 +3650,25 @@ export type DeviceFirmwareTarget = {
|
|
|
3629
3650
|
export type DeviceFirmwareUpdateStage = {
|
|
3630
3651
|
targets: DeviceFirmwareTarget[];
|
|
3631
3652
|
};
|
|
3632
|
-
export type DeviceFirmwareUpdateRequest = {
|
|
3653
|
+
export type DeviceFirmwareUpdateRequest = {
|
|
3654
|
+
reboot_after_update?: boolean;
|
|
3655
|
+
};
|
|
3656
|
+
export type DeviceFirmwareUpdatePhaseInfo = {
|
|
3657
|
+
phase: DeviceFirmwareUpdatePhase;
|
|
3658
|
+
progress_percent: number;
|
|
3659
|
+
};
|
|
3633
3660
|
export type DeviceFirmwareUpdateRecord = {
|
|
3634
3661
|
target_id: DeviceFirmwareTargetType;
|
|
3635
3662
|
status?: DeviceFirmwareUpdateTaskStatus;
|
|
3663
|
+
progress_percent?: number;
|
|
3664
|
+
phase_info?: DeviceFirmwareUpdatePhaseInfo;
|
|
3636
3665
|
payload_version?: number;
|
|
3637
3666
|
path?: string;
|
|
3638
3667
|
};
|
|
3639
3668
|
export type DeviceFirmwareUpdateRecordFields = {
|
|
3640
3669
|
status?: boolean;
|
|
3670
|
+
progress_percent?: boolean;
|
|
3671
|
+
phase_info?: boolean;
|
|
3641
3672
|
payload_version?: boolean;
|
|
3642
3673
|
path?: boolean;
|
|
3643
3674
|
};
|
|
@@ -3908,6 +3939,7 @@ export type ViewTip = {
|
|
|
3908
3939
|
type: ViewTipType;
|
|
3909
3940
|
text?: string;
|
|
3910
3941
|
text_id?: number;
|
|
3942
|
+
text_arg?: string;
|
|
3911
3943
|
};
|
|
3912
3944
|
export type ViewRawData = {
|
|
3913
3945
|
initial_data: string;
|
|
@@ -3930,6 +3962,7 @@ export type ViewSignPage = {
|
|
|
3930
3962
|
slide_to_confirm?: boolean;
|
|
3931
3963
|
layout?: ViewSignLayout;
|
|
3932
3964
|
title_id?: number;
|
|
3965
|
+
title_arg?: string;
|
|
3933
3966
|
};
|
|
3934
3967
|
export type ViewVerifyPage = {
|
|
3935
3968
|
title?: string;
|
|
@@ -4565,6 +4598,9 @@ export type MessageType = {
|
|
|
4565
4598
|
DeviceCertificateSignature: DeviceCertificateSignature;
|
|
4566
4599
|
DeviceCertificateSign: DeviceCertificateSign;
|
|
4567
4600
|
DeviceMiscUsbMscControl: DeviceMiscUsbMscControl;
|
|
4601
|
+
DeviceFindMyTokenUpdate: DeviceFindMyTokenUpdate;
|
|
4602
|
+
DeviceFindMyTokenStateGet: DeviceFindMyTokenStateGet;
|
|
4603
|
+
DeviceFindMyTokenState: DeviceFindMyTokenState;
|
|
4568
4604
|
DeviceFactoryInfoManufactureTime: DeviceFactoryInfoManufactureTime;
|
|
4569
4605
|
DeviceFactoryInfo: DeviceFactoryInfo;
|
|
4570
4606
|
DeviceFactoryInfoSet: DeviceFactoryInfoSet;
|
|
@@ -4574,6 +4610,7 @@ export type MessageType = {
|
|
|
4574
4610
|
DeviceFirmwareTarget: DeviceFirmwareTarget;
|
|
4575
4611
|
DeviceFirmwareUpdateStage: DeviceFirmwareUpdateStage;
|
|
4576
4612
|
DeviceFirmwareUpdateRequest: DeviceFirmwareUpdateRequest;
|
|
4613
|
+
DeviceFirmwareUpdatePhaseInfo: DeviceFirmwareUpdatePhaseInfo;
|
|
4577
4614
|
DeviceFirmwareUpdateRecord: DeviceFirmwareUpdateRecord;
|
|
4578
4615
|
DeviceFirmwareUpdateRecordFields: DeviceFirmwareUpdateRecordFields;
|
|
4579
4616
|
DeviceFirmwareUpdateStatusGet: DeviceFirmwareUpdateStatusGet;
|