types

package
v0.0.0-...-7c30539 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2020 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributeKeyConnectionID             = "connection_id"
	AttributeKeyClientID                 = "client_id"
	AttributeKeyCounterpartyClientID     = "counterparty_client_id"
	AttributeKeyCounterpartyConnectionID = "counterparty_connection_id"
)

IBC connection events

View Source
const (
	// SubModuleName defines the IBC connection name
	SubModuleName = "connection"

	// StoreKey is the store key string for IBC connections
	StoreKey = SubModuleName

	// RouterKey is the message route for IBC connections
	RouterKey = SubModuleName

	// QuerierRoute is the querier route for IBC connections
	QuerierRoute = SubModuleName
)

Variables

View Source
var (
	ErrInvalidLengthConnection        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowConnection          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupConnection = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrConnectionExists              = sdkerrors.Register(SubModuleName, 2, "connection already exists")
	ErrConnectionNotFound            = sdkerrors.Register(SubModuleName, 3, "connection not found")
	ErrClientConnectionPathsNotFound = sdkerrors.Register(SubModuleName, 4, "light client connection paths not found")
	ErrConnectionPath                = sdkerrors.Register(SubModuleName, 5, "connection path is not associated to the given light client")
	ErrInvalidConnectionState        = sdkerrors.Register(SubModuleName, 6, "invalid connection state")
	ErrInvalidCounterparty           = sdkerrors.Register(SubModuleName, 7, "invalid counterparty connection")
	ErrInvalidConnection             = sdkerrors.Register(SubModuleName, 8, "invalid connection")
	ErrInvalidVersion                = sdkerrors.Register(SubModuleName, 9, "invalid connection version")
	ErrVersionNegotiationFailed      = sdkerrors.Register(SubModuleName, 10, "connection version negotiation failed")
)

IBC connection sentinel errors

View Source
var (
	EventTypeConnectionOpenInit    = MsgConnectionOpenInit{}.Type()
	EventTypeConnectionOpenTry     = MsgConnectionOpenTry{}.Type()
	EventTypeConnectionOpenAck     = MsgConnectionOpenAck{}.Type()
	EventTypeConnectionOpenConfirm = MsgConnectionOpenConfirm{}.Type()

	AttributeValueCategory = fmt.Sprintf("%s_%s", host.ModuleName, SubModuleName)
)

IBC connection events vars

View Source
var (
	ErrInvalidLengthQuery        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowQuery          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	// DefaultIBCVersion represents the latest supported version of IBC used
	// in connection version negotiation. The current version supports only
	// ORDERED and UNORDERED channels and requires at least one channel type
	// to be agreed upon.
	DefaultIBCVersion = NewVersion(DefaultIBCVersionIdentifier, []string{"ORDER_ORDERED", "ORDER_UNORDERED"})

	// DefaultIBCVersionIdentifier is the IBC v1.0.0 protocol version identifier
	DefaultIBCVersionIdentifier = "1"
)
View Source
var State_name = map[int32]string{
	0: "STATE_UNINITIALIZED_UNSPECIFIED",
	1: "STATE_INIT",
	2: "STATE_TRYOPEN",
	3: "STATE_OPEN",
}
View Source
var State_value = map[string]int32{
	"STATE_UNINITIALIZED_UNSPECIFIED": 0,
	"STATE_INIT":                      1,
	"STATE_TRYOPEN":                   2,
	"STATE_OPEN":                      3,
}
View Source
var (

	// SubModuleCdc references the global x/ibc/03-connectionl module codec. Note, the codec should
	// ONLY be used in certain instances of tests and for JSON encoding as Amino is
	// still used for that purpose.
	//
	// The actual codec used for serialization should be provided to x/ibc/03-connectionl and
	// defined at the application level.
	SubModuleCdc = codec.NewHybridCodec(amino, cdctypes.NewInterfaceRegistry())
)

Functions

func EncodeVersions

func EncodeVersions(versions []Version) ([]string, error)

EncodeVersions iterates over the provided versions and marshals each into proto encoded strings. This represents the stored value of the version in the connection end as well as the value passed over the wire.

func GetCompatibleEncodedVersions

func GetCompatibleEncodedVersions() []string

GetCompatibleEncodedVersions returns the return value from GetCompatibleVersions as a proto encoded string.

func GetFeatureSetIntersection

func GetFeatureSetIntersection(sourceFeatureSet, counterpartyFeatureSet []string) (featureSet []string)

GetFeatureSetIntersection returns the intersections of source feature set and the counterparty feature set. This is done by iterating over all the features in the source version and seeing if they exist in the feature set for the counterparty version.

func PickVersion

func PickVersion(encodedCounterpartyVersions []string) (string, error)

PickVersion iterates over the descending ordered set of compatible IBC versions and selects the first version with a version identifier that is supported by the counterparty. The returned version contains a feature set with the intersection of the features supported by the source and counterparty chains. If the feature set intersection is nil and this is not allowed for the chosen version identifier then the search for a compatible version continues. This function is called in the ConnOpenTry handshake procedure.

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers the necessary x/ibc/03-connection interfaces and concrete types on the provided Amino codec. These types are used for Amino JSON serialization.

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces register the ibc interfaces submodule implementations to protobuf Any.

func RegisterQueryServer

func RegisterQueryServer(s grpc1.Server, srv QueryServer)

func ValidateVersion

func ValidateVersion(encodedVersion string) error

ValidateVersion does basic validation of the version identifier and features. It unmarshals the version string into a Version object.

func VerifySupportedFeature

func VerifySupportedFeature(encodedVersion, feature string) bool

VerifySupportedFeature takes in a version and feature string and returns true if the feature is supported by the version and false otherwise.

Types

type ClientKeeper

