Documentation ¶
Index ¶
- type Keeper
- func (k Keeper) AuthRelayer(ctx sdk.Context, chainName string, relayer string) bool
- func (q Keeper) ClientState(c context.Context, req *types.QueryClientStateRequest) (*types.QueryClientStateResponse, error)
- func (q Keeper) ClientStates(c context.Context, req *types.QueryClientStatesRequest) (*types.QueryClientStatesResponse, error)
- func (k Keeper) ClientStore(ctx sdk.Context, chainName string) sdk.KVStore
- func (q Keeper) ConsensusState(c context.Context, req *types.QueryConsensusStateRequest) (*types.QueryConsensusStateResponse, error)
- func (q Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStatesRequest) (*types.QueryConsensusStatesResponse, error)
- func (k Keeper) CreateClient(ctx sdk.Context, chainName string, clientState exported.ClientState, ...) error
- func (k Keeper) GetAllClientMetadata(ctx sdk.Context, genClients []types.IdentifiedClientState) ([]types.IdentifiedGenesisMetadata, error)
- func (k Keeper) GetAllClients(ctx sdk.Context) (states []exported.ClientState)
- func (k Keeper) GetAllConsensusStates(ctx sdk.Context) types.ClientsConsensusStates
- func (k Keeper) GetAllGenesisClients(ctx sdk.Context) types.IdentifiedClientStates
- func (k Keeper) GetAllRelayers(ctx sdk.Context) (relayers []types.IdentifiedRelayer)
- func (k Keeper) GetChainName(ctx sdk.Context) string
- func (k Keeper) GetClientConsensusState(ctx sdk.Context, chainName string, height exported.Height) (exported.ConsensusState, bool)
- func (k Keeper) GetClientState(ctx sdk.Context, chainName string) (exported.ClientState, bool)
- func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, chainName string) (exported.ConsensusState, bool)
- func (k Keeper) GetRelayer(ctx sdk.Context, address string) (types.IdentifiedRelayer, bool)
- func (k Keeper) GetRelayerAddressOnOtherChain(ctx sdk.Context, chainName string, address string) (string, bool)
- func (k Keeper) GetRelayerAddressOnTeleport(ctx sdk.Context, chainName string, address string) (string, bool)
- func (k Keeper) HandleCreateClient(ctx sdk.Context, p *types.CreateClientProposal) (exported.ClientState, error)
- func (k Keeper) HandleRegisterRelayer(ctx sdk.Context, p *types.RegisterRelayerProposal) error
- func (k Keeper) HandleToggleClient(ctx sdk.Context, p *types.ToggleClientProposal) (exported.ClientState, error)
- func (k Keeper) HandleUpgradeClient(ctx sdk.Context, p *types.UpgradeClientProposal) (exported.ClientState, error)
- func (k Keeper) HasClientConsensusState(ctx sdk.Context, chainName string, height exported.Height) bool
- func (k Keeper) IterateClients(ctx sdk.Context, cb func(chainName string, cs exported.ClientState) bool)
- func (k Keeper) IterateConsensusStates(ctx sdk.Context, ...)
- func (k Keeper) Logger(ctx sdk.Context) log.Logger
- func (k Keeper) MustMarshalClientState(clientState exported.ClientState) []byte
- func (k Keeper) MustMarshalConsensusState(consensusState exported.ConsensusState) []byte
- func (k Keeper) MustUnmarshalClientState(bz []byte) exported.ClientState
- func (k Keeper) MustUnmarshalConsensusState(bz []byte) exported.ConsensusState
- func (k Keeper) RegisterRelayers(ctx sdk.Context, address string, chains []string, addresses []string)
- func (k Keeper) RelayerStore(ctx sdk.Context) sdk.KVStore
- func (q Keeper) Relayers(c context.Context, req *types.QueryRelayersRequest) (*types.QueryRelayersResponse, error)
- func (k Keeper) SetAllClientMetadata(ctx sdk.Context, genMetadata []types.IdentifiedGenesisMetadata)
- func (k Keeper) SetChainName(ctx sdk.Context, chainName string)
- func (k Keeper) SetClientConsensusState(ctx sdk.Context, chainName string, height exported.Height, ...)
- func (k Keeper) SetClientState(ctx sdk.Context, chainName string, clientState exported.ClientState)
- func (k Keeper) ToggleClient(ctx sdk.Context, chainName string, newClientState exported.ClientState, ...) error
- func (k Keeper) UnmarshalClientState(bz []byte) (exported.ClientState, error)
- func (k Keeper) UnmarshalConsensusState(bz []byte) (exported.ConsensusState, error)
- func (k Keeper) UpdateClient(ctx sdk.Context, chainName string, header exported.Header) error
- func (k Keeper) UpgradeClient(ctx sdk.Context, chainName string, newClientState exported.ClientState, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Keeper ¶
type Keeper struct {
// contains filtered or unexported fields
}
Keeper represents a type that grants read and write permissions to any client state information
func NewKeeper ¶
func NewKeeper(cdc codec.BinaryCodec, key sdk.StoreKey, paramSpace paramtypes.Subspace, sk types.StakingKeeper) Keeper
NewKeeper creates a new NewKeeper instance
func (Keeper) AuthRelayer ¶
AuthRelayer asserts whether a relayer is already registered
func (Keeper) ClientState ¶
func (q Keeper) ClientState(c context.Context, req *types.QueryClientStateRequest) (*types.QueryClientStateResponse, error)
ClientState implements the Query/ClientState gRPC method
func (Keeper) ClientStates ¶
func (q Keeper) ClientStates(c context.Context, req *types.QueryClientStatesRequest) (*types.QueryClientStatesResponse, error)
ClientStates implements the Query/ClientStates gRPC method TODO: should use pagination when fixed by ibc-go
func (Keeper) ClientStore ¶
ClientStore returns isolated prefix store for each client so they can read/write in separate namespace without being able to read/write other client's data
func (Keeper) ConsensusState ¶
func (q Keeper) ConsensusState(c context.Context, req *types.QueryConsensusStateRequest) (*types.QueryConsensusStateResponse, error)
ConsensusState implements the Query/ConsensusState gRPC method
func (Keeper) ConsensusStates ¶
func (q Keeper) ConsensusStates(c context.Context, req *types.QueryConsensusStatesRequest) (*types.QueryConsensusStatesResponse, error)
ConsensusStates implements the Query/ConsensusStates gRPC method
func (Keeper) CreateClient ¶
func (k Keeper) CreateClient( ctx sdk.Context, chainName string, clientState exported.ClientState, consensusState exported.ConsensusState, ) error
CreateClient creates a new client state and populates it with a given client state and consensus state
func (Keeper) GetAllClientMetadata ¶
func (k Keeper) GetAllClientMetadata(ctx sdk.Context, genClients []types.IdentifiedClientState) ([]types.IdentifiedGenesisMetadata, error)
GetAllClientMetadata will take a list of IdentifiedClientState and return a list of IdentifiedGenesisMetadata necessary for exporting and importing client metadata into the client store.
func (Keeper) GetAllClients ¶
func (k Keeper) GetAllClients(ctx sdk.Context) (states []exported.ClientState)
GetAllClients returns all stored light client State objects.
func (Keeper) GetAllConsensusStates ¶
func (k Keeper) GetAllConsensusStates(ctx sdk.Context) types.ClientsConsensusStates
GetAllConsensusStates returns all stored client consensus states.
func (Keeper) GetAllGenesisClients ¶
func (k Keeper) GetAllGenesisClients(ctx sdk.Context) types.IdentifiedClientStates
GetAllGenesisClients returns all the clients in state with their client ids returned as IdentifiedClientState
func (Keeper) GetAllRelayers ¶
func (k Keeper) GetAllRelayers(ctx sdk.Context) (relayers []types.IdentifiedRelayer)
GetAllRelayers returns all registered relayer addresses
func (Keeper) GetChainName ¶
GetChainName return the chain name of the current chain
func (Keeper) GetClientConsensusState ¶
func (k Keeper) GetClientConsensusState(ctx sdk.Context, chainName string, height exported.Height) (exported.ConsensusState, bool)
GetClientConsensusState gets the stored consensus state from a client at a given height.
func (Keeper) GetClientState ¶
GetClientState gets a particular client from the store
func (Keeper) GetLatestClientConsensusState ¶
func (k Keeper) GetLatestClientConsensusState(ctx sdk.Context, chainName string) (exported.ConsensusState, bool)
GetLatestClientConsensusState gets the latest ConsensusState stored for a given client
func (Keeper) GetRelayer ¶
func (Keeper) GetRelayerAddressOnOtherChain ¶
func (Keeper) GetRelayerAddressOnTeleport ¶
func (Keeper) HandleCreateClient ¶
func (k Keeper) HandleCreateClient(ctx sdk.Context, p *types.CreateClientProposal) (exported.ClientState, error)
func (Keeper) HandleRegisterRelayer ¶
func (Keeper) HandleToggleClient ¶
func (k Keeper) HandleToggleClient(ctx sdk.Context, p *types.ToggleClientProposal) (exported.ClientState, error)
func (Keeper) HandleUpgradeClient ¶
func (k Keeper) HandleUpgradeClient(ctx sdk.Context, p *types.UpgradeClientProposal) (exported.ClientState, error)
func (Keeper) HasClientConsensusState ¶
func (k Keeper) HasClientConsensusState(ctx sdk.Context, chainName string, height exported.Height) bool
HasClientConsensusState returns if keeper has a ConsensusState for a particular client at the given height
func (Keeper) IterateClients ¶
func (k Keeper) IterateClients( ctx sdk.Context, cb func(chainName string, cs exported.ClientState) bool, )
IterateClients provides an iterator over all stored light client State objects. For each State object, cb will be called. If the cb returns true, the iterator will close and stop.
func (Keeper) IterateConsensusStates ¶
func (k Keeper) IterateConsensusStates( ctx sdk.Context, cb func(chainName string, cs types.ConsensusStateWithHeight) bool, )
IterateConsensusStates provides an iterator over all stored consensus states. objects. For each State object, cb will be called. If the cb returns true, the iterator will close and stop.
func (Keeper) MustMarshalClientState ¶
func (k Keeper) MustMarshalClientState(clientState exported.ClientState) []byte
MustMarshalClientState attempts to encode an ClientState object and returns the raw encoded bytes. It panics on error.
func (Keeper) MustMarshalConsensusState ¶
func (k Keeper) MustMarshalConsensusState(consensusState exported.ConsensusState) []byte
MustMarshalConsensusState attempts to encode an ConsensusState object and returns the raw encoded bytes. It panics on error.
func (Keeper) MustUnmarshalClientState ¶
func (k Keeper) MustUnmarshalClientState(bz []byte) exported.ClientState
MustUnmarshalClientState attempts to decode and return an ClientState object from raw encoded bytes. It panics on error.
func (Keeper) MustUnmarshalConsensusState ¶
func (k Keeper) MustUnmarshalConsensusState(bz []byte) exported.ConsensusState
MustUnmarshalConsensusState attempts to decode and return an ConsensusState object from raw encoded bytes. It panics on error.
func (Keeper) RegisterRelayers ¶
func (k Keeper) RegisterRelayers( ctx sdk.Context, address string, chains []string, addresses []string, )
RegisterRelayers saves the relayers under the specified chainname
func (Keeper) RelayerStore ¶
RelayerStore returns isolated prefix store for each client so they can read/write in separate namespace without being able to read/write other relayer's data
func (Keeper) Relayers ¶
func (q Keeper) Relayers(c context.Context, req *types.QueryRelayersRequest) (*types.QueryRelayersResponse, error)
Relayers implements the Query/Relayers gRPC method
func (Keeper) SetAllClientMetadata ¶
func (k Keeper) SetAllClientMetadata(ctx sdk.Context, genMetadata []types.IdentifiedGenesisMetadata)
SetAllClientMetadata takes a list of IdentifiedGenesisMetadata and stores all of the metadata in the client store at the appropriate paths.
func (Keeper) SetChainName ¶
SetChainName sets a chain name to the xibc module
func (Keeper) SetClientConsensusState ¶
func (k Keeper) SetClientConsensusState(ctx sdk.Context, chainName string, height exported.Height, consensusState exported.ConsensusState)
SetClientConsensusState sets a ConsensusState to a particular client at the given height
func (Keeper) SetClientState ¶
SetClientState sets a particular Client to the store
func (Keeper) ToggleClient ¶
func (k Keeper) ToggleClient( ctx sdk.Context, chainName string, newClientState exported.ClientState, newConsensusState exported.ConsensusState, ) error
ToggleClient creates a new client with different type
func (Keeper) UnmarshalClientState ¶
func (k Keeper) UnmarshalClientState(bz []byte) (exported.ClientState, error)
UnmarshalClientState attempts to decode and return an ClientState object from raw encoded bytes.
func (Keeper) UnmarshalConsensusState ¶
func (k Keeper) UnmarshalConsensusState(bz []byte) (exported.ConsensusState, error)
UnmarshalConsensusState attempts to decode and return an ConsensusState object from raw encoded bytes.
func (Keeper) UpdateClient ¶
UpdateClient updates the consensus state and the state root from a provided header.
func (Keeper) UpgradeClient ¶
func (k Keeper) UpgradeClient( ctx sdk.Context, chainName string, newClientState exported.ClientState, newConsensusState exported.ConsensusState, ) error
UpgradeClient upgrades the client to a new client state.