@onekeyfe/hd-transport-react-native 0.1.49 → 0.1.51
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.
- package/README.md +25 -7
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,11 +1,29 @@
|
|
|
1
|
-
#
|
|
1
|
+
# `@onekeyfe/hd-transport-react-native`
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
##
|
|
5
|
+
## What is the purpose
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
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.
|
|
3
|
+
"version": "0.1.51",
|
|
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.
|
|
23
|
-
"@onekeyfe/hd-transport": "^0.1.
|
|
22
|
+
"@onekeyfe/hd-shared": "^0.1.51",
|
|
23
|
+
"@onekeyfe/hd-transport": "^0.1.51",
|
|
24
24
|
"react-native-ble-manager": "^8.1.0",
|
|
25
25
|
"react-native-ble-plx": "^2.0.3"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "0bc84671cf1fabb0f50339407dd43ad82ff096b8"
|
|
28
28
|
}
|