docs: public synchronized IncrementedPayment incrementPaymentBy(Coin size, @Nullable KeyParameter userKey)
              throws ValueOutOfRangeException {
          stateMachine.checkState(State.READY);
          checkNotExpired();
          checkNotNull(size);  // Validity of size will be checked by makeUnsignedChannelContract.
          if (size.signum() < 0)
              throw new ValueOutOfRangeException("Tried to decrement payment");
          Coin newValueToMe = getValueToMe().subtract(size);
          if (newValueToMe.compareTo(Transaction.MIN_NONDUST_OUTPUT) < 0 && newValueToMe.signum() > 0) {
              log.info("New value being sent back as change was smaller than minimum nondust output, sending all");
              size = getValueToMe();
              newValueToMe = Coin.ZERO;
          }
          if (newValueToMe.signum() < 0)
              throw new ValueOutOfRangeException("Channel has too little money to pay " + size + " satoshis");
          Transaction tx = makeUnsignedChannelContract(newValueToMe);
          log.info("Signing new payment tx {}", tx);
          Transaction.SigHash mode;
          // If we spent all the money we put into this channel, we (by definition) don't care what the outputs are, so
          // we sign with SIGHASH_NONE to let the server do what it wants.
          if (newValueToMe.equals(Coin.ZERO))
              mode = Transaction.SigHash.NONE;
          else
              mode = Transaction.SigHash.SINGLE;
          TransactionSignature sig = tx.calculateSignature(0, myKey.maybeDecrypt(userKey), getSignedScript(), mode, true);
          valueToMe = newValueToMe;
          updateChannelInWallet();
          IncrementedPayment payment = new IncrementedPayment();
          payment.signature = sig;
          payment.amount = size;
          return payment;
      }