Author

Topic: I would like to connect to the Electrum SPV network with a 3rd party client (Read 78 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
You can also use other open-source clients that connects to Electrum server as reference.

Example: BlueWallet - github.com/BlueWallet/BlueWallet/blob/master/blue_modules/BlueElectrum.js
legendary
Activity: 3682
Merit: 1580
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
The idea is for my library to connect to the network of SPV nodes, so in this context it's not feasible to self-host an SPV server.

As for communicating with the server, could it be as simple as creating API requests?  Again, this part is above my pay grade but if it helps, here's Blockstream's API documentation: https://github.com/blockstream/esplora/blob/master/API.md

Well, I tried interfacing with Esplora via the Blockstream.info instance. It's not bad, but I'd like to have a fallback option available for querying address balance & tx history, hence the question.

I also have Blockchain, Blockchair, BTC.com APIs as well, all of them without API keys as these will be for public use - though that also means that they too have varying degrees of reliability.

Electrum servers are open and not rate-limited, without requiring heavy fullnode software running on the client, so they'd be the perfect fallback option here Smiley
copper member
Activity: 2338
Merit: 4543
Join the world-leading crypto sportsbook NOW!
This question is really above my pay grade, but maybe I can make a suggestion that will help you down the right track.  I've run a couple of different SPV servers over the last few years including ElectrumX, Romanz' Electrs, and (my favorite,) blockstream's Electrs.  Blockstream's Electrs has been the most stable and practical one that I've used, and it tends to be the one recommended by most client-side developers.

As for communicating with the server, could it be as simple as creating API requests?  Again, this part is above my pay grade but if it helps, here's Blockstream's API documentation: https://github.com/blockstream/esplora/blob/master/API.md
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
How would I go about doing that exactly? Which parts of the source code should I be looking at in particular? And perhaps most importantly, where will I get a list of initial servers just like how Bitcoin Core has lists of "seed nodes" that clients can use to discover other peers?

To be clear, I am building the client from scratch.
Jump to: