[][src]Function indyrs::anoncreds::prover_create_credential_req

pub fn prover_create_credential_req(
    wallet_handle: WalletHandle,
    prover_did: &str,
    cred_offer_json: &str,
    cred_def_json: &str,
    master_secret_id: &str
) -> Box<dyn Future<Item = (String, String), Error = IndyError>>

Creates a credential request for the given credential offer.

The method creates a blinded master secret for a master secret identified by a provided name. The master secret identified by the name must be already stored in the secure wallet (see create_master_secret) The blinded master secret is a part of the credential request.

Arguments

  • wallet_handle: wallet handle (created by open_wallet)
  • prover_did: a DID of the prover
  • cred_offer_json: credential offer as a json containing information about the issuer and a credential
  • cred_def_json: credential definition json related to <cred_def_id> in <cred_offer_json>
  • master_secret_id: the id of the master secret stored in the wallet

Returns

  • cred_req_json: Credential request json for creation of credential by Issuer { "prover_did" : string, "cred_def_id" : string, // Fields below can depend on Cred Def type "blinded_ms" : <blinded_master_secret>, (opaque type that contains data structures internal to Ursa. It should not be parsed and are likely to change in future versions). "blinded_ms_correctness_proof" : <blinded_ms_correctness_proof>, (opaque type that contains data structures internal to Ursa. It should not be parsed and are likely to change in future versions). "nonce": string }
  • cred_req_metadata_json: Credential request metadata json for further processing of received form Issuer credential. Note: cred_req_metadata_json mustn't be shared with Issuer.