Author

Topic: Send coins from specific address in wallet (Read 5709 times)

jr. member
Activity: 59
Merit: 10
August 02, 2014, 06:00:11 PM
#20
Use listunspent find the transactions for the address you want to spend.  Then use createrawtransaction, signrawtransaction, sendrawtransaction  Can do them separate but here is a one liner.  Make sure you give yourself the change and put a fee (inputs - outputs). Probably a better way to parse the signrawtransaction json output but sed works for me

Wut?! No, this is no longer required. You can select inputs using the GUI:

https://bitcoinspakistan.com/blog/whats-new-in-version-0-9-0-of-bitcoin-qt/

See the part about coin control.

Yeah if you want to be a wus and use GUIs Smiley  Good to see the easier solutions posted for people.  I posted mine because I was looking how to do it with bitcoind and this thread was what came up in my google search.
legendary
Activity: 3682
Merit: 1580
Use listunspent find the transactions for the address you want to spend.  Then use createrawtransaction, signrawtransaction, sendrawtransaction  Can do them separate but here is a one liner.  Make sure you give yourself the change and put a fee (inputs - outputs). Probably a better way to parse the signrawtransaction json output but sed works for me

Wut?! No, this is no longer required. You can select inputs using the GUI:

https://bitcoinspakistan.com/blog/whats-new-in-version-0-9-0-of-bitcoin-qt/

See the part about coin control.
hero member
Activity: 533
Merit: 500
^Bitcoin Library of Congress.
The sensible thing to do in that case would be to keep two different wallet files, one for personal, and one for business.  You can use the -datadir parameter for the client to point it at a different folder for storing one or the other.  It takes a bit more disk space, but that's relatively cheap these days, and it's a lot less hassle than trying to keep it all separate manually.

-wallet= would be more useful in this case.  OP could simply create two shortcuts, one label business and one labeled personal, each one pointing to their respective wallet file.

Source for command line options:https://en.bitcoin.it/wiki/Running_Bitcoin#Command-line_arguments
legendary
Activity: 2912
Merit: 1060
In the future switch to armory, you still need core
jr. member
Activity: 59
Merit: 10
Use listunspent find the transactions for the address you want to spend.  Then use createrawtransaction, signrawtransaction, sendrawtransaction  Can do them separate but here is a one liner.  Make sure you give yourself the change and put a fee (inputs - outputs). Probably a better way to parse the signrawtransaction json output but sed works for me

Code:
# bitcoind listunspent
[
    {
        "txid" : "4e415cfe96e5b557ce36be581ab78a43104603ec1c9ad1df6f874943a1d80112",
        "vout" : 0,
        "address" : "moTgwCgQ8XY3C2eVVHdoDupTb1x5PMz2du",
        "scriptPubKey" : "76a9145722efd931fcd4c5515b7b97fbaae74f26c69a5688ac",
        "amount" : 50.00730000,
        "confirmations" : 2
    },
    {
        "txid" : "5579758b854ee488c64a927dba8f58a6e6f1f1f79e543255b34463c16d95619e",
        "vout" : 0,
        "address" : "mtjjE9CdyXZcpwSRPNa9a1FMXLUfBtTWSw",
        "account" : "",
        "scriptPubKey" : "76a914910422711e72aa0685e370d499c0502400e24be688ac",
        "amount" : 1.11110000,
        "confirmations" : 8
    },
    {
        "txid" : "80fd81d3a8edd665c6a85b4f2d0ef064e9e7717b65b3b42b1802e1af2a9084c2",
        "vout" : 0,
        "address" : "n38do8raoFbypesNcz8FCxyjyj6Z7g3J5v",
        "account" : "",
        "scriptPubKey" : "76a914ed1a2c9b4f91a26900c8dca84da7203062f4c20488ac",
        "amount" : 50.00020000,
        "confirmations" : 66812
    }
]

# bitcoind createrawtransaction '[{"txid":"4e415cfe96e5b557ce36be581ab78a43104603ec1c9ad1df6f874943a1d80112", "vout": 0}]' '{"mqWpWo4o7GpyUgQKvpNBd4F372rvrLN4ij": 1.0,"moTgwCgQ8XY3C2eVVHdoDupTb1x5PMz2du": 49.0072}' | xargs bitcoind signrawtransaction | sed -n -e '/hex/p' | sed -e 's/^.*"hex" : "\(.*\)".*$/\1/' | xargs bitcoind sendrawtransaction
ed2d91c4a8f2b578d2d1d6339949ad553b7c719f2402d701eaccf4699f61ff84

hero member
Activity: 619
Merit: 500
January 28, 2012, 10:46:57 AM
#15
Armory, which is currently in pre-Alpha. Maybe others.

