pub struct Prover {}
Implementations
sourceimpl Prover
impl Prover
sourcepub fn create_master_secret(
wallet_handle: IndyHandle,
master_secret_id: Option<&str>
) -> Result<String, ErrorCode>
pub fn create_master_secret(
wallet_handle: IndyHandle,
master_secret_id: Option<&str>
) -> Result<String, ErrorCode>
Creates a master secret with a given id and stores it in the wallet. The id must be unique.
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).master_secret_id
: (optional, if not present random one will be generated) new master id
Returns
out_master_secret_id
- Id of generated master secret
sourcepub fn create_master_secret_timeout(
wallet_handle: IndyHandle,
master_secret_id: Option<&str>,
timeout: Duration
) -> Result<String, ErrorCode>
pub fn create_master_secret_timeout(
wallet_handle: IndyHandle,
master_secret_id: Option<&str>,
timeout: Duration
) -> Result<String, ErrorCode>
Creates a master secret with a given id and stores it in the wallet. The id must be unique.
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).master_secret_id
: (optional, if not present random one will be generated) new master idtimeout
- the maximum time this function waits for a response
Returns
out_master_secret_id
- Id of generated master secret
sourcepub fn create_master_secret_async<F: 'static>(
wallet_handle: IndyHandle,
master_secret_id: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
pub fn create_master_secret_async<F: 'static>(
wallet_handle: IndyHandle,
master_secret_id: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
Creates a master secret with a given id and stores it in the wallet. The id must be unique.
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).master_secret_id
: (optional, if not present random one will be generated) new master idclosure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn get_credential(
wallet_handle: IndyHandle,
cred_id: &str
) -> Result<String, ErrorCode>
pub fn get_credential(
wallet_handle: IndyHandle,
cred_id: &str
) -> Result<String, ErrorCode>
Gets human readable credential by the given id.
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).cred_id
: Identifier by which requested credential is stored in the wallet
Returns
credential_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, “cred_rev_id”: Optional }
sourcepub fn get_credential_timeout(
wallet_handle: IndyHandle,
cred_id: &str,
timeout: Duration
) -> Result<String, ErrorCode>
pub fn get_credential_timeout(
wallet_handle: IndyHandle,
cred_id: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Gets human readable credential by the given id.
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).cred_id
: Identifier by which requested credential is stored in the wallettimeout
- the maximum time this function waits for a response
Returns
credential_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, “cred_rev_id”: Optional }
sourcepub fn get_credential_async<F: 'static>(
wallet_handle: IndyHandle,
cred_id: &str,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
pub fn get_credential_async<F: 'static>(
wallet_handle: IndyHandle,
cred_id: &str,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
Gets human readable credential by the given id.
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).cred_id
: Identifier by which requested credential is stored in the walletclosure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn create_credential_req(
wallet_handle: IndyHandle,
prover_did: &str,
cred_offer_json: &str,
cred_def_json: &str,
master_secret_id: &str
) -> Result<(String, String), ErrorCode>
pub fn create_credential_req(
wallet_handle: IndyHandle,
prover_did: &str,
cred_offer_json: &str,
cred_def_json: &str,
master_secret_id: &str
) -> Result<(String, String), ErrorCode>
Creates a credential request for the given credential offer.
The method creates a blinded master secret for a master secret identified by a provided name. The master secret identified by the name must be already stored in the secure wallet (see Prover::create_master_secret) The blinded master secret is a part of the credential request.
Arguments
wallet_handle
: wallet handler (created by open_wallet)prover_did
: a DID of the provercred_offer_json
: credential offer as a json containing information about the issuer and a credentialcred_def_json
: credential definition json related to <cred_def_id> in <cred_offer_json>master_secret_id
: the id of the master secret stored in the wallet
Returns
cred_req_json
: Credential request json for creation of credential by Issuer { “prover_did” : string, “cred_def_id” : string, // Fields below can depend on Cred Def type “blinded_ms” : <blinded_master_secret>, “blinded_ms_correctness_proof” : <blinded_ms_correctness_proof>, “nonce”: string }cred_req_metadata_json
: Credential request metadata json for further processing of received form Issuer credential.
sourcepub fn create_credential_req_timeout(
wallet_handle: IndyHandle,
prover_did: &str,
cred_offer_json: &str,
cred_def_json: &str,
master_secret_id: &str,
timeout: Duration
) -> Result<(String, String), ErrorCode>
pub fn create_credential_req_timeout(
wallet_handle: IndyHandle,
prover_did: &str,
cred_offer_json: &str,
cred_def_json: &str,
master_secret_id: &str,
timeout: Duration
) -> Result<(String, String), ErrorCode>
Creates a credential request for the given credential offer.
The method creates a blinded master secret for a master secret identified by a provided name. The master secret identified by the name must be already stored in the secure wallet (see Prover::create_master_secret) The blinded master secret is a part of the credential request.
Arguments
wallet_handle
: wallet handler (created by open_wallet)prover_did
: a DID of the provercred_offer_json
: credential offer as a json containing information about the issuer and a credentialcred_def_json
: credential definition json related to <cred_def_id> in <cred_offer_json>master_secret_id
: the id of the master secret stored in the wallettimeout
- the maximum time this function waits for a response
Returns
cred_req_json
: Credential request json for creation of credential by Issuer { “prover_did” : string, “cred_def_id” : string, // Fields below can depend on Cred Def type “blinded_ms” : <blinded_master_secret>, “blinded_ms_correctness_proof” : <blinded_ms_correctness_proof>, “nonce”: string }cred_req_metadata_json
: Credential request metadata json for further processing of received form Issuer credential.
sourcepub fn create_credential_req_async<F: 'static>(
wallet_handle: IndyHandle,
prover_did: &str,
cred_offer_json: &str,
cred_def_json: &str,
master_secret_id: &str,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String, String) + Send,
pub fn create_credential_req_async<F: 'static>(
wallet_handle: IndyHandle,
prover_did: &str,
cred_offer_json: &str,
cred_def_json: &str,
master_secret_id: &str,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String, String) + Send,
Creates a credential request for the given credential offer.
The method creates a blinded master secret for a master secret identified by a provided name. The master secret identified by the name must be already stored in the secure wallet (see Prover::create_master_secret) The blinded master secret is a part of the credential request.
Arguments
wallet_handle
: wallet handler (created by open_wallet)prover_did
: a DID of the provercred_offer_json
: credential offer as a json containing information about the issuer and a credentialcred_def_json
: credential definition json related to <cred_def_id> in <cred_offer_json>master_secret_id
: the id of the master secret stored in the walletclosure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn store_credential(
wallet_handle: IndyHandle,
cred_id: Option<&str>,
cred_req_metadata_json: &str,
cred_json: &str,
cred_def_json: &str,
rev_reg_def_json: Option<&str>
) -> Result<String, ErrorCode>
pub fn store_credential(
wallet_handle: IndyHandle,
cred_id: Option<&str>,
cred_req_metadata_json: &str,
cred_json: &str,
cred_def_json: &str,
rev_reg_def_json: Option<&str>
) -> Result<String, ErrorCode>
Check credential provided by Issuer for the given credential request, updates the credential by a master secret and stores in a secure wallet.
To support efficient and flexible search the following tags will be created for stored credential:
{
“schema_id”:
Arguments
wallet_handle
: wallet handler (created by open_wallet).cred_id
: (optional, default is a random one) identifier by which credential will be stored in the walletcred_req_metadata_json
: a credential request metadata created by Prover::create_credential_reqcred_json
: credential json received from issuercred_def_json
: credential definition json related to <cred_def_id> in <cred_json>rev_reg_def_json
: revocation registry definition json related to <rev_reg_def_id> in <cred_json>
Returns
out_cred_id
- identifier by which credential is stored in the wallet
sourcepub fn store_credential_timeout(
wallet_handle: IndyHandle,
cred_id: Option<&str>,
cred_req_metadata_json: &str,
cred_json: &str,
cred_def_json: &str,
rev_reg_def_json: Option<&str>,
timeout: Duration
) -> Result<String, ErrorCode>
pub fn store_credential_timeout(
wallet_handle: IndyHandle,
cred_id: Option<&str>,
cred_req_metadata_json: &str,
cred_json: &str,
cred_def_json: &str,
rev_reg_def_json: Option<&str>,
timeout: Duration
) -> Result<String, ErrorCode>
Check credential provided by Issuer for the given credential request, updates the credential by a master secret and stores in a secure wallet.
To support efficient and flexible search the following tags will be created for stored credential:
{
“schema_id”:
Arguments
wallet_handle
: wallet handler (created by open_wallet).cred_id
: (optional, default is a random one) identifier by which credential will be stored in the walletcred_req_metadata_json
: a credential request metadata created by Prover::create_credential_reqcred_json
: credential json received from issuercred_def_json
: credential definition json related to <cred_def_id> in <cred_json>rev_reg_def_json
: revocation registry definition json related to <rev_reg_def_id> in <cred_json>timeout
- the maximum time this function waits for a response
Returns
out_cred_id
- identifier by which credential is stored in the wallet
sourcepub fn store_credential_async<F: 'static>(
wallet_handle: IndyHandle,
cred_id: Option<&str>,
cred_req_metadata_json: &str,
cred_json: &str,
cred_def_json: &str,
rev_reg_def_json: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
pub fn store_credential_async<F: 'static>(
wallet_handle: IndyHandle,
cred_id: Option<&str>,
cred_req_metadata_json: &str,
cred_json: &str,
cred_def_json: &str,
rev_reg_def_json: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
Check credential provided by Issuer for the given credential request, updates the credential by a master secret and stores in a secure wallet.
To support efficient and flexible search the following tags will be created for stored credential:
{
“schema_id”:
Arguments
wallet_handle
: wallet handler (created by open_wallet).cred_id
: (optional, default is a random one) identifier by which credential will be stored in the walletcred_req_metadata_json
: a credential request metadata created by Prover::create_credential_reqcred_json
: credential json received from issuercred_def_json
: credential definition json related to <cred_def_id> in <cred_json>rev_reg_def_json
: revocation registry definition json related to <rev_reg_def_id> in <cred_json>closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn get_credentials(
wallet_handle: IndyHandle,
filter_json: Option<&str>
) -> Result<String, ErrorCode>
pub fn get_credentials(
wallet_handle: IndyHandle,
filter_json: Option<&str>
) -> Result<String, ErrorCode>
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.
Arguments
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) }
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, “cred_rev_id”: Optional }]
sourcepub fn get_credentials_timeout(
wallet_handle: IndyHandle,
filter_json: Option<&str>,
timeout: Duration
) -> Result<String, ErrorCode>
pub fn get_credentials_timeout(
wallet_handle: IndyHandle,
filter_json: Option<&str>,
timeout: Duration
) -> Result<String, ErrorCode>
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.
Arguments
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) }timeout
- the maximum time this function waits for a response
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, “cred_rev_id”: Optional }]
sourcepub fn get_credentials_async<F: 'static>(
wallet_handle: IndyHandle,
filter_json: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
pub fn get_credentials_async<F: 'static>(
wallet_handle: IndyHandle,
filter_json: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
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.
Arguments
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) }closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn search_credentials(
wallet_handle: IndyHandle,
query_json: Option<&str>
) -> Result<(i32, usize), ErrorCode>
pub fn search_credentials(
wallet_handle: IndyHandle,
query_json: Option<&str>
) -> Result<(i32, usize), ErrorCode>
Search for credentials stored in wallet. Credentials can be filtered by tags created during saving of credential.
Instead of immediately returning of fetched credentials this call returns search_handle that can be used later to fetch records by small batches (with Prover::fetch_credentials).
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).query_json
: Wql query filter for credentials searching based on tags. where query: indy-sdk/doc/design/011-wallet-query-language/README.md
Returns
search_handle
: Search handle that can be used later to fetch records by small batches (with Prover::fetch_credentials)total_count
: Total count of records
sourcepub fn search_credentials_timeout(
wallet_handle: IndyHandle,
query_json: Option<&str>,
timeout: Duration
) -> Result<(i32, usize), ErrorCode>
pub fn search_credentials_timeout(
wallet_handle: IndyHandle,
query_json: Option<&str>,
timeout: Duration
) -> Result<(i32, usize), ErrorCode>
Search for credentials stored in wallet. Credentials can be filtered by tags created during saving of credential.
Instead of immediately returning of fetched credentials this call returns search_handle that can be used later to fetch records by small batches (with Prover::fetch_credentials).
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).query_json
: Wql query filter for credentials searching based on tags. where query: indy-sdk/doc/design/011-wallet-query-language/README.mdtimeout
- the maximum time this function waits for a response
Returns
search_handle
: Search handle that can be used later to fetch records by small batches (with Prover::fetch_credentials)total_count
: Total count of records
sourcepub fn search_credentials_async<F: 'static>(
wallet_handle: IndyHandle,
query_json: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, i32, usize) + Send,
pub fn search_credentials_async<F: 'static>(
wallet_handle: IndyHandle,
query_json: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, i32, usize) + Send,
Search for credentials stored in wallet. Credentials can be filtered by tags created during saving of credential.
Instead of immediately returning of fetched credentials this call returns search_handle that can be used later to fetch records by small batches (with Prover::fetch_credentials).
Arguments
wallet_handle
: wallet handler (created by Wallet::open_wallet).query_json
: Wql query filter for credentials searching based on tags. where query: indy-sdk/doc/design/011-wallet-query-language/README.mdclosure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn fetch_credentials(
search_handle: IndyHandle,
count: usize
) -> Result<String, ErrorCode>
pub fn fetch_credentials(
search_handle: IndyHandle,
count: usize
) -> Result<String, ErrorCode>
Fetch next credentials for search.
Arguments
search_handle
: Search handle (created by Prover::search_credentials)count
: Count of credentials to fetch
Returns
credentials_json
: List of human readable credentials: [{ “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, “cred_rev_id”: Optional }]
sourcepub fn fetch_credentials_timeout(
search_handle: IndyHandle,
count: usize,
timeout: Duration
) -> Result<String, ErrorCode>
pub fn fetch_credentials_timeout(
search_handle: IndyHandle,
count: usize,
timeout: Duration
) -> Result<String, ErrorCode>
Fetch next credentials for search.
Arguments
search_handle
: Search handle (created by Prover::search_credentials)count
: Count of credentials to fetchtimeout
- the maximum time this function waits for a response
Returns
credentials_json
: List of human readable credentials: [{ “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, “cred_rev_id”: Optional }]
sourcepub fn fetch_credentials_async<F: 'static>(
search_handle: IndyHandle,
count: usize,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
pub fn fetch_credentials_async<F: 'static>(
search_handle: IndyHandle,
count: usize,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
sourcepub fn close_credentials_search(
search_handle: IndyHandle
) -> Result<(), ErrorCode>
pub fn close_credentials_search(
search_handle: IndyHandle
) -> Result<(), ErrorCode>
Close credentials search (make search handle invalid)
Arguments
search_handle
: Search handle (created by Prover::search_credentials)
sourcepub fn close_credentials_search_timeout(
search_handle: IndyHandle,
timeout: Duration
) -> Result<(), ErrorCode>
pub fn close_credentials_search_timeout(
search_handle: IndyHandle,
timeout: Duration
) -> Result<(), ErrorCode>
Close credentials search (make search handle invalid)
Arguments
search_handle
: Search handle (created by Prover::search_credentials)timeout
- the maximum time this function waits for a response
sourcepub fn close_credentials_search_async<F: 'static>(
search_handle: IndyHandle,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode) + Send,
pub fn close_credentials_search_async<F: 'static>(
search_handle: IndyHandle,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode) + Send,
sourcepub fn get_credentials_for_proof_req(
wallet_handle: IndyHandle,
proof_request_json: &str
) -> Result<String, ErrorCode>
pub fn get_credentials_for_proof_req(
wallet_handle: IndyHandle,
proof_request_json: &str
) -> Result<String, ErrorCode>
Gets human readable credentials matching the given proof request.
NOTE: This method is deprecated because immediately returns all fetched credentials. Use Prover::search_credentials_for_proof_req to fetch records by small batches.
Arguments
wallet_handle
: wallet handler (created by Wallet::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) }
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}, { cred_info: <credential_2_info>, timestamp: Optional }], “requested_predicate_2_referent”: [{ cred_info: <credential_2_info>, timestamp: Optional }] } }, where credential is { “referent”: , “attrs”: {“attr_name” : “attr_raw_value”}, “schema_id”: string, “cred_def_id”: string, “rev_reg_id”: Optional , “cred_rev_id”: Optional , }
sourcepub fn get_credentials_for_proof_req_timeout(
wallet_handle: IndyHandle,
proof_request_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
pub fn get_credentials_for_proof_req_timeout(
wallet_handle: IndyHandle,
proof_request_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Gets human readable credentials matching the given proof request.
NOTE: This method is deprecated because immediately returns all fetched credentials. Use Prover::search_credentials_for_proof_req to fetch records by small batches.
Arguments
wallet_handle
: wallet handler (created by Wallet::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) }timeout
- the maximum time this function waits for a response
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}, { cred_info: <credential_2_info>, timestamp: Optional }], “requested_predicate_2_referent”: [{ cred_info: <credential_2_info>, timestamp: Optional }] } }, where credential is { “referent”: , “attrs”: {“attr_name” : “attr_raw_value”}, “schema_id”: string, “cred_def_id”: string, “rev_reg_id”: Optional , “cred_rev_id”: Optional , }
sourcepub fn get_credentials_for_proof_req_async<F: 'static>(
wallet_handle: IndyHandle,
proof_request_json: &str,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
pub fn get_credentials_for_proof_req_async<F: 'static>(
wallet_handle: IndyHandle,
proof_request_json: &str,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
Gets human readable credentials matching the given proof request.
NOTE: This method is deprecated because immediately returns all fetched credentials. Use Prover::search_credentials_for_proof_req to fetch records by small batches.
Arguments
wallet_handle
: wallet handler (created by Wallet::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) }closure
- the closure that is called when finished
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
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn search_credentials_for_proof_req(
wallet_handle: IndyHandle,
proof_request_json: &str,
extra_query_json: Option<&str>
) -> Result<i32, ErrorCode>
pub fn search_credentials_for_proof_req(
wallet_handle: IndyHandle,
proof_request_json: &str,
extra_query_json: Option<&str>
) -> Result<i32, ErrorCode>
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 Prover::fetch_credentials_for_proof_req).
Arguments
wallet_handle
: wallet handler (created by Wallet::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) }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 Prover::fetch_credentials_for_proof_req)
sourcepub fn search_credentials_for_proof_req_timeout(
wallet_handle: IndyHandle,
proof_request_json: &str,
extra_query_json: Option<&str>,
timeout: Duration
) -> Result<i32, ErrorCode>
pub fn search_credentials_for_proof_req_timeout(
wallet_handle: IndyHandle,
proof_request_json: &str,
extra_query_json: Option<&str>,
timeout: Duration
) -> Result<i32, ErrorCode>
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 Prover::fetch_credentials_for_proof_req).
Arguments
wallet_handle
: wallet handler (created by Wallet::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) }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 timeout
- the maximum time this function waits for a response
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 Prover::fetch_credentials_for_proof_req)
sourcepub fn search_credentials_for_proof_req_async<F: 'static>(
wallet_handle: IndyHandle,
proof_request_json: &str,
extra_query_json: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, i32) + Send,
pub fn search_credentials_for_proof_req_async<F: 'static>(
wallet_handle: IndyHandle,
proof_request_json: &str,
extra_query_json: Option<&str>,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, i32) + Send,
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 Prover::fetch_credentials_for_proof_req).
Arguments
wallet_handle
: wallet handler (created by Wallet::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) }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 closure
- the closure that is called when finished
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
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn _fetch_credentials_for_proof_req(
search_handle: IndyHandle,
item_referent: &str,
count: usize
) -> Result<String, ErrorCode>
pub fn _fetch_credentials_for_proof_req(
search_handle: IndyHandle,
item_referent: &str,
count: usize
) -> Result<String, ErrorCode>
Fetch next credentials for the requested item using proof request search handle (created by Prover::search_credentials_for_proof_req).
Arguments
search_handle
: Search handle (created by Prover::search_credentials_for_proof_req)item_referent
: Referent of attribute/predicate in the proof requestcount
: Count of credentials to fetch
Returns
credentials_json
: List of credentials for the given proof request. [{ cred_info: <credential_info>, interval: Optional<non_revoc_interval> }] wherecredential_info
: { “referent”:, “attrs”: {“attr_name” : “attr_raw_value”}, “schema_id”: string, “cred_def_id”: string, “rev_reg_id”: Optional , “cred_rev_id”: Optional , } non_revoc_interval
: { “from”: Optional, // timestamp of interval beginning “to”: Optional , // timestamp of interval ending } NOTE: The list of length less than the requested count means that search iterator correspondent to the requested <item_referent> is completed.
sourcepub fn _fetch_credentials_for_proof_req_timeout(
search_handle: IndyHandle,
item_referent: &str,
count: usize,
timeout: Duration
) -> Result<String, ErrorCode>
pub fn _fetch_credentials_for_proof_req_timeout(
search_handle: IndyHandle,
item_referent: &str,
count: usize,
timeout: Duration
) -> Result<String, ErrorCode>
Fetch next credentials for the requested item using proof request search handle (created by Prover::search_credentials_for_proof_req).
Arguments
search_handle
: Search handle (created by Prover::search_credentials_for_proof_req)item_referent
: Referent of attribute/predicate in the proof requestcount
: Count of credentials to fetchtimeout
- the maximum time this function waits for a response
Returns
credentials_json
: List of credentials for the given proof request. [{ cred_info: <credential_info>, interval: Optional<non_revoc_interval> }] wherecredential_info
: { “referent”:, “attrs”: {“attr_name” : “attr_raw_value”}, “schema_id”: string, “cred_def_id”: string, “rev_reg_id”: Optional , “cred_rev_id”: Optional , } non_revoc_interval
: { “from”: Optional, // timestamp of interval beginning “to”: Optional , // timestamp of interval ending } NOTE: The list of length less than the requested count means that search iterator correspondent to the requested <item_referent> is completed.
sourcepub fn _fetch_credentials_for_proof_req_async<F: 'static>(
search_handle: IndyHandle,
item_referent: &str,
count: usize,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
pub fn _fetch_credentials_for_proof_req_async<F: 'static>(
search_handle: IndyHandle,
item_referent: &str,
count: usize,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
Fetch next credentials for the requested item using proof request search handle (created by Prover::search_credentials_for_proof_req).
Arguments
search_handle
: Search handle (created by Prover::search_credentials_for_proof_req)item_referent
: Referent of attribute/predicate in the proof requestcount
: Count of credentials to fetchclosure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn _close_credentials_search_for_proof_req(
search_handle: IndyHandle
) -> Result<(), ErrorCode>
pub fn _close_credentials_search_for_proof_req(
search_handle: IndyHandle
) -> Result<(), ErrorCode>
Close credentials search for proof request (make search handle invalid)
Arguments
search_handle
: Search handle (created by Prover::search_credentials_for_proof_req)
sourcepub fn _close_credentials_search_for_proof_req_timeout(
search_handle: IndyHandle,
timeout: Duration
) -> Result<(), ErrorCode>
pub fn _close_credentials_search_for_proof_req_timeout(
search_handle: IndyHandle,
timeout: Duration
) -> Result<(), ErrorCode>
Close credentials search for proof request (make search handle invalid)
Arguments
search_handle
: Search handle (created by Prover::search_credentials_for_proof_req)timeout
- the maximum time this function waits for a response
sourcepub fn _close_credentials_search_for_proof_req_async<F: 'static>(
search_handle: IndyHandle,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode) + Send,
pub fn _close_credentials_search_for_proof_req_async<F: 'static>(
search_handle: IndyHandle,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode) + Send,
Close credentials search for proof request (make search handle invalid)
Arguments
search_handle
: Search handle (created by Prover::search_credentials_for_proof_req)closure
- the closure that is called when finished
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result
sourcepub fn create_proof(
wallet_handle: IndyHandle,
proof_req_json: &str,
requested_credentials_json: &str,
master_secret_id: &str,
schemas_json: &str,
credential_defs_json: &str,
rev_states_json: &str
) -> Result<String, ErrorCode>
pub fn create_proof(
wallet_handle: IndyHandle,
proof_req_json: &str,
requested_credentials_json: &str,
master_secret_id: &str,
schemas_json: &str,
credential_defs_json: &str,
rev_states_json: &str
) -> Result<String, ErrorCode>
Creates a proof according to the given proof request Either a corresponding credential with optionally revealed attributes or self-attested attribute must be provided for each requested attribute (see indy_prover_get_credentials_for_pool_req). A proof request may request multiple credentials from different schemas and different issuers. All required schemas, public keys and revocation registries must be provided. The proof request also contains nonce. The proof contains either proof or self-attested attribute value for each requested attribute.
Arguments
wallet_handle
: wallet handler (created by Wallet::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) }requested_credentials_json
: either a credential or self-attested attribute for each requested attribute { “self_attested_attributes”: { “self_attested_attribute_referent”: string }, “requested_attributes”: { “requested_attribute_referent_1”: {“cred_id”: string, “timestamp”: Optional, revealed: }}, “requested_attribute_referent_2”: {“cred_id”: string, “timestamp”: Optional , revealed: }} }, “requested_predicates”: { “requested_predicates_referent_1”: {“cred_id”: string, “timestamp”: Optional }}, } } master_secret_id
: the id of the master secret stored in the walletschemas_json
: all schemas json participating in the proof request { <schema1_id>: <schema1_json>, <schema2_id>: <schema2_json>, <schema3_id>: <schema3_json>, }credential_defs_json
: all credential definitions json participating in the proof request { “cred_def1_id”: <credential_def1_json>, “cred_def2_id”: <credential_def2_json>, “cred_def3_id”: <credential_def3_json>, }rev_states_json
: all revocation states json participating in the proof request { “rev_reg_def1_id”: { “timestamp1”: <rev_state1>, “timestamp2”: <rev_state2>, }, “rev_reg_def2_id”: { “timestamp3”: <rev_state3> }, “rev_reg_def3_id”: { “timestamp4”: <rev_state4> }, }
where
where wql query: indy-sdk/doc/design/011-wallet-query-language/README.md
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
Returns
proof_json
- proof json For each requested attribute either a proof (with optionally revealed attribute value) or self-attested attribute value is provided. Each proof is associated with a credential and corresponding schema_id, cred_def_id, rev_reg_id and timestamp. There is also aggregated proof part common for all credential proofs. { “requested”: { “revealed_attrs”: { “requested_attr1_id”: {sub_proof_index: number, raw: string, encoded: string}, “requested_attr4_id”: {sub_proof_index: number: string, encoded: string}, }, “unrevealed_attrs”: { “requested_attr3_id”: {sub_proof_index: number} }, “self_attested_attrs”: { “requested_attr2_id”: self_attested_value, }, “requested_predicates”: { “requested_predicate_1_referent”: {sub_proof_index: int}, “requested_predicate_2_referent”: {sub_proof_index: int}, } } “proof”: { “proofs”: [ <credential_proof>, <credential_proof>, <credential_proof> ], “aggregated_proof”: <aggregated_proof> } “identifiers”: [{schema_id, cred_def_id, Optional<rev_reg_id>, Optional}] }
sourcepub fn create_proof_timeout(
wallet_handle: IndyHandle,
proof_req_json: &str,
requested_credentials_json: &str,
master_secret_id: &str,
schemas_json: &str,
credential_defs_json: &str,
rev_states_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
pub fn create_proof_timeout(
wallet_handle: IndyHandle,
proof_req_json: &str,
requested_credentials_json: &str,
master_secret_id: &str,
schemas_json: &str,
credential_defs_json: &str,
rev_states_json: &str,
timeout: Duration
) -> Result<String, ErrorCode>
Creates a proof according to the given proof request Either a corresponding credential with optionally revealed attributes or self-attested attribute must be provided for each requested attribute (see indy_prover_get_credentials_for_pool_req). A proof request may request multiple credentials from different schemas and different issuers. All required schemas, public keys and revocation registries must be provided. The proof request also contains nonce. The proof contains either proof or self-attested attribute value for each requested attribute.
Arguments
wallet_handle
: wallet handler (created by Wallet::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) }requested_credentials_json
: either a credential or self-attested attribute for each requested attribute { “self_attested_attributes”: { “self_attested_attribute_referent”: string }, “requested_attributes”: { “requested_attribute_referent_1”: {“cred_id”: string, “timestamp”: Optional, revealed: }}, “requested_attribute_referent_2”: {“cred_id”: string, “timestamp”: Optional , revealed: }} }, “requested_predicates”: { “requested_predicates_referent_1”: {“cred_id”: string, “timestamp”: Optional }}, } } master_secret_id
: the id of the master secret stored in the walletschemas_json
: all schemas json participating in the proof request { <schema1_id>: <schema1_json>, <schema2_id>: <schema2_json>, <schema3_id>: <schema3_json>, }credential_defs_json
: all credential definitions json participating in the proof request { “cred_def1_id”: <credential_def1_json>, “cred_def2_id”: <credential_def2_json>, “cred_def3_id”: <credential_def3_json>, }rev_states_json
: all revocation states json participating in the proof request { “rev_reg_def1_id”: { “timestamp1”: <rev_state1>, “timestamp2”: <rev_state2>, }, “rev_reg_def2_id”: { “timestamp3”: <rev_state3> }, “rev_reg_def3_id”: { “timestamp4”: <rev_state4> }, }timeout
- the maximum time this function waits for a response
where
where wql query: indy-sdk/doc/design/011-wallet-query-language/README.md
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
Returns
proof_json
- proof json For each requested attribute either a proof (with optionally revealed attribute value) or self-attested attribute value is provided. Each proof is associated with a credential and corresponding schema_id, cred_def_id, rev_reg_id and timestamp. There is also aggregated proof part common for all credential proofs. { “requested”: { “revealed_attrs”: { “requested_attr1_id”: {sub_proof_index: number, raw: string, encoded: string}, “requested_attr4_id”: {sub_proof_index: number: string, encoded: string}, }, “unrevealed_attrs”: { “requested_attr3_id”: {sub_proof_index: number} }, “self_attested_attrs”: { “requested_attr2_id”: self_attested_value, }, “requested_predicates”: { “requested_predicate_1_referent”: {sub_proof_index: int}, “requested_predicate_2_referent”: {sub_proof_index: int}, } } “proof”: { “proofs”: [ <credential_proof>, <credential_proof>, <credential_proof> ], “aggregated_proof”: <aggregated_proof> } “identifiers”: [{schema_id, cred_def_id, Optional<rev_reg_id>, Optional}] }
sourcepub fn create_proof_async<F: 'static>(
wallet_handle: IndyHandle,
proof_req_json: &str,
requested_credentials_json: &str,
master_secret_id: &str,
schemas_json: &str,
credential_defs_json: &str,
rev_states_json: &str,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
pub fn create_proof_async<F: 'static>(
wallet_handle: IndyHandle,
proof_req_json: &str,
requested_credentials_json: &str,
master_secret_id: &str,
schemas_json: &str,
credential_defs_json: &str,
rev_states_json: &str,
closure: F
) -> ErrorCodewhere
F: FnMut(ErrorCode, String) + Send,
Creates a proof according to the given proof request Either a corresponding credential with optionally revealed attributes or self-attested attribute must be provided for each requested attribute (see indy_prover_get_credentials_for_pool_req). A proof request may request multiple credentials from different schemas and different issuers. All required schemas, public keys and revocation registries must be provided. The proof request also contains nonce. The proof contains either proof or self-attested attribute value for each requested attribute.
Arguments
wallet_handle
: wallet handler (created by Wallet::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) }requested_credentials_json
: either a credential or self-attested attribute for each requested attribute { “self_attested_attributes”: { “self_attested_attribute_referent”: string }, “requested_attributes”: { “requested_attribute_referent_1”: {“cred_id”: string, “timestamp”: Optional, revealed: }}, “requested_attribute_referent_2”: {“cred_id”: string, “timestamp”: Optional , revealed: }} }, “requested_predicates”: { “requested_predicates_referent_1”: {“cred_id”: string, “timestamp”: Optional }}, } } master_secret_id
: the id of the master secret stored in the walletschemas_json
: all schemas json participating in the proof request { <schema1_id>: <schema1_json>, <schema2_id>: <schema2_json>, <schema3_id>: <schema3_json>, }credential_defs_json
: all credential definitions json participating in the proof request { “cred_def1_id”: <credential_def1_json>, “cred_def2_id”: <credential_def2_json>, “cred_def3_id”: <credential_def3_json>, }rev_states_json
: all revocation states json participating in the proof request { “rev_reg_def1_id”: { “timestamp1”: <rev_state1>, “timestamp2”: <rev_state2>, }, “rev_reg_def2_id”: { “timestamp3”: <rev_state3> }, “rev_reg_def3_id”: { “timestamp4”: <rev_state4> }, }closure
- the closure that is called when finished
where
where wql query: indy-sdk/doc/design/011-wallet-query-language/README.md
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
Returns
errorcode
- errorcode from calling ffi function. The closure receives the return result