Install SDK

Installation

The support status for Bluetooth and USB on different devices.

DeviceBluetoothUSB

OneKey Classic

OneKey Mini

OneKey Touch

This is the platform we support.

# Install via NPM
npm install --save @onekeyfe/hd-web-sdk

# Install via YARN
yarn add @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.34/'
})

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.34/iframe.html.

Normally, the number after the URL should match the version number of the SDK you installed. For example, “0.3.30” 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.

Next, you can return to the Quickstart and proceed with the steps for Configuring the Event.

Last updated