Documentation ¶
Overview ¶
Package client implements the ICS 02 - Client Semantics specification https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics. This concrete implementations defines types and method to store and update light clients which tracks on other chain's state.
The main type is `Client`, which provides `commitment.Root` to verify state proofs and `ConsensusState` to verify header proofs.
Index ¶
- Constants
- Variables
- func BeginBlocker(ctx sdk.Context, k keeper.Keeper)
- func GetQueryCmd(cdc *codec.Codec, queryRoute string) *cobra.Command
- func HandleMsgCreateClient(ctx sdk.Context, k Keeper, msg exported.MsgCreateClient) (*sdk.Result, error)
- func HandleMsgUpdateClient(ctx sdk.Context, k Keeper, msg exported.MsgUpdateClient) (*sdk.Result, error)
- func HandlerClientMisbehaviour(k Keeper) evidence.Handler
- func InitGenesis(ctx sdk.Context, k Keeper, gs GenesisState)
- func Name() string
- func RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router, queryRoute string)
- type ConsensusStates
- type GenesisState
- type Keeper
- type StakingKeeper
Constants ¶
const ( AttributeKeyClientID = types.AttributeKeyClientID AttrbuteKeyClientType = types.AttributeKeyClientType SubModuleName = types.SubModuleName RouterKey = types.RouterKey QuerierRoute = types.QuerierRoute QueryAllClients = types.QueryAllClients QueryClientState = types.QueryClientState QueryConsensusState = types.QueryConsensusState )
Variables ¶
var ( // functions aliases NewKeeper = keeper.NewKeeper QuerierClients = keeper.QuerierClients RegisterCodec = types.RegisterCodec ErrClientExists = types.ErrClientExists ErrClientNotFound = types.ErrClientNotFound ErrClientFrozen = types.ErrClientFrozen ErrConsensusStateNotFound = types.ErrConsensusStateNotFound ErrInvalidConsensus = types.ErrInvalidConsensus ErrClientTypeNotFound = types.ErrClientTypeNotFound ErrInvalidClientType = types.ErrInvalidClientType ErrRootNotFound = types.ErrRootNotFound ErrInvalidHeader = types.ErrInvalidHeader ErrInvalidEvidence = types.ErrInvalidEvidence DefaultGenesisState = types.DefaultGenesisState NewGenesisState = types.NewGenesisState NewClientConsensusStates = types.NewClientConsensusStates // variable aliases SubModuleCdc = types.SubModuleCdc EventTypeCreateClient = types.EventTypeCreateClient EventTypeUpdateClient = types.EventTypeUpdateClient AttributeValueCategory = types.AttributeValueCategory )
Functions ¶
func BeginBlocker ¶
BeginBlocker updates an existing localhost client with the latest block height.
func GetQueryCmd ¶
GetQueryCmd returns no root query command for the IBC client
func HandleMsgCreateClient ¶
func HandleMsgCreateClient(ctx sdk.Context, k Keeper, msg exported.MsgCreateClient) (*sdk.Result, error)
HandleMsgCreateClient defines the sdk.Handler for MsgCreateClient
func HandleMsgUpdateClient ¶
func HandleMsgUpdateClient(ctx sdk.Context, k Keeper, msg exported.MsgUpdateClient) (*sdk.Result, error)
HandleMsgUpdateClient defines the sdk.Handler for MsgUpdateClient
func HandlerClientMisbehaviour ¶
HandlerClientMisbehaviour defines the Evidence module handler for submitting a light client misbehaviour.
func InitGenesis ¶
func InitGenesis(ctx sdk.Context, k Keeper, gs GenesisState)
InitGenesis initializes the ibc client submodule's state from a provided genesis state.
func RegisterRESTRoutes ¶
func RegisterRESTRoutes(ctx context.CLIContext, rtr *mux.Router, queryRoute string)
RegisterRESTRoutes registers the REST routes for the IBC client
Types ¶
type ConsensusStates ¶
type ConsensusStates = types.ClientConsensusStates
type GenesisState ¶
type GenesisState = types.GenesisState
func ExportGenesis ¶
func ExportGenesis(ctx sdk.Context, k Keeper) GenesisState
ExportGenesis returns the ibc client submodule's exported genesis.
type StakingKeeper ¶
type StakingKeeper = types.StakingKeeper