1use super::*;
2
3use {CString, Error};
4
5
6extern {
7
8 #[no_mangle]
9 pub fn indy_issuer_create_schema(command_handle: CommandHandle,
10 issuer_did: CString,
11 name: CString,
12 version: CString,
13 attrs: CString,
14 cb: Option<ResponseStringStringCB>) -> Error;
15
16 #[no_mangle]
17 pub fn indy_issuer_create_and_store_credential_def(command_handle: CommandHandle,
18 wallet_handle: WalletHandle,
19 issuer_did: CString,
20 schema_json: CString,
21 tag: CString,
22 signature_type: CString,
23 config_json: CString,
24 cb: Option<ResponseStringStringCB>) -> Error;
25
26 #[no_mangle]
27 pub fn indy_issuer_rotate_credential_def_start(command_handle: CommandHandle,
28 wallet_handle: WalletHandle,
29 cred_def_id: CString,
30 config_json: CString,
31 cb: Option<ResponseStringCB>) -> Error;
32
33 #[no_mangle]
34 pub fn indy_issuer_rotate_credential_def_apply(command_handle: CommandHandle,
35 wallet_handle: WalletHandle,
36 cred_def_id: CString,
37 cb: Option<ResponseEmptyCB>) -> Error;
38
39 #[no_mangle]
40 pub fn indy_issuer_create_and_store_revoc_reg(command_handle: CommandHandle,
41 wallet_handle: WalletHandle,
42 issuer_did: CString,
43 revoc_def_type: CString,
44 tag: CString,
45 cred_def_id: CString,
46 config_json: CString,
47 tails_writer_handle: TailWriterHandle,
48 cb: Option<ResponseStringStringStringCB>) -> Error;
49
50 #[no_mangle]
51 pub fn indy_issuer_create_credential_offer(command_handle: CommandHandle,
52 wallet_handle: WalletHandle,
53 cred_def_id: CString,
54 cb: Option<ResponseStringCB>) -> Error;
55
56 #[no_mangle]
57 pub fn indy_issuer_create_credential(command_handle: CommandHandle,
58 wallet_handle: WalletHandle,
59 cred_offer_json: CString,
60 cred_req_json: CString,
61 cred_values_json: CString,
62 rev_reg_id: CString,
63 blob_storage_reader_handle: BlobStorageReaderHandle,
64 cb: Option<ResponseStringStringStringCB>) -> Error;
65
66 #[no_mangle]
67 pub fn indy_issuer_revoke_credential(command_handle: CommandHandle,
68 wallet_handle: WalletHandle,
69 blob_storage_reader_cfg_handle: BlobStorageReaderCfgHandle,
70 rev_reg_id: CString,
71 cred_revoc_id: CString,
72 cb: Option<ResponseStringCB>) -> Error;
73
74 #[no_mangle]
75 pub fn indy_issuer_merge_revocation_registry_deltas(command_handle: CommandHandle,
76 rev_reg_delta_json: CString,
77 other_rev_reg_delta_json: CString,
78 cb: Option<ResponseStringCB>) -> Error;
79
80 #[no_mangle]
81 pub fn indy_prover_create_master_secret(command_handle: CommandHandle,
82 wallet_handle: WalletHandle,
83 master_secret_id: CString,
84 cb: Option<ResponseStringCB>) -> Error;
85
86 #[no_mangle]
87 pub fn indy_prover_create_credential_req(command_handle: CommandHandle,
88 wallet_handle: WalletHandle,
89 prover_did: CString,
90 cred_offer_json: CString,
91 cred_def_json: CString,
92 master_secret_id: CString,
93 cb: Option<ResponseStringStringCB>) -> Error;
94
95 #[no_mangle]
96 pub fn indy_prover_set_credential_attr_tag_policy(command_handle: CommandHandle,
97 wallet_handle: WalletHandle,
98 cred_def_id: CString,
99 taggable_json: CString,
100 retroactive: bool,
101 cb: Option<ResponseEmptyCB>) -> Error;
102
103 #[no_mangle]
104 pub fn indy_prover_get_credential_attr_tag_policy(command_handle: CommandHandle,
105 wallet_handle: WalletHandle,
106 cred_def_id: CString,
107 cb: Option<ResponseStringCB>) -> Error;
108
109 #[no_mangle]
110 pub fn indy_prover_store_credential(command_handle: CommandHandle,
111 wallet_handle: WalletHandle,
112 cred_id: CString,
113 cred_req_metadata_json: CString,
114 cred_json: CString,
115 cred_def_json: CString,
116 rev_reg_def_json: CString,
117 cb: Option<ResponseStringCB>) -> Error;
118
119 #[no_mangle]
120 pub fn indy_prover_get_credential(command_handle: CommandHandle,
121 wallet_handle: WalletHandle,
122 cred_id: CString,
123 cb: Option<ResponseStringCB>) -> Error;
124
125 #[no_mangle]
126 pub fn indy_prover_delete_credential(command_handle: CommandHandle,
127 wallet_handle: WalletHandle,
128 cred_id: CString,
129 cb: Option<ResponseEmptyCB>) -> Error;
130
131 #[no_mangle]
132 pub fn indy_prover_get_credentials(command_handle: CommandHandle,
133 wallet_handle: WalletHandle,
134 filter_json: CString,
135 cb: Option<ResponseStringCB>) -> Error;
136
137 #[no_mangle]
138 pub fn indy_prover_search_credentials(command_handle: CommandHandle,
139 wallet_handle: WalletHandle,
140 query_json: CString,
141 cb: Option<ResponseI32UsizeCB>) -> Error;
142
143 #[no_mangle]
144 pub fn indy_prover_fetch_credentials(command_handle: CommandHandle,
145 search_handle: SearchHandle,
146 count: usize,
147 cb: Option<ResponseStringCB>) -> Error;
148
149 #[no_mangle]
150 pub fn indy_prover_close_credentials_search(command_handle: CommandHandle,
151 search_handle: SearchHandle,
152 cb: Option<ResponseEmptyCB>) -> Error;
153
154 #[no_mangle]
155 pub fn indy_prover_get_credentials_for_proof_req(command_handle: CommandHandle,
156 wallet_handle: WalletHandle,
157 proof_request_json: CString,
158 cb: Option<ResponseStringCB>) -> Error;
159
160 #[no_mangle]
161 pub fn indy_prover_search_credentials_for_proof_req(command_handle: CommandHandle,
162 wallet_handle: WalletHandle,
163 proof_request_json: CString,
164 extra_query_json: CString,
165 cb: Option<ResponseI32CB>) -> Error;
166
167 #[no_mangle]
168 pub fn indy_prover_fetch_credentials_for_proof_req(command_handle: CommandHandle,
169 search_handle: SearchHandle,
170 item_referent: CString,
171 count: usize,
172 cb: Option<ResponseStringCB>) -> Error;
173
174 #[no_mangle]
175 pub fn indy_prover_close_credentials_search_for_proof_req(command_handle: CommandHandle,
176 search_handle: SearchHandle,
177 cb: Option<ResponseEmptyCB>) -> Error;
178
179 #[no_mangle]
180 pub fn indy_prover_create_proof(command_handle: CommandHandle,
181 wallet_handle: WalletHandle,
182 proof_req_json: CString,
183 requested_credentials_json: CString,
184 master_secret_id: CString,
185 schemas_json: CString,
186 credential_defs_json: CString,
187 rev_states_json: CString,
188 cb: Option<ResponseStringCB>) -> Error;
189
190 #[no_mangle]
191 pub fn indy_verifier_verify_proof(command_handle: CommandHandle,
192 proof_request_json: CString,
193 proof_json: CString,
194 schemas_json: CString,
195 credential_defs_json: CString,
196 rev_reg_defs_json: CString,
197 rev_regs_json: CString,
198 cb: Option<ResponseBoolCB>) -> Error;
199
200 #[no_mangle]
201 pub fn indy_create_revocation_state(command_handle: CommandHandle,
202 blob_storage_reader_handle: BlobStorageReaderHandle,
203 rev_reg_def_json: CString,
204 rev_reg_delta_json: CString,
205 timestamp: u64,
206 cred_rev_id: CString,
207 cb: Option<ResponseStringCB>) -> Error;
208
209 #[no_mangle]
210 pub fn indy_update_revocation_state(command_handle: CommandHandle,
211 blob_storage_reader_handle: BlobStorageReaderHandle,
212 rev_state_json: CString,
213 rev_reg_def_json: CString,
214 rev_reg_delta_json: CString,
215 timestamp: u64,
216 cred_rev_id: CString,
217 cb: Option<ResponseStringCB>) -> Error;
218
219 #[no_mangle]
220 pub fn indy_generate_nonce(command_handle: CommandHandle,
221 cb: Option<ResponseStringCB>) -> Error;
222 #[no_mangle]
223 pub fn indy_to_unqualified(command_handle: CommandHandle,
224 entity: CString,
225 cb: Option<ResponseStringCB>) -> Error;
226}
227