function verify(transaction, signature, publicKey, sigversion, inputIndex, execdata) {
  $.checkArgument(transaction != null, 'Transaction Undefined');

  if (!execdata || Buffer.isBuffer(execdata)) {
    const leafHash = execdata;
    execdata = _getExecData(sigversion, leafHash);
  }

  $.checkArgument(execdata.annexInit, 'invalid execdata');

  const hashbuf = _signatureHash(transaction, signature.nhashtype, inputIndex, sigversion, execdata);
  if (!hashbuf) {
    return false;
  }
  const verified = Schnorr.verify(publicKey, hashbuf, signature);
  return verified;
}
Verify a Schnorr signature

@name Signing.verify
@param {Transaction} transaction
@param {Signature} signature
@param {PublicKey} publicKey
@param {Number} inputIndex
@param {object|Buffer|null} execdata If given, can be full execdata object or just the leafHash buffer
@return {Boolean}