client

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

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

View Source
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

View Source
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

func BeginBlocker(ctx sdk.Context, k keeper.Keeper)

BeginBlocker updates an existing localhost client with the latest block height.

func GetQueryCmd

func GetQueryCmd(cdc *codec.Codec, queryRoute string) *cobra.Command

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

func HandlerClientMisbehaviour(k Keeper) evidence.Handler

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 Name

func Name() string

Name returns the IBC client name

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 Keeper

type Keeper = keeper.Keeper

type StakingKeeper

type StakingKeeper = types.StakingKeeper

Directories

Path Synopsis
client
cli

Jump to

Keyboard shortcuts

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