createrawtransaction, multiple outputs, single input? following the manual on https://bitcointalk.org/index.php?topic=101525.0 , i would like to merge multiple fractions of BTC from multiple addresses i own, to another single address i own(reassemble, sort of, organize stuff). how will my approach look like? i still don't get what does "vout" value mean in the createrawtransaction? i think it's about this:

# assume i would like to merge transactions "aaaa..." and "bbbb..." to address "1mainaddr..."
# "aaaa..." has 0.01  btc unspent
# "bbbb..." has 0.0105 btc unspent
# "1mainaddr..." is emtpy
# i would like to pay 0.0005 btc as a fee

createrawtransaction [{txid:aaaa...,vout=0},{txid:bbbb...,vout=1}] {1mainaddr...=0.02}


is that correct?
i would like to first test this on testnet but still waiting on block confirmations. i'd appreciate 1-2 testnet BTC on moBHB5euzHyKtcabpD3UND9PYB994cisqb and will return it to you once block 101602 is confirmed.
ok, i figured it out. the correct answer to the following example will look this way:

# get your unspent transactions
listunspent
# select the ones you want to pour BTC from, please also note their 'vout', it is an output of a transaction you own a private key to and therefore able to spend.
createrawtransaction '[{"txid":"aaaa...","vout":0},{"txid":"bbbb...","vout":0}]' '{"1mainaddr...":0.02}'
# explained: you are using two outputs, of total 0.0205 BTC. you give away 0.0005 fee and you keep 0.02 at your 1mainaddr...
# you can dump the resulting transaction draft to see how it'll look like
decoderawtransaction &lt;...result_from_createrawtransaction...&gt;
# sign it with your private keys
signrawtransaction &lt;...result_from_createrawtransaction...&gt;
# if it returns you a hex with "complete" : true, you can now send it off to network
# if it returns "complete" : false, you either don't have a private key for signing, or you might have specified invalid 'vout'. google for more possible problems, those were two i experienced.
sendrawtransaction &lt;...result_from_signrawtransaction_hex...&gt;


references:


people.xiph.org/~greg/signdemo.txt
bitcointalk.org/index.php?topic=101525.0


thanks:


@Murch


this is a manual for original satoshi client.