types

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AttributeKeyConnectionID       = "connection_id"
	AttributeKeyPortID             = "port_id"
	AttributeKeyChannelID          = "channel_id"
	AttributeCounterpartyPortID    = "counterparty_port_id"
	AttributeCounterpartyChannelID = "counterparty_channel_id"

	EventTypeSendPacket        = "send_packet"
	EventTypeRecvPacket        = "recv_packet"
	EventTypeAcknowledgePacket = "acknowledge_packet"
	EventTypeCleanupPacket     = "cleanup_packet"
	EventTypeTimeoutPacket     = "timeout_packet"

	AttributeKeyData             = "packet_data"
	AttributeKeyAck              = "packet_ack"
	AttributeKeyTimeoutHeight    = "packet_timeout_height"
	AttributeKeyTimeoutTimestamp = "packet_timeout_timestamp"
	AttributeKeySequence         = "packet_sequence"
	AttributeKeySrcPort          = "packet_src_port"
	AttributeKeySrcChannel       = "packet_src_channel"
	AttributeKeyDstPort          = "packet_dst_port"
	AttributeKeyDstChannel       = "packet_dst_channel"
)

IBC channel events

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

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

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

	// QuerierRoute is the querier route for IBC channels
	QuerierRoute = SubModuleName
)
View Source
const (
	QueryAllChannels        = "channels"
	QueryChannel            = "channel"
	QueryConnectionChannels = "connection-channels"
)

query routes supported by the IBC channel Querier

Variables

View Source
var (
	ErrChannelExists             = sdkerrors.Register(SubModuleName, 2, "channel already exists")
	ErrChannelNotFound           = sdkerrors.Register(SubModuleName, 3, "channel not found")
	ErrInvalidChannel            = sdkerrors.Register(SubModuleName, 4, "invalid channel")
	ErrInvalidChannelState       = sdkerrors.Register(SubModuleName, 5, "invalid channel state")
	ErrInvalidChannelOrdering    = sdkerrors.Register(SubModuleName, 6, "invalid channel ordering")
	ErrInvalidCounterparty       = sdkerrors.Register(SubModuleName, 7, "invalid counterparty channel")
	ErrInvalidChannelCapability  = sdkerrors.Register(SubModuleName, 8, "invalid channel capability")
	ErrChannelCapabilityNotFound = sdkerrors.Register(SubModuleName, 9, "channel capability not found")
	ErrSequenceSendNotFound      = sdkerrors.Register(SubModuleName, 10, "sequence send not found")
	ErrSequenceReceiveNotFound   = sdkerrors.Register(SubModuleName, 11, "sequence receive not found")
	ErrInvalidPacket             = sdkerrors.Register(SubModuleName, 12, "invalid packet")
	ErrPacketTimeout             = sdkerrors.Register(SubModuleName, 13, "packet timeout")
	ErrTooManyConnectionHops     = sdkerrors.Register(SubModuleName, 14, "too many connection hops")
	ErrAcknowledgementTooLong    = sdkerrors.Register(SubModuleName, 15, "acknowledgement too long")
)

IBC channel sentinel errors

