The support status for Bluetooth and USB on different devices.
This is the platform we support.
# Install via NPMnpminstall--save@onekeyfe/hd-web-sdk# Install via YARNyarnadd@onekeyfe/hd-web-sdk
Initialization
import { HardwareWebSdk as HardwareSDK } from '@onekeyfe/hd-web-sdk';
HardwareSDK.init({
debug: true,
fetchConfig: true,
connectSrc: 'https://jssdk.onekey.so/0.3.38/'
})
fetchConfig: Allows querying for updated device version information over the network, used for prompting device updates and informing which version is needed for older hardware to use new features.
connectSrc: The official web page deployed by OneKey is used to create an iframe on the page to communicate with OneKey Bridge.
The complete link to the web page is https://jssdk.onekey.so/0.3.38/iframe.html.
Normally, the number after the URL should match the version number of the SDK you installed. For example, “0.3.38” in this case.
If encountering issues with the web page failing to load for the corresponding version number, please try using a different version of the SDK or submit an issue on GitHub for feedback. We will work quickly to resolve the problem.
# Install via NPMnpminstall--save@onekeyfe/hd-ble-sdk# Install via YARNyarnadd@onekeyfe/hd-ble-sdk
Initialization
import { HardwareWebSdk as HardwareSDK } from'@onekeyfe/hd-ble-sdk';HardwareSDK.init({ debug:true, fetchConfig:true,})
connectSrc: The official web page deployed by OneKey is used to create an iframe on the page to communicate with OneKey Bridge.
fetchConfig: Allows querying for updated device version information over the network, used for prompting device updates and informing which version is needed for older hardware to use new features.
Because our SDK is developed using the RN (React Native) and JS (JavaScript) technology stack. To avoid requiring everyone to depend on React Native, we adopt the following solution.
First, you need a container that can run JavaScript and communicate with it.
Prepare the JavaScript part of the code, and install @onekeyfe/hd-common-connect-sdk.
# Install via NPMnpminstall--save@onekeyfe/hd-common-connect-sdk# Install via YARNyarnadd@onekeyfe/hd-common-connect-sdk
Then, handle the part that communicates with the hardware device.
For specific platforms, how to integrate hd-common-connect-sdk, and demos for relevant platforms, please visit to learn more.