[][src]Function indyrs::anoncreds::prover_store_credential

pub fn prover_store_credential(
    wallet_handle: IndyHandle,
    cred_id: Option<&str>,
    cred_req_metadata_json: &str,
    cred_json: &str,
    cred_def_json: &str,
    rev_reg_def_json: Option<&str>
) -> Box<dyn Future<Item = String, Error = IndyError>>

Check credential provided by Issuer for the given credential request, updates the credential by a master secret and stores in a secure wallet.

To support efficient and flexible search the following tags will be created for stored credential: { "schema_id": , "schema_issuer_did": , "schema_name": , "schema_version": , "issuer_did": , "cred_def_id": , "rev_reg_id": , // "None" as string if not present // for every attribute in "attr::::marker": "1", "attr::::value": , }

Arguments

  • wallet_handle: wallet handler (created by open_wallet).
  • cred_id: (optional, default is a random one) identifier by which credential will be stored in the wallet
  • cred_req_metadata_json: a credential request metadata created by create_credential_req
  • cred_json: credential json received from issuer
  • cred_def_json: credential definition json related to <cred_def_id> in <cred_json>
  • rev_reg_def_json: revocation registry definition json related to <rev_reg_def_id> in <cred_json>

Returns

  • out_cred_id - identifier by which credential is stored in the wallet