encodeBytes static method

String encodeBytes(
  1. List<int> addrBytes
)

Implementation

static String encodeBytes(List<int> addrBytes) {
  final int header = addrBytes[0];
  final netTag = ADANetwork.fromTag(decodeNetworkTag(header));
  final ADAAddressType addressType = ADAAddressType.decodeAddressType(header);
  if (addressType == ADAAddressType.reward) {
    return Bech32Encoder.encode(
        AdaShelleyAddrConst.networkTagToRewardAddrHrp[netTag]!, addrBytes);
  }
  return Bech32Encoder.encode(
      AdaShelleyAddrConst.networkTagToAddrHrp[netTag]!, addrBytes);
}