Documentation
¶
Index ¶
- func ExportGenesis(ctx sdk.Context, keeper Keeper) icatypes.HostGenesisState
- func InitGenesis(ctx sdk.Context, keeper Keeper, state icatypes.HostGenesisState)
- type Keeper
- func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
- func (k Keeper) AuthenticateTx(ctx sdk.Context, msgs []sdk.Msg, portID string) error
- func (k Keeper) BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
- func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
- func (k Keeper) DeleteActiveChannelID(ctx sdk.Context, portID string)
- func (k Keeper) GetActiveChannelID(ctx sdk.Context, portID string) (string, bool)
- func (k Keeper) GetAllActiveChannels(ctx sdk.Context) []icatypes.ActiveChannel
- func (k Keeper) GetAllInterchainAccounts(ctx sdk.Context) []icatypes.RegisteredInterchainAccount
- func (k Keeper) GetAllowMessages(ctx sdk.Context) []string
- func (k Keeper) GetInterchainAccountAddress(ctx sdk.Context, portID string) (string, bool)
- func (k Keeper) GetParams(ctx sdk.Context) types.Params
- func (k Keeper) IsActiveChannel(ctx sdk.Context, portID string) bool
- func (k Keeper) IsBound(ctx sdk.Context, portID string) bool
- func (k Keeper) IsHostEnabled(ctx sdk.Context) bool
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) NegotiateAppVersion(ctx sdk.Context, order channeltypes.Order, connectionID string, portID string, ...) (string, error)
- func (k Keeper) OnChanCloseConfirm(ctx sdk.Context, portID, channelID string) error
- func (k Keeper) OnChanOpenConfirm(ctx sdk.Context, portID, channelID string) error
- func (k Keeper) OnChanOpenTry(ctx sdk.Context, order channeltypes.Order, connectionHops []string, ...) error
- func (k Keeper) OnRecvPacket(ctx sdk.Context, packet channeltypes.Packet) error
- func (q Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
- func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, accAddr sdk.AccAddress, controllerPortID string)
- func (k Keeper) SetActiveChannelID(ctx sdk.Context, portID, channelID string)
- func (k Keeper) SetInterchainAccountAddress(ctx sdk.Context, portID string, address string)
- func (k Keeper) SetParams(ctx sdk.Context, params types.Params)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, keeper Keeper) icatypes.HostGenesisState
ExportGenesis returns the interchain accounts host exported genesis
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, keeper Keeper, state icatypes.HostGenesisState)
InitGenesis initializes the interchain accounts host application state from a provided genesis state
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper defines the IBC interchain accounts host keeper
func NewKeeper ¶
func NewKeeper( cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, channelKeeper icatypes.ChannelKeeper, portKeeper icatypes.PortKeeper, accountKeeper icatypes.AccountKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, msgRouter *baseapp.MsgServiceRouter, ) Keeper
NewKeeper creates a new interchain accounts host Keeper instance
func (Keeper) AuthenticateCapability ¶
func (k Keeper) AuthenticateCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) bool
AuthenticateCapability wraps the scopedKeeper's AuthenticateCapability function
func (Keeper) AuthenticateTx ¶
AuthenticateTx ensures the provided msgs contain the correct interchain account signer address retrieved from state using the provided controller port identifier
func (Keeper) BindPort ¶
func (k Keeper) BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
BindPort stores the provided portID and binds to it, returning the associated capability
func (Keeper) ClaimCapability ¶
func (k Keeper) ClaimCapability(ctx sdk.Context, cap *capabilitytypes.Capability, name string) error
ClaimCapability wraps the scopedKeeper's ClaimCapability function
func (Keeper) DeleteActiveChannelID ¶
DeleteActiveChannelID removes the active channel keyed by the provided portID stored in state
func (Keeper) GetActiveChannelID ¶
GetActiveChannelID retrieves the active channelID from the store keyed by the provided portID
func (Keeper) GetAllActiveChannels ¶
func (k Keeper) GetAllActiveChannels(ctx sdk.Context) []icatypes.ActiveChannel
GetAllActiveChannels returns a list of all active interchain accounts host channels and their associated port identifiers
func (Keeper) GetAllInterchainAccounts ¶
func (k Keeper) GetAllInterchainAccounts(ctx sdk.Context) []icatypes.RegisteredInterchainAccount
GetAllInterchainAccounts returns a list of all registered interchain account addresses and their associated controller port identifiers
func (Keeper) GetAllowMessages ¶
GetAllowMessages retrieves the host enabled msg types from the paramstore
func (Keeper) GetInterchainAccountAddress ¶
GetInterchainAccountAddress retrieves the InterchainAccount address from the store keyed by the provided portID
func (Keeper) IsActiveChannel ¶
IsActiveChannel returns true if there exists an active channel for the provided portID, otherwise false
func (Keeper) IsBound ¶
IsBound checks if the interchain account host module is already bound to the desired port
func (Keeper) IsHostEnabled ¶
IsHostEnabled retrieves the host enabled boolean from the paramstore. True is returned if the host submodule is enabled.
func (Keeper) NegotiateAppVersion ¶
func (k Keeper) NegotiateAppVersion( ctx sdk.Context, order channeltypes.Order, connectionID string, portID string, counterparty channeltypes.Counterparty, proposedVersion string, ) (string, error)
NegotiateAppVersion handles application version negotation for the IBC interchain accounts module
func (Keeper) OnChanCloseConfirm ¶
OnChanCloseConfirm removes the active channel stored in state
func (Keeper) OnChanOpenConfirm ¶
OnChanOpenConfirm completes the handshake process by setting the active channel in state on the host chain
func (Keeper) OnChanOpenTry ¶
func (k Keeper) OnChanOpenTry( ctx sdk.Context, order channeltypes.Order, connectionHops []string, portID, channelID string, chanCap *capabilitytypes.Capability, counterparty channeltypes.Counterparty, version, counterpartyVersion string, ) error
OnChanOpenTry performs basic validation of the ICA channel and registers a new interchain account (if it doesn't exist).
func (Keeper) OnRecvPacket ¶
OnRecvPacket handles a given interchain accounts packet on a destination host chain
func (Keeper) Params ¶
func (q Keeper) Params(c context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error)
Params implements the Query/Params gRPC method
func (Keeper) RegisterInterchainAccount ¶
func (k Keeper) RegisterInterchainAccount(ctx sdk.Context, accAddr sdk.AccAddress, controllerPortID string)
RegisterInterchainAccount attempts to create a new account using the provided address and stores it in state keyed by the provided port identifier If an account for the provided address already exists this function returns early (no-op)
func (Keeper) SetActiveChannelID ¶
SetActiveChannelID stores the active channelID, keyed by the provided portID
func (Keeper) SetInterchainAccountAddress ¶
SetInterchainAccountAddress stores the InterchainAccount address, keyed by the associated portID