Documentation ¶
Index ¶
- func Hash(data ...[32]byte) [32]byte
- func HashLeafData(ger, prevBlockHash common.Hash, minTimestamp uint64) [32]byte
- type L1InfoTree
- func (mt *L1InfoTree) AddLeaf(index uint32, leaf [32]byte) (common.Hash, error)
- func (mt *L1InfoTree) BuildL1InfoRoot(leaves [][32]byte) (common.Hash, error)
- func (mt *L1InfoTree) ComputeMerkleProof(gerIndex uint32, leaves [][32]byte) ([][32]byte, common.Hash, error)
- func (mt *L1InfoTree) GetCurrentRootCountAndSiblings() (common.Hash, uint32, [][32]byte)
- func (mt *L1InfoTree) ResetL1InfoTree(initialLeaves [][32]byte) (*L1InfoTree, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type L1InfoTree ¶
type L1InfoTree struct {
// contains filtered or unexported fields
}
L1InfoTree provides methods to compute L1InfoTree
func NewL1InfoTree ¶
NewL1InfoTree creates new L1InfoTree.
func (*L1InfoTree) BuildL1InfoRoot ¶
func (mt *L1InfoTree) BuildL1InfoRoot(leaves [][32]byte) (common.Hash, error)
BuildL1InfoRoot computes the root given the leaves of the tree
func (*L1InfoTree) ComputeMerkleProof ¶
func (mt *L1InfoTree) ComputeMerkleProof(gerIndex uint32, leaves [][32]byte) ([][32]byte, common.Hash, error)
ComputeMerkleProof computes the merkleProof and root given the leaves of the tree
func (*L1InfoTree) GetCurrentRootCountAndSiblings ¶
func (mt *L1InfoTree) GetCurrentRootCountAndSiblings() (common.Hash, uint32, [][32]byte)
GetCurrentRootCountAndSiblings returns the latest root, count and sibblings
func (*L1InfoTree) ResetL1InfoTree ¶
func (mt *L1InfoTree) ResetL1InfoTree(initialLeaves [][32]byte) (*L1InfoTree, error)
ResetL1InfoTree resets the L1InfoTree.
Click to show internal directories.
Click to hide internal directories.