encode method
Encodes the provided entropy bytes into a Monero mnemonic with a checksum.
This method encodes the given entropy bytes into a Monero mnemonic and includes a checksum word for enhanced error detection and correction.
entropyBytes
: The entropy bytes to encode.
Implementation
@override
Mnemonic encode(List<int> entropyBytes) {
final List<String> words = _encodeToList(entropyBytes);
final String checksumWord =
MoneroMnemonicUtils.computeChecksum(words, language);
return Mnemonic.fromList([...words, checksumWord]);
}