types

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// module name
	ModuleName = "vibc"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName
)
View Source
const RouterKey = ModuleName // this was defined in your key.go file

Variables

View Source
var (
	ErrInvalidLengthMsgs        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowMsgs          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupMsgs = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (

	// ModuleCdc references the global x/deployment 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/swingset and
	// defined at the application level.
	ModuleCdc = codec.NewProtoCodec(cdctypes.NewInterfaceRegistry())
)

Functions

func RegisterCodec

func RegisterCodec(cdc *codec.LegacyAmino)

RegisterCodec registers concrete types on the Amino codec

func RegisterInterfaces

func RegisterInterfaces(registry cdctypes.InterfaceRegistry)

RegisterInterfaces registers the x/swingset interfaces types with the interface registry

func RegisterMsgServer

func RegisterMsgServer(s grpc1.Server, srv MsgServer)

Types

type ChannelKeeper

type ChannelKeeper interface {
	GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channel.Channel, found bool)
	GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool)
	SendPacket(ctx sdk.Context, channelCap *capability.Capability, packet ibcexported.PacketI) error
	WriteAcknowledgement(ctx sdk.Context, channelCap *capability.Capability, packet ibcexported.PacketI, acknowledgement ibcexported.Acknowledgement) error
	ChanOpenInit(ctx sdk.Context, order channel.Order, connectionHops []string, portID string,
		portCap *capability.Capability, counterparty channel.Counterparty, version string) (string, *capability.Capability, error)

	ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capability.Capability) error
	TimeoutExecuted(ctx sdk.Context, channelCap *capability.Capability, packet ibcexported.PacketI) error
}

ChannelKeeper defines the expected IBC channel keeper

type ClientKeeper

type ClientKeeper interface {
	GetClientConsensusState(ctx sdk.Context, clientID string) (connection ibcexported.ConsensusState, found bool)
}

ClientKeeper defines the expected IBC client keeper

type ConnectionKeeper

type ConnectionKeeper interface {
	GetConnection(ctx sdk.Context, connectionID string) (connection connection.ConnectionEnd, found bool)
}

ConnectionKeeper defines the expected IBC connection keeper

type MsgClient

type MsgClient interface {
	// Force sending an arbitrary packet on a channel.
	SendPacket(ctx context.Context, in *MsgSendPacket, opts ...grpc.CallOption) (*MsgSendPacketResponse, error)
}

MsgClient is the client API for Msg service.

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

func NewMsgClient

func NewMsgClient(cc grpc1.ClientConn) MsgClient

type MsgSendPacket

type MsgSendPacket struct {
	Packet types.Packet                                  `protobuf:"bytes,1,opt,name=packet,proto3" json:"packet" yaml:"packet"`
	Sender github_com_cosmos_cosmos_sdk_types.AccAddress `` /* 130-byte string literal not displayed */
}

MsgSendPacket is an SDK message for sending an outgoing IBC packet

func NewMsgSendPacket

func NewMsgSendPacket(packet chanTypes.Packet, sender sdk.AccAddress) *MsgSendPacket

NewMsgSendPacket returns a new send request

func (*MsgSendPacket) Descriptor

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

func (*MsgSendPacket) GetPacket

func (m *MsgSendPacket) GetPacket() types.Packet

func (*MsgSendPacket) GetSender

func (MsgSendPacket) GetSignBytes

func (msg MsgSendPacket) GetSignBytes() []byte

GetSignBytes implements sdk.Msg

func (MsgSendPacket) GetSigners

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

GetSigners implements sdk.Msg

func (*MsgSendPacket) Marshal

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

func (*MsgSendPacket) MarshalTo

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

func (*MsgSendPacket) MarshalToSizedBuffer

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

func (*MsgSendPacket) ProtoMessage

func (*MsgSendPacket) ProtoMessage()

func (*MsgSendPacket) Reset

func (m *MsgSendPacket) Reset()

func (MsgSendPacket) Route

func (msg MsgSendPacket) Route() string

Route implements sdk.Msg

func (*MsgSendPacket) Size

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

func (*MsgSendPacket) String

func (m *MsgSendPacket) String() string

func (MsgSendPacket) Type

func (msg MsgSendPacket) Type() string

Type implements sdk.Msg

func (*MsgSendPacket) Unmarshal

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

func (MsgSendPacket) ValidateBasic

func (msg MsgSendPacket) ValidateBasic() error

ValidateBasic implements sdk.Msg

func (*MsgSendPacket) XXX_DiscardUnknown

func (m *MsgSendPacket) XXX_DiscardUnknown()

func (*MsgSendPacket) XXX_Marshal

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

func (*MsgSendPacket) XXX_Merge

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

func (*MsgSendPacket) XXX_Size

func (m *MsgSendPacket) XXX_Size() int

func (*MsgSendPacket) XXX_Unmarshal

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

type MsgSendPacketResponse

type MsgSendPacketResponse struct {
}

Empty response for SendPacket.

func (*MsgSendPacketResponse) Descriptor

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

func (*MsgSendPacketResponse) Marshal

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

func (*MsgSendPacketResponse) MarshalTo

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

func (*MsgSendPacketResponse) MarshalToSizedBuffer

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

func (*MsgSendPacketResponse) ProtoMessage

func (*MsgSendPacketResponse) ProtoMessage()

func (*MsgSendPacketResponse) Reset

func (m *MsgSendPacketResponse) Reset()

func (*MsgSendPacketResponse) Size

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

func (*MsgSendPacketResponse) String

func (m *MsgSendPacketResponse) String() string

func (*MsgSendPacketResponse) Unmarshal

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

func (*MsgSendPacketResponse) XXX_DiscardUnknown

func (m *MsgSendPacketResponse) XXX_DiscardUnknown()

func (*MsgSendPacketResponse) XXX_Marshal

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

func (*MsgSendPacketResponse) XXX_Merge

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

func (*MsgSendPacketResponse) XXX_Size

func (m *MsgSendPacketResponse) XXX_Size() int

func (*MsgSendPacketResponse) XXX_Unmarshal

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

type MsgServer

type MsgServer interface {
	// Force sending an arbitrary packet on a channel.
	SendPacket(context.Context, *MsgSendPacket) (*MsgSendPacketResponse, error)
}

MsgServer is the server API for Msg service.

type PortKeeper

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

PortKeeper defines the expected IBC port keeper

type UnimplementedMsgServer

type UnimplementedMsgServer struct {
}

UnimplementedMsgServer can be embedded to have forward compatible implementations.

func (*UnimplementedMsgServer) SendPacket

Jump to

Keyboard shortcuts

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