Account
useWalletConnector
Software Development Kits
[EVM] React Components SDK
- Overview
- Getting started
- Theming
- Wallet connect
- Framework Guides
- Page Components
- Block Components
[EVM] React Hooks SDK
[EVM] Core SDK
[EVM] Perp SDK
Account
useWalletConnector
Get wallet connection.
export interface WalletConnectorContextState {
connect: () => Promise<WalletState[]>;
disconnect: (options: any) => Promise<any[]>;
connecting: boolean;
setChain: (options: { chainId: string | number }) => Promise<any>;
chains: any[];
wallet: any;
connectedChain: ConnectedChain | null;
settingChain: boolean;
}
Example
const wallet = useWalletConnector();
return (
<button
onClick={() => {
wallet.connect();
}}
>
Connect wallet
</button>
);
On this page