Requests that the wallet connects to the dApp and provides account access. This is similar to
eth_requestAccounts
but provides additional connection features.Parameters
Optional configuration object for the connection.
Returns
Connection result object containing account information and capabilities results.
Error Handling
Code | Message | Description |
---|---|---|
4001 | User rejected the request | User denied the connection request |
4100 | Requested method not supported | The method is not supported by the wallet |
4200 | Wallet not available | The wallet is not installed or available |
-32602 | Invalid params | Invalid nonce or chainId in signInWithEthereum capability |
This is a Coinbase Wallet-specific method and may not be available in other wallets.
After successful connection, the wallet will emit connection events and provide access to account information.
When using the
signInWithEthereum
capability, always generate a fresh, unique nonce for each authentication attempt to prevent replay attacks. The signature can be verified on your backend using libraries like viem.Usage with Capabilities
You can use thewallet_connect
with the signInWithEthereum
capability to authenticate the user.