[−][src]Function indyrs::anoncreds::issuer_create_and_store_credential_def
pub fn issuer_create_and_store_credential_def(
wallet_handle: IndyHandle,
issuer_did: &str,
schema_json: &str,
tag: &str,
signature_type: Option<&str>,
config_json: &str
) -> Box<dyn Future<Item = (String, String), Error = IndyError>>
Create credential definition entity that encapsulates credentials issuer DID, credential schema, secrets used for signing credentials and secrets used for credentials revocation.
Credential definition entity contains private and public parts. Private part will be stored in the wallet. Public part will be returned as json intended to be shared with all anoncreds workflow actors usually by publishing CRED_DEF transaction to Indy distributed ledger.
It is IMPORTANT for current version GET Schema from Ledger with correct seq_no to save compatibility with Ledger.
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).issuer_did
: a DID of the issuer signing cred_def transaction to the Ledgerschema_json
: credential schema as a jsontag
: allows to distinct between credential definitions for the same issuer and schemasignature_type
: credential definition type (optional, 'CL' by default) that defines credentials signature and revocation math. Supported types are:- 'CL': Camenisch-Lysyanskaya credential signature type
config_json
: (optional) type-specific configuration of credential definition as json:- 'CL':
- support_revocation: whether to request non-revocation credential (optional, default false)
- 'CL':
Returns
cred_def_id
: identifier of created credential definitioncred_def_json
: public part of created credential definition