encodeKey method
String
encodeKey(
- List<
int> pubKey, { - int? tag,
- ChainType chainType = ChainType.mainnet,
- EllipticCurveTypes? pubKeyType,
override
Encodes the public key into a Ripple (XRP) X-Address.
Implementation
@override
String encodeKey(
List<int> pubKey, {
int? tag,
ChainType chainType = ChainType.mainnet,
EllipticCurveTypes? pubKeyType,
}) {
/// Calculate the hash160 of the public key.
final hash160 = XRPAddressUtils.keyToHash(pubKey, type: pubKeyType);
return XRPAddressUtils.hashToXAddress(hash160, chainType, tag);
}