Solana
Solana integration via OneKey provider — detect, connect, send transactions, and sign messages
Use OneKey’s Solana provider in web apps.
Quick links
Minimal pattern
// Detect
const provider = window?.$onekey?.solana || window?.solana
if (!provider?.isOneKey) throw new Error('OneKey Solana provider not detected')
// Connect
const { publicKey } = await provider.connect()
console.log(publicKey.toString())Events
connect,disconnect,accountChanged
Common errors
4001: user rejected the request
Mobile & deeplinks
Use OneKey deeplinks with a WalletConnect URI for mobile handoff
See Use deeplinks
Last updated
Was this helpful?