encodeKey method
This method is used to create an Aptos SingleKey
address from ED25519
public key.
Implementation
@override
String encodeKey(List<int> pubKey, [Map<String, dynamic> kwargs = const {}]) {
final publicKey = AddrKeyValidator.validateAndGetEd25519Key(pubKey);
final addressBytes = AptosAddressUtils.encodeSingleKey(publicKey);
/// Concatenate the address prefix and the hash bytes, removing leading zeros
return BytesUtils.toHexString(addressBytes,
prefix: CoinsConf.aptos.params.addrPrefix);
}