0.1.0 • Published 4 years ago

@coolwallets/transport-web-ble v0.1.0

Weekly downloads
169
License
Apache-2.0
Repository
github
Last release
4 years ago

CoolWalletS Web-ble Transport

If you're building a WebApp with CoolWalletS, this is the one you need to use as transport in other api.

Install

npm i @coolwallets/transport-web-ble

Usage

The listen() method takes in an callback function to handle bluetooth scanning. In web-ble, this is when the popup show and the user select the device to pair, so the returned device is only one selected device.

import WebBleTransport from '@coolwallets/transport-web-ble'
await WebBleTransport.listen(async (error, device) => { // browser shows popup
  if (device) {
    const transport = await WebBleTransport.connect(device)
    /**
     * Do something with transport
     **/
  } else throw error
})

// use transport in other package:
import CoolWallet from '@coolwallets/wallet'
const wallet = new CoolWallet(transport, appPrivateKey, appId)
0.1.0

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.2-beta

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago