func (d *Data) MarshalBinary() ([]byte, error) {
	return d.ToProto().Marshal()
}
MarshalBinary encodes Data into binary form and returns it.
package types
import (
	"errors"
	pb "github.com/celestiaorg/optimint/types/pb/optimint"
	abci "github.com/tendermint/tendermint/abci/types"
)
func (b *Block) MarshalBinary() ([]byte, error) {
	return b.ToProto().Marshal()
}
func (b *Block) UnmarshalBinary(data []byte) error {
	var pBlock pb.Block
	err := pBlock.Unmarshal(data)
	if err != nil {
		return err
	}
	err = b.FromProto(&pBlock)
	return err
}
func (h *Header) MarshalBinary() ([]byte, error) {
	return h.ToProto().Marshal()
}
func (h *Header) UnmarshalBinary(data []byte) error {
	var pHeader pb.Header
	err := pHeader.Unmarshal(data)
	if err != nil {
		return err
	}
	err = h.FromProto(&pHeader)
	return err
}