Post
Topic
Board Development & Technical Discussion
Re: Cold signing a transaction using bitcoin-qt
by
oshirowanen
on 14/06/2014, 13:02:50 UTC
What have I done wrong?

From a hot wallet, I start off by executing listunspent
listunspent
[
{
"txid" : "3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2",
"vout" : 1,
"address" : "moDNytfZa69vc2Hz1ELjPaSJ2DheWiCjT6",
"scriptPubKey" : "76a914546e2062ba7c72e2e2589e5ad89a4cbc35b595eb88ac",
"amount" : 0.57974817,
"confirmations" : 223
}
]

So basically I want to send to a hot wallet public key (mvDLEEymmEijZXyrrNRL3aPMhH8q2m8vE1) from cold wallet public key (mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV). The cold wallet only has 0.57 - 0.0001 fee = send 0.5699, which means the cold wallet will be empty if the transaction is successful, so no change address needed I guess?  Therefore, I run the following from the hot wallet:
createrawtransaction '[{"txid":"3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2","vout":1}]' '{"mvDLEEymmEijZXyrrNRL3aPMhH8q2m8vE1":0.5699
}'

Which in-turn returned the following value. 0100000001e21791bb1542cbaa2500d2fd8503eed6d1a3a9d55cd76b868a809541b9e3013d01000 00000ffffffff0130996503000000001976a914a134b5919d09350f6232260ed1313f73ac6b7bae 88ac00000000

Then from the cold wallet, I get the private key:
dumpprivkey mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV

And I try to sign the transaction from the cold wallet
signrawtransaction '0100000001e21791bb1542cbaa2500d2fd8503eed6d1a3a9d55cd76b868a809541b9e3013d01000 00000ffffffff0130996503000000001976a914a134b5919d09350f6232260ed1313f73ac6b7bae 88ac00000000'  '[{"txid" : "3d01e3b94195808a866bd75cd5a9a3d1d6ee0385fdd20025aacb4215bb9117e2","vout" : 1,"scriptPubKey" : "76a914546e2062ba7c72e2e2589e5ad89a4cbc35b595eb88ac"}]' '["mvNAGP5nNef6MHfB6Tcu426MJboBqrwJZV's private key here"]'

but it returns:
{
"hex" : "0100000001e21791bb1542cbaa2500d2fd8503eed6d1a3a9d55cd76b868a809541b9e3013d01000 00000ffffffff0130996503000000001976a914a134b5919d09350f6232260ed1313f73ac6b7bae 88ac00000000",
"complete" : false
}

What am I doing wrong?