package
3.27.0-stable+incompatible
Repository: https://github.com/algorand/go-algorand.git
Documentation: pkg.go.dev

# Functions

Build constructs a Merkle tree given an array.
BuildVectorCommitmentTree constructs a Merkle tree given an array.
MaxSize returns a maximum valid message size for this message type.
ProofDataToSingleLeafProof receives serialized proof data and uses it to construct a proof object.
MaxSize returns a maximum valid message size for this message type.
ProofMaxSizeByElements returns the maximum msgp encoded size of merklearray.Proof structs containing n signatures This is necessary because the allocbounds on the proof are actual theoretical bounds but for calculating maximum proof size for individual message types we have smaller valid bounds.
SingleLeafProofMaxSize returns the maximum msgp encoded size of proof verifying a single leaf It is manually defined here instead of letting msgp do it since we cannot annotate the embedded Proof struct with maxtotalbytes for msgp to autogenerate it.
MaxSize returns a maximum valid message size for this message type.
Verify ensures that the positions in elems correspond to the respective hashes in a tree with the given root hash.
VerifyVectorCommitment verifies a vector commitment proof against a given root.

# Constants

MaxEncodedTreeDepth is the maximum tree depth (root only depth 0) for a tree which is being encoded (either by msbpack or by the fixed length encoding).
MaxNumLeavesOnEncodedTree is the maximum number of leaves allowed for a tree which is being encoded (either by msbpack or by the fixed length encoding).

# Variables

ErrGetOutOfBound returned when trying to retrieve an element which is out of the padded array bound.
Merkle tree errors.
Merkle tree errors.
Merkle tree errors.
Merkle tree errors.
Merkle tree errors.
Merkle tree errors.
Merkle tree errors.

# Structs

Proof is used to convince a verifier about membership of leaves: h0,h1...hn at indexes i0,i1...in on a tree.
SingleLeafProof is used to convince a verifier about membership of a specific leaf h at index i on a tree.
Tree is a Merkle tree, represented by layers of nodes (hashes) in the tree at each height.

# Interfaces

An Array is an interface that is being using when creating Merkle trees.

# Type aliases

A Layer of the Merkle tree consists of a dense array of hashes at that level of the tree.