Clarification on signrawtransaction

+1 vote

Hi

I have been looking at using the create/sign/send raw transaction commands and have hit an issue with the signrawtransaction call.  I have the hex from from initial createrawtransaction and my expectation was I could then sign this with my private key (that is not within the wallet).  Looking at the help it looks like I need to re-submit quite a few attributes pertaining to the transaction that were used in the createrawtrnsaction, see below?

signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )

Have I got this right? If so, why is that and do you have a concrete example of how to source all the data elements to get the transaction successfully signed?

 

Many Thanks

 

Marty

 

asked Mar 18, 2016 by marty

1 Answer

0 votes

Each of the parameters after the first is optional, so if you want to provide private keys but not an explicit list of previous transaction outputs, you should be able to pass an empty array for that second parameter, i.e. '[]' if you're entering a command on the command line - or if that doesn't work you can also try just the empty ''

answered Mar 18, 2016 by MultiChain
...