type ClientKeeper interface {
	GetClientState(ctx sdk.Context, clientID string) (clientexported.ClientState, bool)
	GetClientConsensusState(ctx sdk.Context, clientID string, height uint64) (clientexported.ConsensusState, bool)
	GetSelfConsensusState(ctx sdk.Context, height uint64) (clientexported.ConsensusState, bool)
	IterateClients(ctx sdk.Context, cb func(clientexported.ClientState) bool)
	ClientStore(ctx sdk.Context, clientID string) sdk.KVStore
}

ClientKeeper expected account IBC client keeper

type ClientPaths

type ClientPaths struct {
	// list of connection paths
	Paths []string `protobuf:"bytes,1,rep,name=paths,proto3" json:"paths,omitempty"`
}

ClientPaths define all the connection paths for a client state.

func (*ClientPaths) Descriptor

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

func (*ClientPaths) GetPaths

func (m *ClientPaths) GetPaths() []string

func (*ClientPaths) Marshal

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

func (*ClientPaths) MarshalTo

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

func (*ClientPaths) MarshalToSizedBuffer

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

func (*ClientPaths) ProtoMessage

func (*ClientPaths) ProtoMessage()

func (*ClientPaths) Reset

func (m *ClientPaths) Reset()

func (*ClientPaths) Size

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

func (*ClientPaths) String

func (m *ClientPaths) String() string

func (*ClientPaths) Unmarshal

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

func (*ClientPaths) XXX_DiscardUnknown

func (m *ClientPaths) XXX_DiscardUnknown()

func (*ClientPaths) XXX_Marshal

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

func (*ClientPaths) XXX_Merge

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

func (*ClientPaths) XXX_Size

func (m *ClientPaths) XXX_Size() int

func (*ClientPaths) XXX_Unmarshal

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

type ConnectionEnd

type ConnectionEnd struct {
	// client associated with this connection.
	ClientID string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"`
	// IBC version which can be utilised to determine encodings or protocols for
	// channels or packets utilising this connection
	Versions []string `protobuf:"bytes,3,rep,name=versions,proto3" json:"versions,omitempty"`
	// current state of the connection end.
	State State `protobuf:"varint,4,opt,name=state,proto3,enum=ibc.connection.State" json:"state,omitempty"`
	// counterparty chain associated with this connection.
	Counterparty Counterparty `protobuf:"bytes,5,opt,name=counterparty,proto3" json:"counterparty"`
}

ConnectionEnd defines a stateful object on a chain connected to another separate one. NOTE: there must only be 2 defined ConnectionEnds to establish a connection between two chains.

func NewConnectionEnd

func NewConnectionEnd(state State, clientID string, counterparty Counterparty, versions []string) ConnectionEnd

NewConnectionEnd creates a new ConnectionEnd instance.

func (*ConnectionEnd) Descriptor

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

func (ConnectionEnd) GetClientID

func (c ConnectionEnd) GetClientID() string

GetClientID implements the Connection interface

func (ConnectionEnd) GetCounterparty

func (c ConnectionEnd) GetCounterparty() exported.CounterpartyI

GetCounterparty implements the Connection interface

func (ConnectionEnd) GetState

func (c ConnectionEnd) GetState() int32

GetState implements the Connection interface

func (ConnectionEnd) GetVersions

func (c ConnectionEnd) GetVersions() []string

GetVersions implements the Connection interface

func (*ConnectionEnd) Marshal

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

func (*ConnectionEnd) MarshalTo

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

func (*ConnectionEnd) MarshalToSizedBuffer

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

func (*ConnectionEnd) ProtoMessage

func (*ConnectionEnd) ProtoMessage()

func (*ConnectionEnd) Reset

func (m *ConnectionEnd) Reset()

func (*ConnectionEnd) Size

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

func (*ConnectionEnd) String

func (m *ConnectionEnd) String() string

func (*ConnectionEnd) Unmarshal

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

func (ConnectionEnd) ValidateBasic

func (c ConnectionEnd) ValidateBasic() error

ValidateBasic implements the Connection interface. NOTE: the protocol supports that the connection and client IDs match the counterparty's.

func (*ConnectionEnd) XXX_DiscardUnknown

func (m *ConnectionEnd) XXX_DiscardUnknown()

func (*ConnectionEnd) XXX_Marshal

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

func (*ConnectionEnd) XXX_Merge

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

func (*ConnectionEnd) XXX_Size

func (m *ConnectionEnd) XXX_Size() int

func (*ConnectionEnd) XXX_Unmarshal

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

type ConnectionPaths

type ConnectionPaths struct {
	// client state unique identifier
	ClientID string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"`
	// list of connection paths
	Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
}

ConnectionPaths define all the connection paths for a given client state.

func NewConnectionPaths

func NewConnectionPaths(id string, paths []string) ConnectionPaths

NewConnectionPaths creates a ConnectionPaths instance.

func (*ConnectionPaths) Descriptor

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

func (*ConnectionPaths) GetClientID

func (m *ConnectionPaths) GetClientID() string

func (*ConnectionPaths) GetPaths

func (m *ConnectionPaths) GetPaths() []string

func (*ConnectionPaths) Marshal

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

func (*ConnectionPaths) MarshalTo

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

func (*ConnectionPaths) MarshalToSizedBuffer

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

func (*ConnectionPaths) ProtoMessage

func (*ConnectionPaths) ProtoMessage()

func (*ConnectionPaths) Reset

func (m *ConnectionPaths) Reset()

func (*ConnectionPaths) Size

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

func (*ConnectionPaths) String

func (m *ConnectionPaths) String() string

func (*ConnectionPaths) Unmarshal

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

func (*ConnectionPaths) XXX_DiscardUnknown

func (m *ConnectionPaths) XXX_DiscardUnknown()

func (*ConnectionPaths) XXX_Marshal

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

func (*ConnectionPaths) XXX_Merge

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

func (*ConnectionPaths) XXX_Size

func (m *ConnectionPaths) XXX_Size() int

func (*ConnectionPaths) XXX_Unmarshal

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

