import { BrowserContext, Page } from "playwright-core"; export declare class CoinbaseWallet extends Wallet { static id: WalletIdOptions; static recommendedVersion: string; static releasesUrl: string; static homePath: string; static opensHomeOnInstall: boolean; options: WalletOptions; static download: (options: OfficialOptions) => Promise; defaultSetupSteps: Step[]; setup: (options?: Options, steps?: Step[]) => Promise; addNetwork: (options: AddNetwork) => Promise; addToken: (_: AddToken) => Promise; approve: () => Promise; createAccount: (name?: string) => Promise; confirmNetworkSwitch: () => Promise; confirmTransaction: () => Promise; countAccounts: () => Promise; deleteAccount: (_: string) => Promise; deleteNetwork: (name: string) => Promise; getTokenBalance: (tokenSymbol: string) => Promise; hasNetwork: (name: string) => Promise; importPK: (_: string) => Promise; lock: () => Promise; reject: () => Promise; sign: () => Promise; signin: () => Promise; switchAccount: (name: string) => Promise; switchNetwork: (_: string) => Promise; unlock: (password?: string) => Promise; updateNetworkRpc: (_: UpdateNetworkRpc) => Promise; } export declare class MetaMaskWallet extends Wallet { static id: WalletIdOptions; static recommendedVersion: string; static releasesUrl: string; static homePath: string; static opensHomeOnInstall: boolean; options: WalletOptions; constructor(page: Page); static download: (options: OfficialOptions) => Promise; defaultSetupSteps: Step[]; setup: (options?: Options, steps?: Step[]) => Promise; addNetwork: ({ networkName, rpc, chainId, symbol }: AddNetwork) => Promise; addToken: ({ tokenAddress, symbol, decimals }: AddToken) => Promise; approve: () => Promise; createAccount: (name?: string) => Promise; confirmNetworkSwitch: () => Promise; confirmTransaction: (options?: TransactionOptions) => Promise; countAccounts: () => Promise; deleteAccount: (name: string) => Promise; deleteNetwork: (name: string) => Promise; getTokenBalance: (tokenSymbol: string) => Promise; hasNetwork: (name: string) => Promise; importPK: (privateKey: string) => Promise; lock: () => Promise; reject: () => Promise; sign: () => Promise; signin: () => Promise; switchAccount: (name: string) => Promise; switchNetwork: (network?: string) => Promise; unlock: (password?: string) => Promise; updateNetworkRpc: ({ chainId, rpc }: UpdateNetworkRpc) => Promise; } type Step = (page: Page, options?: Options) => Promise; type WalletIdOptions = 'metamask' | 'coinbase'; type WalletOptions = { seed?: string; password?: string; showTestNets?: boolean; }; export declare const getWallet: (id: WalletIdOptions, browserContext: BrowserContext) => Promise; declare abstract class Wallet implements Dappwright { version: string; page: Page; constructor(page: Page); static id: WalletIdOptions; static recommendedVersion: string; static releasesUrl: string; static homePath: string; static opensHomeOnInstall: boolean; static download: (options: OfficialOptions) => Promise; abstract setup: (options?: WalletOptions, steps?: Step[]) => Promise; abstract defaultSetupSteps: Step[]; abstract addNetwork: (options: AddNetwork) => Promise; abstract addToken: (options: AddToken) => Promise; abstract approve: () => Promise; abstract createAccount: (name?: string) => Promise; abstract confirmNetworkSwitch: () => Promise; abstract confirmTransaction: (options?: TransactionOptions) => Promise; abstract countAccounts: () => Promise; abstract deleteAccount: (name: string) => Promise; abstract deleteNetwork: (name: string) => Promise; abstract getTokenBalance: (tokenSymbol: string) => Promise; abstract hasNetwork: (name: string) => Promise; abstract importPK: (pk: string) => Promise; abstract lock: () => Promise; abstract reject: () => Promise; abstract sign: () => Promise; abstract signin: () => Promise; abstract switchAccount: (name: string) => Promise; abstract switchNetwork: (network: string) => Promise; abstract unlock: (password?: string) => Promise; abstract updateNetworkRpc: (options: UpdateNetworkRpc) => Promise; } export type LaunchOptions = OfficialOptions | DappwrightBrowserLaunchArgumentOptions; type DappwrightBrowserLaunchArgumentOptions = Omit; export type DappwrightConfig = Partial<{ dappwright: LaunchOptions; }>; export type OfficialOptions = DappwrightBrowserLaunchArgumentOptions & { wallet: WalletIdOptions; version: 'latest' | string; headless?: boolean; additionalExtensions?: string[]; }; export type DappwrightLaunchResponse = { wallet: Wallet; browserContext: BrowserContext; }; export type AddNetwork = { networkName: string; rpc: string; chainId: number; symbol: string; }; export type UpdateNetworkRpc = { chainId: number; rpc: string; }; export type AddToken = { tokenAddress: string; symbol?: string; decimals?: number; }; export type TransactionOptions = { gas?: number; gasLimit?: number; priority: number; }; export type Dappwright = { addNetwork: (options: AddNetwork) => Promise; addToken: (options: AddToken) => Promise; approve: () => Promise; confirmNetworkSwitch: () => Promise; confirmTransaction: (options?: TransactionOptions) => Promise; createAccount: (name?: string) => Promise; deleteAccount: (name: string) => Promise; deleteNetwork: (name: string) => Promise; getTokenBalance: (tokenSymbol: string) => Promise; hasNetwork: (name: string) => Promise; importPK: (pk: string) => Promise; lock: () => Promise; reject: () => Promise; sign: () => Promise; signin: () => Promise; switchAccount: (name: string) => Promise; switchNetwork: (network: string) => Promise; unlock: (password?: string) => Promise; updateNetworkRpc: (options: UpdateNetworkRpc) => Promise; page: Page; }; /** * Launch Playwright chromium instance with wallet plugin installed * */ export declare function launch(browserName: string, options: OfficialOptions): Promise; export declare const bootstrap: (browserName: string, { seed, password, showTestNets, ...launchOptions }: OfficialOptions & WalletOptions) => Promise<[Dappwright, Page, BrowserContext]>; declare const defaultObject: { bootstrap: (browserName: string, { seed, password, showTestNets, ...launchOptions }: OfficialOptions & WalletOptions) => Promise<[Dappwright, import("playwright-core").Page, import("playwright-core").BrowserContext]>; launch: typeof launch; getWallet: (id: WalletIdOptions, browserContext: import("playwright-core").BrowserContext) => Promise; }; export { defaultObject as default }; //# sourceMappingURL=index.d.mts.map