Documentation ¶
Overview ¶
Package types contains types shared between various parts of the system (beacon chain, validator, slasher).
Index ¶
- type Epoch
- func (e Epoch) Add(x uint64) Epoch
- func (e Epoch) AddEpoch(x Epoch) Epoch
- func (e Epoch) AddSlot(x Slot) Epoch
- func (e Epoch) Div(x uint64) Epoch
- func (e Epoch) HashTreeRoot() ([32]byte, error)
- func (e Epoch) HashTreeRootWith(hh *fssz.Hasher) error
- func (e *Epoch) MarshalSSZ() ([]byte, error)
- func (e *Epoch) MarshalSSZTo(dst []byte) ([]byte, error)
- func (e Epoch) Mod(x uint64) Epoch
- func (e Epoch) ModSlot(x Slot) Epoch
- func (e Epoch) Mul(x uint64) Epoch
- func (e *Epoch) SizeSSZ() int
- func (e Epoch) Sub(x uint64) Epoch
- func (e *Epoch) UnmarshalSSZ(buf []byte) error
- type Slot
- func (s Slot) Add(x uint64) Slot
- func (s Slot) AddEpoch(x Epoch) Slot
- func (s Slot) AddSlot(x Slot) Slot
- func (s Slot) Div(x uint64) Slot
- func (s Slot) DivEpoch(x Epoch) Slot
- func (s Slot) DivSlot(x Slot) Slot
- func (s Slot) HashTreeRoot() ([32]byte, error)
- func (s Slot) HashTreeRootWith(hh *fssz.Hasher) error
- func (s *Slot) MarshalSSZ() ([]byte, error)
- func (s *Slot) MarshalSSZTo(dst []byte) ([]byte, error)
- func (s Slot) Mod(x uint64) Slot
- func (s Slot) ModEpoch(x Epoch) Slot
- func (s Slot) ModSlot(x Slot) Slot
- func (s Slot) Mul(x uint64) Slot
- func (s Slot) MulEpoch(x Epoch) Slot
- func (s Slot) MulSlot(x Slot) Slot
- func (s *Slot) SizeSSZ() int
- func (s Slot) Sub(x uint64) Slot
- func (s Slot) SubEpoch(x Epoch) Slot
- func (s Slot) SubSlot(x Slot) Slot
- func (s *Slot) UnmarshalSSZ(buf []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Epoch ¶
type Epoch uint64
Epoch represents a single epoch.
func (Epoch) HashTreeRoot ¶
HashTreeRoot returns calculated hash root.
func (Epoch) HashTreeRootWith ¶
HashWithDefaultHasher hashes a HashRoot object with a Hasher from the default HasherPool.
func (*Epoch) MarshalSSZ ¶
MarshalSSZ marshals epoch into a serialized object.
func (*Epoch) MarshalSSZTo ¶
MarshalSSZTo marshals epoch with the provided byte slice.
func (*Epoch) UnmarshalSSZ ¶
UnmarshalSSZ deserializes the provided bytes buffer into the epoch object.
type Slot ¶
type Slot uint64
Slot represents a single slot.
func (Slot) HashTreeRoot ¶
HashTreeRoot returns calculated hash root.
func (Slot) HashTreeRootWith ¶
HashWithDefaultHasher hashes a HashRoot object with a Hasher from the default HasherPool.
func (*Slot) MarshalSSZ ¶
MarshalSSZ marshals slot into a serialized object.
func (*Slot) MarshalSSZTo ¶
MarshalSSZTo marshals slot with the provided byte slice.
func (*Slot) UnmarshalSSZ ¶
UnmarshalSSZ deserializes the provided bytes buffer into the slot object.