docs: public synchronized ListenableFuture<PaymentChannelServerState> provideContract(final Transaction contract) throws VerificationException {
          checkNotNull(contract);
          stateMachine.checkState(State.WAITING_FOR_MULTISIG_CONTRACT);
          try {
              contract.verify();
              this.contract = contract;
              verifyContract(contract);
  
              // Check that contract's first output is a 2-of-2 multisig to the correct pubkeys in the correct order
              final Script expectedScript = createOutputScript();
              if (!Arrays.equals(getContractScript().getProgram(), expectedScript.getProgram()))
                  throw new VerificationException(getMajorVersion() == 1 ?
                          "Contract's first output was not a standard 2-of-2 multisig to client and server in that order." :
                          "Contract was not a P2SH script of a CLTV redeem script to client and server");
  
              if (getTotalValue().signum() <= 0)
                  throw new VerificationException("Not accepting an attempt to open a contract with zero value.");
          } catch (VerificationException e) {
              // We couldn't parse the multisig transaction or its output.
              log.error("Provided multisig contract did not verify: {}", contract.toString());
              throw e;
          }
          log.info("Broadcasting multisig contract: {}", contract);
          wallet.addWatchedScripts(ImmutableList.of(contract.getOutput(0).getScriptPubKey()));
          stateMachine.transition(State.WAITING_FOR_MULTISIG_ACCEPTANCE);
          final SettableFuture<PaymentChannelServerState> future = SettableFuture.create();
          Futures.addCallback(broadcaster.broadcastTransaction(contract).future(), new FutureCallback<Transaction>() {
              @Override public void onSuccess(Transaction transaction) {
                  log.info("Successfully broadcast multisig contract {}. Channel now open.", transaction.getTxId());
                  try {
                      // Manually add the contract to the wallet, overriding the isRelevant checks so we can track
                      // it and check for double-spends later
                      wallet.receivePending(contract, null, true);
                  } catch (VerificationException e) {
                      throw new RuntimeException(e); // Cannot happen, we already called contract.verify()
                  }
                  stateMachine.transition(State.READY);
                  future.set(PaymentChannelServerState.this);
              }
  
              @Override public void onFailure(Throwable throwable) {
                  // Couldn't broadcast the transaction for some reason.
                  log.error("Failed to broadcast contract", throwable);
                  stateMachine.transition(State.ERROR);
                  future.setException(throwable);
              }
          }, MoreExecutors.directExecutor());
          return future;
      }