import type { ProviderInterface } from "@coinbase/wallet-sdk"; import type { Preference } from "@coinbase/wallet-sdk/dist/core/provider/interface.js"; import type { Chain } from "../../chains/types.js"; import type { ThirdwebClient } from "../../client/client.js"; import { COINBASE } from "../constants.js"; import type { Account, Wallet } from "../interfaces/wallet.js"; import type { AppMetadata, DisconnectFn, SwitchChainFn } from "../types.js"; import type { WalletEmitter } from "../wallet-emitter.js"; import type { CreateWalletArgs, WalletConnectionOption } from "../wallet-types.js"; export type CoinbaseWalletCreationOptions = { /** * Metadata of the dApp that will be passed to connected wallet. * * Some wallets may display this information to the user. * * Setting this property is highly recommended. If this is not set, Below default metadata will be used: * * ```ts * { * name: "thirdweb powered dApp", * url: "https://thirdweb.com", * description: "thirdweb powered dApp", * logoUrl: "https://thirdweb.com/favicon.ico", * }; * ``` */ appMetadata?: AppMetadata; /** * Wallet configuration, choices are 'all' | 'smartWalletOnly' | 'eoaOnly' * @default 'all' * @example * ```ts * { * walletConfig: { * options: 'all', * } * } * ``` */ walletConfig?: Preference; /** * Chains that the wallet can switch chains to, will default to the first chain in this array on first connection. * @default Ethereum mainnet * @example * ```ts * { * chains: [base, optimisim] * } */ chains?: Chain[]; mobileConfig?: { /** * The univeral callback URL to redirect the user to after they have completed the wallet connection with the cb wallet app. * This needs to be setup as a Universal link for iOS https://docs.cdp.coinbase.com/wallet-sdk/docs/ios-setup/ * and App link on Android https://docs.cdp.coinbase.com/wallet-sdk/docs/android-setup/ */ callbackURL?: string; }; } | undefined; /** * Options for connecting to the CoinbaseSDK Wallet */ export type CoinbaseSDKWalletConnectionOptions = { /** * The Thirdweb client object */ client: ThirdwebClient; /** * If you want the wallet to be connected to a specific blockchain, you can pass a `Chain` object to the `connect` method. * This will trigger a chain switch if the wallet provider is not already connected to the specified chain. * * You can create a `Chain` object using the [`defineChain`](https://portal.thirdweb.com/references/typescript/v5/defineChain) function. * At minimum, you need to pass the `id` of the blockchain. * * ```ts * import { defineChain } from "thirdweb"; * const myChain = defineChain(myChainId); * * const address = await wallet.connect({ chain: myChain }) */ chain?: Chain; }; /** * @internal */ export declare function getCoinbaseWebProvider(options?: CreateWalletArgs[1]): Promise; /** * Checks if the provided wallet is a Coinbase SDK wallet. * * @param wallet - The wallet to check. * @returns True if the wallet is a Coinbase SDK wallet, false otherwise. */ export declare function isCoinbaseSDKWallet(wallet: Wallet): wallet is Wallet; declare function onConnect(address: string, chain: Chain, provider: ProviderInterface, emitter: WalletEmitter, client: ThirdwebClient): [Account, Chain, DisconnectFn, SwitchChainFn]; /** * @internal */ export declare function connectCoinbaseWalletSDK(options: WalletConnectionOption, emitter: WalletEmitter, provider: ProviderInterface): Promise>; /** * @internal */ export declare function autoConnectCoinbaseWalletSDK(options: WalletConnectionOption, emitter: WalletEmitter, provider: ProviderInterface): Promise>; export {}; //# sourceMappingURL=coinbase-web.d.ts.map