Title: Solved: List & delete addresses from command line ? Post by: MoreBloodWine on January 02, 2015, 09:48:25 AM When using bitcoind, what command(s) might one run to list / delete addresses ?
I have a test address I made using this: bitcoind getaccountaddress "Test" Well, I'd like to remove the address "Test", I do have the actual address if that matters. But ya, how does one list addresses and delete them ? Hell, while were at it... even rename / relabel one. Ty. Title: Re: List & delete addresses from command line ? Post by: DannyHamilton on January 02, 2015, 12:25:53 PM When using bitcoind, what command(s) might one run to list / delete addresses ? I have a test address I made using this: bitcoind getaccountaddress "Test" Well, I'd like to remove the address "Test", I do have the actual address if that matters. But ya, how does one list addresses and delete them ? Hell, while were at it... even rename / relabel one. Ty. Why would you need to delete the address? Just ignore it. It isn't hurting anything. Are you aware that with the default settings, the wallet has already generated 100 additional addresses that it hasn't even told you about yet. Would you want to delete all those as well? As for listing all addresses, you can use Quote listreceivedbyaddress 0 true Although I don't think there is a way to list the 100 pre-generated addresses. For that, you'd probably need to use a tool like pywallet. I don't think there is a way to move an address from one account to another account ("re-label"). Since an address is only supposed to be a "single use" entity, it wouldn't really make sense to move or re-label it. You generate it in the account that you want it attached to, then you use it ONCE to receive a tranaction. Then you never use it again for anything. If you need an address to receive a transaction in a different account, you just generate a new address for that account. In my experience, "accounts" in Bitcoin Core do not work the way most people want them to work. Most people find that they'll be much better off implementing accounts outside of Bitcoin Core in their own system and just using Bitcoin Core as a gateway. If you think that the accounts are going to meet your needs, or you've assumed that they will meet your needs, and you haven't taken the time yet to understand exactly how Bitcoin Core manages accounts, then you are probably going to be unpleasantly surprised later. Title: Re: List & delete addresses from command line ? Post by: MoreBloodWine on January 02, 2015, 12:32:00 PM When using bitcoind, what command(s) might one run to list / delete addresses ? I have a test address I made using this: bitcoind getaccountaddress "Test" Well, I'd like to remove the address "Test", I do have the actual address if that matters. But ya, how does one list addresses and delete them ? Hell, while were at it... even rename / relabel one. Ty. Why would you need to delete the address? Just ignore it. It isn't hurting anything. Are you aware that with the default settings, the wallet has already generated 100 additional addresses that it hasn't even told you about yet. Would you want to delete all those as well? As for listing all addresses, you can use Quote listreceivedbyaddress 0 true Although I don't think there is a way to list the 100 pre-generated addresses. For that, you'd probably need to use a tool like pywallet. I don't think there is a way to move an address from one account to another account ("re-label"). Since an address is only supposed to be a "single use" entity, it wouldn't really make sense to move or re-label it. You generate it in the account that you want it attached to, then you use it ONCE to receive a tranaction. Then you never use it again for anything. If you need an address to receive a transaction in a different account, you just generate a new address for that account. In my experience, "accounts" in Bitcoin Core do not work the way most people want them to work. Most people find that they'll be much better off implementing accounts outside of Bitcoin Core in their own system and just using Bitcoin Core as a gateway. If you think that the accounts are going to meet your needs, or you've assumed that they will meet your needs, and you haven't taken the time yet to understand exactly how Bitcoin Core manages accounts, then you are probably going to be unpleasantly surprised later. Before you call me lazy, it's something I will have to do a few times to finish testing something hence the ease of just wanting to delete an address I made. So can it be done ? FWIW, I don't fully understand the client like you suggested but I understand it enough for current needs minus the delete thing if it's even possible. Again, just for addresses created by me using the previously mentioned "command". Ty. Title: Re: List & delete addresses from command line ? Post by: DannyHamilton on January 02, 2015, 12:42:56 PM I'm not aware of any API calls in the Bitcoin Core wallet that will let you delete an address.
Your choices are:
Title: Re: List & delete addresses from command line ? Post by: crazyearner on January 02, 2015, 12:44:56 PM Simple way to get rid of them if you know have nothing in them or any places with the address on as payment would be to back up your other addresses in it ie dump prive key in command line window and save the private keys for each address you want to keep. Back up the wallet.dat for safe keeping just to be on safe side.
Now delete the wallet.dat in the Bitcoin folder then re open and should create a new wallet.dat for you but if things go tits up you can over Wright it with your back up copy. Next go back to command line and import your backed up private keys and import the ones you want to keep. :) Title: Re: List & delete addresses from command line ? Post by: MoreBloodWine on January 02, 2015, 12:51:37 PM Simple way to get rid of them if you know have nothing in them or any places with the address on as payment would be to back up your other addresses in it ie dump prive key in command line window and save the private keys for each address you want to keep. Back up the wallet.dat for safe keeping just to be on safe side. Thx, and even if a wallet is empty I still save keys just in case something shows up one day lol.Now delete the wallet.dat in the Bitcoin folder then re open and should create a new wallet.dat for you but if things go tits up you can over Wright it with your back up copy. Next go back to command line and import your backed up private keys and import the ones you want to keep. :) Title: Re: List & delete addresses from command line ? Post by: crazyearner on January 02, 2015, 11:29:00 PM Simple way to get rid of them if you know have nothing in them or any places with the address on as payment would be to back up your other addresses in it ie dump prive key in command line window and save the private keys for each address you want to keep. Back up the wallet.dat for safe keeping just to be on safe side. Thx, and even if a wallet is empty I still save keys just in case something shows up one day lol.Now delete the wallet.dat in the Bitcoin folder then re open and should create a new wallet.dat for you but if things go tits up you can over Wright it with your back up copy. Next go back to command line and import your backed up private keys and import the ones you want to keep. :) Their ya go always good to keep old wallets just in-case Santa sends you some mystery coins. Least know how to do it now and if you stuck on the commands to use just type help in command line window on bitcoin qt will give all commands in it too :) Title: Re: List & delete addresses from command line ? Post by: MoreBloodWine on January 03, 2015, 11:49:15 AM Simple way to get rid of them if you know have nothing in them or any places with the address on as payment would be to back up your other addresses in it ie dump prive key in command line window and save the private keys for each address you want to keep. Back up the wallet.dat for safe keeping just to be on safe side. Thx, and even if a wallet is empty I still save keys just in case something shows up one day lol.Now delete the wallet.dat in the Bitcoin folder then re open and should create a new wallet.dat for you but if things go tits up you can over Wright it with your back up copy. Next go back to command line and import your backed up private keys and import the ones you want to keep. :) Their ya go always good to keep old wallets just in-case Santa sends you some mystery coins. Least know how to do it now and if you stuck on the commands to use just type help in command line window on bitcoin qt will give all commands in it too :) |