Bitcoin Forum
November 08, 2024, 11:46:51 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Is there a fast way to make a watch only wallet on mobile out of xpub, zpub addr  (Read 159 times)
jackg (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
December 28, 2018, 10:08:29 PM
 #1

I have been trying to make a watching only wallet out of an xpub, a zpub and a legacy address on my new phone (it has an octocore 2GHz processor so it is definitely up to the task Grin) my issue is that it seems in electrum, I can't import an xpub, zpub and legacy address together all at once.

I have gotton round the issue by importing my addresses individually to make the watching only wallet, I'm just wondering if this is normal or if I've done something wrong?
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4361

<insert witty quote here>


View Profile
December 29, 2018, 01:02:02 AM
Merited by theymos (2), jackg (1)
 #2

Electrum does not support having multiple master keys in one HD wallet. Even for watching only wallets. You need to create multiple wallets. (Note: this is true on desktop as well AFAIK!)

I would think that even though they should be using different derivation paths/addresses (xpub vs. zpub), this could prove to be very problematic and confusing, so is no doubt why it isn't supported.

Likewise with trying to combine a master key with "a legacy address" (I assume you mean a single private key? Huh)... Electrum does not support different "types" in one wallet. So, you can't import a single private key into an HD wallet.


█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
jackg (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
December 29, 2018, 01:22:51 AM
 #3

Thanks hcp! I just seemed to have taken a naive approach and thought since I can import addresses of different types, why the public keys wouldn't work although I guess it would mean for a lot of work, if not for the client then for the server.
Abdussamad
Legendary
*
Offline Offline

Activity: 3682
Merit: 1580



View Profile
December 29, 2018, 04:03:15 AM
 #4

There is the option to create a non-deterministic watch only wallet with specific addresses. See 2 here: https://bitcoinelectrum.com/creating-a-watch-only-wallet/ . It won't automatically generate new addresses though since it's not deterministic.
pooya87
Legendary
*
Offline Offline

Activity: 3626
Merit: 11020


Crypto Swap Exchange


View Profile
December 29, 2018, 04:29:04 AM
 #5

it shouldn't be that hard to implement though! Electrum itself will never do it because it doesn't make sense but you probably can write a small script that does it on top of your Electrum. i am not familiar with python otherwise i would have done it. these are the steps:
1- run an script to get n number of master public keys and generate m number of addresses for each master key (m being gap limit in first iteration)
2- import these addresses into Electrum though its command interface
3- let Electrum do the work which is contacting the server and receiving transaction history, downloading block_headers, and updating your balance.
4- run an script that reads your wallet file (you may need to add AES decryption if you have encrypted the watch-only wallet file!) and determines how many of the addresses in it are used. for x number of addresses used run step #1 for m=x

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
jackg (OP)
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


https://bit.ly/387FXHi lightning theory


View Profile
December 29, 2018, 09:03:02 AM
 #6

There is the option to create a non-deterministic watch only wallet with specific addresses. See 2 here: https://bitcoinelectrum.com/creating-a-watch-only-wallet/ . It won't automatically generate new addresses though since it's not deterministic.

I have done that at the moment. I luckily only have 6 addresses with utxos it'll get difficult if I get any more than that (as in quite a few more).
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!