View Source
var (
	EventTypeChannelOpenInit     = MsgChannelOpenInit{}.Type()
	EventTypeChannelOpenTry      = MsgChannelOpenTry{}.Type()
	EventTypeChannelOpenAck      = MsgChannelOpenAck{}.Type()
	EventTypeChannelOpenConfirm  = MsgChannelOpenConfirm{}.Type()
	EventTypeChannelCloseInit    = MsgChannelCloseInit{}.Type()
	EventTypeChannelCloseConfirm = MsgChannelCloseConfirm{}.Type()

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

IBC channel 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 Order_name = map[int32]string{
	0: "ORDER_NONE_UNSPECIFIED",
	1: "ORDER_UNORDERED",
	2: "ORDER_ORDERED",
}
View Source
var Order_value = map[string]int32{
	"ORDER_NONE_UNSPECIFIED": 0,
	"ORDER_UNORDERED":        1,
	"ORDER_ORDERED":          2,
}
View Source
var State_name = map[int32]string{
	0: "STATE_UNINITIALIZED_UNSPECIFIED",
	1: "STATE_INIT",
	2: "STATE_TRYOPEN",
	3: "STATE_OPEN",
	4: "STATE_CLOSED",
}
View Source
var State_value = map[string]int32{
	"STATE_UNINITIALIZED_UNSPECIFIED": 0,
	"STATE_INIT":                      1,
	"STATE_TRYOPEN":                   2,
	"STATE_OPEN":                      3,
	"STATE_CLOSED":                    4,
}
View Source
var (

	// SubModuleCdc references the global x/ibc/04-channel 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/04-channel and
	// defined at the application level.
	SubModuleCdc = codec.NewHybridCodec(amino, cdctypes.NewInterfaceRegistry())
)

Functions

func CommitAcknowledgement

func CommitAcknowledgement(data []byte) []byte

CommitAcknowledgement returns the hash of commitment bytes

func CommitPacket

func CommitPacket(packet exported.PacketI) []byte

CommitPacket return the hash of commitment bytes TODO: no specification for packet commitment currently, make it spec compatible once we have it

func RegisterCodec

func RegisterCodec(cdc *codec.Codec)

RegisterCodec registers the necessary x/ibc/04-channel 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 channel submodule interfaces to protobuf Any.

Types

type Channel

type Channel struct {
	// current state of the channel end
	State State `protobuf:"varint,1,opt,name=state,proto3,enum=cosmos_sdk.x.ibc.channel.v1.State" json:"state,omitempty"`
	// whether the channel is ordered or unordered
	Ordering Order `protobuf:"varint,2,opt,name=ordering,proto3,enum=cosmos_sdk.x.ibc.channel.v1.Order" json:"ordering,omitempty"`
	// counterparty channel end
	Counterparty Counterparty `protobuf:"bytes,3,opt,name=counterparty,proto3" json:"counterparty"`
	// list of connection identifiers, in order, along which packets sent on this
	// channel will travel
	ConnectionHops []string `` /* 126-byte string literal not displayed */
	// opaque channel version, which is agreed upon during the handshake
	Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
}

Channel defines pipeline for exactly-once packet delivery between specific modules on separate blockchains, which has at least one end capable of sending packets and one end capable of receiving packets.

func NewChannel

func NewChannel(
	state State, ordering Order, counterparty Counterparty,
	hops []string, version string,
) Channel

NewChannel creates a new Channel instance

func (*Channel) Descriptor

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

func (Channel) GetConnectionHops

func (ch Channel) GetConnectionHops() []string

GetConnectionHops implements Channel interface.

func (Channel) GetCounterparty

func (ch Channel) GetCounterparty() exported.CounterpartyI

GetCounterparty implements Channel interface.

func (Channel) GetOrdering

func (ch Channel) GetOrdering() int32

GetOrdering implements Channel interface.

func (Channel) GetState

func (ch Channel) GetState() int32

GetState implements Channel interface.

func (Channel) GetVersion

func (ch Channel) GetVersion() string

GetVersion implements Channel interface.

func (*Channel) Marshal

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

func (*Channel) MarshalTo

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

func (*Channel) MarshalToSizedBuffer

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

func (*Channel) ProtoMessage

func (*Channel) ProtoMessage()

func (*Channel) Reset

func (m *Channel) Reset()

func (*Channel) Size

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

func (*Channel) String

func (m *Channel) String() string

func (*Channel) Unmarshal

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

func (Channel) ValidateBasic

func (ch Channel) ValidateBasic() error

ValidateBasic performs a basic validation of the channel fields

func (*Channel) XXX_DiscardUnknown

func (m *Channel) XXX_DiscardUnknown()

func (*Channel) XXX_Marshal

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

func (*Channel) XXX_Merge

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

func (*Channel) XXX_Size

func (m *Channel) XXX_Size() int

func (*Channel) XXX_Unmarshal

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

type ChannelResponse

type ChannelResponse struct {
	Channel     IdentifiedChannel           `json:"channel" yaml:"channel"`
	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"`
}

ChannelResponse defines the client query response for a channel which also includes a proof,its path and the height from which the proof was retrieved.

func NewChannelResponse

func NewChannelResponse(
	portID, channelID string, channel Channel, proof *merkle.Proof, height int64,
) ChannelResponse

NewChannelResponse creates a new ChannelResponse instance

type ClientKeeper

type ClientKeeper interface {
	GetClientState(ctx sdk.Context, clientID string) (clientexported.ClientState, bool)
}

ClientKeeper expected account IBC client keeper

type ConnectionKeeper

type ConnectionKeeper interface {
	GetConnection(ctx sdk.Context, connectionID string) (connectiontypes.ConnectionEnd, bool)
	GetTimestampAtHeight(
		ctx sdk.Context,
		connection connectiontypes.ConnectionEnd,
		height uint64,
	) (uint64, error)
	VerifyChannelState(
		ctx sdk.Context,
		connection connectionexported.ConnectionI,
		height uint64,
		proof commitmentexported.Proof,
		portID,
		channelID string,
		channel exported.ChannelI,
	) error
	VerifyPacketCommitment(
		ctx sdk.Context,
		connection connectionexported.ConnectionI,
		height uint64,
		proof commitmentexported.Proof,
		portID,
		channelID string,
		sequence uint64,
		commitmentBytes []byte,
	) error
	VerifyPacketAcknowledgement(
		ctx sdk.Context,
		connection connectionexported.ConnectionI,
		height uint64,
		proof commitmentexported.Proof,
		portID,
		channelID string,
		sequence uint64,
		acknowledgement []byte,
	) error
	VerifyPacketAcknowledgementAbsence(
		ctx sdk.Context,
		connection connectionexported.ConnectionI,
		height uint64,
		proof commitmentexported.Proof,
		portID,
		channelID string,
		sequence uint64,
	) error
	VerifyNextSequenceRecv(
		ctx sdk.Context,
		connection connectionexported.ConnectionI,
		height uint64,
		proof commitmentexported.Proof,
		portID,
		channelID string,
		nextSequenceRecv uint64,
	) error
}

ConnectionKeeper expected account IBC connection keeper

type Counterparty

type Counterparty struct {
	// port on the counterparty chain which owns the other end of the channel.
	PortID string `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
	// channel end on the counterparty chain
	ChannelID string `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"`
}

Counterparty defines a channel end counterparty

func NewCounterparty

func NewCounterparty(portID, channelID string) Counterparty

NewCounterparty returns a new Counterparty instance

func (*Counterparty) Descriptor

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

func (Counterparty) GetChannelID

func (c Counterparty) GetChannelID() string

GetChannelID implements CounterpartyI interface

func (Counterparty) GetPortID

func (c Counterparty) GetPortID() string

GetPortID implements 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

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 {
	Channels         []IdentifiedChannel   `json:"channels" yaml:"channels"`
	Acknowledgements []PacketAckCommitment `json:"acknowledgements" yaml:"acknowledgements"`
	Commitments      []PacketAckCommitment `json:"commitments" yaml:"commitments"`
	SendSequences    []PacketSequence      `json:"send_sequences" yaml:"send_sequences"`
	RecvSequences    []PacketSequence      `json:"recv_sequences" yaml:"recv_sequences"`
}

GenesisState defines the ibc channel submodule's genesis state.

func DefaultGenesisState

func DefaultGenesisState() GenesisState

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

func NewGenesisState

func NewGenesisState(
	channels []IdentifiedChannel, acks, commitments []PacketAckCommitment,
	sendSeqs, recvSeqs []PacketSequence,
) 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 IdentifiedChannel

type IdentifiedChannel struct {
	ID             string       `json:"id" yaml:"id"`
	PortID         string       `json:"port_id" yaml:"port_id"`
	State          State        `json:"state" yaml:"state"`
	Ordering       Order        `json:"ordering" yaml:"ordering"`
	Counterparty   Counterparty `json:"counterparty" yaml:"counterparty"`
	ConnectionHops []string     `json:"connection_hops" yaml:"connection_hops"`
	Version        string       `json:"version" yaml:"version "`
}

IdentifiedChannel defines a channel with additional port and channel identifier fields.

func NewIdentifiedChannel

func NewIdentifiedChannel(portID, channelID string, ch Channel) IdentifiedChannel

NewIdentifiedChannel creates a new IdentifiedChannel instance

func (IdentifiedChannel) ValidateBasic

func (ic IdentifiedChannel) ValidateBasic() error

ValidateBasic performs a basic validation of the identifiers and channel fields.

type MsgAcknowledgement

type MsgAcknowledgement struct {
	Packet          Packet                                        `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"`
	Acknowledgement []byte                                        `protobuf:"bytes,2,opt,name=acknowledgement,proto3" json:"acknowledgement,omitempty"`
	Proof           types.MerkleProof                             `protobuf:"bytes,3,opt,name=proof,proto3" json:"proof"`
	ProofHeight     uint64                                        `protobuf:"varint,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"`
	Signer          github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

MsgAcknowledgement receives incoming IBC acknowledgement

func NewMsgAcknowledgement

func NewMsgAcknowledgement(
	packet Packet, ack []byte, proof commitmenttypes.MerkleProof, proofHeight uint64, signer sdk.AccAddress) MsgAcknowledgement

NewMsgAcknowledgement constructs a new MsgAcknowledgement

func (*MsgAcknowledgement) Descriptor

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

func (*MsgAcknowledgement) GetAcknowledgement

func (m *MsgAcknowledgement) GetAcknowledgement() []byte

func (*MsgAcknowledgement) GetPacket

func (m *MsgAcknowledgement) GetPacket() Packet

func (*MsgAcknowledgement) GetProof

func (m *MsgAcknowledgement) GetProof() types.MerkleProof

func (*MsgAcknowledgement) GetProofHeight

func (m *MsgAcknowledgement) GetProofHeight() uint64

func (MsgAcknowledgement) GetSignBytes

func (msg MsgAcknowledgement) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgAcknowledgement) GetSigner

func (MsgAcknowledgement) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgAcknowledgement) Marshal

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

