keep-network / electrum-client-js

Electrum Client for node.js
MIT License
12 stars 11 forks source link

Fix compatibility with variants of ElectrumX #18

Open ghost opened 2 years ago

ghost commented 2 years ago

There are currently five major electrum clients

  1. ElectrumX maintained by Electrum Team

https://github.com/spesmilo/electrumx

  1. ElectrumX maintained by Original Author which seems to drop support for every chain except Bitcoin SV

https://github.com/kyuupichan/electrumx

  1. Electrs which is rewritten in Rust & have better connection management

https://github.com/romanz/electrs

  1. Fullcrum which is rewritten in C++ & supports Bitcoin Cash

https://github.com/cculianu/Fulcrum

  1. jelectrum which is rewritten in Java

https://github.com/fireduck64/jelectrum

Those five clients have slightly different API implementations and they require a different length of parameters ( And, some methods are missing as well like this issue I have created https://github.com/romanz/electrs/issues/698 )

My idea is to detect which client is being used by calling version,

and call with different parameters by the client.

nkuba commented 1 year ago

What is more, it turns out that Blockstream's electrs does not support verbose transactions https://github.com/Blockstream/electrs/pull/36.

I've been working it around in https://github.com/keep-network/tbtc-v2/pull/501.