[−][src]Function indyrs::anoncreds::prover_search_credentials_for_proof_req
pub fn prover_search_credentials_for_proof_req(
wallet_handle: WalletHandle,
proof_request_json: &str,
extra_query_json: Option<&str>
) -> Box<dyn Future<Item = CommandHandle, Error = IndyError>>
Search for credentials matching the given proof request.
Instead of immediately returning of fetched credentials this call returns search_handle that can be used later to fetch records by small batches (with fetch_credentials_for_proof_req).
Arguments
wallet_handle
: wallet handle (created by Wallet::open_wallet).proof_request_json
: proof request json { "name": string, "version": string, "nonce": string, - a big number represented as a string (usegenerate_nonce
function to generate 80-bit number) "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) }extra_query_json
: (Optional) List of extra queries that will be applied to correspondent attribute/predicate: { "<attr_referent>":, "<predicate_referent>": , } where wql query: indy-sdk/doc/design/011-wallet-query-language/README.md
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
search_handle
: Search handle that can be used later to fetch records by small batches (with fetch_credentials_for_proof_req)