type Counterparty

type Counterparty struct {
	// identifies the client on the counterparty chain associated with a given
	// connection.
	ClientID string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"`
	// identifies the connection end on the counterparty chain associated with a
	// given connection.
	ConnectionID string `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
	// commitment merkle prefix of the counterparty chain
	Prefix types.MerklePrefix `protobuf:"bytes,3,opt,name=prefix,proto3" json:"prefix"`
}

Counterparty defines the counterparty chain associated with a connection end.

func NewCounterparty

func NewCounterparty(clientID, connectionID string, prefix commitmenttypes.MerklePrefix) Counterparty

NewCounterparty creates a new Counterparty instance.

func (*Counterparty) Descriptor

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

func (Counterparty) GetClientID

func (c Counterparty) GetClientID() string

GetClientID implements the CounterpartyI interface

func (Counterparty) GetConnectionID

func (c Counterparty) GetConnectionID() string

GetConnectionID implements the CounterpartyI interface

func (Counterparty) GetPrefix

func (c Counterparty) GetPrefix() commitmentexported.Prefix

GetPrefix implements the CounterpartyI interface

func (*Counterparty) Marshal

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

func (*Counterparty) MarshalTo

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

func (*Counterparty) MarshalToSizedBuffer

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

func (*Counterparty) ProtoMessage

func (*Counterparty) ProtoMessage()

func (*Counterparty) Reset

func (m *Counterparty) Reset()

func (*Counterparty) Size

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

func (*Counterparty) String

func (m *Counterparty) String() string

func (*Counterparty) Unmarshal

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

func (Counterparty) ValidateBasic

func (c Counterparty) ValidateBasic() error

ValidateBasic performs a basic validation check of the identifiers and prefix

func (*Counterparty) XXX_DiscardUnknown

func (m *Counterparty) XXX_DiscardUnknown()

func (*Counterparty) XXX_Marshal

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

func (*Counterparty) XXX_Merge

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

func (*Counterparty) XXX_Size

func (m *Counterparty) XXX_Size() int

func (*Counterparty) XXX_Unmarshal

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

type GenesisState

type GenesisState struct {
	Connections           []IdentifiedConnection `json:"connections" yaml:"connections"`
	ClientConnectionPaths []ConnectionPaths      `json:"client_connection_paths" yaml:"client_connection_paths"`
}

GenesisState defines the ibc connection submodule's genesis state.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

DefaultGenesisState returns the ibc connection submodule's default genesis state.

func NewGenesisState

func NewGenesisState(
	connections []IdentifiedConnection, connPaths []ConnectionPaths,
) GenesisState

NewGenesisState creates a GenesisState instance.

func (GenesisState) Validate

func (gs GenesisState) Validate() error

Validate performs basic genesis state validation returning an error upon any failure.

type IdentifiedConnection

type IdentifiedConnection struct {
	// connection identifier.
	ID string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"`
	// client associated with this connection.
	ClientID string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"`
	// IBC version which can be utilised to determine encodings or protocols for
	// channels or packets utilising this connection
	Versions []string `protobuf:"bytes,3,rep,name=versions,proto3" json:"versions,omitempty"`
	// current state of the connection end.
	State State `protobuf:"varint,4,opt,name=state,proto3,enum=ibc.connection.State" json:"state,omitempty"`
	// counterparty chain associated with this connection.
	Counterparty Counterparty `protobuf:"bytes,5,opt,name=counterparty,proto3" json:"counterparty"`
}

IdentifiedConnection defines a connection with additional connection identifier field.

func NewIdentifiedConnection

func NewIdentifiedConnection(connectionID string, conn ConnectionEnd) IdentifiedConnection

NewIdentifiedConnection creates a new IdentifiedConnection instance

func (*IdentifiedConnection) Descriptor

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

func (*IdentifiedConnection) Marshal

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

func (*IdentifiedConnection) MarshalTo

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

func (*IdentifiedConnection) MarshalToSizedBuffer

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

func (*IdentifiedConnection) ProtoMessage

func (*IdentifiedConnection) ProtoMessage()

func (*IdentifiedConnection) Reset

func (m *IdentifiedConnection) Reset()

func (*IdentifiedConnection) Size

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

func (*IdentifiedConnection) String

func (m *IdentifiedConnection) String() string

func (*IdentifiedConnection) Unmarshal

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

func (IdentifiedConnection) ValidateBasic

func (ic IdentifiedConnection) ValidateBasic() error

ValidateBasic performs a basic validation of the connection identifier and connection fields.

func (*IdentifiedConnection) XXX_DiscardUnknown

func (m *IdentifiedConnection) XXX_DiscardUnknown()

func (*IdentifiedConnection) XXX_Marshal

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

func (*IdentifiedConnection) XXX_Merge

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

func (*IdentifiedConnection) XXX_Size

func (m *IdentifiedConnection) XXX_Size() int

func (*IdentifiedConnection) XXX_Unmarshal

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

type MsgConnectionOpenAck