Armory looks very promising.
legendary
Activity: 2126
Merit: 1001
January 28, 2012, 07:29:26 AM
#14
If you have a specific address that you need to send coins from, the easiest way is to export the private key for that address with pywallet, and import it into a brand new wallet (either by swapping the wallet file on your existing install, or better, by running a completely different Bitcoin on a virtual machine (virtual PC or VirtualBox). Then payments can only be funded from the balance of that one address. Note that any remaining balance will be sent back to a new hidden address inside the wallet as "change", so if you don't send the full amount, you must continue to use the second copy of the Bitcoin wallet to use the remaining money until your balance is zero.

Thats how I would do it too.
Or, find out how much Bitcoins are on which address in your wallet (pywallet is the easiest for that), blockexplorer helps.
If you transfer the exact amount that is on one of your adresses, the client should use that address too. Similar, if only one address has enough funds to do the transaction, the client should use that one (instead of combining several addresses worth).

I use several wallets and keep book about the used addresses in them. PITA, I will read up on multi-wallet-clients right now!

Ente
legendary
Activity: 1512
Merit: 1036
January 21, 2012, 12:29:50 PM
#13
If you have a specific address that you need to send coins from, the easiest way is to export the private key for that address with pywallet, and import it into a brand new wallet (either by swapping the wallet file on your existing install, or better, by running a completely different Bitcoin on a virtual machine (virtual PC or VirtualBox). Then payments can only be funded from the balance of that one address. Note that any remaining balance will be sent back to a new hidden address inside the wallet as "change", so if you don't send the full amount, you must continue to use the second copy of the Bitcoin wallet to use the remaining money until your balance is zero.
donator
Activity: 2058
Merit: 1054
January 20, 2012, 08:46:05 AM
#12
Mind if I ask why you think you want to do this?

I want to keep my private and my business chains separate.
Somebody I'm doing business with should not automatically know where I spend my money in my private time. Some thins are just private. (has nothing to do with illegal)
If you really want to keep them divided, you'd be better off running two nodes, or using a client that can handle multiple wallet files.
[...]

I don't want to have 2 nodes running.
Is there a client that allows multiple wallet files?
Armory, which is currently in pre-Alpha. Maybe others.
hero member
Activity: 619
Merit: 500
January 20, 2012, 08:25:04 AM
#11
Mind if I ask why you think you want to do this?

I want to keep my private and my business chains separate.
Somebody I'm doing business with should not automatically know where I spend my money in my private time. Some thins are just private. (has nothing to do with illegal)
If you really want to keep them divided, you'd be better off running two nodes, or using a client that can handle multiple wallet files.
[...]

I don't want to have 2 nodes running.
Is there a client that allows multiple wallet files?
kjj
legendary
Activity: 1302
Merit: 1026
January 19, 2012, 03:22:12 PM
#10
Mind if I ask why you think you want to do this?

I want to keep my private and my business chains separate.
Somebody I'm doing business with should not automatically know where I spend my money in my private time. Some thins are just private. (has nothing to do with illegal)

If you really want to keep them divided, you'd be better off running two nodes, or using a client that can handle multiple wallet files.

Picking the transactions to redeem by hand or by script is a poor idea.  You are almost certainly losing both anonymity and security, which seems like a poor trade if you are looking for privacy.
donator
Activity: 2058
Merit: 1054
January 19, 2012, 02:15:51 PM
#9
The sensible thing to do in that case would be to keep two different wallet files, one for personal, and one for business.  You can use the -datadir parameter for the client to point it at a different folder for storing one or the other.  It takes a bit more disk space, but that's relatively cheap these days, and it's a lot less hassle than trying to keep it all separate manually.
That works, but of course the real solution is to use a client software which can handle multiple wallets conveniently, which I believe Armory does.
newbie
Activity: 37
Merit: 0
January 19, 2012, 02:04:27 PM
#8
The sensible thing to do in that case would be to keep two different wallet files, one for personal, and one for business.  You can use the -datadir parameter for the client to point it at a different folder for storing one or the other.  It takes a bit more disk space, but that's relatively cheap these days, and it's a lot less hassle than trying to keep it all separate manually.

hero member
Activity: 619
Merit: 500
January 19, 2012, 04:33:26 AM
#7
[...]
The default client can't spend specific coins, but you can do it with the coderrr fork.  Get it here:  https://bitcointalk.org/index.php?topic=24784.0;all

That's what I was looking for.
Thanks.

Mind if I ask why you think you want to do this?

I want to keep my private and my business chains separate.
Somebody I'm doing business with should not automatically know where I spend my money in my private time. Some thins are just private. (has nothing to do with illegal)
donator
Activity: 2058
Merit: 1054
January 18, 2012, 06:35:49 AM
#6
Money come from address X, and go out using address Y... With Bitcoin 0.4 this is possible, right?!
You just need to change "Your Bitcoin Address" field...
Increasing anonymity...
That's not how it works.

Mind if I ask why you think you want to do this?
I don't know about the OP but there are plenty of use cases. Personally I'd be more interested in an option to send from any address but a specified one.
hero member
Activity: 728
Merit: 500
165YUuQUWhBz3d27iXKxRiazQnjEtJNG9g
January 18, 2012, 06:02:44 AM
#5
fromaccount is an account, which is not the same as an address.  Addresses are things that go in the blockchain.  Accounts are just virtual ledgers within your wallet.

The default client can't spend specific coins, but you can do it with the coderrr fork.  Get it here:  https://bitcointalk.org/index.php?topic=24784.0;all
administrator
Activity: 5222
Merit: 13032
January 18, 2012, 02:17:35 AM
#4
I'm kind of new at using Bitcoind, but this should work, no?

No. There's no way to do it with the unmodified client.
legendary
Activity: 1204
Merit: 1000
฿itcoin: Currency of Resistance!
January 18, 2012, 01:59:41 AM
#3
Money come from address X, and go out using address Y... With Bitcoin 0.4 this is possible, right?!
You just need to change "Your Bitcoin Address" field...
Increasing anonymity...
kjj
legendary
Activity: 1302
Merit: 1026
January 18, 2012, 01:53:00 AM
#2
Mind if I ask why you think you want to do this?
hero member
Activity: 619
Merit: 500
January 18, 2012, 01:39:51 AM
#1
Hi

Is it possible to choose which Bitcoins will be send using Bitcoin-Qt or bitcoind?
E.g. I have 3 addresses in my wallet
A has 1 BTC
B has 2 BTC
C has 1 BTC

I now want to send 1.5 BTC without using the BTCs that are in A or C.

Thanks

Edit: typo I have 2 addresses...
Jump to: