import type { WalletConfig } from "@thirdweb-dev/react-core"; import { MetaMaskWallet } from "@thirdweb-dev/wallets"; import type { QRModalOptions } from "@thirdweb-dev/wallets/src/evm/connectors/wallet-connect/qrModalOptions"; /** * @wallet */ export type MetamaskWalletConfigOptions = { /** * When connecting MetaMask using the QR Code - Wallet Connect connector is used which requires a project id. * This project id is Your project’s unique identifier for wallet connect that can be obtained at cloud.walletconnect.com. * * https://docs.walletconnect.com/2.0/web3modal/options#projectid-required */ projectId?: string; /** * If true, the wallet will be tagged as "recommended" in ConnectWallet Modal */ recommended?: boolean; /** * Specify how the connection to metamask app should be established if the user is on a mobile device * * There are two options: "walletconnect" and "browser" * * 1. "walletconnect" - User will be redirected to MetaMask app and upon successful connection, user can return back to the web page. * 2. "browser" - User will be redirected to MetaMask app and the web page will be opened in MetaMask browser. * * Default is `"walletconnect"` */ connectionMethod?: "walletConnect" | "metamaskBrowser"; /** * Specify whether to open the official Wallet Connect Modal when connecting the wallet if no injected MetaMask provider is found when connecting the wallet. * * This should not be set if you are using ConnectWallet component and only when manually connecting the wallet using a hook like `useConnect`. * * You can set it to `true` or a configuration object to enable the Wallet Connect Modal. */ wcModal?: { /** * Configure the style of Wallet Connect Modal. */ qrModalOptions?: QRModalOptions; } | boolean; }; /** * A wallet configurator for [MetaMask Wallet](https://metamask.io/) which allows integrating the wallet with React. * * It returns a [`WalletConfig`](https://portal.thirdweb.com/references/react/v4/WalletConfig) object which can be used to connect the wallet to via [`ConnectWallet`](https://portal.thirdweb.com/react/v4/components/ConnectWallet) component or [`useConnect`](https://portal.thirdweb.com/references/react/v4/useConnect) hook as mentioned in [Connecting Wallets](https://portal.thirdweb.com/react/v4/connecting-wallets) guide * * @example * ```ts * metamaskWallet({ * projectId: 'YOUR_PROJECT_ID', * connectionMethod: 'walletConnect', // or 'metamaskBrowser', * recommended: true, * }) * ``` * * @param options - * Optional configuration options for the wallet * * ### projectId (optional) * When connecting Core using the QR Code - Wallet Connect connector is used which requires a project id. * This project id is Your project’s unique identifier for wallet connect that can be obtained at cloud.walletconnect.com. * * ### recommended (optional) * If true, the wallet will be tagged as "recommended" in [`ConnectWallet`](https://portal.thirdweb.com/react/v4/components/ConnectWallet) Modal UI * * ### connectionMethod (optional) * Specify how the connection to metamask app should be established if the user is on a mobile device. * * There are two options: `"walletconnect"` and `"browser"` * 1. `"walletconnect"` - User will be redirected to MetaMask app and upon successful connection, user can return back to the web page. * 2. `"browser"` - User will be redirected to MetaMask app and the web page will be opened in MetaMask browser. * * Default is `"walletconnect"` * * @wallet */ export declare const metamaskWallet: (options?: MetamaskWalletConfigOptions) => WalletConfig; //# sourceMappingURL=metamaskWallet.d.ts.map