I created a seed phrase and public key via the following Node.js code:

const mnemonic =  bip39.generateMnemonic()
const seed = await bip39.mnemonicToSeed(mnemonic)
const node = bip32.fromSeed(seed)
const xPubString = node.neutered().toBase58()

Then I used BTCPay Server to generate an address for this public key and sent funds to that address. The transaction is confirmed on the chain and shows up in BTCPay Server. However, I'm trying to load this wallet via seed phrase into either Electrum or Wasabi wallets to be able to spend the funds. I can't get the funds to show up in either application. I believe this has to be a problem with using the correct Derivation Path because I'm not sure what the above code defaults to. I can confirm that the address starts with bc1, so I think that tells me that the Derivation Path should be m/84'/0'/0', but it doesn't work.

I've tried just about every combination of Derivation Path I can think of to try to get the funds but nothing seems to show up. Any recommendations?

  • 1
    Where did you get this node.js code? Which library is this using? Have you tried using BIP 39 checkbox while creating a wallet in electrum with the seed: i.imgur.com/kDfgD11.png ?
    – user103136
    Aug 22, 2021 at 4:44
  • It was a mix of reading the library code and some online tutorials. I used the BIP32 and BIP39 Node.js libraries to create this. Yes, whenever I'm importing into Electrum I select the BIP39 box.
    – gkrizek
    Aug 22, 2021 at 5:22
  • What library are you using? I would hazard a guess that this code doesn't do any derivation (I would be surprised if a library implemented automatic derivation for setting a BIP 32 seed), so this is probably the root (at path m).
    – Ava Chow
    Aug 23, 2021 at 0:48
  • You are a wizard ;). That was it! Thank you, For some reason I was expecting it to be derived by default and not at t he most obvious spot, the root!
    – gkrizek
    Aug 23, 2021 at 16:16

1 Answer 1


Andrew Chow answered in the comments. It was at the root! So path m.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.