@onekeyfe/hd-core 1.1.27-alpha.32 → 1.1.27-alpha.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/protocol-v2.test.ts +140 -45
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/GetDeviceInfo.d.ts +9 -0
- package/dist/api/GetDeviceInfo.d.ts.map +1 -0
- package/dist/api/GetFeatures.d.ts +1 -1
- package/dist/api/alephium/AlephiumGetAddress.d.ts +2 -6
- package/dist/api/alephium/AlephiumGetAddress.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignMessage.d.ts +2 -5
- package/dist/api/alephium/AlephiumSignMessage.d.ts.map +1 -1
- package/dist/api/alephium/AlephiumSignTransaction.d.ts +2 -5
- package/dist/api/alephium/AlephiumSignTransaction.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetAddress.d.ts +2 -9
- package/dist/api/benfen/BenfenGetAddress.d.ts.map +1 -1
- package/dist/api/benfen/BenfenGetPublicKey.d.ts +2 -9
- package/dist/api/benfen/BenfenGetPublicKey.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignMessage.d.ts +2 -8
- package/dist/api/benfen/BenfenSignMessage.d.ts.map +1 -1
- package/dist/api/benfen/BenfenSignTransaction.d.ts +2 -8
- package/dist/api/benfen/BenfenSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCGetAddress.d.ts +1 -11
- package/dist/api/btc/BTCGetAddress.d.ts.map +1 -1
- package/dist/api/btc/BTCGetPublicKey.d.ts +1 -11
- package/dist/api/btc/BTCGetPublicKey.d.ts.map +1 -1
- package/dist/api/btc/BTCSignMessage.d.ts +1 -15
- package/dist/api/btc/BTCSignMessage.d.ts.map +1 -1
- package/dist/api/btc/BTCSignTransaction.d.ts +1 -11
- package/dist/api/btc/BTCSignTransaction.d.ts.map +1 -1
- package/dist/api/btc/BTCVerifyMessage.d.ts +1 -11
- package/dist/api/btc/BTCVerifyMessage.d.ts.map +1 -1
- package/dist/api/btc/helpers/versionLimit.d.ts +2 -11
- package/dist/api/btc/helpers/versionLimit.d.ts.map +1 -1
- package/dist/api/evm/EVMSignMessageEIP712.d.ts +2 -8
- package/dist/api/evm/EVMSignMessageEIP712.d.ts.map +1 -1
- package/dist/api/evm/latest/signTypedData.d.ts +1 -1
- package/dist/api/evm/latest/signTypedData.d.ts.map +1 -1
- package/dist/api/evm/legacyV1/signTypedData.d.ts +1 -1
- package/dist/api/evm/legacyV1/signTypedData.d.ts.map +1 -1
- package/dist/api/helpers/batchGetPublickeys.d.ts.map +1 -1
- package/dist/api/helpers/deviceInfo.d.ts +15 -0
- package/dist/api/helpers/deviceInfo.d.ts.map +1 -0
- package/dist/api/index.d.ts +2 -0
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/neo/NeoGetAddress.d.ts +2 -8
- package/dist/api/neo/NeoGetAddress.d.ts.map +1 -1
- package/dist/api/neo/NeoSignTransaction.d.ts +2 -8
- package/dist/api/neo/NeoSignTransaction.d.ts.map +1 -1
- package/dist/api/nervos/NervosGetAddress.d.ts +2 -9
- package/dist/api/nervos/NervosGetAddress.d.ts.map +1 -1
- package/dist/api/nervos/NervosSignTransaction.d.ts +2 -9
- package/dist/api/nervos/NervosSignTransaction.d.ts.map +1 -1
- package/dist/api/nexa/NexaGetAddress.d.ts +2 -8
- package/dist/api/nexa/NexaGetAddress.d.ts.map +1 -1
- package/dist/api/nexa/NexaSignTransaction.d.ts +2 -9
- package/dist/api/nexa/NexaSignTransaction.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts +10 -0
- package/dist/api/protocol-v2/FilesystemDiskControl.d.ts.map +1 -0
- package/dist/api/scdo/ScdoGetAddress.d.ts +2 -6
- package/dist/api/scdo/ScdoGetAddress.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignMessage.d.ts +2 -5
- package/dist/api/scdo/ScdoSignMessage.d.ts.map +1 -1
- package/dist/api/scdo/ScdoSignTransaction.d.ts +2 -5
- package/dist/api/scdo/ScdoSignTransaction.d.ts.map +1 -1
- package/dist/api/stellar/StellarGetAddress.d.ts +2 -1
- package/dist/api/stellar/StellarGetAddress.d.ts.map +1 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts +2 -1
- package/dist/api/stellar/StellarSignTransaction.d.ts.map +1 -1
- package/dist/api/sui/SuiSignTransaction.d.ts +2 -2
- package/dist/api/sui/SuiSignTransaction.d.ts.map +1 -1
- package/dist/index.d.ts +94 -4
- package/dist/index.js +404 -58
- package/dist/inject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/features.d.ts +20 -3
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
- package/dist/types/api/getDeviceInfo.d.ts +84 -0
- package/dist/types/api/getDeviceInfo.d.ts.map +1 -0
- package/dist/types/api/index.d.ts +5 -1
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/protocolV2.d.ts +4 -0
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/device.d.ts +5 -1
- package/dist/types/device.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts +1 -1
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/patch.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/api/BaseMethod.ts +5 -10
- package/src/api/GetDeviceInfo.ts +153 -0
- package/src/api/alephium/AlephiumGetAddress.ts +6 -2
- package/src/api/alephium/AlephiumSignMessage.ts +6 -1
- package/src/api/alephium/AlephiumSignTransaction.ts +6 -2
- package/src/api/allnetwork/AllNetworkGetAddressBase.ts +13 -20
- package/src/api/benfen/BenfenGetAddress.ts +6 -2
- package/src/api/benfen/BenfenGetPublicKey.ts +6 -2
- package/src/api/benfen/BenfenSignMessage.ts +6 -1
- package/src/api/benfen/BenfenSignTransaction.ts +6 -1
- package/src/api/btc/helpers/versionLimit.ts +7 -1
- package/src/api/evm/EVMSignMessageEIP712.ts +14 -1
- package/src/api/helpers/batchGetPublickeys.ts +2 -4
- package/src/api/helpers/deviceInfo.ts +205 -0
- package/src/api/index.ts +2 -0
- package/src/api/neo/NeoGetAddress.ts +6 -1
- package/src/api/neo/NeoSignTransaction.ts +6 -1
- package/src/api/nervos/NervosGetAddress.ts +6 -2
- package/src/api/nervos/NervosSignTransaction.ts +6 -2
- package/src/api/nexa/NexaGetAddress.ts +6 -2
- package/src/api/nexa/NexaSignTransaction.ts +6 -2
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +17 -1
- package/src/api/protocol-v2/FilesystemDiskControl.ts +34 -0
- package/src/api/scdo/ScdoGetAddress.ts +6 -2
- package/src/api/scdo/ScdoSignMessage.ts +6 -1
- package/src/api/scdo/ScdoSignTransaction.ts +6 -2
- package/src/api/stellar/StellarGetAddress.ts +10 -1
- package/src/api/stellar/StellarSignTransaction.ts +14 -1
- package/src/api/sui/SuiSignTransaction.ts +12 -9
- package/src/core/index.ts +7 -7
- package/src/data/messages/messages-protocol-v2.json +10 -0
- package/src/inject.ts +3 -0
- package/src/protocols/protocol-v2/features.ts +35 -21
- package/src/types/api/getDeviceInfo.ts +97 -0
- package/src/types/api/index.ts +16 -0
- package/src/types/api/protocolV2.ts +5 -0
- package/src/types/device.ts +30 -1
- package/src/utils/deviceFeaturesUtils.ts +9 -2
- package/src/utils/deviceInfoUtils.ts +5 -7
- package/src/utils/index.ts +1 -1
|
@@ -10,18 +10,22 @@ import FileRead from '../src/api/FileRead';
|
|
|
10
10
|
import FileWrite from '../src/api/FileWrite';
|
|
11
11
|
import DeviceFirmwareUpdate from '../src/api/protocol-v2/DeviceFirmwareUpdate';
|
|
12
12
|
import DeviceGetOnboardingStatus from '../src/api/protocol-v2/DeviceGetOnboardingStatus';
|
|
13
|
+
import EVMSignMessageEIP712 from '../src/api/evm/EVMSignMessageEIP712';
|
|
13
14
|
import FirmwareUpdateV3 from '../src/api/FirmwareUpdateV3';
|
|
14
15
|
import FirmwareUpdateV4 from '../src/api/FirmwareUpdateV4';
|
|
15
16
|
import GetOnekeyFeatures from '../src/api/GetOnekeyFeatures';
|
|
16
17
|
import { batchGetPublickeys } from '../src/api/helpers/batchGetPublickeys';
|
|
17
|
-
import
|
|
18
|
+
import SuiSignTransaction from '../src/api/sui/SuiSignTransaction';
|
|
18
19
|
import TronSignMessage from '../src/api/tron/TronSignMessage';
|
|
19
20
|
import XrpSignTransaction from '../src/api/xrp/XrpSignTransaction';
|
|
21
|
+
import StellarGetAddress from '../src/api/stellar/StellarGetAddress';
|
|
22
|
+
import BenfenSignMessage from '../src/api/benfen/BenfenSignMessage';
|
|
23
|
+
import { getBitcoinForkVersionRange } from '../src/api/btc/helpers/versionLimit';
|
|
20
24
|
import { DataManager } from '../src/data-manager';
|
|
21
25
|
import { Device } from '../src/device/Device';
|
|
22
26
|
import { UI_REQUEST } from '../src/events/ui-request';
|
|
23
27
|
import { getProtocolV2Features, normalizeProtocolV2Features } from '../src/protocols/protocol-v2';
|
|
24
|
-
import {
|
|
28
|
+
import { getMethodVersionRange, isMethodVersionRangeUnsupported } from '../src/utils';
|
|
25
29
|
import {
|
|
26
30
|
getPassphraseState,
|
|
27
31
|
getPassphraseStateWithRefreshDeviceInfo,
|
|
@@ -42,6 +46,7 @@ const descriptor = {
|
|
|
42
46
|
describe('Protocol V2 feature adapter', () => {
|
|
43
47
|
test('normalizes Protocol V2 DeviceInfo into existing Features fields', () => {
|
|
44
48
|
const features = normalizeProtocolV2Features(descriptor as any, {
|
|
49
|
+
protocol_version: 1,
|
|
45
50
|
hw: {
|
|
46
51
|
serial_no: 'PR2SERIAL',
|
|
47
52
|
},
|
|
@@ -97,6 +102,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
97
102
|
expect(features.serial_no).toBe('PR2SERIAL');
|
|
98
103
|
expect(features.onekey_serial_no).toBe('PR2SERIAL');
|
|
99
104
|
expect(features.onekey_device_type).toBe('pro2');
|
|
105
|
+
expect(features.protocol_version).toBe(1);
|
|
100
106
|
expect(features.major_version).toBe(1);
|
|
101
107
|
expect(features.minor_version).toBe(2);
|
|
102
108
|
expect(features.patch_version).toBe(3);
|
|
@@ -240,16 +246,6 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
240
246
|
expect(features.firmware_present).toBe(false);
|
|
241
247
|
});
|
|
242
248
|
|
|
243
|
-
test('bypasses legacy method support checks for Protocol V2 fallback features', () => {
|
|
244
|
-
const features = normalizeProtocolV2Features({
|
|
245
|
-
...descriptor,
|
|
246
|
-
protocolType: 'V2',
|
|
247
|
-
} as any);
|
|
248
|
-
|
|
249
|
-
expect(shouldSkipMethodSupportCheck(features, 'V2')).toBe(true);
|
|
250
|
-
expect(shouldSkipMethodSupportCheck(features)).toBe(true);
|
|
251
|
-
});
|
|
252
|
-
|
|
253
249
|
test('initializes Protocol V2 features from DeviceGetDeviceInfo after Ping', async () => {
|
|
254
250
|
const commands = {
|
|
255
251
|
typedCall: jest
|
|
@@ -282,8 +278,7 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
282
278
|
});
|
|
283
279
|
});
|
|
284
280
|
|
|
285
|
-
test('
|
|
286
|
-
const onDeviceInfoError = jest.fn();
|
|
281
|
+
test('fails initialization when Protocol V2 DeviceGetDeviceInfo fails', async () => {
|
|
287
282
|
const commands = {
|
|
288
283
|
typedCall: jest
|
|
289
284
|
.fn()
|
|
@@ -291,48 +286,70 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
291
286
|
.mockRejectedValueOnce(new Error('DeviceInfo not supported')),
|
|
292
287
|
};
|
|
293
288
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
289
|
+
await expect(
|
|
290
|
+
getProtocolV2Features({
|
|
291
|
+
commands: commands as unknown as DeviceCommands,
|
|
292
|
+
descriptor: descriptor as any,
|
|
293
|
+
})
|
|
294
|
+
).rejects.toThrow('DeviceInfo not supported');
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
test('does not inherit Pro or Pro model fallback ranges for Protocol V2 devices', () => {
|
|
298
|
+
const features = normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any);
|
|
299
|
+
const checkedTypes: string[] = [];
|
|
300
|
+
|
|
301
|
+
const versionRange = getMethodVersionRange(features, type => {
|
|
302
|
+
checkedTypes.push(type);
|
|
303
|
+
if (type === 'pro' || type === 'model_touch') {
|
|
304
|
+
return { min: '4.10.0' };
|
|
305
|
+
}
|
|
306
|
+
return undefined;
|
|
298
307
|
});
|
|
299
308
|
|
|
300
|
-
expect(
|
|
301
|
-
expect(
|
|
302
|
-
expect(onDeviceInfoError).toHaveBeenCalledWith(expect.any(Error));
|
|
309
|
+
expect(versionRange).toBeUndefined();
|
|
310
|
+
expect(checkedTypes).toEqual(['pro2']);
|
|
303
311
|
});
|
|
304
312
|
|
|
305
|
-
test('
|
|
306
|
-
const
|
|
313
|
+
test('marks known unsupported public-chain methods as unsupported on Protocol V2', () => {
|
|
314
|
+
const features = normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any, {
|
|
315
|
+
fw: {
|
|
316
|
+
app: {
|
|
317
|
+
version: '9.9.9',
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
});
|
|
321
|
+
const stellar = new StellarGetAddress({
|
|
307
322
|
id: 1,
|
|
308
323
|
payload: {
|
|
309
|
-
method: '
|
|
310
|
-
path: "m/44'/
|
|
311
|
-
prefix: 'kaspa',
|
|
312
|
-
showOnOneKey: false,
|
|
313
|
-
useTweak: false,
|
|
324
|
+
method: 'stellarGetAddress',
|
|
325
|
+
path: "m/44'/148'/0'",
|
|
314
326
|
},
|
|
315
327
|
});
|
|
316
|
-
const
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
328
|
+
const benfen = new BenfenSignMessage({
|
|
329
|
+
id: 1,
|
|
330
|
+
payload: {
|
|
331
|
+
method: 'benfenSignMessage',
|
|
332
|
+
path: "m/44'/728'/0'/0'/0'",
|
|
333
|
+
messageHex: '0x1234',
|
|
320
334
|
},
|
|
321
335
|
});
|
|
322
336
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
(method as any).device = {
|
|
326
|
-
originalDescriptor: { protocolType: 'V2' },
|
|
327
|
-
features: normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any),
|
|
328
|
-
commands: { typedCall },
|
|
329
|
-
toMessageObject: jest.fn(() => ({})),
|
|
330
|
-
};
|
|
337
|
+
stellar.init();
|
|
338
|
+
benfen.init();
|
|
331
339
|
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
340
|
+
const stellarRange = getMethodVersionRange(
|
|
341
|
+
features,
|
|
342
|
+
type => stellar.getVersionRange()[type]
|
|
343
|
+
);
|
|
344
|
+
const benfenRange = getMethodVersionRange(features, type => benfen.getVersionRange()[type]);
|
|
345
|
+
const neuraiRange = getMethodVersionRange(
|
|
346
|
+
features,
|
|
347
|
+
type => getBitcoinForkVersionRange(['Neurai'])[type]
|
|
348
|
+
);
|
|
349
|
+
|
|
350
|
+
expect(isMethodVersionRangeUnsupported(stellarRange)).toBe(true);
|
|
351
|
+
expect(isMethodVersionRangeUnsupported(benfenRange)).toBe(true);
|
|
352
|
+
expect(isMethodVersionRangeUnsupported(neuraiRange)).toBe(true);
|
|
336
353
|
});
|
|
337
354
|
|
|
338
355
|
test('does not block legacy batch public key support checks on Protocol V2', async () => {
|
|
@@ -347,7 +364,13 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
347
364
|
});
|
|
348
365
|
const device = {
|
|
349
366
|
originalDescriptor: { protocolType: 'V2' },
|
|
350
|
-
features: normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any
|
|
367
|
+
features: normalizeProtocolV2Features({ ...descriptor, protocolType: 'V2' } as any, {
|
|
368
|
+
fw: {
|
|
369
|
+
app: {
|
|
370
|
+
version: '4.14.0',
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
}),
|
|
351
374
|
commands: { typedCall },
|
|
352
375
|
};
|
|
353
376
|
|
|
@@ -450,6 +473,34 @@ describe('Protocol V2 feature adapter', () => {
|
|
|
450
473
|
});
|
|
451
474
|
|
|
452
475
|
describe('API compatibility handling', () => {
|
|
476
|
+
test('returns a typed unsupported error for deprecated EIP712 message signing on Protocol V2', async () => {
|
|
477
|
+
const method = new EVMSignMessageEIP712({
|
|
478
|
+
id: 1,
|
|
479
|
+
payload: {
|
|
480
|
+
method: 'evmSignMessageEIP712',
|
|
481
|
+
path: "m/44'/60'/0'/0/0",
|
|
482
|
+
domainHash: '0x'.concat('11'.repeat(32)),
|
|
483
|
+
messageHash: '0x'.concat('22'.repeat(32)),
|
|
484
|
+
},
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
method.init();
|
|
488
|
+
(method as any).device = {
|
|
489
|
+
features: {
|
|
490
|
+
onekey_device_type: 'pro2',
|
|
491
|
+
},
|
|
492
|
+
originalDescriptor: {
|
|
493
|
+
protocolType: 'V2',
|
|
494
|
+
},
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
await expect(method.run()).rejects.toEqual(
|
|
498
|
+
expect.objectContaining({
|
|
499
|
+
errorCode: HardwareErrorCode.DeviceNotSupportMethod,
|
|
500
|
+
})
|
|
501
|
+
);
|
|
502
|
+
});
|
|
503
|
+
|
|
453
504
|
test('returns a typed unsupported error for Tron sign message V1 before device binding', () => {
|
|
454
505
|
const method = new TronSignMessage({
|
|
455
506
|
id: 1,
|
|
@@ -468,6 +519,50 @@ describe('API compatibility handling', () => {
|
|
|
468
519
|
);
|
|
469
520
|
});
|
|
470
521
|
|
|
522
|
+
test('uses chunk transfer for large Sui transactions on Protocol V2', async () => {
|
|
523
|
+
const rawTx = '0x'.concat('ab'.repeat(5000));
|
|
524
|
+
const typedCall = jest.fn(async () => ({
|
|
525
|
+
type: 'SuiSignedTx',
|
|
526
|
+
message: {
|
|
527
|
+
public_key: '',
|
|
528
|
+
signature: '',
|
|
529
|
+
},
|
|
530
|
+
}));
|
|
531
|
+
const method = new SuiSignTransaction({
|
|
532
|
+
id: 1,
|
|
533
|
+
payload: {
|
|
534
|
+
method: 'suiSignTransaction',
|
|
535
|
+
path: "m/44'/784'/0'/0'/0'",
|
|
536
|
+
rawTx,
|
|
537
|
+
},
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
method.init();
|
|
541
|
+
(method as any).device = {
|
|
542
|
+
features: {
|
|
543
|
+
onekey_device_type: 'pro2',
|
|
544
|
+
},
|
|
545
|
+
originalDescriptor: {
|
|
546
|
+
protocolType: 'V2',
|
|
547
|
+
},
|
|
548
|
+
getCommands: () => ({
|
|
549
|
+
typedCall,
|
|
550
|
+
}),
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
await method.run();
|
|
554
|
+
|
|
555
|
+
expect(typedCall).toHaveBeenCalledTimes(1);
|
|
556
|
+
const [, , params] = typedCall.mock.calls[0];
|
|
557
|
+
expect(params).toEqual(
|
|
558
|
+
expect.objectContaining({
|
|
559
|
+
raw_tx: '',
|
|
560
|
+
data_length: 5000,
|
|
561
|
+
})
|
|
562
|
+
);
|
|
563
|
+
expect(params.data_initial_chunk).toHaveLength(2048);
|
|
564
|
+
});
|
|
565
|
+
|
|
471
566
|
test('accepts string XRP payment amount values', () => {
|
|
472
567
|
const method = new XrpSignTransaction({
|
|
473
568
|
id: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseMethod.d.ts","sourceRoot":"","sources":["../../src/api/BaseMethod.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,eAAe,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,8BAAsB,UAAU,CAAC,MAAM,GAAG,SAAS;IACjD,UAAU,EAAE,MAAM,CAAC;IAGnB,MAAM,EAAE,MAAM,CAAC;IAGf,MAAM,EAAE,MAAM,CAAC;IAOf,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,IAAI,EAAE,MAAM,CAAC;IAEb,UAAU,EAAG,MAAM,CAAC;IAEpB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,cAAc,CAAC,EAAE,cAAc,CAAC;IAKhC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE7B,SAAS,CAAC,EAAE,eAAe,CAAC;IAK5B,SAAS,EAAE,OAAO,CAAC;IAMnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAK1B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAK5B,qBAAqB,UAAQ;IAK7B,aAAa,UAAS;IAKtB,wBAAwB,UAAQ;IAMhC,oBAAoB,UAAS;IAO7B,wBAAwB,UAAS;IAGjC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAE5C,OAAO,CAAC,EAAE,WAAW,CAAC;gBAEV,OAAO,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,GAAG,CAAA;KAAE;IAYlD,QAAQ,CAAC,IAAI,IAAI,IAAI;IAErB,QAAQ,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAE5B,eAAe,IAAI,mBAAmB;IAItC,UAAU,CAAC,OAAO,EAAE,WAAW;IAQ/B,SAAS,CAAC,MAAM,EAAE,MAAM;IA2BxB,oBAAoB;IAmBpB,yBAAyB;IAczB,SAAS,CAAC,wBAAwB,CAChC,cAAc,EAAE,MAAM,OAAO,EAC7B,eAAe,EAAE,MAAM,mBAAmB,EAC1C,OAAO,CAAC,EAAE;QACR,wBAAwB,CAAC,EAAE,OAAO,CAAC;KACpC;
|
|
1
|
+
{"version":3,"file":"BaseMethod.d.ts","sourceRoot":"","sources":["../../src/api/BaseMethod.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,KAAK,eAAe,MAAM,2BAA2B,CAAC;AAC7D,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,UAAU,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,8BAAsB,UAAU,CAAC,MAAM,GAAG,SAAS;IACjD,UAAU,EAAE,MAAM,CAAC;IAGnB,MAAM,EAAE,MAAM,CAAC;IAGf,MAAM,EAAE,MAAM,CAAC;IAOf,SAAS,CAAC,EAAE,MAAM,CAAC;IAKnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,WAAW,CAAC,EAAE,MAAM,CAAC;IAKrB,IAAI,EAAE,MAAM,CAAC;IAEb,UAAU,EAAG,MAAM,CAAC;IAEpB,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,cAAc,CAAC,EAAE,cAAc,CAAC;IAKhC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE7B,SAAS,CAAC,EAAE,eAAe,CAAC;IAK5B,SAAS,EAAE,OAAO,CAAC;IAMnB,eAAe,EAAE,MAAM,EAAE,CAAC;IAK1B,iBAAiB,EAAE,MAAM,EAAE,CAAC;IAK5B,qBAAqB,UAAQ;IAK7B,aAAa,UAAS;IAKtB,wBAAwB,UAAQ;IAMhC,oBAAoB,UAAS;IAO7B,wBAAwB,UAAS;IAGjC,WAAW,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;IAE5C,OAAO,CAAC,EAAE,WAAW,CAAC;gBAEV,OAAO,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,GAAG,CAAA;KAAE;IAYlD,QAAQ,CAAC,IAAI,IAAI,IAAI;IAErB,QAAQ,CAAC,GAAG,IAAI,OAAO,CAAC,GAAG,CAAC;IAE5B,eAAe,IAAI,mBAAmB;IAItC,UAAU,CAAC,OAAO,EAAE,WAAW;IAQ/B,SAAS,CAAC,MAAM,EAAE,MAAM;IA2BxB,oBAAoB;IAmBpB,yBAAyB;IAczB,SAAS,CAAC,wBAAwB,CAChC,cAAc,EAAE,MAAM,OAAO,EAC7B,eAAe,EAAE,MAAM,mBAAmB,EAC1C,OAAO,CAAC,EAAE;QACR,wBAAwB,CAAC,EAAE,OAAO,CAAC;KACpC;IAsCG,yBAAyB;IAiB/B,OAAO;IAGP,0BAA0B,SAAU;QAAE,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,UAOrE;CACH"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BaseMethod } from './BaseMethod';
|
|
2
|
+
import type { GetDeviceInfoParams } from '../types/api/getDeviceInfo';
|
|
3
|
+
export default class GetDeviceInfo extends BaseMethod<GetDeviceInfoParams> {
|
|
4
|
+
init(): void;
|
|
5
|
+
run(): Promise<import("../types").UnifiedDeviceInfo>;
|
|
6
|
+
private runProtocolV2;
|
|
7
|
+
private runProtocolV1;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=GetDeviceInfo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GetDeviceInfo.d.ts","sourceRoot":"","sources":["../../src/api/GetDeviceInfo.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,OAAO,KAAK,EAGV,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AA0DpC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU,CAAC,mBAAmB,CAAC;IACxE,IAAI;IAeE,GAAG;YAOK,aAAa;YA2Bb,aAAa;CA2B5B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseMethod } from './BaseMethod';
|
|
2
2
|
export default class GetFeatures extends BaseMethod {
|
|
3
3
|
init(): void;
|
|
4
|
-
run(): Promise<import("
|
|
4
|
+
run(): Promise<import("..").Features | undefined>;
|
|
5
5
|
}
|
|
6
6
|
//# sourceMappingURL=GetFeatures.d.ts.map
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { BaseMethod } from '../BaseMethod';
|
|
2
2
|
import type { AlephiumGetAddress as HardwareAlephiumGetAddress } from '@onekeyfe/hd-transport';
|
|
3
|
-
import type { AlephiumAddress } from '../../types';
|
|
3
|
+
import type { AlephiumAddress, DeviceFirmwareRange } from '../../types';
|
|
4
4
|
export default class AlephiumGetAddress extends BaseMethod<HardwareAlephiumGetAddress[]> {
|
|
5
5
|
hasBundle: boolean;
|
|
6
6
|
init(): void;
|
|
7
|
-
getVersionRange():
|
|
8
|
-
model_touch: {
|
|
9
|
-
min: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
7
|
+
getVersionRange(): DeviceFirmwareRange;
|
|
12
8
|
run(): Promise<AlephiumAddress | AlephiumAddress[]>;
|
|
13
9
|
}
|
|
14
10
|
//# sourceMappingURL=AlephiumGetAddress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlephiumGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/alephium/AlephiumGetAddress.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,EAAE,kBAAkB,IAAI,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAA4B,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"AlephiumGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/alephium/AlephiumGetAddress.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,EAAE,kBAAkB,IAAI,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAC/F,OAAO,KAAK,EAAE,eAAe,EAA4B,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElG,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,0BAA0B,EAAE,CAAC;IACtF,SAAS,UAAS;IAElB,IAAI;IAkCJ,eAAe,IAAI,mBAAmB;IAYhC,GAAG;CA8BV"}
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { BaseMethod } from '../BaseMethod';
|
|
2
2
|
import type { AlephiumSignMessage as HardwareAlephiumSignMessage } from '@onekeyfe/hd-transport';
|
|
3
|
+
import type { DeviceFirmwareRange } from '../../types';
|
|
3
4
|
export default class AlephiumSignMessage extends BaseMethod<HardwareAlephiumSignMessage> {
|
|
4
5
|
init(): void;
|
|
5
|
-
getVersionRange():
|
|
6
|
-
model_touch: {
|
|
7
|
-
min: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
6
|
+
getVersionRange(): DeviceFirmwareRange;
|
|
10
7
|
run(): Promise<import("@onekeyfe/hd-transport").AlephiumMessageSignature>;
|
|
11
8
|
}
|
|
12
9
|
//# sourceMappingURL=AlephiumSignMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlephiumSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/alephium/AlephiumSignMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,KAAK,EAAE,mBAAmB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AlephiumSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/alephium/AlephiumSignMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,KAAK,EAAE,mBAAmB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AACjG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,UAAU,CAAC,2BAA2B,CAAC;IACtF,IAAI;IAsBJ,eAAe,IAAI,mBAAmB;IAYhC,GAAG;CAWV"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { BaseMethod } from '../BaseMethod';
|
|
3
3
|
import type { AlephiumSignedTx, AlephiumSignTx as HardwareAlephiumSignTx, TypedCall } from '@onekeyfe/hd-transport';
|
|
4
|
+
import type { DeviceFirmwareRange } from '../../types';
|
|
4
5
|
import type { TypedResponseMessage } from '../../device/DeviceCommands';
|
|
5
6
|
export default class AlephiumSignTransaction extends BaseMethod<HardwareAlephiumSignTx> {
|
|
6
7
|
init(): void;
|
|
7
|
-
getVersionRange():
|
|
8
|
-
model_touch: {
|
|
9
|
-
min: string;
|
|
10
|
-
};
|
|
11
|
-
};
|
|
8
|
+
getVersionRange(): DeviceFirmwareRange;
|
|
12
9
|
chunkByteSize: number;
|
|
13
10
|
processTxRequest: (typedCall: TypedCall, res: TypedResponseMessage<'AlephiumSignedTx'> | TypedResponseMessage<'AlephiumTxRequest'> | TypedResponseMessage<'AlephiumBytecodeRequest'>, data: Buffer, scriptOpt?: Buffer, dataOffset?: number) => Promise<AlephiumSignedTx>;
|
|
14
11
|
run(): Promise<AlephiumSignedTx>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlephiumSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/alephium/AlephiumSignTransaction.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,IAAI,sBAAsB,EACxC,SAAS,EACV,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"AlephiumSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/alephium/AlephiumSignTransaction.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,EACV,gBAAgB,EAChB,cAAc,IAAI,sBAAsB,EACxC,SAAS,EACV,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAiC,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAExE,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,UAAU,CAAC,sBAAsB,CAAC;IACrF,IAAI;IAuBJ,eAAe,IAAI,mBAAmB;IAYtC,aAAa,SAAQ;IAErB,gBAAgB,cACH,SAAS,OAEhB,qBAAqB,kBAAkB,CAAC,GACxC,qBAAqB,mBAAmB,CAAC,GACzC,qBAAqB,yBAAyB,CAAC,QAC7C,MAAM,cACA,MAAM,0BAEjB,QAAQ,gBAAgB,CAAC,CAoD1B;IAEI,GAAG;CAsBV"}
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { BaseMethod } from '../BaseMethod';
|
|
2
|
-
import type { BenfenAddress } from '../../types';
|
|
2
|
+
import type { BenfenAddress, DeviceFirmwareRange } from '../../types';
|
|
3
3
|
import type { BenfenGetAddress as HardwareBenfenGetAddress } from '@onekeyfe/hd-transport';
|
|
4
4
|
export default class BenfenGetAddress extends BaseMethod<HardwareBenfenGetAddress[]> {
|
|
5
5
|
hasBundle: boolean;
|
|
6
6
|
shouldConfirm: boolean;
|
|
7
7
|
strictCheckDeviceSupport: boolean;
|
|
8
8
|
init(): void;
|
|
9
|
-
getVersionRange():
|
|
10
|
-
pro: {
|
|
11
|
-
min: string;
|
|
12
|
-
};
|
|
13
|
-
model_classic1s: {
|
|
14
|
-
min: string;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
9
|
+
getVersionRange(): DeviceFirmwareRange;
|
|
17
10
|
run(): Promise<BenfenAddress | BenfenAddress[]>;
|
|
18
11
|
}
|
|
19
12
|
//# sourceMappingURL=BenfenGetAddress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BenfenGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/benfen/BenfenGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,OAAO,KAAK,EAAE,aAAa,EAA0B,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"BenfenGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/benfen/BenfenGetAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAQ3C,OAAO,KAAK,EAAE,aAAa,EAA0B,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAC9F,OAAO,KAAK,EAAE,gBAAgB,IAAI,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAE3F,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,wBAAwB,EAAE,CAAC;IAClF,SAAS,UAAS;IAElB,aAAa,UAAS;IAEtB,wBAAwB,UAAQ;IAEhC,IAAI;IA+BJ,eAAe,IAAI,mBAAmB;IAehC,GAAG;CA6DV"}
|
|
@@ -1,17 +1,10 @@
|
|
|
1
1
|
import { BaseMethod } from '../BaseMethod';
|
|
2
|
-
import type { BenfenPublicKey } from '../../types';
|
|
2
|
+
import type { BenfenPublicKey, DeviceFirmwareRange } from '../../types';
|
|
3
3
|
export default class BenfenGetPublicKey extends BaseMethod<any> {
|
|
4
4
|
hasBundle: boolean;
|
|
5
5
|
strictCheckDeviceSupport: boolean;
|
|
6
6
|
init(): void;
|
|
7
|
-
getVersionRange():
|
|
8
|
-
pro: {
|
|
9
|
-
min: string;
|
|
10
|
-
};
|
|
11
|
-
model_classic1s: {
|
|
12
|
-
min: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
7
|
+
getVersionRange(): DeviceFirmwareRange;
|
|
15
8
|
run(): Promise<BenfenPublicKey | BenfenPublicKey[]>;
|
|
16
9
|
}
|
|
17
10
|
//# sourceMappingURL=BenfenGetPublicKey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BenfenGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/api/benfen/BenfenGetPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EAA4B,eAAe,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"BenfenGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/api/benfen/BenfenGetPublicKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EAA4B,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElG,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,GAAG,CAAC;IAC7D,SAAS,UAAS;IAElB,wBAAwB,UAAQ;IAEhC,IAAI;IA2BJ,eAAe,IAAI,mBAAmB;IAehC,GAAG;CAgBV"}
|
|
@@ -1,15 +1,9 @@
|
|
|
1
1
|
import { BaseMethod } from '../BaseMethod';
|
|
2
2
|
import type { BenfenSignMessage as HardwareBenfenSignMessage } from '@onekeyfe/hd-transport';
|
|
3
|
+
import type { DeviceFirmwareRange } from '../../types';
|
|
3
4
|
export default class BenfenSignMessage extends BaseMethod<HardwareBenfenSignMessage> {
|
|
4
5
|
init(): void;
|
|
5
|
-
getVersionRange():
|
|
6
|
-
pro: {
|
|
7
|
-
min: string;
|
|
8
|
-
};
|
|
9
|
-
model_classic1s: {
|
|
10
|
-
min: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
6
|
+
getVersionRange(): DeviceFirmwareRange;
|
|
13
7
|
run(): Promise<import("@onekeyfe/hd-transport").BenfenMessageSignature>;
|
|
14
8
|
}
|
|
15
9
|
//# sourceMappingURL=BenfenSignMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BenfenSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/benfen/BenfenSignMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,KAAK,EAAE,iBAAiB,IAAI,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"BenfenSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/benfen/BenfenSignMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,KAAK,EAAE,iBAAiB,IAAI,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,UAAU,CAAC,yBAAyB,CAAC;IAClF,IAAI;IAkBJ,eAAe,IAAI,mBAAmB;IAehC,GAAG;CAWV"}
|
|
@@ -2,16 +2,10 @@
|
|
|
2
2
|
import { BaseMethod } from '../BaseMethod';
|
|
3
3
|
import type { BenfenSignTx, BenfenSignedTx, TypedCall } from '@onekeyfe/hd-transport';
|
|
4
4
|
import type { TypedResponseMessage } from '../../device/DeviceCommands';
|
|
5
|
+
import type { DeviceFirmwareRange } from '../../types';
|
|
5
6
|
export default class BenfenSignTransaction extends BaseMethod<BenfenSignTx> {
|
|
6
7
|
init(): void;
|
|
7
|
-
getVersionRange():
|
|
8
|
-
pro: {
|
|
9
|
-
min: string;
|
|
10
|
-
};
|
|
11
|
-
model_classic1s: {
|
|
12
|
-
min: string;
|
|
13
|
-
};
|
|
14
|
-
};
|
|
8
|
+
getVersionRange(): DeviceFirmwareRange;
|
|
15
9
|
chunkByteSize: number;
|
|
16
10
|
processTxRequest: (typedCall: TypedCall, res: TypedResponseMessage<'BenfenSignedTx'> | TypedResponseMessage<'BenfenTxRequest'>, data: Buffer, offset?: number) => Promise<BenfenSignedTx>;
|
|
17
11
|
run(): Promise<BenfenSignedTx>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BenfenSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/benfen/BenfenSignTransaction.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAe,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"BenfenSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/benfen/BenfenSignTransaction.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAI3C,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAe,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,UAAU,CAAC,YAAY,CAAC;IACzE,IAAI;IAsBJ,eAAe,IAAI,mBAAmB;IAetC,aAAa,SAAQ;IAErB,gBAAgB,cACH,SAAS,OACf,qBAAqB,gBAAgB,CAAC,GAAG,qBAAqB,iBAAiB,CAAC,QAC/E,MAAM,sBAEX,QAAQ,cAAc,CAAC,CAgCxB;IAEI,GAAG;CAkBV"}
|
|
@@ -4,17 +4,7 @@ import type { GetAddress } from '@onekeyfe/hd-transport';
|
|
|
4
4
|
export default class BTCGetAddress extends BaseMethod<GetAddress[]> {
|
|
5
5
|
hasBundle: boolean;
|
|
6
6
|
init(): void;
|
|
7
|
-
getVersionRange():
|
|
8
|
-
model_mini: {
|
|
9
|
-
min: string;
|
|
10
|
-
};
|
|
11
|
-
model_touch: {
|
|
12
|
-
min: string;
|
|
13
|
-
};
|
|
14
|
-
} | {
|
|
15
|
-
model_mini?: undefined;
|
|
16
|
-
model_touch?: undefined;
|
|
17
|
-
};
|
|
7
|
+
getVersionRange(): import("../..").DeviceFirmwareRange;
|
|
18
8
|
run(): Promise<BTCAddress | BTCAddress[]>;
|
|
19
9
|
}
|
|
20
10
|
//# sourceMappingURL=BTCGetAddress.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BTCGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCGetAddress.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,+BAA+B,CAAC;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU,CAAC,UAAU,EAAE,CAAC;IACjE,SAAS,UAAS;IAElB,IAAI;IA6CJ,eAAe
|
|
1
|
+
{"version":3,"file":"BTCGetAddress.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCGetAddress.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,+BAA+B,CAAC;AACrF,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEzD,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,UAAU,CAAC,UAAU,EAAE,CAAC;IACjE,SAAS,UAAS;IAElB,IAAI;IA6CJ,eAAe;IAIT,GAAG;CA4BV"}
|
|
@@ -5,17 +5,7 @@ export default class BTCGetPublicKey extends BaseMethod<GetPublicKey[]> {
|
|
|
5
5
|
hasBundle: boolean;
|
|
6
6
|
init(): void;
|
|
7
7
|
private isBtcNetwork;
|
|
8
|
-
getVersionRange():
|
|
9
|
-
model_mini: {
|
|
10
|
-
min: string;
|
|
11
|
-
};
|
|
12
|
-
model_touch: {
|
|
13
|
-
min: string;
|
|
14
|
-
};
|
|
15
|
-
} | {
|
|
16
|
-
model_mini?: undefined;
|
|
17
|
-
model_touch?: undefined;
|
|
18
|
-
};
|
|
8
|
+
getVersionRange(): import("../..").DeviceFirmwareRange;
|
|
19
9
|
run(): Promise<BTCPublicKey | BTCPublicKey[]>;
|
|
20
10
|
}
|
|
21
11
|
//# sourceMappingURL=BTCGetPublicKey.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BTCGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCGetPublicKey.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,YAAY,EAAE,CAAC;IACrE,SAAS,UAAS;IAElB,IAAI;IA4CJ,OAAO,CAAC,YAAY;IAIpB,eAAe
|
|
1
|
+
{"version":3,"file":"BTCGetPublicKey.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCGetPublicKey.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU,CAAC,YAAY,EAAE,CAAC;IACrE,SAAS,UAAS;IAElB,IAAI;IA4CJ,OAAO,CAAC,YAAY;IAIpB,eAAe;IAIT,GAAG;CAuGV"}
|
|
@@ -2,21 +2,7 @@ import { BaseMethod } from '../BaseMethod';
|
|
|
2
2
|
import type { SignMessage } from '@onekeyfe/hd-transport';
|
|
3
3
|
export default class BTCSignMessage extends BaseMethod<SignMessage> {
|
|
4
4
|
init(): void;
|
|
5
|
-
getVersionRange():
|
|
6
|
-
model_mini: {
|
|
7
|
-
min: string;
|
|
8
|
-
};
|
|
9
|
-
model_touch: {
|
|
10
|
-
min: string;
|
|
11
|
-
};
|
|
12
|
-
} | {
|
|
13
|
-
model_mini?: undefined;
|
|
14
|
-
model_touch?: undefined;
|
|
15
|
-
} | {
|
|
16
|
-
pro: {
|
|
17
|
-
min: string;
|
|
18
|
-
};
|
|
19
|
-
};
|
|
5
|
+
getVersionRange(): import("../..").DeviceFirmwareRange;
|
|
20
6
|
run(): Promise<import("@onekeyfe/hd-transport").MessageSignature>;
|
|
21
7
|
}
|
|
22
8
|
//# sourceMappingURL=BTCSignMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BTCSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCSignMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU,CAAC,WAAW,CAAC;IACjE,IAAI;IA2CJ,eAAe
|
|
1
|
+
{"version":3,"file":"BTCSignMessage.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCSignMessage.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAE1D,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU,CAAC,WAAW,CAAC;IACjE,IAAI;IA2CJ,eAAe;IAWT,GAAG;CAOV"}
|
|
@@ -11,17 +11,7 @@ type Params = {
|
|
|
11
11
|
};
|
|
12
12
|
export default class BTCSignTransaction extends BaseMethod<Params> {
|
|
13
13
|
init(): void;
|
|
14
|
-
getVersionRange():
|
|
15
|
-
model_mini: {
|
|
16
|
-
min: string;
|
|
17
|
-
};
|
|
18
|
-
model_touch: {
|
|
19
|
-
min: string;
|
|
20
|
-
};
|
|
21
|
-
} | {
|
|
22
|
-
model_mini?: undefined;
|
|
23
|
-
model_touch?: undefined;
|
|
24
|
-
};
|
|
14
|
+
getVersionRange(): import("../..").DeviceFirmwareRange;
|
|
25
15
|
run(): Promise<import("../../types/api/btcSignTransaction").SignedTransaction>;
|
|
26
16
|
}
|
|
27
17
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BTCSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCSignTransaction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,OAAO,KAAK,EACV,gBAAgB,EAEhB,cAAc,EACd,kBAAkB,EACnB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAExE,KAAK,MAAM,GAAG;IACZ,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,MAAM,CAAC;IAChE,IAAI;IAgGJ,eAAe
|
|
1
|
+
{"version":3,"file":"BTCSignTransaction.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCSignTransaction.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAO3C,OAAO,KAAK,EACV,gBAAgB,EAEhB,cAAc,EACd,kBAAkB,EACnB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAExE,KAAK,MAAM,GAAG;IACZ,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,MAAM,EAAE,cAAc,EAAE,CAAC;IACzB,SAAS,CAAC,EAAE,gBAAgB,CAAC;IAC7B,OAAO,EAAE,kBAAkB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,UAAU,CAAC,MAAM,CAAC;IAChE,IAAI;IAgGJ,eAAe;IAIT,GAAG;CAmBV"}
|
|
@@ -2,17 +2,7 @@ import { BaseMethod } from '../BaseMethod';
|
|
|
2
2
|
import type { VerifyMessage } from '@onekeyfe/hd-transport';
|
|
3
3
|
export default class BTCVerifyMessage extends BaseMethod<VerifyMessage> {
|
|
4
4
|
init(): void;
|
|
5
|
-
getVersionRange():
|
|
6
|
-
model_mini: {
|
|
7
|
-
min: string;
|
|
8
|
-
};
|
|
9
|
-
model_touch: {
|
|
10
|
-
min: string;
|
|
11
|
-
};
|
|
12
|
-
} | {
|
|
13
|
-
model_mini?: undefined;
|
|
14
|
-
model_touch?: undefined;
|
|
15
|
-
};
|
|
5
|
+
getVersionRange(): import("../..").DeviceFirmwareRange;
|
|
16
6
|
run(): Promise<import("@onekeyfe/hd-transport").Success>;
|
|
17
7
|
}
|
|
18
8
|
//# sourceMappingURL=BTCVerifyMessage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BTCVerifyMessage.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCVerifyMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,aAAa,CAAC;IACrE,IAAI;IAwBJ,eAAe
|
|
1
|
+
{"version":3,"file":"BTCVerifyMessage.d.ts","sourceRoot":"","sources":["../../../src/api/btc/BTCVerifyMessage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAM3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,UAAU,CAAC,aAAa,CAAC;IACrE,IAAI;IAwBJ,eAAe;IAIT,GAAG;CAOV"}
|
|
@@ -1,12 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
min: string;
|
|
4
|
-
};
|
|
5
|
-
model_touch: {
|
|
6
|
-
min: string;
|
|
7
|
-
};
|
|
8
|
-
} | {
|
|
9
|
-
model_mini?: undefined;
|
|
10
|
-
model_touch?: undefined;
|
|
11
|
-
};
|
|
1
|
+
import type { DeviceFirmwareRange } from '../../../types';
|
|
2
|
+
export declare function getBitcoinForkVersionRange(params: (string | undefined)[]): DeviceFirmwareRange;
|
|
12
3
|
//# sourceMappingURL=versionLimit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"versionLimit.d.ts","sourceRoot":"","sources":["../../../../src/api/btc/helpers/versionLimit.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"versionLimit.d.ts","sourceRoot":"","sources":["../../../../src/api/btc/helpers/versionLimit.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAY1D,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,mBAAmB,CAkB9F"}
|