encodeKey method

  1. @override
String encodeKey(
  1. List<int> pubKey
)
override

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

Throws AddressConverterException on invalid input.

Implementation

@override
String encodeKey(List<int> pubKey) {
  final pubKeyObj = AddrKeyValidator.validateAndGetEd25519KeyBytes(pubKey);
  // A Near address is just the hex-encoded public key (no '0x' prefix).
  return BytesUtils.toHexString(pubKeyObj);
}