import type { ChainNamespace, KeyringWalletEntry } from "./types"; export declare class WalletDirectoryConflictError extends Error { constructor(message: string); } export type WalletDirectoryEntry = KeyringWalletEntry & { id?: string; namespace?: ChainNamespace; }; export type WalletDirectoryOpts = { addressKey: (namespace: ChainNamespace | undefined, address: string) => string; }; /** * In-memory wallet roster shared by `ByokKeyring` and `ServerKeyring`. * * Lookup keys: * - `id` (optional per entry) — unique within the directory * - `(namespace, address)` — composite key, normalized by the caller-supplied * `addressKey` (local: namespace-scoped lowercase EVM; server: plain * lowercase). Wallets without a namespace use `undefined` for the namespace * slot. * - `name` — linear scan (small N expected; lookup is rare relative to read) * * Returned values are shallow clones, so callers cannot mutate the directory * through them. */ export declare class WalletDirectory { #private; constructor(opts: WalletDirectoryOpts); add(wallet: T): void; has(id: string): boolean; hasAddress(namespace: ChainNamespace | undefined, address: string): boolean; getById(id: string): T | undefined; getByAddress(namespace: ChainNamespace | undefined, address: string): T | undefined; getByName(name: string): T | undefined; values(): T[]; filter(predicate: (wallet: T) => boolean): T[]; addressKey(namespace: ChainNamespace | undefined, address: string): string; }