decodeAddr method

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

Overrides the base class method to decode a Near Protocol address.

Implementation

@override
List<int> decodeAddr(String addr) {
  /// Convert the hexadecimal input to bytes.
  final List<int> pubKeyBytes = BytesUtils.fromHexString(addr);

  /// Validate the length of the public key bytes.
  AddrDecUtils.validateBytesLength(
    pubKeyBytes,
    Ed25519KeysConst.pubKeyByteLen,
  );

  return pubKeyBytes;
}