publicKeyToAddress method

  1. @override
String publicKeyToAddress(
  1. Uint8List publicKey
)
override

Implementation

@override
String publicKeyToAddress(Uint8List publicKey) {
  final checkSum = getSHA512256(publicKey).sublist(28, 32);
  final address = Base32.encode(
      Uint8List.fromList([...publicKey, ...checkSum]),
      type: Base32Type.RFC4648);
  return address.replaceAll('=', '').toUpperCase();
}