finally block. Do not reuse a disposed wallet.
Core operations
cleanup
Stop wallet background work and close connections.
Disposes the wallet: clears claim and optimization intervals, aborts the event stream, removes listeners, and closes connections and logging resources. Call this during application shutdown or in a script’s
Prefer cleanup over forcing the process to exit while work may still be pending.