SubstratePrvKey.fromPrivateKey constructor
SubstratePrvKey.fromPrivateKey(
- IPrivateKey<
ISignature, ISigningParams, IPublicKey< privateKey,IVerifiyingParams> > - SubstrateCoinConf coinConf
Implementation
factory SubstratePrvKey.fromPrivateKey(
IPrivateKey privateKey,
SubstrateCoinConf coinConf,
) {
if (privateKey.type != coinConf.type) {
throw CoreErrors.invalidOperationArguments(
"SubstratePrvKey.fromPrivateKey",
reason: "Mismatch private key type.",
);
}
return SubstratePrvKey._(privateKey, coinConf);
}