Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: anti on April 23, 2013, 05:27:45 PM



Title: Send bitcoins from selected addresses using bitcoin-qt
Post by: anti on April 23, 2013, 05:27:45 PM
Hi!

I have several addresses in my bitcoin-qt wallet. Is it possible for me to select from which addresses I want to initiate a transfer from? I want coins only to be transferred from some of these addresses, but not all. How to do it?

Thanks!


Title: Re: Send bitcoins from selected addresses using bitcoin-qt
Post by: Bitsky on April 23, 2013, 08:44:40 PM
Not with the official client. Search the forum for coincontrol; it looks liike it could make it into the next release.
Some other clients already have this feature though.


Title: Re: Send bitcoins from selected addresses using bitcoin-qt
Post by: riX on April 23, 2013, 10:30:33 PM
Yes, you can do it with bitcoin-qt, but not through the GUI.
Just create an unique label for the address you want to send from and run
Code:
bitcoind sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]


Title: Re: Send bitcoins from selected addresses using bitcoin-qt
Post by: DannyHamilton on April 24, 2013, 02:08:59 AM
Be aware that Bitcoin-Qt moves around the bitcoins every time you create a transaction (look into "change" addresses), so the bitcoins may not even be associated any longer with the addresses where you originally received them.


Title: Re: Send bitcoins from selected addresses using bitcoin-qt
Post by: CIYAM on April 24, 2013, 02:10:17 AM
Yes, you can do it with bitcoin-qt, but not through the GUI.
Just create an unique label for the address you want to send from and run
Code:
bitcoind sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]

That will not do what you think at all (accounts are *not* addresses).

The only way currently for the OP to do what they want would be to use raw tx's (and I wouldn't recommend that unless you really are very sure about what you are doing).


Title: Re: Send bitcoins from selected addresses using bitcoin-qt
Post by: grue on April 24, 2013, 02:47:48 AM
Yes, you can do it with bitcoin-qt, but not through the GUI.
Just create an unique label for the address you want to send from and run
Code:
bitcoind sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]
accounts system is in no way related to how addresses work. it's for bookeeping ONLY.


Title: Re: Send bitcoins from selected addresses using bitcoin-qt
Post by: CIYAM on April 24, 2013, 02:56:09 AM
it's for bookeeping ONLY.

And even for bookkeeping they are not very useful (as typical bookkeeping involves keeping track of individual account transactions which basically you can't do with Bitcoin).


Title: Re: Send bitcoins from selected addresses using bitcoin-qt
Post by: riX on April 25, 2013, 09:13:36 AM
Yes, you can do it with bitcoin-qt, but not through the GUI.
Just create an unique label for the address you want to send from and run
Code:
bitcoind sendfrom <fromaccount> <tobitcoinaddress> <amount> [minconf=1] [comment] [comment-to]

That will not do what you think at all (accounts are *not* addresses).

The only way currently for the OP to do what they want would be to use raw tx's (and I wouldn't recommend that unless you really are very sure about what you are doing).


Oh, sorry about that, I was wrong.
I had to read the source to believe you, accounts should really be explained better, and sendfromaccount isn't a very good name then.

For the OP: Ok, so the only way to do it with bitcoin-qt is to do something like this:
Run listunspent, choose the outputs you want as inputs, do createrawtransaction, signrawtransaction, sendrawtransaction. Make sure you don't forget about fee or change.
There are scripts that can do this for you.


Or just export the private keys and use something like brainwallet.org if it's a one time thing you need to do.


Title: Re: Send bitcoins from selected addresses using bitcoin-qt
Post by: pc on April 25, 2013, 01:20:50 PM
Doing it with Bitcoin-Qt requires the raw API, as others have said. An example of using it in python is in the "contrib" directory and is actually pretty useful: https://github.com/bitcoin/bitcoin/tree/master/contrib/spendfrom