Author

Topic: How to dump a bunch of addresses in empty wallet? (Read 401 times)

staff
Activity: 3458
Merit: 6793
Just writing some code
December 01, 2017, 04:46:17 PM
#9
But the question to move the coins from cold wallet to hot wallet still remains (i mean the transaction), it is very complicated to deal with the rawtransaction specially due fee not calculated automatically as celard posted (I watched the video). Do you have any work arounds achow101? and also hope for gui support for this too in the future, not everyone here is a command line wizard.
Instead of creating the entire transaction by hand, use the fundrawtransaction command. What you do is first use createrawtransaction to create a transaction with 0 inputs and the outputs that you want to have. Then you pass that into fundrawtransaction with the other parameters it takes. It will then choose the inputs to use, calculate the fee, and create a change output if necessary. Then you can take the transaction from that and sign it on your offline machine.
legendary
Activity: 1204
Merit: 1028
Thanks guys, I will try this at home later. Maybe I will do some tests on a virtual machine first, or at least with a small amount of bitcoin and see how it works.

But the question to move the coins from cold wallet to hot wallet still remains (i mean the transaction), it is very complicated to deal with the rawtransaction specially due fee not calculated automatically as celard posted (I watched the video). Do you have any work arounds achow101? and also hope for gui support for this too in the future, not everyone here is a command line wizard.
staff
Activity: 3458
Merit: 6793
Just writing some code
Thanks, that definitely helps. It's going to be the longest command line ever tho, I got so many addressees. If I make a mistake, I assume the command will prompt me right? I can't afford a single mistake with this.
If something is wrong, it will tell you it is wrong. Because importmulti can be used for private keys, the sensitive history filter in the Debug Console will replace the command in history with importmulti(...). Because of this, I suggest that you craft your command in a text editor before using it. If something is wrong, you can retrieve the command again and edit it.

So once I add this long command, I must restart my node, then once I open again all of these addresses will show up as watch only on the GUI? something like this:
There is no need to restart your node. If the command is successful, it will rescan the blockchain for you.
legendary
Activity: 1372
Merit: 1252
I was looking at how to do this myself and I saw this tutorial which might help you:

https://www.youtube.com/watch?v=jWKuqP-zTFk

So as you can see, you must make a raw transaction, and after you enter that command and all the details, you get a hash and that string of characters and then you sign the transaction. He does it all on the online wallet tho, so I guess you would need to move that hash into the online node, but don't do anything until you got it clear, I know I will not, hopefully achow can make it clearer.

I also wish that Bitcoin Core work to improve the experience for users that are wanting to use it as a cold storage wallet. Raw transactions aren't user friendly at all. I would like to see this implemented on the GUI. It would be easy to make a mistake while crafting these convoluted commands and end up losing money. In fact, how are you supposed to guess the best fee? you can't use the GUI to get the ideal fee as recommended by Core, you must enter it manually, this is a big problem.

legendary
Activity: 1204
Merit: 1028
Thanks, that definitely helps. It's going to be the longest command line ever tho, I got so many addressees. If I make a mistake, I assume the command will prompt me right? I can't afford a single mistake with this.

So once I add this long command, I must restart my node, then once I open again all of these addresses will show up as watch only on the GUI? something like this:

https://bitcoin.org/img/bitcoin-core/clear-overview.png

Now I just need how to make the transaction and pass it from my cold storage to me node.. I can't find how to properly do this, this should be in bitcoin.org.
staff
Activity: 3458
Merit: 6793
Just writing some code
Im trying to find this command in the wiki and it doesn't exist it seems:
The wiki is outdated (it is always outdated).

Use the help command to get help. If you do help importmulti, it will show you the help for importmulti.

In this wallet, I need all of my addresses as watch only. Im not sure if I should need to add the sending addresses too, but I think I should, if for example I want to deposit on Poloniex and I want to use 1xxxxxxxxxxxxxxxxxxxx4 one I think I will need it.
There are no such things as sending addresses. What Bitcoin Core calls sending addresses should really be called "Address book". You do not want to import those.

So please, how would the importmulti command look if I wanted to add these 5 addresses with their respective labels and to be sorted properly in "Receiving addresses" window and "Sending addresses" but everything watchonly to guarantee no private keys are saved? I just want a "read only" 1:1 copy of my wallet.dat to keep track of balances and keep my sending addresses list too in case I need to sign a transaction there.
Your command should look something like this:
Code:
importmulti '[{"scriptPubKey":{ "address":"1xxxxxxxxxxxxxxxxxxxx1"},"label":"Poloniex withdraw"},{"scriptPubKey":{ "address":"1xxxxxxxxxxxxxxxxxxxx2"},"label":"Donations"},{"scriptPubKey":{ "address":"1xxxxxxxxxxxxxxxxxxxx3"},"label":"Signature campaign"}]'
legendary
Activity: 1204
Merit: 1028
Use the importmulti command. It lets you import multiple addresses or private keys in the same command. Just craft the command in a text editor and copy and paste it when entering.

Im trying to find this command in the wiki and it doesn't exist it seems:

https://en.bitcoin.it/w/index.php?search=importmulti&title=Special%3ASearch&go=Go

I found this but I don't really understand the example provided:

https://github.com/bitcoin/bitcoin/pull/7551

Can you please help. For example, let's say that I have these addresses in my Bitcoin Core wallet:

Receiving addresses

1xxxxxxxxxxxxxxxxxxxx1 "Poloniex withdraw"
1xxxxxxxxxxxxxxxxxxxx2 "Donations"
1xxxxxxxxxxxxxxxxxxxx3 "Signature campaign"

Sending addresses

1xxxxxxxxxxxxxxxxxxxx4 "Poloniex deposit"
1xxxxxxxxxxxxxxxxxxxx5 "Bittrex deposit"

I put this wallet on my offline machine. So it's just the regular wallet.dat that I've been using so far which has all the private keys and so on.

Now on my hot machine which has a Bitcoin Core node running, I create an empty wallet.

In this wallet, I need all of my addresses as watch only. Im not sure if I should need to add the sending addresses too, but I think I should, if for example I want to deposit on Poloniex and I want to use 1xxxxxxxxxxxxxxxxxxxx4 one I think I will need it.

So please, how would the importmulti command look if I wanted to add these 5 addresses with their respective labels and to be sorted properly in "Receiving addresses" window and "Sending addresses" but everything watchonly to guarantee no private keys are saved? I just want a "read only" 1:1 copy of my wallet.dat to keep track of balances and keep my sending addresses list too in case I need to sign a transaction there.

Note that I have never done this before. Im scared to screw this up and somehow save my private addresses on my online machine. Also I don't know how to sign transactions offline and put them back into the online node to make the actual transaction. This was always rather confusing to me but it's time to learn this stuff for once. I can't no longer sleep well if I don't learn this.
staff
Activity: 3458
Merit: 6793
Just writing some code
Use the importmulti command. It lets you import multiple addresses or private keys in the same command. Just craft the command in a text editor and copy and paste it when entering.
legendary
Activity: 1204
Merit: 1028
I need to move a bunch of receiving addresses from my current wallet.dat into an empty wallet.dat's receiving addresses with their respective labels and etc. These must be watchonly addresses. This is for my hot wallet so I can monitor my existing funds. This will be a full node with the full blockchain. I also want to import all of my sending addresses if I need to send to any existing key I have saved and also with their labels.

I saw some people talk about setting Core as a cold wallet Armory style and want to give it a try, but I don't want to import every address manually one by one that will take too much time.

How to do this?
Jump to: