Search for credentials matching the given proof request.

    Instead of immediately returning of fetched credentials this call returns search_handle that can be used later
    to fetch records by small batches (with prover_fetch_credentials_for_proof_req).

    :param wallet_handle: wallet handler (created by open_wallet).
    :param proof_request_json: proof request json
        {
            "name": string,
            "version": string,
            "nonce": string,
            "requested_attributes": { // set of requested attributes
                 "<attr_referent>": <attr_info>, // see below
                 ...,
            },
            "requested_predicates": { // set of requested predicates
                 "<predicate_referent>": <predicate_info>, // see below
                 ...,
             },
            "non_revoked": Optional<<non_revoc_interval>>, // see below,
                           // If specified prover must proof non-revocation
                           // for date in this interval for each attribute
                           // (can be overridden on attribute level)
        }
    :param extra_query_json:(Optional) List of extra queries that will be applied to correspondent attribute/predicate:
        {
            "<attr_referent>": <wql query>,
            "<predicate_referent>": <wql query>,
        }
        where wql query: indy-sdk/docs/design/011-wallet-query-language/README.md
    :return: search_handle: Search handle that can be used later to fetch records by small batches (with prover_fetch_credentials_for_proof_req)

async def prover_search_credentials_for_proof_req(wallet_handle: int,
                                                  proof_request_json: str,
                                                  extra_query_json: Optional[str]) -> int:
    """
    Search for credentials matching the given proof request.

    Instead of immediately returning of fetched credentials this call returns search_handle that can be used later
    to fetch records by small batches (with prover_fetch_credentials_for_proof_req).

    :param wallet_handle: wallet handler (created by open_wallet).
    :param proof_request_json: proof request json
        {
            "name": string,
            "version": string,
            "nonce": string,
            "requested_attributes": { // set of requested attributes
                 "<attr_referent>": <attr_info>, // see below
                 ...,
            },
            "requested_predicates": { // set of requested predicates
                 "<predicate_referent>": <predicate_info>, // see below
                 ...,
             },
            "non_revoked": Optional<<non_revoc_interval>>, // see below,
                           // If specified prover must proof non-revocation
                           // for date in this interval for each attribute
                           // (can be overridden on attribute level)
        }
    :param extra_query_json:(Optional) List of extra queries that will be applied to correspondent attribute/predicate:
        {
            "<attr_referent>": <wql query>,
            "<predicate_referent>": <wql query>,
        }
        where wql query: indy-sdk/docs/design/011-wallet-query-language/README.md
    :return: search_handle: Search handle that can be used later to fetch records by small batches (with prover_fetch_credentials_for_proof_req)
    """

    logger = logging.getLogger(__name__)
    logger.debug("prover_search_credentials_for_proof_req: >>> wallet_handle: %r, proof_request_json: %r, "
                 "extra_query_json: %r",
                 wallet_handle,
                 proof_request_json,
                 extra_query_json)

    if not hasattr(prover_search_credentials_for_proof_req, "cb"):
        logger.debug("prover_search_credentials_for_proof_req: Creating callback")
        prover_search_credentials_for_proof_req.cb = create_cb(CFUNCTYPE(None, c_int32, c_int32, c_int32))

    c_wallet_handle = c_int32(wallet_handle)
    c_proof_request_json = c_char_p(proof_request_json.encode('utf-8'))
    c_extra_query_json = c_char_p(extra_query_json.encode('utf-8')) if extra_query_json is not None else None

    res = await do_call('indy_prover_search_credentials_for_proof_req',
                        c_wallet_handle,
                        c_proof_request_json,
                        c_extra_query_json,
                        prover_search_credentials_for_proof_req.cb)

    logger.debug("prover_search_credentials_for_proof_req: <<< res: %r", res)
    return res