header

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataAvailabilityHeader

type DataAvailabilityHeader = core.DataAvailabilityHeader

type ExtendedHeader

type ExtendedHeader struct {
	RawHeader    `json:"header"`
	Commit       *core.Commit            `json:"commit"`
	ValidatorSet *core.ValidatorSet      `json:"validator_set"`
	DAH          *DataAvailabilityHeader `json:"dah"`
}

ExtendedHeader represents a wrapped "raw" header that includes information necessary for Celestia Nodes to be notified of new block headers and perform Data Availability Sampling.

func (*ExtendedHeader) ChainID added in v0.2.0

func (eh *ExtendedHeader) ChainID() string

func (*ExtendedHeader) Hash added in v0.2.0

func (eh *ExtendedHeader) Hash() header.Hash

func (*ExtendedHeader) Height added in v0.2.0

func (eh *ExtendedHeader) Height() uint64

func (*ExtendedHeader) IsZero added in v0.2.0

func (eh *ExtendedHeader) IsZero() bool

func (*ExtendedHeader) LastHeader added in v0.2.0

func (eh *ExtendedHeader) LastHeader() header.Hash

func (*ExtendedHeader) MarshalBinary added in v0.2.0

func (eh *ExtendedHeader) MarshalBinary() (data []byte, err error)

func (*ExtendedHeader) MarshalJSON

func (eh *ExtendedHeader) MarshalJSON() ([]byte, error)

MarshalJSON marshals an ExtendedHeader to JSON. The ValidatorSet is wrapped with amino encoding, to be able to unmarshal the crypto.PubKey type back from JSON.

func (*ExtendedHeader) New added in v0.2.0

func (eh *ExtendedHeader) New() *ExtendedHeader

func (*ExtendedHeader) Time added in v0.2.0

func (eh *ExtendedHeader) Time() time.Time

func (*ExtendedHeader) UnmarshalBinary added in v0.2.0

func (eh *ExtendedHeader) UnmarshalBinary(data []byte) error

func (*ExtendedHeader) UnmarshalJSON

func (eh *ExtendedHeader) UnmarshalJSON(data []byte) error

UnmarshalJSON unmarshals an ExtendedHeader from JSON. The ValidatorSet is wrapped with amino encoding, to be able to unmarshal the crypto.PubKey type back from JSON.

func (*ExtendedHeader) Validate added in v0.2.0

func (eh *ExtendedHeader) Validate() error

func (*ExtendedHeader) Verify added in v0.2.0

func (eh *ExtendedHeader) Verify(h *ExtendedHeader) error

type RawHeader

type RawHeader = core.Header

RawHeader is an alias to core.Header. It is "raw" because it is not yet wrapped to include the DataAvailabilityHeader.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL