@onekeyfe/hd-core 1.2.0-alpha.1 → 1.2.0-alpha.11
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__/DeviceCommands.test.ts +25 -0
- package/__tests__/RequestQueue.test.ts +34 -0
- package/__tests__/connectSettings.test.ts +19 -0
- package/__tests__/device-wallet-session-store.test.ts +131 -0
- package/__tests__/preInitialize.test.ts +33 -0
- package/__tests__/pro2Wallpaper.test.ts +50 -0
- package/__tests__/protocol-v2-firmware-targets.test.ts +19 -0
- package/__tests__/protocol-v2.test.ts +3253 -1605
- package/dist/api/BaseMethod.d.ts +4 -0
- package/dist/api/BaseMethod.d.ts.map +1 -1
- package/dist/api/ClearSessionCache.d.ts +9 -0
- package/dist/api/ClearSessionCache.d.ts.map +1 -0
- package/dist/api/FileRead.d.ts.map +1 -1
- package/dist/api/FileWrite.d.ts.map +1 -1
- package/dist/api/FirmwareUpdateV4.d.ts +20 -3
- package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
- package/dist/api/GetPassphraseState.d.ts +1 -6
- package/dist/api/GetPassphraseState.d.ts.map +1 -1
- package/dist/api/UploadPortfolio.d.ts +18 -0
- package/dist/api/UploadPortfolio.d.ts.map +1 -0
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts +1 -0
- package/dist/api/firmware/FirmwareUpdateBaseMethod.d.ts.map +1 -1
- package/dist/api/firmware/getBinary.d.ts +4 -0
- package/dist/api/firmware/getBinary.d.ts.map +1 -1
- package/dist/api/firmware/progressThrottle.d.ts +3 -0
- package/dist/api/firmware/progressThrottle.d.ts.map +1 -0
- package/dist/api/index.d.ts +13 -10
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts +6 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts +7 -0
- package/dist/api/protocol-v2/DeviceFactoryInfoSet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts +1 -1
- package/dist/api/protocol-v2/DeviceFirmwareUpdate.d.ts.map +1 -1
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts +3 -2
- package/dist/api/protocol-v2/DeviceGetFirmwareUpdateStatus.d.ts.map +1 -1
- package/dist/api/protocol-v2/{DeviceGetDeviceInfo.d.ts → DeviceInfoGet.d.ts} +10 -10
- package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceSessionGet.d.ts +6 -0
- package/dist/api/protocol-v2/DeviceSessionGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceSettingsGet.d.ts +6 -0
- package/dist/api/protocol-v2/DeviceSettingsGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts +16 -0
- package/dist/api/protocol-v2/DeviceSettingsPageShow.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceSettingsSet.d.ts +12 -0
- package/dist/api/protocol-v2/DeviceSettingsSet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts +6 -0
- package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts +26 -0
- package/dist/api/protocol-v2/DeviceUploadWallpaper.d.ts.map +1 -0
- package/dist/api/protocol-v2/FilesystemFormat.d.ts.map +1 -1
- package/dist/api/protocol-v2/{FilesystemFixPermission.d.ts → FilesystemPermissionFix.d.ts} +2 -2
- package/dist/api/protocol-v2/FilesystemPermissionFix.d.ts.map +1 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts +6 -0
- package/dist/api/protocol-v2/ProtocolInfoRequest.d.ts.map +1 -0
- package/dist/api/protocol-v2/helpers.d.ts +27 -18
- package/dist/api/protocol-v2/helpers.d.ts.map +1 -1
- package/dist/api/ton/TonSignData.d.ts +1 -5
- package/dist/api/ton/TonSignData.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/RequestQueue.d.ts +2 -0
- package/dist/core/RequestQueue.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/data-manager/DataManager.d.ts +1 -1
- package/dist/data-manager/DataManager.d.ts.map +1 -1
- package/dist/data-manager/connectSettings.d.ts.map +1 -1
- package/dist/device/Device.d.ts +6 -3
- package/dist/device/Device.d.ts.map +1 -1
- package/dist/device/DeviceCommands.d.ts +4 -4
- package/dist/device/DeviceCommands.d.ts.map +1 -1
- package/dist/device/DeviceWalletSessionStore.d.ts +15 -0
- package/dist/device/DeviceWalletSessionStore.d.ts.map +1 -0
- package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
- package/dist/deviceProfile/buildDeviceProfile.d.ts.map +1 -1
- package/dist/events/call.d.ts +7 -0
- package/dist/events/call.d.ts.map +1 -1
- package/dist/events/core.d.ts +2 -2
- package/dist/events/core.d.ts.map +1 -1
- package/dist/events/iframe.d.ts +1 -0
- package/dist/events/iframe.d.ts.map +1 -1
- package/dist/index.d.ts +166 -70
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2659 -1750
- package/dist/inject.d.ts +3 -2
- package/dist/inject.d.ts.map +1 -1
- package/dist/lowLevelInject.d.ts +2 -1
- package/dist/lowLevelInject.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/features.d.ts +12 -14
- package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/firmware.d.ts +11 -9
- package/dist/protocols/protocol-v2/firmware.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/index.d.ts +1 -0
- package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
- package/dist/protocols/protocol-v2/unlockRetry.d.ts +9 -0
- package/dist/protocols/protocol-v2/unlockRetry.d.ts.map +1 -0
- package/dist/protocols/protocol-v2/walletSession.d.ts +13 -0
- package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -0
- package/dist/topLevelInject.d.ts.map +1 -1
- package/dist/types/api/firmwareUpdate.d.ts +6 -6
- package/dist/types/api/firmwareUpdate.d.ts.map +1 -1
- package/dist/types/api/getDeviceInfo.d.ts +2 -0
- package/dist/types/api/getDeviceInfo.d.ts.map +1 -1
- package/dist/types/api/getPassphraseState.d.ts +2 -10
- package/dist/types/api/getPassphraseState.d.ts.map +1 -1
- package/dist/types/api/index.d.ts +18 -12
- package/dist/types/api/index.d.ts.map +1 -1
- package/dist/types/api/protocolV2.d.ts +31 -17
- package/dist/types/api/protocolV2.d.ts.map +1 -1
- package/dist/types/api/sessionCache.d.ts +10 -0
- package/dist/types/api/sessionCache.d.ts.map +1 -0
- package/dist/types/device.d.ts +1 -0
- package/dist/types/device.d.ts.map +1 -1
- package/dist/types/params.d.ts +1 -0
- package/dist/types/params.d.ts.map +1 -1
- package/dist/types/settings.d.ts +21 -2
- package/dist/types/settings.d.ts.map +1 -1
- package/dist/utils/deviceFeaturesUtils.d.ts +2 -2
- package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
- package/dist/utils/index.d.ts +2 -0
- 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/dist/utils/pro2Wallpaper.d.ts +12 -0
- package/dist/utils/pro2Wallpaper.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/api/BaseMethod.ts +18 -0
- package/src/api/ClearSessionCache.ts +28 -0
- package/src/api/FileRead.ts +16 -3
- package/src/api/FileWrite.ts +22 -1
- package/src/api/FirmwareUpdateV4.ts +1006 -265
- package/src/api/GetOnekeyFeatures.ts +1 -1
- package/src/api/GetPassphraseState.ts +9 -15
- package/src/api/UploadPortfolio.ts +37 -0
- package/src/api/device/DeviceRebootToBoardloader.ts +4 -4
- package/src/api/device/DeviceRebootToBootloader.ts +4 -4
- package/src/api/firmware/FirmwareUpdateBaseMethod.ts +18 -4
- package/src/api/firmware/progressThrottle.ts +44 -0
- package/src/api/index.ts +13 -10
- package/src/api/protocol-v2/{FactoryGetDeviceInfo.ts → DeviceFactoryInfoGet.ts} +3 -3
- package/src/api/protocol-v2/DeviceFactoryInfoSet.ts +32 -0
- package/src/api/protocol-v2/DeviceFirmwareUpdate.ts +3 -5
- package/src/api/protocol-v2/DeviceGetFirmwareUpdateStatus.ts +39 -5
- package/src/api/protocol-v2/{DeviceGetDeviceInfo.ts → DeviceInfoGet.ts} +52 -22
- package/src/api/protocol-v2/DeviceReboot.ts +1 -1
- package/src/api/protocol-v2/DeviceSessionGet.ts +15 -0
- package/src/api/protocol-v2/{DeviceGetOnboardingStatus.ts → DeviceSettingsGet.ts} +3 -3
- package/src/api/protocol-v2/DeviceSettingsPageShow.ts +59 -0
- package/src/api/protocol-v2/DeviceSettingsSet.ts +39 -0
- package/src/api/protocol-v2/DeviceStatusGet.ts +14 -0
- package/src/api/protocol-v2/DeviceUploadWallpaper.ts +160 -0
- package/src/api/protocol-v2/FilesystemFormat.ts +4 -1
- package/src/api/protocol-v2/{FilesystemFixPermission.ts → FilesystemPermissionFix.ts} +2 -2
- package/src/api/protocol-v2/{GetProtoVersion.ts → ProtocolInfoRequest.ts} +2 -2
- package/src/api/protocol-v2/helpers.ts +71 -47
- package/src/api/ton/TonSignData.ts +1 -5
- package/src/api/tron/TronSignMessage.ts +0 -1
- package/src/api/tron/TronSignTransaction.ts +0 -1
- package/src/core/RequestQueue.ts +19 -0
- package/src/core/index.ts +29 -6
- package/src/data/messages/messages-protocol-v2.json +760 -1110
- package/src/data/messages/messages.json +8 -0
- package/src/data-manager/DataManager.ts +7 -0
- package/src/data-manager/connectSettings.ts +2 -4
- package/src/device/Device.ts +103 -70
- package/src/device/DeviceCommands.ts +9 -3
- package/src/device/DeviceWalletSessionStore.ts +78 -0
- package/src/deviceProfile/buildDeviceFeatures.ts +60 -63
- package/src/deviceProfile/buildDeviceProfile.ts +77 -58
- package/src/events/call.ts +6 -0
- package/src/events/core.ts +2 -0
- package/src/events/iframe.ts +1 -0
- package/src/index.ts +4 -0
- package/src/inject.ts +26 -16
- package/src/lowLevelInject.ts +3 -0
- package/src/protocols/protocol-v2/features.ts +26 -63
- package/src/protocols/protocol-v2/firmware.ts +12 -36
- package/src/protocols/protocol-v2/index.ts +1 -0
- package/src/protocols/protocol-v2/unlockRetry.ts +46 -0
- package/src/protocols/protocol-v2/walletSession.ts +92 -0
- package/src/topLevelInject.ts +2 -0
- package/src/types/api/firmwareUpdate.ts +28 -20
- package/src/types/api/getDeviceInfo.ts +2 -0
- package/src/types/api/getPassphraseState.ts +2 -11
- package/src/types/api/index.ts +29 -21
- package/src/types/api/protocolV2.ts +74 -35
- package/src/types/api/sessionCache.ts +14 -0
- package/src/types/device.ts +1 -0
- package/src/types/params.ts +4 -0
- package/src/types/settings.ts +42 -35
- package/src/utils/deviceFeaturesUtils.ts +46 -20
- package/src/utils/index.ts +6 -0
- package/src/utils/pro2Wallpaper.ts +111 -0
- package/dist/api/protocol-v2/DevReboot.d.ts +0 -7
- package/dist/api/protocol-v2/DevReboot.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceGetDeviceInfo.d.ts.map +0 -1
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts +0 -6
- package/dist/api/protocol-v2/DeviceGetOnboardingStatus.d.ts.map +0 -1
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts +0 -7
- package/dist/api/protocol-v2/FactoryDeviceInfoSettings.d.ts.map +0 -1
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts +0 -6
- package/dist/api/protocol-v2/FactoryGetDeviceInfo.d.ts.map +0 -1
- package/dist/api/protocol-v2/FilesystemFixPermission.d.ts.map +0 -1
- package/dist/api/protocol-v2/GetProtoVersion.d.ts +0 -6
- package/dist/api/protocol-v2/GetProtoVersion.d.ts.map +0 -1
- package/src/api/protocol-v2/DevReboot.ts +0 -24
- package/src/api/protocol-v2/FactoryDeviceInfoSettings.ts +0 -29
|
@@ -1,32 +1,51 @@
|
|
|
1
1
|
import type { CommonParams, Response } from '../params';
|
|
2
2
|
import type {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
DeviceFactoryInfo,
|
|
4
|
+
DeviceFirmwareUpdateStatus,
|
|
5
|
+
DeviceSession,
|
|
6
|
+
DeviceSettings,
|
|
7
|
+
DeviceStatus,
|
|
8
|
+
ProtocolInfo,
|
|
7
9
|
ProtocolV2DeviceInfo,
|
|
8
10
|
Success,
|
|
9
11
|
} from '@onekeyfe/hd-transport';
|
|
10
12
|
import type {
|
|
13
|
+
DeviceFactoryInfoSetParams,
|
|
11
14
|
DeviceFirmwareUpdateParams,
|
|
15
|
+
DeviceFirmwareUpdateStatusGetParams,
|
|
12
16
|
DeviceRebootParams,
|
|
13
|
-
FactoryDeviceInfoSettingsParams,
|
|
14
17
|
} from '../../api/protocol-v2/helpers';
|
|
15
|
-
import type {
|
|
18
|
+
import type { DeviceInfoGetParams } from '../../api/protocol-v2/DeviceInfoGet';
|
|
19
|
+
import type { DeviceSettingsSetParams } from '../../api/protocol-v2/DeviceSettingsSet';
|
|
20
|
+
import type { DeviceSettingsPageShowParams } from '../../api/protocol-v2/DeviceSettingsPageShow';
|
|
21
|
+
import type {
|
|
22
|
+
DeviceUploadWallpaperParams,
|
|
23
|
+
DeviceUploadWallpaperResponse,
|
|
24
|
+
} from '../../api/protocol-v2/DeviceUploadWallpaper';
|
|
16
25
|
|
|
17
26
|
// 参数类型单源:以 api/protocol-v2 的实现为准(type-only re-export,无运行时依赖)
|
|
18
27
|
export type {
|
|
19
28
|
DeviceFirmwareTargetInput,
|
|
20
29
|
DeviceFirmwareUpdateParams,
|
|
30
|
+
DeviceFirmwareUpdateStatusGetParams,
|
|
21
31
|
DeviceRebootParams,
|
|
22
|
-
|
|
32
|
+
DeviceFactoryInfoSetParams,
|
|
23
33
|
RebootTypeInput,
|
|
24
34
|
} from '../../api/protocol-v2/helpers';
|
|
25
35
|
export type {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} from '../../api/protocol-v2/
|
|
36
|
+
DeviceInfoGetParams,
|
|
37
|
+
DeviceInfoGetTargets,
|
|
38
|
+
DeviceInfoGetTypes,
|
|
39
|
+
} from '../../api/protocol-v2/DeviceInfoGet';
|
|
40
|
+
export type { DeviceSettingsSetParams } from '../../api/protocol-v2/DeviceSettingsSet';
|
|
41
|
+
export type {
|
|
42
|
+
DeviceSettingsPageShowParams,
|
|
43
|
+
SupportedDeviceSettingsPage,
|
|
44
|
+
} from '../../api/protocol-v2/DeviceSettingsPageShow';
|
|
45
|
+
export type {
|
|
46
|
+
DeviceUploadWallpaperParams,
|
|
47
|
+
DeviceUploadWallpaperResponse,
|
|
48
|
+
} from '../../api/protocol-v2/DeviceUploadWallpaper';
|
|
30
49
|
|
|
31
50
|
// ── Shared response shapes (Protocol V2 file system) ────────────────────
|
|
32
51
|
|
|
@@ -67,10 +86,10 @@ export type PathInfoResult = {
|
|
|
67
86
|
|
|
68
87
|
// ── Method signatures ─────────────────────────────────────────────────────
|
|
69
88
|
|
|
70
|
-
export declare function
|
|
89
|
+
export declare function protocolInfoRequest(
|
|
71
90
|
connectId: string,
|
|
72
91
|
params?: CommonParams
|
|
73
|
-
): Response<
|
|
92
|
+
): Response<ProtocolInfo>;
|
|
74
93
|
|
|
75
94
|
export declare function ping(
|
|
76
95
|
connectId: string,
|
|
@@ -82,54 +101,65 @@ export declare function deviceReboot(
|
|
|
82
101
|
params: CommonParams & DeviceRebootParams
|
|
83
102
|
): Response<Success>;
|
|
84
103
|
|
|
85
|
-
export declare function
|
|
104
|
+
export declare function deviceInfoGet(
|
|
86
105
|
connectId: string,
|
|
87
|
-
params?: CommonParams &
|
|
106
|
+
params?: CommonParams & DeviceInfoGetParams
|
|
88
107
|
): Response<ProtocolV2DeviceInfo>;
|
|
89
108
|
|
|
90
|
-
export declare function
|
|
109
|
+
export declare function deviceStatusGet(
|
|
110
|
+
connectId: string,
|
|
111
|
+
params?: CommonParams
|
|
112
|
+
): Response<DeviceStatus>;
|
|
113
|
+
|
|
114
|
+
export declare function deviceSessionGet(
|
|
91
115
|
connectId: string,
|
|
92
116
|
params?: CommonParams
|
|
93
|
-
): Response<
|
|
117
|
+
): Response<DeviceSession>;
|
|
94
118
|
|
|
95
119
|
export declare function deviceFirmwareUpdate(
|
|
96
120
|
connectId: string,
|
|
97
121
|
params: CommonParams & DeviceFirmwareUpdateParams
|
|
98
|
-
): Response<Success |
|
|
122
|
+
): Response<Success | DeviceFirmwareUpdateStatus>;
|
|
99
123
|
|
|
100
124
|
export declare function deviceGetFirmwareUpdateStatus(
|
|
101
125
|
connectId: string,
|
|
102
|
-
params?: CommonParams
|
|
103
|
-
): Response<
|
|
126
|
+
params?: CommonParams & DeviceFirmwareUpdateStatusGetParams
|
|
127
|
+
): Response<DeviceFirmwareUpdateStatus>;
|
|
104
128
|
|
|
105
|
-
export declare function
|
|
129
|
+
export declare function deviceFactoryInfoSet(
|
|
106
130
|
connectId: string,
|
|
107
|
-
params: CommonParams &
|
|
131
|
+
params: CommonParams & DeviceFactoryInfoSetParams
|
|
108
132
|
): Response<Success>;
|
|
109
133
|
|
|
110
|
-
export declare function
|
|
134
|
+
export declare function deviceFactoryInfoGet(
|
|
111
135
|
connectId: string,
|
|
112
|
-
params?: CommonParams
|
|
113
|
-
): Response<
|
|
136
|
+
params?: CommonParams
|
|
137
|
+
): Response<DeviceFactoryInfo>;
|
|
114
138
|
|
|
115
|
-
export declare function
|
|
139
|
+
export declare function deviceSettingsGet(
|
|
116
140
|
connectId: string,
|
|
117
|
-
params
|
|
118
|
-
): Response<
|
|
141
|
+
params?: CommonParams
|
|
142
|
+
): Response<DeviceSettings>;
|
|
119
143
|
|
|
120
|
-
export declare function
|
|
144
|
+
export declare function deviceSettingsSet(
|
|
121
145
|
connectId: string,
|
|
122
|
-
params
|
|
123
|
-
): Response<
|
|
146
|
+
params: CommonParams & DeviceSettingsSetParams
|
|
147
|
+
): Response<Success>;
|
|
124
148
|
|
|
125
|
-
export declare function
|
|
149
|
+
export declare function deviceSettingsPageShow(
|
|
126
150
|
connectId: string,
|
|
127
|
-
params:
|
|
151
|
+
params: CommonParams & DeviceSettingsPageShowParams
|
|
128
152
|
): Response<Success>;
|
|
129
153
|
|
|
130
|
-
export declare function
|
|
154
|
+
export declare function deviceUploadWallpaper(
|
|
155
|
+
connectId: string,
|
|
156
|
+
params: CommonParams & DeviceUploadWallpaperParams
|
|
157
|
+
): Response<DeviceUploadWallpaperResponse>;
|
|
131
158
|
|
|
132
|
-
export declare function
|
|
159
|
+
export declare function filesystemPermissionFix(
|
|
160
|
+
connectId: string,
|
|
161
|
+
params?: CommonParams
|
|
162
|
+
): Response<Success>;
|
|
133
163
|
|
|
134
164
|
export declare function fileRead(
|
|
135
165
|
connectId: string,
|
|
@@ -185,6 +215,15 @@ export declare function pathInfo(
|
|
|
185
215
|
|
|
186
216
|
export declare const filesystemFileRead: typeof fileRead;
|
|
187
217
|
export declare const filesystemFileWrite: typeof fileWrite;
|
|
218
|
+
|
|
219
|
+
export declare function uploadPortfolio(
|
|
220
|
+
connectId: string,
|
|
221
|
+
params: {
|
|
222
|
+
operationId?: string;
|
|
223
|
+
packageBytes: ArrayBuffer | Uint8Array | Blob;
|
|
224
|
+
timeoutMs?: number | string;
|
|
225
|
+
}
|
|
226
|
+
): Response<FileInfo & { portfolioUpdated: true }>;
|
|
188
227
|
export declare const filesystemFileDelete: typeof fileDelete;
|
|
189
228
|
export declare const filesystemDirList: typeof dirList;
|
|
190
229
|
export declare const filesystemDirMake: typeof dirMake;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Response } from '../params';
|
|
2
|
+
|
|
3
|
+
export type ClearSessionCacheParams = {
|
|
4
|
+
deviceId?: string;
|
|
5
|
+
passphraseState?: string;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type ClearSessionCachePayload = {
|
|
9
|
+
cleared: true;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export declare function clearSessionCache(
|
|
13
|
+
params?: ClearSessionCacheParams
|
|
14
|
+
): Response<ClearSessionCachePayload>;
|
package/src/types/device.ts
CHANGED
|
@@ -157,6 +157,7 @@ export type Features = {
|
|
|
157
157
|
sdProtection: boolean | null;
|
|
158
158
|
wipeCodeProtection: boolean | null;
|
|
159
159
|
passphraseAlwaysOnDevice: boolean | null;
|
|
160
|
+
attachToPinEnabled?: boolean | null;
|
|
160
161
|
safetyChecks: string | null;
|
|
161
162
|
autoLockDelayMs: number | null;
|
|
162
163
|
displayRotation: number | null;
|
package/src/types/params.ts
CHANGED
package/src/types/settings.ts
CHANGED
|
@@ -34,17 +34,46 @@ export type ConnectSettings = {
|
|
|
34
34
|
fetchConfig?: boolean;
|
|
35
35
|
extension?: string;
|
|
36
36
|
configFetcher?: (url: string) => Promise<RemoteConfigResponse | null>;
|
|
37
|
-
/**
|
|
38
|
-
* 临时开关:Protocol V2 DevGetDeviceInfo 未稳定前用于 mock 设备信息。
|
|
39
|
-
* 正式 app 可显式设置为 false 以调用真实 DevGetDeviceInfo;固件稳定后删除。
|
|
40
|
-
*/
|
|
41
|
-
protocolV2DeviceInfoMockEnabled?: boolean;
|
|
42
37
|
};
|
|
43
38
|
|
|
44
39
|
export type IVersionArray = [number, number, number];
|
|
45
40
|
|
|
46
41
|
export type ILocale = 'zh-CN' | 'en-US';
|
|
47
42
|
|
|
43
|
+
export type IProtocolV2FirmwareComponentTarget =
|
|
44
|
+
| 'ROMLOADER'
|
|
45
|
+
| 'BOOTLOADER'
|
|
46
|
+
| 'APPLICATION_P1'
|
|
47
|
+
| 'APPLICATION_P2'
|
|
48
|
+
| 'COPROCESSOR'
|
|
49
|
+
| 'SE01'
|
|
50
|
+
| 'SE02'
|
|
51
|
+
| 'SE03'
|
|
52
|
+
| 'SE04';
|
|
53
|
+
|
|
54
|
+
export type IProtocolV2FirmwareComponent = {
|
|
55
|
+
target: IProtocolV2FirmwareComponentTarget;
|
|
56
|
+
url: string;
|
|
57
|
+
fingerprint?: string;
|
|
58
|
+
version?: IVersionArray;
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
/** Pro2 RESC bundle okpkg 描述,用于 FileWrite 直写方式增量同步资源 */
|
|
62
|
+
export type IProtocolV2ResourceBundle = {
|
|
63
|
+
/** bundle 名称,如 images / animation / translations / fonts_roobert */
|
|
64
|
+
name: string;
|
|
65
|
+
/** 下载 URL */
|
|
66
|
+
url: string;
|
|
67
|
+
/** 设备上的目标路径,如 vol0:/bundles/images/images.okpkg */
|
|
68
|
+
devicePath: string;
|
|
69
|
+
/** okpkg container 的 payload_version(用于 FileRead 比对跳过) */
|
|
70
|
+
version?: IVersionArray;
|
|
71
|
+
/** okpkg container 的 payload_hash(SHA3-512,用于 FileRead 比对) */
|
|
72
|
+
payloadHash?: string;
|
|
73
|
+
/** okpkg container 的 header_hash(SHA3-512,用于 FileRead 比对) */
|
|
74
|
+
headerHash?: string;
|
|
75
|
+
};
|
|
76
|
+
|
|
48
77
|
/** STM32 firmware config */
|
|
49
78
|
export type IFirmwareReleaseInfo = {
|
|
50
79
|
required: boolean;
|
|
@@ -63,6 +92,11 @@ export type IFirmwareReleaseInfo = {
|
|
|
63
92
|
bootloaderVersion?: IVersionArray;
|
|
64
93
|
displayBootloaderVersion?: IVersionArray;
|
|
65
94
|
bootloaderRelatedFirmwareVersion?: IVersionArray;
|
|
95
|
+
upgradeType?: 'payload-package-set' | string;
|
|
96
|
+
components?: Record<string, IProtocolV2FirmwareComponent>;
|
|
97
|
+
installOrder?: string[];
|
|
98
|
+
/** Pro2 RESC bundle 列表(FileWrite 直写增量同步模式) */
|
|
99
|
+
resourceBundles?: IProtocolV2ResourceBundle[];
|
|
66
100
|
bootloaderChangelog?: {
|
|
67
101
|
[k in ILocale]: string;
|
|
68
102
|
};
|
|
@@ -88,43 +122,16 @@ export type IBLEFirmwareReleaseInfo = {
|
|
|
88
122
|
};
|
|
89
123
|
};
|
|
90
124
|
|
|
91
|
-
type IKnownDevice = Exclude<IDeviceType, 'unknown'
|
|
125
|
+
type IKnownDevice = Exclude<IDeviceType, 'unknown'>;
|
|
92
126
|
|
|
93
|
-
/**
|
|
94
|
-
* Device firmware configuration map
|
|
95
|
-
*
|
|
96
|
-
* IMPORTANT: This type is used for firmware update logic.
|
|
97
|
-
* - DO NOT remove existing firmware fields
|
|
98
|
-
* - Only ADD new optional firmware fields for new versions
|
|
99
|
-
* - 'firmware' field is required for backward compatibility
|
|
100
|
-
* - 'ble' field is required for BLE firmware updates
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* // When adding firmware-v8:
|
|
104
|
-
* // {
|
|
105
|
-
* // firmware: IFirmwareReleaseInfo[];
|
|
106
|
-
* // 'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
107
|
-
* // 'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
108
|
-
* // 'firmware-v8'?: IFirmwareReleaseInfo[]; // New
|
|
109
|
-
* // 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
110
|
-
* // 'firmware-btc-v8'?: IFirmwareReleaseInfo[]; // New
|
|
111
|
-
* // ble: IBLEFirmwareReleaseInfo[];
|
|
112
|
-
* // }
|
|
113
|
-
*/
|
|
114
127
|
export type DeviceTypeMap = {
|
|
115
128
|
[k in IKnownDevice]: {
|
|
116
|
-
/** Base firmware field (required for backward compatibility) */
|
|
117
129
|
firmware: IFirmwareReleaseInfo[];
|
|
118
|
-
/**
|
|
130
|
+
/** Pro2 Protocol V2 payload package set */
|
|
131
|
+
'firmware-v1'?: IFirmwareReleaseInfo[];
|
|
119
132
|
'firmware-v2'?: IFirmwareReleaseInfo[];
|
|
120
|
-
/** Universal firmware v7 */
|
|
121
133
|
'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
122
|
-
/** Bitcoin-only firmware v7 */
|
|
123
134
|
'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
124
|
-
// Future firmware versions should be added here as optional fields:
|
|
125
|
-
// 'firmware-v8'?: IFirmwareReleaseInfo[];
|
|
126
|
-
// 'firmware-btc-v8'?: IFirmwareReleaseInfo[];
|
|
127
|
-
/** BLE firmware (required) */
|
|
128
135
|
ble: IBLEFirmwareReleaseInfo[];
|
|
129
136
|
};
|
|
130
137
|
};
|
|
@@ -13,14 +13,11 @@ import { PROTOBUF_MESSAGE_CONFIG } from '../data-manager/MessagesConfig';
|
|
|
13
13
|
import { getDeviceType } from './deviceInfoUtils';
|
|
14
14
|
import { getDeviceFirmwareVersion } from './deviceVersionUtils';
|
|
15
15
|
import { existCapability } from './capabilitieUtils';
|
|
16
|
+
import { getProtocolV2WalletSession } from '../protocols/protocol-v2/walletSession';
|
|
16
17
|
|
|
17
18
|
import type { Device } from '../device/Device';
|
|
18
19
|
import type { Features, IDeviceType, SupportFeatureType } from '../types';
|
|
19
20
|
|
|
20
|
-
// 生成的 GetPassphraseState 已包含 _only_main_pin / allow_create_attach_pin,
|
|
21
|
-
// 不再需要手动扩展字段。
|
|
22
|
-
type GetPassphraseStateMessage = GetPassphraseState;
|
|
23
|
-
|
|
24
21
|
export const getSupportProtocolV1MessageSchema = (
|
|
25
22
|
features: Features | undefined
|
|
26
23
|
): { messages: JSON; protocolV1MessageSchema: ProtocolV1MessageSchema } => {
|
|
@@ -92,13 +89,32 @@ export const getPassphraseStateWithRefreshDeviceInfo = async (
|
|
|
92
89
|
options?: {
|
|
93
90
|
expectPassphraseState?: string;
|
|
94
91
|
onlyMainPin?: boolean;
|
|
95
|
-
|
|
92
|
+
initSession?: boolean;
|
|
96
93
|
}
|
|
97
94
|
) => {
|
|
95
|
+
if (device.isProtocolV2()) {
|
|
96
|
+
if (!device.features) {
|
|
97
|
+
return {
|
|
98
|
+
passphraseState: undefined,
|
|
99
|
+
newSession: undefined,
|
|
100
|
+
unlockedAttachPin: undefined,
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return getProtocolV2WalletSession(device, {
|
|
105
|
+
initSession: options?.initSession,
|
|
106
|
+
expectedPassphraseState: options?.expectPassphraseState,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
98
110
|
const { features } = device;
|
|
99
111
|
const locked = features?.unlocked === false;
|
|
100
112
|
const deviceType = device.getCurrentDeviceType();
|
|
101
113
|
|
|
114
|
+
if (options?.initSession) {
|
|
115
|
+
device.clearInternalState();
|
|
116
|
+
}
|
|
117
|
+
|
|
102
118
|
const { passphraseState, newSession, unlockedAttachPin } = await getPassphraseState(device, {
|
|
103
119
|
...options,
|
|
104
120
|
});
|
|
@@ -128,14 +144,17 @@ export const getPassphraseStateWithRefreshDeviceInfo = async (
|
|
|
128
144
|
passphraseState,
|
|
129
145
|
deviceId,
|
|
130
146
|
newSession,
|
|
131
|
-
device.features?.sessionId
|
|
147
|
+
options?.initSession ? null : device.features?.sessionId
|
|
132
148
|
);
|
|
133
149
|
|
|
134
|
-
return {
|
|
150
|
+
return {
|
|
151
|
+
passphraseState,
|
|
152
|
+
newSession,
|
|
153
|
+
unlockedAttachPin: unlockedAttachPin ?? device.features?.unlockedAttachPin,
|
|
154
|
+
};
|
|
135
155
|
};
|
|
136
156
|
|
|
137
157
|
// 仅适用于 Protocol V1 的 Pro:Pro2 走独立版本线,不能套用 4.15.0 门槛
|
|
138
|
-
// (Pro2 在 getPassphraseState 中通过 isProtocolV2 直接判定支持)。
|
|
139
158
|
const supportProSeriesAttachPinPassphrase = (deviceType: IDeviceType, firmwareVersion: string) =>
|
|
140
159
|
deviceType === EDeviceType.Pro && semver.gte(firmwareVersion, '4.15.0');
|
|
141
160
|
|
|
@@ -144,7 +163,7 @@ export const getPassphraseState = async (
|
|
|
144
163
|
options?: {
|
|
145
164
|
expectPassphraseState?: string;
|
|
146
165
|
onlyMainPin?: boolean;
|
|
147
|
-
|
|
166
|
+
initSession?: boolean;
|
|
148
167
|
}
|
|
149
168
|
): Promise<{
|
|
150
169
|
passphraseState: string | undefined;
|
|
@@ -160,24 +179,24 @@ export const getPassphraseState = async (
|
|
|
160
179
|
const firmwareVersion = device.getCurrentFirmwareVersionString() ?? '0.0.0';
|
|
161
180
|
const deviceType = device.getCurrentDeviceType();
|
|
162
181
|
|
|
182
|
+
if (device.isProtocolV2()) {
|
|
183
|
+
return getProtocolV2WalletSession(device, {
|
|
184
|
+
initSession: options?.initSession,
|
|
185
|
+
expectedPassphraseState: options?.expectPassphraseState,
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
163
189
|
const supportAttachPinCapability = existCapability(
|
|
164
190
|
features,
|
|
165
191
|
Enum_Capability.Capability_AttachToPin
|
|
166
192
|
);
|
|
167
|
-
// Pro2 (Protocol V2) 协议自带 GetPassphraseState(10028),固件从首个版本即支持,
|
|
168
|
-
// 不依赖 Pro 系列的 4.15.0 版本线;V2 也没有 GetAddress Testnet 探测这条 legacy 回退路径。
|
|
169
193
|
const supportGetPassphraseState =
|
|
170
|
-
|
|
171
|
-
supportAttachPinCapability ||
|
|
172
|
-
supportProSeriesAttachPinPassphrase(deviceType, firmwareVersion);
|
|
194
|
+
supportAttachPinCapability || supportProSeriesAttachPinPassphrase(deviceType, firmwareVersion);
|
|
173
195
|
|
|
174
196
|
if (supportGetPassphraseState) {
|
|
175
|
-
const payload:
|
|
176
|
-
?
|
|
177
|
-
|
|
178
|
-
if (options?.allowCreateAttachPin) {
|
|
179
|
-
payload.allow_create_attach_pin = true;
|
|
180
|
-
}
|
|
197
|
+
const payload: GetPassphraseState = {
|
|
198
|
+
passphrase_state: options?.onlyMainPin ? undefined : options?.expectPassphraseState,
|
|
199
|
+
};
|
|
181
200
|
|
|
182
201
|
const { message, type } = await commands.typedCall(
|
|
183
202
|
'GetPassphraseState',
|
|
@@ -276,6 +295,9 @@ export const getFirmwareUpdateField = ({
|
|
|
276
295
|
if (deviceType === EDeviceType.Pro) {
|
|
277
296
|
return latestFirmwareField;
|
|
278
297
|
}
|
|
298
|
+
if (deviceType === EDeviceType.Pro2) {
|
|
299
|
+
return 'firmware-v1';
|
|
300
|
+
}
|
|
279
301
|
return 'firmware';
|
|
280
302
|
};
|
|
281
303
|
/**
|
|
@@ -319,6 +341,10 @@ export const getFirmwareUpdateFieldArray = (
|
|
|
319
341
|
return ['firmware-v8'];
|
|
320
342
|
}
|
|
321
343
|
|
|
344
|
+
if (deviceType === 'pro2') {
|
|
345
|
+
return ['firmware-v1'];
|
|
346
|
+
}
|
|
347
|
+
|
|
322
348
|
return ['firmware'];
|
|
323
349
|
};
|
|
324
350
|
|
package/src/utils/index.ts
CHANGED
|
@@ -38,6 +38,12 @@ export { getHDPath, getScriptType, getOutputScriptType } from '../api/helpers/pa
|
|
|
38
38
|
export const isBleConnect = (env: string) => env === 'react-native' || env === 'lowlevel';
|
|
39
39
|
|
|
40
40
|
export { getHomeScreenHex, getHomeScreenDefaultList, getHomeScreenSize } from './homescreen';
|
|
41
|
+
export {
|
|
42
|
+
encodePro2Wallpaper,
|
|
43
|
+
PRO2_WALLPAPER_HEIGHT,
|
|
44
|
+
PRO2_WALLPAPER_WIDTH,
|
|
45
|
+
} from './pro2Wallpaper';
|
|
46
|
+
export type { Pro2WallpaperColorFormat } from './pro2Wallpaper';
|
|
41
47
|
|
|
42
48
|
export const wait = (ms: number) =>
|
|
43
49
|
new Promise(resolve => {
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { ERRORS, HardwareErrorCode } from '@onekeyfe/hd-shared';
|
|
2
|
+
|
|
3
|
+
export const PRO2_WALLPAPER_WIDTH = 604;
|
|
4
|
+
export const PRO2_WALLPAPER_HEIGHT = 1024;
|
|
5
|
+
|
|
6
|
+
export type Pro2WallpaperColorFormat = 'RGB565' | 'RGB565A8';
|
|
7
|
+
|
|
8
|
+
const COLOR_FORMAT_RGB565 = 0x12;
|
|
9
|
+
const COLOR_FORMAT_RGB565A8 = 0x14;
|
|
10
|
+
|
|
11
|
+
const RED_THRESHOLD = [
|
|
12
|
+
1, 7, 3, 5, 0, 8, 2, 6, 7, 1, 5, 3, 8, 0, 6, 2, 3, 5, 0, 8, 2, 6, 1, 7, 5, 3, 8,
|
|
13
|
+
0, 6, 2, 7, 1, 0, 8, 2, 6, 1, 7, 3, 5, 8, 0, 6, 2, 7, 1, 5, 3, 2, 6, 1, 7, 3, 5, 0,
|
|
14
|
+
8, 6, 2, 7, 1, 5, 3, 8, 0,
|
|
15
|
+
];
|
|
16
|
+
const GREEN_THRESHOLD = [
|
|
17
|
+
1, 3, 2, 2, 3, 1, 2, 2, 2, 2, 0, 4, 2, 2, 4, 0, 3, 1, 2, 2, 1, 3, 2, 2, 2, 2, 4,
|
|
18
|
+
0, 2, 2, 0, 4, 1, 3, 2, 2, 3, 1, 2, 2, 2, 2, 0, 4, 2, 2, 4, 0, 3, 1, 2, 2, 1, 3, 2,
|
|
19
|
+
2, 2, 2, 4, 0, 2, 2, 0, 4,
|
|
20
|
+
];
|
|
21
|
+
const BLUE_THRESHOLD = [
|
|
22
|
+
5, 3, 8, 0, 6, 2, 7, 1, 3, 5, 0, 8, 2, 6, 1, 7, 8, 0, 6, 2, 7, 1, 5, 3, 0, 8, 2,
|
|
23
|
+
6, 1, 7, 3, 5, 6, 2, 7, 1, 5, 3, 8, 0, 2, 6, 1, 7, 3, 5, 0, 8, 7, 1, 5, 3, 8, 0, 6,
|
|
24
|
+
2, 1, 7, 3, 5, 0, 8, 2, 6,
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
function invalidParameter(message: string): Error {
|
|
28
|
+
return ERRORS.TypedError(HardwareErrorCode.CallMethodInvalidParameter, message);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function asBytes(rgba: Uint8Array | ArrayBuffer): Uint8Array {
|
|
32
|
+
return rgba instanceof Uint8Array ? rgba : new Uint8Array(rgba);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function align(value: number, boundary: number): number {
|
|
36
|
+
return Math.ceil(value / boundary) * boundary;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function encodePro2Wallpaper(options: {
|
|
40
|
+
width: number;
|
|
41
|
+
height: number;
|
|
42
|
+
rgba: Uint8Array | ArrayBuffer;
|
|
43
|
+
}): { data: Uint8Array; colorFormat: Pro2WallpaperColorFormat } {
|
|
44
|
+
const { width, height } = options;
|
|
45
|
+
if (!Number.isInteger(width) || width <= 0 || width > 0xffff) {
|
|
46
|
+
throw invalidParameter('Wallpaper width must be an integer between 1 and 65535.');
|
|
47
|
+
}
|
|
48
|
+
if (!Number.isInteger(height) || height <= 0 || height > 0xffff) {
|
|
49
|
+
throw invalidParameter('Wallpaper height must be an integer between 1 and 65535.');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const rgba = asBytes(options.rgba);
|
|
53
|
+
const expectedLength = width * height * 4;
|
|
54
|
+
if (rgba.byteLength !== expectedLength) {
|
|
55
|
+
throw invalidParameter(
|
|
56
|
+
`Wallpaper RGBA data length must be ${expectedLength} bytes, received ${rgba.byteLength}.`
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
let hasTransparency = false;
|
|
61
|
+
for (let index = 3; index < rgba.length; index += 4) {
|
|
62
|
+
if (rgba[index] !== 0xff) {
|
|
63
|
+
hasTransparency = true;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
const colorFormat: Pro2WallpaperColorFormat = hasTransparency ? 'RGB565A8' : 'RGB565';
|
|
69
|
+
const stride = align(width * 2, 4);
|
|
70
|
+
const alphaStride = stride / 2;
|
|
71
|
+
const rgbSize = stride * height;
|
|
72
|
+
const alphaSize = hasTransparency ? alphaStride * height : 0;
|
|
73
|
+
const data = new Uint8Array(12 + rgbSize + alphaSize);
|
|
74
|
+
const view = new DataView(data.buffer);
|
|
75
|
+
|
|
76
|
+
data[0] = 0x19;
|
|
77
|
+
data[1] = hasTransparency ? COLOR_FORMAT_RGB565A8 : COLOR_FORMAT_RGB565;
|
|
78
|
+
view.setUint16(2, 0, true);
|
|
79
|
+
view.setUint16(4, width, true);
|
|
80
|
+
view.setUint16(6, height, true);
|
|
81
|
+
view.setUint16(8, stride, true);
|
|
82
|
+
view.setUint16(10, 0, true);
|
|
83
|
+
|
|
84
|
+
for (let y = 0; y < height; y += 1) {
|
|
85
|
+
for (let x = 0; x < width; x += 1) {
|
|
86
|
+
const sourceOffset = (y * width + x) * 4;
|
|
87
|
+
const thresholdIndex = ((y & 7) << 3) + (x & 7);
|
|
88
|
+
let red = Math.min(rgba[sourceOffset] + RED_THRESHOLD[thresholdIndex], 0xff) & 0xf8;
|
|
89
|
+
let green =
|
|
90
|
+
Math.min(rgba[sourceOffset + 1] + GREEN_THRESHOLD[thresholdIndex], 0xff) & 0xfc;
|
|
91
|
+
let blue =
|
|
92
|
+
Math.min(rgba[sourceOffset + 2] + BLUE_THRESHOLD[thresholdIndex], 0xff) & 0xf8;
|
|
93
|
+
if (!hasTransparency) {
|
|
94
|
+
const alpha = rgba[sourceOffset + 3];
|
|
95
|
+
red = (red * alpha) >> 8;
|
|
96
|
+
green = (green * alpha) >> 8;
|
|
97
|
+
blue = (blue * alpha) >> 8;
|
|
98
|
+
}
|
|
99
|
+
const rgb565 = ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
|
|
100
|
+
const rgbOffset = 12 + y * stride + x * 2;
|
|
101
|
+
data[rgbOffset] = rgb565 & 0xff;
|
|
102
|
+
data[rgbOffset + 1] = rgb565 >> 8;
|
|
103
|
+
|
|
104
|
+
if (hasTransparency) {
|
|
105
|
+
data[12 + rgbSize + y * alphaStride + x] = rgba[sourceOffset + 3];
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return { data, colorFormat };
|
|
111
|
+
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseMethod } from '../BaseMethod';
|
|
2
|
-
import type { DeviceRebootParams } from './helpers';
|
|
3
|
-
export default class DevReboot extends BaseMethod<DeviceRebootParams> {
|
|
4
|
-
init(): void;
|
|
5
|
-
run(): Promise<import("packages/hd-transport/dist").Success>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=DevReboot.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DevReboot.d.ts","sourceRoot":"","sources":["../../../src/api/protocol-v2/DevReboot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAG3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,UAAU,CAAC,kBAAkB,CAAC;IACnE,IAAI;IAWE,GAAG;CAMV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceGetDeviceInfo.d.ts","sourceRoot":"","sources":["../../../src/api/protocol-v2/DeviceGetDeviceInfo.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,MAAM,0BAA0B,GAAG;IACvC,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,CAAC,EAAE,0BAA0B,CAAC;IACrC,KAAK,CAAC,EAAE,wBAAwB,CAAC;CAClC,CAAC;AAmDF,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,UAAU,CAAC;IAC1D,OAAO,EAAE,0BAA0B,CAAC;IACpC,KAAK,EAAE,wBAAwB,CAAC;CACjC,CAAC;IACA,IAAI;IAmBE,GAAG;CAgBV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DeviceGetOnboardingStatus.d.ts","sourceRoot":"","sources":["../../../src/api/protocol-v2/DeviceGetOnboardingStatus.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,UAAU;IAC/D,IAAI;IAQE,GAAG;CAIV"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BaseMethod } from '../BaseMethod';
|
|
2
|
-
import type { FactoryDeviceInfoSettingsParams } from './helpers';
|
|
3
|
-
export default class FactoryDeviceInfoSettings extends BaseMethod<FactoryDeviceInfoSettingsParams> {
|
|
4
|
-
init(): void;
|
|
5
|
-
run(): Promise<import("packages/hd-transport/dist").Success>;
|
|
6
|
-
}
|
|
7
|
-
//# sourceMappingURL=FactoryDeviceInfoSettings.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FactoryDeviceInfoSettings.d.ts","sourceRoot":"","sources":["../../../src/api/protocol-v2/FactoryDeviceInfoSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,WAAW,CAAC;AAEjE,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,UAAU,CAAC,+BAA+B,CAAC;IAChG,IAAI;IAeE,GAAG;CAQV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FactoryGetDeviceInfo.d.ts","sourceRoot":"","sources":["../../../src/api/protocol-v2/FactoryGetDeviceInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,UAAU;IAC1D,IAAI;IAQE,GAAG;CAQV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FilesystemFixPermission.d.ts","sourceRoot":"","sources":["../../../src/api/protocol-v2/FilesystemFixPermission.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,UAAU;IAC7D,IAAI;IAQE,GAAG;CAIV"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GetProtoVersion.d.ts","sourceRoot":"","sources":["../../../src/api/protocol-v2/GetProtoVersion.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,UAAU;IACrD,IAAI;IAQE,GAAG;CAIV"}
|