Documentation ¶
Index ¶
- Constants
- Variables
- func PackCrossChainChannel(xcc XCC) (*codectypes.Any, error)
- func RegisterInterfaces(registry codectypes.InterfaceRegistry)
- type ChannelInfo
- func (*ChannelInfo) Descriptor() ([]byte, []int)
- func (ci *ChannelInfo) Equal(other XCC) bool
- func (m *ChannelInfo) Marshal() (dAtA []byte, err error)
- func (m *ChannelInfo) MarshalTo(dAtA []byte) (int, error)
- func (m *ChannelInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (*ChannelInfo) ProtoMessage()
- func (m *ChannelInfo) Reset()
- func (m *ChannelInfo) Size() (n int)
- func (m *ChannelInfo) String() string
- func (ci ChannelInfo) Type() string
- func (m *ChannelInfo) Unmarshal(dAtA []byte) error
- func (m *ChannelInfo) XXX_DiscardUnknown()
- func (m *ChannelInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *ChannelInfo) XXX_Merge(src proto.Message)
- func (m *ChannelInfo) XXX_Size() int
- func (m *ChannelInfo) XXX_Unmarshal(b []byte) error
- type ChannelInfoResolver
- func (r ChannelInfoResolver) Capabilities() XCCResolverCapabilities
- func (r ChannelInfoResolver) ConvertCrossChainChannel(ctx sdk.Context, calleeXCC XCC, callerXCC XCC) (XCC, error)
- func (ChannelInfoResolver) GetSelfCrossChainChannel(ctx sdk.Context) XCC
- func (r ChannelInfoResolver) IsSelfCrossChainChannel(ctx sdk.Context, xcc XCC) bool
- func (r ChannelInfoResolver) ResolveChannel(ctx sdk.Context, channel *ChannelInfo) (XCC, error)
- func (r ChannelInfoResolver) ResolveCrossChainChannel(ctx sdk.Context, xcc XCC) (*ChannelInfo, error)
- type ChannelKeeper
- type CommitProtocol
- type XCC
- type XCCResolver
- type XCCResolverCapabilities
Constants ¶
const (
// ModuleName defines the module name
ModuleName = "xcc"
)
Variables ¶
var ( ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )
var ( // ModuleCdc references the global x/ibc-transfer module codec. Note, the codec // should ONLY be used in certain instances of tests and for JSON encoding. // // The actual codec used for serialization should be provided to x/ibc-transfer and // defined at the application level. ModuleCdc = codec.NewProtoCodec(codectypes.NewInterfaceRegistry()) )
Functions ¶
func PackCrossChainChannel ¶
func PackCrossChainChannel(xcc XCC) (*codectypes.Any, error)
func RegisterInterfaces ¶
func RegisterInterfaces(registry codectypes.InterfaceRegistry)
RegisterInterfaces register the ibc transfer module interfaces to protobuf Any.
Types ¶
type ChannelInfo ¶
type ChannelInfo struct { Port string `protobuf:"bytes,1,opt,name=port,proto3" json:"port,omitempty"` Channel string `protobuf:"bytes,2,opt,name=channel,proto3" json:"channel,omitempty"` }
func (*ChannelInfo) Descriptor ¶
func (*ChannelInfo) Descriptor() ([]byte, []int)
func (*ChannelInfo) Equal ¶
func (ci *ChannelInfo) Equal(other XCC) bool
func (*ChannelInfo) Marshal ¶
func (m *ChannelInfo) Marshal() (dAtA []byte, err error)
func (*ChannelInfo) MarshalToSizedBuffer ¶
func (m *ChannelInfo) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*ChannelInfo) ProtoMessage ¶
func (*ChannelInfo) ProtoMessage()
func (*ChannelInfo) Reset ¶
func (m *ChannelInfo) Reset()
func (*ChannelInfo) Size ¶
func (m *ChannelInfo) Size() (n int)
func (*ChannelInfo) String ¶
func (m *ChannelInfo) String() string
func (ChannelInfo) Type ¶
func (ci ChannelInfo) Type() string
Type implements CrossChainChannel.Type
func (*ChannelInfo) Unmarshal ¶
func (m *ChannelInfo) Unmarshal(dAtA []byte) error
func (*ChannelInfo) XXX_DiscardUnknown ¶
func (m *ChannelInfo) XXX_DiscardUnknown()
func (*ChannelInfo) XXX_Marshal ¶
func (m *ChannelInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ChannelInfo) XXX_Merge ¶
func (m *ChannelInfo) XXX_Merge(src proto.Message)
func (*ChannelInfo) XXX_Size ¶
func (m *ChannelInfo) XXX_Size() int
func (*ChannelInfo) XXX_Unmarshal ¶
func (m *ChannelInfo) XXX_Unmarshal(b []byte) error
type ChannelInfoResolver ¶
type ChannelInfoResolver struct {
// contains filtered or unexported fields
}
ChannelInfoResolver just returns a given ChannelInfo as is.
func NewChannelInfoResolver ¶
func NewChannelInfoResolver(channelKeeper ChannelKeeper) ChannelInfoResolver
NewChannelInfoResolver creates a new instance of ChannelInfoResolver
func (ChannelInfoResolver) Capabilities ¶
func (r ChannelInfoResolver) Capabilities() XCCResolverCapabilities
Capabilities implements CrossChainChannelResolver.Capabilities
func (ChannelInfoResolver) ConvertCrossChainChannel ¶
func (r ChannelInfoResolver) ConvertCrossChainChannel(ctx sdk.Context, calleeXCC XCC, callerXCC XCC) (XCC, error)
ConvertCrossChainChannel returns a xcc of callee in caller's context
func (ChannelInfoResolver) GetSelfCrossChainChannel ¶
func (ChannelInfoResolver) GetSelfCrossChainChannel(ctx sdk.Context) XCC
GetSelfCrossChainChannel implements CrossChainChannelResolver.GetSelfCrossChainChannel
func (ChannelInfoResolver) IsSelfCrossChainChannel ¶
func (r ChannelInfoResolver) IsSelfCrossChainChannel(ctx sdk.Context, xcc XCC) bool
IsSelfCrossChainChannel implements CrossChainChannelResolver.IsSelfCrossChainChannel
func (ChannelInfoResolver) ResolveChannel ¶
func (r ChannelInfoResolver) ResolveChannel(ctx sdk.Context, channel *ChannelInfo) (XCC, error)
ResolveChannel implements CrossChainChannelResolver.ResolveChannel
func (ChannelInfoResolver) ResolveCrossChainChannel ¶
func (r ChannelInfoResolver) ResolveCrossChainChannel(ctx sdk.Context, xcc XCC) (*ChannelInfo, error)
ResolveCrossChainChannel implements CrossChainChannelResolver.ResolveCrossChainChannel
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 CommitProtocol ¶
type CommitProtocol = uint32
type XCC ¶
Channel represents a channel of chain that contains a contract function to be called
func UnpackCrossChainChannel ¶
type XCCResolver ¶
type XCCResolver interface { ResolveCrossChainChannel(ctx sdk.Context, xcc XCC) (*ChannelInfo, error) ResolveChannel(ctx sdk.Context, channel *ChannelInfo) (XCC, error) ConvertCrossChainChannel(ctx sdk.Context, calleeXCC XCC, callerXCC XCC) (calleeXCCOnCaller XCC, err error) GetSelfCrossChainChannel(ctx sdk.Context) XCC IsSelfCrossChainChannel(ctx sdk.Context, xcc XCC) bool Capabilities() XCCResolverCapabilities }
XCCResolver defines the interface of resolver resolves cross-chain channel to ChannelInfo
type XCCResolverCapabilities ¶
type XCCResolverCapabilities interface { // CrossChainCalls returns true if support for cross-chain calls is enabled. CrossChainCalls(ctx sdk.Context) bool }
XCCResolverCapabilities defines the capabilities for the ChainResolver