0

I am having a really hard time backing up my bitcoinj mnemonic and importing it somewhere else.

I am backing up the mnemonic like so:

    Wallet wallet = Wallet.createDeterministic(params, Script.ScriptType.P2WPKH);
    DeterministicSeed seed = wallet.getKeyChainSeed();
    System.out.println("seed: " + seed.toString());
    System.out.println("creation time: " + seed.getCreationTimeSeconds());
    System.out.println("mnemonicCode: " + Utils.SPACE_JOINER.join(seed.getMnemonicCode()));

This gives me: cram approve decline tobacco truly giant remember author install dirt spare law

The wallet dump for this wallet/mnemonic looks like this:

Keys: Earliest creation time: 2020-09-10T23:01:55Z Seed birthday: 1599778915 [2020-09-10T23:01:55Z] Ouput script type: P2PKH Key to watch: xpub685v329L5UXezQQmCRgftKRud7hYHHR2U9RPCzRVwQNNWQuTHawgzBXD5RgAYLroJFiqTxEhF5jmbXJAWB341x8r3hdUFWfZd1Rh9uycNR3 Lookahead siz/thr: 100/33 addr:13ScJMSbxg6JYVaWNJAawZMaKW9KDdsz2H hash160:1ac81dec190ab5981f5b8d9627136c806b013ff8 (M, root) addr:18jGHhTXzKJcU1TqpMkozYQQBKHsnExT1H hash160:54c71cd14809d8e4695d0ab8881b9c971c28d833 (M/0H, account) addr:1HJbGGSZ42tG9nrTU6aGS2xJwCSEb6rKfg hash160:b2d5af74fb0d34e5a072cf0514c9d0a6d949a699 (M/0H/0, external) addr:19kEr724cNCXWgybTDPhNqN5rTVCcajdjD hash160:5fee7381e26b401c7aca2d031e950aa7b6ff634d (M/0H/1, internal)

Seed birthday: 1599778915 [2020-09-10T23:01:55Z] Ouput script type: P2WPKH Key to watch: zpub6mkSeMVANqccjQLrtYC39g9eob95YG9cNvGFFBvXVgsT7mrJno4ChARSa1WWYdtuygHLDdkc5Bg6Lc45wx8xL2tSzgHsnzfqt4oSYR1Lecv Lookahead siz/thr: 100/33 addr:bc1qrtypmmqep26es86m3ktzwymvsp4sz0lcurmxp8 hash160:1ac81dec190ab5981f5b8d9627136c806b013ff8 (M, root) addr:bc1qppm602vv0ee29mndy37c3h5h4y753vyz82h5qt hash160:0877a7a98c7e72a2ee6d247d88de97a93d48b082 (M/1H, account) addr:bc1qz88ttzmmlr2w6d5wz40e9ejqxmr5avtmq2d6qq hash160:11ceb58b7bf8d4ed368e155f92e64036c74eb17b (M/1H/0, external) addr:bc1q0v7emmg95uj738fnge70hwle23jdehpqxezqne hash160:7b3d9ded05a725e89d33467cfbbbf95464dcdc20 (M/1H/1, internal)

Now importing the bip39 mnemonic into electrum or the iancoleman site gives me completely different adressess no matter what derivation path I use. How can I import the mnemonic so that it creates the exact adresses as bitcoinj/android schildbach wallet? Or how else should I backup?

1

Just restore as normal using electrum and on the screen where you have to enter the derivation path you set it to m/0' and choose legacy as the script type. Then create another wallet via file > new/restore for the p2wpkh addresses. This time choose native segwit as the wallet type and enter m/1' as the derivation path.

1
  • Sir, I am in your debt. Thank you very much. – super.yang Sep 11 '20 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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