Author

Topic: Electrum: Can you recover new change addresses from seed? (Read 206 times)

legendary
Activity: 3472
Merit: 10611
very interesting. i messed around a little based on comments here and here is what i figured (my knowledge of Python is still zero Tongue) correct me if i am wrong.

when you call createnewaddress() inside the console, you are running a predefined command. so you are basically accessing this here which calls wallet.create_new_address() which passes False as its argument.

when you call wallet.create_new_address() you are calling the method itself directly from wallet.py file and False is just telling it that it is a receiving address not a change.
now what i don't get is that whether this is a python thing that you can call methods from one of the classes or whether the console.py file is responsible. i have tried reading it but honestly i have no idea what is happening there ...
legendary
Activity: 1624
Merit: 2481
You can see that the wallet.create_new_address(True) command created the 'bc1q0x0d...' address which is shown as a "change" address.

Weird.. i am certainly sure that this hasn't worked when i tried it..
Unfortunately this command doesn't appear in the list of commands (help()).


I guess this was my mistake  Roll Eyes

NOTE: the "True" and "False" are Case-sensitive...
HCP
legendary
Activity: 2086
Merit: 4361
you can generate new change addresses via wallet.create_new_address(True). put in a loop to make many change addresses.
No. This does not work.

Yes. It does:

Quote
>> wallet.create_new_address()
'bc1q7d0yqv39nmerhzxreakzhd8d28wn350kgv244e'
>> wallet.create_new_address(True)
'bc1q0x0d36v4wuz7yq629qwwu683qpxzxuk8chdv89'
>>
Which results in this:


You can see that the wallet.create_new_address(True) command created the 'bc1q0x0d...' address which is shown as a "change" address.

As Abdussamad said, if you want to generate multiples... use a loop like this:
Code: (Create 100 new change addresses)
for i in range(0, 100): print wallet.create_new_address(True)

Code: (Create 100 new "receive" addresses)
for i in range(0, 100): print wallet.create_new_address(False)


NOTE: the "True" and "False" are Case-sensitive...
legendary
Activity: 1624
Merit: 2481
AFAIK electrum unfortunately does only allow to create new 'receiving' addresses via the console, but no change addresses.

you can generate new change addresses via wallet.create_new_address(True). put in a loop to make many change addresses.

No. This does not work. Typos are evil.

This command worked in older versions of electrum.
The current command to create an address in electrum is createnewaddress().

There is no way to actually create a change address via the command line (afaik). createnewaddress doesn't take any parameters.
legendary
Activity: 3682
Merit: 1580
I just want to add this --> You can disable the change address feature by going to tools>preferences>Click the transaction tab
then uncheck "use change addresses" so that if you send a bitcoin the electrum wouldn't make a new change address again then after that if you want to merge all of your balances in one bitcoin address just send all bitcoins to your own bitcoin address.

this is bad for your privacy and security and is not recommended.
legendary
Activity: 3682
Merit: 1580
AFAIK electrum unfortunately does only allow to create new 'receiving' addresses via the console, but no change addresses.

you can generate new change addresses via wallet.create_new_address(True). put in a loop to make many change addresses.
legendary
Activity: 3682
Merit: 1580
what version of electrum are you using and what is your operating system?

it should generate the new change addresses automatically on restore. try switching servers via tools > network, right click on a server and select use server. If that doesn't do it go to wallet menu > addresses > filter then on the addresses tab you can fine tune the display using the filter selections up top. See if you can find the missing change address. ctrl+f can also be used to search for addresses on the addresses tab.

legendary
Activity: 3374
Merit: 3095
Playbet.io - Crypto Casino and Sportsbook
I just want to add this --> You can disable the change address feature by going to tools>preferences>Click the transaction tab
then uncheck "use change addresses" so that if you send a bitcoin the electrum wouldn't make a new change address again then after that if you want to merge all of your balances in one bitcoin address just send all bitcoins to your own bitcoin address.
legendary
Activity: 1624
Merit: 2481
AFAIK electrum unfortunately does only allow to create new 'receiving' addresses via the console, but no change addresses.

In order to derive more change addresses from your seed, you will have to use another wallet/tool to derive them.

Since electrum does not use BIP39, you will have to export the master private key of your wallet.
To do this, you will have to open the console ('View' -> 'Show Console' -> 'Console'-tab). Then enter this command:

Code:
getmasterprivate()

This will print you out your mpk (will start with xprv..).

Afterwards either import it into another wallet (using the derivation path: m/44'/0'/1'/, for receiving-addresses: m/44'/0'/0'/ ) or download this site (https://iancoleman.io/bip39/) and run it on an offline PC to generate the private keys of your addresses (which you afterwards can import into another wallet).
staff
Activity: 3500
Merit: 6152
Which version are you using? I'm not aware of such a bug but assuming this is a display issue only:

If you want to check your balance (console command):

Code:
getbalance()

To get all your addresses that have funds inside them:

Code:
listunspent()

After having your address, you could sign a message like this (It will ask you to type your password If you have any):

Code:
signmessage('address_here', 'Message_here')
copper member
Activity: 630
Merit: 420
We are Bitcoin!
How can I check the correct balance on my new wallet?
Isn't it suppose to show the total balance for the wallet on the bottom left corner?

Quote
Would it be possible to sign from the missing change addresses?
I never had this experience however from common sense it should work since the address is associated with the same wallet/seed. May be it does not show by default. If you know the address then why don't you try a test sign for the address?


Good luck.
jr. member
Activity: 53
Merit: 7
I noticed a a nasty bug on the electrum wallet. If you use it regularly and don't have any change addresses left, electrum will create new ones for you.

If you then restore the wallet from the seed, the newly generated addresses aren't visible / availalable anymore. How can I check the correct balance on my new wallet? Would it be possible to sign from the missing change addresses?
Jump to: