/** * Persistent shield cache for Node.js SDK. * * Shields from UserOp TXs are indexed by the bundler address on the backend, * not the user's EOA. This cache persists shield data (position, treeNumber, * commitment hash, encrypted bundle) extracted from the TX receipt so UTXOs * can be discovered without querying the bundler address. * * Cache file: ~/.b402/shield-cache.json */ export interface CachedShield { txHash: string; tokenAddress: string; amount: string; indexed: boolean; timestamp: number; commitmentHash?: string; treeNumber?: any; position?: any; npk?: string; encryptedBundle0?: string; encryptedBundle1?: string; encryptedBundle2?: string; shieldKey?: string; [key: string]: any; } /** Disable disk persistence (for tests). */ export declare function setTestMode(enabled: boolean): void; export declare function getCachedShield(key: string): CachedShield | null; export declare function getCachedShields(walletKey: string): CachedShield[]; export declare function setCachedShield(key: string, entry: CachedShield): void; export declare function clearShieldCache(): void;