Bitcoin Forum
April 26, 2024, 08:55:36 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: What are createrawtransaction() format parameters jsonRPCClient in bash?  (Read 748 times)
G_Qu (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
June 18, 2014, 08:15:23 PM
 #1

I've been delving into experimentation with bitcoind using bash in terminal on OSX Mavericks. Though it's been fun, I have yet to stop receiving parsing errors with my code strings. I would also prefer using what I'm more comfortable with than learning Python. Does anyone know the correct order/format of the strings in bash?
1714164936
Hero Member
*
Offline Offline

Posts: 1714164936

View Profile Personal Message (Offline)

Ignore
1714164936
Reply with quote  #2

1714164936
Report to moderator
1714164936
Hero Member
*
Offline Offline

Posts: 1714164936

View Profile Personal Message (Offline)

Ignore
1714164936
Reply with quote  #2

1714164936
Report to moderator
1714164936
Hero Member
*
Offline Offline

Posts: 1714164936

View Profile Personal Message (Offline)

Ignore
1714164936
Reply with quote  #2

1714164936
Report to moderator
Even in the event that an attacker gains more than 50% of the network's computational power, only transactions sent by the attacker could be reversed or double-spent. The network would not be destroyed.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714164936
Hero Member
*
Offline Offline

Posts: 1714164936

View Profile Personal Message (Offline)

Ignore
1714164936
Reply with quote  #2

1714164936
Report to moderator
1714164936
Hero Member
*
Offline Offline

Posts: 1714164936

View Profile Personal Message (Offline)

Ignore
1714164936
Reply with quote  #2

1714164936
Report to moderator
1714164936
Hero Member
*
Offline Offline

Posts: 1714164936

View Profile Personal Message (Offline)

Ignore
1714164936
Reply with quote  #2

1714164936
Report to moderator
DannyHamilton
Legendary
*
Online Online

Activity: 3374
Merit: 4610



View Profile
June 18, 2014, 11:14:30 PM
 #2

Not sure about createrawtransaction, but I've gotten the following to work with listunspent, and getinfo:

Code:
curl --user USERID --data-binary '{"method": "COMMAND" }' http://127.0.0.1:8332/

Where:
  • USERID is the rpcuser from bitcoin.conf
  • COMMAND is the RPC command

When there is one parameter (such as with dumpprivkey, gettransaction, and validateaddress) the following seems to work:

Code:
curl --user USERID --data-binary '{"method": "COMMAND", "params": ["PARAMETER"]}' http://127.0.0.1:8332/

Where:
  • USERID is the rpcuser from bitcoin.conf
  • COMMAND is the RPC command
  • PARAMETER is the required RPC parameter

I think I've also gotten the following to work:

Code:
curl --user USERID --data-binary '{"method": "walletpassphrase", "params": ["PASSPHRASE", 120]}' http://127.0.0.1:8332/

Where:
  • USERID is the rpcuser from bitcoin.conf
  • PASSPHRASE is the passphrase I used to encrypt my wallet

Hopefully these examples will get you headed down the right path.
DannyHamilton
Legendary
*
Online Online

Activity: 3374
Merit: 4610



View Profile
June 18, 2014, 11:38:00 PM
 #3

By the way, if you get it working with createrawtransaction, please come back to this thread and let us all know what you did.  I'd like to add it to my list of examples.
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!