type MsgConnectionOpenAck struct {
	ConnectionID string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
	Version      string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
	// proof of the initialization the connection on Chain B: `UNITIALIZED ->
	// TRYOPEN`
	ProofTry    []byte `protobuf:"bytes,3,opt,name=proof_try,json=proofTry,proto3" json:"proof_try,omitempty" yaml:"proof_try"`
	ProofHeight uint64 `protobuf:"varint,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"`
	// proof of client consensus state
	ProofConsensus  []byte                                        `` /* 126-byte string literal not displayed */
	ConsensusHeight uint64                                        `` /* 131-byte string literal not displayed */
	Signer          github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,7,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

MsgConnectionOpenAck defines a msg sent by a Relayer to Chain A to acknowledge the change of connection state to TRYOPEN on Chain B.

func NewMsgConnectionOpenAck

func NewMsgConnectionOpenAck(
	connectionID string, proofTry, proofConsensus []byte,
	proofHeight, consensusHeight uint64, version string,
	signer sdk.AccAddress,
) *MsgConnectionOpenAck

NewMsgConnectionOpenAck creates a new MsgConnectionOpenAck instance

func (*MsgConnectionOpenAck) Descriptor

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

func (*MsgConnectionOpenAck) GetConnectionID

func (m *MsgConnectionOpenAck) GetConnectionID() string

func (*MsgConnectionOpenAck) GetConsensusHeight

func (m *MsgConnectionOpenAck) GetConsensusHeight() uint64

func (*MsgConnectionOpenAck) GetProofConsensus

func (m *MsgConnectionOpenAck) GetProofConsensus() []byte

func (*MsgConnectionOpenAck) GetProofHeight

func (m *MsgConnectionOpenAck) GetProofHeight() uint64

func (*MsgConnectionOpenAck) GetProofTry

func (m *MsgConnectionOpenAck) GetProofTry() []byte

func (MsgConnectionOpenAck) GetSignBytes

func (msg MsgConnectionOpenAck) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgConnectionOpenAck) GetSigner

func (MsgConnectionOpenAck) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgConnectionOpenAck) GetVersion

func (m *MsgConnectionOpenAck) GetVersion() string

func (*MsgConnectionOpenAck) Marshal

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

func (*MsgConnectionOpenAck) MarshalTo

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

func (*MsgConnectionOpenAck) MarshalToSizedBuffer

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

func (*MsgConnectionOpenAck) ProtoMessage

func (*MsgConnectionOpenAck) ProtoMessage()

func (*MsgConnectionOpenAck) Reset

func (m *MsgConnectionOpenAck) Reset()

func (MsgConnectionOpenAck) Route

func (msg MsgConnectionOpenAck) Route() string

Route implements sdk.Msg

func (*MsgConnectionOpenAck) Size

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

func (*MsgConnectionOpenAck) String

func (m *MsgConnectionOpenAck) String() string

func (MsgConnectionOpenAck) Type

func (msg MsgConnectionOpenAck) Type() string

Type implements sdk.Msg

func (*MsgConnectionOpenAck) Unmarshal

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

func (MsgConnectionOpenAck) ValidateBasic

func (msg MsgConnectionOpenAck) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgConnectionOpenAck) XXX_DiscardUnknown

func (m *MsgConnectionOpenAck) XXX_DiscardUnknown()

func (*MsgConnectionOpenAck) XXX_Marshal

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

func (*MsgConnectionOpenAck) XXX_Merge

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

func (*MsgConnectionOpenAck) XXX_Size

func (m *MsgConnectionOpenAck) XXX_Size() int

func (*MsgConnectionOpenAck) XXX_Unmarshal

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

type MsgConnectionOpenConfirm

type MsgConnectionOpenConfirm struct {
	ConnectionID string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
	// proof for the change of the connection state on Chain A: `INIT -> OPEN`
	ProofAck    []byte                                        `protobuf:"bytes,2,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack,omitempty" yaml:"proof_ack"`
	ProofHeight uint64                                        `protobuf:"varint,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"`
	Signer      github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

MsgConnectionOpenConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of connection state to OPEN on Chain A.

func NewMsgConnectionOpenConfirm

func NewMsgConnectionOpenConfirm(
	connectionID string, proofAck []byte, proofHeight uint64,
	signer sdk.AccAddress,
) *MsgConnectionOpenConfirm

NewMsgConnectionOpenConfirm creates a new MsgConnectionOpenConfirm instance

func (*MsgConnectionOpenConfirm) Descriptor

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

func (*MsgConnectionOpenConfirm) GetConnectionID

func (m *MsgConnectionOpenConfirm) GetConnectionID() string

func (*MsgConnectionOpenConfirm) GetProofAck

func (m *MsgConnectionOpenConfirm) GetProofAck() []byte

func (*MsgConnectionOpenConfirm) GetProofHeight

func (m *MsgConnectionOpenConfirm) GetProofHeight() uint64

func (MsgConnectionOpenConfirm) GetSignBytes

func (msg MsgConnectionOpenConfirm) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgConnectionOpenConfirm) GetSigner

func (MsgConnectionOpenConfirm) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgConnectionOpenConfirm) Marshal

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

func (*MsgConnectionOpenConfirm) MarshalTo

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

func (*MsgConnectionOpenConfirm) MarshalToSizedBuffer

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

func (*MsgConnectionOpenConfirm) ProtoMessage

func (*MsgConnectionOpenConfirm) ProtoMessage()

func (*MsgConnectionOpenConfirm) Reset

func (m *MsgConnectionOpenConfirm) Reset()

func (MsgConnectionOpenConfirm) Route

func (msg MsgConnectionOpenConfirm) Route() string

Route implements sdk.Msg

func (*MsgConnectionOpenConfirm) Size

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

func (*MsgConnectionOpenConfirm) String

func (m *MsgConnectionOpenConfirm) String() string

func (MsgConnectionOpenConfirm) Type

func (msg MsgConnectionOpenConfirm) Type() string

Type implements sdk.Msg

func (*MsgConnectionOpenConfirm) Unmarshal

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

func (MsgConnectionOpenConfirm) ValidateBasic

func (msg MsgConnectionOpenConfirm) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgConnectionOpenConfirm) XXX_DiscardUnknown

func (m *MsgConnectionOpenConfirm) XXX_DiscardUnknown()

func (*MsgConnectionOpenConfirm) XXX_Marshal

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

func (*MsgConnectionOpenConfirm) XXX_Merge

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

func (*MsgConnectionOpenConfirm) XXX_Size

func (m *MsgConnectionOpenConfirm) XXX_Size() int

func (*MsgConnectionOpenConfirm) XXX_Unmarshal

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

type MsgConnectionOpenInit

