docs: public Sha256Hash getWTxId() {
          if (cachedWTxId == null) {
              if (!hasWitnesses() && cachedTxId != null) {
                  cachedWTxId = cachedTxId;
              } else {
                  ByteArrayOutputStream baos = new ByteArrayOutputStream();
                  try {
                      bitcoinSerializeToStream(baos, hasWitnesses());
                  } catch (IOException e) {
                      throw new RuntimeException(e); // cannot happen
                  }
                  cachedWTxId = Sha256Hash.wrapReversed(Sha256Hash.hashTwice(baos.toByteArray()));
              }
          }
          return cachedWTxId;
      }