{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "wallet_connect",
  "params": [{}]
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "accounts": [{
      "address": "0x407d73d8a49eeb85d32cf465507dd71d507100c1"
    }],
    "chainId": "0x2105",
    "isConnected": true
  }
}
Custom Coinbase Wallet method for establishing connection
Requests that the wallet connects to the dApp and provides account access. This is similar to eth_requestAccounts but provides additional connection features.

Parameters

options
object
Optional configuration object for the connection.

Returns

result
object
Connection result object containing account information and capabilities results.
{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "wallet_connect",
  "params": [{}]
}
{
  "id": 1,
  "jsonrpc": "2.0",
  "result": {
    "accounts": [{
      "address": "0x407d73d8a49eeb85d32cf465507dd71d507100c1"
    }],
    "chainId": "0x2105",
    "isConnected": true
  }
}

Error Handling

CodeMessageDescription
4001User rejected the requestUser denied the connection request
4100Requested method not supportedThe method is not supported by the wallet
4200Wallet not availableThe wallet is not installed or available
-32602Invalid paramsInvalid 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 the wallet_connect with the signInWithEthereum capability to authenticate the user.