Closed wdbasson closed 2 weeks ago
@classmethod
async def get_credentials_by_proof_id(
cls, controller: AcaPyClient, proof_id: str
) -> List[IndyCredPrecis]:
bound_logger = logger.bind(body={"proof_id": proof_id})
pres_ex_id = pres_id_no_version(proof_id=proof_id)
try:
bound_logger.debug("Getting v2 matching credentials from proof id")
result = await handle_acapy_call(
logger=bound_logger,
acapy_call=controller.present_proof_v2_0.get_matching_credentials,
pres_ex_id=pres_ex_id,
)
except CloudApiException as e:
raise CloudApiException(
f"Failed to get credentials with proof id `{proof_id}`: {e.detail}",
e.status_code,
) from e
if result:
bound_logger.debug("Successfully got matching v2 credentials.")
else:
bound_logger.debug("No matching v2 credentials obtained.")
return result
The get_matching_credentials
function can take a count
, extra_query
, referent
and start
. We need to add these
/tenant/v1/verifier/proofs/{{proofId}}/credentials
Only returns 10 credentials and is not currently configurable.