decodeAddr method

  1. @override
List<int> decodeAddr(
  1. String addr
)
override

Overrides the base class method to decode an INJ (Injective Protocol) address.

Implementation

@override
List<int> decodeAddr(String addr) {
  /// Decode the Bech32-encoded address using the INJ address human-readable part (hrp).
  final addrDecBytes = Bech32Decoder.decode(
    AddrKeyValidator.getConfigArg(
      CoinsConf.injective.params.addrHrp,
      "addrHrp",
    ),
    addr,
  );

  /// Validate the length of the decoded address.
  AddrDecUtils.validateBytesLength(addrDecBytes, EthAddrConst.addrLen ~/ 2);
  return addrDecBytes;
}