keeper

package
v9.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 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

func (*Keeper) Route

func (k *Keeper) Route(module string) (types.IBCModule, bool)

Route returns a IBCModule for a given module, and a boolean indicating whether or not the route is present.

Jump to

Keyboard shortcuts

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