I have the wallet file and password. I would like to be able to get the BIP32 extended private key (xprv) from it.
Additionally, be able to derive it from the wallet seed. I can't figure out the derivation path.
This is as far as I've gotten:
What I do is restore a wallet and then try to get the private key from the Wallet object:
NetworkParameters PARAMS = MainNetParams.get();
DeterministicKeyChain kc = wallet.getActiveKeychain();
DeterministicKey rk = kc.getRootKey();
String key = rk.getPrivateKeyAsWiF(PARAMS);
I'm getting an exception saying java.lang.IllegalStateException: Private key bytes not available
there is very high chance you used the beta multibit HD wallet if you used it before 2016. it used the incompatible bugged key derivation method. so it cant be dump directly.
there is more details: https://btc2doge.com/multibit-hd-wallet-seed-words-not-work/