Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I am trying to get the MPK of a wallet using bitcoinj. Can I get the DeterministicSeed, which is the seed of the wallet and get the MnemonicCode of 12 words. But I can't get the MPK. As I can make it using bitcoinj?
I have found the way to do it:
DeterministicKey extendedKey = wallet.getWatchingKey();
String mpk = extendedKey.serializePubB58(wallet.getParams());
Required, but never shown