import type { Chain } from "../chains/types.js"; import { createEmitter, type Emitter } from "../utils/tiny-emitter.js"; import type { Account } from "./interfaces/wallet.js"; import type { WalletAutoConnectionOption, WalletId } from "./wallet-types.js"; export type WalletEmitterEvents = { accountChanged: Account; accountsChanged: string[]; disconnect?: never; chainChanged: Chain; onConnect: WalletAutoConnectionOption; }; export type WalletEmitter = Emitter< WalletEmitterEvents >; /** * @internal */ export function createWalletEmitter() { return createEmitter>(); }