THIS IS THE GREATEST NOSTR RELAY CLASS TO EVER EXIST.

I don't know if it's fast, but it's fucking ACCURATE, RELIABLE, and STABLE. IT RECONNECTS.

YOU CAN USE ASYNC GENERATORS. YOU CAN BREAK OUT OF IT IN A FOR-LOOP AND IT DOES AUTOMATIC CLEANUP AND CLOSES THE SUBSCRIPTION. ABORTING THE SIGNAL WORKS TOO.

Thank you to the websocket-ts library for making me not want to KMS. 👏

https://gitlab.com/soapbox-pub/NSpec/-/blob/main/src/NRelay.ts