func (*MsgAcknowledgement) MarshalTo

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

func (*MsgAcknowledgement) MarshalToSizedBuffer

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

func (*MsgAcknowledgement) ProtoMessage

func (*MsgAcknowledgement) ProtoMessage()

func (*MsgAcknowledgement) Reset

func (m *MsgAcknowledgement) Reset()

func (MsgAcknowledgement) Route

func (msg MsgAcknowledgement) Route() string

Route implements sdk.Msg

func (*MsgAcknowledgement) Size

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

func (*MsgAcknowledgement) String

func (m *MsgAcknowledgement) String() string

func (MsgAcknowledgement) Type

func (msg MsgAcknowledgement) Type() string

Type implements sdk.Msg

func (*MsgAcknowledgement) Unmarshal

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

func (MsgAcknowledgement) ValidateBasic

func (msg MsgAcknowledgement) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgAcknowledgement) XXX_DiscardUnknown

func (m *MsgAcknowledgement) XXX_DiscardUnknown()

func (*MsgAcknowledgement) XXX_Marshal

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

func (*MsgAcknowledgement) XXX_Merge

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

func (*MsgAcknowledgement) XXX_Size

func (m *MsgAcknowledgement) XXX_Size() int

func (*MsgAcknowledgement) XXX_Unmarshal

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

type MsgChannelCloseConfirm

type MsgChannelCloseConfirm struct {
	PortID      string                                        `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
	ChannelID   string                                        `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"`
	ProofInit   types.MerkleProof                             `protobuf:"bytes,3,opt,name=proof_init,json=proofInit,proto3" json:"proof_init" yaml:"proof_init"`
	ProofHeight uint64                                        `protobuf:"varint,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"`
	Signer      github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

MsgChannelCloseConfirm defines a msg sent by a Relayer to Chain B to acknowledge the change of channel state to CLOSED on Chain A.

func NewMsgChannelCloseConfirm

func NewMsgChannelCloseConfirm(
	portID, channelID string, proofInit commitmenttypes.MerkleProof, proofHeight uint64,
	signer sdk.AccAddress,
) MsgChannelCloseConfirm

NewMsgChannelCloseConfirm creates a new MsgChannelCloseConfirm instance

func (*MsgChannelCloseConfirm) Descriptor

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

func (*MsgChannelCloseConfirm) GetChannelID

func (m *MsgChannelCloseConfirm) GetChannelID() string

func (*MsgChannelCloseConfirm) GetPortID

func (m *MsgChannelCloseConfirm) GetPortID() string

func (*MsgChannelCloseConfirm) GetProofHeight

func (m *MsgChannelCloseConfirm) GetProofHeight() uint64

func (*MsgChannelCloseConfirm) GetProofInit

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

func (MsgChannelCloseConfirm) GetSignBytes

func (msg MsgChannelCloseConfirm) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgChannelCloseConfirm) GetSigner

func (MsgChannelCloseConfirm) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgChannelCloseConfirm) Marshal

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

func (*MsgChannelCloseConfirm) MarshalTo

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

