cosmos-sdk: github.com/cosmos/cosmos-sdk/x/ibc/02-client/exported Index | Files

package exported

import "github.com/cosmos/cosmos-sdk/x/ibc/02-client/exported"

Index

Package Files

exported.go

Constants

const (
    ClientTypeTendermint string = "tendermint"
    ClientTypeLocalHost  string = "localhost"
)

string representation of the client types

type ClientState Uses

type ClientState interface {
    GetChainID() string
    ClientType() ClientType
    GetLatestHeight() uint64
    IsFrozen() bool
    GetFrozenHeight() uint64
    Validate() error
    GetProofSpecs() []*ics23.ProofSpec

    VerifyClientConsensusState(
        store sdk.KVStore,
        cdc codec.BinaryMarshaler,
        root commitmentexported.Root,
        height uint64,
        counterpartyClientIdentifier string,
        consensusHeight uint64,
        prefix commitmentexported.Prefix,
        proof []byte,
        consensusState ConsensusState,
    ) error
    VerifyConnectionState(
        store sdk.KVStore,
        cdc codec.BinaryMarshaler,
        height uint64,
        prefix commitmentexported.Prefix,
        proof []byte,
        connectionID string,
        connectionEnd connectionexported.ConnectionI,
    ) error
    VerifyChannelState(
        store sdk.KVStore,
        cdc codec.BinaryMarshaler,
        height uint64,
        prefix commitmentexported.Prefix,
        proof []byte,
        portID,
        channelID string,
        channel channelexported.ChannelI,
    ) error
    VerifyPacketCommitment(
        store sdk.KVStore,
        cdc codec.BinaryMarshaler,
        height uint64,
        prefix commitmentexported.Prefix,
        proof []byte,
        portID,
        channelID string,
        sequence uint64,
        commitmentBytes []byte,
    ) error
    VerifyPacketAcknowledgement(
        store sdk.KVStore,
        cdc codec.BinaryMarshaler,
        height uint64,
        prefix commitmentexported.Prefix,
        proof []byte,
        portID,
        channelID string,
        sequence uint64,
        acknowledgement []byte,
    ) error
    VerifyPacketAcknowledgementAbsence(
        store sdk.KVStore,
        cdc codec.BinaryMarshaler,
        height uint64,
        prefix commitmentexported.Prefix,
        proof []byte,
        portID,
        channelID string,
        sequence uint64,
    ) error
    VerifyNextSequenceRecv(
        store sdk.KVStore,
        cdc codec.BinaryMarshaler,
        height uint64,
        prefix commitmentexported.Prefix,
        proof []byte,
        portID,
        channelID string,
        nextSequenceRecv uint64,
    ) error
}

ClientState defines the required common functions for light clients.

type ClientType Uses

type ClientType byte

ClientType defines the type of the consensus algorithm

const (
    Tendermint ClientType = iota + 1 // 1
    Localhost
)

available client types

func ClientTypeFromString Uses

func ClientTypeFromString(clientType string) ClientType

ClientTypeFromString returns a byte that corresponds to the registered client type. It returns 0 if the type is not found/registered.

func (ClientType) MarshalJSON Uses

func (ct ClientType) MarshalJSON() ([]byte, error)

MarshalJSON marshal to JSON using string.

func (ClientType) String Uses

func (ct ClientType) String() string

func (*ClientType) UnmarshalJSON Uses

func (ct *ClientType) UnmarshalJSON(data []byte) error

UnmarshalJSON decodes from JSON.

type ConsensusState Uses

type ConsensusState interface {
    ClientType() ClientType // Consensus kind

    // GetHeight returns the height of the consensus state
    GetHeight() uint64

    // GetRoot returns the commitment root of the consensus state,
    // which is used for key-value pair verification.
    GetRoot() commitmentexported.Root

    // GetTimestamp returns the timestamp (in nanoseconds) of the consensus state
    GetTimestamp() uint64

    ValidateBasic() error
}

ConsensusState is the state of the consensus process

type Header interface {
    ClientType() ClientType
    GetHeight() uint64
}

Header is the consensus state update information

type Misbehaviour Uses

type Misbehaviour interface {
    evidenceexported.Evidence
    ClientType() ClientType
    GetClientID() string
}

Misbehaviour defines a specific consensus kind and an evidence

type MsgCreateClient Uses

type MsgCreateClient interface {
    sdk.Msg
    GetClientID() string
    GetClientType() string
    GetConsensusState() ConsensusState
}

MsgCreateClient defines the msg interface that the CreateClient Handler expects

type MsgUpdateClient Uses

type MsgUpdateClient interface {
    sdk.Msg
    GetClientID() string
    GetHeader() Header
}

MsgUpdateClient defines the msg interface that the UpdateClient Handler expects

Package exported imports 9 packages (graph) and is imported by 15 packages. Updated 2020-08-12. Refresh now. Tools for package owners.