holepunchto/hyperswarm ? reverse-engineered prompt
Reverse engineered prompt
Build me a JavaScript library for peer to peer networking where apps can find and connect to other peers by sharing a 32 byte topic.
I want it to handle joining a topic as either a client or a server, automatically discover other peers, and open encrypted connections to them. It should let me listen for new connections, join or leave topics, connect directly to a known peer, and keep trying again if a connection drops. Please include simple support for limiting how many peers connect, blocking unwanted peers, and pausing and resuming the swarm cleanly when the app sleeps or wakes up.
Make the API easy to use from Node.js, with a small example and clear README. If you need current details for the networking pieces, look up the latest docs online first.
Are you gonna build this?
make sure you review the code using coderabbit