function pubkeyInScript(pubkey, script) {
  return pubkeyPositionInScript(pubkey, script) !== -1;
}
Checks if a public key is present in a script.
@param pubkey The public key to check.
@param script The script to search in.
@returns A boolean indicating whether the public key is present in the script.