@onekeyfe/hardware-cli 1.1.34-alpha.3 → 1.1.34-alpha.4
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/dist/sdk.js +2 -2
- package/package.json +6 -6
- package/src/sdk.ts +3 -3
package/dist/sdk.js
CHANGED
|
@@ -167,12 +167,12 @@ function registerEventHandlers(sdk) {
|
|
|
167
167
|
process.stderr.write('[onekey-hw] Please confirm the action on your device...\n');
|
|
168
168
|
}
|
|
169
169
|
});
|
|
170
|
-
sdk.on(hd_core_1.DEVICE.CONNECT, (
|
|
170
|
+
sdk.on(hd_core_1.DEVICE.CONNECT, (device) => {
|
|
171
171
|
const name = device?.label || device?.name;
|
|
172
172
|
if (name)
|
|
173
173
|
process.stderr.write(`[onekey-hw] Device connected: ${name}\n`);
|
|
174
174
|
});
|
|
175
|
-
sdk.on(hd_core_1.DEVICE.DISCONNECT, (
|
|
175
|
+
sdk.on(hd_core_1.DEVICE.DISCONNECT, (device) => {
|
|
176
176
|
const name = device?.label || device?.name;
|
|
177
177
|
if (name)
|
|
178
178
|
process.stderr.write(`[onekey-hw] Device disconnected: ${name}\n`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/hardware-cli",
|
|
3
|
-
"version": "1.1.34-alpha.
|
|
3
|
+
"version": "1.1.34-alpha.4",
|
|
4
4
|
"description": "OneKey hardware wallet CLI for testing device communication",
|
|
5
5
|
"author": "OneKey",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"test": "jest"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@onekeyfe/hd-common-connect-sdk": "1.1.34-alpha.
|
|
34
|
-
"@onekeyfe/hd-core": "1.1.34-alpha.
|
|
35
|
-
"@onekeyfe/hd-shared": "1.1.34-alpha.
|
|
36
|
-
"@onekeyfe/hd-transport-usb": "1.1.34-alpha.
|
|
33
|
+
"@onekeyfe/hd-common-connect-sdk": "1.1.34-alpha.4",
|
|
34
|
+
"@onekeyfe/hd-core": "1.1.34-alpha.4",
|
|
35
|
+
"@onekeyfe/hd-shared": "1.1.34-alpha.4",
|
|
36
|
+
"@onekeyfe/hd-transport-usb": "1.1.34-alpha.4",
|
|
37
37
|
"commander": "^12.0.0"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "d546bc55410990351d34009230aefea77725d0d6"
|
|
40
40
|
}
|
package/src/sdk.ts
CHANGED
|
@@ -15,7 +15,7 @@ import { DEVICE, UI_EVENT, UI_REQUEST, UI_RESPONSE } from '@onekeyfe/hd-core';
|
|
|
15
15
|
|
|
16
16
|
import { promptPassphraseViaPinentry } from './pinentry';
|
|
17
17
|
|
|
18
|
-
import type { ConnectSettings
|
|
18
|
+
import type { ConnectSettings } from '@onekeyfe/hd-core';
|
|
19
19
|
import type { PinentryResult } from './pinentry';
|
|
20
20
|
|
|
21
21
|
export interface SDKOptions {
|
|
@@ -166,12 +166,12 @@ function registerEventHandlers(sdk: typeof HardwareSDK): void {
|
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
168
|
|
|
169
|
-
sdk.on(DEVICE.CONNECT, (
|
|
169
|
+
sdk.on(DEVICE.CONNECT, (device: any) => {
|
|
170
170
|
const name = device?.label || device?.name;
|
|
171
171
|
if (name) process.stderr.write(`[onekey-hw] Device connected: ${name}\n`);
|
|
172
172
|
});
|
|
173
173
|
|
|
174
|
-
sdk.on(DEVICE.DISCONNECT, (
|
|
174
|
+
sdk.on(DEVICE.DISCONNECT, (device: any) => {
|
|
175
175
|
const name = device?.label || device?.name;
|
|
176
176
|
if (name) process.stderr.write(`[onekey-hw] Device disconnected: ${name}\n`);
|
|
177
177
|
});
|