/** * Minimal BLE characteristic shape needed by the protocol adapters. * * Both Web Bluetooth's `BluetoothRemoteGATTCharacteristic` and a Noble * `Characteristic` shim must satisfy this interface for the protocol code to * drive them. */ export interface BluetoothRequestFilterLike { namePrefix?: string; } export interface RequestDeviceOptionsLike { filters?: BluetoothRequestFilterLike[]; optionalServices?: string[]; } export interface BluetoothRemoteGATTCharacteristicLike extends EventTarget { value: DataView | null; writeValueWithoutResponse?(value: ArrayBufferView | ArrayBuffer): Promise; writeValueWithResponse?(value: ArrayBufferView | ArrayBuffer): Promise; writeValue?(value: ArrayBufferView | ArrayBuffer): Promise; readValue(): Promise; startNotifications(): Promise; stopNotifications(): Promise; } export interface BluetoothRemoteGATTServiceLike { getCharacteristic(characteristic: string): Promise; } export interface BluetoothRemoteGATTServerLike { connected: boolean; getPrimaryService(service: string): Promise; /** * Negotiate a larger ATT MTU. Optional: Web Bluetooth negotiates MTU * automatically with no JS-facing control, so browser transports never * implement this. Native transports (Tauri, Node) may. */ requestMTU?(mtu: number): Promise; } export interface BluetoothRemoteGATTLike { connected: boolean; connect(): Promise; disconnect(): void; } export interface BluetoothDeviceLike extends EventTarget { id?: string; name?: string; gatt?: BluetoothRemoteGATTLike; } export interface BluetoothLike { requestDevice(options: RequestDeviceOptionsLike): Promise; } export interface NavigatorBluetoothLike { bluetooth?: BluetoothLike; } //# sourceMappingURL=types.d.ts.map