Bitcoin Forum
May 06, 2024, 12:29:27 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Development & Technical Discussion / BitN00B: Python/JSON - getNewAddress(account) - fail / How To? on: October 14, 2018, 05:13:02 PM
When making a JSON call, RPC to bitcoind, what is the "account" parameter in getNewAddress(account).  What does 'account' mean? and where I am supposed to get it?

Does anyone have actual code to demo this?  This is frustrating given how much time I have spent ( a day ),
trying to get this to work in code, trying different things, googling all over, following things to a dead end.

In my Bitcoin QT, I see no reference to "account", I don't know what to put there as a parameter.

Reference:
 https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list#Full_list

If I leave it blank, or I make up something to put there, I get a socket timeout.
I can successfully call: getblockchaininfo, and a few others with no socket timeout, but not getNewAddress.

--
Also if anyone can help, I please need a clear concise exmple of sending a transaction.  I can find no good code examples on how to create a raw transaction and send with any Python/RPC/Bitcoind library out there.  None.  It should not take more than a few lines of code to send a transaction.

 1. set variables
 2. make a call to send the transaction (that's it).
 
 I would like to have the raw transaction printed out to debug, both raw transaction and the actual hex code that is sent.
 
 Thank You,
 
 
 JC
2  Bitcoin / Bitcoin Technical Support / BitN00B: Python / JSON Bitcoind transactions - fail, How to? on: October 14, 2018, 04:52:08 PM
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
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!