Bip44PrivateKey constructor
Bip44PrivateKey(
- Bip32PrivateKey privKey,
- BaseBipCoinConfig<
BaseCoinConfig> coinConf
Factory constructor to create a Bip44PrivateKey from a Bip32PrivateKey and a BaseBipCoinConfig. It verifies that the elliptic curve type of the private key matches the coin's configuration.
Implementation
factory Bip44PrivateKey(Bip32PrivateKey privKey, BaseBipCoinConfig coinConf) {
if (privKey.curveType != coinConf.type) {
throw ArgumentException.invalidOperationArguments(
"Bip44PrivateKey",
name: "privKey",
reason: "Invalid private key.",
);
}
return Bip44PrivateKey._(privKey, coinConf);
}