1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#ifndef __indy__pairwise__included__
#define __indy__pairwise__included__
#include "indy_types.h"
#include "indy_mod.h"
#ifdef __cplusplus
extern "C" {
#endif
/// Check if pairwise is exists.
///
/// #Params
/// wallet_handle: wallet handler (created by open_wallet).
/// command_handle: command handle to map callback to user context.
/// their_did: encrypted DID
/// cb: Callback that takes command result as parameter.
///
/// #Returns
/// exists: true - if pairwise is exists, false - otherwise
///
/// #Errors
/// Common*
/// Wallet*
extern indy_error_t indy_is_pairwise_exists(indy_handle_t command_handle,
indy_handle_t wallet_handle,
const char * their_did,
indy_bool_cb cb
);
/// Creates pairwise.
///
/// #Params
/// wallet_handle: wallet handler (created by open_wallet).
/// command_handle: command handle to map callback to user context.
/// their_did: encrypting DID
/// my_did: encrypted DID
/// metadata Optional: extra information for pairwise
/// cb: Callback that takes command result as parameter.
///
/// #Returns
/// Error code
///
/// #Errors
/// Common*
/// Wallet*
extern indy_error_t indy_create_pairwise(indy_handle_t command_handle,
indy_handle_t wallet_handle,
const char * their_did,
const char * my_did,
const char * metadata,
indy_empty_cb cb
);
/// Get list of saved pairwise.
///
/// #Params
/// wallet_handle: wallet handler (created by open_wallet).
/// command_handle: command handle to map callback to user context.
/// cb: Callback that takes command result as parameter.
///
/// #Returns
/// list_pairwise: list of saved pairwise
///
/// #Errors
/// Common*
/// Wallet*
extern indy_error_t indy_list_pairwise(indy_handle_t command_handle,
indy_handle_t wallet_handle,
indy_str_cb cb
);
/// Gets pairwise information for specific their_did.
///
/// #Params
/// wallet_handle: wallet handler (created by open_wallet).
/// command_handle: command handle to map callback to user context.
/// their_did: encoded Did
/// cb: Callback that takes command result as parameter.
///
/// #Returns
/// pairwise_info_json: did info associated with their did
///
/// #Errors
/// Common*
/// Wallet*
extern indy_error_t indy_get_pairwise(indy_handle_t command_handle,
indy_handle_t wallet_handle,
const char * their_did,
indy_str_cb cb
);
/// Save some data in the Wallet for pairwise associated with Did.
///
/// #Params
/// wallet_handle: wallet handler (created by open_wallet).
/// command_handle: command handle to map callback to user context.
/// their_did: encoded Did
/// metadata: some extra information for pairwise
/// cb: Callback that takes command result as parameter.
///
/// #Returns
/// Error code
///
/// #Errors
/// Common*
/// Wallet*
extern indy_error_t indy_set_pairwise_metadata(indy_handle_t command_handle,
indy_handle_t wallet_handle,
const char * their_did,
const char * metadata,
indy_empty_cb cb
);
#ifdef __cplusplus
}
#endif
#endif