Substrate.fromSeed constructor
Substrate.fromSeed(
- List<
int> seedBytes, - SubstrateCoins coinType
Create a Substrate context from a seed and coin type.
Implementation
factory Substrate.fromSeed(List<int> seedBytes, SubstrateCoins coinType) {
final secretKey = _SubstrateUtils.getSecretKey(
seedBytes,
coinType.conf.type,
);
final privateKey = SubstratePrvKey.fromBytes(secretKey, coinType.conf);
return Substrate._(
privateKey,
privateKey.publicKey,
SubstratePath(),
coinType.conf,
);
}