"""Manual smoke test: connect to the configured Electrum server, do the server.version handshake, subscribe to headers and confirm a sane tip height. Usage: PYTHONPATH=. python scripts/electrum_smoke_test.py """ import asyncio from app.config import settings from app.electrum.client import ElectrumClient async def main() -> None: client = ElectrumClient(settings.electrum_host, settings.electrum_port, settings.electrum_use_ssl) await client.connect() print("connected + handshake OK") header = await client.subscribe_headers() print("tip:", header) assert header["height"] > 0 await client.close() print("OK") if __name__ == "__main__": asyncio.run(main())