github.com/fibonacci-chain/fbc@v0.0.0-20231124064014-c7636198c1e9/libs/ibc-go/modules/core/exported/channel.go (about)

     1  package exported
     2  
     3  // ChannelI defines the standard interface for a channel end.
     4  type ChannelI interface {
     5  	GetState() int32
     6  	GetOrdering() int32
     7  	GetCounterparty() CounterpartyChannelI
     8  	GetConnectionHops() []string
     9  	GetVersion() string
    10  	ValidateBasic() error
    11  }
    12  
    13  // CounterpartyChannelI defines the standard interface for a channel end's
    14  // counterparty.
    15  type CounterpartyChannelI interface {
    16  	GetPortID() string
    17  	GetChannelID() string
    18  	ValidateBasic() error
    19  }
    20  
    21  // PacketI defines the standard interface for IBC packets
    22  type PacketI interface {
    23  	GetSequence() uint64
    24  	GetTimeoutHeight() Height
    25  	GetTimeoutTimestamp() uint64
    26  	GetSourcePort() string
    27  	GetSourceChannel() string
    28  	GetDestPort() string
    29  	GetDestChannel() string
    30  	GetData() []byte
    31  	ValidateBasic() error
    32  }
    33  
    34  // Acknowledgement defines the interface used to return
    35  // acknowledgements in the OnRecvPacket callback.
    36  type Acknowledgement interface {
    37  	Success() bool
    38  	Acknowledgement() []byte
    39  }