forked from hyperledger-archives/aries-framework-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
197 lines (173 loc) · 5.33 KB
/
models.go
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package presentproof
import "github.com/Universal-Health-Chain/aries-framework-go/pkg/client/presentproof"
// DeclinePresentationArgs model
//
// This is used when the presentation needs to be rejected
//
type DeclinePresentationArgs struct {
// PIID Protocol instance ID
PIID string `json:"piid"`
// Reason why presentation is declined
Reason string `json:"reason"`
}
// DeclinePresentationResponse model
//
// Represents a DeclinePresentation response message
//
type DeclinePresentationResponse struct{}
// DeclineProposePresentationArgs model
//
// This is used when proposal needs to be rejected
//
type DeclineProposePresentationArgs struct {
// PIID Protocol instance ID
PIID string `json:"piid"`
// Reason why proposal is declined
Reason string `json:"reason"`
}
// DeclineProposePresentationResponse model
//
// Represents a DeclineProposePresentation response message
//
type DeclineProposePresentationResponse struct{}
// DeclineRequestPresentationArgs model
//
// This is used when the request needs to be rejected
//
type DeclineRequestPresentationArgs struct {
// PIID Protocol instance ID
PIID string `json:"piid"`
// Reason why request is declined
Reason string `json:"reason"`
}
// DeclineRequestPresentationResponse model
//
// Represents a DeclineRequestPresentation response message
//
type DeclineRequestPresentationResponse struct{}
// ActionsResponse model
//
// Represents Actions response message
//
type ActionsResponse struct {
Actions []presentproof.Action `json:"actions"`
}
// AcceptPresentationArgs model
//
// This is used for accepting a presentation
//
type AcceptPresentationArgs struct {
// PIID Protocol instance ID
PIID string `json:"piid"`
// Names represent the names of how presentations will be stored
Names []string `json:"names"`
}
// AcceptPresentationResponse model
//
// Represents a AcceptPresentation response message
//
type AcceptPresentationResponse struct{}
// AcceptRequestPresentationArgs model
//
// This is used for accepting a request presentation
//
type AcceptRequestPresentationArgs struct {
// PIID Protocol instance ID
PIID string `json:"piid"`
// Presentation is a message that contains signed presentations.
Presentation *presentproof.Presentation `json:"presentation"`
}
// AcceptRequestPresentationResponse model
//
// Represents a AcceptRequestPresentation response message
//
type AcceptRequestPresentationResponse struct{}
// AcceptProposePresentationArgs model
//
// This is used for accepting a propose presentation
//
type AcceptProposePresentationArgs struct {
// PIID Protocol instance ID
PIID string `json:"piid"`
// RequestPresentation describes values that need to be revealed and predicates that need to be fulfilled.
RequestPresentation *presentproof.RequestPresentation `json:"request_presentation"`
}
// AcceptProposePresentationResponse model
//
// Represents a AcceptProposePresentation response message
//
type AcceptProposePresentationResponse struct{}
// NegotiateRequestPresentationArgs model
//
// This is used by the Prover to counter a presentation request they received with a proposal.
//
type NegotiateRequestPresentationArgs struct {
// PIID Protocol instance ID
PIID string `json:"piid"`
// ProposePresentation is a response message to a request-presentation message when the Prover wants to
// propose using a different presentation format.
ProposePresentation *presentproof.ProposePresentation `json:"propose_presentation"`
}
// NegotiateRequestPresentationResponse model
//
// Represents a NegotiateRequestPresentation response message
//
type NegotiateRequestPresentationResponse struct{}
// SendProposePresentationArgs model
//
// This is used for sending a propose presentation
//
type SendProposePresentationArgs struct {
// MyDID sender's did
MyDID string `json:"my_did"`
// TheirDID receiver's did
TheirDID string `json:"their_did"`
// ProposePresentation is a message sent by the Prover to the verifier to initiate a proof
// presentation process.
ProposePresentation *presentproof.ProposePresentation `json:"propose_presentation"`
}
// SendProposePresentationResponse model
//
// Represents a SendProposePresentation response message
//
type SendProposePresentationResponse struct {
// PIID Protocol instance ID. It can be used as a correlation ID
PIID string `json:"piid"`
}
// SendRequestPresentationArgs model
//
// This is used for sending a request presentation
//
type SendRequestPresentationArgs struct {
// MyDID sender's did
MyDID string `json:"my_did"`
// TheirDID receiver's did
TheirDID string `json:"their_did"`
// RequestPresentation describes values that need to be revealed and predicates that need to be fulfilled.
RequestPresentation *presentproof.RequestPresentation `json:"request_presentation"`
}
// SendRequestPresentationResponse model
//
// Represents a SendRequestPresentation response message
//
type SendRequestPresentationResponse struct {
// PIID Protocol instance ID. It can be used as a correlation ID
PIID string `json:"piid"`
}
// AcceptProblemReportArgs model
//
// This is used for accepting a problem report
//
type AcceptProblemReportArgs struct {
// PIID Protocol instance ID
PIID string `json:"piid"`
}
// AcceptProblemReportResponse model
//
// Represents a AcceptProblemReport response message
//
type AcceptProblemReportResponse struct{}