function verify(transaction, signature, publicKey, inputIndex, subscript, satoshisBN, flags, signingMethod) {
  $.checkArgument(!_.isUndefined(transaction));
  $.checkArgument(!_.isUndefined(signature) && !_.isUndefined(signature.nhashtype));
  var hashbuf = sighash(transaction, signature.nhashtype, inputIndex, subscript, satoshisBN, flags);
  
  signingMethod = signingMethod || 'ecdsa';

  if (signingMethod === 'schnorr') {
    return Schnorr.verify(hashbuf, signature, publicKey, 'little')
  } else if(signingMethod === 'ecdsa') {
    return ECDSA.verify(hashbuf, signature, publicKey, { endian: 'little' });
  }
}
Verify a signature

@name Signing.verify
@param {Transaction} transaction
@param {Signature} signature
@param {PublicKey} publicKey
@param {number} inputIndex
@param {Script} subscript
@param {satoshisBN} input's amount
@param {flags} verification flags
@param {signingMethod} signingMethod 'ecdsa' or 'schnorr' to sign a tx
@return {boolean}