[][src]Function indyrs::anoncreds::issuer_create_credential

pub fn issuer_create_credential(
    wallet_handle: IndyHandle,
    cred_offer_json: &str,
    cred_req_json: &str,
    cred_values_json: &str,
    rev_reg_id: Option<&str>,
    blob_storage_reader_handle: IndyHandle
) -> Box<dyn Future<Item = (String, Option<String>, Option<String>), Error = IndyError>>

Check Cred Request for the given Cred Offer and issue Credential for the given Cred Request.

Cred Request must match Cred Offer. The credential definition and revocation registry definition referenced in Cred Offer and Cred Request must be already created and stored into the wallet.

Information for this credential revocation will be store in the wallet as part of revocation registry under generated cred_revoc_id local for this wallet.

This call returns revoc registry delta as json file intended to be shared as REVOC_REG_ENTRY transaction. Note that it is possible to accumulate deltas to reduce ledger load.

Arguments

  • wallet_handle: wallet handler (created by Wallet::open_wallet).
  • cred_offer_json: a cred offer created by create_credential_offer
  • cred_req_json: a credential request created by store_credential
  • cred_values_json: a credential containing attribute values for each of requested attribute names. Example: { "attr1" : {"raw": "value1", "encoded": "value1_as_int" }, "attr2" : {"raw": "value1", "encoded": "value1_as_int" } }
  • rev_reg_id: id of revocation registry stored in the wallet
  • blob_storage_reader_handle: configuration of blob storage reader handle that will allow to read revocation tails

Returns

  • cred_json: Credential json containing signed credential values { "schema_id": string, "cred_def_id": string, "rev_reg_def_id", Optional, "values": , // Fields below can depend on Cred Def type "signature": , "signature_correctness_proof": <signature_correctness_proof> }
  • cred_revoc_id: local id for revocation info (Can be used for revocation of this credential)
  • revoc_reg_delta_json: Revocation registry delta json with a newly issued credential