docs: public TransactionSignature calculateSignature(int inputIndex, ECKey key,
                                                                  byte[] redeemScript,
                                                                  SigHash hashType, boolean anyoneCanPay) {
          Sha256Hash hash = hashForSignature(inputIndex, redeemScript, hashType, anyoneCanPay);
          return new TransactionSignature(key.sign(hash), hashType, anyoneCanPay);
      }