I have used my Xpub which i derived from a native segwitt wallet on Ledger to receive payments.
From where did you exactly copy the public key in the Ledger Live? Did you select 'Edit Account' and then copy the key from the 'Advanced logs'?
I suspect this is exactly where the issue has arisen from. For some reason, Ledger
still shows
legacy xpubs... for
native segwit accounts!!!
This *should* of course be a
zpub.
The end result, being that Electrum will likely be generating Legacy addresses... This can be confirmed by going to "Wallet -> info" menu in Electrum and checking the "script type". It will say "P2PKH" and your addresses in Electrum will start with a "1".
Electrum will only generate "bc1" (aka bech32 aka native segwit) addresses from a "master key" if that master key entered is "zpub". Unfortunately, you can't just do that now, because you funds are on legacy addresses
The "Good News"™, is that your funds are able to be recovered.
The "Better News"™, is that you can recover them,
without needing to "expose" your Ledger seed!
The process would be:
Setup- Ensure that your Ledger Live is NOT running (just helps prevent USB connection issues with Electrum
- Ensure that your Ledger device is connected, unlocked with PIN, and you have opened the "Bitcoin" app on the device (should say 'Application is Ready')
1. In Electrum, select: "File -> New/Restore" from the menu:
2. Give the wallet a name... something unique like "Ledger_XPubRecovery" and then click "Next":
3. Select "Standard Wallet" and then click "Next":
4. Select "Use a hardware device" and then click "Next":
5. Electrum should identify your Ledger device... click "Next":
6. Select "legacy (p2pkh)" option...
and then change the derivation path to:
m/84'/0'/0':
This is the important. So, make sure you set the options exactly as shown! - be careful that you select legacy
first, then change the derivation path, as every time you click one of the options at the top, the derivation path will reset to default!
7. Choose whether or not your want the wallet file encrypted, I'd recommend to "uncheck" the box, otherwise your device MUST be plugged in to open/view the wallet, then click "Next":
NOTE:
NO PRIVATE KEYS will be stored in the wallet file. So it is "safe" to have it unencrypted. Having it not encrypted simply allows you to open the wallet and treat it like a watching-only wallet without the device attached. At worst, if someone steals the wallet file, it'll compromise your privacy, but not the security of your funds.
8. Enjoy access to your funds!