Author

Topic: "signrawtransaction" question,thx! (Read 390 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
September 02, 2017, 11:29:54 PM
#2
The second parameter needs to be provided whenever Bitcoin Core does not have the inputs you are spending in its UTXO set. This could be when you are signing for inputs that have already been spent, are on an offline machine, Bitcoin Core is out of sync, or a multisig input is not part of your wallet (i.e. you wallet does not know the redeemscript).
newbie
Activity: 15
Merit: 1
September 02, 2017, 11:02:54 PM
#1
the "signrawtransaction" help is :
-----------------------------
signrawtransaction "hexstring" ( [{"txid":"id","vout":n,"scriptPubKey":"hex","redeemScript":"hex"},...] ["privatekey1",...] sighashtype )

Sign inputs for raw transaction (serialized, hex-encoded).
The second optional argument (may be null) is an array of previous transaction outputs that
this transaction depends on but may not yet be in the block chain.
The third optional argument (may be null) is an array of base58-encoded private
keys that, if given, will be the only keys used to sign the transaction.
-----------------------------
My question is when the second parameter needs to be provided?
If I use the online computer to generate the transaction, then use the offline computer to sign the transaction, does the second parameter needs to be provided? Thanks!
Jump to: