Object containing wallet state and connection methods:
currentAccount - The currently connected wallet account (or null)walletAddress - The connected wallet's address stringisConnected - Boolean indicating connection statushasEveVault - Boolean indicating if EVE Vault wallet is availablehandleConnect - Function to initiate wallet connectionhandleDisconnect - Function to disconnect the walletimport { useConnection } from '@evefrontier/dapp-kit';
const WalletButton = () => {
const { isConnected, walletAddress, handleConnect, handleDisconnect } = useConnection();
if (isConnected) {
return (
<div>
<p>Connected: {walletAddress}</p>
<button onClick={handleDisconnect}>Disconnect</button>
</div>
);
}
return <button onClick={handleConnect}>Connect Wallet</button>;
};
Hook for managing wallet connection state in EVE Frontier dApps.
Provides access to wallet connection status, current account information, and methods to connect/disconnect wallets. Automatically detects EVE Vault wallet availability.