toPublicBase58 method

String toPublicBase58()

Implementation

String toPublicBase58() {
  final version =  network.bip32.public ;
  Uint8List buffer =  Uint8List(78);
  ByteData bytes = buffer.buffer.asByteData();
  bytes.setUint32(0, version);
  bytes.setUint8(4, depth);
  bytes.setUint32(5, parentFingerprint);
  bytes.setUint32(9, index);
  buffer.setRange(13, 45, chainCode);
  buffer.setRange(45, 78, publicKey);
  return bs58check.encode(buffer);
}