type MsgConnectionOpenInit struct {
	ClientID     string                                        `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"`
	ConnectionID string                                        `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
	Counterparty Counterparty                                  `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"`
	Signer       github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,4,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

MsgConnectionOpenInit defines the msg sent by an account on Chain A to initialize a connection with Chain B.

func NewMsgConnectionOpenInit

func NewMsgConnectionOpenInit(
	connectionID, clientID, counterpartyConnectionID,
	counterpartyClientID string, counterpartyPrefix commitmenttypes.MerklePrefix,
	signer sdk.AccAddress,
) *MsgConnectionOpenInit

NewMsgConnectionOpenInit creates a new MsgConnectionOpenInit instance

func (*MsgConnectionOpenInit) Descriptor

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

func (*MsgConnectionOpenInit) GetClientID

func (m *MsgConnectionOpenInit) GetClientID() string

func (*MsgConnectionOpenInit) GetConnectionID

func (m *MsgConnectionOpenInit) GetConnectionID() string

func (*MsgConnectionOpenInit) GetCounterparty

func (m *MsgConnectionOpenInit) GetCounterparty() Counterparty

func (MsgConnectionOpenInit) GetSignBytes

func (msg MsgConnectionOpenInit) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgConnectionOpenInit) GetSigner

func (MsgConnectionOpenInit) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgConnectionOpenInit) Marshal

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

func (*MsgConnectionOpenInit) MarshalTo

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

func (*MsgConnectionOpenInit) MarshalToSizedBuffer

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

func (*MsgConnectionOpenInit) ProtoMessage

func (*MsgConnectionOpenInit) ProtoMessage()

func (*MsgConnectionOpenInit) Reset

func (m *MsgConnectionOpenInit) Reset()

func (MsgConnectionOpenInit) Route

func (msg MsgConnectionOpenInit) Route() string

Route implements sdk.Msg

func (*MsgConnectionOpenInit) Size

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

func (*MsgConnectionOpenInit) String

func (m *MsgConnectionOpenInit) String() string

func (MsgConnectionOpenInit) Type

func (msg MsgConnectionOpenInit) Type() string

Type implements sdk.Msg

func (*MsgConnectionOpenInit) Unmarshal

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

func (MsgConnectionOpenInit) ValidateBasic

func (msg MsgConnectionOpenInit) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgConnectionOpenInit) XXX_DiscardUnknown

func (m *MsgConnectionOpenInit) XXX_DiscardUnknown()

func (*MsgConnectionOpenInit) XXX_Marshal

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

func (*MsgConnectionOpenInit) XXX_Merge

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

func (*MsgConnectionOpenInit) XXX_Size

func (m *MsgConnectionOpenInit) XXX_Size() int

func (*MsgConnectionOpenInit) XXX_Unmarshal

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

type MsgConnectionOpenTry

type MsgConnectionOpenTry struct {
	ClientID             string       `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty" yaml:"client_id"`
	ConnectionID         string       `protobuf:"bytes,2,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty" yaml:"connection_id"`
	Counterparty         Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"`
	CounterpartyVersions []string     `` /* 150-byte string literal not displayed */
	// proof of the initialization the connection on Chain A: `UNITIALIZED ->
	// INIT`
	ProofInit   []byte `protobuf:"bytes,5,opt,name=proof_init,json=proofInit,proto3" json:"proof_init,omitempty" yaml:"proof_init"`
	ProofHeight uint64 `protobuf:"varint,6,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"`
	// proof of client consensus state
	ProofConsensus  []byte                                        `` /* 126-byte string literal not displayed */
	ConsensusHeight uint64                                        `` /* 131-byte string literal not displayed */
	Signer          github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,9,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

MsgConnectionOpenTry defines a msg sent by a Relayer to try to open a connection on Chain B.

func NewMsgConnectionOpenTry

func NewMsgConnectionOpenTry(
	connectionID, clientID, counterpartyConnectionID,
	counterpartyClientID string, counterpartyPrefix commitmenttypes.MerklePrefix,
	counterpartyVersions []string, proofInit, proofConsensus []byte,
	proofHeight, consensusHeight uint64, signer sdk.AccAddress,
) *MsgConnectionOpenTry

NewMsgConnectionOpenTry creates a new MsgConnectionOpenTry instance

func (*MsgConnectionOpenTry) Descriptor

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

func (*MsgConnectionOpenTry) GetClientID

func (m *MsgConnectionOpenTry) GetClientID() string

func (*MsgConnectionOpenTry) GetConnectionID

func (m *MsgConnectionOpenTry) GetConnectionID() string

func (*MsgConnectionOpenTry) GetConsensusHeight

func (m *MsgConnectionOpenTry) GetConsensusHeight() uint64

func (*MsgConnectionOpenTry) GetCounterparty

func (m *MsgConnectionOpenTry) GetCounterparty() Counterparty

func (*MsgConnectionOpenTry) GetCounterpartyVersions

func (m *MsgConnectionOpenTry) GetCounterpartyVersions() []string

func (*MsgConnectionOpenTry) GetProofConsensus

func (m *MsgConnectionOpenTry) GetProofConsensus() []byte

func (*MsgConnectionOpenTry) GetProofHeight

func (m *MsgConnectionOpenTry) GetProofHeight() uint64

func (*MsgConnectionOpenTry) GetProofInit

func (m *MsgConnectionOpenTry) GetProofInit() []byte

func (MsgConnectionOpenTry) GetSignBytes

func (msg MsgConnectionOpenTry) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgConnectionOpenTry) GetSigner

func (MsgConnectionOpenTry) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgConnectionOpenTry) Marshal

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

func (*MsgConnectionOpenTry) MarshalTo

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

func (*MsgConnectionOpenTry) MarshalToSizedBuffer

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

func (*MsgConnectionOpenTry) ProtoMessage

func (*MsgConnectionOpenTry) ProtoMessage()

