Coinbase
Module for connecting Coinbase Wallet SDK to web3-onboard

@web3-onboard/coinbase

Install

npm i @web3-onboard/coinbase

Options

1
type CoinbaseWalletOptions = {
2
darkMode: boolean // default = false
3
}
Copied!

Usage

1
import Onboard from '@web3-onboard/core'
2
import coinbaseWalletModule from '@web3-onboard/coinbase'
3
4
// initialize the module with options
5
const coinbaseWalletSdk = coinbaseWalletModule({ darkMode: true })
6
7
// can also initialize with no options...
8
// const coinbaseWalletSdk = coinbaseWalletSdk()
9
10
const onboard = Onboard({
11
// ... other Onboard options
12
wallets: [
13
coinbaseWalletSdk
14
//... other wallets
15
]
16
})
17
18
const connectedWallets = await onboard.connectWallet()
19
console.log(connectedWallets)
Copied!