rust_libindy_wrapper/native/
anoncreds.rs1use super::*;
2
3use native::{CString, Error, Handle};
4
5extern {
6 #[no_mangle]
7 pub fn indy_issuer_create_schema(command_handle: Handle,
8 issuer_did: CString,
9 name: CString,
10 version: CString,
11 attrs: CString,
12 cb: Option<ResponseStringStringCB>) -> Error;
13 #[no_mangle]
14 pub fn indy_issuer_create_and_store_credential_def(command_handle: Handle,
15 wallet_handle: Handle,
16 issuer_did: CString,
17 schema_json: CString,
18 tag: CString,
19 signature_type: CString,
20 config_json: CString,
21 cb: Option<ResponseStringStringCB>) -> Error;
22 #[no_mangle]
23 pub fn indy_issuer_create_and_store_revoc_reg(command_handle: Handle,
24 wallet_handle: Handle,
25 issuer_did: CString,
26 revoc_def_type: CString,
27 tag: CString,
28 cred_def_id: CString,
29 config_json: CString,
30 tails_writer_handle: Handle,
31 cb: Option<ResponseStringStringStringCB>) -> Error;
32 #[no_mangle]
33 pub fn indy_issuer_create_credential_offer(command_handle: Handle,
34 wallet_handle: Handle,
35 cred_def_id: CString,
36 cb: Option<ResponseStringCB>) -> Error;
37 #[no_mangle]
38 pub fn indy_issuer_create_credential(command_handle: Handle,
39 wallet_handle: Handle,
40 cred_offer_json: CString,
41 cred_req_json: CString,
42 cred_values_json: CString,
43 rev_reg_id: CString,
44 blob_storage_reader_handle: Handle,
45 cb: Option<ResponseStringStringStringCB>) -> Error;
46 #[no_mangle]
47 pub fn indy_issuer_revoke_credential(command_handle: Handle,
48 wallet_handle: Handle,
49 blob_storage_reader_cfg_handle: Handle,
50 rev_reg_id: CString,
51 cred_revoc_id: CString,
52 cb: Option<ResponseStringCB>) -> Error;
53 #[no_mangle]
54 pub fn indy_issuer_merge_revocation_registry_deltas(command_handle: Handle,
55 rev_reg_delta_json: CString,
56 other_rev_reg_delta_json: CString,
57 cb: Option<ResponseStringCB>) -> Error;
58 #[no_mangle]
59 pub fn indy_prover_create_master_secret(command_handle: Handle,
60 wallet_handle: Handle,
61 master_secret_id: CString,
62 cb: Option<ResponseStringCB>) -> Error;
63 #[no_mangle]
64 pub fn indy_prover_create_credential_req(command_handle: Handle,
65 wallet_handle: Handle,
66 prover_did: CString,
67 cred_offer_json: CString,
68 cred_def_json: CString,
69 master_secret_id: CString,
70 cb: Option<ResponseStringStringCB>) -> Error;
71 #[no_mangle]
72 pub fn indy_prover_store_credential(command_handle: Handle,
73 wallet_handle: Handle,
74 cred_id: CString,
75 cred_req_metadata_json: CString,
76 cred_json: CString,
77 cred_def_json: CString,
78 rev_reg_def_json: CString,
79 cb: Option<ResponseStringCB>) -> Error;
80 #[no_mangle]
81 pub fn indy_prover_get_credential(command_handle: Handle,
82 wallet_handle: Handle,
83 cred_id: CString,
84 cb: Option<ResponseStringCB>) -> Error;
85 #[no_mangle]
86 pub fn indy_prover_get_credentials(command_handle: Handle,
87 wallet_handle: Handle,
88 filter_json: CString,
89 cb: Option<ResponseStringCB>) -> Error;
90 #[no_mangle]
91 pub fn indy_prover_search_credentials(command_handle: Handle,
92 wallet_handle: Handle,
93 query_json: CString,
94 cb: Option<ResponseI32UsizeCB>) -> Error;
95 #[no_mangle]
96 pub fn indy_prover_fetch_credentials(command_handle: Handle,
97 search_handle: Handle,
98 count: usize,
99 cb: Option<ResponseStringCB>) -> Error;
100 #[no_mangle]
101 pub fn indy_prover_close_credentials_search(command_handle: Handle,
102 search_handle: Handle,
103 cb: Option<ResponseEmptyCB>) -> Error;
104 #[no_mangle]
105 pub fn indy_prover_get_credentials_for_proof_req(command_handle: Handle,
106 wallet_handle: Handle,
107 proof_request_json: CString,
108 cb: Option<ResponseStringCB>) -> Error;
109 #[no_mangle]
110 pub fn indy_prover_search_credentials_for_proof_req(command_handle: Handle,
111 wallet_handle: Handle,
112 proof_request_json: CString,
113 extra_query_json: CString,
114 cb: Option<ResponseI32CB>) -> Error;
115 #[no_mangle]
116 pub fn indy_prover_fetch_credentials_for_proof_req(command_handle: Handle,
117 search_handle: Handle,
118 item_referent: CString,
119 count: usize,
120 cb: Option<ResponseStringCB>) -> Error;
121 #[no_mangle]
122 pub fn indy_prover_close_credentials_search_for_proof_req(command_handle: Handle,
123 search_handle: Handle,
124 cb: Option<ResponseEmptyCB>) -> Error;
125 #[no_mangle]
126 pub fn indy_prover_create_proof(command_handle: Handle,
127 wallet_handle: Handle,
128 proof_req_json: CString,
129 requested_credentials_json: CString,
130 master_secret_id: CString,
131 schemas_json: CString,
132 credential_defs_json: CString,
133 rev_states_json: CString,
134 cb: Option<ResponseStringCB>) -> Error;
135 #[no_mangle]
136 pub fn indy_verifier_verify_proof(command_handle: Handle,
137 proof_request_json: CString,
138 proof_json: CString,
139 schemas_json: CString,
140 credential_defs_json: CString,
141 rev_reg_defs_json: CString,
142 rev_regs_json: CString,
143 cb: Option<ResponseBoolCB>) -> Error;
144 #[no_mangle]
145 pub fn indy_create_revocation_state(command_handle: Handle,
146 blob_storage_reader_handle: Handle,
147 rev_reg_def_json: CString,
148 rev_reg_delta_json: CString,
149 timestamp: u64,
150 cred_rev_id: CString,
151 cb: Option<ResponseStringCB>) -> Error;
152 #[no_mangle]
153 pub fn indy_update_revocation_state(command_handle: Handle,
154 blob_storage_reader_handle: Handle,
155 rev_state_json: CString,
156 rev_reg_def_json: CString,
157 rev_reg_delta_json: CString,
158 timestamp: u64,
159 cred_rev_id: CString,
160 cb: Option<ResponseStringCB>) -> Error;
161}
162