@onekeyfe/hd-transport-react-native
is a library that implements transport communication by react-native-ble-plx.
- translate JSON payloads to binary messages using protobuf definitions comprehensible to OneKey devices
- chunking and reading chunked messages according to the OneKey protocol
- exposing single API for various transport methods:
- Http Transport
- React Native Transport
- WebUSB
- Create and expose typescript definitions based on protobuf definitions.
In order to be able to use new features of onekey-firmware you need to update protobuf definitions.
git submodule update --init --recursive
to initialize git submodules.yarn update-submodules
to update firmware submoduleyarn update:protobuf
to generate new./messages.json
and./src/types/messages.ts
git submodule update --init --recursive to initialize firmware submodule yarn update-submodules to update firmware submodule yar update:protobuf to generate new ./messages.json and ./src/types/messages.ts
Documentation is available hardware-js-sdk