Documentation ¶
Index ¶
- Variables
- type ACKSender
- type ChannelKeeper
- type Header
- type IncomingPacket
- type IncomingPacketAcknowledgement
- type OutgoingPacket
- type OutgoingPacketAcknowledgement
- type PacketAcknowledgementData
- type PacketAcknowledgementPayload
- type PacketData
- type PacketDataPayload
- type PacketMiddleware
- type PacketSendKeeper
- type PacketSender
- type PortKeeper
- type TestPacketDataPayload
- func (*TestPacketDataPayload) Descriptor() ([]byte, []int)
- func (m *TestPacketDataPayload) Marshal() (dAtA []byte, err error)
- func (m *TestPacketDataPayload) MarshalTo(dAtA []byte) (int, error)
- func (m *TestPacketDataPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*TestPacketDataPayload) ProtoMessage()
- func (m *TestPacketDataPayload) Reset()
- func (m *TestPacketDataPayload) Size() (n int)
- func (m *TestPacketDataPayload) String() string
- func (m *TestPacketDataPayload) Unmarshal(dAtA []byte) error
- func (m *TestPacketDataPayload) XXX_DiscardUnknown()
- func (m *TestPacketDataPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TestPacketDataPayload) XXX_Merge(src proto.Message)
- func (m *TestPacketDataPayload) XXX_Size() int
- func (m *TestPacketDataPayload) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ACKSender ¶
type ACKSender interface { SendACK( ctx sdk.Context, ack OutgoingPacketAcknowledgement, ) error }
ACKSender defines packet acknowledgement sender interface
func NewBasicACKSender ¶
func NewBasicACKSender() ACKSender
NewBasicACKSender returns a new ACKSender instance
type ChannelKeeper ¶
type ChannelKeeper interface { GetChannel(ctx sdk.Context, srcPort, srcChan string) (channel channeltypes.Channel, found bool) GetNextSequenceSend(ctx sdk.Context, portID, channelID string) (uint64, bool) SendPacket(ctx sdk.Context, channelCap *capabilitytypes.Capability, packet ibcexported.PacketI) error ChanCloseInit(ctx sdk.Context, portID, channelID string, chanCap *capabilitytypes.Capability) error }
ChannelKeeper defines the expected IBC channel keeper
type IncomingPacket ¶
type IncomingPacket interface { exported.PacketI PacketData() PacketData Header() Header Payload() PacketDataPayload }
IncomingPacket defines the interface of incoming packet
func NewIncomingPacket ¶
func NewIncomingPacket(raw exported.PacketI, packetData PacketData, payload PacketDataPayload) IncomingPacket
NewIncomingPacket returns a new IncomingPacket
func UnmarshalIncomingPacket ¶ added in v0.0.9
type IncomingPacketAcknowledgement ¶
type IncomingPacketAcknowledgement interface { Data() PacketAcknowledgementData Header() Header Payload() PacketAcknowledgementPayload }
IncomingPacketAcknowledgement defines the interface of incoming packet acknowledgement
func NewIncomingPacketAcknowledgement ¶
func NewIncomingPacketAcknowledgement(h *Header, payload PacketAcknowledgementPayload) IncomingPacketAcknowledgement
NewIncomingPacketAcknowledgement returns a new IncomingPacketAcknowledgement
func UnmarshalIncomingPacketAcknowledgement ¶ added in v0.0.9
func UnmarshalIncomingPacketAcknowledgement(m codec.Codec, ack []byte) (IncomingPacketAcknowledgement, error)
type OutgoingPacket ¶
type OutgoingPacket interface { IncomingPacket SetPacketData(header Header, payload PacketDataPayload) }
OutgoingPacket defines the interface of outgoing packet
func NewOutgoingPacket ¶
func NewOutgoingPacket(raw exported.PacketI, packetData PacketData, payload PacketDataPayload) OutgoingPacket
NewOutgoingPacket returns a new OutgoingPacket
type OutgoingPacketAcknowledgement ¶
type OutgoingPacketAcknowledgement interface { IncomingPacketAcknowledgement SetData(header Header, payload PacketAcknowledgementPayload) }
OutgoingPacketAcknowledgement defines the interface of outgoing packet acknowledgement
func NewOutgoingPacketAcknowledgement ¶
func NewOutgoingPacketAcknowledgement(h *Header, payload PacketAcknowledgementPayload) OutgoingPacketAcknowledgement
NewOutgoingPacketAcknowledgement returns a new OutgoingPacketAcknowledgement
type PacketAcknowledgementData ¶
type PacketAcknowledgementData = PacketData
func NewPacketAcknowledgementData ¶
func NewPacketAcknowledgementData(h *Header, payload PacketAcknowledgementPayload) PacketAcknowledgementData
NewPacketAcknowledgementData returns a new PacketAcknowledgementData
type PacketAcknowledgementPayload ¶
PacketAcknowledgementPayload defines the interface of packet ack's payload
type PacketData ¶
type PacketData = sptypes.PacketData
func NewPacketData ¶
func NewPacketData(h *Header, payload PacketDataPayload) PacketData
NewPacketData returns a new packet data
type PacketDataPayload ¶
PacketDataPayload defines the interface of packet data's payload
type PacketMiddleware ¶
type PacketMiddleware interface { // HandleMsg handles sdk.Msg HandleMsg(ctx sdk.Context, msg sdk.Msg, ps PacketSender) (sdk.Context, PacketSender, error) // HandlePacket handles a packet HandlePacket(ctx sdk.Context, packet IncomingPacket, ps PacketSender, as ACKSender) (sdk.Context, PacketSender, ACKSender, error) // HandleACK handles a packet and packet ack HandleACK(ctx sdk.Context, packet IncomingPacket, ack IncomingPacketAcknowledgement, ps PacketSender) (sdk.Context, PacketSender, error) }
PacketMiddleware defines middleware interface of handling packets
func NewNOPPacketMiddleware ¶
func NewNOPPacketMiddleware() PacketMiddleware
NewNOPPacketMiddleware returns nopPacketMiddleware
type PacketSendKeeper ¶
type PacketSendKeeper struct {
// contains filtered or unexported fields
}
func NewPacketSendKeeper ¶
func NewPacketSendKeeper( cdc codec.Codec, channelKeeper ChannelKeeper, portKeeper PortKeeper, scopedKeeper capabilitykeeper.ScopedKeeper, ) PacketSendKeeper
func (PacketSendKeeper) SendPacket ¶
func (k PacketSendKeeper) SendPacket( ctx sdk.Context, packetSender PacketSender, payload PacketDataPayload, sourcePort, sourceChannel, destinationPort, destinationChannel string, timeoutHeight clienttypes.Height, timeoutTimestamp uint64, ) error
type PacketSender ¶
type PacketSender interface { SendPacket( ctx sdk.Context, channelCap *capabilitytypes.Capability, packet OutgoingPacket, ) error }
PacketSender defines packet-sender interface
func NewBasicPacketSender ¶
func NewBasicPacketSender(channelKeeper ChannelKeeper) PacketSender
NewBasicPacketSender returns a new PacketSender instance
type PortKeeper ¶
type PortKeeper interface {
BindPort(ctx sdk.Context, portID string) *capabilitytypes.Capability
}
PortKeeper defines the expected IBC port keeper
type TestPacketDataPayload ¶
type TestPacketDataPayload struct { }
func (*TestPacketDataPayload) Descriptor ¶
func (*TestPacketDataPayload) Descriptor() ([]byte, []int)
func (*TestPacketDataPayload) Marshal ¶
func (m *TestPacketDataPayload) Marshal() (dAtA []byte, err error)
func (*TestPacketDataPayload) MarshalTo ¶
func (m *TestPacketDataPayload) MarshalTo(dAtA []byte) (int, error)
func (*TestPacketDataPayload) MarshalToSizedBuffer ¶
func (m *TestPacketDataPayload) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*TestPacketDataPayload) ProtoMessage ¶
func (*TestPacketDataPayload) ProtoMessage()
func (*TestPacketDataPayload) Reset ¶
func (m *TestPacketDataPayload) Reset()
func (*TestPacketDataPayload) Size ¶
func (m *TestPacketDataPayload) Size() (n int)
func (*TestPacketDataPayload) String ¶
func (m *TestPacketDataPayload) String() string
func (*TestPacketDataPayload) Unmarshal ¶
func (m *TestPacketDataPayload) Unmarshal(dAtA []byte) error
func (*TestPacketDataPayload) XXX_DiscardUnknown ¶
func (m *TestPacketDataPayload) XXX_DiscardUnknown()
func (*TestPacketDataPayload) XXX_Marshal ¶
func (m *TestPacketDataPayload) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TestPacketDataPayload) XXX_Merge ¶
func (m *TestPacketDataPayload) XXX_Merge(src proto.Message)
func (*TestPacketDataPayload) XXX_Size ¶
func (m *TestPacketDataPayload) XXX_Size() int
func (*TestPacketDataPayload) XXX_Unmarshal ¶
func (m *TestPacketDataPayload) XXX_Unmarshal(b []byte) error