Keystore.fromSeed constructor
Keystore.fromSeed(
- String seed
A factory that generates a keystore from a seed.
final keystore = Keystore.fromSeed('edsk3RR5U7JsUJ8ctjsuymUPayxMm4LHXaB7VJSfeyMb8fAvbJUnsa');
Throws CryptoError if:\
seed
length is != 54seed
checksum is invalid
Implementation
factory Keystore.fromSeed(String seed) {
return crypto.catchUnhandledErrors(() {
if (seed.length != _seedLength) {
throw crypto.CryptoError(type: crypto.CryptoErrorTypes.seedLengthError);
}
_validateChecksum(seed);
return Keystore._(secretKey: crypto.seedToSecretKey(seed));
});
}