fromSeed static method
Future<Account>
fromSeed(
- List<
int> seed, { - String? name,
- AccountType accountType = AccountType.single,
Load an existing account from an rfc8037 private key. Seed is the binary representation of the seed.
Throws UnsupportedError if seeds are unsupported.
Implementation
static Future<Account> fromSeed(
List<int> seed, {
String? name,
AccountType accountType = AccountType.single,
}) async {
final keyPair = await Ed25519().newKeyPairFromSeed(seed);
final publicKey = await keyPair.extractPublicKey();
final account = Account._create(
publicKey: publicKey,
keyPair: keyPair,
name: name,
accountType: accountType,
);
return account;
}