recoverFromIISeedPhrase static method

Ed25519KeyIdentityRecoveredFromII recoverFromIISeedPhrase(
  1. String phrase
)

Implementation

static Ed25519KeyIdentityRecoveredFromII recoverFromIISeedPhrase(
    String phrase) {
  try {
    var userNumber = extractUserNumber(phrase);
    var mne = dropLeadingUserNumber(phrase);
    var identity = fromMnemonicWithoutValidation(mne, IC_DERIVATION_PATH);
    return Ed25519KeyIdentityRecoveredFromII(
        userNumber: userNumber, identity: identity);
  } catch (e) {
    rethrow;
  }
}