HDPrivateKey.decode constructor

HDPrivateKey.decode(
  1. String b58, [
  2. int? version
])

Creates a HD private key from a base58 encoded representation (b58). May throw InvalidBase58, InvalidBase58Checksum or InvalidHDKey. If version is provided a InvalidHDKeyVersion will be thrown if the version does not match.

Implementation

factory HDPrivateKey.decode(String b58, [int? version]) {
  final key = HDKey.decode(b58, privVersion: version);
  if (key is HDPrivateKey) return key;
  throw InvalidHDKey();
}