func (*MsgChannelCloseConfirm) MarshalToSizedBuffer

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

func (*MsgChannelCloseConfirm) ProtoMessage

func (*MsgChannelCloseConfirm) ProtoMessage()

func (*MsgChannelCloseConfirm) Reset

func (m *MsgChannelCloseConfirm) Reset()

func (MsgChannelCloseConfirm) Route

func (msg MsgChannelCloseConfirm) Route() string

Route implements sdk.Msg

func (*MsgChannelCloseConfirm) Size

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

func (*MsgChannelCloseConfirm) String

func (m *MsgChannelCloseConfirm) String() string

func (MsgChannelCloseConfirm) Type

func (msg MsgChannelCloseConfirm) Type() string

Type implements sdk.Msg

func (*MsgChannelCloseConfirm) Unmarshal

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

func (MsgChannelCloseConfirm) ValidateBasic

func (msg MsgChannelCloseConfirm) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgChannelCloseConfirm) XXX_DiscardUnknown

func (m *MsgChannelCloseConfirm) XXX_DiscardUnknown()

func (*MsgChannelCloseConfirm) XXX_Marshal

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

func (*MsgChannelCloseConfirm) XXX_Merge

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

func (*MsgChannelCloseConfirm) XXX_Size

func (m *MsgChannelCloseConfirm) XXX_Size() int

func (*MsgChannelCloseConfirm) XXX_Unmarshal

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

type MsgChannelCloseInit

type MsgChannelCloseInit struct {
	PortID    string                                        `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
	ChannelID string                                        `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"`
	Signer    github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,3,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

MsgChannelOpenConfirm defines a msg sent by a Relayer to Chain A to close a channel with Chain B.

func NewMsgChannelCloseInit

func NewMsgChannelCloseInit(
	portID string, channelID string, signer sdk.AccAddress,
) MsgChannelCloseInit

NewMsgChannelCloseInit creates a new MsgChannelCloseInit instance

func (*MsgChannelCloseInit) Descriptor

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

func (*MsgChannelCloseInit) GetChannelID

func (m *MsgChannelCloseInit) GetChannelID() string

func (*MsgChannelCloseInit) GetPortID

func (m *MsgChannelCloseInit) GetPortID() string

func (MsgChannelCloseInit) GetSignBytes

func (msg MsgChannelCloseInit) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgChannelCloseInit) GetSigner

func (MsgChannelCloseInit) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgChannelCloseInit) Marshal

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

func (*MsgChannelCloseInit) MarshalTo

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

func (*MsgChannelCloseInit) MarshalToSizedBuffer

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

func (*MsgChannelCloseInit) ProtoMessage

func (*MsgChannelCloseInit) ProtoMessage()

func (*MsgChannelCloseInit) Reset

func (m *MsgChannelCloseInit) Reset()

func (MsgChannelCloseInit) Route

func (msg MsgChannelCloseInit) Route() string

Route implements sdk.Msg

func (*MsgChannelCloseInit) Size

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

func (*MsgChannelCloseInit) String

func (m *MsgChannelCloseInit) String() string

func (MsgChannelCloseInit) Type

func (msg MsgChannelCloseInit) Type() string

Type implements sdk.Msg

func (*MsgChannelCloseInit) Unmarshal

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

func (MsgChannelCloseInit) ValidateBasic

func (msg MsgChannelCloseInit) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgChannelCloseInit) XXX_DiscardUnknown

func (m *MsgChannelCloseInit) XXX_DiscardUnknown()

func (*MsgChannelCloseInit) XXX_Marshal

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

func (*MsgChannelCloseInit) XXX_Merge

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

func (*MsgChannelCloseInit) XXX_Size

func (m *MsgChannelCloseInit) XXX_Size() int

func (*MsgChannelCloseInit) XXX_Unmarshal

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

type MsgChannelOpenAck

type MsgChannelOpenAck struct {
	PortID              string                                        `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
	ChannelID           string                                        `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"`
	CounterpartyVersion string                                        `` /* 146-byte string literal not displayed */
	ProofTry            types.MerkleProof                             `protobuf:"bytes,4,opt,name=proof_try,json=proofTry,proto3" json:"proof_try" yaml:"proof_try"`
	ProofHeight         uint64                                        `protobuf:"varint,5,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"`
	Signer              github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,6,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

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

func NewMsgChannelOpenAck

func NewMsgChannelOpenAck(
	portID, channelID string, cpv string, proofTry commitmenttypes.MerkleProof, proofHeight uint64,
	signer sdk.AccAddress,
) MsgChannelOpenAck

NewMsgChannelOpenAck creates a new MsgChannelOpenAck instance

func (*MsgChannelOpenAck) Descriptor

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

func (*MsgChannelOpenAck) GetChannelID

func (m *MsgChannelOpenAck) GetChannelID() string

func (*MsgChannelOpenAck) GetCounterpartyVersion

func (m *MsgChannelOpenAck) GetCounterpartyVersion() string

func (*MsgChannelOpenAck) GetPortID

func (m *MsgChannelOpenAck) GetPortID() string

func (*MsgChannelOpenAck) GetProofHeight

func (m *MsgChannelOpenAck) GetProofHeight() uint64

func (*MsgChannelOpenAck) GetProofTry

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

func (MsgChannelOpenAck) GetSignBytes

func (msg MsgChannelOpenAck) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgChannelOpenAck) GetSigner

func (MsgChannelOpenAck) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgChannelOpenAck) Marshal

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

func (*MsgChannelOpenAck) MarshalTo

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

func (*MsgChannelOpenAck) MarshalToSizedBuffer

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

func (*MsgChannelOpenAck) ProtoMessage

func (*MsgChannelOpenAck) ProtoMessage()

func (*MsgChannelOpenAck) Reset

