Developer Docs
Search
K

Connect via Wallet Provider

React
Next
import { useWallet } from "@xircus-web3/react"
export default function Index() {
const wallet = useWallet()
if (wallet.status == "connected") {
return (
<div>
<div>{wallet.account}</div>
<div>{wallet.balance}</div>
<button onClick={wallet.disconnect}>Disconnect</button>
</div>
)
}
return (
<div>
<button onClick={wallet.connectMetamask}>Connect Metamask</button>
<button onClick={wallet.connectWalletConnect}>Connect WalletConnect</button>
<button onClick={wallet.connectCoinbase}>Connect Coinbase Wallet</button>
</div>
)
}