[−][src]Function indyrs::anoncreds::issuer_create_schema
pub fn issuer_create_schema(
issuer_did: &str,
name: &str,
version: &str,
attrs: &str
) -> Box<dyn Future<Item = (String, String), Error = IndyError>>
Create credential schema entity that describes credential attributes list and allows credentials interoperability.
Schema is public and intended to be shared with all anoncreds workflow actors usually by publishing SCHEMA transaction to Indy distributed ledger.
It is IMPORTANT for current version POST Schema in Ledger and after that GET it from Ledger with correct seq_no to save compatibility with Ledger. After that can call create_and_store_credential_def to build corresponding Credential Definition.
Arguments
pool_handle
- pool handle (created by Pool::open_ledger).issuer_did
: DID of schema issuername
: a name the schemaversion
: a version of the schemaattrs
: a list of schema attributes descriptions (the number of attributes should be less or equal than 125)
Returns
schema_id
: identifier of created schemaschema_json
: schema as json