func (*MsgConnectionOpenTry) Reset

func (m *MsgConnectionOpenTry) Reset()

func (MsgConnectionOpenTry) Route

func (msg MsgConnectionOpenTry) Route() string

Route implements sdk.Msg

func (*MsgConnectionOpenTry) Size

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

func (*MsgConnectionOpenTry) String

func (m *MsgConnectionOpenTry) String() string

func (MsgConnectionOpenTry) Type

func (msg MsgConnectionOpenTry) Type() string

Type implements sdk.Msg

func (*MsgConnectionOpenTry) Unmarshal

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

func (MsgConnectionOpenTry) ValidateBasic

func (msg MsgConnectionOpenTry) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgConnectionOpenTry) XXX_DiscardUnknown

func (m *MsgConnectionOpenTry) XXX_DiscardUnknown()

func (*MsgConnectionOpenTry) XXX_Marshal

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

func (*MsgConnectionOpenTry) XXX_Merge

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

func (*MsgConnectionOpenTry) XXX_Size

func (m *MsgConnectionOpenTry) XXX_Size() int

func (*MsgConnectionOpenTry) XXX_Unmarshal

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

type QueryClient

type QueryClient interface {
	// Connection queries an IBC connection end.
	Connection(ctx context.Context, in *QueryConnectionRequest, opts ...grpc.CallOption) (*QueryConnectionResponse, error)
	// Connections queries all the IBC connections of a chain.
	Connections(ctx context.Context, in *QueryConnectionsRequest, opts ...grpc.CallOption) (*QueryConnectionsResponse, error)
	// ClientConnections queries the connection paths associated with a client state.
	ClientConnections(ctx context.Context, in *QueryClientConnectionsRequest, opts ...grpc.CallOption) (*QueryClientConnectionsResponse, error)
}

QueryClient is the client API for Query service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewQueryClient

func NewQueryClient(cc grpc1.ClientConn) QueryClient

type QueryClientConnectionsRequest

type QueryClientConnectionsRequest struct {
	// client identifier associated with a connection
	ClientID string `protobuf:"bytes,1,opt,name=client_id,json=clientId,proto3" json:"client_id,omitempty"`
}

QueryClientConnectionsRequest is the request type for the Query/ClientConnections RPC method

func NewQueryClientConnectionsRequest

func NewQueryClientConnectionsRequest(clientID string) *QueryClientConnectionsRequest

NewQueryClientConnectionsRequest creates a new QueryClientConnectionsRequest instance

func (*QueryClientConnectionsRequest) Descriptor

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

func (*QueryClientConnectionsRequest) GetClientID

func (m *QueryClientConnectionsRequest) GetClientID() string

func (*QueryClientConnectionsRequest) Marshal

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

func (*QueryClientConnectionsRequest) MarshalTo

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

func (*QueryClientConnectionsRequest) MarshalToSizedBuffer

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

func (*QueryClientConnectionsRequest) ProtoMessage

func (*QueryClientConnectionsRequest) ProtoMessage()

func (*QueryClientConnectionsRequest) Reset

func (m *QueryClientConnectionsRequest) Reset()

func (*QueryClientConnectionsRequest) Size

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

func (*QueryClientConnectionsRequest) String

func (*QueryClientConnectionsRequest) Unmarshal

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

func (*QueryClientConnectionsRequest) XXX_DiscardUnknown

func (m *QueryClientConnectionsRequest) XXX_DiscardUnknown()

func (*QueryClientConnectionsRequest) XXX_Marshal

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

func (*QueryClientConnectionsRequest) XXX_Merge

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

func (*QueryClientConnectionsRequest) XXX_Size

func (m *QueryClientConnectionsRequest) XXX_Size() int

func (*QueryClientConnectionsRequest) XXX_Unmarshal

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

type QueryClientConnectionsResponse

type QueryClientConnectionsResponse struct {
	// slice of all the connection paths associated with a client.
	ConnectionPaths []string `protobuf:"bytes,1,rep,name=connection_paths,json=connectionPaths,proto3" json:"connection_paths,omitempty"`
	// merkle proof of existence
	Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
	// merkle proof path
	ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"`
	// height at which the proof was generated
	ProofHeight uint64 `protobuf:"varint,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"`
}

QueryClientConnectionsResponse is the response type for the Query/ClientConnections RPC method

func NewQueryClientConnectionsResponse

func NewQueryClientConnectionsResponse(
	clientID string, connectionPaths []string, proof []byte, height int64,
) *QueryClientConnectionsResponse

NewQueryClientConnectionsResponse creates a new ConnectionPaths instance

func (*QueryClientConnectionsResponse) Descriptor

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

func (*QueryClientConnectionsResponse) GetConnectionPaths

func (m *QueryClientConnectionsResponse) GetConnectionPaths() []string

func (*QueryClientConnectionsResponse) GetProof

func (m *QueryClientConnectionsResponse) GetProof() []byte

func (*QueryClientConnectionsResponse) GetProofHeight

func (m *QueryClientConnectionsResponse) GetProofHeight() uint64

func (*QueryClientConnectionsResponse) GetProofPath

func (m *QueryClientConnectionsResponse) GetProofPath() string

func (*QueryClientConnectionsResponse) Marshal

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

func (*QueryClientConnectionsResponse) MarshalTo

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

func (*QueryClientConnectionsResponse) MarshalToSizedBuffer

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

func (*QueryClientConnectionsResponse) ProtoMessage

func (*QueryClientConnectionsResponse) ProtoMessage()

func (*QueryClientConnectionsResponse) Reset

func (m *QueryClientConnectionsResponse) Reset()

func (*QueryClientConnectionsResponse) Size

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

func (*QueryClientConnectionsResponse) String

func (*QueryClientConnectionsResponse) Unmarshal

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

func (*QueryClientConnectionsResponse) XXX_DiscardUnknown

func (m *QueryClientConnectionsResponse) XXX_DiscardUnknown()

