Function sovrin::api::anoncreds::sovrin_prover_create_proof
[−]
[src]
#[no_mangle]pub extern "C" fn sovrin_prover_create_proof(
command_handle: i32,
wallet_handle: i32,
proof_req_json: *const c_char,
requested_claims_json: *const c_char,
schemas_json: *const c_char,
master_secret_name: *const c_char,
claim_defs_json: *const c_char,
revoc_regs_json: *const c_char,
cb: Option<extern "C" fn(_: i32, _: ErrorCode, _: *const c_char)>
) -> ErrorCode
Creates a proof according to the given proof request Either a corresponding claim with optionally revealed attributes or self-attested attribute must be provided for each requested attribute (see sovrin_prover_get_claims_for_pool_req). A proof request may request multiple claims 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.
Params
wallet_handle: wallet handler (created by open_wallet).
command_handle: command handle to map callback to user context.
proof_req_json: proof request json as come from the verifier
{
"nonce": string,
"requested_attr1_uuid":
claim_def_jsons: all claim definition jsons participating in the proof request
{
"claim1_uuid_in_wallet":
Returns
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 claim and corresponding schema_seq_no, claim_def_seq_no and revoc_reg_seq_no.
There ais also aggregated proof part common for all claim proofs.
{
"requested": {
"requested_attr1_id": [claim_proof1_uuid, revealed_attr1, revealed_attr1_as_int],
"requested_attr2_id": [self_attested_attribute],
"requested_attr3_id": [claim_proof2_uuid]
"requested_attr4_id": [claim_proof2_uuid, revealed_attr4, revealed_attr4_as_int],
"requested_predicate_1_uuid": [claim_proof2_uuid],
"requested_predicate_2_uuid": [claim_proof3_uuid],
}
"claim_proofs": {
"claim_proof1_uuid": [
Errors
Annoncreds* Common* Wallet*