diff --git a/documentation/sdk_examples/sep-0005-key-derivation.md b/documentation/sdk_examples/sep-0005-key-derivation.md index f3ff580..ccf3cd2 100644 --- a/documentation/sdk_examples/sep-0005-key-derivation.md +++ b/documentation/sdk_examples/sep-0005-key-derivation.md @@ -39,6 +39,7 @@ Supported languages are: - japanese - simplified chinese - traditional chinese +- malay ### Generate key pairs from mnemonic diff --git a/lib/src/sep/0005/wallet.dart b/lib/src/sep/0005/wallet.dart index 8aaf333..d1e7bf0 100644 --- a/lib/src/sep/0005/wallet.dart +++ b/lib/src/sep/0005/wallet.dart @@ -88,6 +88,8 @@ class Wallet { return WordList.koreanWords(); case LANGUAGE_SPANISH: return WordList.spanishWords(); + case LANGUAGE_MALAY: + return WordList.malayWords(); default: return WordList.englishWords(); } diff --git a/test/sep0005_test.dart b/test/sep0005_test.dart index f7cae1f..f65b96c 100644 --- a/test/sep0005_test.dart +++ b/test/sep0005_test.dart @@ -46,6 +46,11 @@ void main() { print(mnemonic12WordsSpanish); assert(mnemonic12WordsSpanish.split(" ").length == 12); + String mnemonic12WordsMalay = + await Wallet.generate12WordsMnemonic(language: LANGUAGE_MALAY); + print(mnemonic12WordsMalay); + assert(mnemonic12WordsMalay.split(" ").length == 12); + String mnemonic12WordsEnglish = await Wallet.generate12WordsMnemonic(language: LANGUAGE_ENGLISH); print(mnemonic12WordsEnglish); @@ -92,6 +97,11 @@ void main() { print(mnemonic24WordsSpanish); assert(mnemonic24WordsSpanish.split(" ").length == 24); + String mnemonic24WordsMalay = + await Wallet.generate24WordsMnemonic(language: LANGUAGE_MALAY); + print(mnemonic24WordsMalay); + assert(mnemonic24WordsMalay.split(" ").length == 24); + String mnemonic24WordsEnglish = await Wallet.generate24WordsMnemonic(language: LANGUAGE_ENGLISH); print(mnemonic24WordsEnglish);