Bitcoin Forum
April 19, 2024, 04:04:11 AM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: sending to an address generated with your xpub key  (Read 160 times)
jhawkings (OP)
Newbie
*
Offline Offline

Activity: 4
Merit: 7


View Profile
September 02, 2020, 02:13:24 PM
Merited by LoyceV (6), ABCbits (1)
 #1

Hi,

I currently use Electrum wallet but I do not always have the wallet on me, it's currently only used on a laptop which is rarely online. So I was thinking of generating an address from my xpub key and creating a generator on my dev site which I can access with phone, or at work.

If I send to an address that has been generated using my xpub will it appear in my Electrum wallet even if Electrum has not generated that address keypair yet? or is there a way I can tell electrum to generate this keypair forcefully using the HD path for example?

Thanks for help.
1713499451
Hero Member
*
Offline Offline

Posts: 1713499451

View Profile Personal Message (Offline)

Ignore
1713499451
Reply with quote  #2

1713499451
Report to moderator
1713499451
Hero Member
*
Offline Offline

Posts: 1713499451

View Profile Personal Message (Offline)

Ignore
1713499451
Reply with quote  #2

1713499451
Report to moderator
"You Asked For Change, We Gave You Coins" -- casascius
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1713499451
Hero Member
*
Offline Offline

Posts: 1713499451

View Profile Personal Message (Offline)

Ignore
1713499451
Reply with quote  #2

1713499451
Report to moderator
jackg
Copper Member
Legendary
*
Offline Offline

Activity: 2856
Merit: 3071


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


View Profile
September 02, 2020, 02:16:30 PM
Merited by ABCbits (1), BrewMaster (1)
 #2

Yeah anything generated by your xpub will be on both wallets. If you have an android phone I'd recommend getting the electrum app itself and scanning the xpub straight into that.

You may want to search "electrum change gap limit on console" too see how to add more addresses by using a simple command.
BrewMaster
Legendary
*
Offline Offline

Activity: 2114
Merit: 1292


There is trouble abrewing


View Profile
September 02, 2020, 04:01:05 PM
 #3

that is the whole point of HD wallets using BIP32 with non-hardened keys, you can produce the same public key from both the xprv and the xpub. and wallets like Electrum do use this scheme to make offline storage and setups like what you are trying to do easily possible.

if you generate the keys automatically they will be sequential and should show up automatically in any wallet you use unless you manually generated a key way down the line at a very high index in which case you have to change the gap as jackg pointed out.

There is a FOMO brewing...
Abdussamad
Legendary
*
Offline Offline

Activity: 3598
Merit: 1560



View Profile
September 03, 2020, 07:07:00 PM
 #4

Hi,

I currently use Electrum wallet but I do not always have the wallet on me, it's currently only used on a laptop which is rarely online. So I was thinking of generating an address from my xpub key and creating a generator on my dev site which I can access with phone, or at work.

If I send to an address that has been generated using my xpub will it appear in my Electrum wallet even if Electrum has not generated that address keypair yet? or is there a way I can tell electrum to generate this keypair forcefully using the HD path for example?

Thanks for help.

addresses should be created at m/0/i where m is the xpub, and i is the index. by default electrum maintains a gap limit or readahead window of 20 unused addresses. as you send money to old addresses new addresses are automatically created to maintain this readahead window.

if you create gaps of unused addresses larger than that gap limit then you will have to raise the gap limit on the laptop so that it sees the addresses you've used.

the easiest way to ensure that you generate the right addresses  is to use electrum itself on your dev site. create a watch only wallet using the xpub and then use the add_request command to get addresses via jsonrpc.


https://electrum.readthedocs.io/en/latest/jsonrpc.html
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!