import type { DiscoverWalletsOptions, DiscoverySession, WalletManagerConfig } from './types.js'; /** * Manager for wallet discovery, configuration, and connection. * * This is the main entry point for dApps to discover and connect to wallets. * * @example Basic usage with async iterator * ```typescript * const discovery = WalletManager.configure({ extensions: { enabled: true } }) * .getAvailableWallets({ chainInfo, appId: 'my-app' }); * * // Iterate over discovered wallets * for await (const provider of discovery.wallets) { * console.log(`Found wallet: ${provider.name}`); * } * * // Or cancel early when done * discovery.cancel(); * ``` * * @example With callback for discovered wallets * ```typescript * const discovery = manager.getAvailableWallets({ * chainInfo, * appId: 'my-app', * onWalletDiscovered: (provider) => console.log(`Found: ${provider.name}`), * }); * * // Wait for discovery to complete or cancel it * await discovery.done; * ``` */ export declare class WalletManager { private config; private constructor(); /** * Configures the WalletManager with provider settings * @param config - Configuration options for wallet providers */ static configure(config: WalletManagerConfig): WalletManager; /** * Discovers all available wallets for a given chain and version. * * Returns a `DiscoverySession` with: * - `wallets`: AsyncIterable to iterate over discovered wallets * - `done`: Promise that resolves when discovery completes or is cancelled * - `cancel()`: Function to stop discovery immediately * * If `onWalletDiscovered` callback is provided, wallets are also streamed via callback. * * @param options - Discovery options including chain info, appId, and timeout * @returns A cancellable discovery session */ getAvailableWallets(options: DiscoverWalletsOptions): DiscoverySession; /** * Creates a WalletProvider from a discovered wallet. * Returns null if the wallet is not allowed by config. * @param discoveredWallet - The discovered wallet from extension discovery. * @param chainInfo - Network information. * @param extensionConfig - Extension wallet configuration. */ private createProviderFromDiscoveredWallet; /** * Checks if an extension is allowed based on allow/block lists * @param extensionId - The extension ID to check * @param config - Extension wallet configuration containing allow/block lists */ private isExtensionAllowed; } //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FsbGV0X21hbmFnZXIuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9tYW5hZ2VyL3dhbGxldF9tYW5hZ2VyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU1BLE9BQU8sS0FBSyxFQUNWLHNCQUFzQixFQUN0QixnQkFBZ0IsRUFJaEIsbUJBQW1CLEVBRXBCLE1BQU0sWUFBWSxDQUFDO0FBRXBCOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7R0E4Qkc7QUFDSCxxQkFBYSxhQUFhO0lBQ3hCLE9BQU8sQ0FBQyxNQUFNLENBR1o7SUFFRixPQUFPLGVBQWlCO0lBRXhCOzs7T0FHRztJQUNILE1BQU0sQ0FBQyxTQUFTLENBQUMsTUFBTSxFQUFFLG1CQUFtQixHQUFHLGFBQWEsQ0FPM0Q7SUFFRDs7Ozs7Ozs7Ozs7O09BWUc7SUFDSCxtQkFBbUIsQ0FBQyxPQUFPLEVBQUUsc0JBQXNCLEdBQUcsZ0JBQWdCLENBOEdyRTtJQUVEOzs7Ozs7T0FNRztJQUNILE9BQU8sQ0FBQyxrQ0FBa0M7SUEwRTFDOzs7O09BSUc7SUFDSCxPQUFPLENBQUMsa0JBQWtCO0NBVzNCIn0=