cosmos-sdk: github.com/cosmos/cosmos-sdk/x/ibc/09-localhost/types Index | Files

package types

import "github.com/cosmos/cosmos-sdk/x/ibc/09-localhost/types"

Index

Package Files

client_state.go codec.go errors.go keys.go localhost.pb.go msgs.go

Constants

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

Message types for the IBC client

Variables

var (
    ErrInvalidLengthLocalhost        = fmt.Errorf("proto: negative length found during unmarshaling")
    ErrIntOverflowLocalhost          = fmt.Errorf("proto: integer overflow")
    ErrUnexpectedEndOfGroupLocalhost = fmt.Errorf("proto: unexpected end of group")
)
var (
    ErrConsensusStatesNotStored = sdkerrors.Register(SubModuleName, 2, "localhost does not store consensus states")
)

Localhost sentinel errors

var (
    // SubModuleCdc references the global x/ibc/09-localhost module codec.
    // The actual codec used for serialization should be provided to x/ibc/09-localhost and
    // defined at the application level.
    SubModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
)

func RegisterCodec Uses

func RegisterCodec(cdc *codec.LegacyAmino)

REMOVE: once simapp uses proto

func RegisterInterfaces Uses

func RegisterInterfaces(registry codectypes.InterfaceRegistry)

RegisterInterfaces register the ibc interfaces submodule implementations to protobuf Any.

type ClientState Uses

type ClientState struct {
    // client id
    ID  string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
    // self chain ID
    ChainID string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" yaml:"chain_id"`
    // self latest block height
    Height uint64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
}

ClientState defines a loopback (localhost) client. It requires (read-only) access to keys outside the client prefix.

func NewClientState Uses

func NewClientState(chainID string, height int64) *ClientState

NewClientState creates a new ClientState instance

func (ClientState) ClientType Uses

func (cs ClientState) ClientType() clientexported.ClientType

ClientType is localhost.

func (*ClientState) Descriptor Uses

func (*ClientState) Descriptor() ([]byte, []int)

func (ClientState) GetChainID Uses

func (cs ClientState) GetChainID() string

GetChainID returns an empty string

func (ClientState) GetFrozenHeight Uses

func (cs ClientState) GetFrozenHeight() uint64

GetFrozenHeight returns 0.

func (ClientState) GetLatestHeight Uses

func (cs ClientState) GetLatestHeight() uint64

GetLatestHeight returns the latest height stored.

func (ClientState) GetProofSpecs Uses

func (cs ClientState) GetProofSpecs() []*ics23.ProofSpec

GetProofSpecs returns nil since localhost does not have to verify proofs

func (ClientState) IsFrozen Uses

func (cs ClientState) IsFrozen() bool

IsFrozen returns false.

func (*ClientState) Marshal Uses

func (m *ClientState) Marshal() (dAtA []byte, err error)

func (*ClientState) MarshalTo Uses

func (m *ClientState) MarshalTo(dAtA []byte) (int, error)

func (*ClientState) MarshalToSizedBuffer Uses

func (m *ClientState) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*ClientState) ProtoMessage Uses

func (*ClientState) ProtoMessage()

func (*ClientState) Reset Uses

func (m *ClientState) Reset()

func (*ClientState) Size Uses

func (m *ClientState) Size() (n int)

func (*ClientState) String Uses

func (m *ClientState) String() string

func (*ClientState) Unmarshal Uses

func (m *ClientState) Unmarshal(dAtA []byte) error

func (ClientState) Validate Uses

func (cs ClientState) Validate() error

Validate performs a basic validation of the client state fields.

func (ClientState) VerifyChannelState Uses

func (cs ClientState) VerifyChannelState(
    store sdk.KVStore,
    cdc codec.BinaryMarshaler,
    _ uint64,
    prefix commitmentexported.Prefix,
    _ []byte,
    portID,
    channelID string,
    channel channelexported.ChannelI,
) 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 Uses

func (cs ClientState) VerifyClientConsensusState(
    sdk.KVStore, codec.BinaryMarshaler, commitmentexported.Root,
    uint64, string, uint64, commitmentexported.Prefix, []byte, clientexported.ConsensusState,
) error

VerifyClientConsensusState returns an error since a local host client does not store consensus states.

func (ClientState) VerifyConnectionState Uses

func (cs ClientState) VerifyConnectionState(
    store sdk.KVStore,
    cdc codec.BinaryMarshaler,
    _ uint64,
    prefix commitmentexported.Prefix,
    _ []byte,
    connectionID string,
    connectionEnd connectionexported.ConnectionI,
) error

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

