I have created a BIP39 seed phrase, and I'm using that phrase to create addresses using Bitcore's HDPrivateKey https://bitcore.io/api/lib/hd-keys
I've also imported the same seed phrase to Electrum, but when I send transactions to addresses generated by the app, the transactions are not seen by Electrum. If the two wallets share the same seed phrase, shouldn't the UTXOs sent to an address from one wallet, "appear" in the other?
Here is the code I'm using in my app to generate addresses:
var counter = 0
var code = new Mnemonic(MYPHRASE);
var hdPrivateKey = code.toHDPrivateKey('', 'testnet')
hdPrivateKey.derive(counter).privateKey.toAddress()
counter++
I found the issue. It's the derivation path. In my application, I was just using a counter, but in Electrum, it was using "m/44'/1'/0'/0/". I updated my code to append the counter to the path like so, ""m/44'/1'/0'/0/5", and now I see the transactions coming through.
It still seems strange that with the same seed, the two wallets wouldn't sync, regardless of derivation path...