tree

package
v0.0.0-...-fc6e12d Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyRoot

func VerifyRoot(root []byte, proofs []*mt.Proof, leafs []mt.DataBlock) bool

func VerifyTree

func VerifyTree(tree *mt.MerkleTree, leafs []mt.DataBlock) bool

Types

type Leaf

type Leaf struct {
	// contains filtered or unexported fields
}

func CreateLeaf

func CreateLeaf(data string) *Leaf

func (*Leaf) Serialize

func (b *Leaf) Serialize() ([]byte, error)

type TreeContent

type TreeContent struct {
	// contains filtered or unexported fields
}

func CreateTree

func CreateTree() *TreeContent

func (*TreeContent) AddLeaf

func (tc *TreeContent) AddLeaf(key string, data string)

func (*TreeContent) Build

func (tc *TreeContent) Build() (*mt.MerkleTree, map[string]mt.DataBlock, error)

Jump to

Keyboard shortcuts

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