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