[][src]Function indyrs::cache::get_schema

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

Get schema json data for specified schema 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 schema.
  • 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

Schema json. { id: identifier of schema attrNames: array of attribute name strings name: Schema's name string version: Schema's version string ver: Version of the Schema json }