docs: public boolean disconnect() {
          TransactionOutput connectedOutput;
          if (outpoint.fromTx != null) {
              // The outpoint is connected using a "standard" wallet, disconnect it.
              connectedOutput = outpoint.fromTx.getOutput((int) outpoint.getIndex());
              outpoint.fromTx = null;
          } else if (outpoint.connectedOutput != null) {
              // The outpoint is connected using a UTXO based wallet, disconnect it.
              connectedOutput = outpoint.connectedOutput;
              outpoint.connectedOutput = null;
          } else {
              // The outpoint is not connected, do nothing.
              return false;
          }
  
          if (connectedOutput != null && connectedOutput.getSpentBy() == this) {
              // The outpoint was connected to an output, disconnect the output.
              connectedOutput.markAsUnspent();
              return true;
          } else {
              return false;
          }
      }