Skip to main content
The SDK provider extends an event emitter. Subscribe with provider.on(event, handler) and unsubscribe with provider.removeListener (or its alias provider.off).

connect

Fired when the provider transitions to a connected state. With wagmi, useAccount() exposes the same signal through status.

disconnect

accountsChanged

Fired when the connected account changes, including when the user disconnects (empty array) or switches accounts in the popup.

chainChanged

Fired after a successful wallet_switchEthereumChain or after the user changes the active chain in the popup.

Cleanup

Always remove listeners when your component or scope unmounts:
If you use wagmi, the connector handles event subscription internally. Just consume useAccount(), useChainId(), and friends.