encodeKey method
Overrides the method to encode an Egld (Elrond) address based on the provided pubKey.
Implementation
@override
String encodeKey(List<int> pubKey) {
/// Validate and retrieve the Ed25519 public key
final pubKeyObj = AddrKeyValidator.validateAndGetEd25519Key(pubKey);
/// Encode the Egld address using the provided HRP and the raw compressed public key
return Bech32Encoder.encode(
AddrKeyValidator.getConfigArg(CoinsConf.elrond.params.addrHrp, "addrHrp"),
pubKeyObj.compressed.sublist(1),
);
}