createrawtransaction, multiple outputs, single input?
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.