HDPublicKey.decode constructor

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

Creates a HD public 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 HDPublicKey.decode(String b58, [int? version]) {
  final key = HDKey.decode(b58, pubVersion: version);
  if (key is HDPublicKey) return key;
  throw InvalidHDKey();
}