package merkle

import "github.com/ethereum/go-ethereum/beacon/merkle"

Package merkle implements proof verifications in binary merkle trees.

Index

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.

Source Files

merkle.go

Version
v1.16.1 (latest)
Published
Jul 2, 2025
Platform
linux/amd64
Imports
5 packages
Last checked
3 days ago

Tools for package owners.