func (*QueryClientConnectionsResponse) XXX_Marshal

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

func (*QueryClientConnectionsResponse) XXX_Merge

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

func (*QueryClientConnectionsResponse) XXX_Size

func (m *QueryClientConnectionsResponse) XXX_Size() int

func (*QueryClientConnectionsResponse) XXX_Unmarshal

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

type QueryConnectionRequest

type QueryConnectionRequest struct {
	// connection unique identifier
	ConnectionID string `protobuf:"bytes,1,opt,name=connection_id,json=connectionId,proto3" json:"connection_id,omitempty"`
}

QueryConnectionRequest is the request type for the Query/Connection RPC method

func (*QueryConnectionRequest) Descriptor

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

func (*QueryConnectionRequest) GetConnectionID

func (m *QueryConnectionRequest) GetConnectionID() string

func (*QueryConnectionRequest) Marshal

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

func (*QueryConnectionRequest) MarshalTo

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

func (*QueryConnectionRequest) MarshalToSizedBuffer

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

func (*QueryConnectionRequest) ProtoMessage

func (*QueryConnectionRequest) ProtoMessage()

func (*QueryConnectionRequest) Reset

func (m *QueryConnectionRequest) Reset()

func (*QueryConnectionRequest) Size

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

func (*QueryConnectionRequest) String

func (m *QueryConnectionRequest) String() string

func (*QueryConnectionRequest) Unmarshal

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

func (*QueryConnectionRequest) XXX_DiscardUnknown

func (m *QueryConnectionRequest) XXX_DiscardUnknown()

func (*QueryConnectionRequest) XXX_Marshal

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

func (*QueryConnectionRequest) XXX_Merge

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

func (*QueryConnectionRequest) XXX_Size

func (m *QueryConnectionRequest) XXX_Size() int

func (*QueryConnectionRequest) XXX_Unmarshal

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

type QueryConnectionResponse

type QueryConnectionResponse struct {
	// connection associated with the request identifier
	Connection *ConnectionEnd `protobuf:"bytes,1,opt,name=connection,proto3" json:"connection,omitempty"`
	// merkle proof of existence
	Proof []byte `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof,omitempty"`
	// merkle proof path
	ProofPath string `protobuf:"bytes,3,opt,name=proof_path,json=proofPath,proto3" json:"proof_path,omitempty"`
	// height at which the proof was retrieved
	ProofHeight uint64 `protobuf:"varint,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty"`
}

QueryConnectionResponse is the response type for the Query/Connection RPC method. Besides the connection end, it includes a proof and the height from which the proof was retrieved.

func NewQueryConnectionResponse

func NewQueryConnectionResponse(
	connectionID string, connection ConnectionEnd, proof []byte, height int64,
) *QueryConnectionResponse

NewQueryConnectionResponse creates a new QueryConnectionResponse instance

func (*QueryConnectionResponse) Descriptor

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

func (*QueryConnectionResponse) GetConnection

func (m *QueryConnectionResponse) GetConnection() *ConnectionEnd

func (*QueryConnectionResponse) GetProof

func (m *QueryConnectionResponse) GetProof() []byte

func (*QueryConnectionResponse) GetProofHeight

func (m *QueryConnectionResponse) GetProofHeight() uint64

func (*QueryConnectionResponse) GetProofPath

func (m *QueryConnectionResponse) GetProofPath() string

func (*QueryConnectionResponse) Marshal

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

func (*QueryConnectionResponse) MarshalTo

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

func (*QueryConnectionResponse) MarshalToSizedBuffer

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

func (*QueryConnectionResponse) ProtoMessage

func (*QueryConnectionResponse) ProtoMessage()

func (*QueryConnectionResponse) Reset

func (m *QueryConnectionResponse) Reset()

func (*QueryConnectionResponse) Size

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

func (*QueryConnectionResponse) String

func (m *QueryConnectionResponse) String() string

func (*QueryConnectionResponse) Unmarshal

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

func (*QueryConnectionResponse) XXX_DiscardUnknown

func (m *QueryConnectionResponse) XXX_DiscardUnknown()

func (*QueryConnectionResponse) XXX_Marshal

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

func (*QueryConnectionResponse) XXX_Merge

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

func (*QueryConnectionResponse) XXX_Size

func (m *QueryConnectionResponse) XXX_Size() int

func (*QueryConnectionResponse) XXX_Unmarshal

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

type QueryConnectionsRequest

type QueryConnectionsRequest struct {
	Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"`
}

QueryConnectionsRequest is the request type for the Query/Connections RPC method

func (*QueryConnectionsRequest) Descriptor

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

func (*QueryConnectionsRequest) GetPagination

func (m *QueryConnectionsRequest) GetPagination() *query.PageRequest

func (*QueryConnectionsRequest) Marshal

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

func (*QueryConnectionsRequest) MarshalTo

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

func (*QueryConnectionsRequest) MarshalToSizedBuffer

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

func (*QueryConnectionsRequest) ProtoMessage

func (*QueryConnectionsRequest) ProtoMessage()

func (*QueryConnectionsRequest) Reset

func (m *QueryConnectionsRequest) Reset()

func (*QueryConnectionsRequest) Size

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

func (*QueryConnectionsRequest) String

func (m *QueryConnectionsRequest) String() string

func (*QueryConnectionsRequest) Unmarshal

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

func (*QueryConnectionsRequest) XXX_DiscardUnknown

func (m *QueryConnectionsRequest) XXX_DiscardUnknown()

func (*QueryConnectionsRequest) XXX_Marshal

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

func (*QueryConnectionsRequest) XXX_Merge

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

func (*QueryConnectionsRequest) XXX_Size

func (m *QueryConnectionsRequest) XXX_Size() int

func (*QueryConnectionsRequest) XXX_Unmarshal

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

type QueryConnectionsResponse

