Skip to content

coinbaseWallet

Connector for the Coinbase Wallet SDK.

Import

ts
import { coinbaseWallet } from 'wagmi/connectors'

Usage

ts
import { createConfig, http } from 'wagmi'
import { mainnet, sepolia } from 'wagmi/chains'
import { coinbaseWallet } from 'wagmi/connectors'

export const config = createConfig({
  chains: [mainnet, sepolia],
  connectors: [coinbaseWallet()], 
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})

WARNING

Before going to production, it is highly recommended to set an appName and appLogoUrl for your application that can be displayed upon connection to the wallet.

Parameters

ts
import { type CoinbaseWalletParameters } from 'wagmi/connectors'

Check out the Coinbase Wallet SDK docs for more info.

appName

string

Application name.

ts
import { coinbaseWallet } from 'wagmi/connectors'

const connector = coinbaseWallet({
  appName: 'My Wagmi App', 
})

appLogoUrl

string | null | undefined

Application logo image URL; favicon is used if unspecified.

ts
import { coinbaseWallet } from 'wagmi/connectors'

const connector = coinbaseWallet({
  appName: 'My Wagmi App',
  appLogoUrl: 'https://example.com/myLogoUrl.png', 
})

headlessMode deprecated

boolean | undefined

  • Whether or not onboarding overlay popup should be displayed.
  • headlessMode will be removed in the next major version. Upgrade to version: '4'.
ts
import { coinbaseWallet } from 'wagmi/connectors'

const connector = coinbaseWallet({
  appName: 'My Wagmi App',
  headlessMode: false, 
})

preference >=2.9.0

"all" | "eoaOnly" | "smartWalletOnly"

Preference for the type of wallet to display.

  • 'eoaOnly': Uses EOA Browser Extension or Mobile Coinbase Wallet.
  • 'smartWalletOnly': Displays Smart Wallet popup.
  • 'all' (default): Supports both 'eoaOnly' and 'smartWalletOnly' based on context.
ts
import { coinbaseWallet } from 'wagmi/connectors'

const connector = coinbaseWallet({
  appName: 'My Wagmi App',
  preference: 'smartWalletOnly', 
})

version >=2.9.0

ts
import { coinbaseWallet } from 'wagmi/connectors'

const connector = coinbaseWallet({
  appName: 'My Wagmi App',
  version: '4', 
})

Released under the MIT License.