@onekeyfe/hd-core 1.2.0-alpha.17 → 1.2.0-alpha.19

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.
Files changed (154) hide show
  1. package/__tests__/DeviceEventRegistration.test.ts +3 -0
  2. package/__tests__/device-features-state.test.ts +78 -0
  3. package/__tests__/device-identity.test.ts +30 -0
  4. package/__tests__/device-pool-state.test.ts +113 -0
  5. package/__tests__/device-settings.test.ts +108 -0
  6. package/__tests__/device-state-contract.test.ts +27 -0
  7. package/__tests__/device-state-events.test.ts +163 -0
  8. package/__tests__/device-state-mapper.test.ts +222 -0
  9. package/__tests__/device-state-projector.test.ts +94 -0
  10. package/__tests__/device-state-store.test.ts +115 -0
  11. package/__tests__/device-wallet-session-store.test.ts +46 -0
  12. package/__tests__/deviceFeaturesUtils.test.ts +13 -1
  13. package/__tests__/deviceSettings.test.ts +54 -0
  14. package/__tests__/get-device-state.test.ts +367 -0
  15. package/__tests__/kaspaSignTransaction.test.ts +591 -0
  16. package/__tests__/logBlockEvent.test.ts +13 -0
  17. package/__tests__/protocol-v2.test.ts +358 -413
  18. package/__tests__/public-device-state-api.test.ts +153 -0
  19. package/__tests__/refresh-device-state.test.ts +101 -0
  20. package/__tests__/request-context-logging.test.ts +16 -0
  21. package/__tests__/search-devices.test.ts +93 -0
  22. package/dist/api/ClearSessionCache.d.ts.map +1 -1
  23. package/dist/api/FirmwareUpdateV4.d.ts.map +1 -1
  24. package/dist/api/GetDeviceState.d.ts +7 -0
  25. package/dist/api/GetDeviceState.d.ts.map +1 -0
  26. package/dist/api/GetFeatures.d.ts +1 -1
  27. package/dist/api/GetFeatures.d.ts.map +1 -1
  28. package/dist/api/GetOnekeyFeatures.d.ts.map +1 -1
  29. package/dist/api/GetPassphraseState.d.ts.map +1 -1
  30. package/dist/api/SearchDevices.d.ts.map +1 -1
  31. package/dist/api/device/DeviceRebootToBoardloader.d.ts.map +1 -1
  32. package/dist/api/device/DeviceRebootToBootloader.d.ts.map +1 -1
  33. package/dist/api/device/DeviceSettings.d.ts.map +1 -1
  34. package/dist/api/index.d.ts +1 -4
  35. package/dist/api/index.d.ts.map +1 -1
  36. package/dist/api/internal.d.ts +4 -0
  37. package/dist/api/internal.d.ts.map +1 -0
  38. package/dist/api/kaspa/KaspaSignTransaction.d.ts +5 -1
  39. package/dist/api/kaspa/KaspaSignTransaction.d.ts.map +1 -1
  40. package/dist/api/kaspa/helpers/TransferSerialize.d.ts.map +1 -1
  41. package/dist/api/protocol-v2/DeviceInfoGet.d.ts +0 -1
  42. package/dist/api/protocol-v2/DeviceInfoGet.d.ts.map +1 -1
  43. package/dist/api/protocol-v2/DeviceReboot.d.ts.map +1 -1
  44. package/dist/api/protocol-v2/DeviceSettingsGet.d.ts.map +1 -1
  45. package/dist/api/protocol-v2/DeviceSettingsSet.d.ts.map +1 -1
  46. package/dist/api/protocol-v2/DeviceStatusGet.d.ts.map +1 -1
  47. package/dist/api/utils.d.ts +2 -1
  48. package/dist/api/utils.d.ts.map +1 -1
  49. package/dist/constants/index.d.ts +1 -1
  50. package/dist/constants/index.d.ts.map +1 -1
  51. package/dist/core/index.d.ts.map +1 -1
  52. package/dist/device/Device.d.ts +22 -3
  53. package/dist/device/Device.d.ts.map +1 -1
  54. package/dist/device/DeviceCommands.d.ts +4 -4
  55. package/dist/device/DeviceFeaturesState.d.ts +4 -0
  56. package/dist/device/DeviceFeaturesState.d.ts.map +1 -0
  57. package/dist/device/DevicePool.d.ts +1 -0
  58. package/dist/device/DevicePool.d.ts.map +1 -1
  59. package/dist/device/DeviceStateMapper.d.ts +13 -0
  60. package/dist/device/DeviceStateMapper.d.ts.map +1 -0
  61. package/dist/device/DeviceStateProjector.d.ts +8 -0
  62. package/dist/device/DeviceStateProjector.d.ts.map +1 -0
  63. package/dist/device/DeviceStateStore.d.ts +23 -0
  64. package/dist/device/DeviceStateStore.d.ts.map +1 -0
  65. package/dist/device/deviceIdentity.d.ts +5 -0
  66. package/dist/device/deviceIdentity.d.ts.map +1 -0
  67. package/dist/deviceProfile/buildDeviceFeatures.d.ts.map +1 -1
  68. package/dist/deviceProfile/index.d.ts +0 -1
  69. package/dist/deviceProfile/index.d.ts.map +1 -1
  70. package/dist/events/device.d.ts +7 -2
  71. package/dist/events/device.d.ts.map +1 -1
  72. package/dist/index.d.ts +722 -648
  73. package/dist/index.js +1863 -1033
  74. package/dist/inject.d.ts.map +1 -1
  75. package/dist/protocols/protocol-v2/features.d.ts +1 -0
  76. package/dist/protocols/protocol-v2/features.d.ts.map +1 -1
  77. package/dist/protocols/protocol-v2/index.d.ts +1 -1
  78. package/dist/protocols/protocol-v2/index.d.ts.map +1 -1
  79. package/dist/protocols/protocol-v2/walletSession.d.ts.map +1 -1
  80. package/dist/types/api/deviceSettings.d.ts +8 -0
  81. package/dist/types/api/deviceSettings.d.ts.map +1 -1
  82. package/dist/types/api/getDeviceState.d.ts +12 -0
  83. package/dist/types/api/getDeviceState.d.ts.map +1 -0
  84. package/dist/types/api/index.d.ts +4 -7
  85. package/dist/types/api/index.d.ts.map +1 -1
  86. package/dist/types/api/kaspaSignTransaction.d.ts +27 -2
  87. package/dist/types/api/kaspaSignTransaction.d.ts.map +1 -1
  88. package/dist/types/api/protocolV2.d.ts +1 -6
  89. package/dist/types/api/protocolV2.d.ts.map +1 -1
  90. package/dist/types/device.d.ts +121 -1
  91. package/dist/types/device.d.ts.map +1 -1
  92. package/dist/utils/deviceFeaturesUtils.d.ts.map +1 -1
  93. package/dist/utils/deviceSettings.d.ts.map +1 -1
  94. package/dist/utils/patch.d.ts +1 -1
  95. package/dist/utils/patch.d.ts.map +1 -1
  96. package/dist/utils/tracing.d.ts.map +1 -1
  97. package/package.json +4 -4
  98. package/src/api/ClearSessionCache.ts +4 -0
  99. package/src/api/FirmwareUpdateV4.ts +15 -7
  100. package/src/api/GetDeviceState.ts +55 -0
  101. package/src/api/GetFeatures.ts +8 -3
  102. package/src/api/GetOnekeyFeatures.ts +3 -72
  103. package/src/api/GetPassphraseState.ts +3 -1
  104. package/src/api/SearchDevices.ts +25 -4
  105. package/src/api/device/DeviceRebootToBoardloader.ts +1 -0
  106. package/src/api/device/DeviceRebootToBootloader.ts +1 -0
  107. package/src/api/device/DeviceSettings.ts +28 -0
  108. package/src/api/index.ts +1 -4
  109. package/src/api/internal.ts +9 -0
  110. package/src/api/kaspa/KaspaSignTransaction.ts +341 -22
  111. package/src/api/kaspa/helpers/TransferSerialize.ts +14 -0
  112. package/src/api/protocol-v2/DeviceInfoGet.ts +3 -5
  113. package/src/api/protocol-v2/DeviceReboot.ts +3 -1
  114. package/src/api/protocol-v2/DeviceSettingsGet.ts +3 -1
  115. package/src/api/protocol-v2/DeviceSettingsSet.ts +2 -0
  116. package/src/api/protocol-v2/DeviceStatusGet.ts +1 -0
  117. package/src/api/utils.ts +9 -3
  118. package/src/constants/index.ts +1 -4
  119. package/src/core/index.ts +7 -1
  120. package/src/data/messages/messages-protocol-v2.json +22 -13
  121. package/src/data/messages/messages.json +286 -1
  122. package/src/device/Device.ts +256 -78
  123. package/src/device/DeviceFeaturesState.ts +34 -0
  124. package/src/device/DevicePool.ts +35 -9
  125. package/src/device/DeviceStateMapper.ts +364 -0
  126. package/src/device/DeviceStateProjector.ts +92 -0
  127. package/src/device/DeviceStateStore.ts +242 -0
  128. package/src/device/deviceIdentity.ts +18 -0
  129. package/src/deviceProfile/buildDeviceFeatures.ts +166 -109
  130. package/src/deviceProfile/index.ts +0 -1
  131. package/src/events/device.ts +13 -1
  132. package/src/events/logBlockEvent.ts +1 -1
  133. package/src/inject.ts +4 -5
  134. package/src/protocols/protocol-v2/features.ts +18 -9
  135. package/src/protocols/protocol-v2/index.ts +1 -0
  136. package/src/protocols/protocol-v2/walletSession.ts +5 -7
  137. package/src/types/api/deviceSettings.ts +8 -0
  138. package/src/types/api/getDeviceState.ts +19 -0
  139. package/src/types/api/index.ts +3 -20
  140. package/src/types/api/kaspaSignTransaction.ts +40 -2
  141. package/src/types/api/protocolV2.ts +0 -24
  142. package/src/types/device.ts +148 -1
  143. package/src/utils/deviceFeaturesUtils.ts +5 -1
  144. package/src/utils/deviceSettings.ts +41 -0
  145. package/src/utils/tracing.ts +3 -1
  146. package/dist/api/GetDeviceInfo.d.ts +0 -9
  147. package/dist/api/GetDeviceInfo.d.ts.map +0 -1
  148. package/dist/deviceProfile/buildDeviceProfile.d.ts +0 -22
  149. package/dist/deviceProfile/buildDeviceProfile.d.ts.map +0 -1
  150. package/dist/types/api/getDeviceInfo.d.ts +0 -88
  151. package/dist/types/api/getDeviceInfo.d.ts.map +0 -1
  152. package/src/api/GetDeviceInfo.ts +0 -152
  153. package/src/deviceProfile/buildDeviceProfile.ts +0 -370
  154. package/src/types/api/getDeviceInfo.ts +0 -106
