simplejsble 1.2.1-dev129 → 1.2.1-dev132

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.
@@ -73,5 +73,12 @@ export declare class Peripheral extends EventEmitter<PeripheralEvents> {
73
73
  * return a promise.
74
74
  */
75
75
  setNumericComparisonHandler(handler: ((passkey: string) => boolean | Promise<boolean>) | null): Promise<void>;
76
+ /**
77
+ * Secures a Dongl connection with LE Secure Connections. With `mitm`, the
78
+ * peer must also be authenticated through the passkey or numeric comparison
79
+ * handlers. Pairing started by this call creates no bond, and the Dongl
80
+ * disconnects if it fails.
81
+ */
82
+ secureConnection(mitm?: boolean): Promise<void>;
76
83
  removeAllListeners(...args: Parameters<EventEmitter<PeripheralEvents>['removeAllListeners']>): this;
77
84
  }
@@ -166,6 +166,15 @@ class Peripheral extends node_events_1.EventEmitter {
166
166
  setNumericComparisonHandler(handler) {
167
167
  return this.#numericComparison.set(handler, id => this.#handle.setNumericComparisonHandler(id));
168
168
  }
169
+ /**
170
+ * Secures a Dongl connection with LE Secure Connections. With `mitm`, the
171
+ * peer must also be authenticated through the passkey or numeric comparison
172
+ * handlers. Pairing started by this call creates no bond, and the Dongl
173
+ * disconnects if it fails.
174
+ */
175
+ async secureConnection(mitm = false) {
176
+ return this.#handle.secureConnection(mitm);
177
+ }
169
178
  removeAllListeners(...args) {
170
179
  super.removeAllListeners(...args);
171
180
  this.#rehook();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simplejsble",
3
- "version": "1.2.1-dev129",
3
+ "version": "1.2.1-dev132",
4
4
  "description": "SimpleBLE for Node.js and Electron: a cross-platform Bluetooth Low Energy library",
5
5
  "keywords": [
6
6
  "bluetooth",