[][src]Function indyrs::ledger::build_cred_def_request

pub fn build_cred_def_request(
    submitter_did: &str,
    data: &str
) -> Box<dyn Future<Item = String, Error = IndyError>>

Builds an CRED_DEF request. Request to add a Credential Definition (in particular, public key), that Issuer creates for a particular Credential Schema.

Arguments

  • submitter_did - Identifier (DID) of the transaction author as base58-encoded string. Actual request sender may differ if Endorser is used (look at append_request_endorser)
  • data - credential definition json { id: string - identifier of credential definition schemaId: string - identifier of stored in ledger schema type: string - type of the credential definition. CL is the only supported type now. tag: string - allows to distinct between credential definitions for the same issuer and schema value: Dictionary with Credential Definition's data: { primary: primary credential public key, Optional: revocation credential public key }, ver: Version of the CredDef json }

Returns

Request result as json.