3
2
Question: Am I able to specify the transaction size in a raw transaction without having to send "change" back to myself?
I get some unspent bitcoins
listunspent()
I grab the txid, vout, and scriptPubKey for each Then I get the list of all the addresses and quantities that I want to send to
createrawtransaction(source, destination)
Let's say my total unspent is 1.00000000 BTC, the total I want to send out to all the addresses is 0.50000000, and it'll be about a 3100 byte transfer that I need to pay 0.00040000 fees for. The way I currently build the destination addresses is to place the address it's coming from (myself) as unspent - tx fees - outgoing, so that would be 0.49600000, the destinations would all be specified, and the fee remains unspecified but deduced by the remainder.
So, this is working for my purposes, but is a little inconvenient. The amount that I'm not sending to anyone sends back to myself and has to be reconfirmed so the funds aren't available until then.
If I had a single unspent address with 100 BTC and needed to send 1 BTC to 15 people, it doesn't seem to make sense to temporarily lock up 85 BTC in the process. If I were to use a client and manually send 1 BTC at a time, the unused funds would remain available, so I feel pretty confident what I'm asking for is possible. Any assistance would be most appreciated.
NOTE: I'm using bitcoind now.
So is there a way to reduce the input? – jchysk – 2013-12-03T17:43:20.113
no, see this for more information: http://bitcoin.stackexchange.com/questions/11411/in-getrawtransaction-what-is-the-vout-integer-in-the-vin-list
– CoinEnablers – 2013-12-03T18:28:12.780I did a bad job with the title of the question for the true question I had. To the question: "Am I able to specify the transaction size in a raw transaction without having to send "change" back to myself?" It seems the answer is no.
Since this is the answer the question in the title I'll mark it as the answer. – jchysk – 2013-12-03T20:22:02.583