import type { CoinbaseWallet } from "./Coinbase"; import type { MetaMask } from "./MetaMask"; import type { PhantomWallet } from "./Phantom"; export type NetworkConfig = { name: string; chainId: number; rpcUrl: string; symbol: string; blockExplorerUrl?: string; }; export type BaseWalletConfig = { network?: NetworkConfig; walletSetup: (wallet: MetaMask | CoinbaseWallet | PhantomWallet) => Promise; }; export type MetaMaskConfig = { password: string; walletSetup: (wallet: MetaMask, context: { localNodePort: number; }) => Promise; } & BaseWalletConfig; export type CoinbaseConfig = { password: string; walletSetup: (wallet: CoinbaseWallet, context: { localNodePort: number; }) => Promise; } & BaseWalletConfig; export type PhantomConfig = { password: string; walletSetup: (wallet: PhantomWallet, context: { localNodePort: number; }) => Promise; } & BaseWalletConfig; export type WalletSetupFn = (wallet: T) => Promise;