toAddress method

P2pkhAddress toAddress({
  1. bool compressed = true,
})

returns the corresponding P2pkhAddress object

Implementation

P2pkhAddress toAddress({bool compressed = true}) {
  final h16 = _toHash160(compressed: compressed);
  final toHex = bytesToHex(h16);

  return P2pkhAddress(hash160: toHex);
}