async def get_creds(self, proof_req_json: str, filt: dict = None, filt_dflt_incl: bool = False) -> (Set[str], str):
LOGGER.debug('<STR_LIT>', proof_req_json, filt)<EOL>if filt is None:<EOL><INDENT>filt = {}<EOL><DEDENT>rv = None<EOL>creds_json = await anoncreds.prover_get_credentials_for_proof_req(self.wallet.handle, proof_req_json)<EOL>creds = json.loads(creds_json)<EOL>cred_ids = set()<EOL>if filt:<EOL><INDENT>for cd_id in filt:<EOL><INDENT>try:<EOL><INDENT>json.loads(await self.get_cred_def(cd_id))<EOL><DEDENT>except AbsentCredDef:<EOL><INDENT>LOGGER.warning('<STR_LIT>', cd_id)<EOL>filt.pop(cd_id)<EOL><DEDENT><DEDENT><DEDENT>for inner_creds in {**creds['<STR_LIT>'], **creds['<STR_LIT>']}.values():<EOL><INDENT>for cred in inner_creds:  <EOL><INDENT>cred_info = cred['<STR_LIT>']<EOL>if filt:<EOL><INDENT>cred_cd_id = cred_info['<STR_LIT>']<EOL>if cred_cd_id not in filt:<EOL><INDENT>if filt_dflt_incl:<EOL><INDENT>cred_ids.add(cred_info['<STR_LIT>'])<EOL><DEDENT>continue<EOL><DEDENT>if '<STR_LIT>' in (filt[cred_cd_id] or {}):  <EOL><INDENT>if not {k: str(filt[cred_cd_id].get('<STR_LIT>', {})[k])<EOL>for k in filt[cred_cd_id].get('<STR_LIT>', {})}.items() <= cred_info['<STR_LIT>'].items():<EOL><INDENT>continue<EOL><DEDENT><DEDENT>if '<STR_LIT>' in (filt[cred_cd_id] or {}):  <EOL><INDENT>minima = filt[cred_cd_id].get('<STR_LIT>', {})<EOL>try:<EOL><INDENT>if any((attr not in cred_info['<STR_LIT>'])<EOL>or (int(cred_info['<STR_LIT>'][attr]) < int(minima[attr]))<EOL>for attr in minima):<EOL><INDENT>continue<EOL><DEDENT><DEDENT>except ValueError:<EOL><INDENT>continue  <EOL><DEDENT><DEDENT>cred_ids.add(cred_info['<STR_LIT>'])<EOL><DEDENT>else:<EOL><INDENT>cred_ids.add(cred_info['<STR_LIT>'])<EOL><DEDENT><DEDENT><DEDENT>if filt:<EOL><INDENT>creds = json.loads(prune_creds_json(creds, cred_ids))<EOL><DEDENT>rv = (cred_ids, json.dumps(creds))<EOL>LOGGER.debug('<STR_LIT>', rv)<EOL>return rv<EOL>
Get credentials from HolderProver wallet corresponding to proof request and
filter criteria; return credential identifiers from wallet and credentials json.
Return empty set and empty production for no such credentials.

:param proof_req_json: proof request json as Verifier creates; has entries for proof request's
    nonce, name, and version; plus credential's requested attributes, requested predicates. I.e.,

::

    {
        'nonce': string,  # indy-sdk makes no semantic specification on this value
        'name': string,  # indy-sdk makes no semantic specification on this value
        'version': numeric-string,  # indy-sdk makes no semantic specification on this value
        'requested_attributes': {
            '<attr_uuid>': {  # aka attr_referent, a proof-request local identifier
                'name': string,  # attribute name (matches case- and space-insensitively)
                'restrictions' [  # optional
                    {
                        "schema_id": string,  # optional
                        "schema_issuer_did": string,  # optional
                        "schema_name": string,  # optional
                        "schema_version": string,  # optional
                        "issuer_did": string,  # optional
                        "cred_def_id": string  # optional
                    },
                    {
                        ...  # if more than one restriction given, combined disjunctively (i.e., via OR)
                    }
                ],
                'non_revoked': {  # optional - indy-sdk ignores when getting creds from wallet
                    'from': int,  # optional, epoch seconds
                    'to': int  # optional, epoch seconds
                }
            },
            ...
        },
        'requested_predicates': {
            '<pred_uuid>': {  # aka predicate_referent, a proof-request local predicate identifier
                'name': string,  # attribute name (matches case- and space-insensitively)
                'p_type': '>=',
                'p_value': int,  # predicate value
                'restrictions': [  # optional
                    {
                        "schema_id": string,  # optional
                        "schema_issuer_did": string,  # optional
                        "schema_name": string,  # optional
                        "schema_version": string,  # optional
                        "issuer_did": string,  # optional
                        "cred_def_id": string  # optional
                    },
                    {
                        ...  # if more than one restriction given, combined disjunctively (i.e., via OR)
                    }
                ],
                'non_revoked': {  # optional - indy-sdk ignores when getting creds from wallet
                    'from': int,  # optional, epoch seconds
                    'to': int  # optional, epoch seconds
                }
            },
            ...
        },
        'non_revoked': {  # optional - indy-sdk ignores when getting creds from wallet
            'from': Optional<int>,
            'to': Optional<int>
        }
    }

:param filt: filter for matching attribute-value pairs and predicates; dict mapping each
    cred def id to dict (specify empty dict or none for no filter, matching all)
    mapping attributes to values to match or compare. E.g.,

::

    {
        'Vx4E82R17q...:3:CL:16:0': {
            'attr-match': {
                'name': 'Alex',
                'sex': 'M',
                'favouriteDrink': None
            },
            'minima': {  # if both attr-match and minima present, combined conjunctively (i.e., via AND)
                'favouriteNumber' : 10,
                'score': '100'  # nicety: implementation converts to int for caller
            },
        },
        'R17v42T4pk...:3:CL:19:0': {
            'attr-match': {
                'height': 175,
                'birthdate': '1975-11-15'  # combined conjunctively (i.e., via AND)
            }
        },
        'Z9ccax812j...:3:CL:27:0': {
            'attr-match': {}  # match all attributes on this cred def
        }
        ...
    }

:param filt_dflt_incl: whether to include (True) all credentials from wallet that filter does not
    identify by cred def, or to exclude (False) all such credentials
:return: tuple with (set of referents, creds json for input proof request);
    empty set and empty production for no such credential