encodeKey method
Overrides the base class method to encode a public key as an INJ (Injective Protocol) address.
Implementation
@override
String encodeKey(List<int> pubKey) {
/// Encode the public key as an Ethereum (ETH) address.
final ethAddr = EthAddrEncoder().encodeKey(pubKey);
/// Encode the ETH address using the INJ address human-readable part (hrp).
return Bech32Encoder.encode(
AddrKeyValidator.getConfigArg(
CoinsConf.injective.params.addrHrp,
"addrHrp",
),
BytesUtils.fromHexString(ethAddr),
);
}