diff --git a/aries_vcx/src/common/proofs/prover/prover.rs b/aries_vcx/src/common/proofs/prover/prover.rs
index 7775bbbc8a..fc842ce497 100644
--- a/aries_vcx/src/common/proofs/prover/prover.rs
+++ b/aries_vcx/src/common/proofs/prover/prover.rs
@@ -40,8 +40,10 @@ pub async fn generate_indy_proof(
)
})?;
+ // create objects representing the details of how to present each referent
let mut credentials_identifiers = credential_def_identifiers(credentials, &proof_request)?;
+ //
let revoc_states_json = build_rev_states_json(ledger, anoncreds, &mut credentials_identifiers).await?;
let requested_credentials =
build_requested_credentials_json(&credentials_identifiers, self_attested_attrs, &proof_request)?;
@@ -56,7 +58,7 @@ pub async fn generate_indy_proof(
settings::DEFAULT_LINK_SECRET_ALIAS,
&schemas_json,
&credential_defs_json,
- Some(&revoc_states_json),
+ Some(&serde_json::to_string(&revoc_states_json)?), // TODO - can we use solid types now?!?
)
.await?;
Ok(proof)
diff --git a/aries_vcx/src/common/proofs/prover/prover_internal.rs b/aries_vcx/src/common/proofs/prover/prover_internal.rs
index 67947fd35f..ca994dc581 100644
--- a/aries_vcx/src/common/proofs/prover/prover_internal.rs
+++ b/aries_vcx/src/common/proofs/prover/prover_internal.rs
@@ -85,6 +85,14 @@ pub async fn build_cred_defs_json_prover(
Ok(rtn.to_string())
}
+// TODO - new name for method
+/// Given the `credentials` selected for a given `proof_req`, construct `CredInfoProver` structures
+/// which represent the details of how we should present a referent, including details of:
+/// * which credential to use (identified by credential_referent),
+/// * revocation interval to present,
+/// * revocation timestamp to use in NRP of this referent,
+/// * where the referent should be revealed (only relevant if attr presentation),
+/// * other credential details
pub fn credential_def_identifiers(
credentials: &SelectedCredentials,
proof_req: &ProofRequestData,
@@ -103,8 +111,8 @@ pub fn credential_def_identifiers(
credential_referent: cred_info.referent.clone(),
schema_id: cred_info.schema_id.clone(),
cred_def_id: cred_info.cred_def_id.clone(),
- revocation_interval: _get_revocation_interval(&referent, proof_req)?,
- timestamp: None,
+ revocation_interval: find_revocation_interval(&referent, proof_req)?,
+ timestamp: None, // populated later if required
rev_reg_id: cred_info.rev_reg_id.clone(),
cred_rev_id: cred_info.cred_rev_id.clone(),
tails_dir: selected_cred.tails_dir.clone(),
@@ -115,16 +123,16 @@ pub fn credential_def_identifiers(
Ok(rtn)
}
-fn _get_revocation_interval(attr_name: &str, proof_req: &ProofRequestData) -> VcxResult