[][src]Function indyrs::cache::get_cred_def

pub fn get_cred_def(
    pool_handle: PoolHandle,
    wallet_handle: WalletHandle,
    submitter_did: &str,
    id: &str,
    options_json: &str
) -> Box<dyn Future<Item = String, Error = IndyError>>

Get credential definition json data for specified credential definition id. If data is present inside of cache, cached data is returned. Otherwise data is fetched from the ledger and stored inside of cache for future use.

EXPERIMENTAL

Arguments

  • pool_handle - pool handle (created by open_pool_ledger).
  • wallet_handle - wallet handle (created by open_wallet).
  • submitter_did - DID of the submitter stored in secured Wallet.
  • id - identifier of credential definition.
  • options_json - { noCache: (bool, optional, false by default) Skip usage of cache, noUpdate: (bool, optional, false by default) Use only cached data, do not try to update. noStore: (bool, optional, false by default) Skip storing fresh data if updated, minFresh: (int, optional, -1 by default) Return cached data if not older than this many seconds. -1 means do not check age. }

Returns

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 Credential Definition json }