keeper

package
v9.5.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 2, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Keeper

type Keeper struct {
	Router *types.Router
	// contains filtered or unexported fields
}

Keeper defines the IBC connection keeper

func NewKeeper

func NewKeeper(sck exported.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) IsBound

func (k Keeper) IsBound(ctx sdk.Context, portID string) bool

IsBound checks a given port ID is already bounded.

func (Keeper) Logger

func (Keeper) Logger(ctx sdk.Context) log.Logger

Logger returns a module-specific logger.

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL