deriveFromPhrase function

Future<Keypair> deriveFromPhrase({
  1. required String phrase,
  2. required MnemonicType mnemonicType,
})

Generate public and secret keys from seed phrase and mnemonic type Returns json {'public': '...', 'secret': '...'} or throws Exception

Implementation

Future<Keypair> deriveFromPhrase({
  required String phrase,
  required MnemonicType mnemonicType,
}) async {
  return Keypair.fromJson(
    jsonDecode(
      await createLib().ntDeriveFromPhrase(
        phrase: phrase,
        mnemonicType: mnemonicType,
      ),
    ),
  );
}