This is a fake mock demo for frontend-only flow & UI demonstration. No real hardware is connected. For the real emulator, visit OneKey Emulator . Default PIN: 1234.
Device screen (Mock)
UI: PIN / Confirm




OneKey Pro

Tap to unlock
Command panel
Developer View
Example code · UI callbacks · Result
Current example:btcGetAddress
import HardwareSDK from '@onekeyfe/hd-common-connect-sdk'
await HardwareSDK.init({ env: 'webusb', fetchConfig: true, debug: false })
const devices = await HardwareSDK.searchDevices()
if (!devices.success) throw new Error(devices.payload.error)
const connectId = devices.payload?.[0]?.connectId
const features = await HardwareSDK.getFeatures(connectId)
if (!features.success) throw new Error(features.payload.error)
const deviceId = features.payload?.device_id
const result = await HardwareSDK.btcGetAddress(connectId, deviceId, {
path: "m/44'/0'/0'/0/0",
coin: 'btc',
showOnOneKey: true,
useEmptyDevice: false,
})
console.log(result)Last updated on