func (m *MsgChannelOpenAck) Reset()

func (MsgChannelOpenAck) Route

func (msg MsgChannelOpenAck) Route() string

Route implements sdk.Msg

func (*MsgChannelOpenAck) Size

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

func (*MsgChannelOpenAck) String

func (m *MsgChannelOpenAck) String() string

func (MsgChannelOpenAck) Type

func (msg MsgChannelOpenAck) Type() string

Type implements sdk.Msg

func (*MsgChannelOpenAck) Unmarshal

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

func (MsgChannelOpenAck) ValidateBasic

func (msg MsgChannelOpenAck) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgChannelOpenAck) XXX_DiscardUnknown

func (m *MsgChannelOpenAck) XXX_DiscardUnknown()

func (*MsgChannelOpenAck) XXX_Marshal

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

func (*MsgChannelOpenAck) XXX_Merge

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

func (*MsgChannelOpenAck) XXX_Size

func (m *MsgChannelOpenAck) XXX_Size() int

func (*MsgChannelOpenAck) XXX_Unmarshal

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

type MsgChannelOpenConfirm

type MsgChannelOpenConfirm struct {
	PortID      string                                        `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
	ChannelID   string                                        `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"`
	ProofAck    types.MerkleProof                             `protobuf:"bytes,3,opt,name=proof_ack,json=proofAck,proto3" json:"proof_ack" yaml:"proof_ack"`
	ProofHeight uint64                                        `protobuf:"varint,4,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"`
	Signer      github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

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

func NewMsgChannelOpenConfirm

func NewMsgChannelOpenConfirm(
	portID, channelID string, proofAck commitmenttypes.MerkleProof, proofHeight uint64,
	signer sdk.AccAddress,
) MsgChannelOpenConfirm

NewMsgChannelOpenConfirm creates a new MsgChannelOpenConfirm instance

func (*MsgChannelOpenConfirm) Descriptor

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

func (*MsgChannelOpenConfirm) GetChannelID

func (m *MsgChannelOpenConfirm) GetChannelID() string

func (*MsgChannelOpenConfirm) GetPortID

func (m *MsgChannelOpenConfirm) GetPortID() string

func (*MsgChannelOpenConfirm) GetProofAck

func (m *MsgChannelOpenConfirm) GetProofAck() types.MerkleProof

func (*MsgChannelOpenConfirm) GetProofHeight

func (m *MsgChannelOpenConfirm) GetProofHeight() uint64

func (MsgChannelOpenConfirm) GetSignBytes

func (msg MsgChannelOpenConfirm) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgChannelOpenConfirm) GetSigner

func (MsgChannelOpenConfirm) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgChannelOpenConfirm) Marshal

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

func (*MsgChannelOpenConfirm) MarshalTo

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

func (*MsgChannelOpenConfirm) MarshalToSizedBuffer

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

func (*MsgChannelOpenConfirm) ProtoMessage

func (*MsgChannelOpenConfirm) ProtoMessage()

func (*MsgChannelOpenConfirm) Reset

func (m *MsgChannelOpenConfirm) Reset()

func (MsgChannelOpenConfirm) Route

func (msg MsgChannelOpenConfirm) Route() string

Route implements sdk.Msg

func (*MsgChannelOpenConfirm) Size

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

func (*MsgChannelOpenConfirm) String

func (m *MsgChannelOpenConfirm) String() string

func (MsgChannelOpenConfirm) Type

func (msg MsgChannelOpenConfirm) Type() string

Type implements sdk.Msg

func (*MsgChannelOpenConfirm) Unmarshal

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

func (MsgChannelOpenConfirm) ValidateBasic

func (msg MsgChannelOpenConfirm) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgChannelOpenConfirm) XXX_DiscardUnknown

func (m *MsgChannelOpenConfirm) XXX_DiscardUnknown()

func (*MsgChannelOpenConfirm) XXX_Marshal

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

func (*MsgChannelOpenConfirm) XXX_Merge

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

func (*MsgChannelOpenConfirm) XXX_Size

func (m *MsgChannelOpenConfirm) XXX_Size() int

func (*MsgChannelOpenConfirm) XXX_Unmarshal

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

type MsgChannelOpenInit

type MsgChannelOpenInit struct {
	PortID    string                                        `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
	ChannelID string                                        `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"`
	Channel   Channel                                       `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel"`
	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"`
}

MsgChannelOpenInit defines an sdk.Msg to initialize a channel handshake. It is called by a relayer on Chain A.

func NewMsgChannelOpenInit

func NewMsgChannelOpenInit(
	portID, channelID string, version string, channelOrder Order, connectionHops []string,
	counterpartyPortID, counterpartyChannelID string, signer sdk.AccAddress,
) MsgChannelOpenInit

NewMsgChannelOpenInit creates a new MsgChannelCloseInit MsgChannelOpenInit

func (*MsgChannelOpenInit) Descriptor

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

func (*MsgChannelOpenInit) GetChannel

func (m *MsgChannelOpenInit) GetChannel() Channel

func (*MsgChannelOpenInit) GetChannelID

func (m *MsgChannelOpenInit) GetChannelID() string

func (*MsgChannelOpenInit) GetPortID

func (m *MsgChannelOpenInit) GetPortID() string

func (MsgChannelOpenInit) GetSignBytes

func (msg MsgChannelOpenInit) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgChannelOpenInit) GetSigner

func (MsgChannelOpenInit) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgChannelOpenInit) Marshal

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

func (*MsgChannelOpenInit) MarshalTo

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

func (*MsgChannelOpenInit) MarshalToSizedBuffer

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

func (*MsgChannelOpenInit) ProtoMessage

func (*MsgChannelOpenInit) ProtoMessage()

func (*MsgChannelOpenInit) Reset

func (m *MsgChannelOpenInit) Reset()

