code: public static Sha256Hash extractWitnessCommitmentHash(Script script) {
          return Sha256Hash.wrap(Arrays.copyOfRange(script.chunks.get(1).data, 4, 36));
      }
docs: Retrieves the hash from a segwit commitment (in an output of the coinbase transaction).