merkle

package
v0.0.0-...-518a248 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package merkle implements proof verifications in binary merkle trees.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func VerifyProof

func VerifyProof(root common.Hash, index uint64, branch Values, value Value) error

VerifyProof verifies a Merkle proof branch for a single value in a binary Merkle tree (index is a generalized tree index).

Types

type Value

type Value [32]byte

Value represents either a 32 byte leaf value or hash node in a binary merkle tree/partial proof.

func (*Value) UnmarshalJSON

func (m *Value) UnmarshalJSON(input []byte) error

UnmarshalJSON parses a merkle value in hex syntax.

type Values

type Values []Value

Values represent a series of merkle tree leaves/nodes.

Jump to

Keyboard shortcuts

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