Bitcoin Forum
May 12, 2024, 07:45:13 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: BitN00B: Python / JSON Bitcoind transactions - fail, How to?  (Read 132 times)
ThisCryptoFail (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
October 14, 2018, 04:52:08 PM
 #1

I need help constructing and sending raw JSON transactions to bitcoind, using a Python library. 

I have Google'd and looked at every Python/Bitcoin related library out there.  I am looking for a library that will let me set variables in a data structure, then call a function that will return, fully constructed a raw transaction to send, and also instructions or a guide to help me do this.  Three lines at most, and will also help me understand the variables I am setting, where to get those from and what they mean.

Surely at ten years into this endeavor, someone out there has done this to help others.  So far after three days of reading, there is nothing out there that does this.  Nothing.  I have tried three libraries so far, nothing works. 

If the first thoughts of your response involve going to another tab in your browser and going to Google to formulate your response, please don't.  I have already done that.  If you have personally used a python/bitcoin library to send a transaction, and it's easy to understand, please post.

I know this has been done a bazillion times with every library out there, I just don't know why creators of libraries do not feel the responsibility of providing concise, easy to understand examples of using that code.  Every piece of code I find that attempts to do this leaves something important and essential out, is outdated and does not work.


JC
1715499913
Hero Member
*
Offline Offline

Posts: 1715499913

View Profile Personal Message (Offline)

Ignore
1715499913
Reply with quote  #2

1715499913
Report to moderator
1715499913
Hero Member
*
Offline Offline

Posts: 1715499913

View Profile Personal Message (Offline)

Ignore
1715499913
Reply with quote  #2

1715499913
Report to moderator
Every time a block is mined, a certain amount of BTC (called the subsidy) is created out of thin air and given to the miner. The subsidy halves every four years and will reach 0 in about 130 years.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715499913
Hero Member
*
Offline Offline

Posts: 1715499913

View Profile Personal Message (Offline)

Ignore
1715499913
Reply with quote  #2

1715499913
Report to moderator
1715499913
Hero Member
*
Offline Offline

Posts: 1715499913

View Profile Personal Message (Offline)

Ignore
1715499913
Reply with quote  #2

1715499913
Report to moderator
1715499913
Hero Member
*
Offline Offline

Posts: 1715499913

View Profile Personal Message (Offline)

Ignore
1715499913
Reply with quote  #2

1715499913
Report to moderator
bob123
Legendary
*
Offline Offline

Activity: 1624
Merit: 2481



View Profile WWW
October 16, 2018, 04:13:30 PM
 #2

I have tried three libraries so far, nothing works. 
[...]
Every piece of code I find that attempts to do this leaves something important and essential out, is outdated and does not work.

What libaries did you try out ?

One of the best libary is from peter todd (https://github.com/petertodd/python-bitcoinlib).
It is not outdated and working properly.

It is documented relatively well. You shouldn't have any problems figuring it out.



[...] Three lines at most [...]

You should first learn programming overall before starting a project you don't understand.
If you limiting yourself to the lowest amount of lines, you don't program properly yet.

Don't expect someone to give you a full tutorial to create your project. Learn the basics, then advance.

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!