async def build_proof_req_json(self, cd_id2spec: dict, cache_only: bool = False) -> str:
LOGGER.debug('<STR_LIT>', cd_id2spec, cache_only)<EOL>cd_id2schema = {}<EOL>now = int(time())<EOL>proof_req = {<EOL>'<STR_LIT>': str(int(time())),<EOL>'<STR_LIT:name>': '<STR_LIT>',<EOL>'<STR_LIT:version>': '<STR_LIT>',<EOL>'<STR_LIT>': {},<EOL>'<STR_LIT>': {}<EOL>}<EOL>for cd_id in cd_id2spec:<EOL><INDENT>interval = None<EOL>cred_def = json.loads(await self.get_cred_def(cd_id))<EOL>seq_no = cred_def_id2seq_no(cd_id)<EOL>cd_id2schema[cd_id] = json.loads(await self.get_schema(seq_no))<EOL>if '<STR_LIT>' in cred_def['<STR_LIT:value>']:<EOL><INDENT>if cache_only and not (cd_id2spec.get(cd_id, {}) or {}).get('<STR_LIT>', None):<EOL><INDENT>with REVO_CACHE.lock:<EOL><INDENT>(fro, to) = REVO_CACHE.dflt_interval(cd_id)<EOL>if not (fro and to):<EOL><INDENT>LOGGER.debug(<EOL>'<STR_LIT>',<EOL>cd_id)<EOL>raise AbsentInterval('<STR_LIT>'.format(cd_id))<EOL><DEDENT>interval = {<EOL>'<STR_LIT>': fro,<EOL>'<STR_LIT:to>': to<EOL>}<EOL><DEDENT><DEDENT>else:<EOL><INDENT>fro_to = cd_id2spec[cd_id].get('<STR_LIT>', (now, now)) if cd_id2spec[cd_id] else (now, now)<EOL>interval = {<EOL>'<STR_LIT>': fro_to if isinstance(fro_to, int) else min(fro_to),<EOL>'<STR_LIT:to>': fro_to if isinstance(fro_to, int) else max(fro_to)<EOL>}<EOL><DEDENT><DEDENT>for attr in (cd_id2spec[cd_id].get('<STR_LIT>', cd_id2schema[cd_id]['<STR_LIT>']) or []<EOL>if cd_id2spec[cd_id] else cd_id2schema[cd_id]['<STR_LIT>']):<EOL><INDENT>attr_uuid = '<STR_LIT>'.format(seq_no, attr)<EOL>proof_req['<STR_LIT>'][attr_uuid] = {<EOL>'<STR_LIT:name>': attr,<EOL>'<STR_LIT>': [{<EOL>'<STR_LIT>': cd_id<EOL>}]<EOL>}<EOL>if interval:<EOL><INDENT>proof_req['<STR_LIT>'][attr_uuid]['<STR_LIT>'] = interval<EOL><DEDENT><DEDENT>for attr in (cd_id2spec[cd_id].get('<STR_LIT>', {}) or {} if cd_id2spec[cd_id] else {}):<EOL><INDENT>pred_uuid = '<STR_LIT>'.format(seq_no, attr)<EOL>try:<EOL><INDENT>proof_req['<STR_LIT>'][pred_uuid] = {<EOL>'<STR_LIT:name>': attr,<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': int(cd_id2spec[cd_id]['<STR_LIT>'][attr]),<EOL>'<STR_LIT>': [{<EOL>'<STR_LIT>': cd_id<EOL>}]<EOL>}<EOL><DEDENT>except ValueError:<EOL><INDENT>LOGGER.info(<EOL>'<STR_LIT>',<EOL>cd_id2spec[cd_id]['<STR_LIT>'][attr],<EOL>attr)<EOL>continue  <EOL><DEDENT>if interval:<EOL><INDENT>proof_req['<STR_LIT>'][pred_uuid]['<STR_LIT>'] = interval<EOL><DEDENT><DEDENT><DEDENT>rv_json = json.dumps(proof_req)<EOL>LOGGER.debug('<STR_LIT>', rv_json)<EOL>return rv_json<EOL>
Build and return indy-sdk proof request for input attributes and timestamps by cred def id.

Raise AbsentInterval if caller specifies cache_only and default non-revocation intervals, but
revocation cache does not have delta frames for any revocation registries on a specified cred def.

:param cd_id2spec: dict mapping cred def ids to:
    - (optionally) 'attrs': lists of names of attributes of interest (omit for all, empty list or None for none)
    - (optionally) 'minima': (pred) integer lower-bounds of interest (omit, empty list, or None for none)
    - (optionally), 'interval': (2-tuple) pair of epoch second counts marking 'from' and 'to' timestamps,
        or single epoch second count to set 'from' and 'to' the same: default (now, now) if cache_only
        is clear, or latest values from cache if cache_only is set.
    e.g.,

::

    {
        'Vx4E82R17q...:3:CL:16:0': {
            'attrs': [  # request attrs 'name' and 'favouriteDrink' from this cred def's schema
                'name',
                'favouriteDrink'
            ],
            'minima': {  # request predicate score>=80 from this cred def
                'score': 80
            }
            'interval': 1528116008  # same instant for all attrs and preds of corresponding schema
        },
        'R17v42T4pk...:3:CL:19:0': None,  # request all attrs, no preds, default intervals on all attrs
        'e3vc5K168n...:3:CL:23:0': {},  # request all attrs, no preds, default intervals on all attrs
        'Z9ccax812j...:3:CL:27:0': {  # request all attrs, no preds, this interval on all attrs
            'interval': (1528112408, 1528116008)
        },
        '9cHbp54C8n...:3:CL:37:0': {  # request no attrs, one pred, specify interval on pred
            'attrs': [],  # or equivalently, 'attrs': None
            'minima': {
                'employees': '50'  # nicety: implementation converts to int for caller
            },
            'interval': (1528029608, 1528116008)
        },
        '6caBcmLi33...:3:CL:41:0': {  # all attrs, one pred, default intervals to now on attrs & pred
            'minima': {
                'regEpoch': 1514782800
            }
        }
        ...
    }

:param cache_only: (True) take default intervals (per cred def id) from latest cached deltas, or
    (default False) use current time
:return: indy-sdk proof request json