Bitcoin Forum

Bitcoin => Electrum => Topic started by: btcbot on August 10, 2017, 06:56:25 AM



Title: Need Specific Change Addresses to Move BCash Coins from Offline Wallet
Post by: btcbot on August 10, 2017, 06:56:25 AM
I've been trying to generate specific change addresses that I see in my watch-only offline wallet so that I can sweep their private keys to get my BCC tokens.

I've tried create_new_address (with a 200 for loop) and I've yet to generate this address.  I've tried typing in the public address and it seems to not recognize it.

Any help would be appreciated!



Title: Re: Need Specific Change Addresses to Move BCash Coins from Offline Wallet
Post by: btcbot on August 10, 2017, 07:37:23 AM
Sorry to respond to my own question, but why can't I type in a public address and get the privkey?  Shouldn't I cryptographically verify it? 


Title: Re: Need Specific Change Addresses to Move BCash Coins from Offline Wallet
Post by: ranochigo on August 10, 2017, 07:49:54 AM
I've been trying to generate specific change addresses that I see in my watch-only offline wallet so that I can sweep their private keys to get my BCC tokens.

I've tried create_new_address (with a 200 for loop) and I've yet to generate this address.  I've tried typing in the public address and it seems to not recognize it.

Any help would be appreciated!
Are you using the xpub?

Try increasing the gap limit
Code:
wallet.storage.put('gap_limit',20)
.

It will generate addresses till it sees the one with balance and generate 20 extra from that point. That is if you have no other coins in any other address.
Sorry to respond to my own question, but why can't I type in a public address and get the privkey?  Shouldn't I cryptographically verify it? 
Then everyone would have access to every single address in the world. The public address is known by everyone once you spend an input from an address. You can get the public key from the private key but not the other way round.


Title: Re: Need Specific Change Addresses to Move BCash Coins from Offline Wallet
Post by: btcbot on August 10, 2017, 08:08:02 AM
Thanks for your response... 

I've got a watch-only wallet which shows me the addresses with coins on Windows so I know which ones I need to sweep.  (I took a photograph with an old camera to record those). 

Then I'm going offline, on Linux, generating my wallet from seed. 

First thing I did was increase the gap limit to 200 and that does not add new change addresses to my address list, only regular addresses.  Offline, there is no record of usage or coins at each address, of course. 

As I posted, I've also used create_new_address, but it's yet to create those few change addresses I need.  I generated about 200 already and am searching for the address with a text editor. 

Sorry to confuse, I meant to ask, in the second question, why I couldn't type a public address from within the console to getprivatekeys().  Does Electrum really need to 'generate' them to see if they're mine and that I have authority to see the private key?

Thanks again for your help...


Title: Re: Need Specific Change Addresses to Move BCash Coins from Offline Wallet
Post by: btcbot on August 10, 2017, 08:50:54 AM
A little more research and I found a solution:

From console:

wallet.storage.put('gap_limit', 100)

wallet.gap_limit_for_change = 100

All of my change addresses showed up (in red, but I could access the private keys to sweep them).

 ;D ;D ;D


Title: Re: Need Specific Change Addresses to Move BCash Coins from Offline Wallet
Post by: HCP on August 10, 2017, 08:52:51 AM
Did you use create_new_address(False) or create_new_address(True)?

False creates "Receive" addresses
True creates "Change" addresses

Also, unless your watch only wallet was created with the Master Public Key from your seed... generating new change addresses may not be generating change addresses that are related to your seed.


Title: Re: Need Specific Change Addresses to Move BCash Coins from Offline Wallet
Post by: btcbot on August 10, 2017, 09:01:59 AM
I used '0' so that must have been why it didn't work.

Thanks!