decodeAddr method

  1. @override
List<int> decodeAddr(
  1. String addr, {
  2. String? hrp,
})
override

Decode an address using the Bech32 encoding format with the specified human-readable part (HRP).

Implementation

@override
List<int> decodeAddr(String addr, {String? hrp}) {
  final List<int> addrDecBytes = Bech32Decoder.decode(
    AddrKeyValidator.getAddrArg<String>(hrp, "hrp"),
    addr,
  );

  AddrDecUtils.validateBytesLength(
    addrDecBytes,
    QuickCrypto.hash160DigestSize,
  );
  return addrDecBytes;
}