decodeAddr method

  1. @override
BuBytes decodeAddr(
  1. String addr, {
  2. List<int>? netVersion,
  3. List<int>? paymentId,
})
override

Decodes a given blockchain address string.

Throws AddressConverterException on invalid input.

Implementation

@override
BuBytes decodeAddr(
  String addr, {
  List<int>? netVersion,
  List<int>? paymentId,
}) {
  netVersion = AddrKeyValidator.getAddrArg<List<int>>(
    netVersion,
    "netVersion",
  );
  paymentId = AddrKeyValidator.getAddrArg<List<int>>(paymentId, "paymentId");
  final decodeAddr = XmrAddrDecoder().decode(
    addr,
    netVerBytes: netVersion,
    paymentId: paymentId,
  );
  return BuBytes(decodeAddr.keyBytes);
}