types

package
v0.1.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: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributeKeyConnectionID         = "connection_id"
	AttributeKeyClientID             = "client_id"
	AttributeKeyCounterpartyClientID = "counterparty_client_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
)
View Source
const (
	QueryAllConnections       = "connections"
	QueryClientConnections    = "client_connections"
	QueryAllClientConnections = "all_client_connections"
)

query routes supported by the IBC connection Querier

Variables

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")
)

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 (
	ErrInvalidLengthTypes        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowTypes          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group")
)
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 GetCompatibleVersions

func GetCompatibleVersions() []string

GetCompatibleVersions returns an ordered set of compatible IBC versions for the caller chain's connection end.

func LatestVersion

func LatestVersion(versions []string) string

LatestVersion gets the latest version of a connection protocol

CONTRACT: version array MUST be already sorted.

func PickVersion

func PickVersion(counterpartyVersions, compatibleVersions []string) string

PickVersion picks the counterparty latest version that is matches the list of compatible versions for the connection.

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.

Types

type ClientConnectionsResponse

type ClientConnectionsResponse struct {
	ConnectionPaths []string                    `json:"connection_paths" yaml:"connection_paths"`
	Proof           commitmenttypes.MerkleProof `json:"proof,omitempty" yaml:"proof,omitempty"`
	ProofPath       commitmenttypes.MerklePath  `json:"proof_path,omitempty" yaml:"proof_path,omitempty"`
	ProofHeight     uint64                      `json:"proof_height,omitempty" yaml:"proof_height,omitempty"`
}

ClientConnectionsResponse defines the client query response for a client connection paths which also includes a proof and the height from which the proof was retrieved.

func NewClientConnectionsResponse

func NewClientConnectionsResponse(
	clientID string, connectionPaths []string, proof *merkle.Proof, height int64,
) ClientConnectionsResponse

NewClientConnectionsResponse creates a new ConnectionPaths instance

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 {
	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 {
	// 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"`
	// opaque string 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=cosmos_sdk.x.ibc.connection.v1.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, connectionID, 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) GetID

func (c ConnectionEnd) GetID() string

GetID 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 {
	ClientID string   `json:"client_id" yaml:"client_id"`
	Paths    []string `json:"paths" yaml:"paths"`
}

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.

type ConnectionResponse

type ConnectionResponse struct {
	Connection  ConnectionEnd               `json:"connection" yaml:"connection"`
	Proof       commitmenttypes.MerkleProof `json:"proof,omitempty" yaml:"proof,omitempty"`
	ProofPath   commitmenttypes.MerklePath  `json:"proof_path,omitempty" yaml:"proof_path,omitempty"`
	ProofHeight uint64                      `json:"proof_height,omitempty" yaml:"proof_height,omitempty"`
}

ConnectionResponse defines the client query response for a connection which also includes a proof and the height from which the proof was retrieved.

func NewConnectionResponse

func NewConnectionResponse(
	connectionID string, connection ConnectionEnd, proof *merkle.Proof, height int64,
) ConnectionResponse

NewConnectionResponse creates a new ConnectionResponse instance

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           []ConnectionEnd   `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 []ConnectionEnd, 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 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    types.MerkleProof `protobuf:"bytes,3,opt,name=proof_try,json=proofTry,proto3" json:"proof_try" 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  types.MerkleProof                             `protobuf:"bytes,5,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus" yaml:"proof_consensus"`
	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/ayher/anatha/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 commitmenttypes.MerkleProof,
	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() types.MerkleProof

func (*MsgConnectionOpenAck) GetProofHeight

func (m *MsgConnectionOpenAck) GetProofHeight() uint64

func (*MsgConnectionOpenAck) GetProofTry

func (m *MsgConnectionOpenAck) GetProofTry() types.MerkleProof

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    types.MerkleProof                             `protobuf:"bytes,2,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack" 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/ayher/anatha/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 commitmenttypes.MerkleProof, 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() types.MerkleProof

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/ayher/anatha/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   types.MerkleProof `protobuf:"bytes,5,opt,name=proof_init,json=proofInit,proto3" json:"proof_init" 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  types.MerkleProof                             `protobuf:"bytes,7,opt,name=proof_consensus,json=proofConsensus,proto3" json:"proof_consensus" yaml:"proof_consensus"`
	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/ayher/anatha/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 commitmenttypes.MerkleProof,
	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() types.MerkleProof

func (*MsgConnectionOpenTry) GetProofHeight

func (m *MsgConnectionOpenTry) GetProofHeight() uint64

func (*MsgConnectionOpenTry) GetProofInit

func (m *MsgConnectionOpenTry) GetProofInit() types.MerkleProof

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 QueryAllConnectionsParams

type QueryAllConnectionsParams struct {
	Page  int `json:"page" yaml:"page"`
	Limit int `json:"limit" yaml:"limit"`
}

QueryAllConnectionsParams defines the parameters necessary for querying for all connections.

func NewQueryAllConnectionsParams

func NewQueryAllConnectionsParams(page, limit int) QueryAllConnectionsParams

NewQueryAllConnectionsParams creates a new QueryAllConnectionsParams instance.

type QueryClientConnectionsParams

type QueryClientConnectionsParams struct {
	ClientID string
}

QueryClientConnectionsParams defines the params for the following queries: - 'custom/ibc/client/<clientID>/connections'

func NewQueryClientConnectionsParams

func NewQueryClientConnectionsParams(clientID string) QueryClientConnectionsParams

NewQueryClientConnectionsParams creates a new QueryClientConnectionsParams instance

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

Jump to

Keyboard shortcuts

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