Bip44PrivateKey constructor
Bip44PrivateKey(
- Bip32PrivateKey privKey,
- BipCoinConfig coinConf
Factory constructor to create a Bip44PrivateKey from a Bip32PrivateKey and a BipCoinConfig. It verifies that the elliptic curve type of the private key matches the coin's configuration.
Implementation
factory Bip44PrivateKey(Bip32PrivateKey privKey, BipCoinConfig coinConf) {
if (privKey.curveType != coinConf.type) {
throw ArgumentException(
'The private key elliptic curve (${privKey.curveType}) shall match the coin configuration one (${coinConf.type})',
);
}
return Bip44PrivateKey._(privKey, coinConf);
}