-
Notifications
You must be signed in to change notification settings - Fork 572
/
expected_keepers.go
99 lines (93 loc) · 2.51 KB
/
expected_keepers.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
package types
import (
storetypes "cosmossdk.io/store/types"
sdk "github.com/cosmos/cosmos-sdk/types"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"
connectiontypes "github.com/cosmos/ibc-go/v8/modules/core/03-connection/types"
"github.com/cosmos/ibc-go/v8/modules/core/exported"
)
// ClientKeeper expected account IBC client keeper
type ClientKeeper interface {
GetClientStatus(ctx sdk.Context, clientState exported.ClientState, clientID string) exported.Status
GetClientState(ctx sdk.Context, clientID string) (exported.ClientState, bool)
GetClientConsensusState(ctx sdk.Context, clientID string, height exported.Height) (exported.ConsensusState, bool)
ClientStore(ctx sdk.Context, clientID string) storetypes.KVStore
}
// ConnectionKeeper expected account IBC connection keeper
type ConnectionKeeper interface {
GetConnection(ctx sdk.Context, connectionID string) (connectiontypes.ConnectionEnd, bool)
GetTimestampAtHeight(
ctx sdk.Context,
connection connectiontypes.ConnectionEnd,
height exported.Height,
) (uint64, error)
VerifyChannelState(
ctx sdk.Context,
connection exported.ConnectionI,
height exported.Height,
proof []byte,
portID,
channelID string,
channel exported.ChannelI,
) error
VerifyPacketCommitment(
ctx sdk.Context,
connection exported.ConnectionI,
height exported.Height,
proof []byte,
portID,
channelID string,
sequence uint64,
commitmentBytes []byte,
) error
VerifyPacketAcknowledgement(
ctx sdk.Context,
connection exported.ConnectionI,
height exported.Height,
proof []byte,
portID,
channelID string,
sequence uint64,
acknowledgement []byte,
) error
VerifyPacketReceiptAbsence(
ctx sdk.Context,
connection exported.ConnectionI,
height exported.Height,
proof []byte,
portID,
channelID string,
sequence uint64,
) error
VerifyNextSequenceRecv(
ctx sdk.Context,
connection exported.ConnectionI,
height exported.Height,
proof []byte,
portID,
channelID string,
nextSequenceRecv uint64,
) error
VerifyChannelUpgrade(
ctx sdk.Context,
connection exported.ConnectionI,
height exported.Height,
proof []byte,
portID,
channelID string,
upgrade Upgrade,
) error
VerifyChannelUpgradeError(
ctx sdk.Context,
connection exported.ConnectionI,
height exported.Height,
proof []byte,
portID,
channelID string,
errorReceipt ErrorReceipt,
) error
}
// PortKeeper expected account IBC port keeper
type PortKeeper interface {
Authenticate(ctx sdk.Context, key *capabilitytypes.Capability, portID string) bool
}