merkle

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Verify

func Verify(leaf common.Hash, index int, proof []common.Hash, root common.Hash) bool

Types

type Tree

type Tree struct {
	Levels [][]common.Hash // Levels[0] = leaves, Levels[len-1][0] = root
}

func Build

func Build(leaves []common.Hash) (*Tree, error)

func (*Tree) Proof

func (t *Tree) Proof(index int) ([]common.Hash, error)

func (*Tree) Root

func (t *Tree) Root() common.Hash

Jump to

Keyboard shortcuts

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