getVersion static method

int getVersion(
  1. String input
)

Gets the version byte from a Base58Check string.

Implementation

static int getVersion(String input) {
  final decoded = decode(input);
  if (decoded.isEmpty) {
    throw FormatException('Empty Base58Check string');
  }
  return decoded[0];
}