-
Notifications
You must be signed in to change notification settings - Fork 1
/
proof.go
48 lines (38 loc) · 1.75 KB
/
proof.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
package protocol
import (
"github.com/iden3/iden3comm/v2"
)
const (
// ProofGenerationRequestMessageType is type for request of proof generation
ProofGenerationRequestMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "proofs/1.0/request"
// ProofGenerationResponseMessageType is type for response of proof generation
ProofGenerationResponseMessageType iden3comm.ProtocolMessage = iden3comm.Iden3Protocol + "proofs/1.0/response"
)
// ProofGenerationRequestMessage is struct the represents body for proof generation request
type ProofGenerationRequestMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body ProofGenerationRequestMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
}
// ProofGenerationRequestMessageBody is struct the represents body for proof generation request
type ProofGenerationRequestMessageBody struct {
Scope []ZeroKnowledgeProofRequest `json:"scope"`
}
// ProofGenerationResponseMessage is struct the represents body for proof generation request
type ProofGenerationResponseMessage struct {
ID string `json:"id"`
Typ iden3comm.MediaType `json:"typ,omitempty"`
Type iden3comm.ProtocolMessage `json:"type"`
ThreadID string `json:"thid,omitempty"`
Body ResponseMessageBody `json:"body,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
}
// ResponseMessageBody is struct the represents request for revocation status
type ResponseMessageBody struct {
Scope []ZeroKnowledgeProofResponse `json:"scope"`
}