createCoinbaseWalletSDK
Creates a new sdk object for getting a CoinbaseWalletProvider instance.
Usage
provider.ts
import { sdk } from './setup'
 
// Create provider
export const provider = sdk.getProvider();
// Use provider
const addresses = provider.request({method: 'eth_requestAccounts'});Returns
An object with related SDK methods
Parameters
appName (optional)
- Type: string
The app name. This will be displayed to users on connection, transacting, and signing requests.
appChainIds (optional)
- Type: number[]
Array of chain IDs your app supports. Default value is [1].
appLogoUrl (optional)
- Type: string
App logo image URL. Favicon is used if unspecified.
preference (optional)
- Type Preference
type Attribution = {
    auto: boolean;
    dataSuffix?: never;
} | {
    auto?: never;
    dataSuffix: `0x${string}`;
}
 
type Preference = {
    keysUrl?: string;
    options?: 'all' | 'smartWalletOnly' | 'eoaOnly';
    attribution?: Attribution;
}