func (MsgChannelOpenInit) Route

func (msg MsgChannelOpenInit) Route() string

Route implements sdk.Msg

func (*MsgChannelOpenInit) Size

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

func (*MsgChannelOpenInit) String

func (m *MsgChannelOpenInit) String() string

func (MsgChannelOpenInit) Type

func (msg MsgChannelOpenInit) Type() string

Type implements sdk.Msg

func (*MsgChannelOpenInit) Unmarshal

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

func (MsgChannelOpenInit) ValidateBasic

func (msg MsgChannelOpenInit) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgChannelOpenInit) XXX_DiscardUnknown

func (m *MsgChannelOpenInit) XXX_DiscardUnknown()

func (*MsgChannelOpenInit) XXX_Marshal

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

func (*MsgChannelOpenInit) XXX_Merge

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

func (*MsgChannelOpenInit) XXX_Size

func (m *MsgChannelOpenInit) XXX_Size() int

func (*MsgChannelOpenInit) XXX_Unmarshal

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

type MsgChannelOpenTry

type MsgChannelOpenTry struct {
	PortID              string                                        `protobuf:"bytes,1,opt,name=port_id,json=portId,proto3" json:"port_id,omitempty" yaml:"port_id"`
	ChannelID           string                                        `protobuf:"bytes,2,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty" yaml:"channel_id"`
	Channel             Channel                                       `protobuf:"bytes,3,opt,name=channel,proto3" json:"channel"`
	CounterpartyVersion string                                        `` /* 146-byte string literal not displayed */
	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" yaml:"proof_height"`
	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"`
}

MsgChannelOpenInit defines a msg sent by a Relayer to try to open a channel on Chain B.

func NewMsgChannelOpenTry

func NewMsgChannelOpenTry(
	portID, channelID, version string, channelOrder Order, connectionHops []string,
	counterpartyPortID, counterpartyChannelID, counterpartyVersion string,
	proofInit commitmenttypes.MerkleProof, proofHeight uint64, signer sdk.AccAddress,
) MsgChannelOpenTry

NewMsgChannelOpenTry creates a new MsgChannelOpenTry instance

func (*MsgChannelOpenTry) Descriptor

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

func (*MsgChannelOpenTry) GetChannel

func (m *MsgChannelOpenTry) GetChannel() Channel

func (*MsgChannelOpenTry) GetChannelID

func (m *MsgChannelOpenTry) GetChannelID() string

func (*MsgChannelOpenTry) GetCounterpartyVersion

func (m *MsgChannelOpenTry) GetCounterpartyVersion() string

func (*MsgChannelOpenTry) GetPortID

func (m *MsgChannelOpenTry) GetPortID() string

func (*MsgChannelOpenTry) GetProofHeight

func (m *MsgChannelOpenTry) GetProofHeight() uint64

func (*MsgChannelOpenTry) GetProofInit

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

func (MsgChannelOpenTry) GetSignBytes

func (msg MsgChannelOpenTry) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgChannelOpenTry) GetSigner

func (MsgChannelOpenTry) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgChannelOpenTry) Marshal

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

func (*MsgChannelOpenTry) MarshalTo

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

func (*MsgChannelOpenTry) MarshalToSizedBuffer

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

func (*MsgChannelOpenTry) ProtoMessage

func (*MsgChannelOpenTry) ProtoMessage()

func (*MsgChannelOpenTry) Reset

func (m *MsgChannelOpenTry) Reset()

func (MsgChannelOpenTry) Route

func (msg MsgChannelOpenTry) Route() string

Route implements sdk.Msg

func (*MsgChannelOpenTry) Size

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

func (*MsgChannelOpenTry) String

func (m *MsgChannelOpenTry) String() string

func (MsgChannelOpenTry) Type

func (msg MsgChannelOpenTry) Type() string

Type implements sdk.Msg

func (*MsgChannelOpenTry) Unmarshal

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

func (MsgChannelOpenTry) ValidateBasic

func (msg MsgChannelOpenTry) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgChannelOpenTry) XXX_DiscardUnknown

func (m *MsgChannelOpenTry) XXX_DiscardUnknown()

func (*MsgChannelOpenTry) XXX_Marshal

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

func (*MsgChannelOpenTry) XXX_Merge

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

func (*MsgChannelOpenTry) XXX_Size

func (m *MsgChannelOpenTry) XXX_Size() int

func (*MsgChannelOpenTry) XXX_Unmarshal

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

type MsgPacket

type MsgPacket struct {
	Packet      Packet                                        `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"`
	Proof       types.MerkleProof                             `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof"`
	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"`
}

MsgPacket receives incoming IBC packet

func NewMsgPacket

func NewMsgPacket(
	packet Packet, proof commitmenttypes.MerkleProof, proofHeight uint64,
	signer sdk.AccAddress,
) MsgPacket

NewMsgPacket constructs new MsgPacket

func (*MsgPacket) Descriptor

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

func (MsgPacket) GetDataSignBytes

func (msg MsgPacket) GetDataSignBytes() []byte

GetDataSignBytes returns the base64-encoded bytes used for the data field when signing the packet.

func (*MsgPacket) GetPacket

func (m *MsgPacket) GetPacket() Packet

func (*MsgPacket) GetProof

func (m *MsgPacket) GetProof() types.MerkleProof

func (*MsgPacket) GetProofHeight

func (m *MsgPacket) GetProofHeight() uint64

func (MsgPacket) GetSignBytes

func (msg MsgPacket) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgPacket) GetSigner

func (MsgPacket) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgPacket) Marshal

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

func (*MsgPacket) MarshalTo

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

func (*MsgPacket) MarshalToSizedBuffer

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

func (*MsgPacket) ProtoMessage

func (*MsgPacket) ProtoMessage()

