-
Notifications
You must be signed in to change notification settings - Fork 8
/
query.go
49 lines (44 loc) · 1.48 KB
/
query.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
package types
import (
clienttypes "github.com/bianjieai/tibc-go/modules/tibc/core/02-client/types"
)
// NewQueryPacketCommitmentResponse creates a new QueryPacketCommitmentResponse instance
func NewQueryPacketCommitmentResponse(
commitment []byte, proof []byte, height clienttypes.Height,
) *QueryPacketCommitmentResponse {
return &QueryPacketCommitmentResponse{
Commitment: commitment,
Proof: proof,
ProofHeight: height,
}
}
// NewQueryPacketReceiptResponse creates a new QueryPacketReceiptResponse instance
func NewQueryPacketReceiptResponse(
recvd bool, proof []byte, height clienttypes.Height,
) *QueryPacketReceiptResponse {
return &QueryPacketReceiptResponse{
Received: recvd,
Proof: proof,
ProofHeight: height,
}
}
// NewQueryPacketAcknowledgementResponse creates a new QueryPacketAcknowledgementResponse instance
func NewQueryPacketAcknowledgementResponse(
acknowledgement []byte, proof []byte, height clienttypes.Height,
) *QueryPacketAcknowledgementResponse {
return &QueryPacketAcknowledgementResponse{
Acknowledgement: acknowledgement,
Proof: proof,
ProofHeight: height,
}
}
// NewQueryCleanPacketCommitmentResponse creates a new NewQueryCleanPacketCommitmentResponse instance
func NewQueryCleanPacketCommitmentResponse(
commitment []byte, proof []byte, height clienttypes.Height,
) *QueryCleanPacketCommitmentResponse {
return &QueryCleanPacketCommitmentResponse{
Commitment: commitment,
Proof: proof,
ProofHeight: height,
}
}