encodeToBase58 method
Implementation
String encodeToBase58(PublicKey pubKey) {
Uint8List prefix = PDUtil.hexToBytes('01');
Uint8List encoded = encodeToBytes(pubKey);
Uint8List aux = Sha.sha256([encoded]);
Uint8List suffix = aux.sublist(0, 4);
Uint8List raw = PDUtil.concat([prefix, encoded, suffix]);
return Base58.encode(raw);
}