Hardware-js-sdk is designed to allow third-party developers to quickly access the OneKey hardware wallet. The repository structure uses the monorepo to make each module more manageable.
| package | description |
|---|---|
| @onekeyfe/core | The core process of hardware wallet connection. |
| @onekeyfe/hd-web-sdk | Using the sdk in the web platform. |
| @onekeyfe/hd-ble-sdk | Using the SDK in BLE communication environment. e.g: iOS / Android |
| @onekeyfe/hd-common-sdk | Using the SDK in a node or web-usb environment |
| @onekeyfe/hd-transport | Data serialization and deserialization of hardware communication data |
| @onekeyfe/hd-transport-http | communication lib for http |
| @onekeyfe/hd-transport-react-native | communication lib for React Native |
| @onekeyfe/hd-transport-webusb | communication lib for WebUSB |
| @onekeyfe/hd-shared | Tools, error definitions, constants |
| @onekeyfe/hardware-cli | CLI for AI agent integration (Claude Code, Cursor, etc.) |
See the full documentation on developer.onekey.so.
Before you start make sure you have downloaded and installed NVM, Yarn and git with git lfs.
git clone git@github.com:OneKeyHQ/hardware-js-sdk.gitgit submodule update --init --recursiveyarnyarn bootstrapRun a dev build:
yarn dev:web (web sdk)yarn dev:ble (react-native sdk)yarn dev:core (core package)yarn dev:transport-http (transport-http package)yarn dev:shared (shared package)yarn bootstrap && yarn buildyarn example:desktopyarn bootstrap && yarn buildyarn example select ios or android in menu.packages/connect-examples/expo-example/src/constants/connect.ts, change CONNECT_SRC to https://localhost:8087/yarn dev:webhttps://localhost:8087/, simply type "thisisunsafe" directly on your keyboard (no need to press Enter)yarn bootstrap && yarn buildyarn example select web in menu.yarn bootstrap && yarn buildyarn debug:watcherOpen v5-app-monorepo, run yarn && yarn app:xxxx to start the app.
$ claude mcp add hardware-js-sdk \
-- python -m otcore.mcp_server <graph>