@onekeyfe/hd-transport 1.2.0-alpha.67 → 1.2.0-alpha.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/messages.test.js +44 -0
- package/__tests__/protocol-v2.test.js +31 -1
- package/dist/index.d.ts +27 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +27 -12
- package/dist/protocols/v2/session.d.ts +4 -1
- package/dist/protocols/v2/session.d.ts.map +1 -1
- package/dist/serialization/protobuf/encode.d.ts.map +1 -1
- package/dist/types/messages.d.ts +10 -0
- package/dist/types/messages.d.ts.map +1 -1
- package/dist/types/transport.d.ts +6 -0
- package/dist/types/transport.d.ts.map +1 -1
- package/messages-protocol-v2.json +25 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
- package/src/protocols/v2/session.ts +16 -1
- package/src/serialization/protobuf/encode.ts +5 -1
- package/src/types/messages.ts +13 -0
- package/src/types/transport.ts +9 -0
|
@@ -3,6 +3,7 @@ const {
|
|
|
3
3
|
createMessageFromType,
|
|
4
4
|
parseConfigure,
|
|
5
5
|
} = require('../src/serialization/protobuf/messages');
|
|
6
|
+
const { encode } = require('../src/serialization/protobuf/encode');
|
|
6
7
|
const v1Messages = require('../../core/src/data/messages/messages.json');
|
|
7
8
|
const v2Messages = require('../messages-protocol-v2.json');
|
|
8
9
|
const coreV2Messages = require('../../core/src/data/messages/messages-protocol-v2.json');
|
|
@@ -121,6 +122,19 @@ describe('messages', () => {
|
|
|
121
122
|
id: 1,
|
|
122
123
|
type: 'bytes',
|
|
123
124
|
});
|
|
125
|
+
expect(v2Messages.nested.DeviceSessionGet.fields).toEqual({
|
|
126
|
+
session_id: { id: 1, type: 'bytes' },
|
|
127
|
+
btc_test_address: { id: 2, type: 'string' },
|
|
128
|
+
seed_domains: {
|
|
129
|
+
id: 3,
|
|
130
|
+
rule: 'repeated',
|
|
131
|
+
type: 'DeviceSessionSeedDomain',
|
|
132
|
+
},
|
|
133
|
+
});
|
|
134
|
+
expect(v2Messages.nested.DeviceSessionSeedDomain.values).toEqual({
|
|
135
|
+
SeedDomain_Standard: 1,
|
|
136
|
+
SeedDomain_Cardano: 2,
|
|
137
|
+
});
|
|
124
138
|
expect(v2Messages.nested.DeviceSessionPinType.values).toEqual({
|
|
125
139
|
Any: 1,
|
|
126
140
|
Main: 2,
|
|
@@ -173,11 +187,13 @@ describe('messages', () => {
|
|
|
173
187
|
const messages = parseConfigure(v2Messages);
|
|
174
188
|
const { Message } = createMessageFromName(messages, 'DeviceSessionAskPassphrase');
|
|
175
189
|
|
|
190
|
+
const standardWallet = encode(Message, { passphrase: '', on_device: false });
|
|
176
191
|
const onHost = Message.encode(
|
|
177
192
|
Message.create({ passphrase: 'host hidden wallet', on_device: false })
|
|
178
193
|
).finish();
|
|
179
194
|
const onDevice = Message.encode(Message.create({ on_device: true })).finish();
|
|
180
195
|
|
|
196
|
+
expect(standardWallet.toString('hex')).toBe('0a001000');
|
|
181
197
|
expect(Buffer.from(onHost).toString('hex')).toBe(
|
|
182
198
|
'0a12686f73742068696464656e2077616c6c65741000'
|
|
183
199
|
);
|
|
@@ -189,6 +205,27 @@ describe('messages', () => {
|
|
|
189
205
|
expect(Message.decode(onDevice)).toMatchObject({ on_device: true });
|
|
190
206
|
});
|
|
191
207
|
|
|
208
|
+
test('Protocol V2 wallet recovery carries the expected wallet and seed domains on wire', () => {
|
|
209
|
+
const messages = parseConfigure(v2Messages);
|
|
210
|
+
const { Message } = createMessageFromName(messages, 'DeviceSessionGet');
|
|
211
|
+
const payload = encode(Message, {
|
|
212
|
+
btc_test_address: 'tb1qwallet',
|
|
213
|
+
seed_domains: [
|
|
214
|
+
generatedTypes.DeviceSessionSeedDomain.SeedDomain_Standard,
|
|
215
|
+
generatedTypes.DeviceSessionSeedDomain.SeedDomain_Cardano,
|
|
216
|
+
],
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
expect(payload.toString('hex')).toBe('120a7462317177616c6c65741a020102');
|
|
220
|
+
expect(Message.decode(payload.toBuffer())).toMatchObject({
|
|
221
|
+
btc_test_address: 'tb1qwallet',
|
|
222
|
+
seed_domains: [
|
|
223
|
+
generatedTypes.DeviceSessionSeedDomain.SeedDomain_Standard,
|
|
224
|
+
generatedTypes.DeviceSessionSeedDomain.SeedDomain_Cardano,
|
|
225
|
+
],
|
|
226
|
+
});
|
|
227
|
+
});
|
|
228
|
+
|
|
192
229
|
test('Protocol V2 onboarding status matches the current firmware-pro2 schema', () => {
|
|
193
230
|
expect(v2Messages.nested.MessageType.values).toMatchObject({
|
|
194
231
|
MessageType_OnboardingStatusGet: 61600,
|
|
@@ -219,6 +256,13 @@ describe('messages', () => {
|
|
|
219
256
|
expect(v2Messages.nested).not.toHaveProperty('DevOnboardingStatus');
|
|
220
257
|
});
|
|
221
258
|
|
|
259
|
+
test('Protocol V2 NFT update matches the current firmware-pro2 schema', () => {
|
|
260
|
+
expect(v2Messages.nested.MessageType.values.MessageType_NftUpdate).toBe(61500);
|
|
261
|
+
expect(v2Messages.nested.NftUpdate.fields).toEqual({
|
|
262
|
+
file_name_no_ext: { id: 1, type: 'string', rule: 'required' },
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
|
|
222
266
|
test('Protocol V2 does not restore retired unlock or passphrase ids', () => {
|
|
223
267
|
expect(v2Messages.nested.MessageType.values).not.toHaveProperty('MessageType_UnLockDevice');
|
|
224
268
|
expect(v2Messages.nested.MessageType.values).not.toHaveProperty(
|
|
@@ -741,6 +741,34 @@ describe('Protocol V2 framing and session', () => {
|
|
|
741
741
|
expect(logger.debug).not.toHaveBeenCalled();
|
|
742
742
|
});
|
|
743
743
|
|
|
744
|
+
test('session reports when the complete request frame has been written', async () => {
|
|
745
|
+
const response = ProtocolV2.encodeFrame(schemas, 'Success', {
|
|
746
|
+
message: 'ok',
|
|
747
|
+
});
|
|
748
|
+
const events = [];
|
|
749
|
+
const onWriteCompleted = jest.fn(metrics => events.push(['written', metrics]));
|
|
750
|
+
const session = new ProtocolV2Session({
|
|
751
|
+
schemas,
|
|
752
|
+
router: 1,
|
|
753
|
+
writeFrame: frame => {
|
|
754
|
+
events.push(['write', frame.byteLength]);
|
|
755
|
+
return Promise.resolve();
|
|
756
|
+
},
|
|
757
|
+
readFrame: () => {
|
|
758
|
+
events.push(['read']);
|
|
759
|
+
return Promise.resolve(rewriteSeq(response, 1));
|
|
760
|
+
},
|
|
761
|
+
});
|
|
762
|
+
|
|
763
|
+
await session.call('Ping', { message: 'metrics' }, { onWriteCompleted });
|
|
764
|
+
|
|
765
|
+
expect(events.map(event => event[0])).toEqual(['write', 'written', 'read']);
|
|
766
|
+
expect(onWriteCompleted).toHaveBeenCalledWith({
|
|
767
|
+
elapsedMs: expect.any(Number),
|
|
768
|
+
frameBytes: expect.any(Number),
|
|
769
|
+
});
|
|
770
|
+
});
|
|
771
|
+
|
|
744
772
|
test('session skips unrelated terminal frames when expected response types are provided', async () => {
|
|
745
773
|
const stale = ProtocolV2.encodeFrame(schemas, 'Success', {
|
|
746
774
|
message: 'stale response',
|
|
@@ -1057,7 +1085,7 @@ describe('Protocol V2 framing and session', () => {
|
|
|
1057
1085
|
});
|
|
1058
1086
|
|
|
1059
1087
|
await session.call('Ping', { message: 'ping' }, { timeoutMs: 123 });
|
|
1060
|
-
await session.call('FileWrite', {}, { timeoutMs: 456 });
|
|
1088
|
+
await session.call('FileWrite', {}, { timeoutMs: 456, writeWithResponse: true });
|
|
1061
1089
|
await session.call('Ping', { message: 'default-timeout' });
|
|
1062
1090
|
|
|
1063
1091
|
const normalizeContext = ({ signal, ...context }) => ({
|
|
@@ -1076,6 +1104,7 @@ describe('Protocol V2 framing and session', () => {
|
|
|
1076
1104
|
messageName: 'FileWrite',
|
|
1077
1105
|
timeoutMs: 456,
|
|
1078
1106
|
highVolume: true,
|
|
1107
|
+
writeWithResponse: true,
|
|
1079
1108
|
generation: 7,
|
|
1080
1109
|
signalAborted: false,
|
|
1081
1110
|
},
|
|
@@ -1099,6 +1128,7 @@ describe('Protocol V2 framing and session', () => {
|
|
|
1099
1128
|
messageName: 'FileWrite',
|
|
1100
1129
|
timeoutMs: 456,
|
|
1101
1130
|
highVolume: true,
|
|
1131
|
+
writeWithResponse: true,
|
|
1102
1132
|
generation: 7,
|
|
1103
1133
|
signalAborted: false,
|
|
1104
1134
|
},
|
package/dist/index.d.ts
CHANGED
|
@@ -314,11 +314,19 @@ type MessageFromOneKey = {
|
|
|
314
314
|
type: string;
|
|
315
315
|
message: Record<string, any>;
|
|
316
316
|
};
|
|
317
|
+
type TransportWriteMetrics = {
|
|
318
|
+
elapsedMs: number;
|
|
319
|
+
frameBytes: number;
|
|
320
|
+
};
|
|
317
321
|
type TransportCallOptions = {
|
|
318
322
|
timeoutMs?: number;
|
|
319
323
|
expectedTypes?: string[];
|
|
320
324
|
intermediateTypes?: string[];
|
|
321
325
|
onIntermediateResponse?: (response: MessageFromOneKey) => void;
|
|
326
|
+
/** Called after the complete request frame has been submitted to the transport. */
|
|
327
|
+
onWriteCompleted?: (metrics: TransportWriteMetrics) => void;
|
|
328
|
+
/** Prefer acknowledged BLE characteristic writes for this call when supported. */
|
|
329
|
+
writeWithResponse?: boolean;
|
|
322
330
|
};
|
|
323
331
|
type ITransportInitFn = (logger?: any, emitter?: EventEmitter, plugin?: LowlevelTransportSharedPlugin) => Promise<string>;
|
|
324
332
|
type Transport = {
|
|
@@ -4091,8 +4099,14 @@ declare enum DeviceSessionErrorCode {
|
|
|
4091
4099
|
DeviceSessionError_PassphraseDisabled = 4,
|
|
4092
4100
|
DeviceSessionError_Busy = 5
|
|
4093
4101
|
}
|
|
4102
|
+
declare enum DeviceSessionSeedDomain {
|
|
4103
|
+
SeedDomain_Standard = 1,
|
|
4104
|
+
SeedDomain_Cardano = 2
|
|
4105
|
+
}
|
|
4094
4106
|
type DeviceSessionGet = {
|
|
4095
4107
|
session_id?: string;
|
|
4108
|
+
btc_test_address?: string;
|
|
4109
|
+
seed_domains: DeviceSessionSeedDomain[];
|
|
4096
4110
|
};
|
|
4097
4111
|
type DeviceSession = {
|
|
4098
4112
|
session_id?: string;
|
|
@@ -4189,6 +4203,9 @@ type InternalMyAddressRequest = {
|
|
|
4189
4203
|
account_index: number;
|
|
4190
4204
|
derive_type: number;
|
|
4191
4205
|
};
|
|
4206
|
+
type NftUpdate = {
|
|
4207
|
+
file_name_no_ext: string;
|
|
4208
|
+
};
|
|
4192
4209
|
declare enum OnboardingStep {
|
|
4193
4210
|
ONBOARDING_STEP_UNKNOWN = 0,
|
|
4194
4211
|
ONBOARDING_STEP_CHECKING = 1,
|
|
@@ -4950,6 +4967,7 @@ type MessageType = {
|
|
|
4950
4967
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
4951
4968
|
FilesystemFormat: FilesystemFormat;
|
|
4952
4969
|
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
4970
|
+
NftUpdate: NftUpdate;
|
|
4953
4971
|
OnboardingSetupStatus: OnboardingSetupStatus;
|
|
4954
4972
|
OnboardingStatusGet: OnboardingStatusGet;
|
|
4955
4973
|
OnboardingStatus: OnboardingStatus;
|
|
@@ -5759,6 +5777,8 @@ type messages_DeviceInfoGet = DeviceInfoGet;
|
|
|
5759
5777
|
type messages_ProtocolV2DeviceInfo = ProtocolV2DeviceInfo;
|
|
5760
5778
|
type messages_DeviceSessionErrorCode = DeviceSessionErrorCode;
|
|
5761
5779
|
declare const messages_DeviceSessionErrorCode: typeof DeviceSessionErrorCode;
|
|
5780
|
+
type messages_DeviceSessionSeedDomain = DeviceSessionSeedDomain;
|
|
5781
|
+
declare const messages_DeviceSessionSeedDomain: typeof DeviceSessionSeedDomain;
|
|
5762
5782
|
type messages_DeviceSessionGet = DeviceSessionGet;
|
|
5763
5783
|
type messages_DeviceSession = DeviceSession;
|
|
5764
5784
|
type messages_DeviceSessionPinType = DeviceSessionPinType;
|
|
@@ -5782,6 +5802,7 @@ type messages_FilesystemDirMake = FilesystemDirMake;
|
|
|
5782
5802
|
type messages_FilesystemDirRemove = FilesystemDirRemove;
|
|
5783
5803
|
type messages_FilesystemFormat = FilesystemFormat;
|
|
5784
5804
|
type messages_InternalMyAddressRequest = InternalMyAddressRequest;
|
|
5805
|
+
type messages_NftUpdate = NftUpdate;
|
|
5785
5806
|
type messages_OnboardingStep = OnboardingStep;
|
|
5786
5807
|
declare const messages_OnboardingStep: typeof OnboardingStep;
|
|
5787
5808
|
type messages_OnboardingPhase = OnboardingPhase;
|
|
@@ -6525,6 +6546,7 @@ declare namespace messages {
|
|
|
6525
6546
|
messages_DeviceInfoGet as DeviceInfoGet,
|
|
6526
6547
|
messages_ProtocolV2DeviceInfo as ProtocolV2DeviceInfo,
|
|
6527
6548
|
messages_DeviceSessionErrorCode as DeviceSessionErrorCode,
|
|
6549
|
+
messages_DeviceSessionSeedDomain as DeviceSessionSeedDomain,
|
|
6528
6550
|
messages_DeviceSessionGet as DeviceSessionGet,
|
|
6529
6551
|
messages_DeviceSession as DeviceSession,
|
|
6530
6552
|
messages_DeviceSessionPinType as DeviceSessionPinType,
|
|
@@ -6546,6 +6568,7 @@ declare namespace messages {
|
|
|
6546
6568
|
messages_FilesystemDirRemove as FilesystemDirRemove,
|
|
6547
6569
|
messages_FilesystemFormat as FilesystemFormat,
|
|
6548
6570
|
messages_InternalMyAddressRequest as InternalMyAddressRequest,
|
|
6571
|
+
messages_NftUpdate as NftUpdate,
|
|
6549
6572
|
messages_OnboardingStep as OnboardingStep,
|
|
6550
6573
|
messages_OnboardingPhase as OnboardingPhase,
|
|
6551
6574
|
messages_OnboardingSetupKind as OnboardingSetupKind,
|
|
@@ -6586,6 +6609,7 @@ type ProtocolV2CallContext = {
|
|
|
6586
6609
|
messageName: string;
|
|
6587
6610
|
timeoutMs?: number;
|
|
6588
6611
|
highVolume: boolean;
|
|
6612
|
+
writeWithResponse?: boolean;
|
|
6589
6613
|
generation: number;
|
|
6590
6614
|
signal: AbortSignal;
|
|
6591
6615
|
};
|
|
@@ -6612,6 +6636,8 @@ type ProtocolV2CallOptions = {
|
|
|
6612
6636
|
expectedTypes?: string[];
|
|
6613
6637
|
intermediateTypes?: string[];
|
|
6614
6638
|
onIntermediateResponse?: (response: MessageFromOneKey) => void;
|
|
6639
|
+
onWriteCompleted?: (metrics: TransportWriteMetrics) => void;
|
|
6640
|
+
writeWithResponse?: boolean;
|
|
6615
6641
|
};
|
|
6616
6642
|
|
|
6617
6643
|
declare function hexToBytes(hex: string): Uint8Array;
|
|
@@ -6857,4 +6883,4 @@ declare const _default: {
|
|
|
6857
6883
|
withProtocolTimeout: typeof withProtocolTimeout;
|
|
6858
6884
|
};
|
|
6859
6885
|
|
|
6860
|
-
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, DeviceFirmwareUpdateStatus, DeviceFirmwareUpdateStatusGet, DeviceFirmwareUpdateTaskStatus, DeviceHardwareInfo, DeviceInfo, DeviceInfoGet, DeviceInfoSettings, DeviceInfoTargets, DeviceInfoTypes, DeviceMainMcuInfo, DeviceMiscUsbMscControl, DeviceReboot, DeviceRebootType, DeviceSEInfo, DeviceSEState, DeviceSeType, DeviceSession, DeviceSessionAskPassphrase, DeviceSessionAskPin, DeviceSessionAskPin_FailureSubCodes, DeviceSessionErrorCode, DeviceSessionGet, DeviceSessionPinType, 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, 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_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, 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, 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, createTransportCallLog, _default as default, experimental_field, experimental_message, facotry, getErrorMessage, getSafeTransportLogPayload, hexToBytes, isProtocolV2LinkError, probeProtocolV2, index as protocolV1, protocolV2Codec as protocolV2, shouldSuppressHighVolumeCallLog, withProtocolTimeout, writeProtocolV2BleFrame };
|
|
6886
|
+
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, 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_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, 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, createTransportCallLog, _default as default, experimental_field, experimental_message, facotry, getErrorMessage, getSafeTransportLogPayload, hexToBytes, isProtocolV2LinkError, probeProtocolV2, index as protocolV1, protocolV2Codec as protocolV2, shouldSuppressHighVolumeCallLog, withProtocolTimeout, writeProtocolV2BleFrame };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAKL,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAEL,wBAAwB,EACxB,iBAAiB,EACjB,UAAU,EAEV,eAAe,EACf,UAAU,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAKlD,YAAY,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,EACpB,6BAA6B,EAC7B,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,YAAY,EACZ,8BAA8B,GAC/B,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AACpD,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC;AAErC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,UAAU,MAAM,gBAAgB,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAElD,wBAsBE"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,QAAQ,MAAM,kBAAkB,CAAC;AAG7C,OAAO,EAKL,cAAc,EACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAC/E,OAAO,EAEL,wBAAwB,EACxB,iBAAiB,EACjB,UAAU,EAEV,eAAe,EACf,UAAU,EACV,eAAe,EACf,mBAAmB,EACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAKlD,YAAY,EACV,SAAS,EACT,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,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
|
@@ -200,7 +200,10 @@ function patch(Message, payload) {
|
|
|
200
200
|
}
|
|
201
201
|
if (field.repeated) {
|
|
202
202
|
const RefMessage = Message.lookupTypeOrEnum(field.type);
|
|
203
|
-
patched[key] =
|
|
203
|
+
patched[key] =
|
|
204
|
+
RefMessage instanceof protobuf.Enum
|
|
205
|
+
? value.map((v) => transform(field.type, v))
|
|
206
|
+
: value.map((v) => patch(RefMessage, v));
|
|
204
207
|
}
|
|
205
208
|
else if (typeof value === 'object' && value !== null) {
|
|
206
209
|
const RefMessage = Message.lookupType(field.type);
|
|
@@ -990,15 +993,11 @@ class ProtocolV2Session {
|
|
|
990
993
|
: PROTOCOL_V2_DEFAULT_RESPONSE_TIMEOUT_MS;
|
|
991
994
|
const abortController = new AbortController();
|
|
992
995
|
const shouldReduceDebug = shouldReduceProtocolV2Debug(name);
|
|
993
|
-
const baseCallContext = {
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
highVolume: shouldReduceDebug,
|
|
997
|
-
generation,
|
|
998
|
-
signal: abortController.signal,
|
|
999
|
-
};
|
|
996
|
+
const baseCallContext = Object.assign(Object.assign({ messageName: name, timeoutMs, highVolume: shouldReduceDebug }, (callOptions.writeWithResponse === undefined
|
|
997
|
+
? {}
|
|
998
|
+
: { writeWithResponse: callOptions.writeWithResponse })), { generation, signal: abortController.signal });
|
|
1000
999
|
const runCall = () => __awaiter(this, void 0, void 0, function* () {
|
|
1001
|
-
var _a, _b, _c, _d;
|
|
1000
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1002
1001
|
yield (prepareCall === null || prepareCall === void 0 ? void 0 : prepareCall(baseCallContext));
|
|
1003
1002
|
const protoSeq = this.sequenceCursor.next();
|
|
1004
1003
|
const frame = ProtocolV2.encodeFrame(schemas, name, data, {
|
|
@@ -1009,7 +1008,17 @@ class ProtocolV2Session {
|
|
|
1009
1008
|
if (maxFrameBytes !== undefined && frame.length > maxFrameBytes) {
|
|
1010
1009
|
throw new Error(`Protocol V2 frame too large for transport: ${frame.length} > ${maxFrameBytes}`);
|
|
1011
1010
|
}
|
|
1011
|
+
const writeStartedAt = Date.now();
|
|
1012
1012
|
yield writeFrame(frame, baseCallContext);
|
|
1013
|
+
try {
|
|
1014
|
+
(_a = callOptions.onWriteCompleted) === null || _a === void 0 ? void 0 : _a.call(callOptions, {
|
|
1015
|
+
elapsedMs: Math.max(Date.now() - writeStartedAt, 0),
|
|
1016
|
+
frameBytes: frame.byteLength,
|
|
1017
|
+
});
|
|
1018
|
+
}
|
|
1019
|
+
catch (error) {
|
|
1020
|
+
(_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)}`);
|
|
1021
|
+
}
|
|
1013
1022
|
while (!abortController.signal.aborted) {
|
|
1014
1023
|
const rxFrame = yield readFrame(baseCallContext);
|
|
1015
1024
|
if (abortController.signal.aborted)
|
|
@@ -1052,14 +1061,14 @@ class ProtocolV2Session {
|
|
|
1052
1061
|
}
|
|
1053
1062
|
this.lastResponseSequence = decoded.seq;
|
|
1054
1063
|
const response = call(decoded);
|
|
1055
|
-
if ((
|
|
1056
|
-
(
|
|
1064
|
+
if ((_c = callOptions.intermediateTypes) === null || _c === void 0 ? void 0 : _c.includes(response.type)) {
|
|
1065
|
+
(_d = callOptions.onIntermediateResponse) === null || _d === void 0 ? void 0 : _d.call(callOptions, response);
|
|
1057
1066
|
}
|
|
1058
1067
|
else if (isExpectedTerminalResponse(response, callOptions.expectedTypes)) {
|
|
1059
1068
|
return response;
|
|
1060
1069
|
}
|
|
1061
1070
|
else if (!shouldReduceDebug) {
|
|
1062
|
-
(
|
|
1071
|
+
(_e = logger === null || logger === void 0 ? void 0 : logger.debug) === null || _e === void 0 ? void 0 : _e.call(logger, `[${logPrefix}] skip unexpected response for ${name}: expected=${(_f = callOptions.expectedTypes) === null || _f === void 0 ? void 0 : _f.join('|')} got=${response.type}`);
|
|
1063
1072
|
}
|
|
1064
1073
|
}
|
|
1065
1074
|
}
|
|
@@ -1961,6 +1970,11 @@ exports.DeviceSessionErrorCode = void 0;
|
|
|
1961
1970
|
DeviceSessionErrorCode[DeviceSessionErrorCode["DeviceSessionError_PassphraseDisabled"] = 4] = "DeviceSessionError_PassphraseDisabled";
|
|
1962
1971
|
DeviceSessionErrorCode[DeviceSessionErrorCode["DeviceSessionError_Busy"] = 5] = "DeviceSessionError_Busy";
|
|
1963
1972
|
})(exports.DeviceSessionErrorCode || (exports.DeviceSessionErrorCode = {}));
|
|
1973
|
+
exports.DeviceSessionSeedDomain = void 0;
|
|
1974
|
+
(function (DeviceSessionSeedDomain) {
|
|
1975
|
+
DeviceSessionSeedDomain[DeviceSessionSeedDomain["SeedDomain_Standard"] = 1] = "SeedDomain_Standard";
|
|
1976
|
+
DeviceSessionSeedDomain[DeviceSessionSeedDomain["SeedDomain_Cardano"] = 2] = "SeedDomain_Cardano";
|
|
1977
|
+
})(exports.DeviceSessionSeedDomain || (exports.DeviceSessionSeedDomain = {}));
|
|
1964
1978
|
exports.DeviceSessionPinType = void 0;
|
|
1965
1979
|
(function (DeviceSessionPinType) {
|
|
1966
1980
|
DeviceSessionPinType[DeviceSessionPinType["Any"] = 1] = "Any";
|
|
@@ -2136,6 +2150,7 @@ var messages = /*#__PURE__*/Object.freeze({
|
|
|
2136
2150
|
get DeviceSeType () { return exports.DeviceSeType; },
|
|
2137
2151
|
get DeviceSEState () { return exports.DeviceSEState; },
|
|
2138
2152
|
get DeviceSessionErrorCode () { return exports.DeviceSessionErrorCode; },
|
|
2153
|
+
get DeviceSessionSeedDomain () { return exports.DeviceSessionSeedDomain; },
|
|
2139
2154
|
get DeviceSessionPinType () { return exports.DeviceSessionPinType; },
|
|
2140
2155
|
get DeviceSessionAskPin_FailureSubCodes () { return exports.DeviceSessionAskPin_FailureSubCodes; },
|
|
2141
2156
|
get OnboardingStep () { return exports.OnboardingStep; },
|
|
@@ -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 } from '../../types';
|
|
4
|
+
import type { MessageFromOneKey, TransportWriteMetrics } from '../../types';
|
|
5
5
|
export * from './errors';
|
|
6
6
|
export type ProtocolV2Schemas = {
|
|
7
7
|
protocolV1: Root;
|
|
@@ -11,6 +11,7 @@ export type ProtocolV2CallContext = {
|
|
|
11
11
|
messageName: string;
|
|
12
12
|
timeoutMs?: number;
|
|
13
13
|
highVolume: boolean;
|
|
14
|
+
writeWithResponse?: boolean;
|
|
14
15
|
generation: number;
|
|
15
16
|
signal: AbortSignal;
|
|
16
17
|
};
|
|
@@ -37,6 +38,8 @@ export type ProtocolV2CallOptions = {
|
|
|
37
38
|
expectedTypes?: string[];
|
|
38
39
|
intermediateTypes?: string[];
|
|
39
40
|
onIntermediateResponse?: (response: MessageFromOneKey) => void;
|
|
41
|
+
onWriteCompleted?: (metrics: TransportWriteMetrics) => void;
|
|
42
|
+
writeWithResponse?: boolean;
|
|
40
43
|
};
|
|
41
44
|
export { concatUint8Arrays, ProtocolV2FrameAssembler };
|
|
42
45
|
export { ProtocolV2SequenceCursor };
|
|
@@ -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;AAM7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../../src/protocols/v2/session.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/serialization/protobuf/encode.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"encode.d.ts","sourceRoot":"","sources":["../../../src/serialization/protobuf/encode.ts"],"names":[],"mappings":"AACA,OAAO,UAAU,MAAM,YAAY,CAAC;AAKpC,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAmB7C,wBAAgB,KAAK,CAAC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,OA+ChD;AAED,eAAO,MAAM,MAAM,YAAa,IAAI,QAAQ,OAAO,MAAM,EAAE,OAAO,CAAC,eASlE,CAAC"}
|
package/dist/types/messages.d.ts
CHANGED
|
@@ -3731,8 +3731,14 @@ export declare enum DeviceSessionErrorCode {
|
|
|
3731
3731
|
DeviceSessionError_PassphraseDisabled = 4,
|
|
3732
3732
|
DeviceSessionError_Busy = 5
|
|
3733
3733
|
}
|
|
3734
|
+
export declare enum DeviceSessionSeedDomain {
|
|
3735
|
+
SeedDomain_Standard = 1,
|
|
3736
|
+
SeedDomain_Cardano = 2
|
|
3737
|
+
}
|
|
3734
3738
|
export type DeviceSessionGet = {
|
|
3735
3739
|
session_id?: string;
|
|
3740
|
+
btc_test_address?: string;
|
|
3741
|
+
seed_domains: DeviceSessionSeedDomain[];
|
|
3736
3742
|
};
|
|
3737
3743
|
export type DeviceSession = {
|
|
3738
3744
|
session_id?: string;
|
|
@@ -3829,6 +3835,9 @@ export type InternalMyAddressRequest = {
|
|
|
3829
3835
|
account_index: number;
|
|
3830
3836
|
derive_type: number;
|
|
3831
3837
|
};
|
|
3838
|
+
export type NftUpdate = {
|
|
3839
|
+
file_name_no_ext: string;
|
|
3840
|
+
};
|
|
3832
3841
|
export declare enum OnboardingStep {
|
|
3833
3842
|
ONBOARDING_STEP_UNKNOWN = 0,
|
|
3834
3843
|
ONBOARDING_STEP_CHECKING = 1,
|
|
@@ -4590,6 +4599,7 @@ export type MessageType = {
|
|
|
4590
4599
|
FilesystemDirRemove: FilesystemDirRemove;
|
|
4591
4600
|
FilesystemFormat: FilesystemFormat;
|
|
4592
4601
|
InternalMyAddressRequest: InternalMyAddressRequest;
|
|
4602
|
+
NftUpdate: NftUpdate;
|
|
4593
4603
|
OnboardingSetupStatus: OnboardingSetupStatus;
|
|
4594
4604
|
OnboardingStatusGet: OnboardingStatusGet;
|
|
4595
4605
|
OnboardingStatus: OnboardingStatus;
|