base58CheckFromHex function

String base58CheckFromHex(
  1. Uint8List input
)

Implementation

String base58CheckFromHex(Uint8List input) {
  final hash0 = sha256Hash(input);
  final hash1 = sha256Hash(hash0);

  final checksum = hash1.sublist(0, 4);
  final bytesWithChecksum = Uint8List.fromList([...input, ...checksum]);

  return base58Encode(bytesWithChecksum);
}