toBech32Address function

String toBech32Address(
  1. String address
)

Implementation

String toBech32Address(String address) {
  if (address.length == 64) {
    address = crc32Del(address.toU8a()).toHex();
  }
  final List<int> addrBz = _convertBits(address.toU8a(), 8, 5);
  final b32Class = Bech32(_hrp, addrBz);
  return bech32.encode(b32Class);
}