Function libindy_sys::indy_prover_get_credentials_for_proof_req [−][src]
pub unsafe extern "C" fn indy_prover_get_credentials_for_proof_req(
command_handle: indy_handle_t,
wallet_handle: indy_handle_t,
proof_request_json: *const c_char,
cb: indy_str_cb
) -> indy_error_t
Gets human readable credentials matching the given proof request.
NOTE: This method is deprecated because immediately returns all fetched credentials. Use <indy_prover_search_credentials_for_proof_req> to fetch records by small batches.
#Params wallet_handle: wallet handler (created by open_wallet). proof_request_json: proof request json { "name": string, "version": string, "nonce": string, "requested_attributes": { // set of requested attributes "<attr_referent>": <attr_info>, // see below ..., }, "requested_predicates": { // set of requested predicates "<predicate_referent>": <predicate_info>, // see below ..., }, "non_revoked": Optional<<non_revoc_interval>>, // see below, // If specified prover must proof non-revocation // for date in this interval for each attribute // (can be overridden on attribute level) } cb: Callback that takes command result as parameter.
where
attr_referent: Proof-request local identifier of requested attribute
attr_info: Describes requested attribute
{
"name": string, // attribute name, (case insensitive and ignore spaces)
"restrictions": Optional<filter_json>, // see above
"non_revoked": Optional<<non_revoc_interval>>, // see below,
// If specified prover must proof non-revocation
// for date in this interval this attribute
// (overrides proof level interval)
}
predicate_referent: Proof-request local identifier of requested attribute predicate
predicate_info: Describes requested attribute predicate
{
"name": attribute name, (case insensitive and ignore spaces)
"p_type": predicate type (Currently ">=" only)
"p_value": int predicate value
"restrictions": Optional<filter_json>, // see above
"non_revoked": Optional<<non_revoc_interval>>, // see below,
// If specified prover must proof non-revocation
// for date in this interval this attribute
// (overrides proof level interval)
}
non_revoc_interval: Defines non-revocation interval
{
"from": Optional
#Returns
credentials_json: json with credentials for the given proof request.
{
"requested_attrs": {
"<attr_referent>": [{ cred_info: <credential_info>, interval: Optional<non_revoc_interval> }],
...,
},
"requested_predicates": {
"requested_predicates": [{ cred_info: <credential_info>, timestamp: Optional
#Errors Annoncreds* Common* Wallet*