Documentation ¶
Overview ¶
Code generated by fastssz. DO NOT EDIT. Hash: 392022371031953539c833a4e646ed3a419b560d4ea1d7c087a1ef59bc0cf410 Version: 0.1.3
Index ¶
- Constants
- func ArrayIdxToGIndex(base, len, idx, elementSize uint64) uint64
- func BlockRootsIdxToGIndex(idx uint64) uint64
- func HistoricalSummariesIdxToGIndex(idx uint64) uint64
- func TreeOffsetProofToNode(offsets []uint16, leaves [][]byte) (*ssz.Node, error)
- func TreeOffsetProofToSSZProof(data []byte) (*ssz.Proof, error)
- func VerifyBranch(index int, leaf []byte, hashes [][]byte, root []byte) (bool, error)
- type RootsForHistory
- func (r *RootsForHistory) GetTree() (*ssz.Node, error)
- func (r *RootsForHistory) HashTreeRoot() ([32]byte, error)
- func (r *RootsForHistory) HashTreeRootWith(hh ssz.HashWalker) (err error)
- func (r *RootsForHistory) MarshalSSZ() ([]byte, error)
- func (r *RootsForHistory) MarshalSSZTo(buf []byte) (dst []byte, err error)
- func (r *RootsForHistory) Set(i int, data []byte)
- func (r *RootsForHistory) SizeSSZ() (size int)
- func (r *RootsForHistory) UnmarshalSSZ(buf []byte) error
- type SingleProof
- type TreeOffsetProof
Constants ¶
const ( GIndexStateBlockRoots = uint64(37) GIndexStateNextSyncCommittee = uint64(55) GIndexStateFinalizedRoot = uint64(105) GIndexStateHistoricalSummaries = uint64(118) )
Variables ¶
This section is empty.
Functions ¶
func ArrayIdxToGIndex ¶
func BlockRootsIdxToGIndex ¶
func TreeOffsetProofToNode ¶
TreeOffsetProofToNode Recreate a `Node` given offsets and leaves of a tree-offset proof See https://github.com/protolambda/eth-merkle-trees/blob/master/tree_offsets.md
Types ¶
type RootsForHistory ¶
type RootsForHistory struct {
Roots [][]byte `ssz-size:"8192,32"`
}
func (*RootsForHistory) GetTree ¶
func (r *RootsForHistory) GetTree() (*ssz.Node, error)
GetTree ssz hashes the RootsForHistory object
func (*RootsForHistory) HashTreeRoot ¶
func (r *RootsForHistory) HashTreeRoot() ([32]byte, error)
HashTreeRoot ssz hashes the RootsForHistory object
func (*RootsForHistory) HashTreeRootWith ¶
func (r *RootsForHistory) HashTreeRootWith(hh ssz.HashWalker) (err error)
HashTreeRootWith ssz hashes the RootsForHistory object with a hasher
func (*RootsForHistory) MarshalSSZ ¶
func (r *RootsForHistory) MarshalSSZ() ([]byte, error)
MarshalSSZ ssz marshals the RootsForHistory object
func (*RootsForHistory) MarshalSSZTo ¶
func (r *RootsForHistory) MarshalSSZTo(buf []byte) (dst []byte, err error)
MarshalSSZTo ssz marshals the RootsForHistory object to a target array
func (*RootsForHistory) Set ¶
func (r *RootsForHistory) Set(i int, data []byte)
func (*RootsForHistory) SizeSSZ ¶
func (r *RootsForHistory) SizeSSZ() (size int)
SizeSSZ returns the ssz encoded size in bytes for the RootsForHistory object
func (*RootsForHistory) UnmarshalSSZ ¶
func (r *RootsForHistory) UnmarshalSSZ(buf []byte) error
UnmarshalSSZ ssz unmarshals the RootsForHistory object
type SingleProof ¶
type SingleProof struct {
// contains filtered or unexported fields
}
func NewSingleProof ¶
func NewSingleProof(data []byte) (*SingleProof, error)
func (*SingleProof) Leaf ¶
func (s *SingleProof) Leaf() []byte
func (*SingleProof) SSZ ¶
func (s *SingleProof) SSZ() *ssz.Proof
type TreeOffsetProof ¶
type TreeOffsetProof struct {
// contains filtered or unexported fields
}
func NewTreeOffsetProof ¶
func NewTreeOffsetProof(data []byte) (*TreeOffsetProof, error)
func (*TreeOffsetProof) GetGIndex ¶
func (t *TreeOffsetProof) GetGIndex() int
func (*TreeOffsetProof) Leaves ¶
func (t *TreeOffsetProof) Leaves() [][]byte
func (*TreeOffsetProof) Offsets ¶
func (t *TreeOffsetProof) Offsets() []uint16