trie

package
v0.0.0-...-19c2005 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteTree

func WriteTree(mt MTree)

Types

type MTree

type MTree struct {
	ChainID      string
	ChainVersion string
	Tree         *merkletree.MerkleTree
	Proofs       map[int]*Proof
}

func NewMerkleTree

func NewMerkleTree(chainID, chainVersion string, data ...[]byte) *MTree

func (MTree) GetFilePath

func (mt MTree) GetFilePath() string

func (MTree) NewMerkleFromStruct

func (mt MTree) NewMerkleFromStruct(data []any)

func (MTree) NewMerkleTree

func (mt MTree) NewMerkleTree(data [][]byte)

type Proof

type Proof struct {
	Index     int
	Proof     string
	Height    int
	Timestamp int64
}

type QMerkleTree

type QMerkleTree interface {
	NewMerkleTree(data [][]byte)
	NewMerkleFromStruct(data []any)
}

Jump to

Keyboard shortcuts

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