How can I create a transaction that collects inputs from many addresses and sends them to one address in bitcoind?

3

3

I'm using bitcoind and would like to understand how to create transactions that send inputs from many specifically selected addresses (from my wallet) to one destination address. I want to do manually what the sendtoaddress command does automatically.

If this operation requires me to create a raw transaction could you please provide a working example? I already read bitcoin.it:raw_transactions, but it is hard to understand without an example and unfortunately the wiki article doesn't provide any.

I would appreciate help greatly.

Arsenius

Posted 2013-09-16T11:58:25.253

Reputation: 219

1Please be careful, I have seen many people accidently mess up with raw transactions. Such as sending hundreads of BTC as a miners fee or the likes.MaxSan 2013-09-16T14:44:45.423

I will plan to test dipply with small amounts first.Arsenius 2013-09-16T15:28:44.167

There is also the "testnet" which is made for testingRentFree 2013-11-17T05:36:03.040

Answers

2

When you have a bitcoin balance, that balance is actually unspent outputs from transactions your addresses have already received.

So when you want to send a raw transaction, what you include in that is the transactions and unspent outputs from those transactions... these can be from any address in your wallet.

The basic idea is;

createrawtransaction signrawtransaction sendrawtransaction

If you google around, you'll find plenty of examples of their use.

ManreeRist

Posted 2013-09-16T11:58:25.253

Reputation: 737

Cool, please mark as answer to give me some cred :)ManreeRist 2013-09-17T23:39:21.780

Not enough reputation to do it, but I will.Arsenius 2013-10-03T04:56:21.993

Coinbin seem to require internet/blockchain access in order to create a raw transaction. Is this true with all methods of creating raw transactions?Alex Millar 2015-05-29T21:51:13.217