code: public static boolean isP2WPKH(Script script) {
          if (!isP2WH(script))
              return false;
          List<ScriptChunk> chunks = script.chunks;
          if (!chunks.get(0).equalsOpCode(OP_0))
              return false;
          byte[] chunk1data = chunks.get(1).data;
          return chunk1data != null && chunk1data.length == SegwitAddress.WITNESS_PROGRAM_LENGTH_PKH;
      }
docs: Returns true if this script is of the form {@code OP_0 <hash>} and hash is 20 bytes long. This can only be a P2WPKH
  scriptPubKey. This script type was introduced with segwit.