makeWeb3Provider
Creates a new CoinbaseWalletProvider
instance using a CoinbaseWalletSDK
instance.
Usage
provider.ts
// Create provider
const provider = sdk.makeWeb3Provider({options: 'smartWalletOnly'});
// Use provider
const addresses = provider.request('eth_requestAccounts');
Returns
A new CoinbaseWalletProvider
instance, which is an Ethereum Javascript provider provider.
Parameters
options (optional)
- Type:
'all' | 'smartWalletOnly' | 'eoaOnly'
Determines which connection options users will see. Defaults to all
.
all
Users will see Smart Wallet and Wallet Link connection options.
smartWalletOnly
With this option, users will only see an option to create a Smart Wallet or sign into their Smart Wallet.
eoaOnly
Users will only see Wallet Link connection option. If the user is on mobile, they will be taken directly to the Coinbase Wallet app. If the user is using a browser with Coinbase Wallet Extension, they will be taken directly to the Extension.