func (p Packet) ValidateBasic() error {
	if p.Sequence == 0 {
		return sdkerrors.Wrap(ErrInvalidPacket, "packet sequence cannot be 0")
	}
	if len(p.Data) == 0 {
		return sdkerrors.Wrap(ErrInvalidPacket, "packet data bytes cannot be empty")
	}
	return nil
}
ValidateBasic implements PacketI interface
package types
import (
	"crypto/sha256"
	"github.com/cosmos/cosmos-sdk/codec"
	codectypes "github.com/cosmos/cosmos-sdk/codec/types"
	sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
	"github.com/bianjieai/tibc-go/modules/tibc/core/exported"
)
func CommitPacket(packet exported.PacketI) []byte {
	dataHash := sha256.Sum256(packet.GetData())
	return dataHash[:]
}
func CommitAcknowledgement(data []byte) []byte {
	hash := sha256.Sum256(data)
	return hash[:]
}
var (
	_         exported.PacketI = (*Packet)(nil)
	ModuleCdc                  = codec.NewProtoCodec(codectypes.NewInterfaceRegistry())
)
func NewPacket(
	data []byte, sequence uint64, sourceChain, destinationChain, relayChain, port string,
) Packet {
	return Packet{
		Data:             data,
		Sequence:         sequence,
		SourceChain:      sourceChain,
		DestinationChain: destinationChain,
		RelayChain:       relayChain,
		Port:             port,
	}
}
func (p Packet) GetSequence() uint64 { return p.Sequence }
func (p Packet) GetPort() string { return p.Port }
func (p Packet) GetSourceChain() string { return p.SourceChain }
func (p Packet) GetDestChain() string { return p.DestinationChain }
func (p Packet) GetRelayChain() string { return p.RelayChain }
func (p Packet) GetData() []byte { return p.Data }