hardware-example 1.2.0-alpha.71 → 1.2.0-alpha.73

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 (2) hide show
  1. package/package.json +3 -3
  2. package/src/preload.ts +7 -3
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "hardware-example",
3
3
  "productName": "HardwareExample",
4
4
  "executableName": "onekey-hardware-example",
5
- "version": "1.2.0-alpha.71",
5
+ "version": "1.2.0-alpha.73",
6
6
  "author": "OneKey",
7
7
  "description": "OneKey Hardware SDK Electron BLE example",
8
8
  "main": "dist/index.js",
@@ -21,7 +21,7 @@
21
21
  "ts:check": "yarn tsc --noEmit"
22
22
  },
23
23
  "dependencies": {
24
- "@onekeyfe/hd-transport-electron": "1.2.0-alpha.71",
24
+ "@onekeyfe/hd-transport-electron": "1.2.0-alpha.73",
25
25
  "@stoprocent/noble": "2.3.16",
26
26
  "debug": "4.3.4",
27
27
  "electron-is-dev": "^3.0.1",
@@ -42,5 +42,5 @@
42
42
  "**/node-gyp": "^10.0.1",
43
43
  "tmp": "0.2.4"
44
44
  },
45
- "gitHead": "c58f39f2e5c54a98faa8844cd8b6b0453a17d80c"
45
+ "gitHead": "5fd2c617e179181cdb15243aec8bbbe28c77cd27"
46
46
  }
package/src/preload.ts CHANGED
@@ -5,7 +5,11 @@ import { EOneKeyBleMessageKeys } from '@onekeyfe/hd-shared';
5
5
 
6
6
  import { ipcMessageKeys } from './config';
7
7
 
8
- import type { DesktopAPI as BaseDesktopAPI, NobleBleAPI } from '@onekeyfe/hd-transport-electron';
8
+ import type {
9
+ DesktopAPI as BaseDesktopAPI,
10
+ NobleBleAPI,
11
+ NobleBleWriteOptions,
12
+ } from '@onekeyfe/hd-transport-electron';
9
13
 
10
14
  // Simplified Bluetooth system API - only for opening settings
11
15
  export interface BluetoothSystemAPI {
@@ -75,8 +79,8 @@ const desktopApi = {
75
79
  ipcRenderer.invoke(EOneKeyBleMessageKeys.NOBLE_BLE_SUBSCRIBE, uuid),
76
80
  unsubscribe: (uuid: string) =>
77
81
  ipcRenderer.invoke(EOneKeyBleMessageKeys.NOBLE_BLE_UNSUBSCRIBE, uuid),
78
- write: (uuid: string, data: string) =>
79
- ipcRenderer.invoke(EOneKeyBleMessageKeys.NOBLE_BLE_WRITE, uuid, data),
82
+ write: (uuid: string, data: string, options?: NobleBleWriteOptions) =>
83
+ ipcRenderer.invoke(EOneKeyBleMessageKeys.NOBLE_BLE_WRITE, uuid, data, options),
80
84
  onNotification: (callback: (deviceId: string, data: string) => void) => {
81
85
  const subscription = (_: unknown, deviceId: string, data: string) => {
82
86
  callback(deviceId, data);