type QueryConnectionsResponse struct {
	// list of stored connections of the chain.
	Connections []*IdentifiedConnection `protobuf:"bytes,1,rep,name=connections,proto3" json:"connections,omitempty"`
	// pagination response
	Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// query block height
	Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"`
}

QueryConnectionsResponse is the response type for the Query/Connections RPC method.

func (*QueryConnectionsResponse) Descriptor

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

func (*QueryConnectionsResponse) GetConnections

func (m *QueryConnectionsResponse) GetConnections() []*IdentifiedConnection

func (*QueryConnectionsResponse) GetHeight

func (m *QueryConnectionsResponse) GetHeight() int64

func (*QueryConnectionsResponse) GetPagination

func (m *QueryConnectionsResponse) GetPagination() *query.PageResponse

func (*QueryConnectionsResponse) Marshal

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

func (*QueryConnectionsResponse) MarshalTo

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

func (*QueryConnectionsResponse) MarshalToSizedBuffer

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

func (*QueryConnectionsResponse) ProtoMessage

func (*QueryConnectionsResponse) ProtoMessage()

func (*QueryConnectionsResponse) Reset

func (m *QueryConnectionsResponse) Reset()

func (*QueryConnectionsResponse) Size

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

func (*QueryConnectionsResponse) String

func (m *QueryConnectionsResponse) String() string

func (*QueryConnectionsResponse) Unmarshal

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

func (*QueryConnectionsResponse) XXX_DiscardUnknown

func (m *QueryConnectionsResponse) XXX_DiscardUnknown()

func (*QueryConnectionsResponse) XXX_Marshal

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

func (*QueryConnectionsResponse) XXX_Merge

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

func (*QueryConnectionsResponse) XXX_Size

func (m *QueryConnectionsResponse) XXX_Size() int

func (*QueryConnectionsResponse) XXX_Unmarshal

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

type QueryServer

type QueryServer interface {
	// Connection queries an IBC connection end.
	Connection(context.Context, *QueryConnectionRequest) (*QueryConnectionResponse, error)
	// Connections queries all the IBC connections of a chain.
	Connections(context.Context, *QueryConnectionsRequest) (*QueryConnectionsResponse, error)
	// ClientConnections queries the connection paths associated with a client state.
	ClientConnections(context.Context, *QueryClientConnectionsRequest) (*QueryClientConnectionsResponse, error)
}

QueryServer is the server API for Query service.

type State

type State int32

State defines if a connection is in one of the following states: INIT, TRYOPEN, OPEN or UNINITIALIZED.

const (
	// Default State
	UNINITIALIZED State = 0
	// A connection end has just started the opening handshake.
	INIT State = 1
	// A connection end has acknowledged the handshake step on the counterparty
	// chain.
	TRYOPEN State = 2
	// A connection end has completed the handshake.
	OPEN State = 3
)

func (State) EnumDescriptor

func (State) EnumDescriptor() ([]byte, []int)

func (State) String

func (x State) String() string

type UnimplementedQueryServer

type UnimplementedQueryServer struct {
}

UnimplementedQueryServer can be embedded to have forward compatible implementations.

func (*UnimplementedQueryServer) ClientConnections

func (*UnimplementedQueryServer) Connection

func (*UnimplementedQueryServer) Connections

type Version

type Version struct {
	// unique version identifier
	Identifier string `protobuf:"bytes,1,opt,name=identifier,proto3" json:"identifier,omitempty"`
	// list of features compatible with the specified identifier
	Features []string `protobuf:"bytes,2,rep,name=features,proto3" json:"features,omitempty"`
}

Version defines the versioning scheme used to negotiate the IBC verison in the connection handshake.

func DecodeVersion

func DecodeVersion(encodedVersion string) (Version, error)

DecodeVersion unmarshals a proto encoded version into a Version struct.

func DecodeVersions

func DecodeVersions(encodedVersions []string) ([]Version, error)

DecodeVersions returns the supplied list of proto encoded version strings as unmarshalled Version structs.

func FindSupportedVersion

func FindSupportedVersion(version Version, supportedVersions []Version) (Version, bool)

FindSupportedVersion returns the version with a matching version identifier if it exists. The returned boolean is true if the version is found and false otherwise.

func GetCompatibleVersions

func GetCompatibleVersions() []Version

GetCompatibleVersions returns a descending ordered set of compatible IBC versions for the caller chain's connection end. The latest supported version should be first element and the set should descend to the oldest supported version.

func NewVersion

func NewVersion(identifier string, features []string) Version

NewVersion returns a new instance of Version.

func (*Version) Descriptor

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

func (Version) Encode

func (version Version) Encode() (string, error)

Encode proto encodes the version and returns the bytes as a string.

func (Version) GetFeatures

func (version Version) GetFeatures() []string

GetFeatures implements the VersionI interface

func (Version) GetIdentifier

func (version Version) GetIdentifier() string

GetIdentifier implements the VersionI interface

func (*Version) Marshal

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

func (*Version) MarshalTo

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

func (*Version) MarshalToSizedBuffer

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

func (*Version) ProtoMessage

func (*Version) ProtoMessage()

func (*Version) Reset

func (m *Version) Reset()

func (*Version) Size

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

func (*Version) String

func (m *Version) String() string

func (*Version) Unmarshal

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

func (Version) VerifyProposedVersion

func (version Version) VerifyProposedVersion(proposedVersion Version) error

VerifyProposedVersion verifies that the entire feature set in the proposed version is supported by this chain. If the feature set is empty it verifies that this is allowed for the specified version identifier.

func (*Version) XXX_DiscardUnknown

func (m *Version) XXX_DiscardUnknown()

func (*Version) XXX_Marshal

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

func (*Version) XXX_Merge

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

func (*Version) XXX_Size

func (m *Version) XXX_Size() int

func (*Version) XXX_Unmarshal

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

Jump to

Keyboard shortcuts

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