toXAddress method

String toXAddress({
  1. bool forTestnet = false,
  2. int? tag,
})

Converts the XRP address to an X-Address.

Implementation

String toXAddress({bool forTestnet = false, int? tag}) {
  final List<int> addrNetVar = forTestnet
      ? CoinsConf.rippleTestNet.params.addrNetVer!
      : CoinsConf.ripple.params.addrNetVer!;
  return XRPAddressUtils.classicToXAddress(address, addrNetVar, tag: tag);
}