You can import the prv keys in Electrum with a prefix to indicate the script type of the addresses you want to derive.
In Electrum - "
Import bitcoin addresses or private keys": add
p2wpkh-p2sh: before each of the private keys to import them as '3' addresses; you can leave them without a prefix for '1' addresses.
Example (
will produce both '3' and '1' address of the same prv key):
p2wpkh-p2sh:KxAz8kcuWebno5cjRTWS2i......
KxAz8kcuWebno5cjRTWS2i......
Further, there are two things I really don't understand. If I have a HD wallet, shouldn't I be able to generate an infinite number of addresses? I realize that Bitcoin Core can't print all of them since I don't have an infinite hard drive, but how is it decided which ones that will be shown? Some kind of internal track record of all my transactions? Also, when reading the wiki page about addresses starting with "3", it says "To spend bitcoins sent via P2SH, the recipient must provide a script matching the script hash and data which makes the script evaluate to true." Does this mean that the private key contained in my dump from Bitcoin Core won't be enough?
You can generate an infinite number of keys with your HDSeed but there's no reason to show or preload the rest if you're not needing them.
Bitcoin core will only pre-load 1000 of each of your internal (
change) and external keys to its keypool, those are the contents of the dump file.
The address type in the dump depends on the address type you're using in bitcoin core but it's actually capable of using all address type of those keys.
If you import them to Electrum as p2sh-SegWit, it will be able to spend from them since it can easily recreate the redeem script from the private key.