encode static method

String encode(
  1. String hrp,
  2. List<int> netVar,
  3. List<int> data
)

Combine the network version bytes and data.

Implementation

static String encode(String hrp, List<int> netVar, List<int> data) {
  final concatBytes = [...netVar, ...data].asImmutableBytes;
  return Bech32EncoderBase.encodeBech32(
      hrp,
      Bech32BaseUtils.convertToBase32(concatBytes),
      BchBech32Const.separator,
      _BchBech32Utils.computeChecksum);
}