public class MnemonicCode
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static long |
BIP39_STANDARDISATION_TIME_SECS
UNIX time for when the BIP39 standard was finalised.
|
static MnemonicCode |
INSTANCE |
Constructor and Description |
---|
MnemonicCode()
Initialise from the included word list.
|
MnemonicCode(java.io.InputStream wordstream,
java.lang.String wordListDigest)
Creates an MnemonicCode object, initializing with words read from the supplied input stream.
|
Modifier and Type | Method and 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> |
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.
|
static byte[] |
toSeed(java.util.List<java.lang.String> words,
java.lang.String passphrase)
Convert mnemonic word list to seed.
|
public static long BIP39_STANDARDISATION_TIME_SECS
public static MnemonicCode INSTANCE
public MnemonicCode() throws java.io.IOException
java.io.IOException
public MnemonicCode(java.io.InputStream wordstream, java.lang.String wordListDigest) throws java.io.IOException, java.lang.IllegalArgumentException
java.io.IOException
java.lang.IllegalArgumentException
public java.util.List<java.lang.String> getWordList()
public static byte[] toSeed(java.util.List<java.lang.String> words, java.lang.String passphrase)
public byte[] toEntropy(java.util.List<java.lang.String> words) throws MnemonicException.MnemonicLengthException, MnemonicException.MnemonicWordException, MnemonicException.MnemonicChecksumException
public java.util.List<java.lang.String> toMnemonic(byte[] entropy) throws MnemonicException.MnemonicLengthException
public void check(java.util.List<java.lang.String> words) throws MnemonicException
MnemonicException