Class MnemonicCode


  • public class MnemonicCode
    extends java.lang.Object
    A MnemonicCode object may be used to convert between binary seed values and lists of words per the BIP 39 specification Original implementation at: https://github.com/bitcoinj/bitcoinj/blob/master/core/src/main/java/org/bitcoinj/crypto/MnemonicCode.java
    Since:
    0.3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      MnemonicCode​(Language language)
      Creates an MnemonicCode object, initializing with words read from the supplied input stream.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void check​(java.util.List<java.lang.String> words)
      Check to see if a mnemonic word list is valid.
      java.util.List<java.lang.String> generateSecureRandomWords()
      Method to generate words from securerandom entropy
      java.util.List<java.lang.String> getWordList()
      Gets the word list this code uses.
      byte[] toEntropy​(java.util.List<java.lang.String> words)
      Convert mnemonic word list to original entropy value.
      java.util.List<java.lang.String> toMnemonic​(byte[] entropy)
      Convert entropy data to mnemonic word list.
      byte[] toSeed​(java.util.List<java.lang.String> words)
      Convert mnemonic word list to seed.
      byte[] toSeed​(java.util.List<java.lang.String> words, java.lang.String passphrase)
      Convert mnemonic word list to seed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MnemonicCode

        public MnemonicCode​(Language language)
                     throws java.io.IOException
        Creates an MnemonicCode object, initializing with words read from the supplied input stream. If a wordListDigest is supplied the digest of the words will be checked.
        Parameters:
        language - words languages
        Throws:
        java.io.IOException - if an error ocrurs when processing the file buffers