Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) Authenticate(ctx sdk.Context, key *capabilitytypes.Capability, portID string) bool
- func (k *Keeper) BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
- func (k Keeper) IsBound(ctx sdk.Context, portID string) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) LookupModuleByPort(ctx sdk.Context, portID string) (string, *capabilitytypes.Capability, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
Keeper defines the IBC connection keeper
func NewKeeper ¶
func NewKeeper(sck capabilitykeeper.ScopedKeeper) Keeper
NewKeeper creates a new IBC connection Keeper instance
func (Keeper) Authenticate ¶
func (k Keeper) Authenticate(ctx sdk.Context, key *capabilitytypes.Capability, portID string) bool
Authenticate authenticates a capability key against a port ID by checking if the memory address of the capability was previously generated and bound to the port (provided as a parameter) which the capability is being authenticated against.
func (*Keeper) BindPort ¶
func (k *Keeper) BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
BindPort binds to a port and returns the associated capability. Ports must be bound statically when the chain starts in `app.go`. The capability must then be passed to a module which will need to pass it as an extra parameter when calling functions on the IBC module.
func (Keeper) LookupModuleByPort ¶
func (k Keeper) LookupModuleByPort(ctx sdk.Context, portID string) (string, *capabilitytypes.Capability, error)
LookupModuleByPort will return the IBCModule along with the capability associated with a given portID