Coinbase Wallet
The CoinbaseWalletConnector
supports connecting with Coinbase Wallet using the Coinbase Wallet SDK.
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet'
Usage
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet'
const connector = new CoinbaseWalletConnector({
options: {
appName: 'wagmi.sh',
jsonRpcUrl: 'https://eth-mainnet.alchemyapi.io/v2/yourAlchemyId',
},
})
Configuration
chains (optional)
Chains supported by app. Defaults to defaultChains
.
import { mainnet, optimism } from 'wagmi/chains'
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet'
const connector = new CoinbaseWalletConnector({
chains: [mainnet, optimism],
options: {
appName: 'wagmi.sh',
jsonRpcUrl: 'https://eth-mainnet.alchemyapi.io/v2/yourAlchemyId',
},
})
Note: The above example is using chains from wagmi/chains
entrypoint.
options
Options to pass to the Coinbase Wallet SDK.
import { CoinbaseWalletConnector } from 'wagmi/connectors/coinbaseWallet'
const connector = new CoinbaseWalletConnector({
options: {
appName: 'wagmi.sh',
jsonRpcUrl: 'https://eth-mainnet.alchemyapi.io/v2/yourAlchemyId',
},
})