Skip to main content
Connecting a user opens a popup to app.startale.com. The user signs in with Google, LINE, or Apple, or links an existing wallet (MetaMask, Rabby, or WalletConnect), and approves the connection. After approval, your app receives the address of their smart account.

With wagmi

With the raw provider

The first call to eth_requestAccounts opens the popup. Subsequent calls return the cached address without re-prompting.

Reading connection state

eth_accounts returns an array. It is empty when disconnected and contains a single element, the smart-account address, when connected.

Listening to connection events

See Events for the complete list.

Disconnecting

In wagmi, call disconnect() from useDisconnect(). Both clear local connection state. The user’s Startale account is unchanged. The popup is opened in a direct response to a user gesture (a button click). Triggering connection from outside a click handler, for example, on page load, will be blocked by most browsers. Always tie connection to a user-initiated action.