uncompressedPublicKeyToAddress function

String uncompressedPublicKeyToAddress(
  1. Uint8List publicKey,
  2. int prefix
)

Implementation

String uncompressedPublicKeyToAddress(Uint8List publicKey, int prefix) {
  final addressInput = publicKey.sublist(1);
  final publicKeyHash = keccak256(addressInput);
  final addressBuffer = publicKeyHash.sublist(12);
  final addressBase58 = base58CheckEncode(prefix, addressBuffer);
  return addressBase58;
}