Bitcoin Forum
May 22, 2024, 10:31:07 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Need Help with programmatically interfacing with ElectrumX  (Read 52 times)
cog08 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
October 27, 2023, 11:31:07 AM
 #1

Hi, I am a Newbie to Electrum & ElectrumX and would like to know the best path to take in order to achieve being able to make Bitcoin Queries and Transactions using ElectrumX and Python (starting off with a website running on Flask). Could someone help me because it is hard to find examples (tutorials) on the web and I don't know if they are safe (security wise)?

Note:

  • I'm an intermediate where Python and Flask is concerned.
  • I understand the Bitcoin White Paper pretty well.
  • I know that Flask is not for a production environment.
  • I want to use ElectrumX so that the application can better serve concurrent users.
  • I can handle the installation of the Ubuntu, Bitcoin Node, ElectrumX and the Python web App on a Testing PC.
  • If possible, I would like a python example(s) that would help me to achieve anything that is in bold above.


Thanks
DaveF
Legendary
*
Online Online

Activity: 3486
Merit: 6304


Crypto Swap Exchange


View Profile WWW
October 27, 2023, 12:00:00 PM
 #2

I don't know anything about Flask.
However, electrumx_rpc is straight python https://github.com/spesmilo/electrumx/blob/master/electrumx_rpc
So following that should get you at least some of the way there.

-Dave

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
nc50lc
Legendary
*
Offline Offline

Activity: 2422
Merit: 5617


Self-proclaimed Genius


View Profile
October 27, 2023, 02:32:40 PM
 #3

  • If possible, I would like a python example(s) that would help me to achieve anything that is in bold above.
Lucky for you, Electrum client is also pure Python.
You can review its source code to see how it communicates with the specified or public Electrum servers.
Most notably, "network.py".

Link to source: https://github.com/spesmilo/electrum/tree/master/electrum

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
cog08 (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
December 03, 2023, 03:02:48 PM
 #4

Thanks Guys for your help.  Much appreciated.
Work had me tied down, but soon going to follow up on what you told me above.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!