function verify(transaction, signature, publicKey, inputIndex, subscript) {
  $.checkArgument(!_.isUndefined(transaction), "Transaction Undefined");
  $.checkArgument(!_.isUndefined(signature) && !_.isUndefined(signature.nhashtype), "Signature Undefined");

  let hashbuf = sighash(transaction, signature.nhashtype, inputIndex, subscript);
  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
@return {boolean}