types

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SubModuleName for the localhost (loopback) client
	SubModuleName = "localhost"
)
View Source
const (
	TypeMsgCreateClient string = "create_client"
)

Message types for the IBC client

Variables

View Source
var SubModuleCdc *codec.Codec

SubModuleCdc defines the IBC localhost client codec.

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers the localhost types

func SetSubModuleCodec

func SetSubModuleCodec(cdc *codec.Codec)

SetSubModuleCodec sets the ibc localhost client codec

Types

type ClientState

type ClientState struct {
	ID      string `json:"id" yaml:"id"`
	ChainID string `json:"chain_id" yaml:"chain_id"`
	Height  int64  `json:"height" yaml:"height"`
}

ClientState requires (read-only) access to keys outside the client prefix.

func NewClientState

func NewClientState(chainID string, height int64) ClientState

NewClientState creates a new ClientState instance

func (ClientState) ClientType

func (cs ClientState) ClientType() clientexported.ClientType

ClientType is localhost.

func (ClientState) GetChainID

func (cs ClientState) GetChainID() string

GetChainID returns an empty string

func (ClientState) GetID

func (cs ClientState) GetID() string

GetID returns the loop-back client state identifier.

func (ClientState) GetLatestHeight

func (cs ClientState) GetLatestHeight() uint64

GetLatestHeight returns the latest height stored.

func (ClientState) IsFrozen

func (cs ClientState) IsFrozen() bool

IsFrozen returns false.

func (ClientState) Validate

func (cs ClientState) Validate() error

Validate performs a basic validation of the client state fields.

func (ClientState) VerifyChannelState

func (cs ClientState) VerifyChannelState(
	store sdk.KVStore,
	cdc codec.Marshaler,
	_ uint64,
	prefix commitmentexported.Prefix,
	_ commitmentexported.Proof,
	portID,
	channelID string,
	channel channelexported.ChannelI,
	_ clientexported.ConsensusState,
) error

VerifyChannelState verifies a proof of the channel state of the specified channel end, under the specified port, stored on the local machine.

func (ClientState) VerifyClientConsensusState

func (cs ClientState) VerifyClientConsensusState(
	store sdk.KVStore,
	cdc *codec.Codec,
	_ commitmentexported.Root,
	height uint64,
	_ string,
	consensusHeight uint64,
	prefix commitmentexported.Prefix,
	_ commitmentexported.Proof,
	consensusState clientexported.ConsensusState,
) error

VerifyClientConsensusState verifies a proof of the consensus state of the loop-back client. VerifyClientConsensusState verifies a proof of the consensus state of the Tendermint client stored on the target machine.

func (ClientState) VerifyConnectionState

func (cs ClientState) VerifyConnectionState(
	store sdk.KVStore,
	cdc codec.Marshaler,
	_ uint64,
	prefix commitmentexported.Prefix,
	_ commitmentexported.Proof,
	connectionID string,
	connectionEnd connectionexported.ConnectionI,
	_ clientexported.ConsensusState,
) error

VerifyConnectionState verifies a proof of the connection state of the specified connection end stored locally.

func (ClientState) VerifyNextSequenceRecv

func (cs ClientState) VerifyNextSequenceRecv(
	store sdk.KVStore,
	_ uint64,
	prefix commitmentexported.Prefix,
	_ commitmentexported.Proof,
	portID,
	channelID string,
	nextSequenceRecv uint64,
	_ clientexported.ConsensusState,
) error

VerifyNextSequenceRecv verifies a proof of the next sequence number to be received of the specified channel at the specified port.

func (ClientState) VerifyPacketAcknowledgement

func (cs ClientState) VerifyPacketAcknowledgement(
	store sdk.KVStore,
	_ uint64,
	prefix commitmentexported.Prefix,
	_ commitmentexported.Proof,
	portID,
	channelID string,
	sequence uint64,
	acknowledgement []byte,
	_ clientexported.ConsensusState,
) error

VerifyPacketAcknowledgement verifies a proof of an incoming packet acknowledgement at the specified port, specified channel, and specified sequence.

func (ClientState) VerifyPacketAcknowledgementAbsence

func (cs ClientState) VerifyPacketAcknowledgementAbsence(
	store sdk.KVStore,
	_ uint64,
	prefix commitmentexported.Prefix,
	_ commitmentexported.Proof,
	portID,
	channelID string,
	sequence uint64,
	_ clientexported.ConsensusState,
) error

VerifyPacketAcknowledgementAbsence verifies a proof of the absence of an incoming packet acknowledgement at the specified port, specified channel, and specified sequence.

func (ClientState) VerifyPacketCommitment

func (cs ClientState) VerifyPacketCommitment(
	store sdk.KVStore,
	_ uint64,
	prefix commitmentexported.Prefix,
	_ commitmentexported.Proof,
	portID,
	channelID string,
	sequence uint64,
	commitmentBytes []byte,
	_ clientexported.ConsensusState,
) error

VerifyPacketCommitment verifies a proof of an outgoing packet commitment at the specified port, specified channel, and specified sequence.

type MsgCreateClient

type MsgCreateClient struct {
	Signer sdk.AccAddress `json:"address" yaml:"address"`
}

MsgCreateClient defines a message to create an IBC client

func NewMsgCreateClient

func NewMsgCreateClient(signer sdk.AccAddress) MsgCreateClient

NewMsgCreateClient creates a new MsgCreateClient instance

func (MsgCreateClient) GetClientID

func (msg MsgCreateClient) GetClientID() string

GetClientID implements clientexported.MsgCreateClient

func (MsgCreateClient) GetClientType

func (msg MsgCreateClient) GetClientType() string

GetClientType implements clientexported.MsgCreateClient

func (MsgCreateClient) GetConsensusState

func (msg MsgCreateClient) GetConsensusState() clientexported.ConsensusState

GetConsensusState implements clientexported.MsgCreateClient

func (MsgCreateClient) GetSignBytes

func (msg MsgCreateClient) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (MsgCreateClient) GetSigners

func (msg MsgCreateClient) GetSigners() []sdk.AccAddress

GetSigners implements sdk.Msg

func (MsgCreateClient) Route

func (msg MsgCreateClient) Route() string

Route implements sdk.Msg

func (MsgCreateClient) Type

func (msg MsgCreateClient) Type() string

Type implements sdk.Msg

func (MsgCreateClient) ValidateBasic

func (msg MsgCreateClient) ValidateBasic() error

ValidateBasic implements sdk.Msg

Jump to

Keyboard shortcuts

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