decode method

  1. @override
Uint8List decode(
  1. String data
)
override

Implementation

@override
Uint8List decode(String data) {
  final be32 = _Bech32Codec().decode(data, maxLength);
  if (be32.hrp != hrp) {
    throw Exception('Invalid `hrp`. Expected $hrp got ${be32.hrp}');
  }
  return Uint8List.fromList(
      Base32Encoder._convertBits(be32.data, 5, 8, false));
}