Bitcoin Forum
April 23, 2026, 06:19:24 PM *
News: Latest Bitcoin Core release: 30.2 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: "signrawtransaction" question,thx!  (Read 398 times)
dujbo (OP)
Newbie
*
Offline Offline

Activity: 15
Merit: 1


View Profile
September 03, 2017, 04:02:54 AM
Merited by ABCbits (1)
 #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!
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3948
Merit: 7688


Just writing some code


View Profile WWW
September 03, 2017, 04:29:54 AM
 #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).

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!