Function libindy_sys::indy_prover_get_credential [−][src]
pub unsafe extern "C" fn indy_prover_get_credential(
command_handle: indy_handle_t,
wallet_handle: indy_handle_t,
cred_id: *const c_char,
cb: indy_str_cb
) -> indy_error_t
Gets human readable credentials according to the filter. If filter is NULL, then all credentials are returned. Credentials can be filtered by Issuer, credential_def and/or Schema.
NOTE: This method is deprecated because immediately returns all fetched credentials. Use <indy_prover_search_credentials> to fetch records by small batches.
#Params wallet_handle: wallet handler (created by open_wallet). filter_json: filter for credentials { "schema_id": string, (Optional) "schema_issuer_did": string, (Optional) "schema_name": string, (Optional) "schema_version": string, (Optional) "issuer_did": string, (Optional) "cred_def_id": string, (Optional) } cb: Callback that takes command result as parameter.
#Returns
credentials json
[{
"referent": string, // cred_id in the wallet
"attrs": {"key1":"raw_value1", "key2":"raw_value2"},
"schema_id": string,
"cred_def_id": string,
"rev_reg_id": Optional
#Errors Annoncreds* Common* Wallet*