func (ClientState) VerifyNextSequenceRecv Uses

func (cs ClientState) VerifyNextSequenceRecv(
    store sdk.KVStore,
    _ codec.BinaryMarshaler,
    _ uint64,
    prefix commitmentexported.Prefix,
    _ []byte,
    portID,
    channelID string,
    nextSequenceRecv uint64,
) error

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

func (ClientState) VerifyPacketAcknowledgement Uses

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

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

func (ClientState) VerifyPacketAcknowledgementAbsence Uses

func (cs ClientState) VerifyPacketAcknowledgementAbsence(
    store sdk.KVStore,
    _ codec.BinaryMarshaler,
    _ uint64,
    prefix commitmentexported.Prefix,
    _ []byte,
    portID,
    channelID string,
    sequence uint64,
) 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 Uses

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

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

func (*ClientState) XXX_DiscardUnknown Uses

func (m *ClientState) XXX_DiscardUnknown()

func (*ClientState) XXX_Marshal Uses

func (m *ClientState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ClientState) XXX_Merge Uses

func (m *ClientState) XXX_Merge(src proto.Message)

func (*ClientState) XXX_Size Uses

func (m *ClientState) XXX_Size() int

func (*ClientState) XXX_Unmarshal Uses

func (m *ClientState) XXX_Unmarshal(b []byte) error

type MsgCreateClient Uses

type MsgCreateClient struct {
    Signer github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,1,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

MsgCreateClient defines a message to create a localhost client state

func NewMsgCreateClient Uses

func NewMsgCreateClient(signer sdk.AccAddress) *MsgCreateClient

NewMsgCreateClient creates a new MsgCreateClient instance

func (*MsgCreateClient) Descriptor Uses

func (*MsgCreateClient) Descriptor() ([]byte, []int)

func (MsgCreateClient) GetClientID Uses

func (msg MsgCreateClient) GetClientID() string

GetClientID implements clientexported.MsgCreateClient

func (MsgCreateClient) GetClientType Uses

func (msg MsgCreateClient) GetClientType() string

GetClientType implements clientexported.MsgCreateClient

func (MsgCreateClient) GetConsensusState Uses

func (msg MsgCreateClient) GetConsensusState() clientexported.ConsensusState

GetConsensusState implements clientexported.MsgCreateClient

func (MsgCreateClient) GetSignBytes Uses

func (msg MsgCreateClient) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (MsgCreateClient) GetSigners Uses

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

GetSigners implements sdk.Msg

func (*MsgCreateClient) Marshal Uses

func (m *MsgCreateClient) Marshal() (dAtA []byte, err error)

func (*MsgCreateClient) MarshalTo Uses

func (m *MsgCreateClient) MarshalTo(dAtA []byte) (int, error)

func (*MsgCreateClient) MarshalToSizedBuffer Uses

func (m *MsgCreateClient) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*MsgCreateClient) ProtoMessage Uses

func (*MsgCreateClient) ProtoMessage()

func (*MsgCreateClient) Reset Uses

func (m *MsgCreateClient) Reset()

func (MsgCreateClient) Route Uses

func (msg MsgCreateClient) Route() string

Route implements sdk.Msg

func (*MsgCreateClient) Size Uses

func (m *MsgCreateClient) Size() (n int)

func (*MsgCreateClient) String Uses

func (m *MsgCreateClient) String() string

func (MsgCreateClient) Type Uses

func (msg MsgCreateClient) Type() string

Type implements sdk.Msg

func (*MsgCreateClient) Unmarshal Uses

func (m *MsgCreateClient) Unmarshal(dAtA []byte) error

func (MsgCreateClient) ValidateBasic Uses

func (msg MsgCreateClient) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgCreateClient) XXX_DiscardUnknown Uses

func (m *MsgCreateClient) XXX_DiscardUnknown()

func (*MsgCreateClient) XXX_Marshal Uses

func (m *MsgCreateClient) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*MsgCreateClient) XXX_Merge Uses

func (m *MsgCreateClient) XXX_Merge(src proto.Message)

func (*MsgCreateClient) XXX_Size Uses

func (m *MsgCreateClient) XXX_Size() int

func (*MsgCreateClient) XXX_Unmarshal Uses

func (m *MsgCreateClient) XXX_Unmarshal(b []byte) error

Package types imports 23 packages (graph) and is imported by 6 packages. Updated 2020-08-13. Refresh now. Tools for package owners.