encodeKey method

  1. @override
String encodeKey(
  1. List<int> keyBytes, {
  2. ZCashNetwork? network,
  3. ZCashAddressType? addrType,
})
override

Encodes a public key or address bytes into a blockchain address.

Implementation

@override
String encodeKey(
  List<int> keyBytes, {
  ZCashNetwork? network,
  ZCashAddressType? addrType,
}) {
  network ??= ZCashNetwork.mainnet;
  addrType ??= AddrKeyValidator.getAddrArg<ZCashAddressType>(
    addrType,
    "addrType",
  );
  return ZCashAddressUtils.encodeAddress(
    bytes: keyBytes,
    type: addrType,
    network: network,
  );
}