keeper

package
v0.0.0-...-99ea1f7 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryEgress  = "egress"
	QueryMailbox = "mailbox"
	QueryStorage = "storage"
	QueryKeys    = "keys"
)

query endpoints supported by the swingset Querier

Variables

This section is empty.

Functions

func NewQuerier

func NewQuerier(keeper Keeper) sdk.Querier

NewQuerier is the module level router for state queries

Types

type Keeper

type Keeper struct {

	// CallToController dispatches a message to the controlling process
	CallToController func(ctx sdk.Context, str string) (string, error)
	// contains filtered or unexported fields
}

Keeper maintains the link to data storage and exposes getter/setter methods for the various parts of the state machine

func NewKeeper

func NewKeeper(
	cdc *codec.Codec, key sdk.StoreKey,
	channelKeeper types.ChannelKeeper, portKeeper types.PortKeeper,
	accountKeeper auth.AccountKeeper, bankKeeper bank.Keeper,
	scopedKeeper capability.ScopedKeeper,
) Keeper

NewKeeper creates a new IBC transfer Keeper instance

func (Keeper) BindPort

func (k Keeper) BindPort(ctx sdk.Context, portID string) error

BindPort defines a wrapper function for the port Keeper's function in order to expose it to the SwingSet IBC handler.

func (Keeper) ChanCloseInit

func (k Keeper) ChanCloseInit(ctx sdk.Context, portID, channelID string) error

ChanCloseInit defines a wrapper function for the channel Keeper's function in order to expose it to the SwingSet IBC handler.

func (Keeper) ChanOpenInit

func (k Keeper) ChanOpenInit(ctx sdk.Context, order ibctypes.Order, connectionHops []string,
	portID, channelID, rPortID, rChannelID, version string,
) error

ChanOpenInit defines a wrapper function for the channel Keeper's function in order to expose it to the SwingSet IBC handler.

func (Keeper) ClaimCapability

func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capability.Capability, name string) error

ClaimCapability allows the SwingSet module to claim a capability that IBC module passes to it

func (Keeper) ExportEgresses

func (k Keeper) ExportEgresses(ctx sdk.Context) []types.Egress

ExportEgresses fetches all egresses

func (Keeper) GetBalance

func (k Keeper) GetBalance(ctx sdk.Context, addr sdk.AccAddress, denom string) sdk.Coin

func (Keeper) GetCapability

func (k Keeper) GetCapability(ctx sdk.Context, name string) (*capability.Capability, bool)

func (Keeper) GetEgress

func (k Keeper) GetEgress(ctx sdk.Context, addr sdk.AccAddress) types.Egress

func (Keeper) GetKeys

func (k Keeper) GetKeys(ctx sdk.Context, path string) types.Keys

GetKeys gets all storage child keys at a given path

func (Keeper) GetMailbox

func (k Keeper) GetMailbox(ctx sdk.Context, peer string) types.Storage

GetMailbox gets the entire mailbox struct for a peer

func (Keeper) GetNextSequenceSend

func (k Keeper) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)

GetNextSequenceSend defines a wrapper function for the channel Keeper's function in order to expose it to the SwingSet IBC handler.

func (Keeper) GetPeersIterator

func (k Keeper) GetPeersIterator(ctx sdk.Context) sdk.Iterator

GetPeersIterator works over all peers in which the keys are the peers and the values are the mailbox

func (Keeper) GetStorage

func (k Keeper) GetStorage(ctx sdk.Context, path string) types.Storage

GetStorage gets generic storage

func (Keeper) Logger

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

Logger returns a module-specific logger.

func (Keeper) PacketExecuted

func (k Keeper) PacketExecuted(ctx sdk.Context, packet channelexported.PacketI, acknowledgement []byte) error

PacketExecuted defines a wrapper function for the channel Keeper's function in order to expose it to the SwingSet IBC handler.

func (Keeper) SendPacket

func (k Keeper) SendPacket(ctx sdk.Context, packet channelexported.PacketI) error

SendPacket defines a wrapper function for the channel Keeper's function in order to expose it to the SwingSet IBC handler.

func (Keeper) SetEgress

func (k Keeper) SetEgress(ctx sdk.Context, egress types.Egress) error

func (Keeper) SetMailbox

func (k Keeper) SetMailbox(ctx sdk.Context, peer string, mailbox types.Storage)

SetMailbox sets the entire mailbox struct for a peer

func (Keeper) SetStorage

func (k Keeper) SetStorage(ctx sdk.Context, path string, storage types.Storage)

SetStorage sets the entire generic storage for a path

func (Keeper) TimeoutExecuted

func (k Keeper) TimeoutExecuted(ctx sdk.Context, packet channelexported.PacketI) error

TimeoutExecuted defines a wrapper function for the channel Keeper's function in order to expose it to the SwingSet IBC handler.

Jump to

Keyboard shortcuts

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