privateKeyToPublic function

Uint8List privateKeyToPublic(
  1. BigInt privateKey
)

Generates a public key for the given private key using the ecdsa curve which core blockchain uses.

Implementation

Uint8List privateKeyToPublic(BigInt privateKey) {
  final intPriv = intToBytes(privateKey);
  final response = privateKeyBytesToPublic(intPriv);
  //skip the type flag, https://github.com/ethereumjs/ethereumjs-util/blob/master/index.js#L319
  return response;
}