@lidofinance/browser-service
Version:
This package provides the BrowserService class for initializing and managing a Playwright browser context, network configurations, and wallets (EOA or WalletConnect). It facilitates automated testing of interactions with Web3 wallets (e.g., Metamask) and
48 lines • 1.65 kB
TypeScript
import { AccountConfig, CommonWalletConfig, NetworkConfig, WalletPage, WalletConnectTypes } from '@lidofinance/wallets-testing-wallets';
import { EthereumNodeService, EthereumNodeServiceOptions } from '@lidofinance/wallets-testing-nodes';
import { BrowserOptions } from './browser.context.service';
type BrowserServiceOptions = {
networkConfig: NetworkConfig;
accountConfig: AccountConfig;
walletConfig: CommonWalletConfig;
nodeConfig?: EthereumNodeServiceOptions;
standUrl?: string;
browserOptions?: BrowserOptions;
};
/**
* Required options depends on `WalletConnectTypes`:
* - `WalletConnectType.EOA` and `WalletConnectType.WC`:
* - networkConfig
* - accountConfig
* - walletConfig
* - nodeConfig
* - browserOptions?
* - `WalletConnectType.IFRAME`:
* - networkConfig
* - accountConfig
* - walletConfig
* - nodeConfig
* - standUrl
* - browserOptions?
*/
export declare class BrowserService {
private options;
private logger;
private walletPage;
private browserContextService;
ethereumNodeService: EthereumNodeService;
readonly networkConfig: NetworkConfig;
readonly walletConfig: CommonWalletConfig;
isFork: boolean;
constructor(options: BrowserServiceOptions);
getWalletPage(): WalletPage<WalletConnectTypes>;
getBrowserContextPage(): import("playwright-core").Page;
initWalletSetup(useFork?: boolean): Promise<void>;
setupWithNode(): Promise<void>;
setup(): Promise<void>;
teardown(): Promise<void>;
private setWalletPage;
private annotateExtensionWalletVersion;
}
export {};
//# sourceMappingURL=browser.service.d.ts.map