BTC
Bitcoin integration via OneKey’s injected BTC provider (window.$onekey.btc / window.unisat)
Integrate Bitcoin using OneKey’s injected BTC provider. Prefer window.$onekey.btc; fall back to window.unisat when needed.
Quick links
Minimal pattern
const provider = (window as any).$onekey?.btc || (window as any).unisat
if (!provider) throw new Error('OneKey BTC provider not detected')
await provider.requestAccounts()Events & network
accountsChanged,networkChanged— re‑sync account and network state
Common errors
User rejection: handle gracefully and allow retry
Invalid params: ensure addresses/amounts are correctly formatted
Mobile & deeplinks
Use OneKey deeplinks with a WalletConnect URI when bridging from mobile web/WebViews
See Use deeplinks
Last updated
Was this helpful?