OneKey Docs
Search…
⌃K

Quickstart

Installation

USB
Bluetooth
# Install via NPM
npm install --save @onekeyfe/hd-web-sdk
​
# Install via YARN
yarn add @onekeyfe/hd-web-sdk
​
# Install via NPM
npm install --save @onekeyfe/hd-ble-sdk
​
# Install via YARN
yarn add @onekeyfe/hd-ble-sdk

Initialization

import HardwareSDK from '@onekeyfe/hd-web-sdk';
​
HardwareSDK.init({
debug: true,
// The official iframe page deployed by OneKey
// of course you can also deploy it yourself
connectSrc: 'https://jssdk.onekey.so/0.1.26/'
})

API Reference

Event

Development

$ git clone https://github.com/OneKeyHQ/hardware-js-sdk.git
$ cd hardware-js-sdk
$ yarn && yarn bootstrap
​
# build
yarn build
​
# start hd-web-sdk
cd packages/hd-web-sdk && yarn dev
​