PHP WebShell
Текущая директория: /opt/BitGoJS/node_modules/@ledgerhq/hw-transport-web-ble
Просмотр файла: README.md
<img src="https://user-images.githubusercontent.com/211411/34776833-6f1ef4da-f618-11e7-8b13-f0697901d6a8.png" height="100" />
[Github](https://github.com/LedgerHQ/ledgerjs/),
[Ledger Devs Slack](https://ledger-dev.slack.com/)
## @ledgerhq/hw-transport-web-ble
Allows to communicate with Ledger Hardware Wallets.
**[Web]** **(Bluetooth)** – [check browser support](https://caniuse.com/web-bluetooth).
## API
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
#### Table of Contents
- [BluetoothTransport](#bluetoothtransport)
- [Parameters](#parameters)
- [Examples](#examples)
- [exchange](#exchange)
- [Parameters](#parameters-1)
- [observeAvailability](#observeavailability)
- [Parameters](#parameters-2)
- [listen](#listen)
- [Parameters](#parameters-3)
- [open](#open)
- [Parameters](#parameters-4)
- [disconnect](#disconnect)
- [Parameters](#parameters-5)
### BluetoothTransport
**Extends Transport**
react-native bluetooth BLE implementation
#### Parameters
- `device` **Device**
- `writeCharacteristic` **Characteristic**
- `notifyObservable` **Observable<any>**
- `deviceModel` **DeviceModel**
#### Examples
```javascript
import BluetoothTransport from "@ledgerhq/hw-transport-web-ble";
```
#### exchange
Exchange with the device using APDU protocol.
##### Parameters
- `apdu` **[Buffer](https://nodejs.org/api/buffer.html)**
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Buffer](https://nodejs.org/api/buffer.html)>** a promise of apdu response
#### observeAvailability
observe event with { available: bool, type: string }
(available is generic, type is specific)
an event is emit once and then each time it changes
##### Parameters
- `observer` **any**
#### listen
Scan for Ledger Bluetooth devices.
On this web implementation, it only emits ONE device, the one that was selected in the UI (if any).
##### Parameters
- `observer` **any**
#### open
open a bluetooth device.
##### Parameters
- `deviceOrId` **(Device | [string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String))**
#### disconnect
globally disconnect a bluetooth device by its id.
##### Parameters
- `id` **any**
Выполнить команду
Для локальной разработки. Не используйте в интернете!