@@ -0,0 +1,19 @@
1
+ import type { DeviceState, DeviceStateSection } from '../device';
2
+ import type { CommonParams, Response } from '../params';
3
+
4
+ export type DeviceStateScope = 'runtime' | 'settings' | 'firmware';
5
+
6
+ export type GetDeviceStateParams = CommonParams & {
7
+ scope?: DeviceStateScope;
8
+ };
9
+
10
+ /** SDK 内部状态读取选项,不属于公共 CoreApi。 */
11
+ export type DeviceStateReadOptions = {
12
+ refreshSections?: DeviceStateSection[];
13
+ includeRaw?: boolean;
14
+ };
15
+
16
+ export declare function getDeviceState(
17
+ connectId?: string,
18
+ params?: GetDeviceStateParams
19
+ ): Response<DeviceState>;
@@ -4,13 +4,10 @@ import type {
4
4
  deviceFirmwareUpdate,
5
5
  deviceGetFirmwareUpdateStatus,
6
6
  deviceGetOnboardingStatus,
7
- deviceInfoGet,
8
7
  deviceReboot,
9
8
  deviceSessionOpen,
10
- deviceSettingsGet,
11
9
  deviceSettingsPageShow,
12
10
  deviceSettingsSet,
13
- deviceStatusGet,
14
11
  deviceUploadWallpaper,
15
12
  dirList,
16
13
  dirMake,
@@ -46,7 +43,7 @@ import type { checkAllFirmwareRelease } from './checkAllFirmwareRelease';
46
43
  import type { checkFirmwareTypeAvailable } from './checkFirmwareTypeAvailable';
47
44
  import type { searchDevices } from './searchDevices';
48
45
  import type { getFeatures } from './getFeatures';
49
- import type { getDeviceInfo } from './getDeviceInfo';
46
+ import type { getDeviceState } from './getDeviceState';
50
47
  import type { getOnekeyFeatures } from './getOnekeyFeatures';
51
48
  import type { getPassphraseState } from './getPassphraseState';
52
49
  import type { checkFirmwareRelease } from './checkFirmwareRelease';
@@ -172,18 +169,7 @@ import type { neoSignTransaction } from './neoSignTransaction';
172
169
  import type { ConnectSettings } from '../settings';
173
170
 
174
171
  export * from './export';
175
- export type {
176
- DeviceInfoMode,
177
- DeviceInfoProtocol,
178
- DeviceInfoScope,
179
- DeviceInfoSource,
180
- DeviceInfoStatus,
181
- DeviceProfile,
182
- GetDeviceInfoParams,
183
- DeviceProfileRaw,
184
- DeviceProfileVerify,
185
- DeviceProfileVersions,
186
- } from './getDeviceInfo';
172
+ export type { DeviceStateScope, GetDeviceStateParams } from './getDeviceState';
187
173
  export type { GetPassphraseStateParams } from './getPassphraseState';
188
174
  export type { ClearSessionCacheParams, ClearSessionCachePayload } from './sessionCache';
189
175
 
@@ -227,7 +213,7 @@ export type CoreApi = {
227
213
  searchDevices: typeof searchDevices;
228
214
  promptWebDeviceAccess: typeof promptWebDeviceAccess;
229
215
  getFeatures: typeof getFeatures;
230
- getDeviceInfo: typeof getDeviceInfo;
216
+ getDeviceState: typeof getDeviceState;
231
217
  getOnekeyFeatures: typeof getOnekeyFeatures;
232
218
  getPassphraseState: typeof getPassphraseState;
233
219
  deviceBackup: typeof deviceBackup;
@@ -264,15 +250,12 @@ export type CoreApi = {
264
250
  protocolInfoRequest: typeof protocolInfoRequest;
265
251
  ping: typeof ping;
266
252
  deviceReboot: typeof deviceReboot;
267
- deviceInfoGet: typeof deviceInfoGet;
268
- deviceStatusGet: typeof deviceStatusGet;
269
253
  deviceGetOnboardingStatus: typeof deviceGetOnboardingStatus;
270
254
  deviceSessionOpen: typeof deviceSessionOpen;
271
255
  deviceFirmwareUpdate: typeof deviceFirmwareUpdate;
272
256
  deviceGetFirmwareUpdateStatus: typeof deviceGetFirmwareUpdateStatus;
273
257
  deviceFactoryInfoSet: typeof deviceFactoryInfoSet;
274
258
  deviceFactoryInfoGet: typeof deviceFactoryInfoGet;
275
- deviceSettingsGet: typeof deviceSettingsGet;
276
259
  deviceSettingsSet: typeof deviceSettingsSet;
277
260
  deviceSettingsPageShow: typeof deviceSettingsPageShow;
278
261
  deviceUploadWallpaper: typeof deviceUploadWallpaper;
@@ -13,15 +13,47 @@ export type KaspaSignInputParams = {
13
13
  sequenceNumber: number | string;
14
14
  output: {
15
15
  satoshis: number | string;
16
- script: string;
16
+ // Required by the legacy host-prehash flow; unused by the streaming protocol.
17
+ script?: string;
17
18
  };
18
19
  sigOpCount?: number;
19
20
  };
20
21
 
21
22
  export type KaspaSignOutputParams = {
22
23
  satoshis: number | string;
24
+ // Streaming protocol describes outputs by address; the device builds the script itself.
25
+ // `address` for an external output, `addressN` (BIP-32 path) for a change output.
26
+ address?: string;
27
+ addressN?: string | number[];
28
+ // Legacy host-prehash fields, unused by the streaming protocol but kept for compatibility.
29
+ script?: string;
30
+ scriptVersion?: number;
31
+ };
32
+
33
+ // Referenced (previous) transactions for the streaming protocol's input
34
+ // verification: the device may ask for the transactions the inputs spend from
35
+ // (selected by prev_tx_id) to verify input amounts on-device.
36
+ export type KaspaRefTransactionInput = {
37
+ prevTxId: string;
38
+ outputIndex: number;
39
+ sequenceNumber: number | string;
40
+ };
41
+
42
+ export type KaspaRefTransactionOutput = {
43
+ satoshis: number | string;
44
+ scriptVersion?: number;
23
45
  script: string;
24
- scriptVersion: number;
46
+ };
47
+
48
+ export type KaspaRefTransaction = {
49
+ txId: string;
50
+ version: number;
51
+ inputs: KaspaRefTransactionInput[];
52
+ outputs: KaspaRefTransactionOutput[];
53
+ lockTime?: number | string;
54
+ subNetworkID?: string;
55
+ gas?: number | string;
56
+ payload?: string;
25
57
  };
26
58
 
27
59
  export type KaspaSignTransactionParams = {
@@ -32,6 +64,12 @@ export type KaspaSignTransactionParams = {
32
64
  sigHashType?: SignatureType;
33
65
  sigOpCount?: number;
34
66
  subNetworkID?: string;
67
+ // Optional transaction payload (hex), streamed to the device in chunks.
68
+ payload?: string;
69
+ gas?: number | string;
70
+ // Previous transactions referenced by the inputs, required only when the
71
+ // device requests them for on-device input-amount verification.
72
+ refTxs?: KaspaRefTransaction[];
35
73
  scheme?: string;
36
74
  prefix?: string;
37
75
  useTweak?: boolean; // default is true
@@ -4,10 +4,7 @@ import type {
4
4
  DeviceFactoryInfo,
5
5
  DeviceFirmwareUpdateStatus,
6
6
  DeviceSession,
7
- DeviceSettings,
8
- DeviceStatus,
9
7
  ProtocolInfo,
10
- ProtocolV2DeviceInfo,
11
8
  Success,
12
9
  } from '@onekeyfe/hd-transport';
13
10
  import type {
@@ -16,7 +13,6 @@ import type {
16
13
  DeviceFirmwareUpdateStatusGetParams,
17
14
  DeviceRebootParams,
18
15
  } from '../../api/protocol-v2/helpers';
19
- import type { DeviceInfoGetParams } from '../../api/protocol-v2/DeviceInfoGet';
20
16
  import type { DeviceSessionOpenParams } from '../../api/protocol-v2/DeviceSessionOpen';
21
17
  import type { DeviceSettingsSetParams } from '../../api/protocol-v2/DeviceSettingsSet';
22
18
  import type { DeviceSettingsPageShowParams } from '../../api/protocol-v2/DeviceSettingsPageShow';
@@ -34,11 +30,6 @@ export type {
34
30
  DeviceFactoryInfoSetParams,
35
31
  RebootTypeInput,
36
32
  } from '../../api/protocol-v2/helpers';
37
- export type {
38
- DeviceInfoGetParams,
39
- DeviceInfoGetTargets,
40
- DeviceInfoGetTypes,
41
- } from '../../api/protocol-v2/DeviceInfoGet';
42
33
  export type { DeviceSessionOpenParams } from '../../api/protocol-v2/DeviceSessionOpen';
43
34
  export type { DeviceSettingsSetParams } from '../../api/protocol-v2/DeviceSettingsSet';
44
35
  export type {
@@ -104,16 +95,6 @@ export declare function deviceReboot(
104
95
  params: CommonParams & DeviceRebootParams
105
96
  ): Response<Success>;
106
97
 
107
- export declare function deviceInfoGet(
108
- connectId: string,
109
- params?: CommonParams & DeviceInfoGetParams
110
- ): Response<ProtocolV2DeviceInfo>;
111
-
112
- export declare function deviceStatusGet(
113
- connectId: string,
114
- params?: CommonParams
115
- ): Response<DeviceStatus>;
116
-
117
98
  export declare function deviceGetOnboardingStatus(
118
99
  connectId: string,
119
100
  params?: CommonParams
@@ -144,11 +125,6 @@ export declare function deviceFactoryInfoGet(
144
125
  params?: CommonParams
145
126
  ): Response<DeviceFactoryInfo>;
146
127
 
147
- export declare function deviceSettingsGet(
148
- connectId: string,
149
- params?: CommonParams
150
- ): Response<DeviceSettings>;
151
-
152
128
  export declare function deviceSettingsSet(
153
129
  connectId: string,
154
130
  params: CommonParams & DeviceSettingsSetParams
@@ -3,9 +3,9 @@ import { EDeviceType, type EFirmwareType } from '@onekeyfe/hd-shared';
3
3
  import type { IVersionArray } from './settings';
4
4
  import type { PROTO } from '../constants';
5
5
  import type {
6
- DeviceStatus as ProtocolV2DeviceStatus,
7
6
  OneKeyDeviceCommType,
8
7
  ProtocolV2DeviceInfo,
8
+ DeviceStatus as ProtocolV2DeviceStatus,
9
9
  } from '@onekeyfe/hd-transport';
10
10
 
11
11
  export type DeviceStatus = 'available' | 'occupied' | 'used';
@@ -35,9 +35,13 @@ export type KnownDevice = {
35
35
  label: string;
36
36
  bleName: string | null;
37
37
  name: string;
38
+ /** 用户可见名称:优先设备标签;name 继续表示连接/发现名称。 */
39
+ displayName?: string;
38
40
  error?: typeof undefined;
39
41
  mode: EOneKeyDeviceMode;
40
42
  features?: Features;
43
+ /** SDK 统一设备状态快照。features 仅作为旧 API 兼容投影保留。 */
44
+ state?: DeviceState;
41
45
  sessionId?: string | null;
42
46
  unavailableCapabilities: UnavailableCapabilities;
43
47
  bleFirmwareVersion: IVersionArray | null;
@@ -55,6 +59,7 @@ export type SearchDevice = {
55
59
  deviceId: string | null;
56
60
  deviceType: IDeviceType;
57
61
  name: string;
62
+ displayName?: string;
58
63
  commType: OneKeyDeviceCommType;
59
64
  };
60
65
 
@@ -134,6 +139,137 @@ export type DeviceFeaturesRaw = {
134
139
  protocolV2DeviceStatus?: ProtocolV2DeviceStatus;
135
140
  };
136
141
 
142
+ export type DeviceFeaturesRawPatch = {
143
+ [Key in keyof DeviceFeaturesRaw]?: DeviceFeaturesRaw[Key] | null;
144
+ };
145
+
146
+ export type DeviceStateProtocol = DeviceFeaturesProtocol;
147
+ export type DeviceStateMode = DeviceFeaturesMode;
148
+ export type DeviceStateSection = 'identity' | 'status' | 'settings' | 'versions' | 'verification';
149
+
150
+ export type DeviceStateUpdateSource =
151
+ | 'initialize'
152
+ | 'device-info'
153
+ | 'device-status'
154
+ | 'apply-settings'
155
+ | 'change-pin'
156
+ | 'lock'
157
+ | 'unlock'
158
+ | 'passphrase'
159
+ | 'session-clear'
160
+ | 'firmware-update'
161
+ | 'transport-reconnect'
162
+ | 'compatibility';
163
+
164
+ export type DeviceStateIdentity = {
165
+ deviceType: IDeviceType;
166
+ firmwareType: EFirmwareType;
167
+ model: string | null;
168
+ vendor: string | null;
169
+ deviceId: string | null;
170
+ serialNo: string;
171
+ label: string | null;
172
+ bleName: string | null;
173
+ displayName: string;
174
+ };
175
+
176
+ export type DeviceStateStatus = {
177
+ mode: DeviceStateMode;
178
+ initialized: boolean | null;
179
+ unlocked: boolean | null;
180
+ firmwarePresent: boolean | null;
181
+ backupRequired: boolean | null;
182
+ noBackup: boolean | null;
183
+ unfinishedBackup: boolean | null;
184
+ recoveryMode: boolean | null;
185
+ passphraseProtection: boolean | null;
186
+ pinProtection: boolean | null;
187
+ attachToPinEnabled: boolean | null;
188
+ unlockedAttachPin: boolean | null;
189
+ };
190
+
191
+ export type DeviceStateSettings = {
192
+ language: string | null;
193
+ bleEnabled: boolean | null;
194
+ sdCardPresent: boolean | null;
195
+ sdProtection: boolean | null;
196
+ wipeCodeProtection: boolean | null;
197
+ passphraseAlwaysOnDevice: boolean | null;
198
+ safetyChecks: string | null;
199
+ autoLockDelayMs: number | null;
200
+ autoShutdownDelayMs: number | null;
201
+ displayRotation: number | null;
202
+ experimentalFeatures: boolean | null;
203
+ wallpaperPath: string | null;
204
+ brightness: number | null;
205
+ animationEnabled: boolean | null;
206
+ tapToWake: boolean | null;
207
+ hapticFeedback: boolean | null;
208
+ deviceNameDisplayEnabled: boolean | null;
209
+ airgapMode: boolean | null;
210
+ fidoEnabled: boolean | null;
211
+ usbLockEnabled: boolean | null;
212
+ randomKeypad: boolean | null;
213
+ };
214
+
215
+ export type DeviceStateVersions = {
216
+ firmware: string | null;
217
+ bootloader: string | null;
218
+ board: string | null;
219
+ ble: string | null;
220
+ /** Protocol V1 legacy secure-element firmware version (`se_ver`). */
221
+ se?: string | null;
222
+ se01?: string | null;
223
+ se02?: string | null;
224
+ se03?: string | null;
225
+ se04?: string | null;
226
+ se01Boot?: string | null;
227
+ se02Boot?: string | null;
228
+ se03Boot?: string | null;
229
+ se04Boot?: string | null;
230
+ };
231
+
232
+ export type DeviceStateSession = {
233
+ sessionId: string | null;
234
+ passphraseState?: string;
235
+ };
236
+
237
+ export type DeviceState = {
238
+ schemaVersion: 1;
239
+ revision: number;
240
+ updatedAt: number;
241
+ protocol: DeviceStateProtocol;
242
+ /** 设备协议消息中的版本号;与 SDK 的 V1/V2 协议族相互独立。 */
243
+ protocolVersion: number | null;
244
+ identity: DeviceStateIdentity;
245
+ status: DeviceStateStatus;
246
+ settings: DeviceStateSettings;
247
+ versions: DeviceStateVersions;
248
+ capabilities: Array<number | string>;
249
+ verification?: Partial<DeviceFeaturesVerify>;
250
+ };
251
+
252
+ export type DeviceStatePatch = {
253
+ protocol?: DeviceStateProtocol;
254
+ protocolVersion?: number | null;
255
+ identity?: Partial<DeviceStateIdentity>;
256
+ status?: Partial<DeviceStateStatus>;
257
+ settings?: Partial<DeviceStateSettings>;
258
+ versions?: Partial<DeviceStateVersions>;
259
+ capabilities?: Array<number | string>;
260
+ verification?: DeviceFeaturesVerify;
261
+ session?: Partial<DeviceStateSession> | null;
262
+ raw?: DeviceFeaturesRawPatch;
263
+ };
264
+
265
+ export type DeviceStateEvent = {
266
+ connectId: string | null;
267
+ state: DeviceState;
268
+ revision: number;
269
+ source: DeviceStateUpdateSource;
270
+ changedKeys: string[];
271
+ };
272
+
137
273
  export type NormalizedFeatures = {
138
274
  protocol: DeviceFeaturesProtocol;
139
275
  protocolVersion?: number | null;
@@ -166,8 +302,19 @@ export type NormalizedFeatures = {
166
302
  attachToPinEnabled?: boolean | null;
167
303
  safetyChecks: string | null;
168
304
  autoLockDelayMs: number | null;
305
+ autoShutdownDelayMs: number | null;
169
306
  displayRotation: number | null;
170
307
  experimentalFeatures: boolean | null;
308
+ wallpaperPath: string | null;
309
+ brightness: number | null;
310
+ animationEnabled: boolean | null;
311
+ tapToWake: boolean | null;
312
+ hapticFeedback: boolean | null;
313
+ deviceNameDisplayEnabled: boolean | null;
314
+ airgapMode: boolean | null;
315
+ fidoEnabled: boolean | null;
316
+ usbLockEnabled: boolean | null;
317
+ randomKeypad: boolean | null;
171
318
  firmwareVersion: string | null;
172
319
  bootloaderVersion: string | null;
173
320
  boardVersion: string | null;
@@ -70,7 +70,11 @@ export const supportInputPinOnSoftware = (features: Features): SupportFeatureTyp
70
70
  if (!features) return { support: false };
71
71
 
72
72
  const deviceType = getDeviceType(features);
73
- if (deviceType === EDeviceType.Touch || deviceType === EDeviceType.Pro) {
73
+ if (
74
+ deviceType === EDeviceType.Touch ||
75
+ deviceType === EDeviceType.Pro ||
76
+ deviceType === EDeviceType.Pro2
77
+ ) {
74
78
  return { support: false };
75
79
  }
76
80
 
@@ -19,6 +19,26 @@ export const LANGUAGE_LABELS = {
19
19
  export type LanguageKey = keyof typeof LANGUAGE_LABELS;
20
20
  export type LanguageOption = { code: LanguageKey; label: (typeof LANGUAGE_LABELS)[LanguageKey] };
21
21
 
22
+ const PRO2_LANGUAGE_OPTIONS = [
23
+ { code: 'en-Latn-US', label: 'English' },
24
+ { code: 'zh-Hans-CN', label: '简体中文' },
25
+ { code: 'zh-Hant-HK', label: '繁體中文(香港)' },
26
+ { code: 'zh-Hant-TW', label: '繁體中文(台灣)' },
27
+ { code: 'ja-Jpan-JP', label: '日本語' },
28
+ { code: 'ko-Kore-KR', label: '한국어' },
29
+ { code: 'fr-Latn-FR', label: 'Français' },
30
+ { code: 'de-Latn-DE', label: 'Deutsch' },
31
+ { code: 'ru-Cyrl-RU', label: 'Русский' },
32
+ { code: 'es-Latn-ES', label: 'Español' },
33
+ { code: 'it-Latn-IT', label: 'Italiano' },
34
+ { code: 'pt-Latn-BR', label: 'Portuguese (Brazil)' },
35
+ { code: 'vi-Latn-VN', label: 'Tiếng Việt' },
36
+ { code: 'tr-Latn-TR', label: 'Türkçe' },
37
+ { code: 'id-Latn-ID', label: 'Bahasa Indonesia' },
38
+ { code: 'fil-Latn-PH', label: 'Filipino' },
39
+ { code: 'uk-Cyrl-UA', label: 'Українська' },
40
+ ] as const;
41
+
22
42
  export const getLanguageConfig = (deviceType: IDeviceType): Record<string, string>[] => {
23
43
  let keys: LanguageKey[] = [];
24
44
 
@@ -36,6 +56,8 @@ export const getLanguageConfig = (deviceType: IDeviceType): Record<string, strin
36
56
  case EDeviceType.Pro:
37
57
  keys = Object.keys(LANGUAGE_LABELS) as LanguageKey[];
38
58
  break;
59
+ case EDeviceType.Pro2:
60
+ return PRO2_LANGUAGE_OPTIONS.map(option => ({ ...option }));
39
61
  default:
40
62
  keys = [];
41
63
  break;
@@ -75,6 +97,16 @@ export const getAutoLockOptions = (_deviceType: IDeviceType): DurationParts[] =>
75
97
  { seconds: 0, minute: 30, hour: 0, day: 0 },
76
98
  { seconds: 0, minute: 0, hour: 0, day: 0 },
77
99
  ];
100
+ case EDeviceType.Pro2:
101
+ return [
102
+ { seconds: 30, minute: 0, hour: 0, day: 0 },
103
+ { seconds: 0, minute: 1, hour: 0, day: 0 },
104
+ { seconds: 0, minute: 2, hour: 0, day: 0 },
105
+ { seconds: 0, minute: 5, hour: 0, day: 0 },
106
+ { seconds: 0, minute: 10, hour: 0, day: 0 },
107
+ { seconds: 0, minute: 30, hour: 0, day: 0 },
108
+ { seconds: 0, minute: 0, hour: 0, day: 0 },
109
+ ];
78
110
  default:
79
111
  return [];
80
112
  }
@@ -103,6 +135,15 @@ export const getAutoShutDownOptions = (_deviceType: IDeviceType): DurationParts[
103
135
  { seconds: 0, minute: 10, hour: 0, day: 0 },
104
136
  { seconds: 0, minute: 0, hour: 0, day: 0 },
105
137
  ];
138
+ case EDeviceType.Pro2:
139
+ return [
140
+ { seconds: 0, minute: 1, hour: 0, day: 0 },
141
+ { seconds: 0, minute: 2, hour: 0, day: 0 },
142
+ { seconds: 0, minute: 5, hour: 0, day: 0 },
143
+ { seconds: 0, minute: 10, hour: 0, day: 0 },
144
+ { seconds: 0, minute: 30, hour: 0, day: 0 },
145
+ { seconds: 0, minute: 0, hour: 0, day: 0 },
146
+ ];
106
147
  default:
107
148
  return [];
108
149
  }
@@ -164,7 +164,9 @@ export function completeRequestContext(responseID: number, error?: Error): void
164
164
  context.status = error ? 'error' : 'success';
165
165
  if (error) {
166
166
  context.error = error.message;
167
- Log.error(
167
+ // 方法错误已经通过标准 API 响应返回给调用方。请求追踪属于调试信息,
168
+ // 不应再以 console.error 级别制造第二份面向用户的错误输出。
169
+ Log.debug(
168
170
  `[RequestContext] [completeRequestContext] Error: ${formatRequestContext(context)}`
169
171
  );
170
172
  }
@@ -1,9 +0,0 @@
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").DeviceProfile>;
6
- private runProtocolV2;
7
- private runProtocolV1;
8
- }
9
- //# sourceMappingURL=GetDeviceInfo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GetDeviceInfo.d.ts","sourceRoot":"","sources":["../../src/api/GetDeviceInfo.ts"],"names":[],"mappings":"AAgBA,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;YAoBb,aAAa;CA4B5B"}
@@ -1,22 +0,0 @@
1
- import type { DeviceInfoProtocol, DeviceInfoSource, DeviceProfile, GetDeviceInfoParams } from '../types/api/getDeviceInfo';
2
- import type { Features, OnekeyFeatures } from '../types';
3
- import type { DeviceStatus, ProtocolV2DeviceInfo } from '@onekeyfe/hd-transport';
4
- type BuildProtocolV1ProfileParams = {
5
- protocol?: DeviceInfoProtocol;
6
- features?: Features;
7
- protocolV1OneKeyFeatures?: OnekeyFeatures;
8
- sources?: DeviceInfoSource[];
9
- scope?: GetDeviceInfoParams['scope'];
10
- includeRaw?: boolean;
11
- };
12
- type BuildProtocolV2ProfileParams = {
13
- deviceInfo?: ProtocolV2DeviceInfo;
14
- deviceStatus?: DeviceStatus;
15
- sources?: DeviceInfoSource[];
16
- scope?: GetDeviceInfoParams['scope'];
17
- includeRaw?: boolean;
18
- };
19
- export declare function buildProfileFromProtocolV1({ protocol, features, protocolV1OneKeyFeatures, sources, scope, includeRaw, }: BuildProtocolV1ProfileParams): DeviceProfile;
20
- export declare function buildProfileFromProtocolV2({ deviceInfo, deviceStatus, sources, scope, includeRaw, }: BuildProtocolV2ProfileParams): DeviceProfile;
21
- export {};
22
- //# sourceMappingURL=buildDeviceProfile.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"buildDeviceProfile.d.ts","sourceRoot":"","sources":["../../src/deviceProfile/buildDeviceProfile.ts"],"names":[],"mappings":"AAoBA,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,EAEV,YAAY,EACZ,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAEhC,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,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,KAAK,CAAC,EAAE,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACrC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAwPF,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,YAAY,EACZ,OAAwB,EACxB,KAAe,EACf,UAAkB,GACnB,EAAE,4BAA4B,GAAG,aAAa,CA6B9C"}
@@ -1,88 +0,0 @@
1
- import type { CommonParams, Response } from '../params';
2
- import type { Features, IDeviceType, OnekeyFeatures } from '../device';
3
- import type { EFirmwareType } from '@onekeyfe/hd-shared';
4
- import type { DeviceStatus, ProtocolType, ProtocolV2DeviceInfo } from '@onekeyfe/hd-transport';
5
- export type DeviceInfoProtocol = ProtocolType | 'unknown';
6
- export type DeviceInfoSource = 'features' | 'protocolV1OneKeyFeatures' | 'deviceInfo';
7
- export type DeviceInfoScope = 'basic' | 'versions' | 'verify' | 'full';
8
- export type GetDeviceInfoParams = {
9
- scope?: DeviceInfoScope;
10
- refresh?: boolean;
11
- includeRaw?: boolean;
12
- };
13
- export type DeviceInfoMode = 'normal' | 'bootloader' | 'romloader' | 'notInitialized' | 'unknown';
14
- export type DeviceInfoStatus = {
15
- mode: DeviceInfoMode;
16
- initialized: boolean | null;
17
- bootloaderMode: boolean | null;
18
- unlocked: boolean | null;
19
- passphraseProtection: boolean | null;
20
- attachToPinEnabled?: boolean | null;
21
- unlockedAttachPin?: boolean | null;
22
- backupRequired: boolean | null;
23
- noBackup: boolean | null;
24
- language: string | null;
25
- bleEnabled: boolean | null;
26
- };
27
- export type DeviceProfileVersions = {
28
- firmware: string | null;
29
- bootloader: string | null;
30
- board: string | null;
31
- ble: string | null;
32
- se01?: string | null;
33
- se02?: string | null;
34
- se03?: string | null;
35
- se04?: string | null;
36
- se01Boot?: string | null;
37
- se02Boot?: string | null;
38
- se03Boot?: string | null;
39
- se04Boot?: string | null;
40
- };
41
- export type DeviceProfileVerify = {
42
- firmwareBuildId?: string;
43
- firmwareHash?: string;
44
- bootloaderBuildId?: string;
45
- bootloaderHash?: string;
46
- boardBuildId?: string;
47
- boardHash?: string;
48
- bleBuildId?: string;
49
- bleHash?: string;
50
- se01BuildId?: string;
51
- se01Hash?: string;
52
- se02BuildId?: string;
53
- se02Hash?: string;
54
- se03BuildId?: string;
55
- se03Hash?: string;
56
- se04BuildId?: string;
57
- se04Hash?: string;
58
- se01BootBuildId?: string;
59
- se01BootHash?: string;
60
- se02BootBuildId?: string;
61
- se02BootHash?: string;
62
- se03BootBuildId?: string;
63
- se03BootHash?: string;
64
- se04BootBuildId?: string;
65
- se04BootHash?: string;
66
- };
67
- export type DeviceProfileRaw = {
68
- features?: Features;
69
- protocolV1OneKeyFeatures?: OnekeyFeatures;
70
- protocolV2DeviceInfo?: ProtocolV2DeviceInfo;
71
- protocolV2DeviceStatus?: DeviceStatus;
72
- };
73
- export type DeviceProfile = {
74
- protocol: DeviceInfoProtocol;
75
- sources: DeviceInfoSource[];
76
- deviceType: IDeviceType;
77
- firmwareType: EFirmwareType;
78
- deviceId: string;
79
- serialNo: string;
80
- label: string | null;
81
- bleName: string | null;
82
- status: DeviceInfoStatus;
83
- versions: DeviceProfileVersions;
84
- verify?: DeviceProfileVerify;
85
- raw?: DeviceProfileRaw;
86
- };
87
- export declare function getDeviceInfo(connectId?: string, params?: CommonParams & GetDeviceInfoParams): Response<DeviceProfile>;
88
- //# sourceMappingURL=getDeviceInfo.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getDeviceInfo.d.ts","sourceRoot":"","sources":["../../../src/types/api/getDeviceInfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACrB,MAAM,wBAAwB,CAAC;AAGhC,MAAM,MAAM,kBAAkB,GAAG,YAAY,GAAG,SAAS,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,0BAA0B,GAAG,YAAY,CAAC;AAEtF,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,gBAAgB,GAAG,SAAS,CAAC;AAElG,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,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