func (*MsgPacket) Reset

func (m *MsgPacket) Reset()

func (MsgPacket) Route

func (msg MsgPacket) Route() string

Route implements sdk.Msg

func (*MsgPacket) Size

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

func (*MsgPacket) String

func (m *MsgPacket) String() string

func (MsgPacket) Type

func (msg MsgPacket) Type() string

Type implements sdk.Msg

func (*MsgPacket) Unmarshal

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

func (MsgPacket) ValidateBasic

func (msg MsgPacket) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgPacket) XXX_DiscardUnknown

func (m *MsgPacket) XXX_DiscardUnknown()

func (*MsgPacket) XXX_Marshal

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

func (*MsgPacket) XXX_Merge

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

func (*MsgPacket) XXX_Size

func (m *MsgPacket) XXX_Size() int

func (*MsgPacket) XXX_Unmarshal

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

type MsgTimeout

type MsgTimeout struct {
	Packet           Packet                                        `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet"`
	Proof            types.MerkleProof                             `protobuf:"bytes,2,opt,name=proof,proto3" json:"proof"`
	ProofHeight      uint64                                        `protobuf:"varint,3,opt,name=proof_height,json=proofHeight,proto3" json:"proof_height,omitempty" yaml:"proof_height"`
	NextSequenceRecv uint64                                        `` /* 138-byte string literal not displayed */
	Signer           github_com_cosmos_cosmos_sdk_types.AccAddress `protobuf:"bytes,5,opt,name=signer,proto3,casttype=github.com/cosmos/cosmos-sdk/types.AccAddress" json:"signer,omitempty"`
}

MsgTimeout receives timed-out packet

func NewMsgTimeout

func NewMsgTimeout(
	packet Packet, nextSequenceRecv uint64, proof commitmenttypes.MerkleProof,
	proofHeight uint64, signer sdk.AccAddress,
) MsgTimeout

NewMsgTimeout constructs new MsgTimeout

func (*MsgTimeout) Descriptor

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

func (*MsgTimeout) GetNextSequenceRecv

func (m *MsgTimeout) GetNextSequenceRecv() uint64

func (*MsgTimeout) GetPacket

func (m *MsgTimeout) GetPacket() Packet

func (*MsgTimeout) GetProof

func (m *MsgTimeout) GetProof() types.MerkleProof

func (*MsgTimeout) GetProofHeight

func (m *MsgTimeout) GetProofHeight() uint64

func (MsgTimeout) GetSignBytes

func (msg MsgTimeout) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (*MsgTimeout) GetSigner

func (MsgTimeout) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgTimeout) Marshal

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

func (*MsgTimeout) MarshalTo

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

func (*MsgTimeout) MarshalToSizedBuffer

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

func (*MsgTimeout) ProtoMessage

func (*MsgTimeout) ProtoMessage()

func (*MsgTimeout) Reset

func (m *MsgTimeout) Reset()

func (MsgTimeout) Route

func (msg MsgTimeout) Route() string

Route implements sdk.Msg

func (*MsgTimeout) Size

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

func (*MsgTimeout) String

func (m *MsgTimeout) String() string

func (MsgTimeout) Type

func (msg MsgTimeout) Type() string

Type implements sdk.Msg

func (*MsgTimeout) Unmarshal

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

func (MsgTimeout) ValidateBasic

func (msg MsgTimeout) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgTimeout) XXX_DiscardUnknown

func (m *MsgTimeout) XXX_DiscardUnknown()

func (*MsgTimeout) XXX_Marshal

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

func (*MsgTimeout) XXX_Merge

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

func (*MsgTimeout) XXX_Size

func (m *MsgTimeout) XXX_Size() int

func (*MsgTimeout) XXX_Unmarshal

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

type Order

type Order int32

Order defines if a channel is ORDERED or UNORDERED

const (
	// zero-value for channel ordering
	NONE Order = 0
	// packets can be delivered in any order, which may differ from the order in which they were sent.
	UNORDERED Order = 1
	// packets are delivered exactly in the order which they were sent
	ORDERED Order = 2
)

func (Order) EnumDescriptor

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

func (Order) String

func (x Order) String() string

type Packet

