privateKeyToCompressedPublic function

Uint8List privateKeyToCompressedPublic(
  1. BigInt privateKey
)

Implementation

Uint8List privateKeyToCompressedPublic(BigInt privateKey) {
  final p = (params.G * privateKey)!;

  //skip the type flag, https://github.com/ethereumjs/ethereumjs-util/blob/master/index.js#L319
  return Uint8List.view(p.getEncoded(true).buffer, 1);
}