@onekeyfe/hd-transport-react-native 0.1.50 → 0.1.52

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.
Files changed (2) hide show
  1. package/README.md +25 -7
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -1,11 +1,29 @@
1
- # `hd-transport-react-native`
1
+ # `@onekeyfe/hd-transport-react-native`
2
2
 
3
- > TODO: description
3
+ `@onekeyfe/hd-transport-react-native` is a library that implements transport communication by [react-native-ble-plx](https://github.com/dotintent/react-native-ble-plx).
4
4
 
5
- ## Usage
5
+ ## What is the purpose
6
6
 
7
- ```
8
- const hdTransportReactNative = require('hd-transport-react-native');
7
+ - translate JSON payloads to binary messages using protobuf definitions comprehensible to OneKey devices
8
+ - chunking and reading chunked messages according to the [OneKey protocol](./protocol.md)
9
+ - exposing single API for various transport methods:
10
+ - Http Transport
11
+ - React Native Transport
12
+ - WebUSB
13
+ - Create and expose typescript definitions based on protobuf definitions.
9
14
 
10
- // TODO: DEMONSTRATE API
11
- ```
15
+ ### The short version
16
+
17
+ In order to be able to use new features of onekey-firmware you need to update protobuf definitions.
18
+
19
+ 1. `git submodule update --init --recursive` to initialize git submodules.
20
+ 1. `yarn update-submodules` to update trezor-common submodule
21
+ 1. `yarn workspace @onekeyfe/transport update:protobuf` to generate new `./messages.json` and `./src/types/messages.ts`
22
+
23
+ git submodule update --init --recursive to initialize trezor-common submodule
24
+ yarn update-submodules to update trezor-common submodule
25
+ yarn workspace @trezor/transport update:protobuf to generate new ./messages.json and ./src/types/messages.ts
26
+
27
+ ## Docs
28
+
29
+ Documentation is available [hardware-js-sdk](https://developer.onekey.so/connect-to-hardware/hardware-sdk/start)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onekeyfe/hd-transport-react-native",
3
- "version": "0.1.50",
3
+ "version": "0.1.52",
4
4
  "homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -19,10 +19,10 @@
19
19
  "lint:fix": "eslint . --fix"
20
20
  },
21
21
  "dependencies": {
22
- "@onekeyfe/hd-shared": "^0.1.50",
23
- "@onekeyfe/hd-transport": "^0.1.50",
22
+ "@onekeyfe/hd-shared": "^0.1.52",
23
+ "@onekeyfe/hd-transport": "^0.1.52",
24
24
  "react-native-ble-manager": "^8.1.0",
25
25
  "react-native-ble-plx": "^2.0.3"
26
26
  },
27
- "gitHead": "e3e2a8aa77a1bf72d1b26dc9841463a660a2f902"
27
+ "gitHead": "7a53d20af1efe25b5f94c1204bb1679cfeb16666"
28
28
  }