Function libindy_sys::indy_issuer_create_and_store_credential_def[][src]

pub unsafe extern "C" fn indy_issuer_create_and_store_credential_def(
    command_handle: indy_handle_t,
    wallet_handle: indy_handle_t,
    issuer_did: *const c_char,
    schema_json: *const c_char,
    tag: *const c_char,
    signature_type: *const c_char,
    config_json: *const c_char,
    cb: indy_str_str_cb
) -> indy_error_t

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.

#Params wallet_handle: wallet handler (created by open_wallet). command_handle: command handle to map callback to user context. issuer_did: a DID of the issuer signing cred_def transaction to the Ledger schema_json: credential schema as a json tag: allows to distinct between credential definitions for the same issuer and schema signature_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) cb: Callback that takes command result as parameter.

#Returns cred_def_id: identifier of created credential definition cred_def_json: public part of created credential definition

#Errors Common* Wallet* Anoncreds*