tweak method
Tweaks the public key with a scalar multiplied by the generator point. In the instance a new key cannot be created (practically impossible for random 32-bit scalars), then null will be returned.
Implementation
ECPublicKey? tweak(Uint8List scalar) {
checkBytes(scalar, 32, name: "Scalar");
final newKey = secp256k1.pubKeyTweak(_data, scalar, compressed);
return newKey == null ? null : ECPublicKey(newKey);
}