mnemonicToBinaryStr method

String mnemonicToBinaryStr(
  1. Mnemonic mnemonic,
  2. MnemonicWordsList wordsList
)

mnemonic to binary

Implementation

String mnemonicToBinaryStr(Mnemonic mnemonic, MnemonicWordsList wordsList) {
  final mnemonicBinStr = mnemonic.toList().map((word) {
    final wordIdx = wordsList.getWordIdx(word);
    return BigintUtils.toBinary(
        BigInt.from(wordIdx), Bip39MnemonicConst.wordBitLen);
  }).join();
  return mnemonicBinStr;
}