Bitcoin Forum
May 15, 2024, 06:45:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: raw transaction over json/post - am i doing it right ?  (Read 465 times)
MrKain (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0



View Profile
May 31, 2013, 01:28:11 PM
 #1



Is the following format json correct ?

I'm sending it over http post over a socket

{"jsonrpc": "1.0", "id":"rqid547333300","method": "createrawtransaction", "params": [{"txid":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","vout":0}] {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx":0.00500000}}:

I'm missing a quote somewhere I think -

thanks for any help

MK
orz.dk
Newbie
*
Offline Offline

Activity: 30
Merit: 0



View Profile WWW
May 31, 2013, 03:08:53 PM
 #2

I am about to play around with this myself, so im interested in the solution.

I may be wrong, and it is untested, but i believe that the entire jsonrpc params should be an array. For the createrawtransaction you need two elements. First element is another array, containing the inputs. Second element is the address. Maybe something like:

{"jsonrpc": "1.0", "id":"rqid547333300","method": "createrawtransaction",

"params": [[ {"txid":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","vout":0}],  {"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx":0.00500000} ]

}


/orz.dk

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!