docs: async def get_cred_infos_by_q(self, query_json: str, limit: int = None) -> str:
          """
          A cred-info aggregates:
          * its wallet cred-id (aka wallet referent)
          * its attribute names and values
          * its schema identifier
          * its credential definition identifier
          * its revocation registry identifier
          * its credential revocation identifier.
  
          Return list of cred-infos from wallet by input WQL query;
          return cred-infos for all credentials in wallet for no query.
  
          Raise WalletState if the wallet is closed.
  
          The operation supports a subset of WQL; i.e.,
  
          ::
  
              query = {subquery}
              subquery = {subquery, ..., subquery} - WHERE subquery AND ... AND subquery
              subquery = $or: [{subquery},..., {subquery}] - WHERE subquery OR ... OR subquery
              subquery = $not: {subquery} - Where NOT (subquery)
              subquery = "tagName": tagValue - WHERE tagName == tagValue
              subquery = "tagName": {$in: [tagValue, ..., tagValue]} - WHERE tagName IN (tagValue, ..., tagValue)
              subquery = "tagName": {$neq: tagValue} - WHERE tagName != tagValue
  
          but not
  
          ::
  
              subquery = "tagName": {$gt: tagValue} - WHERE tagName > tagValue
              subquery = "tagName": {$gte: tagValue} - WHERE tagName >= tagValue
              subquery = "tagName": {$lt: tagValue} - WHERE tagName < tagValue
              subquery = "tagName": {$lte: tagValue} - WHERE tagName <= tagValue
              subquery = "tagName": {$like: tagValue} - WHERE tagName LIKE tagValue
  
          :param query_json: WQL query json
          :param limit: maximum number of results to return
  
          :return: cred-infos as json list; i.e.,
  
          ::
  
              [
                  {
                      "referent": string,  # credential identifier in the wallet
                      "attrs": {
                          "attr1" : {"raw": "value1", "encoded": "value1_as_int" },
                          "attr2" : {"raw": "value2", "encoded": "value2_as_int" },
                          ...
                      }
                      "schema_id": string,
                      "cred_def_id": string,
                      "rev_reg_id": Optional<string>,
                      "cred_rev_id": Optional<string>
                  },
                  ...
              ]
  
          """
  
          LOGGER.debug('HolderProver.get_cred_infos_by_q >>> query_json: %s, limit: %s', query_json, limit)
  
          if not self.wallet.handle:
              LOGGER.debug('HolderProver.get_cred_infos_by_q <!< Wallet %s is closed', self.name)
              raise WalletState('Wallet {} is closed'.format(self.name))
  
          infos = []
          if limit and limit < 0:
              limit = None
  
          (handle, cardinality) = await anoncreds.prover_search_credentials(
              self.wallet.handle,
              json.dumps(canon_cred_wql(json.loads(query_json))))  # indy-sdk requires attr name canonicalization
          chunk = min(cardinality, limit or cardinality, Wallet.DEFAULT_CHUNK)
          if limit:
              cardinality = min(limit, cardinality)
          try:
              while len(infos) != cardinality:
                  batch = json.loads(await anoncreds.prover_fetch_credentials(handle, chunk))
                  infos.extend(batch)
                  if len(batch) < chunk:
                      break
              if len(infos) != cardinality:
                  LOGGER.warning('Credential search/limit indicated %s results but fetched %s', cardinality, len(infos))
          finally:
              await anoncreds.prover_close_credentials_search(handle)
  
          rv_json = json.dumps(infos)
          LOGGER.debug('HolderProver.get_cred_infos_by_q <<< %s', rv_json)
          return rv_json