Skip to Content
On this page

BTC

Integrate Bitcoin using OneKey’s injected BTC provider. Use window.$onekey.btc to select OneKey. A global compatibility provider may belong to another wallet.

Minimal pattern

const provider = window.$onekey?.btc if (!provider) throw new Error('OneKey BTC provider not detected') await provider.requestAccounts()

Events & network

  • accountsChanged, chainChanged — re‑sync account and network state

Common errors

  • User rejection: handle gracefully and allow retry
  • Invalid params: ensure addresses/amounts are correctly formatted
Last updated on