type Packet struct {
	// number corresponds to the order of sends and receives, where a Packet with
	// an earlier sequence number must be sent and received before a Packet with a
	// later sequence number.
	Sequence uint64 `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	// identifies the port on the sending chain.
	SourcePort string `protobuf:"bytes,2,opt,name=source_port,json=sourcePort,proto3" json:"source_port,omitempty" yaml:"source_port"`
	// identifies the channel end on the sending chain.
	SourceChannel string `protobuf:"bytes,3,opt,name=source_channel,json=sourceChannel,proto3" json:"source_channel,omitempty" yaml:"source_channel"`
	// identifies the port on the receiving chain.
	DestinationPort string `` /* 130-byte string literal not displayed */
	// identifies the channel end on the receiving chain.
	DestinationChannel string `` /* 142-byte string literal not displayed */
	// actual opaque bytes transferred directly to the application module
	Data []byte `protobuf:"bytes,6,opt,name=data,proto3" json:"data,omitempty"`
	// block height after which the packet times out
	TimeoutHeight uint64 `protobuf:"varint,7,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty" yaml:"timeout_height"`
	// block timestamp (in nanoseconds) after which the packet times out
	TimeoutTimestamp uint64 `` /* 135-byte string literal not displayed */
}

Packet defines a type that carries data across different chains through IBC

func NewPacket

func NewPacket(
	data []byte,
	sequence uint64, sourcePort, sourceChannel,
	destinationPort, destinationChannel string,
	timeoutHeight uint64, timeoutTimestamp uint64,
) Packet

NewPacket creates a new Packet instance. It panics if the provided packet data interface is not registered.

func (*Packet) Descriptor

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

func (Packet) GetData

func (p Packet) GetData() []byte

GetData implements PacketI interface

func (Packet) GetDestChannel

func (p Packet) GetDestChannel() string

GetDestChannel implements PacketI interface

func (Packet) GetDestPort

func (p Packet) GetDestPort() string

GetDestPort implements PacketI interface

func (Packet) GetSequence

func (p Packet) GetSequence() uint64

GetSequence implements PacketI interface

func (Packet) GetSourceChannel

func (p Packet) GetSourceChannel() string

GetSourceChannel implements PacketI interface

func (Packet) GetSourcePort

func (p Packet) GetSourcePort() string

GetSourcePort implements PacketI interface

func (Packet) GetTimeoutHeight

func (p Packet) GetTimeoutHeight() uint64

GetTimeoutHeight implements PacketI interface

func (Packet) GetTimeoutTimestamp

func (p Packet) GetTimeoutTimestamp() uint64

GetTimeoutTimestamp implements PacketI interface

func (*Packet) Marshal

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

func (*Packet) MarshalTo

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

func (*Packet) MarshalToSizedBuffer

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

func (*Packet) ProtoMessage

func (*Packet) ProtoMessage()

func (*Packet) Reset

func (m *Packet) Reset()

func (*Packet) Size

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

func (*Packet) String

func (m *Packet) String() string

func (*Packet) Unmarshal

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

func (Packet) ValidateBasic

func (p Packet) ValidateBasic() error

ValidateBasic implements PacketI interface

func (*Packet) XXX_DiscardUnknown

func (m *Packet) XXX_DiscardUnknown()

func (*Packet) XXX_Marshal

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

func (*Packet) XXX_Merge

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

func (*Packet) XXX_Size

func (m *Packet) XXX_Size() int

func (*Packet) XXX_Unmarshal

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

type PacketAckCommitment

type PacketAckCommitment struct {
	PortID    string `json:"port_id" yaml:"port_id"`
	ChannelID string `json:"channel_id" yaml:"channel_id"`
	Sequence  uint64 `json:"sequence" yaml:"sequence"`
	Hash      []byte `json:"hash" yaml:"hash"`
}

PacketAckCommitment defines the genesis type necessary to retrieve and store acknowlegements.

func NewPacketAckCommitment

func NewPacketAckCommitment(portID, channelID string, seq uint64, hash []byte) PacketAckCommitment

NewPacketAckCommitment creates a new PacketAckCommitment instance.

func (PacketAckCommitment) Validate

func (pa PacketAckCommitment) Validate() error

Validate performs basic validation of fields returning an error upon any failure.

type PacketResponse

type PacketResponse struct {
	Packet      Packet                      `json:"packet" yaml:"packet"`
	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"`
}

PacketResponse defines the client query response for a packet which also includes a proof, its path and the height form which the proof was retrieved

func NewPacketResponse

func NewPacketResponse(
	portID, channelID string, sequence uint64, packet Packet, proof *merkle.Proof, height int64,
) PacketResponse

NewPacketResponse creates a new PacketResponswe instance

type PacketSequence

type PacketSequence struct {
	PortID    string `json:"port_id" yaml:"port_id"`
	ChannelID string `json:"channel_id" yaml:"channel_id"`
	Sequence  uint64 `json:"sequence" yaml:"sequence"`
}

PacketSequence defines the genesis type necessary to retrieve and store next send and receive sequences.

func NewPacketSequence

func NewPacketSequence(portID, channelID string, seq uint64) PacketSequence

NewPacketSequence creates a new PacketSequences instance.

func (PacketSequence) Validate

func (ps PacketSequence) Validate() error

Validate performs basic validation of fields returning an error upon any failure.

type PortKeeper

type PortKeeper interface {
	Authenticate(ctx sdk.Context, key *capability.Capability, portID string) bool
}

PortKeeper expected account IBC port keeper

type QueryAllChannelsParams

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

QueryAllChannelsParams defines the parameters necessary for querying for all channels.

func NewQueryAllChannelsParams

func NewQueryAllChannelsParams(page, limit int) QueryAllChannelsParams

NewQueryAllChannelsParams creates a new QueryAllChannelsParams instance.

type QueryConnectionChannelsParams

type QueryConnectionChannelsParams struct {
	Connection string `json:"connection" yaml:"connection"`
	Page       int    `json:"page" yaml:"page"`
	Limit      int    `json:"limit" yaml:"limit"`
}

QueryConnectionChannelsParams defines the parameters necessary for querying for all channels associated with a given connection.

func NewQueryConnectionChannelsParams

func NewQueryConnectionChannelsParams(connection string, page, limit int) QueryConnectionChannelsParams

NewQueryConnectionChannelsParams creates a new QueryConnectionChannelsParams instance.

type RecvResponse

type RecvResponse struct {
	NextSequenceRecv uint64                      `json:"next_sequence_recv" yaml:"next_sequence_recv"`
	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"`
}

RecvResponse defines the client query response for the next receive sequence number which also includes a proof, its path and the height form which the proof was retrieved

func NewRecvResponse

func NewRecvResponse(
	portID, channelID string, sequenceRecv uint64, proof *merkle.Proof, height int64,
) RecvResponse

NewRecvResponse creates a new RecvResponse instance

type State

type State int32

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

const (
	// Default State
	UNINITIALIZED State = 0
	// A channel has just started the opening handshake.
	INIT State = 1
	// A channel has acknowledged the handshake step on the counterparty chain.
	TRYOPEN State = 2
	// A channel has completed the handshake. Open channels are
	// ready to send and receive packets.
	OPEN State = 3
	// A channel has been closed and can no longer be used to send or receive packets.
	CLOSED State = 4
)

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