Substrate.fromPrivateKey constructor
Substrate.fromPrivateKey(
- List<
int> privateKey, - SubstrateCoins coinType
Create a Substrate context from a private key and coin type.
Implementation
factory Substrate.fromPrivateKey(
List<int> privateKey, SubstrateCoins coinType) {
final prv = SubstratePrivateKey.fromBytes(
privateKey, SubstrateConf.getCoin(coinType));
return Substrate._(
prv,
SubstratePublicKey.fromBytes(
prv.privKey.publicKey.compressed, SubstrateConf.getCoin(coinType)),
SubstratePath(),
SubstrateConf.getCoin(coinType),
);
}