cryptoadvance / spectrum

Electrum adaptor simulating Bitcoin RPC protocol
MIT License
8 stars 11 forks source link

Chore: Replacing the hand-made elsock implementation #37

Open k9ert opened 1 year ago

k9ert commented 1 year ago

Connecting to a Websocket Server is quite a standard thing and done all over the place. There are good libraries doing that job and doing that job well (error handling/performance/testing/maintenance/security fixes). We're using a custom implementation in elsock.py and i pledge for replacing it with an external library.

Lately i looked into https://github.com/jeffthibault/python-nostr (which has a very nice and clean codebase btw) and it's using https://github.com/websocket-client/websocket-client which seem to be a quite mature thing.

Update: The idea is stupid as the ElectrumConnection is not a websocket connection but a custom socket-protocol.