@onekeyfe/hd-core 1.2.0-alpha.0 → 1.2.0-alpha.2
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 +56 -178
- package/dist/api/FirmwareUpdateV2.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV3.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +2 -2
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/GetDeviceInfo.d.ts.map +1 -1
- package/dist/api/GetFeatures.d.ts +1 -1
- package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
- package/dist/api/device/DeviceUnlock.d.ts +1 -1
- package/dist/api/firmware/bootloaderHelper.d.ts.map +1 -1
- package/dist/api/firmware/uploadFirmware.d.ts.map +1 -1
- package/dist/api/tron/TronSignMessage.d.ts +0 -1
- package/dist/api/tron/TronSignMessage.d.ts.map +1 -1
- package/dist/api/tron/TronSignTransaction.d.ts +0 -1
- package/dist/api/tron/TronSignTransaction.d.ts.map +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/device/Device.d.ts +10 -15
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/deviceProfile/buildDeviceFeatures.d.ts +6 -0
- package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -0
- package/dist/deviceProfile/buildDeviceProfile.d.ts +3 -4
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +1 -1
- package/dist/deviceProfile/index.d.ts +1 -1
- package/dist/deviceProfile/index.d.ts.map +1 -1
- package/dist/index.d.ts +571 -496
- package/dist/index.js +502 -571
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
- package/dist/types/api/getDeviceInfo.d.ts +2 -2
- package/dist/types/api/getDeviceInfo.d.ts.map +1 -1
- package/dist/types/device.d.ts +87 -8
- package/dist/types/device.d.ts.map +1 -1
- package/dist/utils/capabilitieUtils.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/deviceInfoUtils.d.ts.map +1 -1
- package/dist/utils/deviceVersionUtils.d.ts.map +1 -1
- package/dist/utils/findDefectiveBatchDevice.d.ts +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/package.json +4 -4
- package/src/api/FirmwareUpdateV2.ts +9 -2
- package/src/api/FirmwareUpdateV3.ts +2 -1
- package/src/api/FirmwareUpdateV4.ts +24 -31
- package/src/api/GetDeviceInfo.ts +6 -13
- package/src/api/GetOnekeyFeatures.ts +3 -14
- package/src/api/GetPassphraseState.ts +2 -2
- package/src/api/firmware/bootloaderHelper.ts +3 -2
- package/src/api/firmware/getBinary.ts +1 -1
- package/src/api/firmware/releaseHelper.ts +3 -3
- package/src/api/firmware/uploadFirmware.ts +5 -2
- package/src/api/tron/TronSignMessage.ts +0 -1
- package/src/api/tron/TronSignTransaction.ts +0 -1
- package/src/core/index.ts +3 -7
- package/src/data-manager/DataManager.ts +4 -4
- package/src/device/Device.ts +74 -240
- package/src/device/DevicePool.ts +3 -3
- package/src/deviceProfile/buildDeviceFeatures.ts +367 -0
- package/src/deviceProfile/buildDeviceProfile.ts +102 -155
- package/src/deviceProfile/index.ts +4 -1
- package/src/protocols/protocol-v2/features.ts +6 -9
- package/src/types/api/getDeviceInfo.ts +2 -2
- package/src/types/device.ts +97 -34
- package/src/utils/capabilitieUtils.ts +1 -2
- package/src/utils/deviceFeaturesUtils.ts +11 -17
- package/src/utils/deviceInfoUtils.ts +11 -29
- package/src/utils/deviceVersionUtils.ts +7 -25
- package/src/utils/findDefectiveBatchDevice.ts +6 -6
- package/dist/deviceProfile/legacyFeaturesView.d.ts +0 -5
- package/dist/deviceProfile/legacyFeaturesView.d.ts.map +0 -1
- package/src/deviceProfile/legacyFeaturesView.ts +0 -123
package/dist/device/Device.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import EventEmitter from 'events';
|
|
3
3
|
import { DeviceCommands } from './DeviceCommands';
|
|
4
|
-
import { type DeviceFirmwareRange, type Device as DeviceTyped, EOneKeyDeviceMode, type Features, type IDeviceModel, type IDeviceType, type
|
|
4
|
+
import { type DeviceFirmwareRange, type Device as DeviceTyped, EOneKeyDeviceMode, type Features, type IDeviceModel, type IDeviceType, type IVersionRange, type SupportFeatureType, type UnavailableCapabilities } from '../types';
|
|
5
5
|
import { DEVICE } from '../events';
|
|
6
6
|
import type { PROTO } from '../constants';
|
|
7
7
|
import type { DeviceButtonRequestPayload, DeviceFeaturesPayload, PassphraseRequestPayload } from '../events';
|
|
@@ -9,7 +9,6 @@ import type { PassphrasePromptResponse } from './DeviceCommands';
|
|
|
9
9
|
import type { Deferred, HardwareConnectProtocol } from '@onekeyfe/hd-shared';
|
|
10
10
|
import type { OneKeyDeviceInfo as DeviceDescriptor, ProtocolV2DeviceInfo, Success } from '@onekeyfe/hd-transport';
|
|
11
11
|
import type DeviceConnector from './DeviceConnector';
|
|
12
|
-
import type { DeviceProfile } from '../types/api/getDeviceInfo';
|
|
13
12
|
export type InitOptions = {
|
|
14
13
|
initSession?: boolean;
|
|
15
14
|
deviceId?: string;
|
|
@@ -57,9 +56,6 @@ export declare class Device extends EventEmitter {
|
|
|
57
56
|
private cancelableAction?;
|
|
58
57
|
private deviceAcquired;
|
|
59
58
|
features: Features | undefined;
|
|
60
|
-
private getFeaturesProfile;
|
|
61
|
-
get profile(): DeviceProfile | undefined;
|
|
62
|
-
set profile(profile: DeviceProfile | undefined);
|
|
63
59
|
featuresNeedsReload: boolean;
|
|
64
60
|
runPromise?: Deferred<void> | null;
|
|
65
61
|
externalState: string[];
|
|
@@ -102,24 +98,23 @@ export declare class Device extends EventEmitter {
|
|
|
102
98
|
getCurrentFirmwareType(): import("@onekeyfe/hd-shared").EFirmwareType;
|
|
103
99
|
getCurrentFirmwareVersionString(): string;
|
|
104
100
|
getCurrentBLEFirmwareVersionString(): string | undefined;
|
|
105
|
-
getCurrentSafetyChecks():
|
|
101
|
+
getCurrentSafetyChecks(): string | null | undefined;
|
|
106
102
|
getCurrentMethodVersionRange(getVersionRange: (deviceModel: IDeviceType | IDeviceModel) => IVersionRange | undefined): IVersionRange | undefined;
|
|
107
103
|
supportNewPassphrase(): SupportFeatureType;
|
|
108
104
|
supportInputPinOnSoftware(): SupportFeatureType;
|
|
109
105
|
supportModifyHomescreen(): SupportFeatureType;
|
|
110
106
|
private generateStateKey;
|
|
107
|
+
private getSessionCacheDeviceKey;
|
|
111
108
|
getInternalState(_deviceId?: string): string | undefined;
|
|
112
|
-
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
109
|
+
updateInternalState(enablePassphrase: boolean, passphraseState: string | undefined, deviceId: string | undefined, sessionId?: string | null, featuresSessionId?: string | null): void;
|
|
113
110
|
private setInternalState;
|
|
114
111
|
clearInternalState(_deviceId?: string): void;
|
|
115
112
|
initialize(options?: InitOptions): Promise<void>;
|
|
116
113
|
private _initializeProtocolV2;
|
|
117
114
|
private _refreshProtocolV2Status;
|
|
118
|
-
getFeatures(): Promise<
|
|
119
|
-
_updateFeatures(
|
|
120
|
-
|
|
121
|
-
applyProfileUpdate(next: DeviceProfile, deviceInfo?: ProtocolV2DeviceInfo): DeviceProfile;
|
|
122
|
-
private updateProtocolV2Features;
|
|
115
|
+
getFeatures(): Promise<Features | undefined>;
|
|
116
|
+
_updateFeatures(protoFeatures: PROTO.Features | Features, initSession?: boolean): void;
|
|
117
|
+
updateProtocolV2Features(deviceInfo?: ProtocolV2DeviceInfo): Features;
|
|
123
118
|
updateDescriptor(descriptor: DeviceDescriptor, forceUpdate?: boolean): void;
|
|
124
119
|
updateFromCache(device: Device): void;
|
|
125
120
|
run(fn?: () => Promise<void>, options?: RunOptions): Promise<void>;
|
|
@@ -129,8 +124,8 @@ export declare class Device extends EventEmitter {
|
|
|
129
124
|
setCancelableAction(callback: (err?: Error) => Promise<unknown>): void;
|
|
130
125
|
clearCancelableAction(): void;
|
|
131
126
|
getMode(): EOneKeyDeviceMode;
|
|
132
|
-
getFirmwareVersion(): IVersionArray | null;
|
|
133
|
-
getBLEFirmwareVersion(): IVersionArray | null;
|
|
127
|
+
getFirmwareVersion(): import("../types").IVersionArray | null;
|
|
128
|
+
getBLEFirmwareVersion(): import("../types").IVersionArray | null;
|
|
134
129
|
isUsed(): boolean;
|
|
135
130
|
hasDeviceAcquire(): boolean;
|
|
136
131
|
isUsedHere(): boolean;
|
|
@@ -144,7 +139,7 @@ export declare class Device extends EventEmitter {
|
|
|
144
139
|
checkDeviceId(deviceId: string): boolean;
|
|
145
140
|
lockDevice(): Promise<Success>;
|
|
146
141
|
supportUnlockVersionRange(): DeviceFirmwareRange;
|
|
147
|
-
unlockDevice(): Promise<
|
|
142
|
+
unlockDevice(): Promise<Features | undefined>;
|
|
148
143
|
checkPassphraseStateSafety(passphraseState?: string, useEmptyPassphrase?: boolean, skipPassphraseCheck?: boolean): Promise<boolean>;
|
|
149
144
|
}
|
|
150
145
|
export default Device;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../../src/device/Device.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAgClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,KAAK,mBAAmB,EAGxB,KAAK,MAAM,IAAI,WAAW,EAC1B,iBAAiB,EACjB,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,KAAK,
|
|
1
|
+
{"version":3,"file":"Device.d.ts","sourceRoot":"","sources":["../../src/device/Device.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAgClC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,KAAK,mBAAmB,EAGxB,KAAK,MAAM,IAAI,WA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E,WAAW,CAAC,EAAE,OAAO;IAsB/E,wBAAwB,CAAC,UAAU,CAAC,EAAE,oBAAoB;IAe1D,gBAAgB,CAAC,UAAU,EAAE,gBAAgB,EAAE,WAAW,UAAQ;IAsBlE,eAAe,CAAC,MAAM,EAAE,MAAM;IASxB,GAAG,CAAC,EAAE,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC,EAAE,UAAU;IAYlD,SAAS,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,MAAM,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,EAAE,OAAO,EAAE,UAAU;IAkFpE,uBAAuB;IASvB,oBAAoB;IAW1B,mBAAmB,CAAC,QAAQ,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC;IAW/D,qBAAqB;IAIrB,OAAO;IAoBP,kBAAkB;IAKlB,qBAAqB;IAKrB,MAAM;IAIN,gBAAgB;IAQhB,UAAU;IAQV,eAAe,IAAI,OAAO;IAI1B,YAAY;IAIZ,aAAa;IAIb,UAAU;IAIV,YAAY,IAAI,OAAO;IAIvB,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;IAsBpD,gBAAgB;IAahB,aAAa,CAAC,QAAQ,EAAE,MAAM;IAIxB,UAAU,IAAI,OAAO,CAAC,OAAO,CAAC;IAKpC,yBAAyB,IAAI,mBAAmB;IAU1C,YAAY;IAyDZ,0BAA0B,CAC9B,eAAe,CAAC,EAAE,MAAM,EACxB,kBAAkB,CAAC,EAAE,OAAO,EAC5B,mBAAmB,CAAC,EAAE,OAAO;CAiDhC;AAED,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Features } from '../types';
|
|
2
|
+
import type { PROTO } from '../constants';
|
|
3
|
+
import type { ProtocolV2DeviceInfo } from '@onekeyfe/hd-transport';
|
|
4
|
+
export declare const buildProtocolV1FeaturesPayload: (protocolV1Features: PROTO.Features, previous?: Features) => Features;
|
|
5
|
+
export declare const buildProtocolV2FeaturesPayload: (deviceInfo?: ProtocolV2DeviceInfo, previous?: Features) => Features;
|
|
6
|
+
//# sourceMappingURL=buildDeviceFeatures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildDeviceFeatures.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/buildDeviceFeatures.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAAwB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAmHzF,eAAO,MAAM,8BAA8B,uBACrB,cAAc,aACvB,QAAQ,KAClB,QAqGF,CAAC;AASF,eAAO,MAAM,8BAA8B,gBAC5B,oBAAoB,aACtB,QAAQ,KAClB,QAmIF,CAAC"}
|
|
@@ -4,7 +4,7 @@ import type { ProtocolV2DeviceInfo } from '@onekeyfe/hd-transport';
|
|
|
4
4
|
type BuildProtocolV1ProfileParams = {
|
|
5
5
|
protocol?: DeviceInfoProtocol;
|
|
6
6
|
features?: Features;
|
|
7
|
-
|
|
7
|
+
protocolV1OneKeyFeatures?: OnekeyFeatures;
|
|
8
8
|
sources?: DeviceInfoSource[];
|
|
9
9
|
scope?: GetDeviceInfoParams['scope'];
|
|
10
10
|
includeRaw?: boolean;
|
|
@@ -14,9 +14,8 @@ type BuildProtocolV2ProfileParams = {
|
|
|
14
14
|
sources?: DeviceInfoSource[];
|
|
15
15
|
scope?: GetDeviceInfoParams['scope'];
|
|
16
16
|
includeRaw?: boolean;
|
|
17
|
-
fallbackSerialNo?: string;
|
|
18
17
|
};
|
|
19
|
-
export declare function buildProfileFromProtocolV1({ protocol, features,
|
|
20
|
-
export declare function buildProfileFromProtocolV2({ deviceInfo, sources, scope, includeRaw,
|
|
18
|
+
export declare function buildProfileFromProtocolV1({ protocol, features, protocolV1OneKeyFeatures, sources, scope, includeRaw, }: BuildProtocolV1ProfileParams): DeviceProfile;
|
|
19
|
+
export declare function buildProfileFromProtocolV2({ deviceInfo, sources, scope, includeRaw, }: BuildProtocolV2ProfileParams): DeviceProfile;
|
|
21
20
|
export {};
|
|
22
21
|
//# sourceMappingURL=buildDeviceProfile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildDeviceProfile.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/buildDeviceProfile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"buildDeviceProfile.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/buildDeviceProfile.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EACV,kBAAkB,EAClB,gBAAgB,EAEhB,aAAa,EAIb,mBAAmB,EACpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EAAwB,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEzF,KAAK,4BAA4B,GAAG;IAClC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,wBAAwB,CAAC,EAAE,cAAc,CAAC;IAC1C,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AA+NF,wBAAgB,0BAA0B,CAAC,EACzC,QAAe,EACf,QAAQ,EACR,wBAAwB,EACxB,OAAsB,EACtB,KAAe,EACf,UAAkB,GACnB,EAAE,4BAA4B,GAAG,aAAa,CAyB9C;AAED,wBAAgB,0BAA0B,CAAC,EACzC,UAAU,EACV,OAAwB,EACxB,KAAe,EACf,UAAkB,GACnB,EAAE,4BAA4B,GAAG,aAAa,CA4B9C"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { buildProfileFromProtocolV1, buildProfileFromProtocolV2 } from './buildDeviceProfile';
|
|
2
|
-
export {
|
|
2
|
+
export { buildProtocolV1FeaturesPayload, buildProtocolV2FeaturesPayload, } from './buildDeviceFeatures';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,GAC/B,MAAM,uBAAuB,CAAC"}
|